dtable-ui-component 6.0.125 → 6.0.126
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/lib/ActionSheet/index.js +14 -16
- package/lib/ActivityIndicator/index.js +7 -8
- package/lib/AsyncUserSelect/index.css +5 -0
- package/lib/AsyncUserSelect/index.js +40 -19
- package/lib/AsyncUserSelect/user-item.js +5 -6
- package/lib/AutoNumberFormatter/index.js +3 -4
- package/lib/Badge/index.js +9 -11
- package/lib/ButtonFormatter/index.js +6 -8
- package/lib/CTimeFormatter/index.js +3 -4
- package/lib/CheckboxEditor/index.js +1 -3
- package/lib/CheckboxEditor/mb-editor.js +9 -20
- package/lib/CheckboxEditor/pc-editor.js +12 -24
- package/lib/CheckboxFormatter/index.js +4 -5
- package/lib/CollaboratorEditor/index.js +2 -4
- package/lib/CollaboratorEditor/mb-editor/index.js +11 -19
- package/lib/CollaboratorEditor/pc-editor/index.js +25 -34
- package/lib/CollaboratorFormatter/index.js +8 -10
- package/lib/CollaboratorItem/index.js +4 -5
- package/lib/CollapsibleSettingLayout/index.js +9 -7
- package/lib/Comment/body/comment.js +10 -18
- package/lib/Comment/body/index.js +2 -4
- package/lib/Comment/footer/btns/index.js +4 -7
- package/lib/Comment/footer/index.js +9 -20
- package/lib/Comment/footer/input/index.js +29 -50
- package/lib/Comment/footer/input/participant/index.js +4 -5
- package/lib/Comment/footer/participants/index.js +4 -5
- package/lib/Comment/footer/participants/participant/index.js +1 -3
- package/lib/Comment/footer/participants/participant-select/index.js +8 -24
- package/lib/Comment/index.js +39 -57
- package/lib/Comment/utils/utilities.js +15 -21
- package/lib/CreatorFormatter/index.js +6 -8
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +23 -19
- package/lib/DTableColorPicker/index.css +0 -2
- package/lib/DTableColorPicker/index.js +56 -41
- package/lib/DTableColorPicker/utils.js +4 -6
- package/lib/DTableColumnIcon/index.js +6 -7
- package/lib/DTableCommonAddTool/index.css +1 -3
- package/lib/DTableCommonAddTool/index.js +6 -8
- package/lib/DTableCustomFooter/index.css +1 -3
- package/lib/DTableCustomFooter/index.js +1 -3
- package/lib/DTableCustomizeCollaboratorSelect/index.js +17 -20
- package/lib/DTableCustomizeSelect/index.js +19 -24
- package/lib/DTableDropdownItem/index.js +16 -18
- package/lib/DTableDropdownMenu/index.js +8 -10
- package/lib/DTableEmptyTip/index.js +4 -5
- package/lib/DTableFiltersPopover/index.css +0 -2
- package/lib/DTableFiltersPopover/index.js +26 -41
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +1 -3
- package/lib/DTableFiltersPopover/utils/index.js +63 -113
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +8 -9
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +16 -13
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +18 -15
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +8 -14
- package/lib/DTableFiltersPopover/widgets/filter-group.js +34 -55
- package/lib/DTableFiltersPopover/widgets/filter-item.js +107 -170
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +136 -161
- package/lib/DTableFiltersPopover/widgets/rate-item.js +15 -20
- package/lib/DTableGroupSelect/index.js +11 -15
- package/lib/DTableGroupSelect/select-option-group.js +23 -32
- package/lib/DTableIcon/index.js +6 -7
- package/lib/DTableIcon/svg-icon.js +5 -7
- package/lib/DTableModalHeader/index.js +1 -3
- package/lib/DTablePopover/index.js +13 -16
- package/lib/DTableRadio/index.js +10 -9
- package/lib/DTableRadioGroup/index.js +8 -17
- package/lib/DTableSearchInput/index.js +19 -29
- package/lib/DTableSelect/dtable-select-label.js +6 -5
- package/lib/DTableSelect/index.js +21 -22
- package/lib/DTableSelect/utils.js +7 -15
- package/lib/DTableSubDropdownMenu/index.js +8 -10
- package/lib/DTableSubDropdownToggle/index.js +12 -12
- package/lib/DTableSwitch/index.css +0 -1
- package/lib/DTableSwitch/index.js +12 -11
- package/lib/DTableToolTip/index.js +7 -8
- package/lib/DateEditor/index.js +20 -15
- package/lib/DateEditor/mb-editor/index.js +18 -31
- package/lib/DateEditor/pc-editor.js +26 -45
- package/lib/DateFormatter/index.js +4 -5
- package/lib/DatePicker/index.js +9 -15
- package/lib/DatePicker/utils.js +1 -3
- package/lib/DeleteTip/index.js +5 -6
- package/lib/DepartmentMultipleSelectEditor/index.js +25 -23
- package/lib/DepartmentSelectFilter/index.js +6 -8
- package/lib/DepartmentSingleSelectEditor/index.js +1 -3
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +48 -47
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +36 -58
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +13 -19
- package/lib/DepartmentSingleSelectFormatter/index.js +4 -6
- package/lib/DigitalSignEditor/index.js +1 -3
- package/lib/DigitalSignEditor/mb-editor/index.js +12 -20
- package/lib/DigitalSignEditor/pc-editor/index.js +17 -24
- package/lib/DigitalSignEditor/service.js +2 -4
- package/lib/DigitalSignEditor/signature-board/index.js +5 -8
- package/lib/DigitalSignEditor/utils.js +2 -4
- package/lib/DigitalSignFormatter/index.js +12 -15
- package/lib/DigitalSignFormatter/utils.js +4 -5
- package/lib/DurationEditor/index.js +21 -31
- package/lib/DurationFormatter/index.js +4 -5
- package/lib/EditEditorButton/index.js +1 -3
- package/lib/EmailFormatter/index.js +3 -4
- package/lib/FieldDisplaySetting/field-item.js +12 -12
- package/lib/FieldDisplaySetting/index.js +11 -9
- package/lib/FileEditor/files-previewer/index.js +1 -3
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +10 -18
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +7 -8
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +3 -4
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +5 -6
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +14 -21
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +29 -57
- package/lib/FileEditor/index.js +1 -3
- package/lib/FileEditor/mb-editor/index.js +28 -20
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -3
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +11 -25
- package/lib/FileEditor/pc-editor/index.js +19 -27
- package/lib/FileFormatter/index.js +26 -19
- package/lib/FileItemFormatter/index.js +6 -9
- package/lib/FileUploader/index.js +28 -45
- package/lib/FormulaFormatter/index.js +15 -29
- package/lib/GeolocationEditor/index.js +11 -12
- package/lib/GeolocationEditor/map-editor-utils.js +17 -15
- package/lib/GeolocationEditor/mb-editor/country-editor.js +17 -14
- package/lib/GeolocationEditor/mb-editor/index.js +4 -6
- package/lib/GeolocationEditor/mb-editor/location-editor.js +18 -15
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +41 -68
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +50 -89
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +17 -14
- package/lib/GeolocationEditor/mb-editor/province-editor.js +17 -14
- package/lib/GeolocationEditor/pc-editor/country-editor.js +10 -23
- package/lib/GeolocationEditor/pc-editor/index.js +12 -20
- package/lib/GeolocationEditor/pc-editor/location-editor.js +26 -31
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +34 -54
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +36 -60
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +35 -62
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +36 -65
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +19 -25
- package/lib/GeolocationEditor/pc-editor/province-editor.js +6 -13
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +5 -6
- package/lib/GeolocationEditor/pc-editor/selector-list.js +6 -7
- package/lib/GeolocationFormatter/index.js +4 -5
- package/lib/HtmlLongTextFormatter/index.js +4 -12
- package/lib/Icon/index.js +3 -5
- package/lib/IconButton/index.js +4 -6
- package/lib/ImageEditor/images-previewer/image-preview/index.js +12 -21
- package/lib/ImageEditor/images-previewer/index.js +3 -9
- package/lib/ImageEditor/index.js +1 -3
- package/lib/ImageEditor/mb-editor/index.js +28 -20
- package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +2 -6
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +1 -3
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +7 -21
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +3 -9
- package/lib/ImageEditor/pc-editor/index.js +11 -16
- package/lib/ImageFormatter/images-lazy-load.js +19 -11
- package/lib/ImageFormatter/index.js +11 -13
- package/lib/ImagePreviewerLightbox/index.js +15 -13
- package/lib/ImageThumbnail/index.js +10 -13
- package/lib/InputItem/custom-input.js +26 -46
- package/lib/InputItem/custom-keyboard.js +15 -18
- package/lib/InputItem/index.js +34 -50
- package/lib/InputItem/input.js +2 -4
- package/lib/LastModifierFormatter/index.js +6 -8
- package/lib/LinkEditor/index.js +33 -53
- package/lib/LinkEditor/link-editor-option.js +3 -4
- package/lib/LinkEditor/mb-popover/index.js +9 -22
- package/lib/LinkEditor/pc-popover/index.js +5 -10
- package/lib/LinkFormatter/index.js +21 -37
- package/lib/List/index.js +6 -8
- package/lib/List/list-item.js +22 -28
- package/lib/LongTextFormatter/index.js +4 -5
- package/lib/MBEditorHeader/index.js +7 -8
- package/lib/MTimeFormatter/index.js +3 -4
- package/lib/MobileFullScreenPage/body/index.js +3 -5
- package/lib/MobileFullScreenPage/header/index.js +4 -6
- package/lib/MobileFullScreenPage/index.js +13 -11
- package/lib/MobileModal/index.js +1 -3
- package/lib/MobileOperationSheet/index.js +7 -8
- package/lib/MobileSelector/empty/index.js +1 -3
- package/lib/MobileSelector/index.js +5 -7
- package/lib/MobileSelector/option/index.js +3 -5
- package/lib/MobileSelector/options/index.js +1 -3
- package/lib/MobileSelector/search/index.js +3 -5
- package/lib/MobileUpload/index.js +4 -5
- package/lib/Modal/modal.js +14 -15
- package/lib/Modal/prompt.js +4 -4
- package/lib/MultipleSelectEditor/index.js +1 -3
- package/lib/MultipleSelectFormatter/index.js +6 -8
- package/lib/NotificationPopover/index.css +1 -6
- package/lib/NotificationPopover/index.js +6 -7
- package/lib/NumberEditor/index.js +12 -21
- package/lib/NumberFormatter/index.js +4 -5
- package/lib/PhoneNumberLink/index.js +2 -4
- package/lib/Picker/AbstractPicker.js +23 -27
- package/lib/Popover/index.js +3 -4
- package/lib/Popover/item.js +7 -9
- package/lib/Progress/index.js +9 -8
- package/lib/Radio/Radio.js +4 -8
- package/lib/Radio/RadioItem.js +8 -12
- package/lib/RateFormatter/index.js +13 -13
- package/lib/RoleStatusEditor/index.js +18 -17
- package/lib/RowExpandDialog/body/index.js +32 -49
- package/lib/RowExpandDialog/column-content/index.js +5 -9
- package/lib/RowExpandDialog/header/index.js +6 -8
- package/lib/RowExpandDialog/index.js +49 -34
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +4 -5
- package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +8 -10
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +22 -33
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +26 -40
- package/lib/RowExpandEditor/date-editor/mb-editor.js +12 -18
- package/lib/RowExpandEditor/date-editor/pc-editor.js +15 -20
- package/lib/RowExpandEditor/department-editor/mb-editor.js +16 -11
- package/lib/RowExpandEditor/department-editor/pc-editor.js +19 -14
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +20 -34
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +21 -35
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +10 -17
- package/lib/RowExpandEditor/duration-editor/pc-editor.js +13 -19
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +9 -19
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +13 -24
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +18 -31
- package/lib/RowExpandEditor/file-editor/pc-editor/index.js +16 -23
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +17 -29
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +13 -26
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +15 -25
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +13 -23
- package/lib/RowExpandEditor/index.js +4 -8
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +17 -18
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +10 -16
- package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +16 -23
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +11 -19
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +22 -33
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +8 -14
- package/lib/RowExpandEditor/number-editor/pc-editor.js +13 -20
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +12 -25
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +20 -36
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +17 -28
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +22 -34
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +4 -5
- package/lib/RowExpandEditor/text-editor/pc-editor/index.js +15 -26
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +5 -13
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +9 -18
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +2 -4
- package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +2 -4
- package/lib/RowExpandFormatter/email-formatter/index.js +4 -7
- package/lib/RowExpandFormatter/file-formatter/index.js +8 -9
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +10 -12
- package/lib/RowExpandFormatter/formula-formatter/index.js +19 -34
- package/lib/RowExpandFormatter/image-formatter/index.js +9 -11
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +7 -8
- package/lib/RowExpandFormatter/index.js +27 -41
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +8 -14
- package/lib/RowExpandFormatter/link-formatter/index.js +11 -19
- package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +3 -5
- package/lib/RowExpandFormatter/rate-formatter/index.js +11 -12
- package/lib/RowExpandFormatter/text/index.js +4 -5
- package/lib/RowExpandFormatter/url-formatter/index.js +4 -7
- package/lib/RowExpandView/body/index.js +22 -35
- package/lib/RowExpandView/column-content/index.js +3 -7
- package/lib/RowExpandView/index.js +42 -30
- package/lib/SelectItem/index.js +5 -7
- package/lib/SelectOptionGroup/index.css +3 -3
- package/lib/SelectOptionGroup/index.js +31 -40
- package/lib/SelectedDepartments/index.js +7 -9
- package/lib/SimpleLongTextFormatter/index.js +10 -16
- package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +3 -4
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +12 -21
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +3 -4
- package/lib/SingleSelectEditor/index.js +1 -3
- package/lib/SingleSelectFormatter/index.js +8 -9
- package/lib/TabBar/Tab.js +14 -16
- package/lib/TabBar/index.js +18 -21
- package/lib/Tabs/index.js +1 -3
- package/lib/TextEditor/index.js +14 -23
- package/lib/TextFormatter/index.js +3 -4
- package/lib/TextareaItem/index.js +19 -26
- package/lib/Toast/index.js +3 -4
- package/lib/UrlFormatter/index.js +3 -4
- package/lib/common/editor-base.js +7 -12
- package/lib/hooks/common-hooks.js +2 -4
- package/lib/select-editor/index.js +1 -3
- package/lib/select-editor/mb-editor/index.js +17 -28
- package/lib/select-editor/pc-editor/index.js +27 -42
- package/lib/toaster/alert.js +6 -7
- package/lib/toaster/toast.js +2 -3
- package/lib/toaster/toastManager.js +2 -4
- package/lib/utils/cell.js +8 -11
- package/lib/utils/column-utils.js +8 -14
- package/lib/utils/departments.js +1 -3
- package/lib/utils/url.js +24 -31
- package/lib/utils/utils.js +2 -6
- package/package.json +8 -8
|
@@ -21,12 +21,8 @@ class FilterGroup extends _react.Component {
|
|
|
21
21
|
constructor() {
|
|
22
22
|
super(...arguments);
|
|
23
23
|
this.onSelectGroupConjunction = conjunctionOption => {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
} = this.props;
|
|
27
|
-
const {
|
|
28
|
-
filterConjunction: newConjunction
|
|
29
|
-
} = conjunctionOption;
|
|
24
|
+
const filterConjunction = this.props.filterConjunction;
|
|
25
|
+
const newConjunction = conjunctionOption.filterConjunction;
|
|
30
26
|
if (newConjunction === filterConjunction) {
|
|
31
27
|
return;
|
|
32
28
|
}
|
|
@@ -34,22 +30,17 @@ class FilterGroup extends _react.Component {
|
|
|
34
30
|
};
|
|
35
31
|
this.deleteFilterGroup = event => {
|
|
36
32
|
event.nativeEvent.stopImmediatePropagation();
|
|
37
|
-
const
|
|
38
|
-
index
|
|
39
|
-
} = this.props;
|
|
33
|
+
const index = this.props.index;
|
|
40
34
|
this.props.deleteFilterGroup(index);
|
|
41
35
|
};
|
|
42
36
|
this.modifyConjunctionInGroup = new_filter_conjunction => {
|
|
43
|
-
const
|
|
44
|
-
index
|
|
45
|
-
} = this.props;
|
|
37
|
+
const index = this.props.index;
|
|
46
38
|
this.props.modifyConjunctionInGroup(index, new_filter_conjunction);
|
|
47
39
|
};
|
|
48
40
|
this.addFilterIntoGroup = () => {
|
|
49
|
-
const
|
|
50
|
-
columns,
|
|
51
|
-
index
|
|
52
|
-
} = this.props;
|
|
41
|
+
const _this$props = this.props,
|
|
42
|
+
columns = _this$props.columns,
|
|
43
|
+
index = _this$props.index;
|
|
53
44
|
const newFilter = (0, _utils.getDefaultFilter)(columns);
|
|
54
45
|
if (!newFilter) {
|
|
55
46
|
return;
|
|
@@ -57,23 +48,18 @@ class FilterGroup extends _react.Component {
|
|
|
57
48
|
this.props.addFilterIntoGroup(index, newFilter);
|
|
58
49
|
};
|
|
59
50
|
this.deleteFilterInGroup = filter_index => {
|
|
60
|
-
const
|
|
61
|
-
index
|
|
62
|
-
} = this.props;
|
|
51
|
+
const index = this.props.index;
|
|
63
52
|
this.props.deleteFilterInGroup(index, filter_index);
|
|
64
53
|
};
|
|
65
54
|
this.updateFilterInGroup = (filter_index, new_filter) => {
|
|
66
|
-
const
|
|
67
|
-
index
|
|
68
|
-
} = this.props;
|
|
55
|
+
const index = this.props.index;
|
|
69
56
|
this.props.updateFilterInGroup(index, filter_index, new_filter);
|
|
70
57
|
};
|
|
71
58
|
this.renderConjunction = () => {
|
|
72
|
-
const
|
|
73
|
-
index,
|
|
74
|
-
filterConjunction,
|
|
75
|
-
conjunctionOptions
|
|
76
|
-
} = this.props;
|
|
59
|
+
const _this$props2 = this.props,
|
|
60
|
+
index = _this$props2.index,
|
|
61
|
+
filterConjunction = _this$props2.filterConjunction,
|
|
62
|
+
conjunctionOptions = _this$props2.conjunctionOptions;
|
|
77
63
|
switch (index) {
|
|
78
64
|
case 0:
|
|
79
65
|
{
|
|
@@ -98,35 +84,29 @@ class FilterGroup extends _react.Component {
|
|
|
98
84
|
}
|
|
99
85
|
};
|
|
100
86
|
this.renderGroupFilters = () => {
|
|
101
|
-
const
|
|
102
|
-
columns,
|
|
103
|
-
conjunctionOptions,
|
|
104
|
-
columnOptions,
|
|
105
|
-
filter,
|
|
106
|
-
index
|
|
107
|
-
collaborators,
|
|
108
|
-
lang,
|
|
109
|
-
userDepartmentIdsMap,
|
|
110
|
-
departments,
|
|
111
|
-
firstDayOfWeek,
|
|
112
|
-
readOnly
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
filters: subFilters,
|
|
116
|
-
filter_conjunction
|
|
117
|
-
} = filter;
|
|
87
|
+
const _this$props3 = this.props,
|
|
88
|
+
columns = _this$props3.columns,
|
|
89
|
+
conjunctionOptions = _this$props3.conjunctionOptions,
|
|
90
|
+
columnOptions = _this$props3.columnOptions,
|
|
91
|
+
filter = _this$props3.filter,
|
|
92
|
+
groupIndex = _this$props3.index,
|
|
93
|
+
collaborators = _this$props3.collaborators,
|
|
94
|
+
lang = _this$props3.lang,
|
|
95
|
+
userDepartmentIdsMap = _this$props3.userDepartmentIdsMap,
|
|
96
|
+
departments = _this$props3.departments,
|
|
97
|
+
firstDayOfWeek = _this$props3.firstDayOfWeek,
|
|
98
|
+
readOnly = _this$props3.readOnly;
|
|
99
|
+
const subFilters = filter.filters,
|
|
100
|
+
filter_conjunction = filter.filter_conjunction;
|
|
118
101
|
const subFilterConjunction = _constants.SUPPORT_CONJUNCTIONS.includes(filter_conjunction) ? filter_conjunction : _dtableUtils.FILTER_CONJUNCTION_TYPE.AND;
|
|
119
102
|
const subFiltersLength = Array.isArray(subFilters) ? subFilters.length : 0;
|
|
120
103
|
if (subFiltersLength === 0) {
|
|
121
104
|
return null;
|
|
122
105
|
}
|
|
123
106
|
return subFilters.map((currentFilter, subFilterIndex) => {
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
const {
|
|
128
|
-
error_message
|
|
129
|
-
} = _dtableUtils.ValidateFilter.validate(currentFilter, columns);
|
|
107
|
+
const sub_filter_column_key = currentFilter.column_key;
|
|
108
|
+
const _ValidateFilter$valid = _dtableUtils.ValidateFilter.validate(currentFilter, columns),
|
|
109
|
+
error_message = _ValidateFilter$valid.error_message;
|
|
130
110
|
const filterColumn = columns.find(column => column.key === sub_filter_column_key) || {};
|
|
131
111
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_filterItem.default, {
|
|
132
112
|
isInModal: this.props.isInModal,
|
|
@@ -151,11 +131,10 @@ class FilterGroup extends _react.Component {
|
|
|
151
131
|
};
|
|
152
132
|
}
|
|
153
133
|
render() {
|
|
154
|
-
const
|
|
155
|
-
level,
|
|
156
|
-
index,
|
|
157
|
-
readOnly
|
|
158
|
-
} = this.props;
|
|
134
|
+
const _this$props4 = this.props,
|
|
135
|
+
level = _this$props4.level,
|
|
136
|
+
index = _this$props4.index,
|
|
137
|
+
readOnly = _this$props4.readOnly;
|
|
159
138
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
160
139
|
className: (0, _classnames.default)('filter-item', 'filter-group', "level-".concat(level)),
|
|
161
140
|
children: [!readOnly && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -32,21 +32,16 @@ class FilterItem extends _react.default.Component {
|
|
|
32
32
|
super(_props);
|
|
33
33
|
_this = this;
|
|
34
34
|
this.initSelectOptions = props => {
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
filterPredicateList,
|
|
41
|
-
filterTermModifierList
|
|
42
|
-
} = (0, _utils.getColumnOptions)(filterColumn);
|
|
35
|
+
const filter = props.filter,
|
|
36
|
+
filterColumn = props.filterColumn;
|
|
37
|
+
let _getColumnOptions = (0, _utils.getColumnOptions)(filterColumn),
|
|
38
|
+
filterPredicateList = _getColumnOptions.filterPredicateList,
|
|
39
|
+
filterTermModifierList = _getColumnOptions.filterTermModifierList;
|
|
43
40
|
// The value of the calculation formula column does not exist in the shared view
|
|
44
41
|
this.filterPredicateOptions = filterPredicateList ? filterPredicateList.map(predicate => {
|
|
45
42
|
return _filterItemUtils.default.generatorPredicateOption(predicate);
|
|
46
43
|
}).filter(item => item) : [];
|
|
47
|
-
const
|
|
48
|
-
filter_predicate
|
|
49
|
-
} = filter;
|
|
44
|
+
const filter_predicate = filter.filter_predicate;
|
|
50
45
|
if ((0, _dtableUtils.isDateColumn)(filterColumn)) {
|
|
51
46
|
if (filter_predicate === _dtableUtils.FILTER_PREDICATE_TYPE.IS_WITHIN) {
|
|
52
47
|
filterTermModifierList = _dtableUtils.filterTermModifierIsWithin;
|
|
@@ -58,9 +53,7 @@ class FilterItem extends _react.default.Component {
|
|
|
58
53
|
};
|
|
59
54
|
this.onDeleteFilter = event => {
|
|
60
55
|
event.nativeEvent.stopImmediatePropagation();
|
|
61
|
-
const
|
|
62
|
-
index
|
|
63
|
-
} = this.props;
|
|
56
|
+
const index = this.props.index;
|
|
64
57
|
this.props.deleteFilter(index);
|
|
65
58
|
};
|
|
66
59
|
this.resetState = filter => {
|
|
@@ -69,22 +62,17 @@ class FilterItem extends _react.default.Component {
|
|
|
69
62
|
});
|
|
70
63
|
};
|
|
71
64
|
this.onSelectConjunction = value => {
|
|
72
|
-
const
|
|
73
|
-
filterConjunction
|
|
74
|
-
} = this.props;
|
|
65
|
+
const filterConjunction = this.props.filterConjunction;
|
|
75
66
|
if (filterConjunction === value.filterConjunction) {
|
|
76
67
|
return;
|
|
77
68
|
}
|
|
78
69
|
this.props.updateConjunction(value.filterConjunction);
|
|
79
70
|
};
|
|
80
71
|
this.onSelectColumn = value => {
|
|
81
|
-
const
|
|
82
|
-
index,
|
|
83
|
-
filter
|
|
84
|
-
|
|
85
|
-
const {
|
|
86
|
-
column
|
|
87
|
-
} = value;
|
|
72
|
+
const _this$props = this.props,
|
|
73
|
+
index = _this$props.index,
|
|
74
|
+
filter = _this$props.filter;
|
|
75
|
+
const column = value.column;
|
|
88
76
|
if (column.key === filter.column_key) return;
|
|
89
77
|
let newFilter = (0, _utils.getFilterByColumn)(column, filter);
|
|
90
78
|
if (!newFilter) return;
|
|
@@ -92,14 +80,11 @@ class FilterItem extends _react.default.Component {
|
|
|
92
80
|
this.props.updateFilter(index, newFilter);
|
|
93
81
|
};
|
|
94
82
|
this.onSelectPredicate = value => {
|
|
95
|
-
const
|
|
96
|
-
index,
|
|
97
|
-
filter,
|
|
98
|
-
filterColumn
|
|
99
|
-
|
|
100
|
-
const {
|
|
101
|
-
filterPredicate
|
|
102
|
-
} = value;
|
|
83
|
+
const _this$props2 = this.props,
|
|
84
|
+
index = _this$props2.index,
|
|
85
|
+
filter = _this$props2.filter,
|
|
86
|
+
filterColumn = _this$props2.filterColumn;
|
|
87
|
+
const filterPredicate = value.filterPredicate;
|
|
103
88
|
if (filter.filter_predicate === filterPredicate) {
|
|
104
89
|
return;
|
|
105
90
|
}
|
|
@@ -108,13 +93,10 @@ class FilterItem extends _react.default.Component {
|
|
|
108
93
|
this.props.updateFilter(index, newFilter);
|
|
109
94
|
};
|
|
110
95
|
this.onSelectTermModifier = value => {
|
|
111
|
-
const
|
|
112
|
-
index,
|
|
113
|
-
filter
|
|
114
|
-
|
|
115
|
-
const {
|
|
116
|
-
filterTermModifier
|
|
117
|
-
} = value;
|
|
96
|
+
const _this$props3 = this.props,
|
|
97
|
+
index = _this$props3.index,
|
|
98
|
+
filter = _this$props3.filter;
|
|
99
|
+
const filterTermModifier = value.filterTermModifier;
|
|
118
100
|
const inputRangeLabel = [_dtableUtils.FILTER_TERM_MODIFIER_TYPE.EXACT_DATE, _dtableUtils.FILTER_TERM_MODIFIER_TYPE.NUMBER_OF_DAYS_AGO, _dtableUtils.FILTER_TERM_MODIFIER_TYPE.NUMBER_OF_DAYS_FROM_NOW, _dtableUtils.FILTER_TERM_MODIFIER_TYPE.THE_NEXT_NUMBERS_OF_DAYS, _dtableUtils.FILTER_TERM_MODIFIER_TYPE.THE_PAST_NUMBERS_OF_DAYS];
|
|
119
101
|
if (filter.filter_term_modifier === filterTermModifier) {
|
|
120
102
|
return;
|
|
@@ -131,13 +113,10 @@ class FilterItem extends _react.default.Component {
|
|
|
131
113
|
this.props.updateFilter(index, newFilter);
|
|
132
114
|
};
|
|
133
115
|
this.onSelectSingle = value => {
|
|
134
|
-
const
|
|
135
|
-
index,
|
|
136
|
-
filter
|
|
137
|
-
|
|
138
|
-
const {
|
|
139
|
-
columnOption: option
|
|
140
|
-
} = value;
|
|
116
|
+
const _this$props4 = this.props,
|
|
117
|
+
index = _this$props4.index,
|
|
118
|
+
filter = _this$props4.filter;
|
|
119
|
+
const option = value.columnOption;
|
|
141
120
|
if (filter.filter_term === option.id) {
|
|
142
121
|
return;
|
|
143
122
|
}
|
|
@@ -146,37 +125,28 @@ class FilterItem extends _react.default.Component {
|
|
|
146
125
|
this.props.updateFilter(index, newFilter);
|
|
147
126
|
};
|
|
148
127
|
this.onSelectMultiple = value => {
|
|
149
|
-
const
|
|
150
|
-
index,
|
|
151
|
-
filter
|
|
152
|
-
|
|
153
|
-
const {
|
|
154
|
-
columnOption: option
|
|
155
|
-
} = value;
|
|
128
|
+
const _this$props5 = this.props,
|
|
129
|
+
index = _this$props5.index,
|
|
130
|
+
filter = _this$props5.filter;
|
|
131
|
+
const option = value.columnOption;
|
|
156
132
|
let newFilter = (0, _utils.getUpdatedFilterBySelectMultiple)(filter, option);
|
|
157
133
|
this.resetState(newFilter);
|
|
158
134
|
this.props.updateFilter(index, newFilter);
|
|
159
135
|
};
|
|
160
136
|
this.onSelectCollaborator = value => {
|
|
161
|
-
const
|
|
162
|
-
index,
|
|
163
|
-
filter
|
|
164
|
-
|
|
165
|
-
const {
|
|
166
|
-
columnOption: collaborator
|
|
167
|
-
} = value;
|
|
137
|
+
const _this$props6 = this.props,
|
|
138
|
+
index = _this$props6.index,
|
|
139
|
+
filter = _this$props6.filter;
|
|
140
|
+
const collaborator = value.columnOption;
|
|
168
141
|
let newFilter = (0, _utils.getUpdatedFilterByCollaborator)(filter, collaborator);
|
|
169
142
|
this.resetState(newFilter);
|
|
170
143
|
this.props.updateFilter(index, newFilter);
|
|
171
144
|
};
|
|
172
145
|
this.onSelectCreator = value => {
|
|
173
|
-
const
|
|
174
|
-
index,
|
|
175
|
-
filter
|
|
176
|
-
|
|
177
|
-
const {
|
|
178
|
-
columnOption: collaborator
|
|
179
|
-
} = value;
|
|
146
|
+
const _this$props7 = this.props,
|
|
147
|
+
index = _this$props7.index,
|
|
148
|
+
filter = _this$props7.filter;
|
|
149
|
+
const collaborator = value.columnOption;
|
|
180
150
|
let newFilter = (0, _utils.getUpdatedFilterByCreator)(filter, collaborator);
|
|
181
151
|
// the predicate is 'is' or 'is not'
|
|
182
152
|
if (!newFilter) {
|
|
@@ -203,13 +173,10 @@ class FilterItem extends _react.default.Component {
|
|
|
203
173
|
this.onFilterTermChanged(value);
|
|
204
174
|
};
|
|
205
175
|
this.onFilterTermChanged = newFilterTerm => {
|
|
206
|
-
const
|
|
207
|
-
index,
|
|
208
|
-
filter
|
|
209
|
-
|
|
210
|
-
const {
|
|
211
|
-
filterTerm
|
|
212
|
-
} = this.state;
|
|
176
|
+
const _this$props8 = this.props,
|
|
177
|
+
index = _this$props8.index,
|
|
178
|
+
filter = _this$props8.filter;
|
|
179
|
+
const filterTerm = this.state.filterTerm;
|
|
213
180
|
if (newFilterTerm !== filterTerm) {
|
|
214
181
|
this.setState({
|
|
215
182
|
filterTerm: newFilterTerm
|
|
@@ -234,14 +201,11 @@ class FilterItem extends _react.default.Component {
|
|
|
234
201
|
this.onFilterTermChanged(index);
|
|
235
202
|
};
|
|
236
203
|
this.getInputComponent = type => {
|
|
237
|
-
const
|
|
238
|
-
filterColumn,
|
|
239
|
-
readOnly,
|
|
240
|
-
isInModal
|
|
241
|
-
|
|
242
|
-
const {
|
|
243
|
-
filterTerm
|
|
244
|
-
} = this.state;
|
|
204
|
+
const _this$props9 = this.props,
|
|
205
|
+
filterColumn = _this$props9.filterColumn,
|
|
206
|
+
readOnly = _this$props9.readOnly,
|
|
207
|
+
isInModal = _this$props9.isInModal;
|
|
208
|
+
const filterTerm = this.state.filterTerm;
|
|
245
209
|
if (type === _constants.INPUT_CMP_TYPE_MAP.TEXT) {
|
|
246
210
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableSearchInput.default, {
|
|
247
211
|
value: filterTerm,
|
|
@@ -284,13 +248,12 @@ class FilterItem extends _react.default.Component {
|
|
|
284
248
|
}
|
|
285
249
|
};
|
|
286
250
|
this.renderConjunction = () => {
|
|
287
|
-
const
|
|
288
|
-
index,
|
|
289
|
-
filterConjunction,
|
|
290
|
-
conjunctionOptions,
|
|
291
|
-
readOnly,
|
|
292
|
-
isInModal
|
|
293
|
-
} = this.props;
|
|
251
|
+
const _this$props0 = this.props,
|
|
252
|
+
index = _this$props0.index,
|
|
253
|
+
filterConjunction = _this$props0.filterConjunction,
|
|
254
|
+
conjunctionOptions = _this$props0.conjunctionOptions,
|
|
255
|
+
readOnly = _this$props0.readOnly,
|
|
256
|
+
isInModal = _this$props0.isInModal;
|
|
294
257
|
switch (index) {
|
|
295
258
|
case 0:
|
|
296
259
|
{
|
|
@@ -319,13 +282,10 @@ class FilterItem extends _react.default.Component {
|
|
|
319
282
|
this.renderMultipleSelectOption = function () {
|
|
320
283
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
321
284
|
let filterTerm = arguments.length > 1 ? arguments[1] : undefined;
|
|
322
|
-
const
|
|
323
|
-
filter,
|
|
324
|
-
readOnly
|
|
325
|
-
|
|
326
|
-
const {
|
|
327
|
-
filter_predicate
|
|
328
|
-
} = filter;
|
|
285
|
+
const _this$props1 = _this.props,
|
|
286
|
+
filter = _this$props1.filter,
|
|
287
|
+
readOnly = _this$props1.readOnly;
|
|
288
|
+
const filter_predicate = filter.filter_predicate;
|
|
329
289
|
let isSupportMultipleSelect = false;
|
|
330
290
|
// The first two options are used for single selection, and the last four options are used for multiple selection
|
|
331
291
|
const supportMultipleSelectOptions = [_dtableUtils.FILTER_PREDICATE_TYPE.IS_ANY_OF, _dtableUtils.FILTER_PREDICATE_TYPE.IS_NONE_OF, _dtableUtils.FILTER_PREDICATE_TYPE.HAS_ANY_OF, _dtableUtils.FILTER_PREDICATE_TYPE.HAS_ALL_OF, _dtableUtils.FILTER_PREDICATE_TYPE.HAS_NONE_OF, _dtableUtils.FILTER_PREDICATE_TYPE.IS_EXACTLY];
|
|
@@ -381,24 +341,19 @@ class FilterItem extends _react.default.Component {
|
|
|
381
341
|
});
|
|
382
342
|
};
|
|
383
343
|
this.renderFilterTerm = filterColumn => {
|
|
384
|
-
const
|
|
385
|
-
index,
|
|
386
|
-
filter,
|
|
387
|
-
collaborators,
|
|
388
|
-
userDepartmentIdsMap,
|
|
389
|
-
departments,
|
|
390
|
-
lang,
|
|
391
|
-
firstDayOfWeek,
|
|
392
|
-
readOnly
|
|
393
|
-
|
|
394
|
-
const
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
const {
|
|
398
|
-
filter_term,
|
|
399
|
-
filter_predicate,
|
|
400
|
-
filter_term_modifier
|
|
401
|
-
} = filter;
|
|
344
|
+
const _this$props10 = this.props,
|
|
345
|
+
index = _this$props10.index,
|
|
346
|
+
filter = _this$props10.filter,
|
|
347
|
+
collaborators = _this$props10.collaborators,
|
|
348
|
+
userDepartmentIdsMap = _this$props10.userDepartmentIdsMap,
|
|
349
|
+
departments = _this$props10.departments,
|
|
350
|
+
lang = _this$props10.lang,
|
|
351
|
+
firstDayOfWeek = _this$props10.firstDayOfWeek,
|
|
352
|
+
readOnly = _this$props10.readOnly;
|
|
353
|
+
const type = filterColumn.type;
|
|
354
|
+
const filter_term = filter.filter_term,
|
|
355
|
+
filter_predicate = filter.filter_predicate,
|
|
356
|
+
filter_term_modifier = filter.filter_term_modifier;
|
|
402
357
|
// predicate is empty or not empty
|
|
403
358
|
if (_constants.EMPTY_PREDICATE.includes(filter_predicate)) {
|
|
404
359
|
return null;
|
|
@@ -455,9 +410,9 @@ class FilterItem extends _react.default.Component {
|
|
|
455
410
|
case _dtableUtils.CellType.SINGLE_SELECT:
|
|
456
411
|
{
|
|
457
412
|
// get options
|
|
458
|
-
let {
|
|
459
|
-
options =
|
|
460
|
-
|
|
413
|
+
let _ref = filterColumn.data || {},
|
|
414
|
+
_ref$options = _ref.options,
|
|
415
|
+
options = _ref$options === void 0 ? [] : _ref$options;
|
|
461
416
|
if ([_dtableUtils.FILTER_PREDICATE_TYPE.IS_ANY_OF, _dtableUtils.FILTER_PREDICATE_TYPE.IS_NONE_OF].includes(filter_predicate)) {
|
|
462
417
|
return this.renderMultipleSelectOption(options, filter_term);
|
|
463
418
|
}
|
|
@@ -497,9 +452,9 @@ class FilterItem extends _react.default.Component {
|
|
|
497
452
|
}
|
|
498
453
|
case _dtableUtils.CellType.MULTIPLE_SELECT:
|
|
499
454
|
{
|
|
500
|
-
let {
|
|
501
|
-
options =
|
|
502
|
-
|
|
455
|
+
let _ref2 = filterColumn.data || {},
|
|
456
|
+
_ref2$options = _ref2.options,
|
|
457
|
+
options = _ref2$options === void 0 ? [] : _ref2$options;
|
|
503
458
|
return this.renderMultipleSelectOption(options, filter_term);
|
|
504
459
|
}
|
|
505
460
|
case _dtableUtils.CellType.DEPARTMENT_SINGLE_SELECT:
|
|
@@ -557,9 +512,8 @@ class FilterItem extends _react.default.Component {
|
|
|
557
512
|
}
|
|
558
513
|
case _dtableUtils.CellType.RATE:
|
|
559
514
|
{
|
|
560
|
-
let {
|
|
561
|
-
rate_max_number
|
|
562
|
-
} = filterColumn.data || {};
|
|
515
|
+
let _ref3 = filterColumn.data || {},
|
|
516
|
+
rate_max_number = _ref3.rate_max_number;
|
|
563
517
|
let rateList = [];
|
|
564
518
|
for (let i = 0; i < rate_max_number; i++) {
|
|
565
519
|
let rateItem = /*#__PURE__*/(0, _jsxRuntime.jsx)(_rateItem.default, {
|
|
@@ -596,19 +550,16 @@ class FilterItem extends _react.default.Component {
|
|
|
596
550
|
}
|
|
597
551
|
};
|
|
598
552
|
this.renderFormulaFilterTerm = (filterPredicate, filterTerm, index, filterColumn) => {
|
|
599
|
-
const {
|
|
600
|
-
data
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
result_type
|
|
604
|
-
} = data || {};
|
|
553
|
+
const _ref4 = filterColumn || {},
|
|
554
|
+
data = _ref4.data;
|
|
555
|
+
const _ref5 = data || {},
|
|
556
|
+
result_type = _ref5.result_type;
|
|
605
557
|
if (filterPredicate === _dtableUtils.FILTER_PREDICATE_TYPE.IS_CURRENT_USER_ID) {
|
|
606
558
|
return null;
|
|
607
559
|
}
|
|
608
560
|
if (result_type === _dtableUtils.FORMULA_RESULT_TYPE.NUMBER) {
|
|
609
|
-
const {
|
|
610
|
-
format
|
|
611
|
-
} = filterColumn.data || {};
|
|
561
|
+
const _ref6 = filterColumn.data || {},
|
|
562
|
+
format = _ref6.format;
|
|
612
563
|
if (format === _dtableUtils.CellType.DURATION) {
|
|
613
564
|
return this.getInputComponent(_constants.INPUT_CMP_TYPE_MAP.DURATION, filterColumn);
|
|
614
565
|
}
|
|
@@ -626,18 +577,15 @@ class FilterItem extends _react.default.Component {
|
|
|
626
577
|
return this.renderFilterTermByArrayType(filterPredicate, filterTerm, index, filterColumn);
|
|
627
578
|
};
|
|
628
579
|
this.renderFilterTermByArrayType = (filterPredicate, filterTerm, index, filterColumn) => {
|
|
629
|
-
const
|
|
630
|
-
collaborators,
|
|
631
|
-
departments,
|
|
632
|
-
readOnly
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
array_type,
|
|
639
|
-
array_data
|
|
640
|
-
} = data || {};
|
|
580
|
+
const _this$props11 = this.props,
|
|
581
|
+
collaborators = _this$props11.collaborators,
|
|
582
|
+
departments = _this$props11.departments,
|
|
583
|
+
readOnly = _this$props11.readOnly;
|
|
584
|
+
const _ref7 = filterColumn || {},
|
|
585
|
+
data = _ref7.data;
|
|
586
|
+
const _ref8 = data || {},
|
|
587
|
+
array_type = _ref8.array_type,
|
|
588
|
+
array_data = _ref8.array_data;
|
|
641
589
|
if (!array_type) {
|
|
642
590
|
return null;
|
|
643
591
|
}
|
|
@@ -646,9 +594,9 @@ class FilterItem extends _react.default.Component {
|
|
|
646
594
|
data: array_data
|
|
647
595
|
};
|
|
648
596
|
if (array_type === _dtableUtils.CellType.SINGLE_SELECT || array_type === _dtableUtils.CellType.MULTIPLE_SELECT) {
|
|
649
|
-
let {
|
|
650
|
-
options =
|
|
651
|
-
|
|
597
|
+
let _ref9 = array_data || {},
|
|
598
|
+
_ref9$options = _ref9.options,
|
|
599
|
+
options = _ref9$options === void 0 ? [] : _ref9$options;
|
|
652
600
|
return this.renderMultipleSelectOption(options, filterTerm);
|
|
653
601
|
}
|
|
654
602
|
if (array_type === _dtableUtils.CellType.DEPARTMENT_SINGLE_SELECT) {
|
|
@@ -680,9 +628,7 @@ class FilterItem extends _react.default.Component {
|
|
|
680
628
|
return this.getInputComponent(_constants.INPUT_CMP_TYPE_MAP.TEXT);
|
|
681
629
|
};
|
|
682
630
|
this.isRenderErrorTips = () => {
|
|
683
|
-
const
|
|
684
|
-
errMsg
|
|
685
|
-
} = this.props;
|
|
631
|
+
const errMsg = this.props.errMsg;
|
|
686
632
|
return errMsg && errMsg !== _dtableUtils.FILTER_ERR_MSG.INCOMPLETE_FILTER;
|
|
687
633
|
};
|
|
688
634
|
this.renderErrorMessage = () => {
|
|
@@ -712,9 +658,7 @@ class FilterItem extends _react.default.Component {
|
|
|
712
658
|
this.initSelectOptions(_props);
|
|
713
659
|
}
|
|
714
660
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
715
|
-
const
|
|
716
|
-
filter
|
|
717
|
-
} = this.props;
|
|
661
|
+
const filter = this.props.filter;
|
|
718
662
|
if (nextProps.filter !== filter) {
|
|
719
663
|
this.initSelectOptions(nextProps);
|
|
720
664
|
this.setState({
|
|
@@ -728,20 +672,15 @@ class FilterItem extends _react.default.Component {
|
|
|
728
672
|
return shouldUpdated;
|
|
729
673
|
}
|
|
730
674
|
render() {
|
|
731
|
-
const
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
} = this.props;
|
|
741
|
-
const {
|
|
742
|
-
filter_predicate,
|
|
743
|
-
filter_term_modifier
|
|
744
|
-
} = filter;
|
|
675
|
+
const filterPredicateOptions = this.filterPredicateOptions,
|
|
676
|
+
filterTermModifierOptions = this.filterTermModifierOptions;
|
|
677
|
+
const _this$props12 = this.props,
|
|
678
|
+
filter = _this$props12.filter,
|
|
679
|
+
filterColumn = _this$props12.filterColumn,
|
|
680
|
+
filterColumnOptions = _this$props12.filterColumnOptions,
|
|
681
|
+
readOnly = _this$props12.readOnly;
|
|
682
|
+
const filter_predicate = filter.filter_predicate,
|
|
683
|
+
filter_term_modifier = filter.filter_term_modifier;
|
|
745
684
|
const activeColumn = _filterItemUtils.default.generatorColumnOption(filterColumn);
|
|
746
685
|
const activePredicate = _filterItemUtils.default.generatorPredicateOption(filter_predicate, true);
|
|
747
686
|
let activeTermModifier = null;
|
|
@@ -751,9 +690,7 @@ class FilterItem extends _react.default.Component {
|
|
|
751
690
|
} else if ((0, _columnUtils.isCheckboxColumn)(filterColumn)) {
|
|
752
691
|
_isCheckboxColumn = true;
|
|
753
692
|
}
|
|
754
|
-
const
|
|
755
|
-
type
|
|
756
|
-
} = filterColumn;
|
|
693
|
+
const type = filterColumn.type;
|
|
757
694
|
const computedColumnTypes = [_dtableUtils.CellType.FORMULA, _dtableUtils.CellType.LINK_FORMULA, _dtableUtils.CellType.LINK];
|
|
758
695
|
const isContainPredicate = [_dtableUtils.FILTER_PREDICATE_TYPE.CONTAINS, _dtableUtils.FILTER_PREDICATE_TYPE.NOT_CONTAIN].includes(filter_predicate);
|
|
759
696
|
const isRenderErrorTips = this.isRenderErrorTips();
|