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
|
@@ -41,7 +41,9 @@ class LocalImageAddition extends _react.default.Component {
|
|
|
41
41
|
};
|
|
42
42
|
this.onFileUploadSuccess = fileMessage => {
|
|
43
43
|
this.hideDeleteIcon();
|
|
44
|
-
let
|
|
44
|
+
let {
|
|
45
|
+
thumbnailSrcList
|
|
46
|
+
} = this.state;
|
|
45
47
|
const findUploadFileIndex = this.findUploadFileIndex(fileMessage);
|
|
46
48
|
thumbnailSrcList.splice(findUploadFileIndex, 1, fileMessage);
|
|
47
49
|
if (thumbnailSrcList.every(fileItem => !fileItem.isUploading)) {
|
|
@@ -52,7 +54,9 @@ class LocalImageAddition extends _react.default.Component {
|
|
|
52
54
|
this.props.fileUploadCompleted(fileMessage);
|
|
53
55
|
};
|
|
54
56
|
this.onFileUploadFailed = uploadedFileInfo => {
|
|
55
|
-
let
|
|
57
|
+
let {
|
|
58
|
+
thumbnailSrcList
|
|
59
|
+
} = this.state;
|
|
56
60
|
const findUploadFileIndex = this.findUploadFileIndex(uploadedFileInfo);
|
|
57
61
|
thumbnailSrcList.splice(findUploadFileIndex, 1, uploadedFileInfo);
|
|
58
62
|
this.setState({
|
|
@@ -60,7 +64,9 @@ class LocalImageAddition extends _react.default.Component {
|
|
|
60
64
|
});
|
|
61
65
|
};
|
|
62
66
|
this.findUploadFileIndex = fileMessage => {
|
|
63
|
-
let
|
|
67
|
+
let {
|
|
68
|
+
thumbnailSrcList
|
|
69
|
+
} = this.state;
|
|
64
70
|
let uploadFileIndex = thumbnailSrcList.findIndex(item => item.name === fileMessage.file.name);
|
|
65
71
|
return uploadFileIndex;
|
|
66
72
|
};
|
|
@@ -71,7 +77,9 @@ class LocalImageAddition extends _react.default.Component {
|
|
|
71
77
|
});
|
|
72
78
|
return;
|
|
73
79
|
}
|
|
74
|
-
let
|
|
80
|
+
let {
|
|
81
|
+
uploadMessageList
|
|
82
|
+
} = this.state;
|
|
75
83
|
let newUploadMessageList = uploadMessageList.slice(0);
|
|
76
84
|
let uploadFile = uploadMessageList.find(item => item.uploadName === uploadMessage.uploadName);
|
|
77
85
|
if (uploadFile) {
|
|
@@ -105,7 +113,9 @@ class LocalImageAddition extends _react.default.Component {
|
|
|
105
113
|
});
|
|
106
114
|
};
|
|
107
115
|
this.renderMultipleFilesArr = () => {
|
|
108
|
-
let
|
|
116
|
+
let {
|
|
117
|
+
thumbnailSrcList
|
|
118
|
+
} = this.state;
|
|
109
119
|
let imageArr = [];
|
|
110
120
|
if (Array.isArray(this.props.uploadLocalImageValue)) {
|
|
111
121
|
let uploadedFileList = this.renderUploadedFile();
|
|
@@ -160,7 +170,9 @@ class LocalImageAddition extends _react.default.Component {
|
|
|
160
170
|
return imageArr;
|
|
161
171
|
};
|
|
162
172
|
this.renderUploadedFile = () => {
|
|
163
|
-
const
|
|
173
|
+
const {
|
|
174
|
+
uploadLocalImageValue
|
|
175
|
+
} = this.props;
|
|
164
176
|
let uploadedFileList = [];
|
|
165
177
|
uploadedFileList = uploadLocalImageValue.length > 0 && uploadLocalImageValue.map((imgSrc, index) => {
|
|
166
178
|
let imageThumbnailUrl = (0, _url.getImageThumbnailUrl)(imgSrc);
|
|
@@ -190,7 +202,9 @@ class LocalImageAddition extends _react.default.Component {
|
|
|
190
202
|
return uploadedFileList;
|
|
191
203
|
};
|
|
192
204
|
this.renderUploadFileWrapper = imageArr => {
|
|
193
|
-
let
|
|
205
|
+
let {
|
|
206
|
+
isImageTipShow
|
|
207
|
+
} = this.state;
|
|
194
208
|
let editorContent;
|
|
195
209
|
let className = imageArr.length === 0 ? "dtable-ui-image-upload-container ".concat(isImageTipShow ? 'dtable-ui-image-upload-container-active' : '') : 'dtable-ui-image-wrapper';
|
|
196
210
|
if (imageArr.length === 0) {
|
|
@@ -25,7 +25,9 @@ class ImagesPreviewer extends _react.default.Component {
|
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
this.showLargeImage = itemUrl => {
|
|
28
|
-
let
|
|
28
|
+
let {
|
|
29
|
+
value
|
|
30
|
+
} = this.props;
|
|
29
31
|
this.setState({
|
|
30
32
|
isShowLargeImage: true,
|
|
31
33
|
largeImageIndex: value.indexOf(itemUrl)
|
|
@@ -55,7 +57,9 @@ class ImagesPreviewer extends _react.default.Component {
|
|
|
55
57
|
};
|
|
56
58
|
this.deleteImage = (index, type) => {
|
|
57
59
|
this.props.deleteImage(index, type);
|
|
58
|
-
const
|
|
60
|
+
const {
|
|
61
|
+
value
|
|
62
|
+
} = this.props;
|
|
59
63
|
if (index > value.length - 2) {
|
|
60
64
|
if (value.length - 2 < 0) {
|
|
61
65
|
this.hideLargeImage();
|
|
@@ -98,7 +102,9 @@ class ImagesPreviewer extends _react.default.Component {
|
|
|
98
102
|
}
|
|
99
103
|
}
|
|
100
104
|
render() {
|
|
101
|
-
let
|
|
105
|
+
let {
|
|
106
|
+
value
|
|
107
|
+
} = this.props;
|
|
102
108
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
103
109
|
className: "dtable-ui-image-previewer-container",
|
|
104
110
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -24,9 +24,10 @@ class PCImageEditor extends _react.default.Component {
|
|
|
24
24
|
return this.state.value;
|
|
25
25
|
};
|
|
26
26
|
this.getEditorView = () => {
|
|
27
|
-
const
|
|
28
|
-
isInModal
|
|
29
|
-
value
|
|
27
|
+
const {
|
|
28
|
+
isInModal,
|
|
29
|
+
value
|
|
30
|
+
} = this.props;
|
|
30
31
|
return !value || value.length === 0 || isInModal ? _constants.FILE_EDITOR_STATUS.ADDITION : _constants.FILE_EDITOR_STATUS.PREVIEWER;
|
|
31
32
|
};
|
|
32
33
|
this.deleteImage = function (index) {
|
|
@@ -56,9 +57,10 @@ class PCImageEditor extends _react.default.Component {
|
|
|
56
57
|
e.stopPropagation();
|
|
57
58
|
if (this.state.isOpen && this.state.isUpdated) {
|
|
58
59
|
if (this.state.editorView === _constants.FILE_EDITOR_STATUS.ADDITION) {
|
|
59
|
-
let
|
|
60
|
-
value
|
|
61
|
-
uploadLocalImageValue
|
|
60
|
+
let {
|
|
61
|
+
value,
|
|
62
|
+
uploadLocalImageValue
|
|
63
|
+
} = this.state;
|
|
62
64
|
let newValue = value.concat(uploadLocalImageValue);
|
|
63
65
|
this.setState({
|
|
64
66
|
value: newValue
|
|
@@ -112,7 +114,9 @@ class PCImageEditor extends _react.default.Component {
|
|
|
112
114
|
});
|
|
113
115
|
};
|
|
114
116
|
this.renderHeader = () => {
|
|
115
|
-
let
|
|
117
|
+
let {
|
|
118
|
+
editorView
|
|
119
|
+
} = this.state;
|
|
116
120
|
if (this.props.isInModal) {
|
|
117
121
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
118
122
|
children: (0, _lang.getLocale)('Add_images')
|
|
@@ -134,10 +138,11 @@ class PCImageEditor extends _react.default.Component {
|
|
|
134
138
|
});
|
|
135
139
|
};
|
|
136
140
|
this.showImageListPreviewer = () => {
|
|
137
|
-
let
|
|
138
|
-
value
|
|
139
|
-
uploadLocalImageValue
|
|
140
|
-
imageLinkValue
|
|
141
|
+
let {
|
|
142
|
+
value,
|
|
143
|
+
uploadLocalImageValue,
|
|
144
|
+
imageLinkValue
|
|
145
|
+
} = this.state;
|
|
141
146
|
let newValue = value.concat(uploadLocalImageValue, imageLinkValue);
|
|
142
147
|
this.setState({
|
|
143
148
|
value: newValue
|
|
@@ -1,34 +1,26 @@
|
|
|
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 _Loading = _interopRequireDefault(require("../Loading"));
|
|
12
11
|
var _url = require("../utils/url");
|
|
13
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
13
|
const ImagesLazyLoad = _ref => {
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
26
|
-
loadedImages = _useState4[0],
|
|
27
|
-
setLoadedImages = _useState4[1];
|
|
28
|
-
const _useState5 = (0, _react.useState)(0),
|
|
29
|
-
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
30
|
-
loadedCount = _useState6[0],
|
|
31
|
-
setLoadedCount = _useState6[1];
|
|
14
|
+
let {
|
|
15
|
+
images,
|
|
16
|
+
server,
|
|
17
|
+
onImageClick,
|
|
18
|
+
renderItem,
|
|
19
|
+
dtableUuid
|
|
20
|
+
} = _ref;
|
|
21
|
+
const [currentImages, setCurrentImages] = (0, _react.useState)(images);
|
|
22
|
+
const [loadedImages, setLoadedImages] = (0, _react.useState)([]);
|
|
23
|
+
const [loadedCount, setLoadedCount] = (0, _react.useState)(0);
|
|
32
24
|
const lazyLoadImage = (url, resolve, reject) => {
|
|
33
25
|
if (!url) {
|
|
34
26
|
reject('img path is required');
|
|
@@ -63,18 +63,20 @@ class ImageFormatter extends _react.default.Component {
|
|
|
63
63
|
this.canRotate = props.rotateImage && !props.readOnly;
|
|
64
64
|
}
|
|
65
65
|
render() {
|
|
66
|
-
const
|
|
67
|
-
isSample
|
|
68
|
-
value
|
|
69
|
-
server
|
|
70
|
-
containerClassName
|
|
71
|
-
lightboxClassName
|
|
72
|
-
readOnly
|
|
73
|
-
dtableUuid
|
|
66
|
+
const {
|
|
67
|
+
isSample,
|
|
68
|
+
value,
|
|
69
|
+
server,
|
|
70
|
+
containerClassName,
|
|
71
|
+
lightboxClassName,
|
|
72
|
+
readOnly,
|
|
73
|
+
dtableUuid
|
|
74
|
+
} = this.props;
|
|
74
75
|
const className = (0, _classnames.default)('dtable-ui cell-formatter-container image-formatter', containerClassName);
|
|
75
|
-
const
|
|
76
|
-
isPreviewImage
|
|
77
|
-
previewImageIndex
|
|
76
|
+
const {
|
|
77
|
+
isPreviewImage,
|
|
78
|
+
previewImageIndex
|
|
79
|
+
} = this.state;
|
|
78
80
|
if (!Array.isArray(value) || value.length === 0) {
|
|
79
81
|
return null;
|
|
80
82
|
}
|
|
@@ -5,7 +5,6 @@ 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"));
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
10
|
var _reactImageLightbox = _interopRequireDefault(require("@seafile/react-image-lightbox"));
|
|
@@ -15,16 +14,18 @@ require("@seafile/react-image-lightbox/style.css");
|
|
|
15
14
|
require("./index.css");
|
|
16
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
16
|
function ImagePreviewerLightbox(props) {
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
const {
|
|
18
|
+
imageItems,
|
|
19
|
+
imageIndex,
|
|
20
|
+
readOnly,
|
|
21
|
+
className,
|
|
22
|
+
server,
|
|
23
|
+
workspaceID,
|
|
24
|
+
dtableUuid,
|
|
25
|
+
deleteImage,
|
|
26
|
+
downloadImage,
|
|
27
|
+
onRotateImage
|
|
28
|
+
} = props;
|
|
28
29
|
const imageSrcList = imageItems.map(src => {
|
|
29
30
|
let name = '';
|
|
30
31
|
try {
|
|
@@ -57,10 +58,7 @@ function ImagePreviewerLightbox(props) {
|
|
|
57
58
|
};
|
|
58
59
|
});
|
|
59
60
|
const imagesLength = imageSrcList.length;
|
|
60
|
-
const
|
|
61
|
-
_React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
|
|
62
|
-
currentImageIndex = _React$useState2[0],
|
|
63
|
-
setCurrentImageIndex = _React$useState2[1];
|
|
61
|
+
const [currentImageIndex, setCurrentImageIndex] = _react.default.useState(imageIndex || 0);
|
|
64
62
|
const imageItem = imageSrcList[currentImageIndex];
|
|
65
63
|
const URL = imageItem ? imageItem.thumbnail : '';
|
|
66
64
|
const imageName = imageItem ? imageItem.name : '';
|
|
@@ -66,9 +66,9 @@ class ImageThumbnail extends _react.default.Component {
|
|
|
66
66
|
showTip: false
|
|
67
67
|
};
|
|
68
68
|
this.ref = null;
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
const {
|
|
70
|
+
mediaUrl = ''
|
|
71
|
+
} = props.config || {};
|
|
72
72
|
this.imageLoadingFailedUrl = "".concat(mediaUrl, "img/image-loading-failed.png");
|
|
73
73
|
}
|
|
74
74
|
componentDidMount() {
|
|
@@ -80,13 +80,16 @@ class ImageThumbnail extends _react.default.Component {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
render() {
|
|
83
|
-
const
|
|
84
|
-
index
|
|
85
|
-
downloadImage
|
|
86
|
-
src
|
|
87
|
-
className
|
|
88
|
-
name
|
|
89
|
-
|
|
83
|
+
const {
|
|
84
|
+
index,
|
|
85
|
+
downloadImage,
|
|
86
|
+
src,
|
|
87
|
+
className,
|
|
88
|
+
name
|
|
89
|
+
} = this.props;
|
|
90
|
+
const {
|
|
91
|
+
imageThumbnailUrl
|
|
92
|
+
} = this.state;
|
|
90
93
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
91
94
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
92
95
|
className: (0, _classnames.default)('dtable-ui-image-thumbnail', className),
|
|
@@ -50,7 +50,9 @@ class NumberInput extends React.Component {
|
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
this.doBlur = ev => {
|
|
53
|
-
const
|
|
53
|
+
const {
|
|
54
|
+
value
|
|
55
|
+
} = this.state;
|
|
54
56
|
if (ev.target !== this.inputRef) {
|
|
55
57
|
this.onInputBlur(value);
|
|
56
58
|
}
|
|
@@ -70,7 +72,9 @@ class NumberInput extends React.Component {
|
|
|
70
72
|
if (IS_REACT_16) {
|
|
71
73
|
this.keyBoard = null;
|
|
72
74
|
}
|
|
73
|
-
const
|
|
75
|
+
const {
|
|
76
|
+
focus
|
|
77
|
+
} = this.state;
|
|
74
78
|
if (focus) {
|
|
75
79
|
this.setState({
|
|
76
80
|
focus: false
|
|
@@ -82,7 +86,9 @@ class NumberInput extends React.Component {
|
|
|
82
86
|
}
|
|
83
87
|
};
|
|
84
88
|
this.onInputFocus = () => {
|
|
85
|
-
const
|
|
89
|
+
const {
|
|
90
|
+
value
|
|
91
|
+
} = this.state;
|
|
86
92
|
this.props.onFocus(value);
|
|
87
93
|
this.setState({
|
|
88
94
|
focus: true
|
|
@@ -94,8 +100,9 @@ class NumberInput extends React.Component {
|
|
|
94
100
|
const keyBoardHeight = customNumberKeyboard.antmKeyboard.offsetHeight;
|
|
95
101
|
this.getContainer().style.height = "".concat(keyBoardHeight, "px");
|
|
96
102
|
if (this.inputRef) {
|
|
97
|
-
const
|
|
98
|
-
bottom
|
|
103
|
+
const {
|
|
104
|
+
bottom
|
|
105
|
+
} = this.inputRef.getBoundingClientRect();
|
|
99
106
|
const clientHeight = window.innerHeight;
|
|
100
107
|
// 计算输入框距离视窗的底部距离
|
|
101
108
|
const distance = clientHeight - bottom;
|
|
@@ -118,10 +125,16 @@ class NumberInput extends React.Component {
|
|
|
118
125
|
});
|
|
119
126
|
};
|
|
120
127
|
this.onKeyboardClick = KeyboardItemValue => {
|
|
121
|
-
const
|
|
122
|
-
|
|
128
|
+
const {
|
|
129
|
+
maxLength
|
|
130
|
+
} = this.props;
|
|
131
|
+
const {
|
|
132
|
+
value
|
|
133
|
+
} = this.state;
|
|
123
134
|
// tslint:disable-next-line:no-this-assignment
|
|
124
|
-
const
|
|
135
|
+
const {
|
|
136
|
+
onChange
|
|
137
|
+
} = this;
|
|
125
138
|
let valueAfterChange;
|
|
126
139
|
// 删除键
|
|
127
140
|
if (KeyboardItemValue === 'delete') {
|
|
@@ -180,7 +193,9 @@ class NumberInput extends React.Component {
|
|
|
180
193
|
// this focus may invocked by users page button click, so this click may trigger blurEventListener at the same time
|
|
181
194
|
this.renderCustomKeyboard();
|
|
182
195
|
this.removeBlurListener();
|
|
183
|
-
const
|
|
196
|
+
const {
|
|
197
|
+
focus
|
|
198
|
+
} = this.state;
|
|
184
199
|
if (!focus) {
|
|
185
200
|
this.onInputFocus();
|
|
186
201
|
}
|
|
@@ -208,14 +223,15 @@ class NumberInput extends React.Component {
|
|
|
208
223
|
this.unLinkInput();
|
|
209
224
|
}
|
|
210
225
|
getComponent() {
|
|
211
|
-
const
|
|
212
|
-
confirmLabel
|
|
213
|
-
backspaceLabel
|
|
214
|
-
cancelKeyboardLabel
|
|
215
|
-
keyboardPrefixCls
|
|
216
|
-
moneyKeyboardWrapProps
|
|
217
|
-
moneyKeyboardHeader
|
|
218
|
-
disabledKeys
|
|
226
|
+
const {
|
|
227
|
+
confirmLabel,
|
|
228
|
+
backspaceLabel,
|
|
229
|
+
cancelKeyboardLabel,
|
|
230
|
+
keyboardPrefixCls,
|
|
231
|
+
moneyKeyboardWrapProps,
|
|
232
|
+
moneyKeyboardHeader,
|
|
233
|
+
disabledKeys
|
|
234
|
+
} = this.props;
|
|
219
235
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_customKeyboard.default, {
|
|
220
236
|
ref: this.saveRef,
|
|
221
237
|
onClick: this.onKeyboardClick,
|
|
@@ -229,7 +245,9 @@ class NumberInput extends React.Component {
|
|
|
229
245
|
});
|
|
230
246
|
}
|
|
231
247
|
getContainer() {
|
|
232
|
-
const
|
|
248
|
+
const {
|
|
249
|
+
keyboardPrefixCls
|
|
250
|
+
} = this.props;
|
|
233
251
|
let container = document.querySelector("#".concat(keyboardPrefixCls, "-container"));
|
|
234
252
|
if (!container) {
|
|
235
253
|
container = document.createElement('div');
|
|
@@ -258,14 +276,16 @@ class NumberInput extends React.Component {
|
|
|
258
276
|
return this.keyBoard;
|
|
259
277
|
}
|
|
260
278
|
render() {
|
|
261
|
-
const
|
|
262
|
-
placeholder
|
|
263
|
-
disabled
|
|
264
|
-
editable
|
|
265
|
-
moneyKeyboardAlign
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
279
|
+
const {
|
|
280
|
+
placeholder,
|
|
281
|
+
disabled,
|
|
282
|
+
editable,
|
|
283
|
+
moneyKeyboardAlign
|
|
284
|
+
} = this.props;
|
|
285
|
+
const {
|
|
286
|
+
focus,
|
|
287
|
+
value
|
|
288
|
+
} = this.state;
|
|
269
289
|
const preventKeyboard = disabled || !editable;
|
|
270
290
|
const fakeInputCls = (0, _classnames.default)('fake-input', {
|
|
271
291
|
focus,
|
|
@@ -33,14 +33,16 @@ function includes(arr, item) {
|
|
|
33
33
|
class KeyboardItem extends React.Component {
|
|
34
34
|
render() {
|
|
35
35
|
const _this$props = this.props,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
{
|
|
37
|
+
prefixCls,
|
|
38
|
+
onClick,
|
|
39
|
+
className,
|
|
40
|
+
disabled,
|
|
41
|
+
children,
|
|
42
|
+
tdRef,
|
|
43
|
+
label,
|
|
44
|
+
iconOnly
|
|
45
|
+
} = _this$props,
|
|
44
46
|
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
45
47
|
let value = children;
|
|
46
48
|
if (className === 'keyboard-delete') {
|
|
@@ -112,13 +114,14 @@ class CustomKeyboard extends React.Component {
|
|
|
112
114
|
};
|
|
113
115
|
}
|
|
114
116
|
render() {
|
|
115
|
-
const
|
|
116
|
-
prefixCls
|
|
117
|
-
confirmLabel
|
|
118
|
-
backspaceLabel
|
|
119
|
-
cancelKeyboardLabel
|
|
120
|
-
wrapProps
|
|
121
|
-
header
|
|
117
|
+
const {
|
|
118
|
+
prefixCls,
|
|
119
|
+
confirmLabel,
|
|
120
|
+
backspaceLabel,
|
|
121
|
+
cancelKeyboardLabel,
|
|
122
|
+
wrapProps,
|
|
123
|
+
header
|
|
124
|
+
} = this.props;
|
|
122
125
|
const wrapperCls = (0, _classnames.default)("".concat(prefixCls, "-wrapper"), "".concat(prefixCls, "-wrapper-hide"));
|
|
123
126
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
124
127
|
className: wrapperCls,
|
package/lib/InputItem/index.js
CHANGED
|
@@ -33,7 +33,9 @@ class InputItem extends React.Component {
|
|
|
33
33
|
_this = this;
|
|
34
34
|
this.onInputChange = e => {
|
|
35
35
|
const el = e.target;
|
|
36
|
-
const
|
|
36
|
+
const {
|
|
37
|
+
value: rawVal
|
|
38
|
+
} = el;
|
|
37
39
|
let prePos = 0;
|
|
38
40
|
try {
|
|
39
41
|
// some input type do not support selection, see https://html.spec.whatwg.org/multipage/input.html#do-not-apply
|
|
@@ -41,9 +43,12 @@ class InputItem extends React.Component {
|
|
|
41
43
|
} catch (error) {
|
|
42
44
|
console.warn('Get selection error:', error);
|
|
43
45
|
}
|
|
44
|
-
const
|
|
45
|
-
preCtrlVal =
|
|
46
|
-
|
|
46
|
+
const {
|
|
47
|
+
value: preCtrlVal = ''
|
|
48
|
+
} = this.state;
|
|
49
|
+
const {
|
|
50
|
+
type
|
|
51
|
+
} = this.props;
|
|
47
52
|
let ctrlValue = rawVal;
|
|
48
53
|
switch (type) {
|
|
49
54
|
case 'bankCard':
|
|
@@ -91,7 +96,9 @@ class InputItem extends React.Component {
|
|
|
91
96
|
this.handleOnChange = function (value) {
|
|
92
97
|
let isMutated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
93
98
|
let adjustPos = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop;
|
|
94
|
-
const
|
|
99
|
+
const {
|
|
100
|
+
onChange
|
|
101
|
+
} = _this.props;
|
|
95
102
|
if (!('value' in _this.props)) {
|
|
96
103
|
_this.setState({
|
|
97
104
|
value
|
|
@@ -217,39 +224,48 @@ class InputItem extends React.Component {
|
|
|
217
224
|
render() {
|
|
218
225
|
const props = (0, _objectSpread2.default)({}, this.props);
|
|
219
226
|
delete props.updatePlaceholder;
|
|
220
|
-
const
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
227
|
+
const {
|
|
228
|
+
prefixCls,
|
|
229
|
+
prefixListCls,
|
|
230
|
+
editable,
|
|
231
|
+
style,
|
|
232
|
+
clear,
|
|
233
|
+
children,
|
|
234
|
+
error,
|
|
235
|
+
className,
|
|
236
|
+
extra,
|
|
237
|
+
labelNumber,
|
|
238
|
+
type,
|
|
239
|
+
onExtraClick,
|
|
240
|
+
onErrorClick,
|
|
241
|
+
moneyKeyboardAlign,
|
|
242
|
+
moneyKeyboardWrapProps,
|
|
243
|
+
moneyKeyboardHeader,
|
|
244
|
+
onVirtualKeyboardConfirm,
|
|
245
|
+
autoAdjustHeight,
|
|
246
|
+
disabledKeys
|
|
247
|
+
} = props,
|
|
239
248
|
restProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
240
|
-
const
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
249
|
+
const {
|
|
250
|
+
name,
|
|
251
|
+
disabled,
|
|
252
|
+
maxLength
|
|
253
|
+
} = restProps;
|
|
254
|
+
const {
|
|
255
|
+
value
|
|
256
|
+
} = this.state;
|
|
244
257
|
|
|
245
258
|
// tslint:disable-next-line:variable-name
|
|
246
259
|
const _locale = (0, _getLocale.getComponentLocale)(this.props, this.context, 'InputItem', () => require('./locale/zh_CN'));
|
|
247
|
-
const
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
260
|
+
const {
|
|
261
|
+
confirmLabel,
|
|
262
|
+
backspaceLabel,
|
|
263
|
+
cancelKeyboardLabel
|
|
264
|
+
} = _locale;
|
|
265
|
+
const {
|
|
266
|
+
focus,
|
|
267
|
+
placeholder
|
|
268
|
+
} = this.state;
|
|
253
269
|
const wrapCls = (0, _classnames.default)("".concat(prefixListCls, "-item"), "".concat(prefixCls, "-item"), "".concat(prefixListCls, "-item-middle"), className, {
|
|
254
270
|
["".concat(prefixCls, "-disabled")]: disabled,
|
|
255
271
|
["".concat(prefixCls, "-error")]: error,
|
package/lib/InputItem/input.js
CHANGED
|
@@ -36,8 +36,10 @@ class Input extends React.Component {
|
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
38
|
const _this$props = this.props,
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
{
|
|
40
|
+
onBlur,
|
|
41
|
+
onFocus
|
|
42
|
+
} = _this$props,
|
|
41
43
|
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
42
44
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("input", (0, _objectSpread2.default)({
|
|
43
45
|
ref: el => this.inputRef = el,
|
|
@@ -20,9 +20,10 @@ class LastModifierFormatter extends _react.default.PureComponent {
|
|
|
20
20
|
constructor() {
|
|
21
21
|
super(...arguments);
|
|
22
22
|
this.getCollaborators = () => {
|
|
23
|
-
let
|
|
24
|
-
value
|
|
25
|
-
collaborators
|
|
23
|
+
let {
|
|
24
|
+
value,
|
|
25
|
+
collaborators
|
|
26
|
+
} = this.props;
|
|
26
27
|
if (!Array.isArray(value)) {
|
|
27
28
|
value = [value];
|
|
28
29
|
}
|
|
@@ -42,9 +43,10 @@ class LastModifierFormatter extends _react.default.PureComponent {
|
|
|
42
43
|
};
|
|
43
44
|
}
|
|
44
45
|
render() {
|
|
45
|
-
const
|
|
46
|
-
containerClassName
|
|
47
|
-
value
|
|
46
|
+
const {
|
|
47
|
+
containerClassName,
|
|
48
|
+
value
|
|
49
|
+
} = this.props;
|
|
48
50
|
const classname = (0, _classnames.default)('dtable-ui cell-formatter-container last-modified-formatter', containerClassName);
|
|
49
51
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
50
52
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|