dtable-ui-component 6.0.91 → 6.0.93
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 +96 -70
- package/lib/ActivityIndicator/index.js +41 -33
- package/lib/AsyncUserSelect/index.css +122 -0
- package/lib/AsyncUserSelect/index.js +260 -0
- package/lib/AsyncUserSelect/user-item.js +55 -0
- package/lib/AutoNumberFormatter/index.js +5 -3
- package/lib/Badge/index.js +22 -18
- package/lib/ButtonFormatter/index.js +15 -10
- package/lib/CTimeFormatter/index.js +5 -3
- package/lib/CheckboxEditor/index.js +22 -13
- package/lib/CheckboxEditor/mb-editor.js +8 -6
- package/lib/CheckboxEditor/pc-editor.js +8 -6
- package/lib/CheckboxFormatter/index.js +8 -6
- package/lib/CollaboratorEditor/index.js +24 -15
- package/lib/CollaboratorEditor/mb-editor/index.js +19 -13
- package/lib/CollaboratorEditor/pc-editor/index.js +51 -43
- package/lib/CollaboratorFormatter/index.js +8 -7
- package/lib/CollaboratorItem/index.js +21 -16
- package/lib/CollapsibleSettingLayout/index.css +0 -5
- package/lib/CollapsibleSettingLayout/index.js +17 -12
- package/lib/Comment/body/comment.js +79 -63
- package/lib/Comment/body/index.js +14 -11
- package/lib/Comment/footer/btns/index.js +68 -53
- package/lib/Comment/footer/index.js +30 -28
- package/lib/Comment/footer/input/index.js +49 -44
- package/lib/Comment/footer/input/participant/index.js +19 -14
- package/lib/Comment/footer/participants/index.js +31 -28
- package/lib/Comment/footer/participants/participant/index.js +18 -15
- package/lib/Comment/footer/participants/participant-select/index.js +68 -57
- package/lib/Comment/index.js +33 -28
- package/lib/Comment/utils/utilities.js +1 -1
- package/lib/CreatorFormatter/index.js +8 -7
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +60 -35
- package/lib/DTableColorPicker/index.js +135 -99
- package/lib/DTableColorPicker/utils.js +1 -1
- package/lib/DTableCommonAddTool/index.js +11 -8
- package/lib/DTableCustomFooter/index.js +5 -3
- package/lib/DTableCustomizeCollaboratorSelect/index.css +1 -39
- package/lib/DTableCustomizeCollaboratorSelect/index.js +38 -32
- package/lib/DTableCustomizeSelect/index.js +51 -44
- package/lib/DTableEmptyTip/index.js +20 -16
- package/lib/DTableFiltersPopover/index.js +71 -61
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +74 -57
- package/lib/DTableFiltersPopover/utils/index.js +1 -1
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +64 -49
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +49 -41
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +57 -47
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +35 -31
- package/lib/DTableFiltersPopover/widgets/filter-group.js +38 -32
- package/lib/DTableFiltersPopover/widgets/filter-item.js +125 -106
- package/lib/DTableFiltersPopover/widgets/filter-list/index.css +1 -5
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +18 -17
- package/lib/DTableFiltersPopover/widgets/rate-item.js +12 -9
- package/lib/DTableGroupSelect/index.js +52 -44
- package/lib/DTableGroupSelect/option.js +5 -3
- package/lib/DTableGroupSelect/select-option-group.css +0 -37
- package/lib/DTableGroupSelect/select-option-group.js +31 -25
- package/lib/DTableModalHeader/index.js +13 -9
- package/lib/DTablePopover/index.js +9 -6
- package/lib/DTableRadio/index.js +20 -17
- package/lib/DTableRadioGroup/index.js +22 -19
- package/lib/DTableSearchInput/index.js +23 -19
- package/lib/DTableSelect/dtable-select-label.js +12 -7
- package/lib/DTableSelect/index.js +2 -1
- package/lib/DTableSelect/utils.js +34 -20
- package/lib/DTableSwitch/index.css +1 -2
- package/lib/DTableSwitch/index.js +30 -18
- package/lib/DateEditor/index.js +25 -16
- package/lib/DateEditor/mb-editor/index.js +90 -68
- package/lib/DateEditor/pc-editor.js +39 -35
- package/lib/DateFormatter/index.js +5 -3
- package/lib/DatePicker/utils.js +4 -4
- package/lib/DeleteTip/index.js +29 -20
- package/lib/DepartmentMultipleSelectEditor/index.js +57 -49
- package/lib/DepartmentSelectFilter/index.js +8 -1
- package/lib/DepartmentSingleSelectEditor/index.js +22 -13
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +75 -55
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +78 -61
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +14 -11
- package/lib/DepartmentSingleSelectFormatter/index.js +13 -10
- package/lib/DigitalSignEditor/index.js +22 -13
- package/lib/DigitalSignEditor/mb-editor/index.js +39 -24
- package/lib/DigitalSignEditor/pc-editor/index.js +44 -30
- package/lib/DigitalSignEditor/service.js +1 -1
- package/lib/DigitalSignEditor/signature-board/index.js +21 -17
- package/lib/DigitalSignFormatter/index.js +23 -19
- package/lib/DigitalSignFormatter/utils.js +1 -1
- package/lib/Drawer/index.js +4 -1
- package/lib/DurationEditor/index.js +2 -1
- package/lib/DurationFormatter/index.js +5 -3
- package/lib/EditEditorButton/index.js +5 -3
- package/lib/EmailEditor/index.js +2 -1
- package/lib/EmailFormatter/index.js +5 -3
- package/lib/FieldDisplaySetting/field-item.js +26 -20
- package/lib/FieldDisplaySetting/index.css +0 -6
- package/lib/FieldDisplaySetting/index.js +50 -41
- package/lib/FileEditor/files-previewer/index.js +22 -13
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +43 -28
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +24 -21
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +30 -24
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +13 -11
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +82 -64
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +81 -65
- package/lib/FileEditor/index.js +22 -13
- package/lib/FileEditor/mb-editor/index.js +43 -31
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +27 -20
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +108 -82
- package/lib/FileEditor/pc-editor/index.js +46 -36
- package/lib/FileFormatter/index.js +40 -36
- package/lib/FileItemFormatter/index.js +3 -2
- package/lib/FileUploader/index.js +23 -21
- package/lib/FormulaFormatter/index.js +24 -17
- package/lib/GeolocationEditor/index.js +31 -22
- package/lib/GeolocationEditor/map-editor-utils.js +2 -2
- package/lib/GeolocationEditor/mb-editor/country-editor.js +42 -27
- package/lib/GeolocationEditor/mb-editor/index.js +22 -14
- package/lib/GeolocationEditor/mb-editor/location-editor.js +54 -34
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +102 -74
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +144 -110
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +42 -27
- package/lib/GeolocationEditor/mb-editor/province-editor.js +42 -27
- package/lib/GeolocationEditor/pc-editor/country-editor.js +38 -31
- package/lib/GeolocationEditor/pc-editor/index.js +26 -17
- package/lib/GeolocationEditor/pc-editor/location-editor.js +122 -96
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +99 -74
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +99 -76
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +139 -94
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +122 -85
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +89 -69
- package/lib/GeolocationEditor/pc-editor/province-editor.js +31 -26
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +9 -5
- package/lib/GeolocationEditor/pc-editor/selector-list.js +15 -13
- package/lib/GeolocationFormatter/index.js +5 -3
- package/lib/HtmlLongTextFormatter/index.js +3 -2
- package/lib/Icon/index.js +9 -6
- package/lib/Icon/load-sprite.js +13 -2
- package/lib/IconButton/index.js +9 -6
- package/lib/ImageEditor/images-previewer/image-preview/index.js +53 -45
- package/lib/ImageEditor/images-previewer/index.js +35 -32
- package/lib/ImageEditor/index.js +22 -13
- package/lib/ImageEditor/mb-editor/index.js +43 -31
- package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +19 -15
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +32 -24
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +102 -77
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +33 -30
- package/lib/ImageEditor/pc-editor/index.js +44 -32
- package/lib/ImageFormatter/images-lazy-load.js +12 -10
- package/lib/ImageFormatter/index.js +40 -34
- package/lib/ImagePreviewerLightbox/index.js +12 -8
- package/lib/ImageThumbnail/index.js +47 -39
- package/lib/InputItem/custom-input.js +32 -27
- package/lib/InputItem/custom-keyboard.js +68 -47
- package/lib/InputItem/index.js +81 -71
- package/lib/InputItem/input.js +5 -3
- package/lib/LastModifierFormatter/index.js +8 -7
- package/lib/LinkEditor/index.js +38 -32
- package/lib/LinkEditor/link-editor-option.js +25 -20
- package/lib/LinkEditor/mb-popover/index.js +53 -41
- package/lib/LinkEditor/pc-popover/index.js +41 -33
- package/lib/LinkFormatter/index.js +13 -10
- package/lib/List/index.js +15 -9
- package/lib/List/list-item.js +51 -42
- package/lib/Loading/index.js +2 -1
- package/lib/LongTextFormatter/index.js +3 -2
- package/lib/MBEditorHeader/index.js +19 -14
- package/lib/MTimeFormatter/index.js +5 -3
- package/lib/MobileFullScreenPage/body/index.js +6 -4
- package/lib/MobileFullScreenPage/header/index.js +22 -17
- package/lib/MobileFullScreenPage/index.js +11 -8
- package/lib/MobileModal/index.js +6 -3
- package/lib/MobileOperationSheet/index.js +28 -18
- package/lib/MobileSelector/empty/index.js +5 -3
- package/lib/MobileSelector/index.js +18 -12
- package/lib/MobileSelector/option/index.js +17 -12
- package/lib/MobileSelector/options/index.js +5 -3
- package/lib/MobileSelector/search/index.js +10 -8
- package/lib/MobileUpload/index.js +87 -67
- package/lib/Modal/alert.js +9 -6
- package/lib/Modal/modal.js +26 -22
- package/lib/Modal/operation.js +2 -1
- package/lib/Modal/prompt.js +76 -56
- package/lib/MultipleSelectEditor/index.js +4 -2
- package/lib/MultipleSelectFormatter/index.js +8 -7
- package/lib/NotificationPopover/index.js +43 -32
- package/lib/NumberEditor/index.js +2 -1
- package/lib/NumberFormatter/index.js +5 -3
- package/lib/Picker/AbstractPicker.js +26 -22
- package/lib/Picker/index.js +2 -1
- package/lib/Popover/index.js +8 -5
- package/lib/Popover/item.js +26 -19
- package/lib/Progress/index.js +17 -15
- package/lib/Radio/Radio.js +12 -8
- package/lib/Radio/RadioItem.js +11 -5
- package/lib/RateFormatter/index.js +8 -7
- package/lib/RoleStatusEditor/index.js +36 -31
- package/lib/RowExpand/index.js +16 -9
- package/lib/RowExpandDialog/body/index.js +53 -42
- package/lib/RowExpandDialog/column-content/index.js +34 -25
- package/lib/RowExpandDialog/header/index.js +29 -22
- package/lib/RowExpandDialog/index.js +43 -30
- package/lib/RowExpandEditor/add-btn/index.js +16 -9
- package/lib/RowExpandEditor/add-btn/mb-add-btn/index.js +5 -3
- package/lib/RowExpandEditor/add-btn/pc-add-btn/index.js +8 -5
- package/lib/RowExpandEditor/checkbox-editor/index.js +16 -9
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +10 -8
- package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +2 -1
- package/lib/RowExpandEditor/collaborator-editor/index.js +16 -9
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +19 -17
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +52 -47
- package/lib/RowExpandEditor/date-editor/index.js +16 -9
- package/lib/RowExpandEditor/date-editor/mb-editor.js +20 -15
- package/lib/RowExpandEditor/date-editor/pc-editor.js +24 -21
- package/lib/RowExpandEditor/department-editor/index.js +16 -9
- package/lib/RowExpandEditor/department-editor/mb-editor.js +27 -22
- package/lib/RowExpandEditor/department-editor/pc-editor.js +35 -29
- package/lib/RowExpandEditor/digital-sign-editor/index.js +16 -9
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +19 -16
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +34 -32
- package/lib/RowExpandEditor/duration-editor/index.js +16 -9
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +15 -12
- package/lib/RowExpandEditor/duration-editor/pc-editor.js +17 -13
- package/lib/RowExpandEditor/email-editor/index.js +16 -9
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +20 -18
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +21 -19
- package/lib/RowExpandEditor/file-editor/index.js +16 -9
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +21 -16
- package/lib/RowExpandEditor/file-editor/pc-editor/index.js +22 -20
- package/lib/RowExpandEditor/geolocation-editor/index.js +16 -9
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +12 -9
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +20 -17
- package/lib/RowExpandEditor/image-editor/index.js +16 -9
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +21 -16
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +29 -25
- package/lib/RowExpandEditor/index.js +4 -2
- package/lib/RowExpandEditor/long-text-editor/index.js +16 -9
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +27 -16
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +19 -16
- package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +22 -18
- package/lib/RowExpandEditor/multiple-select-editor/index.js +16 -9
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +26 -23
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +82 -68
- package/lib/RowExpandEditor/number-editor/index.js +16 -9
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +10 -7
- package/lib/RowExpandEditor/number-editor/pc-editor.js +6 -4
- package/lib/RowExpandEditor/rate-editor/index.js +16 -9
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +10 -8
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +12 -10
- package/lib/RowExpandEditor/right-angle/index.js +8 -6
- package/lib/RowExpandEditor/single-select-editor/index.js +16 -9
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +30 -23
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +43 -35
- package/lib/RowExpandEditor/text-editor/index.js +16 -9
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +11 -9
- package/lib/RowExpandEditor/text-editor/pc-editor/index.js +16 -12
- package/lib/RowExpandEditor/url-editor/index.js +16 -9
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +20 -18
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +21 -19
- package/lib/RowExpandFormatter/department-formatter/index.js +14 -5
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +2 -1
- package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +15 -11
- package/lib/RowExpandFormatter/email-formatter/index.js +12 -9
- package/lib/RowExpandFormatter/file-formatter/index.js +15 -14
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +43 -36
- package/lib/RowExpandFormatter/formula-formatter/index.js +41 -33
- package/lib/RowExpandFormatter/image-formatter/index.js +30 -27
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +47 -39
- package/lib/RowExpandFormatter/index.js +132 -115
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +3 -2
- package/lib/RowExpandFormatter/link-formatter/index.js +70 -67
- package/lib/RowExpandFormatter/rate-formatter/index.js +8 -7
- package/lib/RowExpandFormatter/url-formatter/index.js +12 -9
- package/lib/RowExpandView/body/index.js +39 -33
- package/lib/RowExpandView/column-content/index.js +10 -5
- package/lib/RowExpandView/index.js +27 -16
- package/lib/SelectItem/index.js +16 -12
- package/lib/SelectOptionGroup/index.css +4 -2
- package/lib/SelectOptionGroup/index.js +39 -32
- package/lib/SelectOptionGroup/option.js +5 -3
- package/lib/SelectedDepartments/index.js +54 -44
- package/lib/SimpleLongTextFormatter/index.js +39 -30
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +11 -8
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +3 -2
- package/lib/SingleSelectEditor/index.js +4 -2
- package/lib/SingleSelectFormatter/index.js +6 -4
- package/lib/SvgIcon/index.js +5 -2
- package/lib/TabBar/Tab.js +28 -21
- package/lib/TabBar/index.js +28 -24
- package/lib/Tabs/index.js +8 -5
- package/lib/TextEditor/index.js +21 -18
- package/lib/TextFormatter/index.js +5 -3
- package/lib/TextareaItem/index.js +49 -40
- package/lib/Toast/index.js +20 -14
- package/lib/UploadProgress/index.js +2 -1
- package/lib/UrlEditor/index.js +2 -1
- package/lib/UrlFormatter/index.js +5 -3
- package/lib/formatterConfig/base-formatter-config.js +24 -23
- package/lib/formatterConfig/index.js +3 -2
- package/lib/index.js +7 -0
- package/lib/locales/de.json +5 -1
- package/lib/locales/en.json +5 -1
- package/lib/locales/es.json +6 -2
- package/lib/locales/fr.json +5 -1
- package/lib/locales/pt.json +5 -1
- package/lib/locales/ru.json +5 -1
- package/lib/locales/zh-CN.json +5 -1
- package/lib/select-editor/index.js +22 -13
- package/lib/select-editor/mb-editor/index.js +22 -16
- package/lib/select-editor/pc-editor/index.js +75 -61
- package/lib/toaster/alert.js +25 -16
- package/lib/toaster/toast.js +27 -23
- package/lib/toaster/toastManager.js +17 -14
- package/lib/toaster/toaster.js +4 -1
- package/lib/utils/class.js +3 -3
- package/lib/utils/object-utils.js +1 -1
- package/lib/utils/url.js +4 -4
- package/package.json +13 -29
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
require("./index.css");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
11
|
class DTableEmptyTip extends _react.default.Component {
|
|
11
12
|
render() {
|
|
12
13
|
const {
|
|
@@ -14,22 +15,25 @@ class DTableEmptyTip extends _react.default.Component {
|
|
|
14
15
|
title,
|
|
15
16
|
type
|
|
16
17
|
} = this.props;
|
|
17
|
-
return /*#__PURE__*/
|
|
18
|
-
className: "empty-tip"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
18
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
19
|
+
className: "empty-tip",
|
|
20
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
21
|
+
src: this.props.src,
|
|
22
|
+
alt: "",
|
|
23
|
+
width: "100",
|
|
24
|
+
height: "100",
|
|
25
|
+
className: "no-items-img-tip"
|
|
26
|
+
}), title && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
27
|
+
className: "empty-tip-title",
|
|
28
|
+
children: title
|
|
29
|
+
}), text && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
30
|
+
className: "empty-tip-text",
|
|
31
|
+
style: {
|
|
32
|
+
color: type === 'error' ? 'red' : '#666'
|
|
33
|
+
},
|
|
34
|
+
children: text
|
|
35
|
+
}), this.props.children && this.props.children]
|
|
36
|
+
});
|
|
33
37
|
}
|
|
34
38
|
}
|
|
35
39
|
var _default = exports.default = DTableEmptyTip;
|
|
@@ -16,6 +16,7 @@ var _DTablePopover = _interopRequireDefault(require("../DTablePopover"));
|
|
|
16
16
|
var _constants = require("./constants");
|
|
17
17
|
var _lang = require("../lang");
|
|
18
18
|
require("./index.css");
|
|
19
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
20
|
/**
|
|
20
21
|
* filter data structure
|
|
21
22
|
* let filter = {
|
|
@@ -24,8 +25,7 @@ require("./index.css");
|
|
|
24
25
|
* filter_term: '',
|
|
25
26
|
* filter_term_modifier: '',
|
|
26
27
|
* }
|
|
27
|
-
*/
|
|
28
|
-
class DTableFiltersPopover extends _react.Component {
|
|
28
|
+
*/class DTableFiltersPopover extends _react.Component {
|
|
29
29
|
constructor(props) {
|
|
30
30
|
super(props);
|
|
31
31
|
this.updateFilters = _ref => {
|
|
@@ -131,70 +131,80 @@ class DTableFiltersPopover extends _react.Component {
|
|
|
131
131
|
filterConjunction
|
|
132
132
|
} = this.state;
|
|
133
133
|
const canAddFilter = columns.length > 0;
|
|
134
|
-
return /*#__PURE__*/
|
|
134
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTablePopover.default, {
|
|
135
135
|
target: target,
|
|
136
136
|
placement: placement,
|
|
137
137
|
popoverClassName: "dtable-ui-filter-popover",
|
|
138
138
|
hideDTablePopover: this.props.hidePopover,
|
|
139
139
|
hideDTablePopoverWithEsc: this.props.hidePopover,
|
|
140
|
-
boundariesElement: document.body
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
140
|
+
boundariesElement: document.body,
|
|
141
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
142
|
+
ref: ref => this.dtablePopoverRef = ref,
|
|
143
|
+
onClick: this.onPopoverInsideClick,
|
|
144
|
+
className: this.props.className,
|
|
145
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_filterList.default, {
|
|
146
|
+
isInModal: true,
|
|
147
|
+
filterConjunction: filterConjunction,
|
|
148
|
+
filters: filters,
|
|
149
|
+
columns: columns,
|
|
150
|
+
emptyPlaceholder: (0, _lang.getLocale)('No_filters'),
|
|
151
|
+
collaborators: this.props.collaborators,
|
|
152
|
+
readOnly: readOnly,
|
|
153
|
+
userDepartmentIdsMap: userDepartmentIdsMap,
|
|
154
|
+
departments: departments,
|
|
155
|
+
lang: lang,
|
|
156
|
+
firstDayOfWeek: firstDayOfWeek,
|
|
157
|
+
updateFilters: this.updateFilters
|
|
158
|
+
}), !isSupportAdvanced && !readOnly && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableCommonAddTool.default, {
|
|
159
|
+
className: `popover-add-tool ${canAddFilter ? '' : 'disabled'}`,
|
|
160
|
+
callBack: canAddFilter ? () => this.addFilter() : () => {},
|
|
161
|
+
footerName: (0, _lang.getLocale)('Add_filter'),
|
|
162
|
+
addIconClassName: "popover-add-icon"
|
|
163
|
+
}), isSupportAdvanced && !readOnly && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
164
|
+
className: "add-buttons",
|
|
165
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
166
|
+
className: "btn-add-filter mr-4",
|
|
167
|
+
onClick: canAddFilter ? () => this.addFilter() : () => {},
|
|
168
|
+
role: "button",
|
|
169
|
+
tabIndex: 0,
|
|
170
|
+
"aria-label": (0, _lang.getLocale)('Add_filter'),
|
|
171
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
172
|
+
"aria-hidden": "true",
|
|
173
|
+
className: "dtable-font dtable-icon-add-table popover-add-icon"
|
|
174
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
175
|
+
className: "add-new-option",
|
|
176
|
+
children: (0, _lang.getLocale)('Add_filter')
|
|
177
|
+
})]
|
|
178
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
179
|
+
className: "btn-add-filter-group",
|
|
180
|
+
onClick: canAddFilter ? () => this.addFilterGroup() : () => {},
|
|
181
|
+
role: "button",
|
|
182
|
+
tabIndex: 0,
|
|
183
|
+
"aria-label": (0, _lang.getLocale)('Add_filter_group'),
|
|
184
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
185
|
+
"aria-hidden": "true",
|
|
186
|
+
className: "dtable-font dtable-icon-add-table popover-add-icon"
|
|
187
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
188
|
+
className: "add-new-option",
|
|
189
|
+
children: (0, _lang.getLocale)('Add_filter_group')
|
|
190
|
+
})]
|
|
191
|
+
})]
|
|
192
|
+
}), this.isNeedSubmit && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
193
|
+
className: "filter-popover-footer",
|
|
194
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.Button, {
|
|
195
|
+
disabled: readOnly,
|
|
196
|
+
className: "mr-2",
|
|
197
|
+
onClick: this.onClosePopover,
|
|
198
|
+
children: (0, _lang.getLocale)('Cancel')
|
|
199
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.Button, {
|
|
200
|
+
disabled: this.state.isSubmitDisabled || readOnly,
|
|
201
|
+
color: "primary",
|
|
202
|
+
onClick: this.onSubmitFilters,
|
|
203
|
+
children: (0, _lang.getLocale)('Submit')
|
|
204
|
+
})]
|
|
205
|
+
})]
|
|
206
|
+
})
|
|
207
|
+
});
|
|
198
208
|
}
|
|
199
209
|
}
|
|
200
210
|
DTableFiltersPopover.defaultProps = {
|
|
@@ -8,6 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _dtableUtils = require("dtable-utils");
|
|
10
10
|
var _lang = require("../../lang");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
class FilterItemUtils {
|
|
12
13
|
static generatorColumnOption(column) {
|
|
13
14
|
if (!column) return null;
|
|
@@ -19,15 +20,19 @@ class FilterItemUtils {
|
|
|
19
20
|
value: {
|
|
20
21
|
column
|
|
21
22
|
},
|
|
22
|
-
label: /*#__PURE__*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
24
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
25
|
+
className: "filter-header-icon",
|
|
26
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
27
|
+
className: _dtableUtils.COLUMNS_ICON_CONFIG[type]
|
|
28
|
+
})
|
|
29
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
30
|
+
className: "select-option-name",
|
|
31
|
+
title: name,
|
|
32
|
+
"aria-label": name,
|
|
33
|
+
children: name
|
|
34
|
+
})]
|
|
35
|
+
})
|
|
31
36
|
};
|
|
32
37
|
}
|
|
33
38
|
static generatorPredicateOption(filterPredicate) {
|
|
@@ -35,9 +40,10 @@ class FilterItemUtils {
|
|
|
35
40
|
value: {
|
|
36
41
|
filterPredicate
|
|
37
42
|
},
|
|
38
|
-
label: /*#__PURE__*/
|
|
39
|
-
className: "select-option-name"
|
|
40
|
-
|
|
43
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
44
|
+
className: "select-option-name",
|
|
45
|
+
children: (0, _lang.getLocale)(filterPredicate)
|
|
46
|
+
})
|
|
41
47
|
};
|
|
42
48
|
}
|
|
43
49
|
static generatorTermModifierOption(filterTermModifier) {
|
|
@@ -68,9 +74,10 @@ class FilterItemUtils {
|
|
|
68
74
|
value: {
|
|
69
75
|
filterTermModifier
|
|
70
76
|
},
|
|
71
|
-
label: /*#__PURE__*/
|
|
72
|
-
className: "select-option-name"
|
|
73
|
-
|
|
77
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
78
|
+
className: "select-option-name",
|
|
79
|
+
children: FILTER_TERM_MODIFIER_SHOW[filterTermModifier]
|
|
80
|
+
})
|
|
74
81
|
};
|
|
75
82
|
}
|
|
76
83
|
static generatorSingleSelectOption(option, selectedOption) {
|
|
@@ -78,21 +85,24 @@ class FilterItemUtils {
|
|
|
78
85
|
value: {
|
|
79
86
|
columnOption: option
|
|
80
87
|
},
|
|
81
|
-
label: /*#__PURE__*/
|
|
82
|
-
className: "select-option-name single-select-option-name"
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
89
|
+
className: "select-option-name single-select-option-name",
|
|
90
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
91
|
+
className: "single-select-option",
|
|
92
|
+
style: {
|
|
93
|
+
background: option.color,
|
|
94
|
+
color: option.textColor || null
|
|
95
|
+
},
|
|
96
|
+
title: option.name,
|
|
97
|
+
"aria-label": option.name,
|
|
98
|
+
children: option.name
|
|
99
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
100
|
+
className: "single-select-check-icon",
|
|
101
|
+
children: (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.id) === option.id && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
102
|
+
className: "option-edit dtable-font dtable-icon-check-mark"
|
|
103
|
+
})
|
|
104
|
+
})]
|
|
105
|
+
})
|
|
96
106
|
};
|
|
97
107
|
}
|
|
98
108
|
static generatorMultipleSelectOption(option, filterTerm) {
|
|
@@ -100,21 +110,24 @@ class FilterItemUtils {
|
|
|
100
110
|
value: {
|
|
101
111
|
columnOption: option
|
|
102
112
|
},
|
|
103
|
-
label: /*#__PURE__*/
|
|
104
|
-
className: "select-option-name multiple-option-name"
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
113
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
114
|
+
className: "select-option-name multiple-option-name",
|
|
115
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
116
|
+
className: "multiple-select-option",
|
|
117
|
+
style: {
|
|
118
|
+
background: option.color,
|
|
119
|
+
color: option.textColor
|
|
120
|
+
},
|
|
121
|
+
title: option.name,
|
|
122
|
+
"aria-label": option.name,
|
|
123
|
+
children: option.name
|
|
124
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
125
|
+
className: "multiple-check-icon",
|
|
126
|
+
children: filterTerm.indexOf(option.id) > -1 && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
127
|
+
className: "option-edit dtable-font dtable-icon-check-mark"
|
|
128
|
+
})
|
|
129
|
+
})]
|
|
130
|
+
})
|
|
118
131
|
};
|
|
119
132
|
}
|
|
120
133
|
static generatorConjunctionOptions() {
|
|
@@ -122,16 +135,18 @@ class FilterItemUtils {
|
|
|
122
135
|
value: {
|
|
123
136
|
filterConjunction: 'And'
|
|
124
137
|
},
|
|
125
|
-
label: /*#__PURE__*/
|
|
126
|
-
className: "select-option-name"
|
|
127
|
-
|
|
138
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
139
|
+
className: "select-option-name",
|
|
140
|
+
children: (0, _lang.getLocale)('And')
|
|
141
|
+
})
|
|
128
142
|
}, {
|
|
129
143
|
value: {
|
|
130
144
|
filterConjunction: 'Or'
|
|
131
145
|
},
|
|
132
|
-
label: /*#__PURE__*/
|
|
133
|
-
className: "select-option-name"
|
|
134
|
-
|
|
146
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
147
|
+
className: "select-option-name",
|
|
148
|
+
children: (0, _lang.getLocale)('Or')
|
|
149
|
+
})
|
|
135
150
|
}];
|
|
136
151
|
}
|
|
137
152
|
static getActiveConjunctionOption(conjunction) {
|
|
@@ -140,18 +155,20 @@ class FilterItemUtils {
|
|
|
140
155
|
value: {
|
|
141
156
|
filterConjunction: 'And'
|
|
142
157
|
},
|
|
143
|
-
label: /*#__PURE__*/
|
|
144
|
-
className: "select-option-name"
|
|
145
|
-
|
|
158
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
159
|
+
className: "select-option-name",
|
|
160
|
+
children: (0, _lang.getLocale)('And')
|
|
161
|
+
})
|
|
146
162
|
};
|
|
147
163
|
}
|
|
148
164
|
return {
|
|
149
165
|
value: {
|
|
150
166
|
filterConjunction: 'Or'
|
|
151
167
|
},
|
|
152
|
-
label: /*#__PURE__*/
|
|
153
|
-
className: "select-option-name"
|
|
154
|
-
|
|
168
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
169
|
+
className: "select-option-name",
|
|
170
|
+
children: (0, _lang.getLocale)('Or')
|
|
171
|
+
})
|
|
155
172
|
};
|
|
156
173
|
}
|
|
157
174
|
}
|
|
@@ -382,7 +382,7 @@ const getMediaUrl = () => {
|
|
|
382
382
|
};
|
|
383
383
|
const generateDefaultUser = name => {
|
|
384
384
|
const mediaUrl = getMediaUrl();
|
|
385
|
-
const defaultAvatarUrl =
|
|
385
|
+
const defaultAvatarUrl = `${mediaUrl}avatars/default.png`;
|
|
386
386
|
return {
|
|
387
387
|
name,
|
|
388
388
|
email: name,
|
|
@@ -10,6 +10,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _dtableUtils = require("dtable-utils");
|
|
11
11
|
var _DTableCustomizeSelect = _interopRequireDefault(require("../../../DTableCustomizeSelect"));
|
|
12
12
|
var _lang = require("../../../lang");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
class CollaboratorFilter extends _react.Component {
|
|
14
15
|
constructor(props) {
|
|
15
16
|
super(props);
|
|
@@ -21,30 +22,38 @@ class CollaboratorFilter extends _react.Component {
|
|
|
21
22
|
filterIndex,
|
|
22
23
|
columnOption: collaborator
|
|
23
24
|
},
|
|
24
|
-
label: /*#__PURE__*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
25
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Fragment, {
|
|
26
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
27
|
+
className: "select-option-name option-collaborator",
|
|
28
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
29
|
+
className: "collaborator-container",
|
|
30
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
31
|
+
className: "collaborator",
|
|
32
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
33
|
+
className: "collaborator-avatar-container",
|
|
34
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
35
|
+
className: "collaborator-avatar",
|
|
36
|
+
alt: collaborator.name,
|
|
37
|
+
src: collaborator.avatar_url
|
|
38
|
+
})
|
|
39
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
40
|
+
className: "collaborator-name text-truncate",
|
|
41
|
+
style: {
|
|
42
|
+
maxWidth: '200px'
|
|
43
|
+
},
|
|
44
|
+
title: collaborator.name,
|
|
45
|
+
"aria-label": collaborator.name,
|
|
46
|
+
children: collaborator.name
|
|
47
|
+
})]
|
|
48
|
+
})
|
|
49
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
50
|
+
className: "collaborator-check-icon",
|
|
51
|
+
children: isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
52
|
+
className: "option-edit dtable-font dtable-icon-check-mark"
|
|
53
|
+
})
|
|
54
|
+
})]
|
|
55
|
+
})
|
|
56
|
+
})
|
|
48
57
|
};
|
|
49
58
|
});
|
|
50
59
|
};
|
|
@@ -70,35 +79,41 @@ class CollaboratorFilter extends _react.Component {
|
|
|
70
79
|
let selectedCollaborators = Array.isArray(filterTerm) && filterTerm.length > 0 && filterTerm.map(item => {
|
|
71
80
|
let collaborator = collaborators.find(c => c.email === item);
|
|
72
81
|
if (!collaborator) return null;
|
|
73
|
-
return /*#__PURE__*/
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
82
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
83
|
+
className: "collaborator",
|
|
84
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
85
|
+
className: "collaborator-avatar-container",
|
|
86
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
87
|
+
className: "collaborator-avatar",
|
|
88
|
+
alt: collaborator.name,
|
|
89
|
+
src: collaborator.avatar_url
|
|
90
|
+
})
|
|
91
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
92
|
+
className: "collaborator-name text-truncate",
|
|
93
|
+
title: collaborator.name,
|
|
94
|
+
"aria-label": collaborator.name,
|
|
95
|
+
children: collaborator.name
|
|
96
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
97
|
+
className: "remove-container",
|
|
98
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
99
|
+
className: "remove-icon",
|
|
100
|
+
onClick: e => {
|
|
101
|
+
this.onClick(e, collaborator);
|
|
102
|
+
},
|
|
103
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
104
|
+
className: "dtable-font dtable-icon-fork-number"
|
|
105
|
+
})
|
|
106
|
+
})
|
|
107
|
+
})]
|
|
108
|
+
}, item);
|
|
96
109
|
});
|
|
97
110
|
let value = selectedCollaborators ? {
|
|
98
|
-
label: /*#__PURE__*/
|
|
111
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
112
|
+
children: selectedCollaborators
|
|
113
|
+
})
|
|
99
114
|
} : {};
|
|
100
115
|
let options = Array.isArray(filterTerm) ? this.createCollaboratorOptions(filterIndex, collaborators, filterTerm) : [];
|
|
101
|
-
return /*#__PURE__*/
|
|
116
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableCustomizeSelect.default, {
|
|
102
117
|
className: "dtable-ui-collaborator-selector",
|
|
103
118
|
value: value,
|
|
104
119
|
onSelectOption: this.props.onSelectCollaborator,
|