sea-chart 0.0.76-alpha.2 → 0.0.76-alpha.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.
@@ -480,6 +480,25 @@ const createColumnFormatter = (columnType, formatterProps) => {
480
480
  }
481
481
  return /*#__PURE__*/React.createElement(SimpleCellFormatter, formatterProps);
482
482
  };
483
+ const filterPredicateMap = {
484
+ [CellType.TEXT]: 'is',
485
+ [CellType.NUMBER]: 'equal',
486
+ [CellType.CHECKBOX]: 'is',
487
+ [CellType.DATE]: 'is',
488
+ [CellType.CTIME]: 'is',
489
+ [CellType.MTIME]: 'is',
490
+ [CellType.SINGLE_SELECT]: 'is',
491
+ [CellType.MULTIPLE_SELECT]: 'has_all_of',
492
+ [CellType.DEPARTMENT_SINGLE_SELECT]: 'is',
493
+ [CellType.COLLABORATOR]: 'has_all_of',
494
+ [CellType.CREATOR]: 'is',
495
+ [CellType.LAST_MODIFIER]: 'is',
496
+ [CellType.AUTO_NUMBER]: 'is',
497
+ [CellType.EMAIL]: 'is',
498
+ [CellType.URL]: 'is',
499
+ [CellType.STRING]: 'is',
500
+ [CellType.BOOL]: 'is'
501
+ };
483
502
  const getFilterByColumnType = (columnKey, columns, value) => {
484
503
  const filter = {
485
504
  column_key: columnKey || ''
@@ -489,7 +508,7 @@ const getFilterByColumnType = (columnKey, columns, value) => {
489
508
  filter['value'] = value;
490
509
  return filter;
491
510
  }
492
- filter['filter_predicate'] = 'is';
511
+ filter['filter_predicate'] = filterPredicateMap[column === null || column === void 0 ? void 0 : column.type];
493
512
  filter['filter_term'] = value;
494
513
  return filter;
495
514
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sea-chart",
3
- "version": "0.0.76-alpha.2",
3
+ "version": "0.0.76-alpha.4",
4
4
  "main": "./dist/index.js",
5
5
  "dependencies": {
6
6
  "@antv/data-set": "0.11.8",