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 =
|
|
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,
|
|
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
|
|
418
|
-
|
|
419
|
-
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
|
|
463
|
-
|
|
464
|
-
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
|
|
524
|
-
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
|
|
562
|
-
data =
|
|
563
|
-
const
|
|
564
|
-
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
|
|
570
|
-
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
|
|
593
|
-
data =
|
|
594
|
-
const
|
|
595
|
-
array_type =
|
|
596
|
-
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
|
|
606
|
-
|
|
607
|
-
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) {
|