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
|
@@ -12,6 +12,7 @@ var _DTableSearchInput = _interopRequireDefault(require("../DTableSearchInput"))
|
|
|
12
12
|
var _option = _interopRequireDefault(require("./option"));
|
|
13
13
|
var _KeyCodes = _interopRequireDefault(require("../SelectOptionGroup/KeyCodes"));
|
|
14
14
|
require("./select-option-group.css");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
16
|
const OPTION_HEIGHT = 32;
|
|
16
17
|
class SelectOptionGroup extends _react.Component {
|
|
17
18
|
constructor(props) {
|
|
@@ -132,26 +133,28 @@ class SelectOptionGroup extends _react.Component {
|
|
|
132
133
|
} = this.props;
|
|
133
134
|
this.filterOptions = this.props.getFilterOptions(searchVal);
|
|
134
135
|
if (this.filterOptions.length === 0) {
|
|
135
|
-
return /*#__PURE__*/
|
|
136
|
-
className: "none-search-result"
|
|
137
|
-
|
|
136
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
137
|
+
className: "none-search-result",
|
|
138
|
+
children: noOptionsPlaceholder
|
|
139
|
+
});
|
|
138
140
|
}
|
|
139
141
|
return this.filterOptions.map((option, index) => {
|
|
140
142
|
const isSelected = selectedOptions.some(item => item.id === option.id);
|
|
141
|
-
return /*#__PURE__*/
|
|
142
|
-
key: "".concat(option.id, "-").concat(index),
|
|
143
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_option.default, {
|
|
143
144
|
index: index,
|
|
144
145
|
isActive: this.state.activeIndex === index,
|
|
145
146
|
option: option,
|
|
146
147
|
onSelectOption: onSelectOption,
|
|
147
148
|
changeIndex: this.changeIndex,
|
|
148
|
-
disableHover: this.state.disableHover
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
149
|
+
disableHover: this.state.disableHover,
|
|
150
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
151
|
+
className: "option-label text-truncate",
|
|
152
|
+
title: option.label,
|
|
153
|
+
children: option.label
|
|
154
|
+
}), isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
155
|
+
className: "dtable-font dtable-icon-check-mark"
|
|
156
|
+
})]
|
|
157
|
+
}, "".concat(option.id, "-").concat(index));
|
|
155
158
|
});
|
|
156
159
|
};
|
|
157
160
|
this.state = {
|
|
@@ -209,22 +212,25 @@ class SelectOptionGroup extends _react.Component {
|
|
|
209
212
|
opacity: 0
|
|
210
213
|
};
|
|
211
214
|
}
|
|
212
|
-
return /*#__PURE__*/
|
|
215
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
213
216
|
className: (0, _classnames.default)('option-group group-selector', className ? 'option-group-' + className : ''),
|
|
214
217
|
ref: ref => this.optionGroupRef = ref,
|
|
215
218
|
style: style,
|
|
216
|
-
onMouseDown: this.onMouseDown
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
219
|
+
onMouseDown: this.onMouseDown,
|
|
220
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
221
|
+
className: "option-group-search position-relative",
|
|
222
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableSearchInput.default, {
|
|
223
|
+
className: "option-search-control",
|
|
224
|
+
placeholder: searchPlaceholder,
|
|
225
|
+
onChange: this.onChangeSearch,
|
|
226
|
+
ref: this.searchInputRef
|
|
227
|
+
})
|
|
228
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
229
|
+
className: "option-group-content",
|
|
230
|
+
ref: ref => this.optionGroupContentRef = ref,
|
|
231
|
+
children: this.renderOptGroup(searchVal)
|
|
232
|
+
})]
|
|
233
|
+
});
|
|
228
234
|
}
|
|
229
235
|
}
|
|
230
236
|
var _default = exports.default = SelectOptionGroup;
|
|
@@ -9,23 +9,27 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _reactstrap = require("reactstrap");
|
|
10
10
|
var _IconButton = _interopRequireDefault(require("../IconButton"));
|
|
11
11
|
require("./index.css");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
const DTableModalHeader = _ref => {
|
|
13
14
|
let {
|
|
14
15
|
children,
|
|
15
16
|
...props
|
|
16
17
|
} = _ref;
|
|
17
|
-
const customCloseBtn = /*#__PURE__*/
|
|
18
|
+
const customCloseBtn = /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
18
19
|
type: "button",
|
|
19
20
|
className: "close dtable-modal-close",
|
|
20
21
|
"data-dismiss": "modal",
|
|
21
22
|
"aria-label": "Close",
|
|
22
|
-
onClick: props.toggle
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
onClick: props.toggle,
|
|
24
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
|
|
25
|
+
icon: "x",
|
|
26
|
+
className: "dtable-modal-close-inner"
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.ModalHeader, {
|
|
30
|
+
...props,
|
|
31
|
+
close: customCloseBtn,
|
|
32
|
+
children: children
|
|
33
|
+
});
|
|
30
34
|
};
|
|
31
35
|
var _default = exports.default = DTableModalHeader;
|
|
@@ -8,6 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactstrap = require("reactstrap");
|
|
10
10
|
var _utils = require("../utils/utils");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
class DTablePopover extends _react.default.Component {
|
|
12
13
|
constructor() {
|
|
13
14
|
super(...arguments);
|
|
@@ -62,7 +63,7 @@ class DTablePopover extends _react.default.Component {
|
|
|
62
63
|
modifiers,
|
|
63
64
|
placement
|
|
64
65
|
} = this.props;
|
|
65
|
-
return /*#__PURE__*/
|
|
66
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.Popover, {
|
|
66
67
|
placement: placement,
|
|
67
68
|
isOpen: true,
|
|
68
69
|
target: target,
|
|
@@ -70,11 +71,13 @@ class DTablePopover extends _react.default.Component {
|
|
|
70
71
|
hideArrow: hideArrow,
|
|
71
72
|
innerClassName: innerClassName,
|
|
72
73
|
className: popoverClassName,
|
|
73
|
-
modifiers: modifiers
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
modifiers: modifiers,
|
|
75
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
76
|
+
ref: ref => this.dtablePopoverRef = ref,
|
|
77
|
+
onClick: this.onPopoverInsideClick,
|
|
78
|
+
children: this.props.children
|
|
79
|
+
})
|
|
80
|
+
});
|
|
78
81
|
}
|
|
79
82
|
}
|
|
80
83
|
DTablePopover.defaultProps = {
|
package/lib/DTableRadio/index.js
CHANGED
|
@@ -8,6 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
require("./index.css");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
function DTableRadio(_ref) {
|
|
12
13
|
let {
|
|
13
14
|
disabled = false,
|
|
@@ -18,25 +19,27 @@ function DTableRadio(_ref) {
|
|
|
18
19
|
value,
|
|
19
20
|
label
|
|
20
21
|
} = _ref;
|
|
21
|
-
return /*#__PURE__*/
|
|
22
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("label", {
|
|
22
23
|
className: (0, _classnames.default)('dtable-radio w-100 align-items-center position-relative', {
|
|
23
24
|
'dtable-radio-disable': disabled,
|
|
24
25
|
[className]: className
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
26
|
+
}),
|
|
27
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
28
|
+
type: "radio",
|
|
29
|
+
className: "dtable-radio-input position-absolute",
|
|
30
|
+
checked: isChecked,
|
|
31
|
+
onChange: disabled ? () => {} : onCheckedChange,
|
|
32
|
+
name: name,
|
|
33
|
+
value: value
|
|
34
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
35
|
+
className: (0, _classnames.default)('dtable-radio-indicator position-relative', {
|
|
36
|
+
'dtable-radio-selected-indicator': isChecked,
|
|
37
|
+
'dtable-radio-indicator-disable': disabled
|
|
38
|
+
})
|
|
39
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
40
|
+
className: "dtable-radio-description text-truncate ml-2",
|
|
41
|
+
children: label
|
|
42
|
+
})]
|
|
43
|
+
});
|
|
41
44
|
}
|
|
42
45
|
var _default = exports.default = DTableRadio;
|
|
@@ -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
|
const SLIDER_TRANSITION = '150ms cubic-bezier(.4, 0, .2, 1)';
|
|
11
12
|
class DTableRadioGroup extends _react.default.Component {
|
|
12
13
|
constructor(props) {
|
|
@@ -73,24 +74,26 @@ class DTableRadioGroup extends _react.default.Component {
|
|
|
73
74
|
const {
|
|
74
75
|
activeOption
|
|
75
76
|
} = this.state;
|
|
76
|
-
return /*#__PURE__*/
|
|
77
|
-
className: "radio-group-wrapper"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
77
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
78
|
+
className: "radio-group-wrapper",
|
|
79
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
80
|
+
className: "radio-group-options ".concat(readOnly ? 'read-only' : ''),
|
|
81
|
+
children: [options.map(option => {
|
|
82
|
+
const isActive = activeOption === option ? true : false;
|
|
83
|
+
const displayOption = optionsDisplay && optionsDisplay[option] || '';
|
|
84
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
85
|
+
ref: ref => this.btn = ref,
|
|
86
|
+
className: "radio-group-button ".concat(isActive ? 'active' : ''),
|
|
87
|
+
"data-option": option,
|
|
88
|
+
onClick: this.onSelectChanged,
|
|
89
|
+
children: displayOption
|
|
90
|
+
}, option);
|
|
91
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
92
|
+
className: "radio-group-slider btn btn-primary",
|
|
93
|
+
ref: ref => this.slider = ref
|
|
94
|
+
})]
|
|
95
|
+
})
|
|
96
|
+
});
|
|
94
97
|
}
|
|
95
98
|
}
|
|
96
99
|
var _default = exports.default = DTableRadioGroup;
|
|
@@ -9,6 +9,7 @@ exports.default = void 0;
|
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
var _utils = require("./utils");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
class DtableSearchInput extends _react.Component {
|
|
13
14
|
constructor(props) {
|
|
14
15
|
super(props);
|
|
@@ -71,14 +72,15 @@ class DtableSearchInput extends _react.Component {
|
|
|
71
72
|
clearValue: this.clearSearch
|
|
72
73
|
});
|
|
73
74
|
} else if ((0, _utils.isFunction)(ClearIndicator)) {
|
|
74
|
-
return /*#__PURE__*/
|
|
75
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ClearIndicator, {
|
|
75
76
|
clearValue: this.clearSearch
|
|
76
77
|
});
|
|
77
78
|
}
|
|
78
|
-
return /*#__PURE__*/
|
|
79
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
79
80
|
className: (0, _classnames.default)('search-text-clear input-icon-addon', clearClassName),
|
|
80
|
-
onClick: this.clearSearch
|
|
81
|
-
|
|
81
|
+
onClick: this.clearSearch,
|
|
82
|
+
children: "\xD7"
|
|
83
|
+
});
|
|
82
84
|
};
|
|
83
85
|
this.state = {
|
|
84
86
|
searchValue: props.value
|
|
@@ -111,20 +113,22 @@ class DtableSearchInput extends _react.Component {
|
|
|
111
113
|
const {
|
|
112
114
|
searchValue
|
|
113
115
|
} = this.state;
|
|
114
|
-
return /*#__PURE__*/
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
116
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
117
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
118
|
+
ref: ref => this.inputRef = ref,
|
|
119
|
+
type: "text",
|
|
120
|
+
value: searchValue,
|
|
121
|
+
className: (0, _classnames.default)('form-control', className),
|
|
122
|
+
onChange: this.onChange,
|
|
123
|
+
autoFocus: autoFocus,
|
|
124
|
+
placeholder: placeholder,
|
|
125
|
+
onCompositionStart: this.onCompositionStart,
|
|
126
|
+
onCompositionEnd: this.onCompositionEnd,
|
|
127
|
+
onKeyDown: onKeyDown,
|
|
128
|
+
disabled: disabled,
|
|
129
|
+
style: style
|
|
130
|
+
}), this.renderClear()]
|
|
131
|
+
});
|
|
128
132
|
}
|
|
129
133
|
}
|
|
130
134
|
DtableSearchInput.defaultProps = {
|
|
@@ -7,18 +7,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
require("./dtable-select-label.css");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
11
|
function DTableSelectLabel(_ref) {
|
|
11
12
|
let {
|
|
12
13
|
classname = '',
|
|
13
14
|
name = '',
|
|
14
15
|
isSelect = false
|
|
15
16
|
} = _ref;
|
|
16
|
-
return /*#__PURE__*/
|
|
17
|
-
className: "".concat(classname, " w-100 d-flex justify-content-between")
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
18
|
+
className: "".concat(classname, " w-100 d-flex justify-content-between"),
|
|
19
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
20
|
+
children: name
|
|
21
|
+
}), isSelect && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
22
|
+
className: "dtable-select-check-icon",
|
|
23
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
24
|
+
className: "dtable-font dtable-icon-check-mark"
|
|
25
|
+
})
|
|
26
|
+
})]
|
|
27
|
+
});
|
|
23
28
|
}
|
|
24
29
|
var _default = exports.default = DTableSelectLabel;
|
|
@@ -8,6 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactSelect = _interopRequireDefault(require("react-select"));
|
|
10
10
|
var _utils = require("./utils");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
class DTableSelect extends _react.default.Component {
|
|
12
13
|
render() {
|
|
13
14
|
const {
|
|
@@ -29,7 +30,7 @@ class DTableSelect extends _react.default.Component {
|
|
|
29
30
|
autoFocus,
|
|
30
31
|
className
|
|
31
32
|
} = this.props;
|
|
32
|
-
return /*#__PURE__*/
|
|
33
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.default, {
|
|
33
34
|
value: value,
|
|
34
35
|
onChange: onChange,
|
|
35
36
|
options: options,
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.UserSelectStyle = exports.Option = exports.MenuSelectStyle = exports.MenuList = exports.DropdownIndicator = exports.ClearIndicator = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactSelect = require("react-select");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
11
|
// DtableSelect is based on seatable-ui.css, so use the following content to override the default react-select style
|
|
11
12
|
const DEFAULT_CONTROL_STYLE = {
|
|
12
13
|
border: '1px solid rgba(0, 40, 100, 0.12) !important'
|
|
@@ -131,13 +132,16 @@ const MenuSelectStyle = exports.MenuSelectStyle = {
|
|
|
131
132
|
indicatorSeparator: noneCallback
|
|
132
133
|
};
|
|
133
134
|
const DropdownIndicator = props => {
|
|
134
|
-
return _reactSelect.components.DropdownIndicator && /*#__PURE__*/
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
135
|
+
return _reactSelect.components.DropdownIndicator && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.DropdownIndicator, {
|
|
136
|
+
...props,
|
|
137
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
138
|
+
className: "dtable-font dtable-icon-down3",
|
|
139
|
+
style: {
|
|
140
|
+
fontSize: '12px',
|
|
141
|
+
marginLeft: '-2px'
|
|
142
|
+
}
|
|
143
|
+
})
|
|
144
|
+
});
|
|
141
145
|
};
|
|
142
146
|
exports.DropdownIndicator = DropdownIndicator;
|
|
143
147
|
const ClearIndicator = _ref => {
|
|
@@ -153,23 +157,33 @@ const ClearIndicator = _ref => {
|
|
|
153
157
|
...innerProps,
|
|
154
158
|
onMouseDown
|
|
155
159
|
};
|
|
156
|
-
return /*#__PURE__*/
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.ClearIndicator, {
|
|
161
|
+
...props,
|
|
162
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
163
|
+
className: "dtable-font dtable-icon-fork-number",
|
|
164
|
+
style: {
|
|
165
|
+
fontSize: '12px',
|
|
166
|
+
marginRight: '-2px'
|
|
167
|
+
}
|
|
168
|
+
})
|
|
169
|
+
});
|
|
163
170
|
};
|
|
164
171
|
exports.ClearIndicator = ClearIndicator;
|
|
165
|
-
const MenuList = props => /*#__PURE__*/
|
|
172
|
+
const MenuList = props => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
166
173
|
onClick: e => e.nativeEvent.stopImmediatePropagation(),
|
|
167
|
-
onMouseDown: e => e.nativeEvent.stopImmediatePropagation()
|
|
168
|
-
|
|
174
|
+
onMouseDown: e => e.nativeEvent.stopImmediatePropagation(),
|
|
175
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.MenuList, {
|
|
176
|
+
...props,
|
|
177
|
+
children: props.children
|
|
178
|
+
})
|
|
179
|
+
});
|
|
169
180
|
exports.MenuList = MenuList;
|
|
170
181
|
const Option = props => {
|
|
171
|
-
return /*#__PURE__*/
|
|
172
|
-
style: props.data.style
|
|
173
|
-
|
|
182
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
183
|
+
style: props.data.style,
|
|
184
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.components.Option, {
|
|
185
|
+
...props
|
|
186
|
+
})
|
|
187
|
+
});
|
|
174
188
|
};
|
|
175
189
|
exports.Option = Option;
|
|
@@ -9,6 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _dtableUtils = require("dtable-utils");
|
|
11
11
|
require("./index.css");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
function DTableSwitch(_ref) {
|
|
13
14
|
let {
|
|
14
15
|
onChange,
|
|
@@ -19,31 +20,38 @@ function DTableSwitch(_ref) {
|
|
|
19
20
|
switchPosition = 'right',
|
|
20
21
|
switchClassName
|
|
21
22
|
} = _ref;
|
|
22
|
-
const switchNode = /*#__PURE__*/
|
|
23
|
+
const switchNode = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
23
24
|
className: "custom-switch-indicator"
|
|
24
25
|
});
|
|
25
|
-
const textNode = /*#__PURE__*/
|
|
26
|
-
className: "custom-switch-description text-truncate"
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
const textNode = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
27
|
+
className: "custom-switch-description text-truncate",
|
|
28
|
+
children: placeholder
|
|
29
|
+
});
|
|
30
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
29
31
|
className: (0, _classnames.default)('dtable-switch position-relative', {
|
|
30
32
|
'disabled': disabled
|
|
31
33
|
}, {
|
|
32
34
|
[size]: size
|
|
33
35
|
}, {
|
|
34
36
|
[switchClassName]: switchClassName
|
|
37
|
+
}),
|
|
38
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("label", {
|
|
39
|
+
className: "custom-switch",
|
|
40
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
41
|
+
className: "custom-switch-input",
|
|
42
|
+
type: "checkbox",
|
|
43
|
+
checked: checked,
|
|
44
|
+
onChange: onChange,
|
|
45
|
+
name: "custom-switch-checkbox",
|
|
46
|
+
disabled: disabled,
|
|
47
|
+
"aria-label": placeholder,
|
|
48
|
+
id: 'dtable-switch-' + (0, _dtableUtils.generatorBase64Code)(12)
|
|
49
|
+
}), switchPosition === 'left' && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
50
|
+
children: [switchNode, textNode]
|
|
51
|
+
}), switchPosition === 'right' && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
52
|
+
children: [textNode, switchNode]
|
|
53
|
+
})]
|
|
35
54
|
})
|
|
36
|
-
}
|
|
37
|
-
className: "custom-switch"
|
|
38
|
-
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
39
|
-
className: "custom-switch-input",
|
|
40
|
-
type: "checkbox",
|
|
41
|
-
checked: checked,
|
|
42
|
-
onChange: onChange,
|
|
43
|
-
name: "custom-switch-checkbox",
|
|
44
|
-
disabled: disabled,
|
|
45
|
-
"aria-label": placeholder,
|
|
46
|
-
id: 'dtable-switch-' + (0, _dtableUtils.generatorBase64Code)(12)
|
|
47
|
-
}), switchPosition === 'left' && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, switchNode, textNode), switchPosition === 'right' && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, textNode, switchNode)));
|
|
55
|
+
});
|
|
48
56
|
}
|
|
49
57
|
var _default = exports.default = DTableSwitch;
|
package/lib/DateEditor/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var _mbEditor = _interopRequireDefault(require("./mb-editor"));
|
|
|
15
15
|
require("dayjs/locale/zh-cn");
|
|
16
16
|
require("dayjs/locale/en-gb");
|
|
17
17
|
require("./index.css");
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
19
|
const DateEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
19
20
|
let {
|
|
20
21
|
isMobile,
|
|
@@ -58,26 +59,34 @@ const DateEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
58
59
|
onCommit: handelCommit,
|
|
59
60
|
onClose: hideCalendar
|
|
60
61
|
};
|
|
61
|
-
if (isMobile === false) return /*#__PURE__*/
|
|
62
|
+
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
|
|
63
|
+
...props,
|
|
62
64
|
isInModal: isInModal,
|
|
63
65
|
ref: ref
|
|
64
|
-
})
|
|
65
|
-
if (isMobile === true) return /*#__PURE__*/
|
|
66
|
+
});
|
|
67
|
+
if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
|
|
68
|
+
...props,
|
|
66
69
|
isReadOnly: isReadOnly,
|
|
67
70
|
column: column,
|
|
68
71
|
ref: ref
|
|
69
|
-
})
|
|
70
|
-
return /*#__PURE__*/
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
72
|
+
});
|
|
73
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
74
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
75
|
+
query: '(min-width: 768px)',
|
|
76
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
|
|
77
|
+
...props,
|
|
78
|
+
isInModal: isInModal,
|
|
79
|
+
ref: ref
|
|
80
|
+
})
|
|
81
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
82
|
+
query: '(max-width: 768px)',
|
|
83
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
|
|
84
|
+
...props,
|
|
85
|
+
isReadOnly: isReadOnly,
|
|
86
|
+
column: column,
|
|
87
|
+
ref: ref
|
|
88
|
+
})
|
|
89
|
+
})]
|
|
90
|
+
});
|
|
82
91
|
});
|
|
83
92
|
var _default = exports.default = DateEditor;
|