dtable-ui-component 6.0.1140-oal.3 → 7.0.0-ahn.1
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 +41 -18
- package/lib/AsyncUserSelect/index.js +69 -37
- 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 +24 -34
- 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 +6 -11
- package/lib/Comment/footer/participants/participant/index.js +4 -9
- package/lib/Comment/footer/participants/participant-select/index.js +9 -25
- 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/DTableCustomizeSearchInput/index.css +81 -0
- package/lib/DTableCustomizeSearchInput/index.js +136 -0
- package/lib/DTableCustomizeSelect/index.css +120 -42
- package/lib/DTableCustomizeSelect/index.js +28 -28
- package/lib/DTableDropdownItem/index.js +90 -0
- package/lib/DTableDropdownMenu/index.js +47 -0
- 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 +8 -22
- package/lib/DTableFiltersPopover/utils/index.js +63 -113
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +13 -18
- 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 +122 -178
- package/lib/DTableFiltersPopover/widgets/filter-list/index.css +3 -3
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +136 -161
- package/lib/DTableFiltersPopover/widgets/rate-item.js +17 -22
- 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 +35 -28
- package/lib/DTableSelect/select-dropdown-indicator/index.css +16 -0
- package/lib/DTableSelect/select-dropdown-indicator/index.js +24 -0
- package/lib/DTableSelect/user-select.css +7 -46
- package/lib/DTableSelect/utils.js +168 -90
- package/lib/DTableSubDropdownMenu/index.js +48 -0
- package/lib/DTableSubDropdownToggle/index.js +54 -0
- package/lib/DTableSwitch/index.css +0 -1
- package/lib/DTableSwitch/index.js +12 -11
- package/lib/DTableToolTip/index.css +45 -0
- package/lib/DTableToolTip/index.js +67 -0
- 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 +16 -14
- 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 +17 -32
- 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 +13 -34
- 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 +14 -31
- 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 +29 -16
- package/lib/ImageThumbnail/index.js +13 -29
- 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.css +0 -35
- package/lib/RoleStatusEditor/index.js +40 -27
- package/lib/RowExpandDialog/body/index.js +32 -49
- package/lib/RowExpandDialog/column-content/index.js +7 -13
- 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 +12 -27
- 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 +9 -23
- 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/KeyCodes.js +96 -4
- package/lib/SelectOptionGroup/index.css +77 -55
- package/lib/SelectOptionGroup/index.js +63 -63
- package/lib/SelectOptionGroup/option.js +16 -4
- 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/assets/icons/check-mark.svg +3 -0
- package/lib/assets/icons/close.svg +1 -0
- package/lib/assets/icons/down.svg +3 -0
- package/lib/common/editor-base.js +7 -12
- package/lib/hooks/common-hooks.js +2 -4
- package/lib/index.js +38 -10
- package/lib/locales/de.json +2 -0
- package/lib/locales/en.json +2 -0
- package/lib/locales/es.json +2 -0
- package/lib/locales/fr.json +2 -0
- package/lib/locales/pt.json +2 -0
- package/lib/locales/ru.json +2 -0
- package/lib/locales/zh-CN.json +2 -0
- 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 +10 -10
- package/lib/DTableCustomizeCollaboratorSelect/index.css +0 -86
- package/lib/DTableCustomizeCollaboratorSelect/index.js +0 -161
- package/lib/DTableGroupSelect/index.css +0 -96
- package/lib/DTableGroupSelect/index.js +0 -135
- package/lib/DTableGroupSelect/option.js +0 -42
- package/lib/DTableGroupSelect/select-option-group.css +0 -54
- package/lib/DTableGroupSelect/select-option-group.js +0 -236
package/lib/ActionSheet/index.js
CHANGED
|
@@ -28,13 +28,12 @@ function createActionSheet(flag, config, callback) {
|
|
|
28
28
|
prefixCls: 'am-action-sheet',
|
|
29
29
|
cancelButtonText: '取消'
|
|
30
30
|
}, config);
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
maskClosable = true
|
|
37
|
-
} = props;
|
|
31
|
+
const prefixCls = props.prefixCls,
|
|
32
|
+
className = props.className,
|
|
33
|
+
transitionName = props.transitionName,
|
|
34
|
+
maskTransitionName = props.maskTransitionName,
|
|
35
|
+
_props$maskClosable = props.maskClosable,
|
|
36
|
+
maskClosable = _props$maskClosable === void 0 ? true : _props$maskClosable;
|
|
38
37
|
const div = document.createElement('div');
|
|
39
38
|
document.body.appendChild(div);
|
|
40
39
|
const root = (0, _client.createRoot)(div);
|
|
@@ -62,15 +61,14 @@ function createActionSheet(flag, config, callback) {
|
|
|
62
61
|
close();
|
|
63
62
|
}
|
|
64
63
|
}
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
badges = []
|
|
73
|
-
} = props;
|
|
64
|
+
const title = props.title,
|
|
65
|
+
message = props.message,
|
|
66
|
+
options = props.options,
|
|
67
|
+
destructiveButtonIndex = props.destructiveButtonIndex,
|
|
68
|
+
cancelButtonIndex = props.cancelButtonIndex,
|
|
69
|
+
cancelButtonText = props.cancelButtonText,
|
|
70
|
+
_props$badges = props.badges,
|
|
71
|
+
badges = _props$badges === void 0 ? [] : _props$badges;
|
|
74
72
|
const titleMsg = [title ? /*#__PURE__*/(0, _jsxRuntime.jsx)("h3", {
|
|
75
73
|
className: "".concat(prefixCls, "-title"),
|
|
76
74
|
children: title
|
|
@@ -14,14 +14,13 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
14
14
|
|
|
15
15
|
class ActivityIndicator extends React.Component {
|
|
16
16
|
render() {
|
|
17
|
-
const
|
|
18
|
-
prefixCls,
|
|
19
|
-
className,
|
|
20
|
-
animating,
|
|
21
|
-
toast,
|
|
22
|
-
size,
|
|
23
|
-
text
|
|
24
|
-
} = this.props;
|
|
17
|
+
const _this$props = this.props,
|
|
18
|
+
prefixCls = _this$props.prefixCls,
|
|
19
|
+
className = _this$props.className,
|
|
20
|
+
animating = _this$props.animating,
|
|
21
|
+
toast = _this$props.toast,
|
|
22
|
+
size = _this$props.size,
|
|
23
|
+
text = _this$props.text;
|
|
25
24
|
const wrapClass = (0, _classnames.default)(prefixCls, className, {
|
|
26
25
|
["".concat(prefixCls, "-lg")]: size === 'large',
|
|
27
26
|
["".concat(prefixCls, "-sm")]: size === 'small',
|
|
@@ -3,49 +3,68 @@
|
|
|
3
3
|
height: auto !important;
|
|
4
4
|
min-height: 38px;
|
|
5
5
|
max-width: calc(100% - 10px);
|
|
6
|
+
padding: .375rem 40px .375rem 1rem;
|
|
7
|
+
position: relative;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.dtable-ui-selected-users-container.focus {
|
|
11
|
+
border: 1px solid var(--bs-bg-border-color) !important;
|
|
6
12
|
}
|
|
7
13
|
|
|
8
14
|
.dtable-ui-selected-users-container .dtable-ui-user-select-placeholder {
|
|
9
|
-
color:
|
|
15
|
+
color: var(--bs-icon-color);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.select-dropdown-indicator {
|
|
19
|
+
margin-left: -2px;
|
|
20
|
+
position: absolute;
|
|
21
|
+
right: 16px;
|
|
22
|
+
top: 50%;
|
|
23
|
+
transform: translateY(-50%)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.select-dropdown-indicator .multicolor-icon {
|
|
27
|
+
font-size: 12px;
|
|
28
|
+
width: 12px;
|
|
29
|
+
height: 12px;
|
|
10
30
|
}
|
|
11
31
|
|
|
12
32
|
.dtable-ui-user-select-popover .popover {
|
|
13
33
|
width: 385px;
|
|
14
34
|
max-width: 385px;
|
|
35
|
+
background: var(--bs-popover-bg);
|
|
36
|
+
border: 1px solid var(--bs-border-secondary-color);
|
|
37
|
+
border-radius: 4px;
|
|
38
|
+
box-shadow: var(--bs-border-secondary-shadow);
|
|
39
|
+
margin-top: -4px;
|
|
15
40
|
}
|
|
16
41
|
|
|
17
42
|
.dtable-ui-user-select-container {
|
|
18
43
|
position: relative;
|
|
19
44
|
}
|
|
20
45
|
|
|
21
|
-
.dtable-ui-user-select-container .dtable-ui-user-search-container {
|
|
22
|
-
padding: 10px 10px 0 10px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.dtable-ui-user-select-container .dtable-ui-user-search-container input {
|
|
26
|
-
height: 28px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
46
|
.dtable-ui-user-select-container .dtable-ui-user-list-container {
|
|
30
47
|
min-height: 160px;
|
|
31
48
|
max-height: 200px;
|
|
32
|
-
|
|
49
|
+
padding: 8px;
|
|
33
50
|
overflow: auto;
|
|
51
|
+
position: relative;
|
|
34
52
|
}
|
|
35
53
|
|
|
36
54
|
.dtable-ui-user-select-container .dtable-ui-user-list-container .dtable-ui-user-item-container {
|
|
37
55
|
display: flex;
|
|
38
56
|
align-items: center;
|
|
39
57
|
justify-content: space-between;
|
|
40
|
-
height:
|
|
41
|
-
padding: 0
|
|
58
|
+
height: 32px;
|
|
59
|
+
padding: 0 8px;
|
|
42
60
|
font-size: 14px;
|
|
43
61
|
cursor: pointer;
|
|
62
|
+
border-radius: 4px;
|
|
44
63
|
}
|
|
45
64
|
|
|
46
65
|
.dtable-ui-user-select-container .dtable-ui-user-list-container .dtable-ui-user-item-container:hover,
|
|
47
66
|
.dtable-ui-user-select-container .dtable-ui-user-list-container .dtable-ui-user-item-container-highlight {
|
|
48
|
-
background:
|
|
67
|
+
background-color: var(--bs-btn-background-hover);
|
|
49
68
|
cursor: pointer;
|
|
50
69
|
}
|
|
51
70
|
|
|
@@ -61,16 +80,15 @@
|
|
|
61
80
|
background: transparent;
|
|
62
81
|
}
|
|
63
82
|
|
|
64
|
-
.dtable-ui-user-list-container .dtable-ui-collaborator-check-icon .dtable-icon-check
|
|
65
|
-
color: #
|
|
66
|
-
font-size:
|
|
83
|
+
.dtable-ui-user-list-container .dtable-ui-collaborator-check-icon .dtable-icon-check {
|
|
84
|
+
color: #666666;
|
|
85
|
+
font-size: 14px;
|
|
67
86
|
}
|
|
68
87
|
|
|
69
|
-
/* user-item */
|
|
70
88
|
.dtable-ui-user-item {
|
|
71
89
|
display: inline-flex;
|
|
72
90
|
align-items: center;
|
|
73
|
-
margin: 2px
|
|
91
|
+
margin: 2px 4px 2px 0;
|
|
74
92
|
padding: 0 8px 0 2px;
|
|
75
93
|
height: 20px;
|
|
76
94
|
font-size: 13px;
|
|
@@ -90,6 +108,7 @@
|
|
|
90
108
|
justify-content: center;
|
|
91
109
|
transform: translateY(0);
|
|
92
110
|
flex-shrink: 0;
|
|
111
|
+
margin-right: 4px;
|
|
93
112
|
}
|
|
94
113
|
|
|
95
114
|
.dtable-ui-user-item .user-name {
|
|
@@ -120,3 +139,7 @@
|
|
|
120
139
|
color: #666666;
|
|
121
140
|
cursor: pointer;
|
|
122
141
|
}
|
|
142
|
+
|
|
143
|
+
.dtable-ui-selected-users-container .dtable-ui-users-input {
|
|
144
|
+
padding-right: 37px;
|
|
145
|
+
}
|
|
@@ -5,33 +5,56 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
8
9
|
var _react = require("react");
|
|
9
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
11
|
var _reactstrap = require("reactstrap");
|
|
11
12
|
var _ClickOutside = _interopRequireDefault(require("../ClickOutside"));
|
|
12
|
-
var
|
|
13
|
+
var _DTableCustomizeSearchInput = _interopRequireDefault(require("../DTableCustomizeSearchInput"));
|
|
13
14
|
var _userItem = _interopRequireDefault(require("./user-item"));
|
|
14
15
|
var _lang = require("../lang");
|
|
15
16
|
var _keyCodes = _interopRequireDefault(require("../constants/key-codes"));
|
|
17
|
+
var _DTableIcon = _interopRequireDefault(require("../DTableIcon"));
|
|
16
18
|
require("./index.css");
|
|
17
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
20
|
const AsyncUserSelect = _ref => {
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
emptyPlaceholder = '',
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
21
|
+
let className = _ref.className,
|
|
22
|
+
_ref$emptyPlaceholder = _ref.emptyPlaceholder,
|
|
23
|
+
emptyPlaceholder = _ref$emptyPlaceholder === void 0 ? '' : _ref$emptyPlaceholder,
|
|
24
|
+
_ref$searchPlaceholde = _ref.searchPlaceholder,
|
|
25
|
+
searchPlaceholder = _ref$searchPlaceholde === void 0 ? '' : _ref$searchPlaceholde,
|
|
26
|
+
_ref$isMulti = _ref.isMulti,
|
|
27
|
+
isMulti = _ref$isMulti === void 0 ? true : _ref$isMulti,
|
|
28
|
+
_ref$enableShowIDInOr = _ref.enableShowIDInOrgWhenSearchUser,
|
|
29
|
+
enableShowIDInOrgWhenSearchUser = _ref$enableShowIDInOr === void 0 ? false : _ref$enableShowIDInOr,
|
|
30
|
+
_ref$selectedUsers = _ref.selectedUsers,
|
|
31
|
+
selectedUsers = _ref$selectedUsers === void 0 ? [] : _ref$selectedUsers,
|
|
32
|
+
loadOptions = _ref.loadOptions,
|
|
33
|
+
modifySelectedUsers = _ref.modifySelectedUsers;
|
|
34
|
+
const _useState = (0, _react.useState)(false),
|
|
35
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
36
|
+
isPopoverOpen = _useState2[0],
|
|
37
|
+
setIsPopoverOpen = _useState2[1];
|
|
38
|
+
const _useState3 = (0, _react.useState)(''),
|
|
39
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
40
|
+
searchValue = _useState4[0],
|
|
41
|
+
setSearchValue = _useState4[1];
|
|
42
|
+
const _useState5 = (0, _react.useState)([]),
|
|
43
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
44
|
+
searchedUsers = _useState6[0],
|
|
45
|
+
setSearchedUsers = _useState6[1];
|
|
46
|
+
const _useState7 = (0, _react.useState)(-1),
|
|
47
|
+
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
48
|
+
highlightIndex = _useState8[0],
|
|
49
|
+
setHighlightIndex = _useState8[1];
|
|
50
|
+
const _useState9 = (0, _react.useState)(0),
|
|
51
|
+
_useState0 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
52
|
+
maxItemNum = _useState0[0],
|
|
53
|
+
setMaxItemNum = _useState0[1];
|
|
54
|
+
const _useState1 = (0, _react.useState)(0),
|
|
55
|
+
_useState10 = (0, _slicedToArray2.default)(_useState1, 2),
|
|
56
|
+
itemHeight = _useState10[0],
|
|
57
|
+
setItemHeight = _useState10[1];
|
|
35
58
|
const selectorRef = (0, _react.useRef)(null);
|
|
36
59
|
const userSelectContainerRef = (0, _react.useRef)(null);
|
|
37
60
|
const userListContainerRef = (0, _react.useRef)(null);
|
|
@@ -165,9 +188,8 @@ const AsyncUserSelect = _ref => {
|
|
|
165
188
|
}, [onEnter, onUpArrow, onDownArrow, onEsc]);
|
|
166
189
|
(0, _react.useEffect)(() => {
|
|
167
190
|
if (userSelectContainerRef.current) {
|
|
168
|
-
const
|
|
169
|
-
bottom
|
|
170
|
-
} = userSelectContainerRef.current.getBoundingClientRect();
|
|
191
|
+
const _userSelectContainerR = userSelectContainerRef.current.getBoundingClientRect(),
|
|
192
|
+
bottom = _userSelectContainerR.bottom;
|
|
171
193
|
if (bottom > window.innerHeight) {
|
|
172
194
|
userSelectContainerRef.current.style.top = "".concat(window.innerHeight - bottom, "px");
|
|
173
195
|
}
|
|
@@ -190,21 +212,30 @@ const AsyncUserSelect = _ref => {
|
|
|
190
212
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ClickOutside.default, {
|
|
191
213
|
onClickOutside: onClickOutside,
|
|
192
214
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
193
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
215
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
194
216
|
className: (0, _classnames.default)('dtable-ui-selected-users-container form-control d-flex align-items-center', className, {
|
|
195
217
|
'focus': isPopoverOpen
|
|
196
218
|
}),
|
|
197
219
|
onClick: onTogglePopover,
|
|
198
220
|
ref: selectorRef,
|
|
199
|
-
children:
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
221
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
222
|
+
className: "dtable-ui-users-input",
|
|
223
|
+
children: [selectedUsers.map((user, index) => {
|
|
224
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_userItem.default, {
|
|
225
|
+
user: user,
|
|
226
|
+
deleteUser: deselectUser
|
|
227
|
+
}, "dtable-ui-user-selector-selected-user-".concat(index));
|
|
228
|
+
}), selectedUsers.length === 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
229
|
+
className: "dtable-ui-user-select-placeholder",
|
|
230
|
+
children: emptyPlaceholder || (0, _lang.getLocale)('Search_users')
|
|
231
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
232
|
+
className: "select-dropdown-indicator d-inline-flex align-items-center",
|
|
233
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableIcon.default, {
|
|
234
|
+
symbol: "down",
|
|
235
|
+
color: "var(--bs-icon-color)"
|
|
236
|
+
})
|
|
237
|
+
})]
|
|
238
|
+
})
|
|
208
239
|
}), selectorRef.current && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.Popover, {
|
|
209
240
|
placement: "bottom-start",
|
|
210
241
|
isOpen: isPopoverOpen,
|
|
@@ -217,14 +248,15 @@ const AsyncUserSelect = _ref => {
|
|
|
217
248
|
ref: userSelectContainerRef,
|
|
218
249
|
onMouseDown: e => e.stopPropagation(),
|
|
219
250
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
220
|
-
className: "
|
|
221
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
222
|
-
|
|
251
|
+
className: "seatable-option-group-search",
|
|
252
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableCustomizeSearchInput.default, {
|
|
253
|
+
className: "option-search-control",
|
|
223
254
|
placeholder: searchPlaceholder || (0, _lang.getLocale)('Search_users'),
|
|
224
|
-
value: searchValue,
|
|
225
|
-
wait: 200,
|
|
226
255
|
onChange: onSearchValueChanged,
|
|
227
|
-
|
|
256
|
+
clearValue: () => onSearchValueChanged(''),
|
|
257
|
+
autoFocus: true,
|
|
258
|
+
isClearable: true,
|
|
259
|
+
value: searchValue
|
|
228
260
|
})
|
|
229
261
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
230
262
|
className: "dtable-ui-user-list-container",
|
|
@@ -242,7 +274,7 @@ const AsyncUserSelect = _ref => {
|
|
|
242
274
|
}, "dtable-ui-user-selector-searched-user-".concat(index)), selectedUsers.find(u => u.email === user.email) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
243
275
|
className: "dtable-ui-collaborator-check-icon",
|
|
244
276
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
245
|
-
className: "dtable-font dtable-icon-check
|
|
277
|
+
className: "dtable-font dtable-icon-check",
|
|
246
278
|
"aria-hidden": "true"
|
|
247
279
|
})
|
|
248
280
|
})]
|
|
@@ -10,12 +10,11 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
10
10
|
var _lang = require("../lang");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
const UserItem = _ref => {
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
enableShowIDInOrgWhenSearchUser = false
|
|
18
|
-
} = _ref;
|
|
13
|
+
let className = _ref.className,
|
|
14
|
+
user = _ref.user,
|
|
15
|
+
deleteUser = _ref.deleteUser,
|
|
16
|
+
_ref$enableShowIDInOr = _ref.enableShowIDInOrgWhenSearchUser,
|
|
17
|
+
enableShowIDInOrgWhenSearchUser = _ref$enableShowIDInOr === void 0 ? false : _ref$enableShowIDInOr;
|
|
19
18
|
const name = (0, _react.useMemo)(() => (user === null || user === void 0 ? void 0 : user.name) || '', [user]);
|
|
20
19
|
const avatarUrl = (0, _react.useMemo)(() => (user === null || user === void 0 ? void 0 : user.avatar_url) || '', [user]);
|
|
21
20
|
const idInOrg = (0, _react.useMemo)(() => (user === null || user === void 0 ? void 0 : user.id_in_org) || '', [user]);
|
|
@@ -11,10 +11,9 @@ require("./index.css");
|
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
class AutoNumberFormatter extends _react.default.Component {
|
|
13
13
|
render() {
|
|
14
|
-
const
|
|
15
|
-
containerClassName,
|
|
16
|
-
value
|
|
17
|
-
} = this.props;
|
|
14
|
+
const _this$props = this.props,
|
|
15
|
+
containerClassName = _this$props.containerClassName,
|
|
16
|
+
value = _this$props.value;
|
|
18
17
|
let classname = (0, _classnames.default)('dtable-ui cell-formatter-container auto-number-formatter', containerClassName);
|
|
19
18
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
20
19
|
title: value,
|
package/lib/Badge/index.js
CHANGED
|
@@ -17,17 +17,15 @@ class Badge extends React.Component {
|
|
|
17
17
|
render() {
|
|
18
18
|
// tslint:disable:prefer-const
|
|
19
19
|
let _this$props = this.props,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
hot
|
|
30
|
-
} = _this$props,
|
|
20
|
+
className = _this$props.className,
|
|
21
|
+
prefixCls = _this$props.prefixCls,
|
|
22
|
+
children = _this$props.children,
|
|
23
|
+
text = _this$props.text,
|
|
24
|
+
size = _this$props.size,
|
|
25
|
+
overflowCount = _this$props.overflowCount,
|
|
26
|
+
dot = _this$props.dot,
|
|
27
|
+
corner = _this$props.corner,
|
|
28
|
+
hot = _this$props.hot,
|
|
31
29
|
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
32
30
|
// eslint-disable-next-line no-self-assign
|
|
33
31
|
overflowCount = overflowCount;
|
|
@@ -21,14 +21,12 @@ class ButtonFormatter extends _react.default.Component {
|
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
let
|
|
25
|
-
data,
|
|
26
|
-
containerClassName
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
button_name
|
|
31
|
-
} = data || {};
|
|
24
|
+
let _this$props = this.props,
|
|
25
|
+
data = _this$props.data,
|
|
26
|
+
containerClassName = _this$props.containerClassName;
|
|
27
|
+
const _ref = data || {},
|
|
28
|
+
button_color = _ref.button_color,
|
|
29
|
+
button_name = _ref.button_name;
|
|
32
30
|
const colorObj = _dtableUtils.SELECT_OPTION_COLORS.find(item => item.COLOR === button_color) || _dtableUtils.SELECT_OPTION_COLORS[0];
|
|
33
31
|
const color = colorObj.TEXT_COLOR === WHITE ? WHITE : '#666666';
|
|
34
32
|
const btnStyle = {
|
|
@@ -18,10 +18,9 @@ class CTimeFormatter extends _react.default.Component {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
let
|
|
22
|
-
value
|
|
23
|
-
containerClassName
|
|
24
|
-
} = this.props;
|
|
21
|
+
let _this$props = this.props,
|
|
22
|
+
date = _this$props.value,
|
|
23
|
+
containerClassName = _this$props.containerClassName;
|
|
25
24
|
let classname = (0, _classnames.default)('dtable-ui cell-formatter-container ctime-formatter', containerClassName);
|
|
26
25
|
if (date) {
|
|
27
26
|
date = this.formatDate(date);
|
|
@@ -16,9 +16,7 @@ require("./index.css");
|
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
const _excluded = ["isMobile"];
|
|
18
18
|
const CheckboxEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
19
|
-
let
|
|
20
|
-
isMobile
|
|
21
|
-
} = _ref,
|
|
19
|
+
let isMobile = _ref.isMobile,
|
|
22
20
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
23
21
|
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
24
22
|
ref: ref
|
|
@@ -15,9 +15,7 @@ class MBCheckboxEditor extends _react.Component {
|
|
|
15
15
|
constructor(props) {
|
|
16
16
|
super(props);
|
|
17
17
|
this.getValue = () => {
|
|
18
|
-
const
|
|
19
|
-
value
|
|
20
|
-
} = this.state;
|
|
18
|
+
const value = this.state.value;
|
|
21
19
|
return value;
|
|
22
20
|
};
|
|
23
21
|
this.updateValue = value => {
|
|
@@ -29,18 +27,14 @@ class MBCheckboxEditor extends _react.Component {
|
|
|
29
27
|
});
|
|
30
28
|
};
|
|
31
29
|
this.onChangeCheckboxValue = event => {
|
|
32
|
-
const
|
|
33
|
-
readOnly
|
|
34
|
-
} = this.props;
|
|
30
|
+
const readOnly = this.props.readOnly;
|
|
35
31
|
if (readOnly) return;
|
|
36
32
|
if (event) {
|
|
37
33
|
event.stopPropagation();
|
|
38
34
|
event.nativeEvent.stopImmediatePropagation();
|
|
39
35
|
event.persist();
|
|
40
36
|
}
|
|
41
|
-
const
|
|
42
|
-
value
|
|
43
|
-
} = this.state;
|
|
37
|
+
const value = this.state.value;
|
|
44
38
|
const newValue = !value;
|
|
45
39
|
this.setState({
|
|
46
40
|
value: newValue
|
|
@@ -63,9 +57,7 @@ class MBCheckboxEditor extends _react.Component {
|
|
|
63
57
|
};
|
|
64
58
|
}
|
|
65
59
|
componentDidUpdate(prevProps) {
|
|
66
|
-
const
|
|
67
|
-
value
|
|
68
|
-
} = this.props;
|
|
60
|
+
const value = this.props.value;
|
|
69
61
|
if (value !== prevProps.value) {
|
|
70
62
|
this.setState({
|
|
71
63
|
value
|
|
@@ -74,14 +66,11 @@ class MBCheckboxEditor extends _react.Component {
|
|
|
74
66
|
}
|
|
75
67
|
render() {
|
|
76
68
|
var _column$data;
|
|
77
|
-
const
|
|
78
|
-
className,
|
|
79
|
-
style,
|
|
80
|
-
column
|
|
81
|
-
|
|
82
|
-
const {
|
|
83
|
-
value
|
|
84
|
-
} = this.state;
|
|
69
|
+
const _this$props = this.props,
|
|
70
|
+
className = _this$props.className,
|
|
71
|
+
style = _this$props.style,
|
|
72
|
+
column = _this$props.column;
|
|
73
|
+
const value = this.state.value;
|
|
85
74
|
let checkboxStyle = column === null || column === void 0 ? void 0 : (_column$data = column.data) === null || _column$data === void 0 ? void 0 : _column$data.checkbox_style;
|
|
86
75
|
if (!checkboxStyle || Object.keys(checkboxStyle).length < 2) {
|
|
87
76
|
checkboxStyle = _constants.DEFAULT_CHECKBOX_MARK_STYLE;
|
|
@@ -15,10 +15,9 @@ class PCCheckboxEditor extends _react.Component {
|
|
|
15
15
|
constructor(props) {
|
|
16
16
|
super(props);
|
|
17
17
|
this.onKeyDown = event => {
|
|
18
|
-
const
|
|
19
|
-
isEditorShow,
|
|
20
|
-
readOnly
|
|
21
|
-
} = this.props;
|
|
18
|
+
const _this$props = this.props,
|
|
19
|
+
isEditorShow = _this$props.isEditorShow,
|
|
20
|
+
readOnly = _this$props.readOnly;
|
|
22
21
|
if (event.keyCode === _constants.KeyCodes.Enter && isEditorShow && !readOnly) {
|
|
23
22
|
this.setState({
|
|
24
23
|
value: !this.state.value
|
|
@@ -26,9 +25,7 @@ class PCCheckboxEditor extends _react.Component {
|
|
|
26
25
|
}
|
|
27
26
|
};
|
|
28
27
|
this.getValue = () => {
|
|
29
|
-
const
|
|
30
|
-
value
|
|
31
|
-
} = this.state;
|
|
28
|
+
const value = this.state.value;
|
|
32
29
|
return value;
|
|
33
30
|
};
|
|
34
31
|
this.updateValue = value => {
|
|
@@ -40,18 +37,14 @@ class PCCheckboxEditor extends _react.Component {
|
|
|
40
37
|
});
|
|
41
38
|
};
|
|
42
39
|
this.onChangeCheckboxValue = event => {
|
|
43
|
-
const
|
|
44
|
-
readOnly
|
|
45
|
-
} = this.props;
|
|
40
|
+
const readOnly = this.props.readOnly;
|
|
46
41
|
if (readOnly) return;
|
|
47
42
|
if (event) {
|
|
48
43
|
event.stopPropagation();
|
|
49
44
|
event.nativeEvent.stopImmediatePropagation();
|
|
50
45
|
event.persist();
|
|
51
46
|
}
|
|
52
|
-
const
|
|
53
|
-
value
|
|
54
|
-
} = this.state;
|
|
47
|
+
const value = this.state.value;
|
|
55
48
|
const newValue = !value;
|
|
56
49
|
this.setState({
|
|
57
50
|
value: newValue
|
|
@@ -82,9 +75,7 @@ class PCCheckboxEditor extends _react.Component {
|
|
|
82
75
|
document.removeEventListener('keydown', this.onKeyDown);
|
|
83
76
|
}
|
|
84
77
|
componentDidUpdate(prevProps) {
|
|
85
|
-
const
|
|
86
|
-
value
|
|
87
|
-
} = this.props;
|
|
78
|
+
const value = this.props.value;
|
|
88
79
|
if (value !== prevProps.value) {
|
|
89
80
|
this.setState({
|
|
90
81
|
value
|
|
@@ -93,14 +84,11 @@ class PCCheckboxEditor extends _react.Component {
|
|
|
93
84
|
}
|
|
94
85
|
render() {
|
|
95
86
|
var _column$data;
|
|
96
|
-
const
|
|
97
|
-
className,
|
|
98
|
-
style,
|
|
99
|
-
column
|
|
100
|
-
|
|
101
|
-
const {
|
|
102
|
-
value
|
|
103
|
-
} = this.state;
|
|
87
|
+
const _this$props2 = this.props,
|
|
88
|
+
className = _this$props2.className,
|
|
89
|
+
style = _this$props2.style,
|
|
90
|
+
column = _this$props2.column;
|
|
91
|
+
const value = this.state.value;
|
|
104
92
|
let checkboxStyle = column === null || column === void 0 ? void 0 : (_column$data = column.data) === null || _column$data === void 0 ? void 0 : _column$data.checkbox_style;
|
|
105
93
|
if (!checkboxStyle || Object.keys(checkboxStyle).length < 2) {
|
|
106
94
|
checkboxStyle = _constants.DEFAULT_CHECKBOX_MARK_STYLE;
|
|
@@ -26,11 +26,10 @@ class CheckboxFormatter extends _react.default.PureComponent {
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
render() {
|
|
29
|
-
let
|
|
30
|
-
value,
|
|
31
|
-
containerClassName,
|
|
32
|
-
checkboxStyle
|
|
33
|
-
} = this.props;
|
|
29
|
+
let _this$props = this.props,
|
|
30
|
+
value = _this$props.value,
|
|
31
|
+
containerClassName = _this$props.containerClassName,
|
|
32
|
+
checkboxStyle = _this$props.checkboxStyle;
|
|
34
33
|
if (!checkboxStyle || !('type' in checkboxStyle && 'color' in checkboxStyle)) {
|
|
35
34
|
checkboxStyle = _constants.DEFAULT_CHECKBOX_MARK_STYLE;
|
|
36
35
|
}
|
|
@@ -16,10 +16,8 @@ require("./index.css");
|
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
const _excluded = ["isMobile", "value"];
|
|
18
18
|
const CollaboratorEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
value: oldValue
|
|
22
|
-
} = _ref,
|
|
19
|
+
let isMobile = _ref.isMobile,
|
|
20
|
+
oldValue = _ref.value,
|
|
23
21
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
24
22
|
const value = Array.isArray(oldValue) ? oldValue : [];
|
|
25
23
|
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|