@redsift/table 9.2.3 → 9.2.4
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 +7 -1
- package/index.js +26 -1
- package/index.js.map +1 -1
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -25,6 +25,12 @@ declare const CONTAINS_ANY_OF: {
|
|
|
25
25
|
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
26
26
|
InputComponent: typeof GridFilterInputMultipleValue;
|
|
27
27
|
};
|
|
28
|
+
declare const CONTAINS_ANY_OF_I: {
|
|
29
|
+
label: string;
|
|
30
|
+
value: string;
|
|
31
|
+
getApplyFilterFn: (filterItem: GridFilterItem) => ((params: GridCellParams) => boolean) | null;
|
|
32
|
+
InputComponent: typeof GridFilterInputMultipleValue;
|
|
33
|
+
};
|
|
28
34
|
|
|
29
35
|
declare const ENDS_WITH_ANY_OF: {
|
|
30
36
|
label: string;
|
|
@@ -158,4 +164,4 @@ interface TextCellProps extends ComponentProps<'div'> {
|
|
|
158
164
|
*/
|
|
159
165
|
declare const TextCell: Comp<TextCellProps, HTMLDivElement>;
|
|
160
166
|
|
|
161
|
-
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 };
|
|
167
|
+
export { CONTAINS_ANY_OF, CONTAINS_ANY_OF_I, 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 };
|
package/index.js
CHANGED
|
@@ -17512,7 +17512,32 @@ const containsAnyOfOperator = {
|
|
|
17512
17512
|
},
|
|
17513
17513
|
InputComponent: GridFilterInputMultipleValue
|
|
17514
17514
|
};
|
|
17515
|
+
const containsAnyOfCIOperator = {
|
|
17516
|
+
label: 'contains any of (case insensitive)',
|
|
17517
|
+
value: 'containsAnyOf',
|
|
17518
|
+
getApplyFilterFn: filterItem => {
|
|
17519
|
+
if (!filterItem.field || !filterItem.value || !filterItem.operator) {
|
|
17520
|
+
return null;
|
|
17521
|
+
}
|
|
17522
|
+
return params => {
|
|
17523
|
+
if (filterItem.value.length === 0) {
|
|
17524
|
+
return true;
|
|
17525
|
+
}
|
|
17526
|
+
const paramValues = Array.isArray(params.value) ? params.value : [params.value];
|
|
17527
|
+
const paramValuesLower = paramValues.map(item => item.toLowerCase());
|
|
17528
|
+
let match = false;
|
|
17529
|
+
filterItem.value.forEach(filteredValue => {
|
|
17530
|
+
if (paramValuesLower.indexOf(filteredValue.toLowerCase()) !== -1) {
|
|
17531
|
+
match = true;
|
|
17532
|
+
}
|
|
17533
|
+
});
|
|
17534
|
+
return match;
|
|
17535
|
+
};
|
|
17536
|
+
},
|
|
17537
|
+
InputComponent: GridFilterInputMultipleValue
|
|
17538
|
+
};
|
|
17515
17539
|
const CONTAINS_ANY_OF = containsAnyOfOperator;
|
|
17540
|
+
const CONTAINS_ANY_OF_I = containsAnyOfCIOperator;
|
|
17516
17541
|
|
|
17517
17542
|
const endsWithAnyOfOperator = {
|
|
17518
17543
|
label: 'ends with any of',
|
|
@@ -24706,5 +24731,5 @@ const TextCell = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24706
24731
|
TextCell.className = CLASSNAME;
|
|
24707
24732
|
TextCell.displayName = COMPONENT_NAME;
|
|
24708
24733
|
|
|
24709
|
-
export { CONTAINS_ANY_OF, DETAIL_PANEL_TOGGLE_COL_DEF, DataGrid, ENDS_WITH_ANY_OF, IS_ANY_OF, IS_BETWEEN, IS_NOT_ANY_OF, STARTS_WITH_ANY_OF, TextCell, Toolbar$2 as Toolbar, getGridNumericOperators, getGridStringArrayOperators, getGridStringOperators };
|
|
24734
|
+
export { CONTAINS_ANY_OF, CONTAINS_ANY_OF_I, DETAIL_PANEL_TOGGLE_COL_DEF, DataGrid, ENDS_WITH_ANY_OF, IS_ANY_OF, IS_BETWEEN, IS_NOT_ANY_OF, STARTS_WITH_ANY_OF, TextCell, Toolbar$2 as Toolbar, getGridNumericOperators, getGridStringArrayOperators, getGridStringOperators };
|
|
24710
24735
|
//# sourceMappingURL=index.js.map
|