dtable-ui-component 6.0.126-beta.s1 → 6.0.126
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 +14 -16
- package/lib/ActivityIndicator/index.js +7 -8
- package/lib/AsyncUserSelect/index.css +19 -46
- package/lib/AsyncUserSelect/index.js +58 -41
- package/lib/AsyncUserSelect/user-item.js +5 -6
- package/lib/AutoNumberFormatter/index.js +3 -4
- package/lib/Badge/index.js +9 -11
- package/lib/ButtonFormatter/index.js +6 -8
- package/lib/CTimeFormatter/index.js +3 -4
- package/lib/CheckboxEditor/index.js +1 -3
- package/lib/CheckboxEditor/mb-editor.js +9 -20
- package/lib/CheckboxEditor/pc-editor.js +12 -24
- package/lib/CheckboxFormatter/index.js +4 -5
- package/lib/CollaboratorEditor/index.js +2 -4
- package/lib/CollaboratorEditor/mb-editor/index.js +11 -19
- package/lib/CollaboratorEditor/pc-editor/index.js +25 -34
- package/lib/CollaboratorFormatter/index.js +8 -10
- package/lib/CollaboratorItem/index.js +4 -5
- package/lib/CollapsibleSettingLayout/index.js +9 -7
- package/lib/Comment/body/comment.js +10 -18
- package/lib/Comment/body/index.js +2 -4
- package/lib/Comment/footer/btns/index.js +4 -7
- package/lib/Comment/footer/index.js +9 -20
- package/lib/Comment/footer/input/index.js +29 -50
- package/lib/Comment/footer/input/participant/index.js +4 -5
- package/lib/Comment/footer/participants/index.js +4 -5
- package/lib/Comment/footer/participants/participant/index.js +1 -3
- package/lib/Comment/footer/participants/participant-select/index.js +8 -24
- package/lib/Comment/index.js +39 -57
- package/lib/Comment/utils/utilities.js +15 -21
- package/lib/CreatorFormatter/index.js +6 -8
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +23 -19
- package/lib/DTableColorPicker/index.css +0 -2
- package/lib/DTableColorPicker/index.js +56 -41
- package/lib/DTableColorPicker/utils.js +4 -6
- package/lib/DTableColumnIcon/index.js +6 -7
- package/lib/DTableCommonAddTool/index.css +1 -3
- package/lib/DTableCommonAddTool/index.js +6 -8
- package/lib/DTableCustomFooter/index.css +1 -3
- package/lib/DTableCustomFooter/index.js +1 -3
- package/lib/DTableCustomizeCollaboratorSelect/index.js +17 -20
- package/lib/DTableCustomizeSelect/index.css +43 -67
- package/lib/DTableCustomizeSelect/index.js +29 -40
- package/lib/DTableDropdownItem/index.js +16 -18
- package/lib/DTableDropdownMenu/index.js +8 -10
- package/lib/DTableEmptyTip/index.js +4 -5
- package/lib/DTableFiltersPopover/index.css +0 -2
- package/lib/DTableFiltersPopover/index.js +26 -41
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -5
- package/lib/DTableFiltersPopover/utils/index.js +63 -113
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +9 -10
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +16 -13
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +18 -15
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +8 -14
- package/lib/DTableFiltersPopover/widgets/filter-group.js +34 -55
- package/lib/DTableFiltersPopover/widgets/filter-item.js +107 -170
- package/lib/DTableFiltersPopover/widgets/filter-list/index.css +5 -5
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +136 -161
- package/lib/DTableFiltersPopover/widgets/rate-item.js +15 -20
- package/lib/DTableGroupSelect/index.css +5 -31
- package/lib/DTableGroupSelect/index.js +13 -17
- package/lib/DTableGroupSelect/select-option-group.css +15 -11
- package/lib/DTableGroupSelect/select-option-group.js +31 -43
- package/lib/DTableIcon/index.js +6 -7
- package/lib/DTableIcon/svg-icon.js +5 -7
- package/lib/DTableModalHeader/index.js +1 -3
- package/lib/DTablePopover/index.js +13 -16
- package/lib/DTableRadio/index.js +10 -9
- package/lib/DTableRadioGroup/index.js +8 -17
- package/lib/DTableSearchInput/index.js +19 -29
- package/lib/DTableSelect/dtable-select-label.css +4 -4
- package/lib/DTableSelect/dtable-select-label.js +7 -6
- package/lib/DTableSelect/index.js +24 -25
- package/lib/DTableSelect/user-select.css +46 -7
- package/lib/DTableSelect/utils.js +82 -179
- package/lib/DTableSubDropdownMenu/index.js +8 -10
- package/lib/DTableSubDropdownToggle/index.js +12 -12
- package/lib/DTableSwitch/index.css +0 -1
- package/lib/DTableSwitch/index.js +12 -11
- package/lib/DTableToolTip/index.js +7 -8
- package/lib/DateEditor/index.js +20 -15
- package/lib/DateEditor/mb-editor/index.js +18 -31
- package/lib/DateEditor/pc-editor.js +26 -45
- package/lib/DateFormatter/index.js +4 -5
- package/lib/DatePicker/index.js +9 -15
- package/lib/DatePicker/utils.js +1 -3
- package/lib/DeleteTip/index.js +5 -6
- package/lib/DepartmentMultipleSelectEditor/index.js +25 -23
- package/lib/DepartmentSelectFilter/index.js +6 -8
- package/lib/DepartmentSingleSelectEditor/index.js +1 -3
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +48 -47
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +36 -58
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +13 -19
- package/lib/DepartmentSingleSelectFormatter/index.js +4 -6
- package/lib/DigitalSignEditor/index.js +1 -3
- package/lib/DigitalSignEditor/mb-editor/index.js +12 -20
- package/lib/DigitalSignEditor/pc-editor/index.js +17 -24
- package/lib/DigitalSignEditor/service.js +2 -4
- package/lib/DigitalSignEditor/signature-board/index.js +5 -8
- package/lib/DigitalSignEditor/utils.js +2 -4
- package/lib/DigitalSignFormatter/index.js +12 -15
- package/lib/DigitalSignFormatter/utils.js +4 -5
- package/lib/DurationEditor/index.js +21 -31
- package/lib/DurationFormatter/index.js +4 -5
- package/lib/EditEditorButton/index.js +1 -3
- package/lib/EmailFormatter/index.js +3 -4
- package/lib/FieldDisplaySetting/field-item.js +12 -12
- package/lib/FieldDisplaySetting/index.js +11 -9
- package/lib/FileEditor/files-previewer/index.js +1 -3
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +10 -18
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +7 -8
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +3 -4
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +5 -6
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +14 -21
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +29 -57
- package/lib/FileEditor/index.js +1 -3
- package/lib/FileEditor/mb-editor/index.js +28 -20
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -3
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +11 -25
- package/lib/FileEditor/pc-editor/index.js +19 -27
- package/lib/FileFormatter/index.js +26 -19
- package/lib/FileItemFormatter/index.js +6 -9
- package/lib/FileUploader/index.js +28 -45
- package/lib/FormulaFormatter/index.js +15 -29
- package/lib/GeolocationEditor/index.js +11 -12
- package/lib/GeolocationEditor/map-editor-utils.js +17 -15
- package/lib/GeolocationEditor/mb-editor/country-editor.js +17 -14
- package/lib/GeolocationEditor/mb-editor/index.js +4 -6
- package/lib/GeolocationEditor/mb-editor/location-editor.js +18 -15
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +41 -68
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +50 -89
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +17 -14
- package/lib/GeolocationEditor/mb-editor/province-editor.js +17 -14
- package/lib/GeolocationEditor/pc-editor/country-editor.js +10 -23
- package/lib/GeolocationEditor/pc-editor/index.js +12 -20
- package/lib/GeolocationEditor/pc-editor/location-editor.js +26 -31
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +34 -54
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +36 -60
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +35 -62
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +36 -65
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +19 -25
- package/lib/GeolocationEditor/pc-editor/province-editor.js +6 -13
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +5 -6
- package/lib/GeolocationEditor/pc-editor/selector-list.js +6 -7
- package/lib/GeolocationFormatter/index.js +4 -5
- package/lib/HtmlLongTextFormatter/index.js +4 -12
- package/lib/Icon/index.js +3 -5
- package/lib/IconButton/index.js +4 -6
- package/lib/ImageEditor/images-previewer/image-preview/index.js +12 -21
- package/lib/ImageEditor/images-previewer/index.js +3 -9
- package/lib/ImageEditor/index.js +1 -3
- package/lib/ImageEditor/mb-editor/index.js +28 -20
- package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +2 -6
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +1 -3
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +7 -21
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +3 -9
- package/lib/ImageEditor/pc-editor/index.js +11 -16
- package/lib/ImageFormatter/images-lazy-load.js +19 -11
- package/lib/ImageFormatter/index.js +11 -13
- package/lib/ImagePreviewerLightbox/index.js +15 -13
- package/lib/ImageThumbnail/index.js +10 -13
- package/lib/InputItem/custom-input.js +26 -46
- package/lib/InputItem/custom-keyboard.js +15 -18
- package/lib/InputItem/index.js +34 -50
- package/lib/InputItem/input.js +2 -4
- package/lib/LastModifierFormatter/index.js +6 -8
- package/lib/LinkEditor/index.js +33 -53
- package/lib/LinkEditor/link-editor-option.js +3 -4
- package/lib/LinkEditor/mb-popover/index.js +9 -22
- package/lib/LinkEditor/pc-popover/index.js +5 -10
- package/lib/LinkFormatter/index.js +21 -37
- package/lib/List/index.js +6 -8
- package/lib/List/list-item.js +22 -28
- package/lib/LongTextFormatter/index.js +4 -5
- package/lib/MBEditorHeader/index.js +7 -8
- package/lib/MTimeFormatter/index.js +3 -4
- package/lib/MobileFullScreenPage/body/index.js +3 -5
- package/lib/MobileFullScreenPage/header/index.js +4 -6
- package/lib/MobileFullScreenPage/index.js +13 -11
- package/lib/MobileModal/index.js +1 -3
- package/lib/MobileOperationSheet/index.js +7 -8
- package/lib/MobileSelector/empty/index.js +1 -3
- package/lib/MobileSelector/index.js +5 -7
- package/lib/MobileSelector/option/index.js +3 -5
- package/lib/MobileSelector/options/index.js +1 -3
- package/lib/MobileSelector/search/index.js +3 -5
- package/lib/MobileUpload/index.js +4 -5
- package/lib/Modal/modal.js +14 -15
- package/lib/Modal/prompt.js +4 -4
- package/lib/MultipleSelectEditor/index.js +1 -3
- package/lib/MultipleSelectFormatter/index.js +6 -8
- package/lib/NotificationPopover/index.css +1 -6
- package/lib/NotificationPopover/index.js +6 -7
- package/lib/NumberEditor/index.js +12 -21
- package/lib/NumberFormatter/index.js +4 -5
- package/lib/PhoneNumberLink/index.js +2 -4
- package/lib/Picker/AbstractPicker.js +23 -27
- package/lib/Popover/index.js +3 -4
- package/lib/Popover/item.js +7 -9
- package/lib/Progress/index.js +9 -8
- package/lib/Radio/Radio.js +4 -8
- package/lib/Radio/RadioItem.js +8 -12
- package/lib/RateFormatter/index.js +13 -13
- package/lib/RoleStatusEditor/index.js +18 -17
- package/lib/RowExpandDialog/body/index.js +32 -49
- package/lib/RowExpandDialog/column-content/index.js +5 -9
- package/lib/RowExpandDialog/header/index.js +6 -8
- package/lib/RowExpandDialog/index.js +49 -34
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +4 -5
- package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +8 -10
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +22 -33
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +26 -40
- package/lib/RowExpandEditor/date-editor/mb-editor.js +12 -18
- package/lib/RowExpandEditor/date-editor/pc-editor.js +15 -20
- package/lib/RowExpandEditor/department-editor/mb-editor.js +16 -11
- package/lib/RowExpandEditor/department-editor/pc-editor.js +19 -14
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +20 -34
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +21 -35
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +10 -17
- package/lib/RowExpandEditor/duration-editor/pc-editor.js +13 -19
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +9 -19
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +13 -24
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +18 -31
- package/lib/RowExpandEditor/file-editor/pc-editor/index.js +16 -23
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +17 -29
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +13 -26
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +15 -25
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +13 -23
- package/lib/RowExpandEditor/index.js +4 -8
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +17 -18
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +10 -16
- package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +16 -23
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +11 -19
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +22 -33
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +8 -14
- package/lib/RowExpandEditor/number-editor/pc-editor.js +13 -20
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +12 -25
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +20 -36
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +17 -28
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +22 -34
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +4 -5
- package/lib/RowExpandEditor/text-editor/pc-editor/index.js +15 -26
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +5 -13
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +9 -18
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +2 -4
- package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +2 -4
- package/lib/RowExpandFormatter/email-formatter/index.js +4 -7
- package/lib/RowExpandFormatter/file-formatter/index.js +8 -9
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +10 -12
- package/lib/RowExpandFormatter/formula-formatter/index.js +19 -34
- package/lib/RowExpandFormatter/image-formatter/index.js +9 -11
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +7 -8
- package/lib/RowExpandFormatter/index.js +27 -41
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +8 -14
- package/lib/RowExpandFormatter/link-formatter/index.js +11 -19
- package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +3 -5
- package/lib/RowExpandFormatter/rate-formatter/index.js +11 -12
- package/lib/RowExpandFormatter/text/index.js +4 -5
- package/lib/RowExpandFormatter/url-formatter/index.js +4 -7
- package/lib/RowExpandView/body/index.js +22 -35
- package/lib/RowExpandView/column-content/index.js +3 -7
- package/lib/RowExpandView/index.js +42 -30
- package/lib/SelectItem/index.js +5 -7
- package/lib/SelectOptionGroup/index.css +25 -53
- package/lib/SelectOptionGroup/index.js +36 -84
- package/lib/SelectedDepartments/index.js +7 -9
- package/lib/SimpleLongTextFormatter/index.js +10 -16
- package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +3 -4
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +12 -21
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +3 -4
- package/lib/SingleSelectEditor/index.js +1 -3
- package/lib/SingleSelectFormatter/index.js +8 -9
- package/lib/TabBar/Tab.js +14 -16
- package/lib/TabBar/index.js +18 -21
- package/lib/Tabs/index.js +1 -3
- package/lib/TextEditor/index.js +14 -23
- package/lib/TextFormatter/index.js +3 -4
- package/lib/TextareaItem/index.js +19 -26
- package/lib/Toast/index.js +3 -4
- package/lib/UrlFormatter/index.js +3 -4
- package/lib/common/editor-base.js +7 -12
- package/lib/hooks/common-hooks.js +2 -4
- package/lib/index.js +0 -7
- package/lib/select-editor/index.js +1 -3
- package/lib/select-editor/mb-editor/index.js +17 -28
- package/lib/select-editor/pc-editor/index.js +27 -42
- package/lib/toaster/alert.js +6 -7
- package/lib/toaster/toast.js +2 -3
- package/lib/toaster/toastManager.js +2 -4
- package/lib/utils/cell.js +8 -11
- package/lib/utils/column-utils.js +8 -14
- package/lib/utils/departments.js +1 -3
- package/lib/utils/url.js +24 -31
- package/lib/utils/utils.js +2 -6
- package/package.json +8 -8
- package/lib/DTableCustomizeSearchInput/index.css +0 -81
- package/lib/DTableCustomizeSearchInput/index.js +0 -141
- package/lib/DTableCustomizeSelect/select-option-group/KeyCodes.js +0 -109
- package/lib/DTableCustomizeSelect/select-option-group/index.css +0 -134
- package/lib/DTableCustomizeSelect/select-option-group/index.js +0 -260
- package/lib/DTableCustomizeSelect/select-option-group/option.js +0 -48
- package/lib/DTableCustomizeSelect/util.js +0 -12
- package/lib/DTableSelect/select-dropdown-indicator/index.css +0 -16
- package/lib/DTableSelect/select-dropdown-indicator/index.js +0 -26
- package/lib/DTableSelect/select-style.js +0 -133
- package/lib/assets/icons/close.svg +0 -1
- package/lib/assets/icons/down.svg +0 -3
|
@@ -11,11 +11,9 @@ var _List = _interopRequireDefault(require("../../List"));
|
|
|
11
11
|
require("./index.css");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
const Option = _ref => {
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
onChange
|
|
18
|
-
} = _ref;
|
|
14
|
+
let isSelected = _ref.isSelected,
|
|
15
|
+
children = _ref.children,
|
|
16
|
+
onChange = _ref.onChange;
|
|
19
17
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_List.default.Item, {
|
|
20
18
|
onClick: onChange,
|
|
21
19
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -9,9 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
require("./index.css");
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
const Options = _ref => {
|
|
12
|
-
let
|
|
13
|
-
children
|
|
14
|
-
} = _ref;
|
|
12
|
+
let children = _ref.children;
|
|
15
13
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
16
14
|
className: "dtable-ui-mobile-selector-options",
|
|
17
15
|
children: children
|
|
@@ -10,11 +10,9 @@ var _DTableSearchInput = _interopRequireDefault(require("../../DTableSearchInput
|
|
|
10
10
|
require("./index.css");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
const Search = _ref => {
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
onChange
|
|
17
|
-
} = _ref;
|
|
13
|
+
let value = _ref.value,
|
|
14
|
+
placeholder = _ref.placeholder,
|
|
15
|
+
onChange = _ref.onChange;
|
|
18
16
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
19
17
|
className: "dtable-ui-mobile-selector-search",
|
|
20
18
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableSearchInput.default, {
|
|
@@ -12,11 +12,10 @@ var _lang = require("../lang");
|
|
|
12
12
|
require("./index.css");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
const MobileUpload = _ref => {
|
|
15
|
-
let
|
|
16
|
-
type = 'file',
|
|
17
|
-
onChange,
|
|
18
|
-
onClose
|
|
19
|
-
} = _ref;
|
|
15
|
+
let _ref$type = _ref.type,
|
|
16
|
+
type = _ref$type === void 0 ? 'file' : _ref$type,
|
|
17
|
+
onChange = _ref.onChange,
|
|
18
|
+
onClose = _ref.onClose;
|
|
20
19
|
const actionSheet = (0, _react.useRef)(_ActionSheet.default);
|
|
21
20
|
const imageRef = (0, _react.useRef)(null);
|
|
22
21
|
const fileRef = (0, _react.useRef)(null);
|
package/lib/Modal/modal.js
CHANGED
|
@@ -51,21 +51,20 @@ class Modal extends ModalComponent {
|
|
|
51
51
|
}
|
|
52
52
|
render() {
|
|
53
53
|
const _this$props = this.props,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
} = _this$props,
|
|
54
|
+
prefixCls = _this$props.prefixCls,
|
|
55
|
+
className = _this$props.className,
|
|
56
|
+
wrapClassName = _this$props.wrapClassName,
|
|
57
|
+
transitionName = _this$props.transitionName,
|
|
58
|
+
maskTransitionName = _this$props.maskTransitionName,
|
|
59
|
+
style = _this$props.style,
|
|
60
|
+
platform = _this$props.platform,
|
|
61
|
+
_this$props$footer = _this$props.footer,
|
|
62
|
+
footer = _this$props$footer === void 0 ? [] : _this$props$footer,
|
|
63
|
+
operation = _this$props.operation,
|
|
64
|
+
animated = _this$props.animated,
|
|
65
|
+
transparent = _this$props.transparent,
|
|
66
|
+
popup = _this$props.popup,
|
|
67
|
+
animationType = _this$props.animationType,
|
|
69
68
|
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
70
69
|
const btnGroupClass = (0, _classnames.default)("".concat(prefixCls, "-button-group-").concat(footer.length === 2 && !operation ? 'h' : 'v'), "".concat(prefixCls, "-button-group-").concat(operation ? 'operation' : 'normal'));
|
|
71
70
|
const footerDom = footer.length ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
package/lib/Modal/prompt.js
CHANGED
|
@@ -147,10 +147,10 @@ function prompt(title, message, callbackOrActions) {
|
|
|
147
147
|
if (typeof callback !== 'function') {
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
|
-
const
|
|
151
|
-
text = '',
|
|
152
|
-
password =
|
|
153
|
-
|
|
150
|
+
const _data$text = data.text,
|
|
151
|
+
text = _data$text === void 0 ? '' : _data$text,
|
|
152
|
+
_data$password = data.password,
|
|
153
|
+
password = _data$password === void 0 ? '' : _data$password;
|
|
154
154
|
const callbackArgs = type === 'login-password' ? [text, password] : type === 'secure-text' ? [password] : [text];
|
|
155
155
|
return callback(...callbackArgs);
|
|
156
156
|
}
|
|
@@ -13,9 +13,7 @@ var _selectEditor = _interopRequireDefault(require("../select-editor"));
|
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
const _excluded = ["value"];
|
|
15
15
|
const MultipleSelectEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
16
|
-
let
|
|
17
|
-
value: oldValue
|
|
18
|
-
} = _ref,
|
|
16
|
+
let oldValue = _ref.value,
|
|
19
17
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
20
18
|
const value = oldValue ? Array.isArray(oldValue) ? oldValue : [oldValue] : [];
|
|
21
19
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_selectEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
@@ -14,10 +14,9 @@ class MultipleSelectFormatter extends _react.default.PureComponent {
|
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
16
16
|
this.getOptions = () => {
|
|
17
|
-
const
|
|
18
|
-
value,
|
|
19
|
-
options
|
|
20
|
-
} = this.props;
|
|
17
|
+
const _this$props = this.props,
|
|
18
|
+
value = _this$props.value,
|
|
19
|
+
options = _this$props.options;
|
|
21
20
|
if (!Array.isArray(value) || !Array.isArray(options)) return [];
|
|
22
21
|
let selectedOptions = options.filter(option => value.includes(option.id) || value.includes(option.name));
|
|
23
22
|
if (selectedOptions.length === 0) return [];
|
|
@@ -29,10 +28,9 @@ class MultipleSelectFormatter extends _react.default.PureComponent {
|
|
|
29
28
|
};
|
|
30
29
|
}
|
|
31
30
|
render() {
|
|
32
|
-
let
|
|
33
|
-
value,
|
|
34
|
-
containerClassName
|
|
35
|
-
} = this.props;
|
|
31
|
+
let _this$props2 = this.props,
|
|
32
|
+
value = _this$props2.value,
|
|
33
|
+
containerClassName = _this$props2.containerClassName;
|
|
36
34
|
let classname = (0, _classnames.default)('dtable-ui cell-formatter-container multiple-select-formatter', containerClassName);
|
|
37
35
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
38
36
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
width: 320px;
|
|
9
9
|
right: -10px;
|
|
10
10
|
top: -1px;
|
|
11
|
-
border-radius: 3px;
|
|
12
|
-
box-shadow: 0 0 5px #ccc;
|
|
13
11
|
}
|
|
14
12
|
|
|
15
13
|
.notification-container .notification-header {
|
|
@@ -17,7 +15,7 @@
|
|
|
17
15
|
align-items: center;
|
|
18
16
|
justify-content: center;
|
|
19
17
|
height: 50px;
|
|
20
|
-
border-bottom: 1px solid
|
|
18
|
+
border-bottom: 1px solid var(--bs-border-secondary-color);
|
|
21
19
|
font-size: 16px;
|
|
22
20
|
font-weight: 600;
|
|
23
21
|
position: relative;
|
|
@@ -166,9 +164,6 @@
|
|
|
166
164
|
justify-content: center;
|
|
167
165
|
background: #f9f9f9;
|
|
168
166
|
cursor: pointer;
|
|
169
|
-
border-bottom-right-radius: 3px;
|
|
170
|
-
border-bottom-left-radius: 3px;
|
|
171
|
-
border-top: 1px solid #ededed;
|
|
172
167
|
}
|
|
173
168
|
|
|
174
169
|
.notification-body .notification-footer:hover {
|
|
@@ -43,11 +43,10 @@ class NotificationPopover extends _react.default.Component {
|
|
|
43
43
|
document.removeEventListener('mousedown', this.onMouseDown);
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
|
-
const
|
|
47
|
-
headerText,
|
|
48
|
-
bodyText,
|
|
49
|
-
footerText
|
|
50
|
-
} = this.props;
|
|
46
|
+
const _this$props = this.props,
|
|
47
|
+
headerText = _this$props.headerText,
|
|
48
|
+
bodyText = _this$props.bodyText,
|
|
49
|
+
footerText = _this$props.footerText;
|
|
51
50
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.Popover, {
|
|
52
51
|
className: "notification-wrapper",
|
|
53
52
|
target: "notification-popover",
|
|
@@ -56,7 +55,7 @@ class NotificationPopover extends _react.default.Component {
|
|
|
56
55
|
hideArrow: true,
|
|
57
56
|
placement: "bottom",
|
|
58
57
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
59
|
-
className: "notification-container",
|
|
58
|
+
className: "notification-container dtable-popover-container",
|
|
60
59
|
ref: ref => this.notificationContainerRef = ref,
|
|
61
60
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
62
61
|
className: "notification-header",
|
|
@@ -88,7 +87,7 @@ class NotificationPopover extends _react.default.Component {
|
|
|
88
87
|
children: this.props.children
|
|
89
88
|
})
|
|
90
89
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
91
|
-
className: "notification-footer",
|
|
90
|
+
className: "notification-footer dtable-popover-footer",
|
|
92
91
|
onClick: this.onNotificationDialogToggle,
|
|
93
92
|
children: footerText
|
|
94
93
|
})]
|
|
@@ -14,9 +14,7 @@ class NumberEditor extends _react.default.Component {
|
|
|
14
14
|
constructor(props) {
|
|
15
15
|
super(props);
|
|
16
16
|
this.onChange = event => {
|
|
17
|
-
const
|
|
18
|
-
data
|
|
19
|
-
} = this.props.column; // data maybe 'null'
|
|
17
|
+
const data = this.props.column.data; // data maybe 'null'
|
|
20
18
|
const format = data && data.format ? data.format : _dtableUtils.DEFAULT_NUMBER_FORMAT;
|
|
21
19
|
let currency_symbol = null;
|
|
22
20
|
if (data && data.format === 'custom_currency') {
|
|
@@ -35,11 +33,10 @@ class NumberEditor extends _react.default.Component {
|
|
|
35
33
|
});
|
|
36
34
|
};
|
|
37
35
|
this.onKeyDown = event => {
|
|
38
|
-
let
|
|
39
|
-
selectionStart,
|
|
40
|
-
selectionEnd,
|
|
41
|
-
value
|
|
42
|
-
} = event.currentTarget;
|
|
36
|
+
let _event$currentTarget = event.currentTarget,
|
|
37
|
+
selectionStart = _event$currentTarget.selectionStart,
|
|
38
|
+
selectionEnd = _event$currentTarget.selectionEnd,
|
|
39
|
+
value = _event$currentTarget.value;
|
|
43
40
|
if (event.keyCode === _constants.KeyCodes.Enter || event.keyCode === _constants.KeyCodes.Esc) {
|
|
44
41
|
event.preventDefault();
|
|
45
42
|
this.onBlur();
|
|
@@ -50,9 +47,7 @@ class NumberEditor extends _react.default.Component {
|
|
|
50
47
|
};
|
|
51
48
|
this.getValue = () => {
|
|
52
49
|
const value = this.getInputNode().value;
|
|
53
|
-
const
|
|
54
|
-
column
|
|
55
|
-
} = this.props;
|
|
50
|
+
const column = this.props.column;
|
|
56
51
|
return (0, _dtableUtils.formatStringToNumber)(value, column.data);
|
|
57
52
|
};
|
|
58
53
|
this.getInputNode = () => {
|
|
@@ -83,22 +78,18 @@ class NumberEditor extends _react.default.Component {
|
|
|
83
78
|
if (this.props.isInModal) {
|
|
84
79
|
this.input.focus();
|
|
85
80
|
}
|
|
86
|
-
const
|
|
87
|
-
data = {}
|
|
88
|
-
|
|
89
|
-
let {
|
|
90
|
-
value
|
|
91
|
-
} = this.state;
|
|
81
|
+
const _this$props$column$da = this.props.column.data,
|
|
82
|
+
data = _this$props$column$da === void 0 ? {} : _this$props$column$da;
|
|
83
|
+
let value = this.state.value;
|
|
92
84
|
value = (0, _dtableUtils.getNumberDisplayString)(value, data) || '';
|
|
93
85
|
this.setState({
|
|
94
86
|
value
|
|
95
87
|
});
|
|
96
88
|
}
|
|
97
89
|
render() {
|
|
98
|
-
const
|
|
99
|
-
isInModal,
|
|
100
|
-
readOnly
|
|
101
|
-
} = this.props;
|
|
90
|
+
const _this$props = this.props,
|
|
91
|
+
isInModal = _this$props.isInModal,
|
|
92
|
+
readOnly = _this$props.readOnly;
|
|
102
93
|
let style = isInModal ? {
|
|
103
94
|
textAlign: 'left',
|
|
104
95
|
width: '320px'
|
|
@@ -12,11 +12,10 @@ require("./index.css");
|
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
class NumberFormatter extends _react.default.Component {
|
|
14
14
|
render() {
|
|
15
|
-
let
|
|
16
|
-
value
|
|
17
|
-
data,
|
|
18
|
-
containerClassName
|
|
19
|
-
} = this.props;
|
|
15
|
+
let _this$props = this.props,
|
|
16
|
+
number = _this$props.value,
|
|
17
|
+
data = _this$props.data,
|
|
18
|
+
containerClassName = _this$props.containerClassName;
|
|
20
19
|
let classname = (0, _classnames.default)('dtable-ui cell-formatter-container number-formatter', containerClassName);
|
|
21
20
|
if (number || number === 0) {
|
|
22
21
|
number = (0, _dtableUtils.getNumberDisplayString)(number, data);
|
|
@@ -9,10 +9,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
9
9
|
var _DTableIcon = _interopRequireDefault(require("../DTableIcon"));
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
const PhoneNumberLink = _ref => {
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
className
|
|
15
|
-
} = _ref;
|
|
12
|
+
let phoneNumber = _ref.phoneNumber,
|
|
13
|
+
className = _ref.className;
|
|
16
14
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
17
15
|
className: (0, _classnames.default)(className),
|
|
18
16
|
href: "tel:".concat(typeof phoneNumber === 'string' ? phoneNumber.trim() : ''),
|
|
@@ -44,9 +44,7 @@ class AbstractPicker extends React.Component {
|
|
|
44
44
|
this.getSel = () => {
|
|
45
45
|
const value = this.props.value || [];
|
|
46
46
|
let treeChildren;
|
|
47
|
-
const
|
|
48
|
-
data
|
|
49
|
-
} = this.props;
|
|
47
|
+
const data = this.props.data;
|
|
50
48
|
if (this.props.cascade) {
|
|
51
49
|
treeChildren = (0, _arrayTreeFilter.default)(data, (c, level) => {
|
|
52
50
|
return c.value === value[level];
|
|
@@ -61,12 +59,11 @@ class AbstractPicker extends React.Component {
|
|
|
61
59
|
}));
|
|
62
60
|
};
|
|
63
61
|
this.getPickerCol = () => {
|
|
64
|
-
const
|
|
65
|
-
data,
|
|
66
|
-
pickerPrefixCls,
|
|
67
|
-
itemStyle,
|
|
68
|
-
indicatorStyle
|
|
69
|
-
} = this.props;
|
|
62
|
+
const _this$props = this.props,
|
|
63
|
+
data = _this$props.data,
|
|
64
|
+
pickerPrefixCls = _this$props.pickerPrefixCls,
|
|
65
|
+
itemStyle = _this$props.itemStyle,
|
|
66
|
+
indicatorStyle = _this$props.indicatorStyle;
|
|
70
67
|
return data.map((col, index) => {
|
|
71
68
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Picker.default, {
|
|
72
69
|
prefixCls: pickerPrefixCls,
|
|
@@ -128,24 +125,23 @@ class AbstractPicker extends React.Component {
|
|
|
128
125
|
};
|
|
129
126
|
}
|
|
130
127
|
render() {
|
|
131
|
-
const _this$
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
128
|
+
const _this$props2 = this.props,
|
|
129
|
+
children = _this$props2.children,
|
|
130
|
+
_this$props2$value = _this$props2.value,
|
|
131
|
+
value = _this$props2$value === void 0 ? [] : _this$props2$value,
|
|
132
|
+
popupPrefixCls = _this$props2.popupPrefixCls,
|
|
133
|
+
itemStyle = _this$props2.itemStyle,
|
|
134
|
+
indicatorStyle = _this$props2.indicatorStyle,
|
|
135
|
+
okText = _this$props2.okText,
|
|
136
|
+
dismissText = _this$props2.dismissText,
|
|
137
|
+
extra = _this$props2.extra,
|
|
138
|
+
cascade = _this$props2.cascade,
|
|
139
|
+
prefixCls = _this$props2.prefixCls,
|
|
140
|
+
pickerPrefixCls = _this$props2.pickerPrefixCls,
|
|
141
|
+
data = _this$props2.data,
|
|
142
|
+
cols = _this$props2.cols,
|
|
143
|
+
onOk = _this$props2.onOk,
|
|
144
|
+
restProps = (0, _objectWithoutProperties2.default)(_this$props2, _excluded);
|
|
149
145
|
|
|
150
146
|
// tslint:disable-next-line:variable-name
|
|
151
147
|
const _locale = (0, _getLocale.getComponentLocale)(this.props, this.context, 'Picker', () => require('./locale/zh_CN'));
|
package/lib/Popover/index.js
CHANGED
|
@@ -27,10 +27,9 @@ function recursiveCloneChildren(children) {
|
|
|
27
27
|
class Popover extends React.Component {
|
|
28
28
|
render() {
|
|
29
29
|
const _this$props = this.props,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} = _this$props,
|
|
30
|
+
overlay = _this$props.overlay,
|
|
31
|
+
_this$props$onSelect = _this$props.onSelect,
|
|
32
|
+
onSelect = _this$props$onSelect === void 0 ? () => {} : _this$props$onSelect,
|
|
34
33
|
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
35
34
|
const overlayNode = recursiveCloneChildren(overlay, (child, index) => {
|
|
36
35
|
const extraProps = {
|
package/lib/Popover/item.js
CHANGED
|
@@ -16,15 +16,13 @@ const _excluded = ["children", "className", "prefixCls", "icon", "disabled", "fi
|
|
|
16
16
|
class Item extends React.Component {
|
|
17
17
|
render() {
|
|
18
18
|
const _this$props = this.props,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
activeStyle
|
|
27
|
-
} = _this$props,
|
|
19
|
+
children = _this$props.children,
|
|
20
|
+
className = _this$props.className,
|
|
21
|
+
prefixCls = _this$props.prefixCls,
|
|
22
|
+
icon = _this$props.icon,
|
|
23
|
+
disabled = _this$props.disabled,
|
|
24
|
+
firstItem = _this$props.firstItem,
|
|
25
|
+
activeStyle = _this$props.activeStyle,
|
|
28
26
|
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
29
27
|
const cls = (0, _classnames.default)("".concat(prefixCls, "-item"), className, {
|
|
30
28
|
["".concat(prefixCls, "-item-disabled")]: disabled
|
package/lib/Progress/index.js
CHANGED
|
@@ -25,14 +25,15 @@ class Progress extends React.Component {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
|
-
const
|
|
29
|
-
className,
|
|
30
|
-
prefixCls,
|
|
31
|
-
position,
|
|
32
|
-
unfilled,
|
|
33
|
-
style =
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
const _this$props = this.props,
|
|
29
|
+
className = _this$props.className,
|
|
30
|
+
prefixCls = _this$props.prefixCls,
|
|
31
|
+
position = _this$props.position,
|
|
32
|
+
unfilled = _this$props.unfilled,
|
|
33
|
+
_this$props$style = _this$props.style,
|
|
34
|
+
style = _this$props$style === void 0 ? {} : _this$props$style,
|
|
35
|
+
_this$props$barStyle = _this$props.barStyle,
|
|
36
|
+
barStyle = _this$props$barStyle === void 0 ? {} : _this$props$barStyle;
|
|
36
37
|
const percentStyle = {
|
|
37
38
|
width: this.noAppearTransition || !this.props.appearTransition ? "".concat(this.props.percent, "%") : 0,
|
|
38
39
|
height: 0
|
package/lib/Radio/Radio.js
CHANGED
|
@@ -16,15 +16,11 @@ const _excluded = ["className", "style"];
|
|
|
16
16
|
class Radio extends React.Component {
|
|
17
17
|
render() {
|
|
18
18
|
const _this$props = this.props,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
style
|
|
22
|
-
} = _this$props,
|
|
19
|
+
className = _this$props.className,
|
|
20
|
+
style = _this$props.style,
|
|
23
21
|
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
children
|
|
27
|
-
} = restProps;
|
|
22
|
+
const prefixCls = restProps.prefixCls,
|
|
23
|
+
children = restProps.children;
|
|
28
24
|
const wrapCls = (0, _classnames.default)("".concat(prefixCls, "-wrapper"), className);
|
|
29
25
|
if ('class' in restProps) {
|
|
30
26
|
// Todo https://github.com/developit/preact-compat/issues/422
|
package/lib/Radio/RadioItem.js
CHANGED
|
@@ -19,19 +19,15 @@ function noop() {}
|
|
|
19
19
|
class RadioItem extends React.Component {
|
|
20
20
|
render() {
|
|
21
21
|
const _this$props = this.props,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
onClick
|
|
28
|
-
} = _this$props,
|
|
22
|
+
listPrefixCls = _this$props.listPrefixCls,
|
|
23
|
+
onChange = _this$props.onChange,
|
|
24
|
+
disabled = _this$props.disabled,
|
|
25
|
+
radioProps = _this$props.radioProps,
|
|
26
|
+
onClick = _this$props.onClick,
|
|
29
27
|
otherProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
children
|
|
34
|
-
} = otherProps;
|
|
28
|
+
const prefixCls = otherProps.prefixCls,
|
|
29
|
+
className = otherProps.className,
|
|
30
|
+
children = otherProps.children;
|
|
35
31
|
const wrapCls = (0, _classnames.default)("".concat(prefixCls, "-item"), className, {
|
|
36
32
|
["".concat(prefixCls, "-item-disabled")]: disabled === true
|
|
37
33
|
});
|
|
@@ -13,15 +13,16 @@ 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 = 5,
|
|
22
|
-
rate_style_color =
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
const _this$props = this.props,
|
|
17
|
+
data = _this$props.data,
|
|
18
|
+
value = _this$props.value;
|
|
19
|
+
const _ref = data || {},
|
|
20
|
+
_ref$rate_max_number = _ref.rate_max_number,
|
|
21
|
+
rate_max_number = _ref$rate_max_number === void 0 ? 5 : _ref$rate_max_number,
|
|
22
|
+
_ref$rate_style_color = _ref.rate_style_color,
|
|
23
|
+
rate_style_color = _ref$rate_style_color === void 0 ? '#e5e5e5' : _ref$rate_style_color,
|
|
24
|
+
_ref$rate_style_type = _ref.rate_style_type,
|
|
25
|
+
rate_style_type = _ref$rate_style_type === void 0 ? 'dtable-icon-rate' : _ref$rate_style_type;
|
|
25
26
|
const validValue = Math.min(rate_max_number, value);
|
|
26
27
|
let rateList = [];
|
|
27
28
|
for (let i = 0; i < validValue; i++) {
|
|
@@ -36,10 +37,9 @@ class RateFormatter extends _react.default.Component {
|
|
|
36
37
|
};
|
|
37
38
|
}
|
|
38
39
|
render() {
|
|
39
|
-
const
|
|
40
|
-
value
|
|
41
|
-
containerClassName
|
|
42
|
-
} = this.props;
|
|
40
|
+
const _this$props2 = this.props,
|
|
41
|
+
number = _this$props2.value,
|
|
42
|
+
containerClassName = _this$props2.containerClassName;
|
|
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,11 +1,12 @@
|
|
|
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 _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
9
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
11
|
var _reactstrap = require("reactstrap");
|
|
11
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -14,15 +15,19 @@ var _DTableDropdownItem = _interopRequireDefault(require("../DTableDropdownItem"
|
|
|
14
15
|
require("./index.css");
|
|
15
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
17
|
const RoleStatusEditor = _ref => {
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
let isShowDropdownIcon = _ref.isShowDropdownIcon,
|
|
19
|
+
currentOption = _ref.currentOption,
|
|
20
|
+
menuOptions = _ref.menuOptions,
|
|
21
|
+
onChangeOption = _ref.onChangeOption,
|
|
22
|
+
closeShowDropdownIcon = _ref.closeShowDropdownIcon;
|
|
23
|
+
const _useState = (0, _react.useState)(false),
|
|
24
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
25
|
+
isOpen = _useState2[0],
|
|
26
|
+
setIsOpen = _useState2[1];
|
|
27
|
+
const _useState3 = (0, _react.useState)(320),
|
|
28
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
29
|
+
menuMaxHeight = _useState4[0],
|
|
30
|
+
setMenuMaxHeight = _useState4[1];
|
|
26
31
|
const toggleRef = (0, _react.useRef)(null);
|
|
27
32
|
(0, _react.useEffect)(() => {
|
|
28
33
|
if (isOpen && toggleRef.current) {
|
|
@@ -34,9 +39,7 @@ const RoleStatusEditor = _ref => {
|
|
|
34
39
|
}
|
|
35
40
|
}, [isOpen]);
|
|
36
41
|
const handleClickMenuOption = menuOption => {
|
|
37
|
-
const
|
|
38
|
-
value
|
|
39
|
-
} = menuOption;
|
|
42
|
+
const value = menuOption.value;
|
|
40
43
|
closeShowDropdownIcon && closeShowDropdownIcon();
|
|
41
44
|
if (value === currentOption.value) return;
|
|
42
45
|
onChangeOption(value);
|
|
@@ -64,10 +67,8 @@ const RoleStatusEditor = _ref => {
|
|
|
64
67
|
overflowY: 'auto'
|
|
65
68
|
},
|
|
66
69
|
children: menuOptions.map(option => {
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
label
|
|
70
|
-
} = option;
|
|
70
|
+
const value = option.value,
|
|
71
|
+
label = option.label;
|
|
71
72
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableDropdownItem.default, {
|
|
72
73
|
onClick: () => handleClickMenuOption(option),
|
|
73
74
|
showChecked: true,
|