dtable-ui-component 6.0.126 → 7.0.0-xia.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 +16 -14
- package/lib/ActivityIndicator/index.js +8 -7
- package/lib/AsyncUserSelect/index.js +19 -40
- package/lib/AsyncUserSelect/user-item.js +6 -5
- package/lib/AutoNumberFormatter/index.js +4 -3
- package/lib/Badge/index.js +11 -9
- package/lib/ButtonFormatter/index.js +8 -6
- package/lib/CTimeFormatter/index.js +4 -3
- package/lib/CheckboxEditor/index.js +3 -1
- 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 +4 -2
- package/lib/CollaboratorEditor/mb-editor/index.js +19 -11
- package/lib/CollaboratorEditor/pc-editor/index.js +34 -25
- package/lib/CollaboratorFormatter/index.js +10 -8
- package/lib/CollaboratorItem/index.js +5 -4
- package/lib/CollapsibleSettingLayout/index.js +7 -9
- package/lib/Comment/body/comment.js +18 -10
- package/lib/Comment/body/index.js +4 -2
- package/lib/Comment/footer/btns/index.js +7 -4
- package/lib/Comment/footer/index.js +20 -9
- package/lib/Comment/footer/input/index.js +50 -29
- package/lib/Comment/footer/input/participant/index.js +5 -4
- 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 +24 -8
- package/lib/Comment/index.js +57 -39
- package/lib/Comment/utils/utilities.js +21 -15
- package/lib/CreatorFormatter/index.js +8 -6
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +18 -22
- package/lib/DTableColorPicker/index.js +40 -55
- package/lib/DTableColorPicker/utils.js +6 -4
- package/lib/DTableColumnIcon/index.js +7 -6
- package/lib/DTableCommonAddTool/index.js +8 -6
- package/lib/DTableCustomFooter/index.js +3 -1
- package/lib/DTableCustomizeCollaboratorSelect/index.js +20 -17
- package/lib/DTableCustomizeSelect/index.js +24 -19
- package/lib/DTableDropdownItem/index.js +18 -16
- package/lib/DTableDropdownMenu/index.js +10 -8
- package/lib/DTableEmptyTip/index.js +5 -4
- package/lib/DTableFiltersPopover/index.js +50 -34
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -1
- package/lib/DTableFiltersPopover/utils/index.js +113 -63
- 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 +56 -35
- package/lib/DTableFiltersPopover/widgets/filter-item.js +171 -108
- package/lib/DTableFiltersPopover/widgets/filter-list/index.css +5 -5
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +161 -136
- package/lib/DTableFiltersPopover/widgets/rate-item.js +20 -15
- package/lib/DTableGroupSelect/index.js +15 -11
- package/lib/DTableGroupSelect/select-option-group.js +32 -23
- package/lib/DTableIcon/index.js +7 -6
- package/lib/DTableIcon/svg-icon.js +7 -5
- package/lib/DTableModalHeader/index.css +3 -20
- package/lib/DTableModalHeader/index.js +3 -1
- package/lib/DTablePopover/index.js +15 -11
- package/lib/DTableRadio/index.js +9 -10
- package/lib/DTableRadioGroup/index.js +17 -8
- package/lib/DTableSearchInput/index.js +29 -19
- package/lib/DTableSelect/dtable-select-label.js +5 -6
- package/lib/DTableSelect/index.js +22 -21
- package/lib/DTableSelect/utils.js +15 -7
- package/lib/DTableSubDropdownMenu/index.js +10 -8
- package/lib/DTableSubDropdownToggle/index.js +12 -12
- package/lib/DTableSwitch/index.js +11 -12
- package/lib/DTableToolTip/index.js +8 -7
- package/lib/DateEditor/index.js +15 -20
- package/lib/DateEditor/mb-editor/index.js +31 -18
- package/lib/DateEditor/pc-editor.js +45 -26
- package/lib/DateFormatter/index.js +5 -4
- package/lib/DatePicker/index.js +15 -9
- package/lib/DatePicker/utils.js +3 -1
- package/lib/DeleteTip/index.js +6 -5
- package/lib/DepartmentMultipleSelectEditor/index.js +23 -25
- package/lib/DepartmentSelectFilter/index.js +8 -6
- package/lib/DepartmentSingleSelectEditor/index.js +3 -1
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +47 -48
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +58 -36
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +19 -13
- package/lib/DepartmentSingleSelectFormatter/index.js +6 -4
- package/lib/DigitalSignEditor/index.js +3 -1
- package/lib/DigitalSignEditor/mb-editor/index.js +20 -12
- package/lib/DigitalSignEditor/pc-editor/index.js +24 -17
- package/lib/DigitalSignEditor/service.js +4 -2
- package/lib/DigitalSignEditor/signature-board/index.js +8 -5
- package/lib/DigitalSignEditor/utils.js +4 -2
- package/lib/DigitalSignFormatter/index.js +15 -12
- package/lib/DigitalSignFormatter/utils.js +5 -4
- 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 +12 -12
- package/lib/FieldDisplaySetting/index.js +10 -12
- package/lib/FileEditor/files-previewer/index.js +3 -1
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +18 -10
- 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 +21 -14
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +57 -29
- package/lib/FileEditor/index.js +3 -1
- package/lib/FileEditor/mb-editor/index.js +20 -28
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +3 -1
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +25 -11
- package/lib/FileEditor/pc-editor/index.js +27 -19
- package/lib/FileFormatter/index.js +19 -26
- package/lib/FileItemFormatter/index.js +9 -6
- package/lib/FileUploader/index.js +45 -28
- package/lib/FormulaFormatter/index.js +29 -15
- package/lib/GeolocationEditor/index.js +12 -11
- package/lib/GeolocationEditor/map-editor-utils.js +15 -17
- package/lib/GeolocationEditor/mb-editor/country-editor.js +14 -17
- package/lib/GeolocationEditor/mb-editor/index.js +6 -4
- package/lib/GeolocationEditor/mb-editor/location-editor.js +15 -18
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +68 -41
- 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 +23 -10
- package/lib/GeolocationEditor/pc-editor/index.js +20 -12
- package/lib/GeolocationEditor/pc-editor/location-editor.js +31 -26
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +54 -34
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +60 -36
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +62 -35
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +65 -36
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +25 -19
- package/lib/GeolocationEditor/pc-editor/province-editor.js +13 -6
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +6 -5
- package/lib/GeolocationEditor/pc-editor/selector-list.js +7 -6
- package/lib/GeolocationFormatter/index.js +5 -4
- package/lib/HtmlLongTextFormatter/index.js +12 -4
- package/lib/Icon/index.js +5 -3
- package/lib/IconButton/index.js +6 -4
- package/lib/ImageEditor/images-previewer/image-preview/index.js +21 -12
- package/lib/ImageEditor/images-previewer/index.js +9 -3
- package/lib/ImageEditor/index.js +3 -1
- 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 +3 -1
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +21 -7
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +9 -3
- package/lib/ImageEditor/pc-editor/index.js +16 -11
- package/lib/ImageFormatter/images-lazy-load.js +11 -19
- package/lib/ImageFormatter/index.js +13 -11
- package/lib/ImagePreviewerLightbox/index.js +13 -15
- package/lib/ImageThumbnail/index.js +13 -10
- package/lib/InputItem/custom-input.js +46 -26
- package/lib/InputItem/custom-keyboard.js +18 -15
- package/lib/InputItem/index.js +50 -34
- package/lib/InputItem/input.js +4 -2
- 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 +10 -5
- package/lib/LinkFormatter/index.js +37 -21
- package/lib/List/index.js +8 -6
- package/lib/List/list-item.js +28 -22
- package/lib/LongTextFormatter/index.js +5 -4
- package/lib/MBEditorHeader/index.js +8 -7
- package/lib/MTimeFormatter/index.js +4 -3
- package/lib/MobileFullScreenPage/body/index.js +5 -3
- package/lib/MobileFullScreenPage/header/index.js +6 -4
- package/lib/MobileFullScreenPage/index.js +11 -13
- package/lib/MobileModal/index.js +3 -1
- 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.js +3 -1
- package/lib/MobileSelector/search/index.js +5 -3
- package/lib/MobileUpload/index.js +5 -4
- package/lib/Modal/modal.js +15 -14
- package/lib/Modal/prompt.js +4 -4
- package/lib/MultipleSelectEditor/index.js +3 -1
- package/lib/MultipleSelectFormatter/index.js +8 -6
- 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 +4 -2
- package/lib/Picker/AbstractPicker.js +27 -23
- package/lib/Popover/index.js +4 -3
- package/lib/Popover/item.js +9 -7
- package/lib/Progress/index.js +8 -9
- package/lib/Radio/Radio.js +8 -4
- package/lib/Radio/RadioItem.js +12 -8
- package/lib/RateFormatter/index.js +13 -13
- package/lib/RoleStatusEditor/index.js +17 -18
- package/lib/RowExpandDialog/body/index.js +49 -32
- package/lib/RowExpandDialog/column-content/index.js +9 -5
- package/lib/RowExpandDialog/header/index.js +8 -6
- package/lib/RowExpandDialog/index.js +34 -49
- 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/mb-editor/index.js +33 -22
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +40 -26
- 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/mb-editor.js +11 -16
- package/lib/RowExpandEditor/department-editor/pc-editor.js +14 -19
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +34 -20
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +35 -21
- 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/mb-editor/index.js +19 -9
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +24 -13
- 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/mb-editor/index.js +29 -17
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +26 -13
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +25 -15
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +23 -13
- package/lib/RowExpandEditor/index.js +8 -4
- 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/mb-editor/index.js +19 -11
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +33 -22
- 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/mb-editor.js +25 -12
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +36 -20
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +28 -17
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +34 -22
- 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/mb-editor/index.js +13 -5
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +18 -9
- 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 +7 -4
- package/lib/RowExpandFormatter/file-formatter/index.js +9 -8
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +12 -10
- package/lib/RowExpandFormatter/formula-formatter/index.js +34 -19
- package/lib/RowExpandFormatter/image-formatter/index.js +11 -9
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +8 -7
- package/lib/RowExpandFormatter/index.js +41 -27
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +14 -8
- package/lib/RowExpandFormatter/link-formatter/index.js +19 -11
- package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +5 -3
- package/lib/RowExpandFormatter/rate-formatter/index.js +12 -11
- package/lib/RowExpandFormatter/text/index.js +5 -4
- package/lib/RowExpandFormatter/url-formatter/index.js +7 -4
- package/lib/RowExpandView/body/index.js +35 -22
- package/lib/RowExpandView/column-content/index.js +7 -3
- package/lib/RowExpandView/index.js +30 -42
- package/lib/SelectItem/index.js +8 -6
- package/lib/SelectOptionGroup/index.js +40 -30
- package/lib/SelectedDepartments/index.js +9 -7
- package/lib/SimpleLongTextFormatter/index.js +16 -10
- 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 +3 -1
- package/lib/SingleSelectFormatter/index.js +9 -8
- package/lib/TabBar/Tab.js +16 -14
- package/lib/TabBar/index.js +21 -18
- package/lib/Tabs/index.js +3 -1
- package/lib/TextEditor/index.js +23 -14
- package/lib/TextFormatter/index.js +4 -3
- package/lib/TextareaItem/index.js +26 -19
- package/lib/Toast/index.js +4 -3
- package/lib/UrlFormatter/index.js +4 -3
- package/lib/common/editor-base.js +12 -7
- package/lib/hooks/common-hooks.js +4 -2
- package/lib/select-editor/index.js +3 -1
- package/lib/select-editor/mb-editor/index.js +28 -17
- package/lib/select-editor/pc-editor/index.js +42 -27
- package/lib/toaster/alert.js +7 -6
- package/lib/toaster/toast.js +3 -2
- package/lib/toaster/toastManager.js +4 -2
- package/lib/utils/cell.js +11 -8
- package/lib/utils/column-utils.js +14 -8
- package/lib/utils/departments.js +3 -1
- package/lib/utils/url.js +31 -24
- package/lib/utils/utils.js +6 -2
- package/package.json +1 -1
|
@@ -31,11 +31,14 @@ class RowExpandMBGeolocationEditor extends _react.default.Component {
|
|
|
31
31
|
this.props.onCommit(value);
|
|
32
32
|
};
|
|
33
33
|
this.getLocationInfo = value => {
|
|
34
|
-
const
|
|
35
|
-
column
|
|
36
|
-
config
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
const {
|
|
35
|
+
column,
|
|
36
|
+
config
|
|
37
|
+
} = this.props;
|
|
38
|
+
const {
|
|
39
|
+
dtableBaiduMapKey,
|
|
40
|
+
dtableMineMapKey
|
|
41
|
+
} = config;
|
|
39
42
|
const isBaiduMap = !!(dtableBaiduMapKey || dtableMineMapKey);
|
|
40
43
|
return (0, _dtableUtils.getGeolocationDisplayString)(value, column.data, {
|
|
41
44
|
isBaiduMap,
|
|
@@ -43,7 +46,9 @@ class RowExpandMBGeolocationEditor extends _react.default.Component {
|
|
|
43
46
|
});
|
|
44
47
|
};
|
|
45
48
|
this.renderGeoLocation = () => {
|
|
46
|
-
const
|
|
49
|
+
const {
|
|
50
|
+
value
|
|
51
|
+
} = this.state;
|
|
47
52
|
const text = (0, _dtableUtils.isEmptyObject)(value) ? (0, _lang.getLocale)('Edit_Location') : this.getLocationInfo(value);
|
|
48
53
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_addBtn.default, {
|
|
49
54
|
onClick: this.openEditor,
|
|
@@ -51,18 +56,22 @@ class RowExpandMBGeolocationEditor extends _react.default.Component {
|
|
|
51
56
|
className: "py-4"
|
|
52
57
|
});
|
|
53
58
|
};
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
const {
|
|
60
|
+
row,
|
|
61
|
+
column: _column,
|
|
62
|
+
valueKey
|
|
63
|
+
} = props;
|
|
57
64
|
this.state = {
|
|
58
65
|
isShowEditor: false,
|
|
59
66
|
value: row[_column[valueKey]] || {}
|
|
60
67
|
};
|
|
61
68
|
}
|
|
62
69
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
70
|
+
const {
|
|
71
|
+
column,
|
|
72
|
+
row,
|
|
73
|
+
valueKey
|
|
74
|
+
} = nextProps;
|
|
66
75
|
if (row._id !== this.props.row._id) {
|
|
67
76
|
this.setState({
|
|
68
77
|
value: row[column[valueKey]] || {},
|
|
@@ -71,11 +80,14 @@ class RowExpandMBGeolocationEditor extends _react.default.Component {
|
|
|
71
80
|
}
|
|
72
81
|
}
|
|
73
82
|
render() {
|
|
74
|
-
const
|
|
75
|
-
column
|
|
76
|
-
row
|
|
77
|
-
config
|
|
78
|
-
|
|
83
|
+
const {
|
|
84
|
+
column,
|
|
85
|
+
row,
|
|
86
|
+
config
|
|
87
|
+
} = this.props;
|
|
88
|
+
const {
|
|
89
|
+
value
|
|
90
|
+
} = this.state;
|
|
79
91
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
80
92
|
children: [this.renderGeoLocation(), this.state.isShowEditor && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeolocationEditor.default, {
|
|
81
93
|
column: column,
|
|
@@ -69,8 +69,12 @@ class RowExpandPCGeolocationEditor extends _react.default.Component {
|
|
|
69
69
|
});
|
|
70
70
|
};
|
|
71
71
|
this.renderGeoLocation = () => {
|
|
72
|
-
let
|
|
73
|
-
|
|
72
|
+
let {
|
|
73
|
+
isEditorFocus
|
|
74
|
+
} = this.props;
|
|
75
|
+
let {
|
|
76
|
+
value
|
|
77
|
+
} = this.state;
|
|
74
78
|
if (!(0, _dtableUtils.isEmptyObject)(value)) {
|
|
75
79
|
const displayContent = this.getLocationInfo(value);
|
|
76
80
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -93,14 +97,18 @@ class RowExpandPCGeolocationEditor extends _react.default.Component {
|
|
|
93
97
|
});
|
|
94
98
|
};
|
|
95
99
|
this.getLocationInfo = value => {
|
|
96
|
-
const
|
|
100
|
+
const {
|
|
101
|
+
column
|
|
102
|
+
} = this.props;
|
|
97
103
|
return (0, _dtableUtils.getGeolocationDisplayString)(value, column.data, {
|
|
98
104
|
hyphen: ' '
|
|
99
105
|
});
|
|
100
106
|
};
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
107
|
+
const {
|
|
108
|
+
row,
|
|
109
|
+
column: _column,
|
|
110
|
+
valueKey
|
|
111
|
+
} = props;
|
|
104
112
|
this.state = {
|
|
105
113
|
isShowEditor: false,
|
|
106
114
|
value: row[_column[valueKey]] || {}
|
|
@@ -113,9 +121,11 @@ class RowExpandPCGeolocationEditor extends _react.default.Component {
|
|
|
113
121
|
document.addEventListener('keydown', this.onKeyDown);
|
|
114
122
|
}
|
|
115
123
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
124
|
+
const {
|
|
125
|
+
column,
|
|
126
|
+
row,
|
|
127
|
+
valueKey
|
|
128
|
+
} = nextProps;
|
|
119
129
|
if (row._id !== this.props.row._id) {
|
|
120
130
|
this.setState({
|
|
121
131
|
value: row[column[valueKey]] || {},
|
|
@@ -138,10 +148,13 @@ class RowExpandPCGeolocationEditor extends _react.default.Component {
|
|
|
138
148
|
document.removeEventListener('keydown', this.onKeyDown);
|
|
139
149
|
}
|
|
140
150
|
render() {
|
|
141
|
-
const
|
|
142
|
-
column
|
|
143
|
-
config
|
|
144
|
-
|
|
151
|
+
const {
|
|
152
|
+
column,
|
|
153
|
+
config
|
|
154
|
+
} = this.props;
|
|
155
|
+
const {
|
|
156
|
+
value
|
|
157
|
+
} = this.state;
|
|
145
158
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
146
159
|
ref: ref => this.editorContainer = ref,
|
|
147
160
|
className: "mt-2",
|
|
@@ -41,8 +41,12 @@ class RowExpandMBImageEditor extends _react.default.Component {
|
|
|
41
41
|
this.props.onCommit(updatedValue);
|
|
42
42
|
};
|
|
43
43
|
this.renderImages = () => {
|
|
44
|
-
const
|
|
45
|
-
|
|
44
|
+
const {
|
|
45
|
+
value
|
|
46
|
+
} = this.state;
|
|
47
|
+
const {
|
|
48
|
+
config
|
|
49
|
+
} = this.props;
|
|
46
50
|
return value.map((src, index) => {
|
|
47
51
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageThumbnail.default, {
|
|
48
52
|
index: index,
|
|
@@ -54,18 +58,22 @@ class RowExpandMBImageEditor extends _react.default.Component {
|
|
|
54
58
|
}, "image-".concat(index));
|
|
55
59
|
});
|
|
56
60
|
};
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
const {
|
|
62
|
+
column,
|
|
63
|
+
row,
|
|
64
|
+
valueKey
|
|
65
|
+
} = props;
|
|
60
66
|
this.state = {
|
|
61
67
|
isShowEditor: false,
|
|
62
68
|
value: row[column[valueKey]] || []
|
|
63
69
|
};
|
|
64
70
|
}
|
|
65
71
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
72
|
+
const {
|
|
73
|
+
column,
|
|
74
|
+
row,
|
|
75
|
+
valueKey
|
|
76
|
+
} = nextProps;
|
|
69
77
|
if (row._id !== this.props.row._id) {
|
|
70
78
|
this.setState({
|
|
71
79
|
value: row[column[valueKey]] || [],
|
|
@@ -74,13 +82,15 @@ class RowExpandMBImageEditor extends _react.default.Component {
|
|
|
74
82
|
}
|
|
75
83
|
}
|
|
76
84
|
render() {
|
|
77
|
-
const
|
|
78
|
-
column
|
|
79
|
-
config
|
|
80
|
-
uploadFile
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
const {
|
|
86
|
+
column,
|
|
87
|
+
config,
|
|
88
|
+
uploadFile
|
|
89
|
+
} = this.props;
|
|
90
|
+
const {
|
|
91
|
+
isShowEditor,
|
|
92
|
+
value
|
|
93
|
+
} = this.state;
|
|
84
94
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
85
95
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
86
96
|
className: "dtable-ui-mobile-row-expand-image position-relative",
|
|
@@ -65,11 +65,14 @@ class RowExpandPCImageEditor extends _react.default.Component {
|
|
|
65
65
|
this.setLargeImageIndex(-1);
|
|
66
66
|
};
|
|
67
67
|
this.getValue = () => {
|
|
68
|
-
let
|
|
69
|
-
column
|
|
70
|
-
row
|
|
71
|
-
valueKey
|
|
72
|
-
|
|
68
|
+
let {
|
|
69
|
+
column,
|
|
70
|
+
row,
|
|
71
|
+
valueKey
|
|
72
|
+
} = this.props;
|
|
73
|
+
let {
|
|
74
|
+
imageContainer
|
|
75
|
+
} = this.state;
|
|
73
76
|
return imageContainer ? imageContainer : row[column[valueKey]];
|
|
74
77
|
};
|
|
75
78
|
this.deleteImage = index => {
|
|
@@ -82,7 +85,9 @@ class RowExpandPCImageEditor extends _react.default.Component {
|
|
|
82
85
|
this.props.onCommit(updatedValue);
|
|
83
86
|
};
|
|
84
87
|
this.getImageArray = value => {
|
|
85
|
-
const
|
|
88
|
+
const {
|
|
89
|
+
config
|
|
90
|
+
} = this.props;
|
|
86
91
|
return value.map((imageSrc, index) => {
|
|
87
92
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageThumbnail.default, {
|
|
88
93
|
index: index,
|
|
@@ -103,9 +108,11 @@ class RowExpandPCImageEditor extends _react.default.Component {
|
|
|
103
108
|
document.addEventListener('keydown', this.onKeyDown);
|
|
104
109
|
}
|
|
105
110
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
111
|
+
const {
|
|
112
|
+
column,
|
|
113
|
+
row,
|
|
114
|
+
valueKey
|
|
115
|
+
} = nextProps;
|
|
109
116
|
if (row._id !== this.props.row._id) {
|
|
110
117
|
this.setState({
|
|
111
118
|
imageContainer: row[column[valueKey]] || [],
|
|
@@ -128,10 +135,13 @@ class RowExpandPCImageEditor extends _react.default.Component {
|
|
|
128
135
|
document.removeEventListener('keydown', this.onKeyDown);
|
|
129
136
|
}
|
|
130
137
|
render() {
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
138
|
+
const {
|
|
139
|
+
isEditorFocus
|
|
140
|
+
} = this.props;
|
|
141
|
+
let {
|
|
142
|
+
isShowImageEditor,
|
|
143
|
+
largeImageIndex
|
|
144
|
+
} = this.state;
|
|
135
145
|
let value = this.getValue();
|
|
136
146
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
137
147
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -12,14 +12,18 @@ var _constants = require("./constants");
|
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
const _excluded = ["column", "component"];
|
|
14
14
|
const RowExpandEditor = _ref => {
|
|
15
|
-
let
|
|
16
|
-
|
|
15
|
+
let {
|
|
16
|
+
column,
|
|
17
|
+
component
|
|
18
|
+
} = _ref,
|
|
17
19
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
18
20
|
const components = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _constants.CELL_EDITOR_MAP), component);
|
|
19
21
|
const Editor = components[column.type];
|
|
20
22
|
if (!Editor) return null;
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
+
const {
|
|
24
|
+
row,
|
|
25
|
+
valueKey
|
|
26
|
+
} = props;
|
|
23
27
|
const value = row[column[valueKey]];
|
|
24
28
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Editor, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
25
29
|
value: value,
|
|
@@ -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 _seafileEditor = require("@seafile/seafile-editor");
|
|
12
11
|
var _TextareaItem = _interopRequireDefault(require("../../../../TextareaItem"));
|
|
@@ -14,17 +13,18 @@ var _MobileFullScreenPage = _interopRequireDefault(require("../../../../MobileFu
|
|
|
14
13
|
var _lang = require("../../../../lang");
|
|
15
14
|
require("./index.css");
|
|
16
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
const
|
|
18
|
-
|
|
16
|
+
const {
|
|
17
|
+
Header,
|
|
18
|
+
Body
|
|
19
|
+
} = _MobileFullScreenPage.default;
|
|
19
20
|
const Editor = _ref => {
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
setValue = _useState2[1];
|
|
21
|
+
let {
|
|
22
|
+
value: oldValue,
|
|
23
|
+
title,
|
|
24
|
+
onToggle,
|
|
25
|
+
onChange
|
|
26
|
+
} = _ref;
|
|
27
|
+
const [value, setValue] = (0, _react.useState)(oldValue || '');
|
|
28
28
|
const hasUnSaved = (0, _react.useRef)(false);
|
|
29
29
|
const rowCounts = (0, _react.useMemo)(() => document.body.offsetWidth < 768 ? 10 : 20, []);
|
|
30
30
|
const handleTextChange = (0, _react.useCallback)(newValue => {
|
|
@@ -34,11 +34,12 @@ const Editor = _ref => {
|
|
|
34
34
|
}, [value]);
|
|
35
35
|
const onSave = (0, _react.useCallback)(() => {
|
|
36
36
|
if (!hasUnSaved.current) return;
|
|
37
|
-
const
|
|
38
|
-
previewText
|
|
39
|
-
images
|
|
40
|
-
links
|
|
41
|
-
checklist
|
|
37
|
+
const {
|
|
38
|
+
previewText,
|
|
39
|
+
images,
|
|
40
|
+
links,
|
|
41
|
+
checklist
|
|
42
|
+
} = (0, _seafileEditor.getPreviewContent)(value);
|
|
42
43
|
const newValue = Object.assign({}, {
|
|
43
44
|
text: value,
|
|
44
45
|
preview: previewText,
|
|
@@ -48,12 +48,15 @@ class RowExpandMBLongTextEditor extends _react.default.Component {
|
|
|
48
48
|
}
|
|
49
49
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
50
50
|
var _this$editorRef, _this$editorRef$curre;
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
const {
|
|
52
|
+
column,
|
|
53
|
+
row,
|
|
54
|
+
valueKey
|
|
55
|
+
} = nextProps;
|
|
56
|
+
const {
|
|
57
|
+
column: currentColumn,
|
|
58
|
+
row: currentRow
|
|
59
|
+
} = this.props;
|
|
57
60
|
const value = row[column[valueKey]];
|
|
58
61
|
const currentValue = currentRow[currentColumn[valueKey]];
|
|
59
62
|
if (value !== currentValue && !((_this$editorRef = this.editorRef) !== null && _this$editorRef !== void 0 && (_this$editorRef$curre = _this$editorRef.current) !== null && _this$editorRef$curre !== void 0 && _this$editorRef$curre.enableEdit)) {
|
|
@@ -61,10 +64,13 @@ class RowExpandMBLongTextEditor extends _react.default.Component {
|
|
|
61
64
|
}
|
|
62
65
|
}
|
|
63
66
|
render() {
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
const {
|
|
68
|
+
column
|
|
69
|
+
} = this.props;
|
|
70
|
+
const {
|
|
71
|
+
innerHtml,
|
|
72
|
+
isShowEditor
|
|
73
|
+
} = this.state;
|
|
68
74
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
69
75
|
children: [innerHtml ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
70
76
|
className: "dtable-ui-mobile-long-text-formatter article py-2",
|
|
@@ -47,7 +47,9 @@ class RowExpandPCLongTextEditor extends _react.default.Component {
|
|
|
47
47
|
this.editorRef.current.closeEditor();
|
|
48
48
|
};
|
|
49
49
|
this.onClick = () => {
|
|
50
|
-
const
|
|
50
|
+
const {
|
|
51
|
+
columnIndex
|
|
52
|
+
} = this.props;
|
|
51
53
|
this.props.updateTabIndex && this.props.updateTabIndex(columnIndex);
|
|
52
54
|
};
|
|
53
55
|
this.state = {
|
|
@@ -61,14 +63,17 @@ class RowExpandPCLongTextEditor extends _react.default.Component {
|
|
|
61
63
|
}
|
|
62
64
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
63
65
|
var _this$editorRef, _this$editorRef$curre;
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
const {
|
|
67
|
+
column,
|
|
68
|
+
row,
|
|
69
|
+
isEditorFocus: nextIsEditorFocus,
|
|
70
|
+
valueKey
|
|
71
|
+
} = nextProps;
|
|
72
|
+
const {
|
|
73
|
+
column: currentColumn,
|
|
74
|
+
row: currentRow,
|
|
75
|
+
isEditorFocus
|
|
76
|
+
} = this.props;
|
|
72
77
|
const value = row[column[valueKey]];
|
|
73
78
|
const currentValue = currentRow[currentColumn[valueKey]];
|
|
74
79
|
if (value !== currentValue && !((_this$editorRef = this.editorRef) !== null && _this$editorRef !== void 0 && (_this$editorRef$curre = _this$editorRef.current) !== null && _this$editorRef$curre !== void 0 && _this$editorRef$curre.enableEdit)) {
|
|
@@ -86,13 +91,15 @@ class RowExpandPCLongTextEditor extends _react.default.Component {
|
|
|
86
91
|
}
|
|
87
92
|
}
|
|
88
93
|
render() {
|
|
89
|
-
const
|
|
90
|
-
column
|
|
91
|
-
longTextEditorAPI
|
|
92
|
-
longTextEditorI18n
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
const {
|
|
95
|
+
column,
|
|
96
|
+
longTextEditorAPI,
|
|
97
|
+
longTextEditorI18n
|
|
98
|
+
} = this.props;
|
|
99
|
+
const {
|
|
100
|
+
isLoading,
|
|
101
|
+
value
|
|
102
|
+
} = this.state;
|
|
96
103
|
if (isLoading) return null;
|
|
97
104
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Suspense, {
|
|
98
105
|
fallback: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -19,7 +19,9 @@ class RowExpandMBMultipleSelectEditor extends _react.default.Component {
|
|
|
19
19
|
constructor(_props) {
|
|
20
20
|
super(_props);
|
|
21
21
|
this.getOptions = props => {
|
|
22
|
-
const
|
|
22
|
+
const {
|
|
23
|
+
column
|
|
24
|
+
} = props;
|
|
23
25
|
return (0, _dtableUtils.getColumnOptions)(column);
|
|
24
26
|
};
|
|
25
27
|
this.toggleEditor = value => {
|
|
@@ -63,7 +65,9 @@ class RowExpandMBMultipleSelectEditor extends _react.default.Component {
|
|
|
63
65
|
this.props.onCommit(newValue);
|
|
64
66
|
};
|
|
65
67
|
this.renderOptions = () => {
|
|
66
|
-
const
|
|
68
|
+
const {
|
|
69
|
+
value
|
|
70
|
+
} = this.state;
|
|
67
71
|
let displayOptions = [];
|
|
68
72
|
if (Array.isArray(value)) {
|
|
69
73
|
const selectedOptions = this.options.filter(option => value.includes(option[this.key]));
|
|
@@ -110,8 +114,10 @@ class RowExpandMBMultipleSelectEditor extends _react.default.Component {
|
|
|
110
114
|
this.options = this.getOptions(_props);
|
|
111
115
|
}
|
|
112
116
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
113
|
-
const
|
|
114
|
-
|
|
117
|
+
const {
|
|
118
|
+
value,
|
|
119
|
+
column
|
|
120
|
+
} = nextProps;
|
|
115
121
|
if (value !== this.props.value || !_objectUtils.default.isSameObject(column, this.props.column)) {
|
|
116
122
|
this.options = this.getOptions(nextProps);
|
|
117
123
|
this.setState({
|
|
@@ -121,13 +127,15 @@ class RowExpandMBMultipleSelectEditor extends _react.default.Component {
|
|
|
121
127
|
}
|
|
122
128
|
}
|
|
123
129
|
render() {
|
|
124
|
-
const
|
|
125
|
-
column
|
|
126
|
-
isSupportNewOption
|
|
127
|
-
onAddNewOption
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
const {
|
|
131
|
+
column,
|
|
132
|
+
isSupportNewOption,
|
|
133
|
+
onAddNewOption
|
|
134
|
+
} = this.props;
|
|
135
|
+
const {
|
|
136
|
+
showEditor,
|
|
137
|
+
value
|
|
138
|
+
} = this.state;
|
|
131
139
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
132
140
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
133
141
|
className: "dtable-ui dtable-ui-mobile-row-expand-options-editor position-relative",
|
|
@@ -18,7 +18,9 @@ class RowExpandPCMultipleSelectEditor extends _react.default.Component {
|
|
|
18
18
|
constructor(_props) {
|
|
19
19
|
super(_props);
|
|
20
20
|
this.getOptions = props => {
|
|
21
|
-
const
|
|
21
|
+
const {
|
|
22
|
+
column
|
|
23
|
+
} = props;
|
|
22
24
|
return (0, _dtableUtils.getColumnOptions)(column);
|
|
23
25
|
};
|
|
24
26
|
this.onKeyDown = e => {
|
|
@@ -49,9 +51,10 @@ class RowExpandPCMultipleSelectEditor extends _react.default.Component {
|
|
|
49
51
|
this.onToggleSelect = e => {
|
|
50
52
|
e.preventDefault();
|
|
51
53
|
e.stopPropagation();
|
|
52
|
-
const
|
|
53
|
-
updateTabIndex
|
|
54
|
-
columnIndex
|
|
54
|
+
const {
|
|
55
|
+
updateTabIndex,
|
|
56
|
+
columnIndex
|
|
57
|
+
} = this.props;
|
|
55
58
|
updateTabIndex && updateTabIndex(columnIndex);
|
|
56
59
|
this.toggleSingleSelect(true);
|
|
57
60
|
};
|
|
@@ -59,9 +62,10 @@ class RowExpandPCMultipleSelectEditor extends _react.default.Component {
|
|
|
59
62
|
this.toggleSingleSelect(false);
|
|
60
63
|
};
|
|
61
64
|
this.onFocus = () => {
|
|
62
|
-
const
|
|
63
|
-
updateTabIndex
|
|
64
|
-
columnIndex
|
|
65
|
+
const {
|
|
66
|
+
updateTabIndex,
|
|
67
|
+
columnIndex
|
|
68
|
+
} = this.props;
|
|
65
69
|
updateTabIndex && updateTabIndex(columnIndex);
|
|
66
70
|
};
|
|
67
71
|
this.onChange = option => {
|
|
@@ -83,7 +87,9 @@ class RowExpandPCMultipleSelectEditor extends _react.default.Component {
|
|
|
83
87
|
this.onChange(option);
|
|
84
88
|
};
|
|
85
89
|
this.getMultipleSelectList = () => {
|
|
86
|
-
const
|
|
90
|
+
const {
|
|
91
|
+
value
|
|
92
|
+
} = this.state;
|
|
87
93
|
if (!Array.isArray(value)) return [];
|
|
88
94
|
const selectedOptions = this.options.filter(option => value.includes(option[this.key]));
|
|
89
95
|
const selectedOptionIds = selectedOptions.map(option => option[this.key]);
|
|
@@ -144,10 +150,11 @@ class RowExpandPCMultipleSelectEditor extends _react.default.Component {
|
|
|
144
150
|
}));
|
|
145
151
|
};
|
|
146
152
|
this.renderOptions = () => {
|
|
147
|
-
const
|
|
148
|
-
isEditorFocus
|
|
149
|
-
classNamePrefix
|
|
150
|
-
placeholder
|
|
153
|
+
const {
|
|
154
|
+
isEditorFocus,
|
|
155
|
+
classNamePrefix,
|
|
156
|
+
placeholder
|
|
157
|
+
} = this.props;
|
|
151
158
|
const options = this.getMultipleSelectList();
|
|
152
159
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
153
160
|
tabIndex: 0,
|
|
@@ -194,8 +201,10 @@ class RowExpandPCMultipleSelectEditor extends _react.default.Component {
|
|
|
194
201
|
document.addEventListener('keydown', this.onKeyDown);
|
|
195
202
|
}
|
|
196
203
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
197
|
-
const
|
|
198
|
-
|
|
204
|
+
const {
|
|
205
|
+
value,
|
|
206
|
+
column
|
|
207
|
+
} = nextProps;
|
|
199
208
|
if (value !== this.props.value || !_objectUtils.default.isSameObject(column, this.props.column)) {
|
|
200
209
|
this.options = this.getOptions(nextProps);
|
|
201
210
|
this.setState({
|
|
@@ -218,14 +227,16 @@ class RowExpandPCMultipleSelectEditor extends _react.default.Component {
|
|
|
218
227
|
document.removeEventListener('keydown', this.onKeyDown);
|
|
219
228
|
}
|
|
220
229
|
render() {
|
|
221
|
-
const
|
|
222
|
-
column
|
|
223
|
-
isSupportNewOption
|
|
224
|
-
onAddNewOption
|
|
225
|
-
classNamePrefix
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
230
|
+
const {
|
|
231
|
+
column,
|
|
232
|
+
isSupportNewOption,
|
|
233
|
+
onAddNewOption,
|
|
234
|
+
classNamePrefix
|
|
235
|
+
} = this.props;
|
|
236
|
+
const {
|
|
237
|
+
showSelectPopover,
|
|
238
|
+
value
|
|
239
|
+
} = this.state;
|
|
229
240
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
230
241
|
className: "position-relative w-100",
|
|
231
242
|
ref: ref => this.ref = ref,
|
|
@@ -35,22 +35,28 @@ class RowExpandMBNumberEditor extends _react.default.Component {
|
|
|
35
35
|
isShowEditor: false
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
|
-
const
|
|
39
|
-
|
|
38
|
+
const {
|
|
39
|
+
column,
|
|
40
|
+
row
|
|
41
|
+
} = props;
|
|
40
42
|
this.state = {
|
|
41
43
|
isShowEditor: false,
|
|
42
44
|
value: row[column.key]
|
|
43
45
|
};
|
|
44
46
|
}
|
|
45
47
|
render() {
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
const {
|
|
49
|
+
column
|
|
50
|
+
} = this.props;
|
|
51
|
+
const {
|
|
52
|
+
value,
|
|
53
|
+
isShowEditor
|
|
54
|
+
} = this.state;
|
|
50
55
|
let formatValue = '';
|
|
51
56
|
if (!isShowEditor && (0, _dtableUtils.isNumber)(value)) {
|
|
52
|
-
const
|
|
53
|
-
data =
|
|
57
|
+
const {
|
|
58
|
+
data = {}
|
|
59
|
+
} = column;
|
|
54
60
|
formatValue = (0, _dtableUtils.getNumberDisplayString)(value, data);
|
|
55
61
|
}
|
|
56
62
|
const dom = isShowEditor ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_NumberEditor.default, {
|