dtable-ui-component 7.0.13 → 7.0.15
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 +58 -49
- package/lib/ActivityIndicator/index.js +17 -16
- package/lib/AsyncUserSelect/index.js +20 -46
- package/lib/AsyncUserSelect/user-item.js +6 -5
- package/lib/AutoNumberFormatter/index.js +4 -3
- package/lib/Badge/index.js +27 -29
- package/lib/ButtonFormatter/index.js +8 -6
- package/lib/CTimeFormatter/index.js +4 -3
- package/lib/CheckboxEditor/index.js +16 -13
- package/lib/CheckboxEditor/mb-editor.js +20 -9
- package/lib/CheckboxEditor/pc-editor.js +24 -12
- package/lib/CheckboxFormatter/index.js +5 -4
- package/lib/CollaboratorEditor/index.js +17 -14
- package/lib/CollaboratorEditor/mb-editor/index.js +19 -11
- package/lib/CollaboratorEditor/pc-editor/index.js +35 -26
- package/lib/CollaboratorFormatter/index.js +10 -8
- package/lib/CollaboratorItem/index.js +5 -4
- package/lib/CollapsibleSettingLayout/index.js +8 -10
- package/lib/Comment/body/comment.js +19 -11
- package/lib/Comment/body/index.js +8 -8
- package/lib/Comment/footer/btns/index.js +7 -4
- package/lib/Comment/footer/index.js +21 -10
- package/lib/Comment/footer/input/index.js +55 -34
- package/lib/Comment/footer/input/participant/index.js +6 -5
- package/lib/Comment/footer/participants/index.js +5 -4
- package/lib/Comment/footer/participants/participant/index.js +3 -1
- package/lib/Comment/footer/participants/participant-select/index.js +26 -10
- package/lib/Comment/index.js +57 -39
- package/lib/Comment/utils/utilities.js +22 -16
- package/lib/CreatorFormatter/index.js +8 -6
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +26 -28
- package/lib/DTableColorPicker/index.js +53 -67
- package/lib/DTableColorPicker/utils.js +7 -5
- package/lib/DTableColumnIcon/index.js +7 -6
- package/lib/DTableCommonAddTool/index.js +10 -8
- package/lib/DTableCustomFooter/index.js +3 -1
- package/lib/DTableCustomizeSearchInput/index.js +41 -26
- package/lib/DTableCustomizeSelect/index.js +24 -19
- package/lib/DTableDropdownItem/index.js +28 -24
- package/lib/DTableDropdownMenu/index.js +17 -14
- package/lib/DTableEmptyTip/index.js +5 -4
- package/lib/DTableFiltersPopover/index.js +42 -27
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -1
- package/lib/DTableFiltersPopover/utils/index.js +114 -64
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +9 -8
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +13 -16
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +15 -18
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +14 -8
- package/lib/DTableFiltersPopover/widgets/filter-group.js +57 -36
- package/lib/DTableFiltersPopover/widgets/filter-item.js +165 -106
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +162 -137
- package/lib/DTableFiltersPopover/widgets/rate-item.js +25 -20
- package/lib/DTableIcon/index.js +11 -10
- package/lib/DTableIcon/svg-icon.js +11 -9
- package/lib/DTableModalHeader/index.js +7 -7
- package/lib/DTablePopover/index.js +16 -12
- package/lib/DTableRadio/index.js +9 -10
- package/lib/DTableRadioGroup/index.js +20 -11
- package/lib/DTableSearchInput/index.js +29 -19
- package/lib/DTableSelect/dtable-select-label.js +6 -7
- package/lib/DTableSelect/index.js +26 -25
- package/lib/DTableSelect/select-dropdown-indicator/index.js +3 -1
- package/lib/DTableSelect/utils.js +83 -47
- package/lib/DTableSubDropdownMenu/index.js +16 -12
- package/lib/DTableSubDropdownToggle/index.js +16 -17
- package/lib/DTableSwitch/index.js +11 -12
- package/lib/DTableToolTip/index.js +12 -11
- package/lib/DateEditor/index.js +28 -30
- package/lib/DateEditor/mb-editor/index.js +31 -18
- package/lib/DateEditor/pc-editor.js +46 -27
- package/lib/DateFormatter/index.js +5 -4
- package/lib/DatePicker/index.js +15 -9
- package/lib/DatePicker/utils.js +7 -5
- package/lib/DeleteTip/index.js +6 -5
- package/lib/DepartmentMultipleSelectEditor/index.js +26 -28
- package/lib/DepartmentSelectFilter/index.js +13 -8
- package/lib/DepartmentSingleSelectEditor/index.js +16 -13
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +49 -50
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +64 -42
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +19 -13
- package/lib/DepartmentSingleSelectFormatter/index.js +6 -4
- package/lib/DigitalSignEditor/index.js +16 -13
- package/lib/DigitalSignEditor/mb-editor/index.js +24 -16
- package/lib/DigitalSignEditor/pc-editor/index.js +31 -23
- package/lib/DigitalSignEditor/service.js +5 -3
- package/lib/DigitalSignEditor/signature-board/index.js +10 -7
- package/lib/DigitalSignEditor/utils.js +4 -2
- package/lib/DigitalSignFormatter/index.js +15 -12
- package/lib/DigitalSignFormatter/utils.js +6 -5
- package/lib/Drawer/index.js +3 -2
- package/lib/DurationEditor/index.js +31 -21
- package/lib/DurationFormatter/index.js +5 -4
- package/lib/EditEditorButton/index.js +3 -1
- package/lib/EmailFormatter/index.js +4 -3
- package/lib/FieldDisplaySetting/field-item.js +13 -13
- package/lib/FieldDisplaySetting/index.js +20 -20
- package/lib/FileEditor/files-previewer/index.js +16 -13
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +20 -12
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +8 -7
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +4 -3
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +6 -5
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +24 -17
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +57 -29
- package/lib/FileEditor/index.js +16 -13
- package/lib/FileEditor/mb-editor/index.js +20 -28
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +4 -2
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +31 -17
- package/lib/FileEditor/pc-editor/index.js +30 -22
- package/lib/FileFormatter/index.js +20 -27
- package/lib/FileItemFormatter/index.js +10 -7
- package/lib/FileUploader/index.js +46 -29
- package/lib/FormulaFormatter/index.js +44 -24
- package/lib/GeolocationEditor/index.js +32 -27
- package/lib/GeolocationEditor/map-editor-utils.js +23 -21
- package/lib/GeolocationEditor/mb-editor/country-editor.js +14 -17
- package/lib/GeolocationEditor/mb-editor/index.js +28 -22
- package/lib/GeolocationEditor/mb-editor/location-editor.js +15 -18
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +77 -47
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +89 -50
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +14 -17
- package/lib/GeolocationEditor/mb-editor/province-editor.js +14 -17
- package/lib/GeolocationEditor/pc-editor/country-editor.js +25 -12
- package/lib/GeolocationEditor/pc-editor/index.js +41 -27
- package/lib/GeolocationEditor/pc-editor/location-editor.js +33 -28
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +67 -43
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +69 -42
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +86 -42
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +85 -39
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +26 -20
- package/lib/GeolocationEditor/pc-editor/province-editor.js +15 -8
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +6 -5
- package/lib/GeolocationEditor/pc-editor/selector-list.js +8 -7
- package/lib/GeolocationFormatter/index.js +5 -4
- package/lib/HtmlLongTextFormatter/index.js +13 -5
- package/lib/Icon/index.js +13 -15
- package/lib/Icon/load-sprite.js +13 -2
- package/lib/IconButton/index.js +12 -13
- package/lib/ImageEditor/images-previewer/image-preview/index.js +22 -13
- package/lib/ImageEditor/images-previewer/index.js +9 -3
- package/lib/ImageEditor/index.js +16 -13
- package/lib/ImageEditor/mb-editor/index.js +20 -28
- package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +6 -2
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +5 -3
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +26 -12
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +10 -4
- package/lib/ImageEditor/pc-editor/index.js +16 -11
- package/lib/ImageFormatter/images-lazy-load.js +11 -19
- package/lib/ImageFormatter/index.js +14 -12
- package/lib/ImagePreviewerLightbox/index.js +15 -19
- package/lib/ImageThumbnail/index.js +15 -12
- package/lib/InputItem/custom-input.js +55 -35
- package/lib/InputItem/custom-keyboard.js +42 -42
- package/lib/InputItem/index.js +82 -63
- package/lib/InputItem/input.js +9 -11
- package/lib/LastModifierFormatter/index.js +8 -6
- package/lib/LinkEditor/index.js +53 -33
- package/lib/LinkEditor/link-editor-option.js +4 -3
- package/lib/LinkEditor/mb-popover/index.js +22 -9
- package/lib/LinkEditor/pc-popover/index.js +13 -7
- package/lib/LinkFormatter/index.js +37 -21
- package/lib/List/index.js +17 -19
- package/lib/List/list-item.js +59 -55
- package/lib/LongTextFormatter/index.js +5 -4
- package/lib/MBEditorHeader/index.js +9 -8
- package/lib/MTimeFormatter/index.js +4 -3
- package/lib/MobileFullScreenPage/body/index.js +6 -4
- package/lib/MobileFullScreenPage/header/index.js +10 -8
- package/lib/MobileFullScreenPage/index.js +12 -14
- package/lib/MobileModal/index.js +7 -8
- package/lib/MobileOperationSheet/index.js +8 -7
- package/lib/MobileSelector/empty/index.js +3 -1
- package/lib/MobileSelector/index.js +7 -5
- package/lib/MobileSelector/option/index.js +5 -3
- package/lib/MobileSelector/options/index.css +0 -4
- package/lib/MobileSelector/options/index.js +3 -1
- package/lib/MobileSelector/search/index.js +5 -3
- package/lib/MobileUpload/index.js +5 -4
- package/lib/Modal/alert.js +2 -2
- package/lib/Modal/modal.js +28 -30
- package/lib/Modal/prompt.js +14 -14
- package/lib/MultipleSelectEditor/index.js +7 -7
- package/lib/MultipleSelectFormatter/index.js +9 -7
- package/lib/NotificationPopover/index.js +5 -4
- package/lib/NumberEditor/index.js +21 -12
- package/lib/NumberFormatter/index.js +5 -4
- package/lib/PhoneNumberLink/index.js +5 -3
- package/lib/Picker/AbstractPicker.js +35 -33
- package/lib/Popover/index.js +9 -11
- package/lib/Popover/item.js +22 -24
- package/lib/Progress/index.js +18 -17
- package/lib/Radio/Radio.js +17 -15
- package/lib/Radio/RadioItem.js +23 -19
- package/lib/RateFormatter/index.js +15 -15
- package/lib/RoleStatusEditor/index.js +18 -19
- package/lib/RowExpand/index.js +7 -6
- package/lib/RowExpandDialog/body/index.js +57 -40
- package/lib/RowExpandDialog/column-content/index.js +10 -6
- package/lib/RowExpandDialog/header/index.js +12 -9
- package/lib/RowExpandDialog/index.js +59 -63
- package/lib/RowExpandEditor/add-btn/index.js +7 -6
- package/lib/RowExpandEditor/checkbox-editor/index.js +7 -6
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +5 -4
- package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +10 -8
- package/lib/RowExpandEditor/collaborator-editor/index.js +7 -6
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +33 -22
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +40 -26
- package/lib/RowExpandEditor/date-editor/index.js +7 -6
- package/lib/RowExpandEditor/date-editor/mb-editor.js +18 -12
- package/lib/RowExpandEditor/date-editor/pc-editor.js +20 -15
- package/lib/RowExpandEditor/department-editor/index.js +7 -6
- package/lib/RowExpandEditor/department-editor/mb-editor.js +11 -16
- package/lib/RowExpandEditor/department-editor/pc-editor.js +14 -19
- package/lib/RowExpandEditor/digital-sign-editor/index.js +7 -6
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +38 -24
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +39 -25
- package/lib/RowExpandEditor/duration-editor/index.js +7 -6
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +17 -10
- package/lib/RowExpandEditor/duration-editor/pc-editor.js +19 -13
- package/lib/RowExpandEditor/email-editor/index.js +7 -6
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +20 -10
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +25 -14
- package/lib/RowExpandEditor/file-editor/index.js +7 -6
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +31 -18
- package/lib/RowExpandEditor/file-editor/pc-editor/index.js +23 -16
- package/lib/RowExpandEditor/geolocation-editor/index.js +7 -6
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +29 -17
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +26 -13
- package/lib/RowExpandEditor/image-editor/index.js +7 -6
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +26 -16
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +24 -14
- package/lib/RowExpandEditor/index.js +16 -11
- package/lib/RowExpandEditor/long-text-editor/index.js +7 -6
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +18 -17
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +16 -10
- package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +23 -16
- package/lib/RowExpandEditor/multiple-select-editor/index.js +7 -6
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +20 -12
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +38 -27
- package/lib/RowExpandEditor/number-editor/index.js +7 -6
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +14 -8
- package/lib/RowExpandEditor/number-editor/pc-editor.js +20 -13
- package/lib/RowExpandEditor/rate-editor/index.js +7 -6
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +26 -13
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +41 -25
- package/lib/RowExpandEditor/single-select-editor/index.js +7 -6
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +32 -21
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +37 -25
- package/lib/RowExpandEditor/text-editor/index.js +7 -6
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +5 -4
- package/lib/RowExpandEditor/text-editor/pc-editor/index.js +26 -15
- package/lib/RowExpandEditor/url-editor/index.js +7 -6
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +15 -7
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +20 -11
- package/lib/RowExpandFormatter/department-formatter/index.js +6 -3
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +4 -2
- package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +4 -2
- package/lib/RowExpandFormatter/email-formatter/index.js +8 -5
- package/lib/RowExpandFormatter/file-formatter/index.js +9 -8
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +14 -12
- package/lib/RowExpandFormatter/formula-formatter/index.js +51 -30
- package/lib/RowExpandFormatter/image-formatter/index.js +11 -9
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +10 -9
- package/lib/RowExpandFormatter/index.js +52 -34
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +15 -9
- package/lib/RowExpandFormatter/link-formatter/index.js +25 -17
- package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +5 -3
- package/lib/RowExpandFormatter/rate-formatter/index.js +14 -13
- package/lib/RowExpandFormatter/text/index.js +5 -4
- package/lib/RowExpandFormatter/url-formatter/index.js +9 -6
- package/lib/RowExpandView/body/index.js +43 -32
- package/lib/RowExpandView/column-content/index.js +7 -3
- package/lib/RowExpandView/index.js +52 -53
- package/lib/SelectItem/index.js +7 -5
- package/lib/SelectOptionGroup/index.js +40 -30
- package/lib/SelectedDepartments/index.js +12 -10
- package/lib/SimpleLongTextFormatter/index.js +18 -12
- package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +4 -3
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +21 -12
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +4 -3
- package/lib/SingleSelectEditor/index.js +7 -7
- package/lib/SingleSelectFormatter/index.js +9 -8
- package/lib/TabBar/Tab.js +26 -24
- package/lib/TabBar/index.js +28 -24
- package/lib/Tabs/index.js +13 -10
- package/lib/TextEditor/index.js +23 -14
- package/lib/TextFormatter/index.js +4 -3
- package/lib/TextareaItem/index.js +53 -48
- package/lib/Toast/index.js +9 -8
- package/lib/UrlFormatter/index.js +4 -3
- package/lib/common/editor-base.js +12 -7
- package/lib/formatterConfig/index.js +3 -3
- package/lib/hooks/common-hooks.js +4 -2
- package/lib/select-editor/index.js +16 -13
- package/lib/select-editor/mb-editor/index.js +28 -17
- package/lib/select-editor/pc-editor/index.js +47 -32
- package/lib/toaster/alert.js +8 -7
- package/lib/toaster/toast.js +4 -3
- package/lib/toaster/toastManager.js +13 -13
- package/lib/toaster/toaster.js +12 -9
- package/lib/utils/cell.js +11 -8
- package/lib/utils/class.js +3 -3
- package/lib/utils/column-utils.js +14 -8
- package/lib/utils/departments.js +6 -5
- package/lib/utils/getLocale.js +11 -5
- package/lib/utils/object-utils.js +5 -4
- package/lib/utils/url.js +29 -22
- package/lib/utils/utils.js +6 -2
- package/package.json +2 -2
|
@@ -20,19 +20,21 @@ class FiltersList extends _react.Component {
|
|
|
20
20
|
constructor(props) {
|
|
21
21
|
super(props);
|
|
22
22
|
this.modifyFilterConjunction = new_filter_conjunction => {
|
|
23
|
-
const
|
|
24
|
-
filter_conjunction
|
|
25
|
-
filters
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
23
|
+
const {
|
|
24
|
+
filterConjunction: filter_conjunction,
|
|
25
|
+
filters
|
|
26
|
+
} = this.props;
|
|
27
|
+
const {
|
|
28
|
+
filter_conjunction: next_filter_conjunction,
|
|
29
|
+
filters: next_filters
|
|
30
|
+
} = (0, _utils.applyFilterOperation)({
|
|
31
|
+
type: _constants.FILTER_OPERATION_TYPE.MODIFY_CONJUNCTION,
|
|
32
|
+
filter_conjunction,
|
|
33
|
+
filters,
|
|
34
|
+
payload: {
|
|
35
|
+
new_filter_conjunction
|
|
36
|
+
}
|
|
37
|
+
});
|
|
36
38
|
this.props.updateFilters({
|
|
37
39
|
filter_conjunction: next_filter_conjunction,
|
|
38
40
|
filters: next_filters
|
|
@@ -40,88 +42,98 @@ class FiltersList extends _react.Component {
|
|
|
40
42
|
};
|
|
41
43
|
this.updateFilter = (filter_index, new_filter) => {
|
|
42
44
|
if (!new_filter) return;
|
|
43
|
-
const
|
|
44
|
-
filter_conjunction
|
|
45
|
-
filters
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
45
|
+
const {
|
|
46
|
+
filterConjunction: filter_conjunction,
|
|
47
|
+
filters
|
|
48
|
+
} = this.props;
|
|
49
|
+
const {
|
|
50
|
+
filter_conjunction: next_filter_conjunction,
|
|
51
|
+
filters: next_filters
|
|
52
|
+
} = (0, _utils.applyFilterOperation)({
|
|
53
|
+
type: _constants.FILTER_OPERATION_TYPE.UPDATE_FILTER,
|
|
54
|
+
filter_conjunction,
|
|
55
|
+
filters,
|
|
56
|
+
payload: {
|
|
57
|
+
filter_index,
|
|
58
|
+
new_filter
|
|
59
|
+
}
|
|
60
|
+
});
|
|
57
61
|
this.props.updateFilters({
|
|
58
62
|
filter_conjunction: next_filter_conjunction,
|
|
59
63
|
filters: next_filters
|
|
60
64
|
});
|
|
61
65
|
};
|
|
62
66
|
this.deleteFilter = filter_index => {
|
|
63
|
-
const
|
|
64
|
-
filter_conjunction
|
|
65
|
-
filters
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
67
|
+
const {
|
|
68
|
+
filterConjunction: filter_conjunction,
|
|
69
|
+
filters
|
|
70
|
+
} = this.props;
|
|
71
|
+
const {
|
|
72
|
+
filter_conjunction: next_filter_conjunction,
|
|
73
|
+
filters: next_filters
|
|
74
|
+
} = (0, _utils.applyFilterOperation)({
|
|
75
|
+
type: _constants.FILTER_OPERATION_TYPE.DELETE_FILTER,
|
|
76
|
+
filter_conjunction,
|
|
77
|
+
filters,
|
|
78
|
+
payload: {
|
|
79
|
+
filter_index
|
|
80
|
+
}
|
|
81
|
+
});
|
|
76
82
|
this.props.updateFilters({
|
|
77
83
|
filter_conjunction: next_filter_conjunction,
|
|
78
84
|
filters: next_filters
|
|
79
85
|
});
|
|
80
86
|
};
|
|
81
87
|
this.moveFilter = _ref => {
|
|
82
|
-
let
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
88
|
+
let {
|
|
89
|
+
source_filter_index,
|
|
90
|
+
target_filter_index,
|
|
91
|
+
source_group_index,
|
|
92
|
+
target_group_index
|
|
93
|
+
} = _ref;
|
|
86
94
|
if (source_filter_index === target_filter_index && source_group_index === target_group_index) {
|
|
87
95
|
return;
|
|
88
96
|
}
|
|
89
|
-
const
|
|
90
|
-
filter_conjunction
|
|
91
|
-
filters
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
97
|
+
const {
|
|
98
|
+
filterConjunction: filter_conjunction,
|
|
99
|
+
filters
|
|
100
|
+
} = this.props;
|
|
101
|
+
const {
|
|
102
|
+
filter_conjunction: next_filter_conjunction,
|
|
103
|
+
filters: next_filters
|
|
104
|
+
} = (0, _utils.applyFilterOperation)({
|
|
105
|
+
type: _constants.FILTER_OPERATION_TYPE.MOVE_FILTER,
|
|
106
|
+
filter_conjunction,
|
|
107
|
+
filters,
|
|
108
|
+
payload: {
|
|
109
|
+
source_filter_index,
|
|
110
|
+
target_filter_index,
|
|
111
|
+
source_group_index,
|
|
112
|
+
target_group_index
|
|
113
|
+
}
|
|
114
|
+
});
|
|
105
115
|
this.props.updateFilters({
|
|
106
116
|
filter_conjunction: next_filter_conjunction,
|
|
107
117
|
filters: next_filters
|
|
108
118
|
});
|
|
109
119
|
};
|
|
110
120
|
this.modifyConjunctionInGroup = (group_index, new_filter_conjunction) => {
|
|
111
|
-
const
|
|
112
|
-
filter_conjunction
|
|
113
|
-
filters
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
const {
|
|
122
|
+
filterConjunction: filter_conjunction,
|
|
123
|
+
filters
|
|
124
|
+
} = this.props;
|
|
125
|
+
const {
|
|
126
|
+
filter_conjunction: next_filter_conjunction,
|
|
127
|
+
filters: next_filters
|
|
128
|
+
} = (0, _utils.applyFilterOperation)({
|
|
129
|
+
type: _constants.FILTER_OPERATION_TYPE.MODIFY_CONJUNCTION_IN_GROUP,
|
|
130
|
+
filter_conjunction,
|
|
131
|
+
filters,
|
|
132
|
+
payload: {
|
|
133
|
+
group_index,
|
|
134
|
+
new_filter_conjunction
|
|
135
|
+
}
|
|
136
|
+
});
|
|
125
137
|
this.props.updateFilters({
|
|
126
138
|
filter_conjunction: next_filter_conjunction,
|
|
127
139
|
filters: next_filters
|
|
@@ -129,40 +141,44 @@ class FiltersList extends _react.Component {
|
|
|
129
141
|
};
|
|
130
142
|
this.addFilterIntoGroup = (group_index, filter) => {
|
|
131
143
|
if (!filter) return;
|
|
132
|
-
const
|
|
133
|
-
filter_conjunction
|
|
134
|
-
filters
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
const {
|
|
145
|
+
filterConjunction: filter_conjunction,
|
|
146
|
+
filters
|
|
147
|
+
} = this.props;
|
|
148
|
+
const {
|
|
149
|
+
filter_conjunction: next_filter_conjunction,
|
|
150
|
+
filters: next_filters
|
|
151
|
+
} = (0, _utils.applyFilterOperation)({
|
|
152
|
+
type: _constants.FILTER_OPERATION_TYPE.ADD_FILTER_INTO_GROUP,
|
|
153
|
+
filter_conjunction,
|
|
154
|
+
filters,
|
|
155
|
+
payload: {
|
|
156
|
+
group_index,
|
|
157
|
+
filter
|
|
158
|
+
}
|
|
159
|
+
});
|
|
146
160
|
this.props.updateFilters({
|
|
147
161
|
filter_conjunction: next_filter_conjunction,
|
|
148
162
|
filters: next_filters
|
|
149
163
|
});
|
|
150
164
|
};
|
|
151
165
|
this.deleteFilterInGroup = (group_index, filter_index) => {
|
|
152
|
-
const
|
|
153
|
-
filter_conjunction
|
|
154
|
-
filters
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
+
const {
|
|
167
|
+
filterConjunction: filter_conjunction,
|
|
168
|
+
filters
|
|
169
|
+
} = this.props;
|
|
170
|
+
const {
|
|
171
|
+
filter_conjunction: next_filter_conjunction,
|
|
172
|
+
filters: next_filters
|
|
173
|
+
} = (0, _utils.applyFilterOperation)({
|
|
174
|
+
type: _constants.FILTER_OPERATION_TYPE.DELETE_FILTER_IN_GROUP,
|
|
175
|
+
filter_conjunction,
|
|
176
|
+
filters,
|
|
177
|
+
payload: {
|
|
178
|
+
group_index,
|
|
179
|
+
filter_index
|
|
180
|
+
}
|
|
181
|
+
});
|
|
166
182
|
this.props.updateFilters({
|
|
167
183
|
filter_conjunction: next_filter_conjunction,
|
|
168
184
|
filters: next_filters
|
|
@@ -170,21 +186,23 @@ class FiltersList extends _react.Component {
|
|
|
170
186
|
};
|
|
171
187
|
this.updateFilterInGroup = (group_index, filter_index, new_filter) => {
|
|
172
188
|
if (!new_filter) return;
|
|
173
|
-
const
|
|
174
|
-
filter_conjunction
|
|
175
|
-
filters
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
189
|
+
const {
|
|
190
|
+
filterConjunction: filter_conjunction,
|
|
191
|
+
filters
|
|
192
|
+
} = this.props;
|
|
193
|
+
const {
|
|
194
|
+
filter_conjunction: next_filter_conjunction,
|
|
195
|
+
filters: next_filters
|
|
196
|
+
} = (0, _utils.applyFilterOperation)({
|
|
197
|
+
type: _constants.FILTER_OPERATION_TYPE.UPDATE_FILTER_IN_GROUP,
|
|
198
|
+
filter_conjunction,
|
|
199
|
+
filters,
|
|
200
|
+
payload: {
|
|
201
|
+
group_index,
|
|
202
|
+
filter_index,
|
|
203
|
+
new_filter
|
|
204
|
+
}
|
|
205
|
+
});
|
|
188
206
|
this.props.updateFilters({
|
|
189
207
|
filter_conjunction: next_filter_conjunction,
|
|
190
208
|
filters: next_filters
|
|
@@ -197,7 +215,9 @@ class FiltersList extends _react.Component {
|
|
|
197
215
|
return this.conjunctionOptions;
|
|
198
216
|
};
|
|
199
217
|
this.getColumnOptions = () => {
|
|
200
|
-
const
|
|
218
|
+
const {
|
|
219
|
+
columns
|
|
220
|
+
} = this.props;
|
|
201
221
|
if (!this.columnOptions) {
|
|
202
222
|
const filterColumns = (0, _utils.getFilterColumns)(columns);
|
|
203
223
|
this.columnOptions = filterColumns.map(column => {
|
|
@@ -207,16 +227,17 @@ class FiltersList extends _react.Component {
|
|
|
207
227
|
return this.columnOptions;
|
|
208
228
|
};
|
|
209
229
|
this.renderFilter = (filter, index, filterColumn) => {
|
|
210
|
-
const
|
|
211
|
-
filterConjunction
|
|
212
|
-
isInModal
|
|
213
|
-
columns
|
|
214
|
-
collaborators
|
|
215
|
-
userDepartmentIdsMap
|
|
216
|
-
departments
|
|
217
|
-
lang
|
|
218
|
-
firstDayOfWeek
|
|
219
|
-
readOnly
|
|
230
|
+
const {
|
|
231
|
+
filterConjunction,
|
|
232
|
+
isInModal,
|
|
233
|
+
columns,
|
|
234
|
+
collaborators,
|
|
235
|
+
userDepartmentIdsMap,
|
|
236
|
+
departments,
|
|
237
|
+
lang,
|
|
238
|
+
firstDayOfWeek,
|
|
239
|
+
readOnly
|
|
240
|
+
} = this.props;
|
|
220
241
|
const conjunctionOptions = this.getConjunctionOptions();
|
|
221
242
|
const columnOptions = this.getColumnOptions();
|
|
222
243
|
if ((0, _dtableUtils.checkIsFilterGroup)(filter)) {
|
|
@@ -240,10 +261,11 @@ class FiltersList extends _react.Component {
|
|
|
240
261
|
modifyConjunctionInGroup: this.modifyConjunctionInGroup,
|
|
241
262
|
deleteFilterInGroup: this.deleteFilterInGroup,
|
|
242
263
|
updateFilterInGroup: this.updateFilterInGroup
|
|
243
|
-
},
|
|
264
|
+
}, `filter-group-${index}`);
|
|
244
265
|
}
|
|
245
|
-
const
|
|
246
|
-
error_message
|
|
266
|
+
const {
|
|
267
|
+
error_message
|
|
268
|
+
} = _dtableUtils.ValidateFilter.validate(filter, columns);
|
|
247
269
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_filterItem.default, {
|
|
248
270
|
isInModal: isInModal,
|
|
249
271
|
lang: lang,
|
|
@@ -273,11 +295,12 @@ class FiltersList extends _react.Component {
|
|
|
273
295
|
}
|
|
274
296
|
}
|
|
275
297
|
render() {
|
|
276
|
-
let
|
|
277
|
-
filters
|
|
278
|
-
className
|
|
279
|
-
emptyPlaceholder
|
|
280
|
-
columns
|
|
298
|
+
let {
|
|
299
|
+
filters,
|
|
300
|
+
className,
|
|
301
|
+
emptyPlaceholder,
|
|
302
|
+
columns
|
|
303
|
+
} = this.props;
|
|
281
304
|
const isEmpty = filters.length === 0;
|
|
282
305
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
283
306
|
className: (0, _classnames.default)('dtable-ui-filters-list', {
|
|
@@ -289,7 +312,9 @@ class FiltersList extends _react.Component {
|
|
|
289
312
|
className: "empty-filters-list",
|
|
290
313
|
children: emptyPlaceholder
|
|
291
314
|
}), !isEmpty && filters.map((filter, index) => {
|
|
292
|
-
const
|
|
315
|
+
const {
|
|
316
|
+
column_key
|
|
317
|
+
} = filter;
|
|
293
318
|
const filterColumn = (0, _utils.getColumnByKey)(column_key, columns) || {};
|
|
294
319
|
return this.renderFilter(filter, index, filterColumn);
|
|
295
320
|
})]
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
9
|
var _DTableToolTip = _interopRequireDefault(require("../../DTableToolTip"));
|
|
11
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -13,17 +12,20 @@ class RateItem extends _react.default.Component {
|
|
|
13
12
|
constructor(props) {
|
|
14
13
|
super(props);
|
|
15
14
|
this.onMouseEnterRateItem = () => {
|
|
16
|
-
const
|
|
15
|
+
const {
|
|
16
|
+
rateItemIndex
|
|
17
|
+
} = this.props;
|
|
17
18
|
this.props.onMouseEnterRateItem(rateItemIndex);
|
|
18
19
|
};
|
|
19
20
|
this.onMouseLeaveRateItem = () => {
|
|
20
21
|
this.props.onMouseLeaveRateItem();
|
|
21
22
|
};
|
|
22
23
|
this.onChangeRateNumber = () => {
|
|
23
|
-
const
|
|
24
|
-
onChangeRateNumber
|
|
25
|
-
rateItemIndex
|
|
26
|
-
editable
|
|
24
|
+
const {
|
|
25
|
+
onChangeRateNumber,
|
|
26
|
+
rateItemIndex,
|
|
27
|
+
editable
|
|
28
|
+
} = this.props;
|
|
27
29
|
if (onChangeRateNumber && editable) {
|
|
28
30
|
onChangeRateNumber(rateItemIndex);
|
|
29
31
|
}
|
|
@@ -34,16 +36,18 @@ class RateItem extends _react.default.Component {
|
|
|
34
36
|
};
|
|
35
37
|
}
|
|
36
38
|
render() {
|
|
37
|
-
const
|
|
38
|
-
enterRateItemIndex
|
|
39
|
-
rateItemIndex
|
|
40
|
-
value
|
|
41
|
-
column
|
|
42
|
-
isShowRateItem
|
|
43
|
-
editable
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
const {
|
|
40
|
+
enterRateItemIndex,
|
|
41
|
+
rateItemIndex,
|
|
42
|
+
value,
|
|
43
|
+
column,
|
|
44
|
+
isShowRateItem,
|
|
45
|
+
editable
|
|
46
|
+
} = this.props;
|
|
47
|
+
const {
|
|
48
|
+
rate_style_color,
|
|
49
|
+
rate_style_type
|
|
50
|
+
} = column.data || {};
|
|
47
51
|
const rateShowType = rate_style_type ? rate_style_type : 'dtable-icon-rate';
|
|
48
52
|
if (!isShowRateItem && rateItemIndex > value) return null;
|
|
49
53
|
let itemStyle = {
|
|
@@ -52,19 +56,20 @@ class RateItem extends _react.default.Component {
|
|
|
52
56
|
};
|
|
53
57
|
let style = itemStyle;
|
|
54
58
|
if (enterRateItemIndex >= rateItemIndex) {
|
|
55
|
-
style =
|
|
59
|
+
style = {
|
|
60
|
+
...itemStyle,
|
|
56
61
|
color: rate_style_color,
|
|
57
62
|
opacity: 0.4
|
|
58
|
-
}
|
|
63
|
+
};
|
|
59
64
|
}
|
|
60
65
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
61
66
|
onMouseEnter: this.onMouseEnterRateItem,
|
|
62
67
|
onMouseLeave: this.onMouseLeaveRateItem,
|
|
63
68
|
style: style,
|
|
64
69
|
onClick: this.onChangeRateNumber,
|
|
65
|
-
className:
|
|
70
|
+
className: `rate-item ${value >= rateItemIndex ? 'rate-item-active' : ''}`,
|
|
66
71
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
67
|
-
className:
|
|
72
|
+
className: `dtable-font ${rateShowType}`,
|
|
68
73
|
ref: this.tooltipRef
|
|
69
74
|
}), editable && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableToolTip.default, {
|
|
70
75
|
placement: "bottom",
|
package/lib/DTableIcon/index.js
CHANGED
|
@@ -5,32 +5,33 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
9
|
var _svgIcon = _interopRequireDefault(require("./svg-icon"));
|
|
11
10
|
require("./index.css");
|
|
12
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
12
|
const DTableIcon = _ref => {
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
ariaHidden =
|
|
19
|
-
getSvg
|
|
13
|
+
let {
|
|
14
|
+
className,
|
|
15
|
+
symbol,
|
|
16
|
+
color,
|
|
17
|
+
ariaHidden = false,
|
|
18
|
+
getSvg
|
|
19
|
+
} = _ref;
|
|
20
20
|
if (!symbol) return null;
|
|
21
21
|
if (symbol.includes('dtable-icon')) {
|
|
22
22
|
let customProps = {};
|
|
23
23
|
if (ariaHidden) {
|
|
24
24
|
customProps['aria-hidden'] = ariaHidden;
|
|
25
25
|
}
|
|
26
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("i",
|
|
26
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
27
27
|
className: (0, _classnames.default)(symbol, className, {
|
|
28
28
|
'dtable-font': !symbol.includes('dtable-font')
|
|
29
29
|
}),
|
|
30
30
|
style: {
|
|
31
31
|
color
|
|
32
|
-
}
|
|
33
|
-
|
|
32
|
+
},
|
|
33
|
+
...customProps
|
|
34
|
+
});
|
|
34
35
|
}
|
|
35
36
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgIcon.default, {
|
|
36
37
|
symbol: symbol,
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
10
|
let svgIconComponents = null;
|
|
@@ -26,11 +25,13 @@ const getSvgIconComponents = () => {
|
|
|
26
25
|
return svgIconComponents;
|
|
27
26
|
};
|
|
28
27
|
const SvgIcon = _ref => {
|
|
29
|
-
let
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
let {
|
|
29
|
+
className,
|
|
30
|
+
symbol,
|
|
31
|
+
color,
|
|
32
|
+
ariaHidden,
|
|
33
|
+
getSvg
|
|
34
|
+
} = _ref;
|
|
34
35
|
if (!symbol) return null;
|
|
35
36
|
let props = {
|
|
36
37
|
style: {
|
|
@@ -47,8 +48,9 @@ const SvgIcon = _ref => {
|
|
|
47
48
|
IconComponent = getSvg(symbol);
|
|
48
49
|
}
|
|
49
50
|
if (!IconComponent) return null;
|
|
50
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(IconComponent,
|
|
51
|
-
className: (0, _classnames.default)('multicolor-icon', className,
|
|
52
|
-
|
|
51
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(IconComponent, {
|
|
52
|
+
className: (0, _classnames.default)('multicolor-icon', className, `multicolor-icon-${symbol}`),
|
|
53
|
+
...props
|
|
54
|
+
});
|
|
53
55
|
};
|
|
54
56
|
var _default = exports.default = SvgIcon;
|
|
@@ -5,26 +5,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
var _reactstrap = require("reactstrap");
|
|
12
10
|
var _IconButton = _interopRequireDefault(require("../IconButton"));
|
|
13
11
|
require("./index.css");
|
|
14
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
const _excluded = ["children"];
|
|
16
13
|
const DTableModalHeader = _ref => {
|
|
17
|
-
let
|
|
18
|
-
|
|
14
|
+
let {
|
|
15
|
+
children,
|
|
16
|
+
...props
|
|
17
|
+
} = _ref;
|
|
19
18
|
const customCloseBtn = /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
|
|
20
19
|
icon: "x",
|
|
21
20
|
"aria-label": "Close",
|
|
22
21
|
onClick: props.toggle,
|
|
23
22
|
className: "modal-close-btn"
|
|
24
23
|
});
|
|
25
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.ModalHeader,
|
|
24
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.ModalHeader, {
|
|
25
|
+
...props,
|
|
26
26
|
close: customCloseBtn,
|
|
27
27
|
children: children
|
|
28
|
-
})
|
|
28
|
+
});
|
|
29
29
|
};
|
|
30
30
|
var _default = exports.default = DTableModalHeader;
|
|
@@ -18,9 +18,10 @@ class DTablePopover extends _react.default.Component {
|
|
|
18
18
|
this.props.hideDTablePopover(e);
|
|
19
19
|
};
|
|
20
20
|
this.onKeyDown = e => {
|
|
21
|
-
const
|
|
22
|
-
canHideDTablePopover
|
|
23
|
-
hideDTablePopoverWithEsc
|
|
21
|
+
const {
|
|
22
|
+
canHideDTablePopover,
|
|
23
|
+
hideDTablePopoverWithEsc
|
|
24
|
+
} = this.props;
|
|
24
25
|
if (e.keyCode === 27 && typeof hideDTablePopoverWithEsc === 'function') {
|
|
25
26
|
e.preventDefault();
|
|
26
27
|
hideDTablePopoverWithEsc();
|
|
@@ -31,7 +32,9 @@ class DTablePopover extends _react.default.Component {
|
|
|
31
32
|
}
|
|
32
33
|
};
|
|
33
34
|
this.onMousedown = e => {
|
|
34
|
-
const
|
|
35
|
+
const {
|
|
36
|
+
canHideDTablePopover
|
|
37
|
+
} = this.props;
|
|
35
38
|
if (!canHideDTablePopover) return;
|
|
36
39
|
if (this.dtablePopoverRef && e && (0, _utils.getEventClassName)(e).indexOf('popover') === -1 && !this.dtablePopoverRef.contains(e.target)) {
|
|
37
40
|
this.props.hideDTablePopover(e);
|
|
@@ -52,13 +55,14 @@ class DTablePopover extends _react.default.Component {
|
|
|
52
55
|
window.removeEventListener('popstate', this.onHistoryState);
|
|
53
56
|
}
|
|
54
57
|
render() {
|
|
55
|
-
const
|
|
56
|
-
target
|
|
57
|
-
innerClassName
|
|
58
|
-
popoverClassName
|
|
59
|
-
hideArrow
|
|
60
|
-
modifiers
|
|
61
|
-
placement
|
|
58
|
+
const {
|
|
59
|
+
target,
|
|
60
|
+
innerClassName,
|
|
61
|
+
popoverClassName,
|
|
62
|
+
hideArrow,
|
|
63
|
+
modifiers,
|
|
64
|
+
placement
|
|
65
|
+
} = this.props;
|
|
62
66
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.Popover, {
|
|
63
67
|
placement: placement,
|
|
64
68
|
isOpen: true,
|
|
@@ -66,7 +70,7 @@ class DTablePopover extends _react.default.Component {
|
|
|
66
70
|
fade: false,
|
|
67
71
|
hideArrow: hideArrow,
|
|
68
72
|
innerClassName: innerClassName,
|
|
69
|
-
className:
|
|
73
|
+
className: `dtable-popove ${popoverClassName}`,
|
|
70
74
|
modifiers: modifiers,
|
|
71
75
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
72
76
|
ref: ref => this.dtablePopoverRef = ref,
|