dtable-ui-component 6.0.49 → 6.0.50
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 +94 -68
- package/lib/ActivityIndicator/index.js +36 -28
- 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 +12 -8
- 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 +7 -5
- package/lib/CheckboxEditor/pc-editor.js +7 -5
- package/lib/CheckboxFormatter/index.js +7 -5
- package/lib/CollaboratorEditor/index.js +24 -15
- package/lib/CollaboratorEditor/mb-editor/index.js +19 -13
- package/lib/CollaboratorEditor/pc-editor/index.js +50 -42
- package/lib/CollaboratorFormatter/index.js +8 -7
- package/lib/CollaboratorItem/index.js +21 -16
- package/lib/CollapsibleSettingLayout/index.js +17 -12
- package/lib/Comment/body/comment.js +78 -62
- package/lib/Comment/body/index.js +14 -11
- package/lib/Comment/footer/btns/index.js +68 -53
- package/lib/Comment/footer/index.js +29 -27
- package/lib/Comment/footer/input/index.js +44 -39
- package/lib/Comment/footer/input/participant/index.js +18 -13
- 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 +66 -55
- package/lib/Comment/index.js +33 -28
- package/lib/CreatorFormatter/index.js +8 -7
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +5 -3
- package/lib/DTableColorPicker/index.js +135 -99
- package/lib/DTableCommonAddTool/index.js +10 -7
- package/lib/DTableCustomFooter/index.js +5 -3
- 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/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.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.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 +21 -18
- package/lib/DTableSearchInput/index.js +22 -18
- 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.js +25 -17
- package/lib/DateEditor/index.js +25 -16
- package/lib/DateEditor/mb-editor/index.js +90 -68
- package/lib/DateEditor/pc-editor.js +38 -34
- package/lib/DateFormatter/index.js +5 -3
- 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 -9
- 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/signature-board/index.js +19 -15
- package/lib/DigitalSignFormatter/index.js +23 -19
- 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 +25 -19
- package/lib/FieldDisplaySetting/index.js +47 -38
- 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 +81 -63
- 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 +107 -81
- package/lib/FileEditor/pc-editor/index.js +46 -36
- package/lib/FileFormatter/index.js +40 -36
- package/lib/FileItemFormatter/index.js +2 -1
- package/lib/FileUploader/index.js +22 -20
- package/lib/FormulaFormatter/index.js +21 -14
- package/lib/GeolocationEditor/index.js +28 -19
- 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 +37 -30
- package/lib/GeolocationEditor/pc-editor/index.js +26 -17
- package/lib/GeolocationEditor/pc-editor/location-editor.js +121 -95
- 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 +119 -91
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +102 -82
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +89 -69
- package/lib/GeolocationEditor/pc-editor/province-editor.js +30 -25
- 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 +2 -1
- package/lib/Icon/index.js +8 -5
- package/lib/IconButton/index.js +9 -6
- package/lib/ImageEditor/images-previewer/image-preview/index.js +52 -44
- 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 +101 -76
- 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 +46 -38
- package/lib/InputItem/custom-input.js +23 -18
- package/lib/InputItem/custom-keyboard.js +65 -44
- package/lib/InputItem/index.js +66 -56
- 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 +32 -23
- 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 +5 -3
- package/lib/MobileFullScreenPage/header/index.js +21 -16
- 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 +8 -5
- package/lib/Modal/modal.js +19 -15
- package/lib/Modal/operation.js +2 -1
- package/lib/Modal/prompt.js +74 -54
- 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 +22 -15
- package/lib/Progress/index.js +12 -10
- package/lib/Radio/Radio.js +11 -7
- package/lib/Radio/RadioItem.js +9 -3
- package/lib/RateFormatter/index.js +7 -6
- package/lib/RoleStatusEditor/index.js +36 -31
- package/lib/RowExpand/index.js +16 -9
- package/lib/RowExpandDialog/body/index.js +52 -41
- package/lib/RowExpandDialog/column-content/index.js +34 -25
- package/lib/RowExpandDialog/header/index.js +28 -21
- package/lib/RowExpandDialog/index.js +40 -27
- 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 +19 -17
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +20 -18
- 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 +81 -67
- 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 +11 -9
- 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 +42 -34
- 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 +19 -17
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +20 -18
- 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 +11 -8
- 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 +37 -29
- 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 +131 -114
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +2 -1
- package/lib/RowExpandFormatter/link-formatter/index.js +70 -67
- package/lib/RowExpandFormatter/rate-formatter/index.js +7 -6
- package/lib/RowExpandFormatter/url-formatter/index.js +11 -8
- package/lib/RowExpandView/body/index.js +38 -32
- 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.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 +4 -1
- package/lib/TabBar/Tab.js +27 -20
- package/lib/TabBar/index.js +25 -21
- 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 +35 -26
- package/lib/Toast/index.js +16 -10
- 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 +74 -60
- package/lib/toaster/alert.js +25 -16
- package/lib/toaster/toast.js +27 -23
- package/lib/toaster/toastManager.js +16 -13
- package/lib/toaster/toaster.js +2 -1
- package/package.json +2 -2
|
@@ -25,6 +25,7 @@ var _utils = require("../utils");
|
|
|
25
25
|
var _constants = require("../constants");
|
|
26
26
|
var _columnUtils = require("../../utils/column-utils");
|
|
27
27
|
var _lang = require("../../lang");
|
|
28
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
28
29
|
class FilterItem extends _react.default.Component {
|
|
29
30
|
constructor(_props) {
|
|
30
31
|
var _this;
|
|
@@ -244,7 +245,7 @@ class FilterItem extends _react.default.Component {
|
|
|
244
245
|
filterTerm
|
|
245
246
|
} = this.state;
|
|
246
247
|
if (type === _constants.INPUT_CMP_TYPE_MAP.TEXT) {
|
|
247
|
-
return /*#__PURE__*/
|
|
248
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableSearchInput.default, {
|
|
248
249
|
value: filterTerm,
|
|
249
250
|
onChange: this.onFilterTermTextChanged,
|
|
250
251
|
autoFocus: false,
|
|
@@ -252,18 +253,19 @@ class FilterItem extends _react.default.Component {
|
|
|
252
253
|
disabled: readOnly
|
|
253
254
|
});
|
|
254
255
|
} else if (type === _constants.INPUT_CMP_TYPE_MAP.CHECKBOX) {
|
|
255
|
-
return /*#__PURE__*/
|
|
256
|
-
className: "checkbox-filter-term"
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
256
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
257
|
+
className: "checkbox-filter-term",
|
|
258
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CheckboxEditor.default, {
|
|
259
|
+
ref: ref => this.checkboxEditor = ref,
|
|
260
|
+
column: filterColumn,
|
|
261
|
+
value: filterTerm,
|
|
262
|
+
className: "dtable-ui-filter-item-checkbox",
|
|
263
|
+
onChange: this.onFilterTermCheckboxChanged,
|
|
264
|
+
readOnly: readOnly
|
|
265
|
+
})
|
|
266
|
+
});
|
|
265
267
|
} else if (type === _constants.INPUT_CMP_TYPE_MAP.NUMBER) {
|
|
266
|
-
return /*#__PURE__*/
|
|
268
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_NumberEditor.default, {
|
|
267
269
|
ref: ref => this.numberEditor = ref,
|
|
268
270
|
column: filterColumn,
|
|
269
271
|
value: filterTerm,
|
|
@@ -271,7 +273,7 @@ class FilterItem extends _react.default.Component {
|
|
|
271
273
|
readOnly: readOnly
|
|
272
274
|
});
|
|
273
275
|
} else if (type === _constants.INPUT_CMP_TYPE_MAP.DURATION) {
|
|
274
|
-
return /*#__PURE__*/
|
|
276
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DurationEditor.default, {
|
|
275
277
|
ref: ref => this.durationEditor = ref,
|
|
276
278
|
className: "filter-popover-duration-editor",
|
|
277
279
|
isInModal: isInModal,
|
|
@@ -299,7 +301,7 @@ class FilterItem extends _react.default.Component {
|
|
|
299
301
|
case 1:
|
|
300
302
|
{
|
|
301
303
|
const activeConjunction = _filterItemUtils.default.getActiveConjunctionOption(filterConjunction);
|
|
302
|
-
return /*#__PURE__*/
|
|
304
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableCustomizeSelect.default, {
|
|
303
305
|
value: activeConjunction,
|
|
304
306
|
options: conjunctionOptions,
|
|
305
307
|
onSelectOption: this.onSelectConjunction,
|
|
@@ -309,9 +311,10 @@ class FilterItem extends _react.default.Component {
|
|
|
309
311
|
}
|
|
310
312
|
default:
|
|
311
313
|
{
|
|
312
|
-
return /*#__PURE__*/
|
|
313
|
-
className: "selected-conjunction-show"
|
|
314
|
-
|
|
314
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
315
|
+
className: "selected-conjunction-show",
|
|
316
|
+
children: (0, _lang.getLocale)(filterConjunction)
|
|
317
|
+
});
|
|
315
318
|
}
|
|
316
319
|
}
|
|
317
320
|
};
|
|
@@ -348,22 +351,24 @@ class FilterItem extends _react.default.Component {
|
|
|
348
351
|
optionStyle.background = _constants.DELETED_OPTION_BACKGROUND_COLOR;
|
|
349
352
|
optionName = (0, _lang.getLocale)(_constants.DELETED_OPTION_TIPS);
|
|
350
353
|
}
|
|
351
|
-
labelArray.push( /*#__PURE__*/
|
|
354
|
+
labelArray.push( /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
352
355
|
className: className,
|
|
353
356
|
style: optionStyle,
|
|
354
|
-
key: 'option_' + item,
|
|
355
357
|
title: optionName,
|
|
356
|
-
"aria-label": optionName
|
|
357
|
-
|
|
358
|
+
"aria-label": optionName,
|
|
359
|
+
children: optionName
|
|
360
|
+
}, 'option_' + item));
|
|
358
361
|
});
|
|
359
362
|
}
|
|
360
363
|
const selectedOptionNames = labelArray.length > 0 ? {
|
|
361
|
-
label: /*#__PURE__*/
|
|
364
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Fragment, {
|
|
365
|
+
children: labelArray
|
|
366
|
+
})
|
|
362
367
|
} : {};
|
|
363
368
|
const dataOptions = options.map(option => {
|
|
364
369
|
return _filterItemUtils.default.generatorMultipleSelectOption(option, filterTerm);
|
|
365
370
|
});
|
|
366
|
-
return /*#__PURE__*/
|
|
371
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableCustomizeSelect.default, {
|
|
367
372
|
className: "dtable-ui-multiple-select-selector",
|
|
368
373
|
value: selectedOptionNames,
|
|
369
374
|
options: dataOptions,
|
|
@@ -410,7 +415,7 @@ class FilterItem extends _react.default.Component {
|
|
|
410
415
|
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];
|
|
411
416
|
if (inputRangeLabel.indexOf(filter_term_modifier) > -1) {
|
|
412
417
|
if (filter_term_modifier === 'exact_date') {
|
|
413
|
-
return /*#__PURE__*/
|
|
418
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_filterCalendar.default, {
|
|
414
419
|
lang: lang,
|
|
415
420
|
value: this.state.filterTerm,
|
|
416
421
|
filterColumn: filterColumn,
|
|
@@ -467,18 +472,19 @@ class FilterItem extends _react.default.Component {
|
|
|
467
472
|
color: selectedOption.textColor || null
|
|
468
473
|
};
|
|
469
474
|
selectedOptionName = {
|
|
470
|
-
label: /*#__PURE__*/
|
|
475
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
471
476
|
className: className,
|
|
472
477
|
style: style,
|
|
473
478
|
title: selectedOption.name,
|
|
474
|
-
"aria-label": selectedOption.name
|
|
475
|
-
|
|
479
|
+
"aria-label": selectedOption.name,
|
|
480
|
+
children: selectedOption.name
|
|
481
|
+
})
|
|
476
482
|
};
|
|
477
483
|
}
|
|
478
484
|
let dataOptions = options.map(option => {
|
|
479
485
|
return _filterItemUtils.default.generatorSingleSelectOption(option);
|
|
480
486
|
});
|
|
481
|
-
return /*#__PURE__*/
|
|
487
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableCustomizeSelect.default, {
|
|
482
488
|
className: "dtable-ui-single-select-selector",
|
|
483
489
|
value: selectedOptionName,
|
|
484
490
|
options: dataOptions,
|
|
@@ -501,7 +507,7 @@ class FilterItem extends _react.default.Component {
|
|
|
501
507
|
case _dtableUtils.CellType.DEPARTMENT_SINGLE_SELECT:
|
|
502
508
|
{
|
|
503
509
|
if ([_dtableUtils.FILTER_PREDICATE_TYPE.IS_ANY_OF, _dtableUtils.FILTER_PREDICATE_TYPE.IS_NONE_OF].includes(filter_predicate)) {
|
|
504
|
-
return /*#__PURE__*/
|
|
510
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_departmentMultipleSelectFilter.default, {
|
|
505
511
|
value: filter_term || [],
|
|
506
512
|
userDepartmentIdsMap: userDepartmentIdsMap,
|
|
507
513
|
departments: departments,
|
|
@@ -510,7 +516,7 @@ class FilterItem extends _react.default.Component {
|
|
|
510
516
|
readOnly: readOnly
|
|
511
517
|
});
|
|
512
518
|
}
|
|
513
|
-
return /*#__PURE__*/
|
|
519
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_departmentSingleSelectFilter.default, {
|
|
514
520
|
column: filterColumn,
|
|
515
521
|
value: filter_term || '',
|
|
516
522
|
userDepartmentIdsMap: userDepartmentIdsMap,
|
|
@@ -525,7 +531,7 @@ class FilterItem extends _react.default.Component {
|
|
|
525
531
|
if (filter_predicate === _dtableUtils.FILTER_PREDICATE_TYPE.INCLUDE_ME) {
|
|
526
532
|
return null;
|
|
527
533
|
}
|
|
528
|
-
return /*#__PURE__*/
|
|
534
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_collaboratorFilter.default, {
|
|
529
535
|
filterIndex: index,
|
|
530
536
|
filterTerm: filter_term || [],
|
|
531
537
|
filter_predicate: filter_predicate,
|
|
@@ -542,7 +548,7 @@ class FilterItem extends _react.default.Component {
|
|
|
542
548
|
return null;
|
|
543
549
|
}
|
|
544
550
|
const creators = collaborators.concat([(0, _utils.generateDefaultUser)('anonymous')]);
|
|
545
|
-
return /*#__PURE__*/
|
|
551
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_collaboratorFilter.default, {
|
|
546
552
|
filterIndex: index,
|
|
547
553
|
filterTerm: filter_term || [],
|
|
548
554
|
collaborators: creators,
|
|
@@ -558,8 +564,7 @@ class FilterItem extends _react.default.Component {
|
|
|
558
564
|
} = filterColumn.data || {};
|
|
559
565
|
let rateList = [];
|
|
560
566
|
for (let i = 0; i < rate_max_number; i++) {
|
|
561
|
-
let rateItem = /*#__PURE__*/
|
|
562
|
-
key: i,
|
|
567
|
+
let rateItem = /*#__PURE__*/(0, _jsxRuntime.jsx)(_rateItem.default, {
|
|
563
568
|
enterRateItemIndex: this.state.enterRateItemIndex,
|
|
564
569
|
rateItemIndex: i + 1,
|
|
565
570
|
onMouseEnterRateItem: this.onMouseEnterRateItem,
|
|
@@ -569,12 +574,13 @@ class FilterItem extends _react.default.Component {
|
|
|
569
574
|
isShowRateItem: true,
|
|
570
575
|
onChangeRateNumber: this.onChangeRateNumber,
|
|
571
576
|
editable: !readOnly
|
|
572
|
-
});
|
|
577
|
+
}, i);
|
|
573
578
|
rateList.push(rateItem);
|
|
574
579
|
}
|
|
575
|
-
return /*#__PURE__*/
|
|
576
|
-
className: "filter-rate-list"
|
|
577
|
-
|
|
580
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
581
|
+
className: "filter-rate-list",
|
|
582
|
+
children: rateList
|
|
583
|
+
});
|
|
578
584
|
}
|
|
579
585
|
case _dtableUtils.CellType.FORMULA:
|
|
580
586
|
case _dtableUtils.CellType.LINK_FORMULA:
|
|
@@ -648,7 +654,7 @@ class FilterItem extends _react.default.Component {
|
|
|
648
654
|
return this.renderMultipleSelectOption(options, filterTerm);
|
|
649
655
|
}
|
|
650
656
|
if (array_type === _dtableUtils.CellType.DEPARTMENT_SINGLE_SELECT) {
|
|
651
|
-
return /*#__PURE__*/
|
|
657
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_departmentMultipleSelectFilter.default, {
|
|
652
658
|
value: filterTerm || [],
|
|
653
659
|
departments: departments,
|
|
654
660
|
onCommit: this.onSelectMultiple,
|
|
@@ -663,7 +669,7 @@ class FilterItem extends _react.default.Component {
|
|
|
663
669
|
if (filterPredicate === _dtableUtils.FILTER_PREDICATE_TYPE.INCLUDE_ME) {
|
|
664
670
|
return null;
|
|
665
671
|
}
|
|
666
|
-
return /*#__PURE__*/
|
|
672
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_collaboratorFilter.default, {
|
|
667
673
|
filterIndex: index,
|
|
668
674
|
filterTerm: filterTerm || [],
|
|
669
675
|
collaborators: collaborators,
|
|
@@ -685,16 +691,18 @@ class FilterItem extends _react.default.Component {
|
|
|
685
691
|
if (!this.isRenderErrorTips()) {
|
|
686
692
|
return null;
|
|
687
693
|
}
|
|
688
|
-
return /*#__PURE__*/
|
|
689
|
-
className: "ml-2"
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
694
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
695
|
+
className: "ml-2",
|
|
696
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
697
|
+
ref: this.invalidFilterTip,
|
|
698
|
+
className: "dtable-font dtable-icon-exclamation-triangle invalid-filter"
|
|
699
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.UncontrolledTooltip, {
|
|
700
|
+
target: this.invalidFilterTip,
|
|
701
|
+
placement: "bottom",
|
|
702
|
+
fade: false,
|
|
703
|
+
children: (0, _lang.getLocale)('Invalid_filter')
|
|
704
|
+
})]
|
|
705
|
+
});
|
|
698
706
|
};
|
|
699
707
|
this.state = {
|
|
700
708
|
filterTerm: _props.filter.filter_term,
|
|
@@ -756,62 +764,73 @@ class FilterItem extends _react.default.Component {
|
|
|
756
764
|
|
|
757
765
|
// current predicate is not empty
|
|
758
766
|
const isNeedShowTermModifier = !_constants.EMPTY_PREDICATE.includes(filter_predicate);
|
|
759
|
-
return /*#__PURE__*/
|
|
760
|
-
className: "filter-item"
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
767
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
768
|
+
className: "filter-item",
|
|
769
|
+
children: [!readOnly && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
770
|
+
className: "delete-filter",
|
|
771
|
+
onClick: this.onDeleteFilter,
|
|
772
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
773
|
+
className: "dtable-font dtable-icon-fork-number"
|
|
774
|
+
})
|
|
775
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
776
|
+
className: "condition",
|
|
777
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
778
|
+
className: "filter-conjunction",
|
|
779
|
+
children: this.renderConjunction()
|
|
780
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
781
|
+
className: "filter-container",
|
|
782
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
783
|
+
className: "filter-column",
|
|
784
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableCustomizeSelect.default, {
|
|
785
|
+
value: activeColumn,
|
|
786
|
+
options: filterColumnOptions,
|
|
787
|
+
onSelectOption: this.onSelectColumn,
|
|
788
|
+
searchable: true,
|
|
789
|
+
searchPlaceholder: (0, _lang.getLocale)('Search_column'),
|
|
790
|
+
noOptionsPlaceholder: (0, _lang.getLocale)('No_results'),
|
|
791
|
+
isInModal: this.props.isInModal,
|
|
792
|
+
isLocked: readOnly
|
|
793
|
+
})
|
|
794
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
795
|
+
className: "filter-predicate ml-2 ".concat(_isCheckboxColumn ? 'filter-checkbox-predicate' : ''),
|
|
796
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableCustomizeSelect.default, {
|
|
797
|
+
value: activePredicate,
|
|
798
|
+
options: filterPredicateOptions,
|
|
799
|
+
onSelectOption: this.onSelectPredicate,
|
|
800
|
+
isInModal: this.props.isInModal,
|
|
801
|
+
isLocked: readOnly
|
|
802
|
+
})
|
|
803
|
+
}), (0, _dtableUtils.isDateColumn)(filterColumn) && isNeedShowTermModifier && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
804
|
+
className: "filter-term-modifier ml-2",
|
|
805
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableCustomizeSelect.default, {
|
|
806
|
+
value: activeTermModifier,
|
|
807
|
+
options: filterTermModifierOptions,
|
|
808
|
+
onSelectOption: this.onSelectTermModifier,
|
|
809
|
+
isInModal: this.props.isInModal,
|
|
810
|
+
isLocked: readOnly
|
|
811
|
+
})
|
|
812
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
813
|
+
className: "filter-term ml-2",
|
|
814
|
+
children: this.renderFilterTerm(filterColumn)
|
|
815
|
+
}), showToolTip && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
816
|
+
className: "ml-2",
|
|
817
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
818
|
+
ref: this.filterToolTip,
|
|
819
|
+
id: "filter_tool_tip",
|
|
820
|
+
"aria-hidden": "true",
|
|
821
|
+
className: "dtable-font dtable-icon-exclamation-triangle",
|
|
822
|
+
style: {
|
|
823
|
+
color: '#FFC92C'
|
|
824
|
+
}
|
|
825
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.UncontrolledTooltip, {
|
|
826
|
+
placement: "bottom",
|
|
827
|
+
target: this.filterToolTip,
|
|
828
|
+
children: (0, _lang.getLocale)('filter_tip_message')
|
|
829
|
+
})]
|
|
830
|
+
}), this.renderErrorMessage()]
|
|
831
|
+
})]
|
|
832
|
+
})]
|
|
833
|
+
});
|
|
815
834
|
}
|
|
816
835
|
}
|
|
817
836
|
var _default = exports.default = FilterItem;
|
|
@@ -15,6 +15,7 @@ var _utils = require("../../utils");
|
|
|
15
15
|
var _constants = require("../../constants");
|
|
16
16
|
var _filterGroup = _interopRequireDefault(require("../filter-group"));
|
|
17
17
|
require("./index.css");
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
19
|
class FiltersList extends _react.Component {
|
|
19
20
|
constructor(props) {
|
|
20
21
|
super(props);
|
|
@@ -240,8 +241,7 @@ class FiltersList extends _react.Component {
|
|
|
240
241
|
const conjunctionOptions = this.getConjunctionOptions();
|
|
241
242
|
const columnOptions = this.getColumnOptions();
|
|
242
243
|
if ((0, _dtableUtils.checkIsFilterGroup)(filter)) {
|
|
243
|
-
return /*#__PURE__*/
|
|
244
|
-
key: "filter-group-".concat(index),
|
|
244
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_filterGroup.default, {
|
|
245
245
|
isInModal: isInModal,
|
|
246
246
|
lang: lang,
|
|
247
247
|
columns: columns,
|
|
@@ -261,13 +261,12 @@ class FiltersList extends _react.Component {
|
|
|
261
261
|
modifyConjunctionInGroup: this.modifyConjunctionInGroup,
|
|
262
262
|
deleteFilterInGroup: this.deleteFilterInGroup,
|
|
263
263
|
updateFilterInGroup: this.updateFilterInGroup
|
|
264
|
-
});
|
|
264
|
+
}, "filter-group-".concat(index));
|
|
265
265
|
}
|
|
266
266
|
const {
|
|
267
267
|
error_message
|
|
268
268
|
} = _dtableUtils.ValidateFilter.validate(filter, columns);
|
|
269
|
-
return /*#__PURE__*/
|
|
270
|
-
key: index,
|
|
269
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_filterItem.default, {
|
|
271
270
|
isInModal: isInModal,
|
|
272
271
|
lang: lang,
|
|
273
272
|
index: index,
|
|
@@ -285,7 +284,7 @@ class FiltersList extends _react.Component {
|
|
|
285
284
|
updateConjunction: this.modifyFilterConjunction,
|
|
286
285
|
firstDayOfWeek: firstDayOfWeek,
|
|
287
286
|
readOnly: readOnly
|
|
288
|
-
});
|
|
287
|
+
}, index);
|
|
289
288
|
};
|
|
290
289
|
this.conjunctionOptions = null;
|
|
291
290
|
this.columnOptions = null;
|
|
@@ -303,21 +302,23 @@ class FiltersList extends _react.Component {
|
|
|
303
302
|
columns
|
|
304
303
|
} = this.props;
|
|
305
304
|
const isEmpty = filters.length === 0;
|
|
306
|
-
return /*#__PURE__*/
|
|
305
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
307
306
|
className: (0, _classnames.default)('dtable-ui-filters-list', {
|
|
308
307
|
'empty-filters-container': isEmpty
|
|
309
308
|
}, {
|
|
310
309
|
[className]: className
|
|
311
|
-
})
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
310
|
+
}),
|
|
311
|
+
children: [isEmpty && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
312
|
+
className: "empty-filters-list",
|
|
313
|
+
children: emptyPlaceholder
|
|
314
|
+
}), !isEmpty && filters.map((filter, index) => {
|
|
315
|
+
const {
|
|
316
|
+
column_key
|
|
317
|
+
} = filter;
|
|
318
|
+
const filterColumn = (0, _utils.getColumnByKey)(column_key, columns) || {};
|
|
319
|
+
return this.renderFilter(filter, index, filterColumn);
|
|
320
|
+
})]
|
|
321
|
+
});
|
|
321
322
|
}
|
|
322
323
|
}
|
|
323
324
|
var _default = exports.default = FiltersList;
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactstrap = require("reactstrap");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
11
|
class RateItem extends _react.default.Component {
|
|
11
12
|
constructor(props) {
|
|
12
13
|
super(props);
|
|
@@ -61,19 +62,21 @@ class RateItem extends _react.default.Component {
|
|
|
61
62
|
opacity: 0.4
|
|
62
63
|
};
|
|
63
64
|
}
|
|
64
|
-
return /*#__PURE__*/
|
|
65
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
65
66
|
onMouseEnter: this.onMouseEnterRateItem,
|
|
66
67
|
onMouseLeave: this.onMouseLeaveRateItem,
|
|
67
68
|
style: style,
|
|
68
69
|
onClick: this.onChangeRateNumber,
|
|
69
|
-
className: "rate-item ".concat(value >= rateItemIndex ? 'rate-item-active' : '')
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
className: "rate-item ".concat(value >= rateItemIndex ? 'rate-item-active' : ''),
|
|
71
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
72
|
+
className: "dtable-font ".concat(rateShowType),
|
|
73
|
+
ref: this.tooltipRef
|
|
74
|
+
}), editable && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.UncontrolledTooltip, {
|
|
75
|
+
placement: "bottom",
|
|
76
|
+
target: this.tooltipRef,
|
|
77
|
+
children: rateItemIndex
|
|
78
|
+
})]
|
|
79
|
+
});
|
|
77
80
|
}
|
|
78
81
|
}
|
|
79
82
|
var _default = exports.default = RateItem;
|
|
@@ -11,6 +11,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
var _ModalPortal = _interopRequireDefault(require("../ModalPortal"));
|
|
12
12
|
var _selectOptionGroup = _interopRequireDefault(require("./select-option-group"));
|
|
13
13
|
require("./index.css");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
class DTableGroupSelect extends _react.Component {
|
|
15
16
|
constructor(props) {
|
|
16
17
|
super(props);
|
|
@@ -74,54 +75,61 @@ class DTableGroupSelect extends _react.Component {
|
|
|
74
75
|
noOptionsPlaceholder,
|
|
75
76
|
isInModal
|
|
76
77
|
} = this.props;
|
|
77
|
-
return /*#__PURE__*/
|
|
78
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
78
79
|
ref: node => this.selector = node,
|
|
79
80
|
className: (0, _classnames.default)('group-select custom-select', {
|
|
80
81
|
'focus': this.state.isShowSelectOptions
|
|
81
82
|
}, className),
|
|
82
|
-
onClick: this.onSelectToggle
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
isInModal
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
83
|
+
onClick: this.onSelectToggle,
|
|
84
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
85
|
+
className: "selected-option",
|
|
86
|
+
children: [selectedOptions.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
87
|
+
className: "selected-option-show",
|
|
88
|
+
children: selectedOptions.map(item => /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
89
|
+
className: "selected-option-item mr-1 pr-1 pl-2",
|
|
90
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
91
|
+
className: "selected-option-item-name",
|
|
92
|
+
children: item.name
|
|
93
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
94
|
+
className: "dtable-font dtable-icon-x ml-1",
|
|
95
|
+
onClick: () => {
|
|
96
|
+
this.props.onDeleteOption(item);
|
|
97
|
+
}
|
|
98
|
+
})]
|
|
99
|
+
}, item.id))
|
|
100
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
101
|
+
className: "select-placeholder",
|
|
102
|
+
children: placeholder
|
|
103
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
104
|
+
className: "sf3-font-down sf3-font"
|
|
105
|
+
})]
|
|
106
|
+
}), this.state.isShowSelectOptions && !isInModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_selectOptionGroup.default, {
|
|
107
|
+
selectedOptions: selectedOptions,
|
|
108
|
+
top: this.getSelectedOptionTop(),
|
|
109
|
+
options: options,
|
|
110
|
+
onSelectOption: this.props.onSelectOption,
|
|
111
|
+
searchPlaceholder: searchPlaceholder,
|
|
112
|
+
noOptionsPlaceholder: noOptionsPlaceholder,
|
|
113
|
+
onClickOutside: this.onClickOutside,
|
|
114
|
+
closeSelect: this.closeSelect,
|
|
115
|
+
getFilterOptions: this.getFilterOptions
|
|
116
|
+
}), this.state.isShowSelectOptions && isInModal && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ModalPortal.default, {
|
|
117
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_selectOptionGroup.default, {
|
|
118
|
+
className: className,
|
|
119
|
+
selectedOptions: selectedOptions,
|
|
120
|
+
position: this.selector.getBoundingClientRect(),
|
|
121
|
+
isInModal: isInModal,
|
|
122
|
+
top: this.getSelectedOptionTop(),
|
|
123
|
+
options: options,
|
|
124
|
+
onSelectOption: this.props.onSelectOption,
|
|
125
|
+
searchPlaceholder: searchPlaceholder,
|
|
126
|
+
noOptionsPlaceholder: noOptionsPlaceholder,
|
|
127
|
+
onClickOutside: this.onClickOutside,
|
|
128
|
+
closeSelect: this.closeSelect,
|
|
129
|
+
getFilterOptions: this.getFilterOptions
|
|
130
|
+
})
|
|
131
|
+
})]
|
|
132
|
+
});
|
|
125
133
|
}
|
|
126
134
|
}
|
|
127
135
|
var _default = exports.default = DTableGroupSelect;
|
|
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
class Option extends _react.Component {
|
|
12
13
|
constructor() {
|
|
13
14
|
super(...arguments);
|
|
@@ -27,14 +28,15 @@ class Option extends _react.Component {
|
|
|
27
28
|
};
|
|
28
29
|
}
|
|
29
30
|
render() {
|
|
30
|
-
return /*#__PURE__*/
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
31
32
|
className: (0, _classnames.default)('d-flex option', {
|
|
32
33
|
'option-active': this.props.isActive
|
|
33
34
|
}),
|
|
34
35
|
onClick: this.onSelectOption,
|
|
35
36
|
onMouseEnter: this.onMouseEnter,
|
|
36
|
-
onMouseLeave: this.onMouseLeave
|
|
37
|
-
|
|
37
|
+
onMouseLeave: this.onMouseLeave,
|
|
38
|
+
children: this.props.children
|
|
39
|
+
});
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
42
|
var _default = exports.default = Option;
|