dtable-ui-component 7.0.13 → 7.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ActionSheet/index.js +58 -49
- package/lib/ActivityIndicator/index.js +17 -16
- package/lib/AsyncUserSelect/index.js +20 -46
- package/lib/AsyncUserSelect/user-item.js +6 -5
- package/lib/AutoNumberFormatter/index.js +4 -3
- package/lib/Badge/index.js +27 -29
- package/lib/ButtonFormatter/index.js +8 -6
- package/lib/CTimeFormatter/index.js +4 -3
- package/lib/CheckboxEditor/index.js +16 -13
- package/lib/CheckboxEditor/mb-editor.js +20 -9
- package/lib/CheckboxEditor/pc-editor.js +24 -12
- package/lib/CheckboxFormatter/index.js +5 -4
- package/lib/CollaboratorEditor/index.js +17 -14
- package/lib/CollaboratorEditor/mb-editor/index.js +19 -11
- package/lib/CollaboratorEditor/pc-editor/index.js +35 -26
- package/lib/CollaboratorFormatter/index.js +10 -8
- package/lib/CollaboratorItem/index.js +5 -4
- package/lib/CollapsibleSettingLayout/index.js +8 -10
- package/lib/Comment/body/comment.js +19 -11
- package/lib/Comment/body/index.js +8 -8
- package/lib/Comment/footer/btns/index.js +7 -4
- package/lib/Comment/footer/index.js +21 -10
- package/lib/Comment/footer/input/index.js +55 -34
- package/lib/Comment/footer/input/participant/index.js +6 -5
- package/lib/Comment/footer/participants/index.js +5 -4
- package/lib/Comment/footer/participants/participant/index.js +3 -1
- package/lib/Comment/footer/participants/participant-select/index.js +26 -10
- package/lib/Comment/index.js +57 -39
- package/lib/Comment/utils/utilities.js +22 -16
- package/lib/CreatorFormatter/index.js +8 -6
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +26 -28
- package/lib/DTableColorPicker/index.js +53 -67
- package/lib/DTableColorPicker/utils.js +7 -5
- package/lib/DTableColumnIcon/index.js +7 -6
- package/lib/DTableCommonAddTool/index.js +10 -8
- package/lib/DTableCustomFooter/index.js +3 -1
- package/lib/DTableCustomizeSearchInput/index.js +41 -26
- package/lib/DTableCustomizeSelect/index.js +24 -19
- package/lib/DTableDropdownItem/index.js +28 -24
- package/lib/DTableDropdownMenu/index.js +17 -14
- package/lib/DTableEmptyTip/index.js +5 -4
- package/lib/DTableFiltersPopover/index.js +42 -27
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -1
- package/lib/DTableFiltersPopover/utils/index.js +114 -64
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +9 -8
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +13 -16
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +15 -18
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +14 -8
- package/lib/DTableFiltersPopover/widgets/filter-group.js +57 -36
- package/lib/DTableFiltersPopover/widgets/filter-item.js +165 -106
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +162 -137
- package/lib/DTableFiltersPopover/widgets/rate-item.js +25 -20
- package/lib/DTableIcon/index.js +11 -10
- package/lib/DTableIcon/svg-icon.js +11 -9
- package/lib/DTableModalHeader/index.js +7 -7
- package/lib/DTablePopover/index.js +16 -12
- package/lib/DTableRadio/index.js +9 -10
- package/lib/DTableRadioGroup/index.js +20 -11
- package/lib/DTableSearchInput/index.js +29 -19
- package/lib/DTableSelect/dtable-select-label.js +6 -7
- package/lib/DTableSelect/index.js +26 -25
- package/lib/DTableSelect/select-dropdown-indicator/index.js +3 -1
- package/lib/DTableSelect/utils.js +83 -47
- package/lib/DTableSubDropdownMenu/index.js +16 -12
- package/lib/DTableSubDropdownToggle/index.js +16 -17
- package/lib/DTableSwitch/index.js +11 -12
- package/lib/DTableToolTip/index.js +12 -11
- package/lib/DateEditor/index.js +28 -30
- package/lib/DateEditor/mb-editor/index.js +31 -18
- package/lib/DateEditor/pc-editor.js +46 -27
- package/lib/DateFormatter/index.js +5 -4
- package/lib/DatePicker/index.js +15 -9
- package/lib/DatePicker/utils.js +7 -5
- package/lib/DeleteTip/index.js +6 -5
- package/lib/DepartmentMultipleSelectEditor/index.js +26 -28
- package/lib/DepartmentSelectFilter/index.js +13 -8
- package/lib/DepartmentSingleSelectEditor/index.js +16 -13
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +49 -50
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +64 -42
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +19 -13
- package/lib/DepartmentSingleSelectFormatter/index.js +6 -4
- package/lib/DigitalSignEditor/index.js +16 -13
- package/lib/DigitalSignEditor/mb-editor/index.js +24 -16
- package/lib/DigitalSignEditor/pc-editor/index.js +31 -23
- package/lib/DigitalSignEditor/service.js +5 -3
- package/lib/DigitalSignEditor/signature-board/index.js +10 -7
- package/lib/DigitalSignEditor/utils.js +4 -2
- package/lib/DigitalSignFormatter/index.js +15 -12
- package/lib/DigitalSignFormatter/utils.js +6 -5
- package/lib/Drawer/index.js +3 -2
- package/lib/DurationEditor/index.js +31 -21
- package/lib/DurationFormatter/index.js +5 -4
- package/lib/EditEditorButton/index.js +3 -1
- package/lib/EmailFormatter/index.js +4 -3
- package/lib/FieldDisplaySetting/field-item.js +13 -13
- package/lib/FieldDisplaySetting/index.js +20 -20
- package/lib/FileEditor/files-previewer/index.js +16 -13
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +20 -12
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +8 -7
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +4 -3
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +6 -5
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +24 -17
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +57 -29
- package/lib/FileEditor/index.js +16 -13
- package/lib/FileEditor/mb-editor/index.js +20 -28
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +4 -2
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +31 -17
- package/lib/FileEditor/pc-editor/index.js +30 -22
- package/lib/FileFormatter/index.js +20 -27
- package/lib/FileItemFormatter/index.js +10 -7
- package/lib/FileUploader/index.js +46 -29
- package/lib/FormulaFormatter/index.js +44 -24
- package/lib/GeolocationEditor/index.js +32 -27
- package/lib/GeolocationEditor/map-editor-utils.js +23 -21
- package/lib/GeolocationEditor/mb-editor/country-editor.js +14 -17
- package/lib/GeolocationEditor/mb-editor/index.js +28 -22
- package/lib/GeolocationEditor/mb-editor/location-editor.js +15 -18
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +77 -47
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +89 -50
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +14 -17
- package/lib/GeolocationEditor/mb-editor/province-editor.js +14 -17
- package/lib/GeolocationEditor/pc-editor/country-editor.js +25 -12
- package/lib/GeolocationEditor/pc-editor/index.js +41 -27
- package/lib/GeolocationEditor/pc-editor/location-editor.js +33 -28
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +67 -43
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +69 -42
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +86 -42
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +85 -39
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +26 -20
- package/lib/GeolocationEditor/pc-editor/province-editor.js +15 -8
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +6 -5
- package/lib/GeolocationEditor/pc-editor/selector-list.js +8 -7
- package/lib/GeolocationFormatter/index.js +5 -4
- package/lib/HtmlLongTextFormatter/index.js +13 -5
- package/lib/Icon/index.js +13 -15
- package/lib/Icon/load-sprite.js +13 -2
- package/lib/IconButton/index.js +12 -13
- package/lib/ImageEditor/images-previewer/image-preview/index.js +22 -13
- package/lib/ImageEditor/images-previewer/index.js +9 -3
- package/lib/ImageEditor/index.js +16 -13
- package/lib/ImageEditor/mb-editor/index.js +20 -28
- package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +6 -2
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +5 -3
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +26 -12
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +10 -4
- package/lib/ImageEditor/pc-editor/index.js +16 -11
- package/lib/ImageFormatter/images-lazy-load.js +11 -19
- package/lib/ImageFormatter/index.js +14 -12
- package/lib/ImagePreviewerLightbox/index.js +15 -19
- package/lib/ImageThumbnail/index.js +15 -12
- package/lib/InputItem/custom-input.js +55 -35
- package/lib/InputItem/custom-keyboard.js +42 -42
- package/lib/InputItem/index.js +82 -63
- package/lib/InputItem/input.js +9 -11
- package/lib/LastModifierFormatter/index.js +8 -6
- package/lib/LinkEditor/index.js +53 -33
- package/lib/LinkEditor/link-editor-option.js +4 -3
- package/lib/LinkEditor/mb-popover/index.js +22 -9
- package/lib/LinkEditor/pc-popover/index.js +13 -7
- package/lib/LinkFormatter/index.js +37 -21
- package/lib/List/index.js +17 -19
- package/lib/List/list-item.js +59 -55
- package/lib/LongTextFormatter/index.js +5 -4
- package/lib/MBEditorHeader/index.js +9 -8
- package/lib/MTimeFormatter/index.js +4 -3
- package/lib/MobileFullScreenPage/body/index.js +6 -4
- package/lib/MobileFullScreenPage/header/index.js +10 -8
- package/lib/MobileFullScreenPage/index.js +12 -14
- package/lib/MobileModal/index.js +7 -8
- package/lib/MobileOperationSheet/index.js +8 -7
- package/lib/MobileSelector/empty/index.js +3 -1
- package/lib/MobileSelector/index.js +7 -5
- package/lib/MobileSelector/option/index.js +5 -3
- package/lib/MobileSelector/options/index.css +0 -4
- package/lib/MobileSelector/options/index.js +3 -1
- package/lib/MobileSelector/search/index.js +5 -3
- package/lib/MobileUpload/index.js +5 -4
- package/lib/Modal/alert.js +2 -2
- package/lib/Modal/modal.js +28 -30
- package/lib/Modal/prompt.js +14 -14
- package/lib/MultipleSelectEditor/index.js +7 -7
- package/lib/MultipleSelectFormatter/index.js +9 -7
- package/lib/NotificationPopover/index.js +5 -4
- package/lib/NumberEditor/index.js +21 -12
- package/lib/NumberFormatter/index.js +5 -4
- package/lib/PhoneNumberLink/index.js +5 -3
- package/lib/Picker/AbstractPicker.js +35 -33
- package/lib/Popover/index.js +9 -11
- package/lib/Popover/item.js +22 -24
- package/lib/Progress/index.js +18 -17
- package/lib/Radio/Radio.js +17 -15
- package/lib/Radio/RadioItem.js +23 -19
- package/lib/RateFormatter/index.js +15 -15
- package/lib/RoleStatusEditor/index.js +18 -19
- package/lib/RowExpand/index.js +7 -6
- package/lib/RowExpandDialog/body/index.js +57 -40
- package/lib/RowExpandDialog/column-content/index.js +10 -6
- package/lib/RowExpandDialog/header/index.js +12 -9
- package/lib/RowExpandDialog/index.js +59 -63
- package/lib/RowExpandEditor/add-btn/index.js +7 -6
- package/lib/RowExpandEditor/checkbox-editor/index.js +7 -6
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +5 -4
- package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +10 -8
- package/lib/RowExpandEditor/collaborator-editor/index.js +7 -6
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +33 -22
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +40 -26
- package/lib/RowExpandEditor/date-editor/index.js +7 -6
- package/lib/RowExpandEditor/date-editor/mb-editor.js +18 -12
- package/lib/RowExpandEditor/date-editor/pc-editor.js +20 -15
- package/lib/RowExpandEditor/department-editor/index.js +7 -6
- package/lib/RowExpandEditor/department-editor/mb-editor.js +11 -16
- package/lib/RowExpandEditor/department-editor/pc-editor.js +14 -19
- package/lib/RowExpandEditor/digital-sign-editor/index.js +7 -6
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +38 -24
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +39 -25
- package/lib/RowExpandEditor/duration-editor/index.js +7 -6
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +17 -10
- package/lib/RowExpandEditor/duration-editor/pc-editor.js +19 -13
- package/lib/RowExpandEditor/email-editor/index.js +7 -6
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +20 -10
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +25 -14
- package/lib/RowExpandEditor/file-editor/index.js +7 -6
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +31 -18
- package/lib/RowExpandEditor/file-editor/pc-editor/index.js +23 -16
- package/lib/RowExpandEditor/geolocation-editor/index.js +7 -6
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +29 -17
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +26 -13
- package/lib/RowExpandEditor/image-editor/index.js +7 -6
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +26 -16
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +24 -14
- package/lib/RowExpandEditor/index.js +16 -11
- package/lib/RowExpandEditor/long-text-editor/index.js +7 -6
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +18 -17
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +16 -10
- package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +23 -16
- package/lib/RowExpandEditor/multiple-select-editor/index.js +7 -6
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +20 -12
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +38 -27
- package/lib/RowExpandEditor/number-editor/index.js +7 -6
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +14 -8
- package/lib/RowExpandEditor/number-editor/pc-editor.js +20 -13
- package/lib/RowExpandEditor/rate-editor/index.js +7 -6
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +26 -13
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +41 -25
- package/lib/RowExpandEditor/single-select-editor/index.js +7 -6
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +32 -21
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +37 -25
- package/lib/RowExpandEditor/text-editor/index.js +7 -6
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +5 -4
- package/lib/RowExpandEditor/text-editor/pc-editor/index.js +26 -15
- package/lib/RowExpandEditor/url-editor/index.js +7 -6
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +15 -7
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +20 -11
- package/lib/RowExpandFormatter/department-formatter/index.js +6 -3
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +4 -2
- package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +4 -2
- package/lib/RowExpandFormatter/email-formatter/index.js +8 -5
- package/lib/RowExpandFormatter/file-formatter/index.js +9 -8
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +14 -12
- package/lib/RowExpandFormatter/formula-formatter/index.js +51 -30
- package/lib/RowExpandFormatter/image-formatter/index.js +11 -9
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +10 -9
- package/lib/RowExpandFormatter/index.js +52 -34
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +15 -9
- package/lib/RowExpandFormatter/link-formatter/index.js +25 -17
- package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +5 -3
- package/lib/RowExpandFormatter/rate-formatter/index.js +14 -13
- package/lib/RowExpandFormatter/text/index.js +5 -4
- package/lib/RowExpandFormatter/url-formatter/index.js +9 -6
- package/lib/RowExpandView/body/index.js +43 -32
- package/lib/RowExpandView/column-content/index.js +7 -3
- package/lib/RowExpandView/index.js +52 -53
- package/lib/SelectItem/index.js +7 -5
- package/lib/SelectOptionGroup/index.js +40 -30
- package/lib/SelectedDepartments/index.js +12 -10
- package/lib/SimpleLongTextFormatter/index.js +18 -12
- package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +4 -3
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +21 -12
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +4 -3
- package/lib/SingleSelectEditor/index.js +7 -7
- package/lib/SingleSelectFormatter/index.js +9 -8
- package/lib/TabBar/Tab.js +26 -24
- package/lib/TabBar/index.js +28 -24
- package/lib/Tabs/index.js +13 -10
- package/lib/TextEditor/index.js +23 -14
- package/lib/TextFormatter/index.js +4 -3
- package/lib/TextareaItem/index.js +53 -48
- package/lib/Toast/index.js +9 -8
- package/lib/UrlFormatter/index.js +4 -3
- package/lib/common/editor-base.js +12 -7
- package/lib/formatterConfig/index.js +3 -3
- package/lib/hooks/common-hooks.js +4 -2
- package/lib/select-editor/index.js +16 -13
- package/lib/select-editor/mb-editor/index.js +28 -17
- package/lib/select-editor/pc-editor/index.js +47 -32
- package/lib/toaster/alert.js +8 -7
- package/lib/toaster/toast.js +4 -3
- package/lib/toaster/toastManager.js +13 -13
- package/lib/toaster/toaster.js +12 -9
- package/lib/utils/cell.js +11 -8
- package/lib/utils/class.js +3 -3
- package/lib/utils/column-utils.js +14 -8
- package/lib/utils/departments.js +6 -5
- package/lib/utils/getLocale.js +11 -5
- package/lib/utils/object-utils.js +5 -4
- package/lib/utils/url.js +29 -22
- package/lib/utils/utils.js +6 -2
- package/package.json +2 -2
package/lib/Popover/item.js
CHANGED
|
@@ -1,58 +1,56 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
11
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
10
|
var React = _interopRequireWildcard(require("react"));
|
|
13
11
|
var _rmcFeedback = _interopRequireDefault(require("rmc-feedback"));
|
|
14
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
const _excluded = ["children", "className", "prefixCls", "icon", "disabled", "firstItem", "activeStyle"];
|
|
16
13
|
class Item extends React.Component {
|
|
17
14
|
render() {
|
|
18
|
-
const
|
|
19
|
-
children
|
|
20
|
-
className
|
|
21
|
-
prefixCls
|
|
22
|
-
icon
|
|
23
|
-
disabled
|
|
24
|
-
firstItem
|
|
25
|
-
activeStyle
|
|
26
|
-
restProps
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
const {
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
prefixCls,
|
|
19
|
+
icon,
|
|
20
|
+
disabled,
|
|
21
|
+
firstItem,
|
|
22
|
+
activeStyle,
|
|
23
|
+
...restProps
|
|
24
|
+
} = this.props;
|
|
25
|
+
const cls = (0, _classnames.default)(`${prefixCls}-item`, className, {
|
|
26
|
+
[`${prefixCls}-item-disabled`]: disabled
|
|
29
27
|
});
|
|
30
|
-
let activeClass =
|
|
28
|
+
let activeClass = `${prefixCls}-item-active `;
|
|
31
29
|
if (firstItem) {
|
|
32
|
-
activeClass +=
|
|
30
|
+
activeClass += `${prefixCls}-item-fix-active-arrow`;
|
|
33
31
|
}
|
|
34
32
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
|
|
35
33
|
disabled: disabled,
|
|
36
34
|
activeClassName: activeClass,
|
|
37
35
|
activeStyle: activeStyle,
|
|
38
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div",
|
|
39
|
-
className: cls
|
|
40
|
-
|
|
36
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
37
|
+
className: cls,
|
|
38
|
+
...restProps,
|
|
41
39
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
42
|
-
className:
|
|
40
|
+
className: `${prefixCls}-item-container`,
|
|
43
41
|
children: [icon ?
|
|
44
42
|
/*#__PURE__*/
|
|
45
43
|
// tslint:disable-next-line:jsx-no-multiline-js
|
|
46
44
|
(0, _jsxRuntime.jsx)("span", {
|
|
47
|
-
className:
|
|
45
|
+
className: `${prefixCls}-item-icon`,
|
|
48
46
|
"aria-hidden": "true",
|
|
49
47
|
children: icon
|
|
50
48
|
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
51
|
-
className:
|
|
49
|
+
className: `${prefixCls}-item-content`,
|
|
52
50
|
children: children
|
|
53
51
|
})]
|
|
54
52
|
})
|
|
55
|
-
})
|
|
53
|
+
})
|
|
56
54
|
});
|
|
57
55
|
}
|
|
58
56
|
}
|
package/lib/Progress/index.js
CHANGED
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
10
|
var React = _interopRequireWildcard(require("react"));
|
|
12
11
|
require("./index.css");
|
|
@@ -19,28 +18,27 @@ class Progress extends React.Component {
|
|
|
19
18
|
if (this.props.appearTransition) {
|
|
20
19
|
setTimeout(() => {
|
|
21
20
|
if (this.barRef) {
|
|
22
|
-
this.barRef.style.width =
|
|
21
|
+
this.barRef.style.width = `${this.props.percent}%`;
|
|
23
22
|
}
|
|
24
23
|
}, 10);
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
26
|
render() {
|
|
28
|
-
const
|
|
29
|
-
className
|
|
30
|
-
prefixCls
|
|
31
|
-
position
|
|
32
|
-
unfilled
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
barStyle = _this$props$barStyle === void 0 ? {} : _this$props$barStyle;
|
|
27
|
+
const {
|
|
28
|
+
className,
|
|
29
|
+
prefixCls,
|
|
30
|
+
position,
|
|
31
|
+
unfilled,
|
|
32
|
+
style = {},
|
|
33
|
+
barStyle = {}
|
|
34
|
+
} = this.props;
|
|
37
35
|
const percentStyle = {
|
|
38
|
-
width: this.noAppearTransition || !this.props.appearTransition ?
|
|
36
|
+
width: this.noAppearTransition || !this.props.appearTransition ? `${this.props.percent}%` : 0,
|
|
39
37
|
height: 0
|
|
40
38
|
};
|
|
41
|
-
const wrapCls = (0, _classnames.default)(
|
|
42
|
-
[
|
|
43
|
-
[
|
|
39
|
+
const wrapCls = (0, _classnames.default)(`${prefixCls}-outer`, className, {
|
|
40
|
+
[`${prefixCls}-fixed-outer`]: position === 'fixed',
|
|
41
|
+
[`${prefixCls}-hide-outer`]: !unfilled
|
|
44
42
|
});
|
|
45
43
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
46
44
|
style: style,
|
|
@@ -51,8 +49,11 @@ class Progress extends React.Component {
|
|
|
51
49
|
"aria-valuemax": 100,
|
|
52
50
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
53
51
|
ref: el => this.barRef = el,
|
|
54
|
-
className:
|
|
55
|
-
style:
|
|
52
|
+
className: `${prefixCls}-bar`,
|
|
53
|
+
style: {
|
|
54
|
+
...barStyle,
|
|
55
|
+
...percentStyle
|
|
56
|
+
}
|
|
56
57
|
})
|
|
57
58
|
});
|
|
58
59
|
}
|
package/lib/Radio/Radio.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
11
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
10
|
var _rcCheckbox = _interopRequireDefault(require("rc-checkbox"));
|
|
13
11
|
var React = _interopRequireWildcard(require("react"));
|
|
14
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
const _excluded = ["className", "style"];
|
|
16
13
|
class Radio extends React.Component {
|
|
17
14
|
render() {
|
|
18
|
-
const
|
|
19
|
-
className
|
|
20
|
-
style
|
|
21
|
-
restProps
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
const {
|
|
16
|
+
className,
|
|
17
|
+
style,
|
|
18
|
+
...restProps
|
|
19
|
+
} = this.props;
|
|
20
|
+
const {
|
|
21
|
+
prefixCls,
|
|
22
|
+
children
|
|
23
|
+
} = restProps;
|
|
24
|
+
const wrapCls = (0, _classnames.default)(`${prefixCls}-wrapper`, className);
|
|
25
25
|
if ('class' in restProps) {
|
|
26
26
|
// Todo https://github.com/developit/preact-compat/issues/422
|
|
27
27
|
/* tslint:disable:no-string-literal */
|
|
@@ -30,16 +30,18 @@ class Radio extends React.Component {
|
|
|
30
30
|
const mark = /*#__PURE__*/(0, _jsxRuntime.jsxs)("label", {
|
|
31
31
|
className: wrapCls,
|
|
32
32
|
style: style,
|
|
33
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_rcCheckbox.default,
|
|
33
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_rcCheckbox.default, {
|
|
34
|
+
...restProps,
|
|
34
35
|
type: "radio"
|
|
35
|
-
})
|
|
36
|
+
}), children]
|
|
36
37
|
});
|
|
37
38
|
if (this.props.wrapLabel) {
|
|
38
39
|
return mark;
|
|
39
40
|
}
|
|
40
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rcCheckbox.default,
|
|
41
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rcCheckbox.default, {
|
|
42
|
+
...this.props,
|
|
41
43
|
type: "radio"
|
|
42
|
-
})
|
|
44
|
+
});
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
47
|
exports.default = Radio;
|
package/lib/Radio/RadioItem.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
11
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
10
|
var React = _interopRequireWildcard(require("react"));
|
|
13
11
|
var _List = _interopRequireDefault(require("../List"));
|
|
14
12
|
var _Radio = _interopRequireDefault(require("./Radio"));
|
|
15
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
const _excluded = ["listPrefixCls", "onChange", "disabled", "radioProps", "onClick"];
|
|
17
14
|
const ListItem = _List.default.Item;
|
|
18
15
|
function noop() {}
|
|
19
16
|
class RadioItem extends React.Component {
|
|
20
17
|
render() {
|
|
21
|
-
const
|
|
22
|
-
listPrefixCls
|
|
23
|
-
onChange
|
|
24
|
-
disabled
|
|
25
|
-
radioProps
|
|
26
|
-
onClick
|
|
27
|
-
otherProps
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
18
|
+
const {
|
|
19
|
+
listPrefixCls,
|
|
20
|
+
onChange,
|
|
21
|
+
disabled,
|
|
22
|
+
radioProps,
|
|
23
|
+
onClick,
|
|
24
|
+
...otherProps
|
|
25
|
+
} = this.props;
|
|
26
|
+
const {
|
|
27
|
+
prefixCls,
|
|
28
|
+
className,
|
|
29
|
+
children
|
|
30
|
+
} = otherProps;
|
|
31
|
+
const wrapCls = (0, _classnames.default)(`${prefixCls}-item`, className, {
|
|
32
|
+
[`${prefixCls}-item-disabled`]: disabled === true
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
// Note: if not omit `onChange`, it will trigger twice on check listitem
|
|
@@ -43,12 +43,16 @@ class RadioItem extends React.Component {
|
|
|
43
43
|
extraProps[i] = this.props[i];
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ListItem,
|
|
46
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ListItem, {
|
|
47
|
+
...otherProps,
|
|
47
48
|
prefixCls: listPrefixCls,
|
|
48
49
|
className: wrapCls,
|
|
49
|
-
extra: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Radio.default,
|
|
50
|
+
extra: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Radio.default, {
|
|
51
|
+
...radioProps,
|
|
52
|
+
...extraProps
|
|
53
|
+
}),
|
|
50
54
|
children: children
|
|
51
|
-
})
|
|
55
|
+
});
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
58
|
exports.default = RadioItem;
|
|
@@ -13,33 +13,33 @@ class RateFormatter extends _react.default.Component {
|
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments);
|
|
15
15
|
this.getRateList = () => {
|
|
16
|
-
const
|
|
17
|
-
data
|
|
18
|
-
value
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
rate_max_number =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
rate_style_type = _ref$rate_style_type === void 0 ? 'dtable-icon-rate' : _ref$rate_style_type;
|
|
16
|
+
const {
|
|
17
|
+
data,
|
|
18
|
+
value
|
|
19
|
+
} = this.props;
|
|
20
|
+
const {
|
|
21
|
+
rate_max_number = 5,
|
|
22
|
+
rate_style_color = '#e5e5e5',
|
|
23
|
+
rate_style_type = 'dtable-icon-rate'
|
|
24
|
+
} = data || {};
|
|
26
25
|
const validValue = Math.min(rate_max_number, value);
|
|
27
26
|
let rateList = [];
|
|
28
27
|
for (let i = 0; i < validValue; i++) {
|
|
29
28
|
rateList.push(/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
30
|
-
className:
|
|
29
|
+
className: `dtable-font ${rate_style_type}`,
|
|
31
30
|
style: {
|
|
32
31
|
color: rate_style_color || '#e5e5e5'
|
|
33
32
|
}
|
|
34
|
-
},
|
|
33
|
+
}, `dtable-ui-component-rate-${i}`));
|
|
35
34
|
}
|
|
36
35
|
return rateList;
|
|
37
36
|
};
|
|
38
37
|
}
|
|
39
38
|
render() {
|
|
40
|
-
const
|
|
41
|
-
number
|
|
42
|
-
containerClassName
|
|
39
|
+
const {
|
|
40
|
+
value: number,
|
|
41
|
+
containerClassName
|
|
42
|
+
} = this.props;
|
|
43
43
|
const className = (0, _classnames.default)('dtable-ui cell-formatter-container rate-formatter', containerClassName);
|
|
44
44
|
if (!number) return null;
|
|
45
45
|
const rateList = this.getRateList();
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
10
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
10
|
var _reactstrap = require("reactstrap");
|
|
12
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -15,19 +14,15 @@ var _DTableDropdownItem = _interopRequireDefault(require("../DTableDropdownItem"
|
|
|
15
14
|
require("./index.css");
|
|
16
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
16
|
const RoleStatusEditor = _ref => {
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const _useState3 = (0, _react.useState)(320),
|
|
28
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
29
|
-
menuMaxHeight = _useState4[0],
|
|
30
|
-
setMenuMaxHeight = _useState4[1];
|
|
17
|
+
let {
|
|
18
|
+
isShowDropdownIcon,
|
|
19
|
+
currentOption,
|
|
20
|
+
menuOptions,
|
|
21
|
+
onChangeOption,
|
|
22
|
+
closeShowDropdownIcon
|
|
23
|
+
} = _ref;
|
|
24
|
+
const [isOpen, setIsOpen] = (0, _react.useState)(false);
|
|
25
|
+
const [menuMaxHeight, setMenuMaxHeight] = (0, _react.useState)(320);
|
|
31
26
|
const toggleRef = (0, _react.useRef)(null);
|
|
32
27
|
(0, _react.useEffect)(() => {
|
|
33
28
|
if (isOpen && toggleRef.current) {
|
|
@@ -39,7 +34,9 @@ const RoleStatusEditor = _ref => {
|
|
|
39
34
|
}
|
|
40
35
|
}, [isOpen]);
|
|
41
36
|
const handleClickMenuOption = menuOption => {
|
|
42
|
-
const
|
|
37
|
+
const {
|
|
38
|
+
value
|
|
39
|
+
} = menuOption;
|
|
43
40
|
closeShowDropdownIcon && closeShowDropdownIcon();
|
|
44
41
|
if (value === currentOption.value) return;
|
|
45
42
|
onChangeOption(value);
|
|
@@ -67,14 +64,16 @@ const RoleStatusEditor = _ref => {
|
|
|
67
64
|
overflowY: 'auto'
|
|
68
65
|
},
|
|
69
66
|
children: menuOptions.map(option => {
|
|
70
|
-
const
|
|
71
|
-
|
|
67
|
+
const {
|
|
68
|
+
value,
|
|
69
|
+
label
|
|
70
|
+
} = option;
|
|
72
71
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableDropdownItem.default, {
|
|
73
72
|
onClick: () => handleClickMenuOption(option),
|
|
74
73
|
showChecked: true,
|
|
75
74
|
checked: currentOption.value === value,
|
|
76
75
|
content: label
|
|
77
|
-
},
|
|
76
|
+
}, `item-${value}`);
|
|
78
77
|
})
|
|
79
78
|
})]
|
|
80
79
|
});
|
package/lib/RowExpand/index.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
10
|
var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
12
11
|
var _RowExpandDialog = _interopRequireDefault(require("../RowExpandDialog"));
|
|
@@ -16,14 +15,16 @@ const RowExpand = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
|
16
15
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
17
16
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
18
17
|
query: '(min-width: 768px)',
|
|
19
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RowExpandDialog.default,
|
|
18
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RowExpandDialog.default, {
|
|
19
|
+
...props,
|
|
20
20
|
ref: ref
|
|
21
|
-
})
|
|
21
|
+
})
|
|
22
22
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
23
23
|
query: '(max-width: 768px)',
|
|
24
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RowExpandView.default,
|
|
24
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RowExpandView.default, {
|
|
25
|
+
...props,
|
|
25
26
|
ref: ref
|
|
26
|
-
})
|
|
27
|
+
})
|
|
27
28
|
})]
|
|
28
29
|
});
|
|
29
30
|
});
|
|
@@ -5,9 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
11
8
|
var _react = _interopRequireDefault(require("react"));
|
|
12
9
|
var _reactstrap = require("reactstrap");
|
|
13
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -19,7 +16,6 @@ var _constants = require("../../constants");
|
|
|
19
16
|
var _utils = require("../../utils/utils");
|
|
20
17
|
require("./index.css");
|
|
21
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
-
const _excluded = ["component", "onChange"];
|
|
23
19
|
class Body extends _react.default.Component {
|
|
24
20
|
constructor(_props) {
|
|
25
21
|
super(_props);
|
|
@@ -65,10 +61,11 @@ class Body extends _react.default.Component {
|
|
|
65
61
|
this.fieldEditorOpen = false;
|
|
66
62
|
};
|
|
67
63
|
this.onHotKey = event => {
|
|
68
|
-
const
|
|
69
|
-
columns
|
|
70
|
-
onKeyDown
|
|
71
|
-
onToggle
|
|
64
|
+
const {
|
|
65
|
+
columns,
|
|
66
|
+
onKeyDown,
|
|
67
|
+
onToggle
|
|
68
|
+
} = this.props;
|
|
72
69
|
const readonly = Array.isArray(columns) && columns.length > 0 ? !columns.some(c => c.editable) : true;
|
|
73
70
|
const keyCode = event.keyCode;
|
|
74
71
|
// When opening field editor, all shortcuts in row expand dialog do not work
|
|
@@ -96,7 +93,9 @@ class Body extends _react.default.Component {
|
|
|
96
93
|
this.onPressTab = event => {
|
|
97
94
|
event.stopPropagation();
|
|
98
95
|
event.preventDefault();
|
|
99
|
-
const
|
|
96
|
+
const {
|
|
97
|
+
columns
|
|
98
|
+
} = this.props;
|
|
100
99
|
let tabIndex = this.state.tabIndex;
|
|
101
100
|
// Press tab, highlight next column;
|
|
102
101
|
if (event.shiftKey) {
|
|
@@ -127,32 +126,42 @@ class Body extends _react.default.Component {
|
|
|
127
126
|
this.props.getDownLoadFiles([{
|
|
128
127
|
url: imageItemUrl
|
|
129
128
|
}]).then(res => {
|
|
130
|
-
const
|
|
131
|
-
downloadUrl = _res$data$urls[0];
|
|
129
|
+
const [downloadUrl] = res.data.urls;
|
|
132
130
|
(0, _utils.downloadFile)(downloadUrl);
|
|
133
131
|
}).catch(error => {
|
|
134
132
|
// todo
|
|
135
133
|
});
|
|
136
134
|
};
|
|
137
135
|
this.getCellValue = _ref => {
|
|
138
|
-
let
|
|
139
|
-
|
|
136
|
+
let {
|
|
137
|
+
row,
|
|
138
|
+
column
|
|
139
|
+
} = _ref;
|
|
140
140
|
if (!row || !column) return null;
|
|
141
|
-
const
|
|
141
|
+
const {
|
|
142
|
+
valueKey
|
|
143
|
+
} = this.props;
|
|
142
144
|
return row[column[valueKey]];
|
|
143
145
|
};
|
|
144
146
|
this.renderColumnValue = (row, column, columnIndex, isEditorFocus) => {
|
|
145
|
-
const
|
|
146
|
-
component
|
|
147
|
-
onChange
|
|
148
|
-
props
|
|
149
|
-
|
|
150
|
-
const
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
147
|
+
const {
|
|
148
|
+
component,
|
|
149
|
+
onChange,
|
|
150
|
+
...props
|
|
151
|
+
} = this.props;
|
|
152
|
+
const {
|
|
153
|
+
getDownLoadFiles
|
|
154
|
+
} = props;
|
|
155
|
+
const {
|
|
156
|
+
editable
|
|
157
|
+
} = column;
|
|
158
|
+
const {
|
|
159
|
+
editor,
|
|
160
|
+
formatter
|
|
161
|
+
} = component || {};
|
|
154
162
|
if (editable) {
|
|
155
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RowExpandEditor.default,
|
|
163
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RowExpandEditor.default, {
|
|
164
|
+
...props,
|
|
156
165
|
column: column,
|
|
157
166
|
row: row,
|
|
158
167
|
component: editor,
|
|
@@ -163,14 +172,15 @@ class Body extends _react.default.Component {
|
|
|
163
172
|
onCommit: value => onChange(column, value),
|
|
164
173
|
onEditorOpen: this.onEditorOpen,
|
|
165
174
|
onEditorClose: this.onEditorClose
|
|
166
|
-
})
|
|
175
|
+
});
|
|
167
176
|
}
|
|
168
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RowExpandFormatter.default,
|
|
177
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RowExpandFormatter.default, {
|
|
178
|
+
...props,
|
|
169
179
|
column: column,
|
|
170
180
|
row: row,
|
|
171
181
|
component: formatter,
|
|
172
182
|
downloadImage: getDownLoadFiles ? this.downloadImage : null
|
|
173
|
-
})
|
|
183
|
+
});
|
|
174
184
|
};
|
|
175
185
|
this.renderColumnContent = (row, column, columnIndex) => {
|
|
176
186
|
const isEditorFocus = columnIndex === this.state.tabIndex && column.editable;
|
|
@@ -183,17 +193,20 @@ class Body extends _react.default.Component {
|
|
|
183
193
|
});
|
|
184
194
|
};
|
|
185
195
|
this.renderChildren = () => {
|
|
186
|
-
const
|
|
187
|
-
columns
|
|
188
|
-
row
|
|
189
|
-
children
|
|
196
|
+
const {
|
|
197
|
+
columns,
|
|
198
|
+
row,
|
|
199
|
+
children
|
|
200
|
+
} = this.props;
|
|
190
201
|
const props = {
|
|
191
202
|
columns,
|
|
192
203
|
row
|
|
193
204
|
};
|
|
194
205
|
const CustomChildren = children;
|
|
195
206
|
if (/*#__PURE__*/_react.default.isValidElement(CustomChildren)) return /*#__PURE__*/_react.default.cloneElement(CustomChildren, props);
|
|
196
|
-
if ((0, _utils.isFunction)(CustomChildren)) return /*#__PURE__*/(0, _jsxRuntime.jsx)(CustomChildren,
|
|
207
|
+
if ((0, _utils.isFunction)(CustomChildren)) return /*#__PURE__*/(0, _jsxRuntime.jsx)(CustomChildren, {
|
|
208
|
+
...props
|
|
209
|
+
});
|
|
197
210
|
return children;
|
|
198
211
|
};
|
|
199
212
|
this.state = {
|
|
@@ -216,10 +229,11 @@ class Body extends _react.default.Component {
|
|
|
216
229
|
window.removeEventListener('keydown', this.onHotKey);
|
|
217
230
|
}
|
|
218
231
|
render() {
|
|
219
|
-
const
|
|
220
|
-
columns
|
|
221
|
-
row
|
|
222
|
-
placeholder
|
|
232
|
+
const {
|
|
233
|
+
columns,
|
|
234
|
+
row,
|
|
235
|
+
placeholder
|
|
236
|
+
} = this.props;
|
|
223
237
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.ModalBody, {
|
|
224
238
|
className: "dtable-ui-row-expand-body",
|
|
225
239
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -228,12 +242,15 @@ class Body extends _react.default.Component {
|
|
|
228
242
|
children: [columns.length === 0 && placeholder && /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
229
243
|
children: placeholder
|
|
230
244
|
}), columns.map((column, index) => {
|
|
231
|
-
const
|
|
232
|
-
|
|
245
|
+
const {
|
|
246
|
+
type,
|
|
247
|
+
data
|
|
248
|
+
} = column;
|
|
233
249
|
let isHasMore = false;
|
|
234
250
|
if (type === _dtableUtils.CellType.LINK_FORMULA) {
|
|
235
|
-
let
|
|
236
|
-
array_type
|
|
251
|
+
let {
|
|
252
|
+
array_type
|
|
253
|
+
} = data || {};
|
|
237
254
|
const value = this.getCellValue({
|
|
238
255
|
row,
|
|
239
256
|
column
|
|
@@ -13,12 +13,16 @@ var _DTableColumnIcon = _interopRequireDefault(require("../../DTableColumnIcon")
|
|
|
13
13
|
require("./index.css");
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
const ColumnContent = _ref => {
|
|
16
|
-
let
|
|
17
|
-
|
|
16
|
+
let {
|
|
17
|
+
column,
|
|
18
|
+
children
|
|
19
|
+
} = _ref;
|
|
18
20
|
const descriptionRef = (0, _react.useRef)(null);
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
const {
|
|
22
|
+
name,
|
|
23
|
+
key,
|
|
24
|
+
description
|
|
25
|
+
} = column;
|
|
22
26
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.Row, {
|
|
23
27
|
className: "dtable-ui-row-expand-column-content pb-4",
|
|
24
28
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.Col, {
|
|
@@ -26,7 +30,7 @@ const ColumnContent = _ref => {
|
|
|
26
30
|
className: "dtable-ui-row-expand-column-content-info d-flex",
|
|
27
31
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
28
32
|
className: "dtable-ui-header-icon",
|
|
29
|
-
id:
|
|
33
|
+
id: `header-icon-${key}`,
|
|
30
34
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableColumnIcon.default, {
|
|
31
35
|
column: column
|
|
32
36
|
})
|