@redsift/table 7.8.1 → 8.0.0-alpha.1

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/CONTRIBUTING.md CHANGED
@@ -48,11 +48,11 @@ The Design System is following a monorepo architecture, providing multiple packa
48
48
 
49
49
  - `@redsift/charts`
50
50
 
51
- This package provides charts components. Charts are based on [d3.js](https://d3js.org/) and are mainly static. For filterable charts, see `@redsift/dashboard`.
51
+ This package provides charts components. Charts are based on [d3.js](https://d3js.org/) for computation, [react](https://react.dev/) for rendering and events and [react-spring](https://www.react-spring.dev/) for animations and transitions.
52
52
 
53
53
  - `@redsift/dashboard`
54
54
 
55
- This package provides dashboard-related components. Charts are based on [dc.js](https://dc-js.github.io/dc.js/), [d3fc](https://d3fc.io/) and [crossfilter](https://crossfilter.github.io/crossfilter/) and datagrids are based on `@redsift/table`. It contains every filterable elements to use inside a dashboard. For static charts, see `@redsift/charts`.
55
+ This package provides dashboard-related components and decorators to make charts and datagrid filterable using [crossfilter](https://crossfilter.github.io/crossfilter/).
56
56
 
57
57
  - _Deprecated_ `@redsift/design-system-legacy`
58
58
 
package/index.d.ts CHANGED
@@ -1,11 +1,22 @@
1
1
  import * as _mui_x_data_grid_pro from '@mui/x-data-grid-pro';
2
- import { GridFilterItem, GridCellParams, GridFilterInputMultipleValue, GridFilterOperator, DataGridProProps, GridToolbarExportProps, GridToolbarFilterButtonProps, GridToolbarColumnsButton, GridToolbarDensitySelector } from '@mui/x-data-grid-pro';
3
- export { GridAlignment, GridColDef, GridColumns, GridFilterItem, GridFilterModel, GridSelectionModel, getGridBooleanOperators, getGridDateOperators, getGridNumericOperators, getGridSingleSelectOperators, getGridStringOperators } 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 { GridAlignment, GridColDef, GridColumns, GridFilterItem, GridFilterModel, GridSelectionModel, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
4
4
  import { Comp, ColorPalette, ProductColorPalette, ShieldVariant } from '@redsift/design-system';
5
- import { JSXElementConstructor, RefObject, ComponentProps, ReactNode } from 'react';
5
+ import React, { ReactNode, RefObject, ComponentProps } from 'react';
6
6
 
7
7
  declare const DETAIL_PANEL_TOGGLE_COL_DEF: _mui_x_data_grid_pro.GridColDef<any, any, any>;
8
8
 
9
+ declare const IS_BETWEEN: {
10
+ label: string;
11
+ value: string;
12
+ getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
13
+ InputComponent: (props: any) => JSX.Element;
14
+ };
15
+
16
+ declare const getGridNumericOperators: () => GridFilterOperator<any, number | string | null, any>[];
17
+
18
+ declare const getGridStringOperators: () => GridFilterOperator<any, number | string | null, any>[];
19
+
9
20
  declare const CONTAINS_ANY_OF: {
10
21
  label: string;
11
22
  value: string;
@@ -20,7 +31,19 @@ declare const ENDS_WITH_ANY_OF: {
20
31
  InputComponent: typeof GridFilterInputMultipleValue;
21
32
  };
22
33
 
23
- declare const IS_ANY_OF: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>;
34
+ declare const IS_ANY_OF: {
35
+ label: string;
36
+ value: string;
37
+ getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
38
+ InputComponent: typeof GridFilterInputMultipleValue;
39
+ };
40
+
41
+ declare const IS_NOT_ANY_OF: {
42
+ label: string;
43
+ value: string;
44
+ getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
45
+ InputComponent: typeof GridFilterInputMultipleValue;
46
+ };
24
47
 
25
48
  declare const STARTS_WITH_ANY_OF: {
26
49
  label: string;
@@ -31,13 +54,13 @@ declare const STARTS_WITH_ANY_OF: {
31
54
 
32
55
  declare const getGridStringArrayOperators: () => GridFilterOperator<any, number | string | null, any>[];
33
56
 
34
- interface DataGridProps extends DataGridProProps {
57
+ interface DataGridProps extends Partial<Pick<DataGridProProps, 'rows'>>, Omit<DataGridProProps, 'rows'> {
35
58
  /** License key for MUI Datagrid Pro. */
36
59
  license?: string;
37
60
  /** Height. A default one is set to prevent rendering all rows. */
38
61
  height?: string;
39
62
  /** Toolbar. A default one is provided but every button from this default Toolbar can be customized and the entire Toolbar can be replaced. */
40
- toolbar?: JSXElementConstructor<any>;
63
+ toolbar?: ReactNode;
41
64
  /** Whether the Toolbar is displayed or not. */
42
65
  hideToolbar?: boolean;
43
66
  }
@@ -90,7 +113,8 @@ declare global {
90
113
  }
91
114
  }
92
115
  }
93
- declare const Toolbar: Comp<ToolbarProps, HTMLDivElement>;
116
+ /** ------ */
117
+ declare const Toolbar: React.FC<ToolbarProps>;
94
118
 
95
119
  interface TextCellProps extends ComponentProps<'div'> {
96
120
  /** Including Badge Component. */
@@ -122,4 +146,4 @@ interface TextCellProps extends ComponentProps<'div'> {
122
146
  */
123
147
  declare const TextCell: Comp<TextCellProps, HTMLDivElement>;
124
148
 
125
- export { CONTAINS_ANY_OF, DETAIL_PANEL_TOGGLE_COL_DEF, DataGrid, DataGridProps, ENDS_WITH_ANY_OF, IS_ANY_OF, STARTS_WITH_ANY_OF, StyledDataGridProps, TextCell, Toolbar, getGridStringArrayOperators };
149
+ export { CONTAINS_ANY_OF, DETAIL_PANEL_TOGGLE_COL_DEF, DataGrid, DataGridProps, ENDS_WITH_ANY_OF, IS_ANY_OF, IS_BETWEEN, IS_NOT_ANY_OF, STARTS_WITH_ANY_OF, StyledDataGridProps, TextCell, Toolbar, getGridNumericOperators, getGridStringArrayOperators, getGridStringOperators };