@redsift/table 11.3.1 → 11.3.2-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.
package/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
+ import * as _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect from '@mui/x-data-grid/components/panel/filterPanel/GridFilterInputMultipleSingleSelect';
2
+ import * as _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect from '@mui/x-data-grid/components/panel/filterPanel/GridFilterInputSingleSelect';
1
3
  import * as _mui_x_data_grid_pro from '@mui/x-data-grid-pro';
2
- import { GridColumnTypesRecord, GridFilterItem, GridCellParams, GridFilterOperator, GridFilterInputValue, GridFilterInputMultipleValue, DataGridProProps, GridFilterModel, GridPaginationModel, GridSortModel, GridSortItem, GridColumnVisibilityModel, GridPinnedColumns, GridSlotsComponent, GridRowSelectionModel, GridApiPro as GridApiPro$1, GridRowParams, GridToolbarExportProps, GridToolbarFilterButtonProps, GridToolbarColumnsButton, GridToolbarDensitySelector } from '@mui/x-data-grid-pro';
4
+ import { GridColumnTypesRecord, GridFilterItem, GridCellParams, GridFilterOperator, GridFilterInputValue, GridFilterInputSingleSelect, GridFilterInputMultipleValue, GridFilterInputMultipleSingleSelect, DataGridProProps, GridFilterModel, GridPaginationModel, GridSortModel, GridSortItem, GridColumnVisibilityModel, GridPinnedColumns, GridSlotsComponent, GridRowSelectionModel, GridApiPro as GridApiPro$1, GridRowParams, GridToolbarExportProps, GridToolbarFilterButtonProps, GridToolbarColumnsButton, GridToolbarDensitySelector } from '@mui/x-data-grid-pro';
3
5
  export { GridAlignment, GridColDef, GridFilterItem, GridFilterModel, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
4
6
  import { GridInitialStatePro } from '@mui/x-data-grid-pro/models/gridStatePro';
5
7
  import React, { ReactNode, ComponentProps, MutableRefObject, RefObject } from 'react';
@@ -17,6 +19,47 @@ declare const getRsNumberColumnType: () => {
17
19
  type: string;
18
20
  filterOperators: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
19
21
  };
22
+ declare const getRsSingleSelectColumnType: () => {
23
+ type: string;
24
+ filterOperators: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
25
+ };
26
+ declare const getRsSingleSelectWithShortOperatorListColumnType: () => {
27
+ type: string;
28
+ filterOperators: ({
29
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
30
+ label?: string | undefined;
31
+ headerLabel?: string | undefined;
32
+ value: string;
33
+ getApplyFilterFn: _mui_x_data_grid_pro.GetApplyFilterFnLegacy<any, any, any>;
34
+ getApplyFilterFnV7?: _mui_x_data_grid_pro.GetApplyFilterFnV7<any, any, any> | undefined;
35
+ InputComponentProps?: Record<string, any> | undefined;
36
+ getValueAsString?: ((value: any) => string) | undefined;
37
+ requiresFilterValue?: boolean | undefined;
38
+ } | {
39
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
40
+ label: string;
41
+ value: string;
42
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, unknown, unknown, _mui_x_data_grid_pro.GridTreeNode>) => boolean) | null;
43
+ })[];
44
+ };
45
+ declare const getRsMultipleSelectColumnType: () => {
46
+ type: string;
47
+ filterOperators: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
48
+ };
49
+ declare const getRsMultipleSelectWithShortOperatorListColumnType: () => {
50
+ type: string;
51
+ filterOperators: ({
52
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
53
+ label: string;
54
+ value: string;
55
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, unknown, unknown, _mui_x_data_grid_pro.GridTreeNode>) => boolean) | null;
56
+ } | {
57
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
58
+ label: string;
59
+ value: string;
60
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, unknown, unknown, _mui_x_data_grid_pro.GridTreeNode>) => boolean) | null;
61
+ })[];
62
+ };
20
63
  declare const customColumnTypes: Partial<GridColumnTypesRecord>;
21
64
 
22
65
  declare const IS_BETWEEN: {
@@ -28,6 +71,13 @@ declare const IS_BETWEEN: {
28
71
 
29
72
  declare const getGridNumericOperators: () => GridFilterOperator<any, number | string | null, any>[];
30
73
 
74
+ declare const DOES_NOT_CONTAIN: {
75
+ label: string;
76
+ value: string;
77
+ getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
78
+ InputComponent: typeof GridFilterInputValue;
79
+ };
80
+
31
81
  declare const DOES_NOT_EQUAL: {
32
82
  label: string;
33
83
  value: string;
@@ -35,12 +85,70 @@ declare const DOES_NOT_EQUAL: {
35
85
  InputComponent: typeof GridFilterInputValue;
36
86
  };
37
87
 
38
- declare const DOES_NOT_CONTAIN: {
88
+ declare const DOES_NOT_HAVE: {
89
+ label: string;
90
+ value: string;
91
+ getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
92
+ InputComponent: typeof GridFilterInputValue;
93
+ };
94
+ declare const DOES_NOT_HAVE_WITH_SELECT: {
95
+ InputComponent: typeof GridFilterInputSingleSelect;
96
+ label: string;
97
+ value: string;
98
+ getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
99
+ };
100
+
101
+ declare const HAS: {
102
+ label: string;
103
+ value: string;
104
+ getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
105
+ InputComponent: typeof GridFilterInputValue;
106
+ };
107
+ declare const HAS_WITH_SELECT: {
108
+ InputComponent: typeof GridFilterInputSingleSelect;
109
+ label: string;
110
+ value: string;
111
+ getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
112
+ };
113
+
114
+ declare const HAS_ONLY: {
39
115
  label: string;
40
116
  value: string;
41
117
  getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
42
118
  InputComponent: typeof GridFilterInputValue;
43
119
  };
120
+ declare const HAS_ONLY_WITH_SELECT: {
121
+ InputComponent: typeof GridFilterInputSingleSelect;
122
+ label: string;
123
+ value: string;
124
+ getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
125
+ };
126
+
127
+ declare const IS: GridFilterOperator<any, any, any>;
128
+ declare const IS_WITH_SELECT: {
129
+ InputComponent: typeof GridFilterInputSingleSelect;
130
+ label?: string | undefined;
131
+ headerLabel?: string | undefined;
132
+ value: string;
133
+ getApplyFilterFn: _mui_x_data_grid_pro.GetApplyFilterFnLegacy<any, any, any>;
134
+ getApplyFilterFnV7?: _mui_x_data_grid_pro.GetApplyFilterFnV7<any, any, any> | undefined;
135
+ InputComponentProps?: Record<string, any> | undefined;
136
+ getValueAsString?: ((value: any) => string) | undefined;
137
+ requiresFilterValue?: boolean | undefined;
138
+ };
139
+
140
+ declare const IS_NOT: GridFilterOperator<any, any, any>;
141
+ declare const IS_NOT_WITH_SELECT: {
142
+ InputComponent: typeof GridFilterInputSingleSelect;
143
+ label?: string | undefined;
144
+ headerLabel?: string | undefined;
145
+ value: string;
146
+ getApplyFilterFn: _mui_x_data_grid_pro.GetApplyFilterFnLegacy<any, any, any>;
147
+ getApplyFilterFnV7?: _mui_x_data_grid_pro.GetApplyFilterFnV7<any, any, any> | undefined;
148
+ InputComponentProps?: Record<string, any> | undefined;
149
+ getValueAsString?: ((value: any) => string) | undefined;
150
+ requiresFilterValue?: boolean | undefined;
151
+ };
44
152
 
45
153
  declare const getGridStringOperators: () => GridFilterOperator<any, number | string | null, any>[];
46
154
 
@@ -70,6 +178,25 @@ declare const IS_ANY_OF: {
70
178
  getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
71
179
  InputComponent: typeof GridFilterInputMultipleValue;
72
180
  };
181
+ declare const IS_ANY_OF_WITH_SELECT: {
182
+ InputComponent: typeof GridFilterInputMultipleSingleSelect;
183
+ label: string;
184
+ value: string;
185
+ getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
186
+ };
187
+
188
+ declare const HAS_ANY_OF: {
189
+ label: string;
190
+ value: string;
191
+ getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
192
+ InputComponent: typeof GridFilterInputMultipleValue;
193
+ };
194
+ declare const HAS_ANY_OF_WITH_SELECT: {
195
+ InputComponent: typeof GridFilterInputMultipleSingleSelect;
196
+ label: string;
197
+ value: string;
198
+ getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
199
+ };
73
200
 
74
201
  declare const IS_NOT_ANY_OF: {
75
202
  label: string;
@@ -77,6 +204,12 @@ declare const IS_NOT_ANY_OF: {
77
204
  getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
78
205
  InputComponent: typeof GridFilterInputMultipleValue;
79
206
  };
207
+ declare const IS_NOT_ANY_OF_WITH_SELECT: {
208
+ InputComponent: typeof GridFilterInputMultipleSingleSelect;
209
+ label: string;
210
+ value: string;
211
+ getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
212
+ };
80
213
 
81
214
  declare const STARTS_WITH_ANY_OF: {
82
215
  label: string;
@@ -86,6 +219,8 @@ declare const STARTS_WITH_ANY_OF: {
86
219
  };
87
220
 
88
221
  declare const getGridStringArrayOperators: () => GridFilterOperator<any, number | string | null, any>[];
222
+ declare const getGridStringArrayOperatorsWithSelect: () => GridFilterOperator<any, number | string | null, any>[];
223
+ declare const getGridStringArrayOperatorsWithSelectOnStringArrayColumns: () => GridFilterOperator<any, number | string | null, any>[];
89
224
 
90
225
  declare const operatorList: {
91
226
  string: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
@@ -96,6 +231,35 @@ declare const operatorList: {
96
231
  singleSelect: _mui_x_data_grid_pro.GridFilterOperator<any, any, any>[];
97
232
  rsString: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
98
233
  rsNumber: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
234
+ rsSingleSelect: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
235
+ rsSingleSelectWithShortOperatorList: ({
236
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
237
+ label?: string | undefined;
238
+ headerLabel?: string | undefined;
239
+ value: string;
240
+ getApplyFilterFn: _mui_x_data_grid_pro.GetApplyFilterFnLegacy<any, any, any>;
241
+ getApplyFilterFnV7?: _mui_x_data_grid_pro.GetApplyFilterFnV7<any, any, any> | undefined;
242
+ InputComponentProps?: Record<string, any> | undefined;
243
+ getValueAsString?: ((value: any) => string) | undefined;
244
+ requiresFilterValue?: boolean | undefined;
245
+ } | {
246
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
247
+ label: string;
248
+ value: string;
249
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, unknown, unknown, _mui_x_data_grid_pro.GridTreeNode>) => boolean) | null;
250
+ })[];
251
+ rsMultipleSelect: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
252
+ rsMultipleSelectWithShortOperatorList: ({
253
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputSingleSelect.GridFilterInputSingleSelect;
254
+ label: string;
255
+ value: string;
256
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, unknown, unknown, _mui_x_data_grid_pro.GridTreeNode>) => boolean) | null;
257
+ } | {
258
+ InputComponent: typeof _mui_x_data_grid_components_panel_filterPanel_GridFilterInputMultipleSingleSelect.GridFilterInputMultipleSingleSelect;
259
+ label: string;
260
+ value: string;
261
+ getApplyFilterFn: (filterItem: _mui_x_data_grid_pro.GridFilterItem) => ((params: _mui_x_data_grid_pro.GridCellParams<any, unknown, unknown, _mui_x_data_grid_pro.GridTreeNode>) => boolean) | null;
262
+ })[];
99
263
  rsStringArray: _mui_x_data_grid_pro.GridFilterOperator<any, string | number | null, any>[];
100
264
  };
101
265
 
@@ -421,4 +585,4 @@ type ToolbarWrapperProps = {
421
585
  };
422
586
  declare const ToolbarWrapper: React.FC<ToolbarWrapperProps>;
423
587
 
424
- export { BaseButton, BaseCheckbox, BaseIcon, BasePopper, BaseTextField, CATEGORIES, CONTAINS_ANY_OF, CONTAINS_ANY_OF_I, Category, CompletionResponse, ControlledPagination, ControlledPaginationProps, DEFAULT_OPERATORS, DETAIL_PANEL_TOGGLE_COL_DEF, DIMENSION_MODEL_KEY, DOES_NOT_CONTAIN, DOES_NOT_EQUAL, DataGrid, DataGridModel, DataGridProps, ENDS_WITH_ANY_OF, FILTER_MODEL_KEY, FILTER_SEARCH_KEY, FilterConfig, GridToolbarFilterSemanticField, GridToolbarFilterSemanticFieldProps, IS_ANY_OF, IS_BETWEEN, IS_NOT_ANY_OF, PAGINATION_MODEL_KEY, PINNED_COLUMNS, PinnedColumns, SORT_MODEL_KEY, STARTS_WITH_ANY_OF, SelectionStatus, ServerSideControlledPagination, ServerSideControlledPaginationProps, StatefulDataGrid, StatefulDataGridProps, StyledDataGridProps, TextCell, Toolbar, ToolbarWrapper, ToolbarWrapperProps, VISIBILITY_MODEL_KEY, areFilterModelsEquivalent, buildStorageKey, clearPreviousVersionStorage, customColumnTypes, decodeValue, encodeValue, getColumnVisibilityFromString, getCompletion, getFilterModelFromString, getFinalSearch, getGridNumericOperators, getGridStringArrayOperators, getGridStringOperators, getModelsParsedOrUpdateLocalStorage, getPaginationFromString, getPinnedColumnsFromString, getRsNumberColumnType, getRsStringColumnType, getSearchParamsFromColumnVisibility, getSearchParamsFromFilterModel, getSearchParamsFromPagination, getSearchParamsFromPinnedColumns, getSearchParamsFromSorting, getSearchParamsFromTab, getSortingFromString, isOperatorValueValid, isValueValid, muiIconToDSIcon, numberOperatorDecoder, numberOperatorEncoder, onServerSideSelectionStatusChange, operatorList, updateUrl, urlSearchParamsToString };
588
+ export { BaseButton, BaseCheckbox, BaseIcon, BasePopper, BaseTextField, CATEGORIES, CONTAINS_ANY_OF, CONTAINS_ANY_OF_I, Category, CompletionResponse, ControlledPagination, ControlledPaginationProps, DEFAULT_OPERATORS, DETAIL_PANEL_TOGGLE_COL_DEF, DIMENSION_MODEL_KEY, DOES_NOT_CONTAIN, DOES_NOT_EQUAL, DOES_NOT_HAVE, DOES_NOT_HAVE_WITH_SELECT, DataGrid, DataGridModel, DataGridProps, ENDS_WITH_ANY_OF, FILTER_MODEL_KEY, FILTER_SEARCH_KEY, FilterConfig, GridToolbarFilterSemanticField, GridToolbarFilterSemanticFieldProps, HAS, HAS_ANY_OF, HAS_ANY_OF_WITH_SELECT, HAS_ONLY, HAS_ONLY_WITH_SELECT, HAS_WITH_SELECT, IS, IS_ANY_OF, IS_ANY_OF_WITH_SELECT, IS_BETWEEN, IS_NOT, IS_NOT_ANY_OF, IS_NOT_ANY_OF_WITH_SELECT, IS_NOT_WITH_SELECT, IS_WITH_SELECT, PAGINATION_MODEL_KEY, PINNED_COLUMNS, PinnedColumns, SORT_MODEL_KEY, STARTS_WITH_ANY_OF, SelectionStatus, ServerSideControlledPagination, ServerSideControlledPaginationProps, StatefulDataGrid, StatefulDataGridProps, StyledDataGridProps, TextCell, Toolbar, ToolbarWrapper, ToolbarWrapperProps, VISIBILITY_MODEL_KEY, areFilterModelsEquivalent, buildStorageKey, clearPreviousVersionStorage, customColumnTypes, decodeValue, encodeValue, getColumnVisibilityFromString, getCompletion, getFilterModelFromString, getFinalSearch, getGridNumericOperators, getGridStringArrayOperators, getGridStringArrayOperatorsWithSelect, getGridStringArrayOperatorsWithSelectOnStringArrayColumns, getGridStringOperators, getModelsParsedOrUpdateLocalStorage, getPaginationFromString, getPinnedColumnsFromString, getRsMultipleSelectColumnType, getRsMultipleSelectWithShortOperatorListColumnType, getRsNumberColumnType, getRsSingleSelectColumnType, getRsSingleSelectWithShortOperatorListColumnType, getRsStringColumnType, getSearchParamsFromColumnVisibility, getSearchParamsFromFilterModel, getSearchParamsFromPagination, getSearchParamsFromPinnedColumns, getSearchParamsFromSorting, getSearchParamsFromTab, getSortingFromString, isOperatorValueValid, isValueValid, muiIconToDSIcon, numberOperatorDecoder, numberOperatorEncoder, onServerSideSelectionStatusChange, operatorList, updateUrl, urlSearchParamsToString };
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { GRID_DETAIL_PANEL_TOGGLE_COL_DEF, getGridNumericOperators as getGridNumericOperators$1, GridFilterInputValue, GridFilterInputMultipleValue, getGridStringOperators as getGridStringOperators$1, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators, GridLogicOperator, GridToolbarContainer, GridToolbarFilterButton, GridToolbarColumnsButton, GridToolbarDensitySelector, GridToolbarExport, gridExpandedSortedRowIdsSelector, GridToolbarQuickFilter, gridPaginatedVisibleSortedGridRowEntriesSelector, gridPaginatedVisibleSortedGridRowIdsSelector, gridFilteredSortedRowEntriesSelector, gridFilteredSortedRowIdsSelector, useGridApiRef, DataGridPro } from '@mui/x-data-grid-pro';
1
+ import { GRID_DETAIL_PANEL_TOGGLE_COL_DEF, getGridNumericOperators as getGridNumericOperators$1, GridFilterInputValue, GridFilterInputSingleSelect, GridFilterInputMultipleValue, GridFilterInputMultipleSingleSelect, getGridStringOperators as getGridStringOperators$1, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators, GridLogicOperator, GridToolbarContainer, GridToolbarFilterButton, GridToolbarColumnsButton, GridToolbarDensitySelector, GridToolbarExport, gridExpandedSortedRowIdsSelector, GridToolbarQuickFilter, gridPaginatedVisibleSortedGridRowEntriesSelector, gridPaginatedVisibleSortedGridRowIdsSelector, gridFilteredSortedRowEntriesSelector, gridFilteredSortedRowIdsSelector, useGridApiRef, DataGridPro } from '@mui/x-data-grid-pro';
2
2
  export { getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators } from '@mui/x-data-grid-pro';
3
3
  import * as React from 'react';
4
4
  import React__default, { Children, isValidElement, cloneElement, forwardRef, useLayoutEffect, useEffect, useRef, useContext, useState, useCallback, createElement, useMemo } from 'react';
@@ -17661,6 +17661,27 @@ const IS_BETWEEN = isBetweenOperator;
17661
17661
 
17662
17662
  const getGridNumericOperators = () => [...getGridNumericOperators$1(), IS_BETWEEN];
17663
17663
 
17664
+ const doesNotContain = {
17665
+ label: 'does not contain',
17666
+ value: 'doesNotContain',
17667
+ getApplyFilterFn: filterItem => {
17668
+ if (!filterItem.field || !filterItem.value || !filterItem.operator) {
17669
+ return null;
17670
+ }
17671
+ return params => {
17672
+ if (filterItem.value.length === 0) {
17673
+ return true;
17674
+ }
17675
+ if (params.value.indexOf(filterItem.value) !== -1) {
17676
+ return false;
17677
+ }
17678
+ return true;
17679
+ };
17680
+ },
17681
+ InputComponent: GridFilterInputValue
17682
+ };
17683
+ const DOES_NOT_CONTAIN = doesNotContain;
17684
+
17664
17685
  const doesNotEqual = {
17665
17686
  label: 'does not equal',
17666
17687
  value: 'doesNotEqual',
@@ -17682,26 +17703,100 @@ const doesNotEqual = {
17682
17703
  };
17683
17704
  const DOES_NOT_EQUAL = doesNotEqual;
17684
17705
 
17685
- const doesNotContain = {
17686
- label: 'does not contain',
17687
- value: 'doesNotContain',
17706
+ const doesNotHaveOperator = {
17707
+ label: "doesn't have",
17708
+ value: 'doesNotHave',
17688
17709
  getApplyFilterFn: filterItem => {
17689
17710
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
17690
17711
  return null;
17691
17712
  }
17692
17713
  return params => {
17693
- if (filterItem.value.length === 0) {
17694
- return true;
17695
- }
17696
- if (params.value.indexOf(filterItem.value) !== -1) {
17697
- return false;
17698
- }
17699
- return true;
17714
+ const cellValues = Array.isArray(params.value) ? params.value : [params.value];
17715
+ return !cellValues.includes(filterItem.value);
17700
17716
  };
17701
17717
  },
17702
17718
  InputComponent: GridFilterInputValue
17703
17719
  };
17704
- const DOES_NOT_CONTAIN = doesNotContain;
17720
+ const DOES_NOT_HAVE = doesNotHaveOperator;
17721
+ const DOES_NOT_HAVE_WITH_SELECT = _objectSpread2(_objectSpread2({}, DOES_NOT_HAVE), {}, {
17722
+ InputComponent: GridFilterInputSingleSelect
17723
+ });
17724
+
17725
+ const hasOperator = {
17726
+ label: 'has',
17727
+ value: 'has',
17728
+ getApplyFilterFn: filterItem => {
17729
+ if (!filterItem.field || !filterItem.value || !filterItem.operator) {
17730
+ return null;
17731
+ }
17732
+ return params => {
17733
+ const cellValues = Array.isArray(params.value) ? params.value : [params.value];
17734
+ return cellValues.includes(filterItem.value);
17735
+ };
17736
+ },
17737
+ InputComponent: GridFilterInputValue
17738
+ };
17739
+ const HAS = hasOperator;
17740
+ const HAS_WITH_SELECT = _objectSpread2(_objectSpread2({}, HAS), {}, {
17741
+ InputComponent: GridFilterInputSingleSelect
17742
+ });
17743
+
17744
+ const hasOnlyOperator = {
17745
+ label: 'has only',
17746
+ value: 'hasOnly',
17747
+ getApplyFilterFn: filterItem => {
17748
+ if (!filterItem.field || !filterItem.value || !filterItem.operator) {
17749
+ return null;
17750
+ }
17751
+ return params => {
17752
+ const cellValues = Array.isArray(params.value) ? params.value : [params.value];
17753
+ return cellValues.length === 1 && cellValues[0] === filterItem.value;
17754
+ };
17755
+ },
17756
+ InputComponent: GridFilterInputValue
17757
+ };
17758
+ const HAS_ONLY = hasOnlyOperator;
17759
+ const HAS_ONLY_WITH_SELECT = _objectSpread2(_objectSpread2({}, HAS_ONLY), {}, {
17760
+ InputComponent: GridFilterInputSingleSelect
17761
+ });
17762
+
17763
+ const isOperator = {
17764
+ label: 'is',
17765
+ value: 'is',
17766
+ getApplyFilterFn: filterItem => {
17767
+ if (!filterItem.field || !filterItem.value || !filterItem.operator) {
17768
+ return null;
17769
+ }
17770
+ return params => {
17771
+ const paramValue = params.value;
17772
+ return paramValue === filterItem.value;
17773
+ };
17774
+ },
17775
+ InputComponent: GridFilterInputValue
17776
+ };
17777
+ const IS = isOperator;
17778
+ const IS_WITH_SELECT = _objectSpread2(_objectSpread2({}, IS), {}, {
17779
+ InputComponent: GridFilterInputSingleSelect
17780
+ });
17781
+
17782
+ const isNotOperator = {
17783
+ label: 'is not',
17784
+ value: 'isNot',
17785
+ getApplyFilterFn: filterItem => {
17786
+ if (!filterItem.field || !filterItem.value || !filterItem.operator) {
17787
+ return null;
17788
+ }
17789
+ return params => {
17790
+ const paramValue = params.value;
17791
+ return paramValue !== filterItem.value;
17792
+ };
17793
+ },
17794
+ InputComponent: GridFilterInputValue
17795
+ };
17796
+ const IS_NOT = isNotOperator;
17797
+ const IS_NOT_WITH_SELECT = _objectSpread2(_objectSpread2({}, IS_NOT), {}, {
17798
+ InputComponent: GridFilterInputSingleSelect
17799
+ });
17705
17800
 
17706
17801
  const containsAnyOfOperator = {
17707
17802
  label: 'contains any of',
@@ -17803,6 +17898,32 @@ const isAnyOfOperator = {
17803
17898
  InputComponent: GridFilterInputMultipleValue
17804
17899
  };
17805
17900
  const IS_ANY_OF = isAnyOfOperator;
17901
+ const IS_ANY_OF_WITH_SELECT = _objectSpread2(_objectSpread2({}, IS_ANY_OF), {}, {
17902
+ InputComponent: GridFilterInputMultipleSingleSelect
17903
+ });
17904
+
17905
+ const hasAnyOfOperator = {
17906
+ label: 'has any of',
17907
+ value: 'hasAnyOf',
17908
+ getApplyFilterFn: filterItem => {
17909
+ if (!filterItem.field || !filterItem.value || !filterItem.operator) {
17910
+ return null;
17911
+ }
17912
+ return params => {
17913
+ if (filterItem.value.length === 0) {
17914
+ return true;
17915
+ }
17916
+ const cellValues = Array.isArray(params.value) ? params.value : [params.value];
17917
+ const filterItemValues = Array.isArray(filterItem.value) ? filterItem.value : [filterItem.value];
17918
+ return filterItemValues.some(v => cellValues.includes(v));
17919
+ };
17920
+ },
17921
+ InputComponent: GridFilterInputMultipleValue
17922
+ };
17923
+ const HAS_ANY_OF = hasAnyOfOperator;
17924
+ const HAS_ANY_OF_WITH_SELECT = _objectSpread2(_objectSpread2({}, HAS_ANY_OF), {}, {
17925
+ InputComponent: GridFilterInputMultipleSingleSelect
17926
+ });
17806
17927
 
17807
17928
  const isNotAnyOfOperator = {
17808
17929
  label: 'is not any of',
@@ -17827,6 +17948,9 @@ const isNotAnyOfOperator = {
17827
17948
  InputComponent: GridFilterInputMultipleValue
17828
17949
  };
17829
17950
  const IS_NOT_ANY_OF = isNotAnyOfOperator;
17951
+ const IS_NOT_ANY_OF_WITH_SELECT = _objectSpread2(_objectSpread2({}, IS_NOT_ANY_OF), {}, {
17952
+ InputComponent: GridFilterInputMultipleSingleSelect
17953
+ });
17830
17954
 
17831
17955
  const startsWithAnyOfOperator = {
17832
17956
  label: 'starts with any of',
@@ -17855,7 +17979,30 @@ const startsWithAnyOfOperator = {
17855
17979
  };
17856
17980
  const STARTS_WITH_ANY_OF = startsWithAnyOfOperator;
17857
17981
 
17982
+ const doesNotHaveAnyOf = {
17983
+ label: "doesn't have any of",
17984
+ value: 'doesNotHaveAnyOf',
17985
+ getApplyFilterFn: filterItem => {
17986
+ if (!filterItem.field || !filterItem.value || !Array.isArray(filterItem.value) || filterItem.value.length === 0) {
17987
+ return null;
17988
+ }
17989
+ return params => {
17990
+ const cellValues = Array.isArray(params.value) ? params.value : [params.value];
17991
+
17992
+ // Return true only if none of the filter values are in the cell values
17993
+ return filterItem.value.every(filterVal => !cellValues.includes(filterVal));
17994
+ };
17995
+ },
17996
+ InputComponent: GridFilterInputMultipleValue
17997
+ };
17998
+ const DOES_NOT_HAVE_ANY_OF = doesNotHaveAnyOf;
17999
+ const DOES_NOT_HAVE_ANY_OF_WITH_SELECT = _objectSpread2(_objectSpread2({}, DOES_NOT_HAVE_ANY_OF), {}, {
18000
+ InputComponent: GridFilterInputMultipleSingleSelect
18001
+ });
18002
+
17858
18003
  const getGridStringArrayOperators = () => [CONTAINS_ANY_OF, ENDS_WITH_ANY_OF, IS_ANY_OF, IS_NOT_ANY_OF, STARTS_WITH_ANY_OF];
18004
+ const getGridStringArrayOperatorsWithSelect = () => [CONTAINS_ANY_OF, ENDS_WITH_ANY_OF, IS_ANY_OF_WITH_SELECT, IS_ANY_OF_WITH_SELECT, IS_NOT_WITH_SELECT, IS_WITH_SELECT, STARTS_WITH_ANY_OF];
18005
+ const getGridStringArrayOperatorsWithSelectOnStringArrayColumns = () => [HAS_WITH_SELECT, HAS_ANY_OF_WITH_SELECT, HAS_ONLY_WITH_SELECT, DOES_NOT_HAVE_WITH_SELECT, DOES_NOT_HAVE_ANY_OF_WITH_SELECT];
17859
18006
 
17860
18007
  const getGridStringOperators = () => [...getGridStringOperators$1().filter(operator => !['isAnyOf'].includes(operator.value)), DOES_NOT_CONTAIN, DOES_NOT_EQUAL, ...getGridStringArrayOperators()];
17861
18008
 
@@ -17871,6 +18018,10 @@ const operatorList = {
17871
18018
  // Extended types
17872
18019
  rsString: getGridStringOperators(),
17873
18020
  rsNumber: getGridNumericOperators(),
18021
+ rsSingleSelect: getGridStringArrayOperatorsWithSelect(),
18022
+ rsSingleSelectWithShortOperatorList: [IS_WITH_SELECT, IS_NOT_WITH_SELECT, IS_ANY_OF_WITH_SELECT],
18023
+ rsMultipleSelect: getGridStringArrayOperatorsWithSelectOnStringArrayColumns(),
18024
+ rsMultipleSelectWithShortOperatorList: [HAS_WITH_SELECT, DOES_NOT_HAVE_WITH_SELECT, HAS_ANY_OF_WITH_SELECT],
17874
18025
  // Custom types
17875
18026
  rsStringArray: getGridStringArrayOperators()
17876
18027
  };
@@ -17887,9 +18038,37 @@ const getRsNumberColumnType = () => {
17887
18038
  filterOperators: operatorList.rsNumber
17888
18039
  };
17889
18040
  };
18041
+ const getRsSingleSelectColumnType = () => {
18042
+ return {
18043
+ type: 'singleSelect',
18044
+ filterOperators: operatorList.rsSingleSelect
18045
+ };
18046
+ };
18047
+ const getRsSingleSelectWithShortOperatorListColumnType = () => {
18048
+ return {
18049
+ type: 'singleSelect',
18050
+ filterOperators: operatorList.rsSingleSelectWithShortOperatorList
18051
+ };
18052
+ };
18053
+ const getRsMultipleSelectColumnType = () => {
18054
+ return {
18055
+ type: 'singleSelect',
18056
+ filterOperators: operatorList.rsMultipleSelect
18057
+ };
18058
+ };
18059
+ const getRsMultipleSelectWithShortOperatorListColumnType = () => {
18060
+ return {
18061
+ type: 'singleSelect',
18062
+ filterOperators: operatorList.rsMultipleSelectWithShortOperatorList
18063
+ };
18064
+ };
17890
18065
  const customColumnTypes = {
17891
18066
  rsString: getRsStringColumnType(),
17892
- rsNumber: getRsNumberColumnType()
18067
+ rsNumber: getRsNumberColumnType(),
18068
+ rsSingleSelect: getRsSingleSelectColumnType(),
18069
+ rsSingleSelectWithShortOperatorList: getRsSingleSelectWithShortOperatorListColumnType(),
18070
+ rsMultipleSelect: getRsMultipleSelectColumnType(),
18071
+ rsMultipleSelectWithShortOperatorList: getRsMultipleSelectWithShortOperatorListColumnType()
17893
18072
  };
17894
18073
 
17895
18074
  const API_URL = 'https://api.openai.com/v1/chat/completions';
@@ -18073,7 +18252,7 @@ const isOperatorValueValid = (field, operator, columns) => {
18073
18252
  }
18074
18253
  return !!operators.find(op => columnType === 'number' && Object.keys(numberOperatorEncoder).includes(op.value) ? numberOperatorEncoder[op.value] === operator : op.value === operator);
18075
18254
  };
18076
- const listOperators = ['containsAnyOf', 'endsWithAnyOf', 'isAnyOf', 'isNotAnyOf', 'startsWithAnyOf'];
18255
+ const listOperators = ['containsAnyOf', 'doesNotContainAnyOf', 'endsWithAnyOf', 'doesNotEndWithAnyOf', 'hasAnyOf', 'doesNotHaveAnyOf', 'isAnyOf', 'isNotAnyOf', 'startsWithAnyOf', 'doesNotStartWithAnyOf'];
18077
18256
 
18078
18257
  // Check if the value doesn't break
18079
18258
  const isValueValid = (value, field, columns, operator) => {
@@ -28080,5 +28259,5 @@ const TextCell = /*#__PURE__*/forwardRef((props, ref) => {
28080
28259
  TextCell.className = CLASSNAME;
28081
28260
  TextCell.displayName = COMPONENT_NAME;
28082
28261
 
28083
- export { BaseButton, BaseCheckbox, BaseIcon, BasePopper, BaseTextField, CATEGORIES, CONTAINS_ANY_OF, CONTAINS_ANY_OF_I, ControlledPagination, DEFAULT_OPERATORS, DETAIL_PANEL_TOGGLE_COL_DEF, DIMENSION_MODEL_KEY, DOES_NOT_CONTAIN, DOES_NOT_EQUAL, DataGrid, ENDS_WITH_ANY_OF, FILTER_MODEL_KEY, FILTER_SEARCH_KEY, GridToolbarFilterSemanticField, IS_ANY_OF, IS_BETWEEN, IS_NOT_ANY_OF, PAGINATION_MODEL_KEY, PINNED_COLUMNS, SORT_MODEL_KEY, STARTS_WITH_ANY_OF, ServerSideControlledPagination, StatefulDataGrid, TextCell, Toolbar$2 as Toolbar, ToolbarWrapper, VISIBILITY_MODEL_KEY, areFilterModelsEquivalent, buildStorageKey, clearPreviousVersionStorage, customColumnTypes, decodeValue, encodeValue, getColumnVisibilityFromString, getCompletion, getFilterModelFromString, getFinalSearch, getGridNumericOperators, getGridStringArrayOperators, getGridStringOperators, getModelsParsedOrUpdateLocalStorage, getPaginationFromString, getPinnedColumnsFromString, getRsNumberColumnType, getRsStringColumnType, getSearchParamsFromColumnVisibility, getSearchParamsFromFilterModel, getSearchParamsFromPagination, getSearchParamsFromPinnedColumns, getSearchParamsFromSorting, getSearchParamsFromTab, getSortingFromString, isOperatorValueValid, isValueValid, muiIconToDSIcon, numberOperatorDecoder, numberOperatorEncoder, onServerSideSelectionStatusChange, operatorList, updateUrl, urlSearchParamsToString };
28262
+ export { BaseButton, BaseCheckbox, BaseIcon, BasePopper, BaseTextField, CATEGORIES, CONTAINS_ANY_OF, CONTAINS_ANY_OF_I, ControlledPagination, DEFAULT_OPERATORS, DETAIL_PANEL_TOGGLE_COL_DEF, DIMENSION_MODEL_KEY, DOES_NOT_CONTAIN, DOES_NOT_EQUAL, DOES_NOT_HAVE, DOES_NOT_HAVE_WITH_SELECT, DataGrid, ENDS_WITH_ANY_OF, FILTER_MODEL_KEY, FILTER_SEARCH_KEY, GridToolbarFilterSemanticField, HAS, HAS_ANY_OF, HAS_ANY_OF_WITH_SELECT, HAS_ONLY, HAS_ONLY_WITH_SELECT, HAS_WITH_SELECT, IS, IS_ANY_OF, IS_ANY_OF_WITH_SELECT, IS_BETWEEN, IS_NOT, IS_NOT_ANY_OF, IS_NOT_ANY_OF_WITH_SELECT, IS_NOT_WITH_SELECT, IS_WITH_SELECT, PAGINATION_MODEL_KEY, PINNED_COLUMNS, SORT_MODEL_KEY, STARTS_WITH_ANY_OF, ServerSideControlledPagination, StatefulDataGrid, TextCell, Toolbar$2 as Toolbar, ToolbarWrapper, VISIBILITY_MODEL_KEY, areFilterModelsEquivalent, buildStorageKey, clearPreviousVersionStorage, customColumnTypes, decodeValue, encodeValue, getColumnVisibilityFromString, getCompletion, getFilterModelFromString, getFinalSearch, getGridNumericOperators, getGridStringArrayOperators, getGridStringArrayOperatorsWithSelect, getGridStringArrayOperatorsWithSelectOnStringArrayColumns, getGridStringOperators, getModelsParsedOrUpdateLocalStorage, getPaginationFromString, getPinnedColumnsFromString, getRsMultipleSelectColumnType, getRsMultipleSelectWithShortOperatorListColumnType, getRsNumberColumnType, getRsSingleSelectColumnType, getRsSingleSelectWithShortOperatorListColumnType, getRsStringColumnType, getSearchParamsFromColumnVisibility, getSearchParamsFromFilterModel, getSearchParamsFromPagination, getSearchParamsFromPinnedColumns, getSearchParamsFromSorting, getSearchParamsFromTab, getSortingFromString, isOperatorValueValid, isValueValid, muiIconToDSIcon, numberOperatorDecoder, numberOperatorEncoder, onServerSideSelectionStatusChange, operatorList, updateUrl, urlSearchParamsToString };
28084
28263
  //# sourceMappingURL=index.js.map