dtable-ui-component 7.0.10 → 7.0.12

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.
@@ -132,11 +132,12 @@ class FilterItem extends _react.default.Component {
132
132
  this.resetState(newFilter);
133
133
  this.props.updateFilter(index, newFilter);
134
134
  };
135
- this.onSelectCollaborator = value => {
135
+ this.onSelectCollaborator = _ref => {
136
+ let collaborator = _ref.columnOption;
136
137
  const _this$props6 = this.props,
137
138
  index = _this$props6.index,
138
139
  filter = _this$props6.filter;
139
- let newFilter = (0, _utils.getUpdatedFilterByCollaborator)(filter, value);
140
+ let newFilter = (0, _utils.getUpdatedFilterByCollaborator)(filter, collaborator);
140
141
  this.resetState(newFilter);
141
142
  this.props.updateFilter(index, newFilter);
142
143
  };
@@ -414,9 +415,9 @@ class FilterItem extends _react.default.Component {
414
415
  case _dtableUtils.CellType.SINGLE_SELECT:
415
416
  {
416
417
  // get options
417
- let _ref = filterColumn.data || {},
418
- _ref$options = _ref.options,
419
- options = _ref$options === void 0 ? [] : _ref$options;
418
+ let _ref2 = filterColumn.data || {},
419
+ _ref2$options = _ref2.options,
420
+ options = _ref2$options === void 0 ? [] : _ref2$options;
420
421
  if ([_dtableUtils.FILTER_PREDICATE_TYPE.IS_ANY_OF, _dtableUtils.FILTER_PREDICATE_TYPE.IS_NONE_OF].includes(filter_predicate)) {
421
422
  return this.renderMultipleSelectOption(options, filter_term);
422
423
  }
@@ -459,9 +460,9 @@ class FilterItem extends _react.default.Component {
459
460
  }
460
461
  case _dtableUtils.CellType.MULTIPLE_SELECT:
461
462
  {
462
- let _ref2 = filterColumn.data || {},
463
- _ref2$options = _ref2.options,
464
- options = _ref2$options === void 0 ? [] : _ref2$options;
463
+ let _ref3 = filterColumn.data || {},
464
+ _ref3$options = _ref3.options,
465
+ options = _ref3$options === void 0 ? [] : _ref3$options;
465
466
  return this.renderMultipleSelectOption(options, filter_term);
466
467
  }
467
468
  case _dtableUtils.CellType.DEPARTMENT_SINGLE_SELECT:
@@ -520,8 +521,8 @@ class FilterItem extends _react.default.Component {
520
521
  }
521
522
  case _dtableUtils.CellType.RATE:
522
523
  {
523
- let _ref3 = filterColumn.data || {},
524
- rate_max_number = _ref3.rate_max_number;
524
+ let _ref4 = filterColumn.data || {},
525
+ rate_max_number = _ref4.rate_max_number;
525
526
  let rateList = [];
526
527
  for (let i = 0; i < rate_max_number; i++) {
527
528
  let rateItem = /*#__PURE__*/(0, _jsxRuntime.jsx)(_rateItem.default, {
@@ -558,16 +559,16 @@ class FilterItem extends _react.default.Component {
558
559
  }
559
560
  };
560
561
  this.renderFormulaFilterTerm = (filterPredicate, filterTerm, index, filterColumn) => {
561
- const _ref4 = filterColumn || {},
562
- data = _ref4.data;
563
- const _ref5 = data || {},
564
- result_type = _ref5.result_type;
562
+ const _ref5 = filterColumn || {},
563
+ data = _ref5.data;
564
+ const _ref6 = data || {},
565
+ result_type = _ref6.result_type;
565
566
  if (filterPredicate === _dtableUtils.FILTER_PREDICATE_TYPE.IS_CURRENT_USER_ID) {
566
567
  return null;
567
568
  }
568
569
  if (result_type === _dtableUtils.FORMULA_RESULT_TYPE.NUMBER) {
569
- const _ref6 = filterColumn.data || {},
570
- format = _ref6.format;
570
+ const _ref7 = filterColumn.data || {},
571
+ format = _ref7.format;
571
572
  if (format === _dtableUtils.CellType.DURATION) {
572
573
  return this.getInputComponent(_constants.INPUT_CMP_TYPE_MAP.DURATION, filterColumn);
573
574
  }
@@ -589,11 +590,11 @@ class FilterItem extends _react.default.Component {
589
590
  collaborators = _this$props11.collaborators,
590
591
  departments = _this$props11.departments,
591
592
  readOnly = _this$props11.readOnly;
592
- const _ref7 = filterColumn || {},
593
- data = _ref7.data;
594
- const _ref8 = data || {},
595
- array_type = _ref8.array_type,
596
- array_data = _ref8.array_data;
593
+ const _ref8 = filterColumn || {},
594
+ data = _ref8.data;
595
+ const _ref9 = data || {},
596
+ array_type = _ref9.array_type,
597
+ array_data = _ref9.array_data;
597
598
  if (!array_type) {
598
599
  return null;
599
600
  }
@@ -602,9 +603,9 @@ class FilterItem extends _react.default.Component {
602
603
  data: array_data
603
604
  };
604
605
  if (array_type === _dtableUtils.CellType.SINGLE_SELECT || array_type === _dtableUtils.CellType.MULTIPLE_SELECT) {
605
- let _ref9 = array_data || {},
606
- _ref9$options = _ref9.options,
607
- options = _ref9$options === void 0 ? [] : _ref9$options;
606
+ let _ref0 = array_data || {},
607
+ _ref0$options = _ref0.options,
608
+ options = _ref0$options === void 0 ? [] : _ref0$options;
608
609
  return this.renderMultipleSelectOption(options, filterTerm);
609
610
  }
610
611
  if (array_type === _dtableUtils.CellType.DEPARTMENT_SINGLE_SELECT) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "7.0.10",
3
+ "version": "7.0.12",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "5.0.9",