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
|
@@ -27,9 +27,10 @@ class FileUploader extends _react.default.Component {
|
|
|
27
27
|
this.uploadFileRef.click();
|
|
28
28
|
};
|
|
29
29
|
this.onDragEnter = e => {
|
|
30
|
-
const
|
|
31
|
-
isSupportDragDrop
|
|
32
|
-
updateParentTips
|
|
30
|
+
const {
|
|
31
|
+
isSupportDragDrop,
|
|
32
|
+
updateParentTips
|
|
33
|
+
} = this.props;
|
|
33
34
|
if (isSupportDragDrop) {
|
|
34
35
|
e.preventDefault();
|
|
35
36
|
this.enteredCounter++;
|
|
@@ -39,16 +40,19 @@ class FileUploader extends _react.default.Component {
|
|
|
39
40
|
}
|
|
40
41
|
};
|
|
41
42
|
this.onDragOver = e => {
|
|
42
|
-
const
|
|
43
|
+
const {
|
|
44
|
+
isSupportDragDrop
|
|
45
|
+
} = this.props;
|
|
43
46
|
if (isSupportDragDrop) {
|
|
44
47
|
e.stopPropagation();
|
|
45
48
|
e.preventDefault();
|
|
46
49
|
}
|
|
47
50
|
};
|
|
48
51
|
this.onDragLeave = e => {
|
|
49
|
-
const
|
|
50
|
-
isSupportDragDrop
|
|
51
|
-
updateParentTips
|
|
52
|
+
const {
|
|
53
|
+
isSupportDragDrop,
|
|
54
|
+
updateParentTips
|
|
55
|
+
} = this.props;
|
|
52
56
|
if (isSupportDragDrop) {
|
|
53
57
|
this.enteredCounter--;
|
|
54
58
|
if (this.enteredCounter === 0) {
|
|
@@ -57,10 +61,11 @@ class FileUploader extends _react.default.Component {
|
|
|
57
61
|
}
|
|
58
62
|
};
|
|
59
63
|
this.onDrop = event => {
|
|
60
|
-
const
|
|
61
|
-
isSupportDragDrop
|
|
62
|
-
updateParentTips
|
|
63
|
-
onCellTipShow
|
|
64
|
+
const {
|
|
65
|
+
isSupportDragDrop,
|
|
66
|
+
updateParentTips,
|
|
67
|
+
onCellTipShow
|
|
68
|
+
} = this.props;
|
|
64
69
|
if (isSupportDragDrop) {
|
|
65
70
|
this.enteredCounter = 0;
|
|
66
71
|
updateParentTips(false);
|
|
@@ -74,7 +79,9 @@ class FileUploader extends _react.default.Component {
|
|
|
74
79
|
}
|
|
75
80
|
};
|
|
76
81
|
this.onPaste = event => {
|
|
77
|
-
const
|
|
82
|
+
const {
|
|
83
|
+
isSupportPaste
|
|
84
|
+
} = this.props;
|
|
78
85
|
if (isSupportPaste) {
|
|
79
86
|
event.stopPropagation();
|
|
80
87
|
let cliperData = (0, _getEventTransfer.default)(event);
|
|
@@ -85,17 +92,19 @@ class FileUploader extends _react.default.Component {
|
|
|
85
92
|
}
|
|
86
93
|
};
|
|
87
94
|
this.onMouseEnter = () => {
|
|
88
|
-
const
|
|
89
|
-
updateParentTips
|
|
90
|
-
uploadType
|
|
95
|
+
const {
|
|
96
|
+
updateParentTips,
|
|
97
|
+
uploadType
|
|
98
|
+
} = this.props;
|
|
91
99
|
if (uploadType === 'image') {
|
|
92
100
|
if (updateParentTips) updateParentTips(true, uploadType);
|
|
93
101
|
}
|
|
94
102
|
};
|
|
95
103
|
this.onMouseLeave = () => {
|
|
96
|
-
const
|
|
97
|
-
updateParentTips
|
|
98
|
-
uploadType
|
|
104
|
+
const {
|
|
105
|
+
updateParentTips,
|
|
106
|
+
uploadType
|
|
107
|
+
} = this.props;
|
|
99
108
|
if (uploadType === 'image') {
|
|
100
109
|
if (updateParentTips) updateParentTips(false, uploadType);
|
|
101
110
|
}
|
|
@@ -106,10 +115,11 @@ class FileUploader extends _react.default.Component {
|
|
|
106
115
|
this.handleFilesChange = function (files) {
|
|
107
116
|
let isPasteUpload = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
108
117
|
const _this = _this2;
|
|
109
|
-
const
|
|
110
|
-
uploadType
|
|
111
|
-
updateUploadFileList
|
|
112
|
-
onCellTipShow
|
|
118
|
+
const {
|
|
119
|
+
uploadType,
|
|
120
|
+
updateUploadFileList,
|
|
121
|
+
onCellTipShow
|
|
122
|
+
} = _this2.props;
|
|
113
123
|
let uploadFileList = [];
|
|
114
124
|
let dealFileCnt = 0;
|
|
115
125
|
let allFileLen = files.length;
|
|
@@ -187,7 +197,9 @@ class FileUploader extends _react.default.Component {
|
|
|
187
197
|
});
|
|
188
198
|
};
|
|
189
199
|
this.handleFileChange = (fileMessage, callback) => {
|
|
190
|
-
const
|
|
200
|
+
const {
|
|
201
|
+
onFileUploadFailed
|
|
202
|
+
} = this.props;
|
|
191
203
|
this.uploadFile(fileMessage).then(res => {
|
|
192
204
|
const data = res;
|
|
193
205
|
this.uploadFileMessage({
|
|
@@ -208,9 +220,10 @@ class FileUploader extends _react.default.Component {
|
|
|
208
220
|
});
|
|
209
221
|
};
|
|
210
222
|
this.uploadFileMessage = _ref => {
|
|
211
|
-
let
|
|
212
|
-
data =
|
|
213
|
-
fileMessage
|
|
223
|
+
let {
|
|
224
|
+
data = {},
|
|
225
|
+
fileMessage
|
|
226
|
+
} = _ref;
|
|
214
227
|
fileMessage.name = data.name;
|
|
215
228
|
fileMessage.isUploading = false;
|
|
216
229
|
fileMessage.size = data.size;
|
|
@@ -226,7 +239,9 @@ class FileUploader extends _react.default.Component {
|
|
|
226
239
|
this.handleFileChange(fileMessage);
|
|
227
240
|
};
|
|
228
241
|
this.onUploadProgress = (event, fileMessage) => {
|
|
229
|
-
const
|
|
242
|
+
const {
|
|
243
|
+
onFileUploadProgress
|
|
244
|
+
} = this.props;
|
|
230
245
|
let uploadPercent = Math.floor(event.loaded / event.total * 100);
|
|
231
246
|
fileMessage.percent = uploadPercent;
|
|
232
247
|
if (onFileUploadProgress) onFileUploadProgress(fileMessage);
|
|
@@ -241,7 +256,9 @@ class FileUploader extends _react.default.Component {
|
|
|
241
256
|
};
|
|
242
257
|
}
|
|
243
258
|
render() {
|
|
244
|
-
const
|
|
259
|
+
const {
|
|
260
|
+
uploadType
|
|
261
|
+
} = this.props;
|
|
245
262
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
246
263
|
onDragEnter: this.onDragEnter,
|
|
247
264
|
onDragOver: this.onDragOver,
|
|
@@ -32,7 +32,9 @@ class FormulaFormatter extends _react.default.Component {
|
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
this.renderCellValue = (cellValue, resultType) => {
|
|
35
|
-
const
|
|
35
|
+
const {
|
|
36
|
+
containerClassName
|
|
37
|
+
} = this.props;
|
|
36
38
|
const gridCellClassName = this.getGridCellClassName(resultType);
|
|
37
39
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
38
40
|
className: "dtable-ui cell-formatter-container formula-formatter ".concat(containerClassName, " ").concat(gridCellClassName),
|
|
@@ -45,13 +47,18 @@ class FormulaFormatter extends _react.default.Component {
|
|
|
45
47
|
return this.renderCellValue(errorValue, resultType);
|
|
46
48
|
};
|
|
47
49
|
this.renderOtherColumnFormatter = () => {
|
|
48
|
-
const
|
|
49
|
-
value
|
|
50
|
-
column
|
|
51
|
-
collaborators
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
|
|
50
|
+
const {
|
|
51
|
+
value,
|
|
52
|
+
column,
|
|
53
|
+
collaborators
|
|
54
|
+
} = this.props;
|
|
55
|
+
const {
|
|
56
|
+
data: columnData
|
|
57
|
+
} = column;
|
|
58
|
+
const {
|
|
59
|
+
array_type,
|
|
60
|
+
array_data
|
|
61
|
+
} = columnData;
|
|
55
62
|
if (!array_type || array_type === _dtableUtils.CellType.LINK) {
|
|
56
63
|
return null;
|
|
57
64
|
}
|
|
@@ -82,7 +89,9 @@ class FormulaFormatter extends _react.default.Component {
|
|
|
82
89
|
switch (array_type) {
|
|
83
90
|
case _dtableUtils.CellType.DURATION:
|
|
84
91
|
{
|
|
85
|
-
const
|
|
92
|
+
const {
|
|
93
|
+
duration_format
|
|
94
|
+
} = array_data;
|
|
86
95
|
return {
|
|
87
96
|
format: duration_format
|
|
88
97
|
};
|
|
@@ -113,14 +122,19 @@ class FormulaFormatter extends _react.default.Component {
|
|
|
113
122
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextFormatter.default, (0, _objectSpread2.default)({}, formatterProps));
|
|
114
123
|
}
|
|
115
124
|
render() {
|
|
116
|
-
const
|
|
117
|
-
column
|
|
118
|
-
collaborators
|
|
119
|
-
|
|
125
|
+
const {
|
|
126
|
+
column,
|
|
127
|
+
collaborators
|
|
128
|
+
} = this.props;
|
|
129
|
+
const {
|
|
130
|
+
data
|
|
131
|
+
} = column;
|
|
120
132
|
let value = this.props.value;
|
|
121
133
|
if (!data || !value && value !== 0 && value !== false) return null;
|
|
122
|
-
const
|
|
123
|
-
|
|
134
|
+
const {
|
|
135
|
+
array_type,
|
|
136
|
+
result_type: resultType
|
|
137
|
+
} = data;
|
|
124
138
|
if (_dtableUtils.DISPLAY_INTERNAL_ERRORS.includes(value)) {
|
|
125
139
|
return this.renderInternalErrorValue(value, resultType);
|
|
126
140
|
}
|
|
@@ -15,8 +15,10 @@ var _mbEditor = _interopRequireDefault(require("./mb-editor"));
|
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
16
|
const _excluded = ["isMobile", "config"];
|
|
17
17
|
const GeolocationEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
18
|
-
let
|
|
19
|
-
|
|
18
|
+
let {
|
|
19
|
+
isMobile,
|
|
20
|
+
config: propsConfig
|
|
21
|
+
} = _ref,
|
|
20
22
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
21
23
|
const config = (0, _react.useMemo)(() => {
|
|
22
24
|
var _window;
|
|
@@ -27,11 +29,10 @@ const GeolocationEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
27
29
|
if ((_window2 = window) !== null && _window2 !== void 0 && (_window2$app = _window2.app) !== null && _window2$app !== void 0 && _window2$app.location) return new Promise((resolve, reject) => {
|
|
28
30
|
resolve(window.app.location);
|
|
29
31
|
});
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
mediaUrl = _ref2$mediaUrl === void 0 ? '' : _ref2$mediaUrl;
|
|
32
|
+
const {
|
|
33
|
+
server = '',
|
|
34
|
+
mediaUrl = ''
|
|
35
|
+
} = config || {};
|
|
35
36
|
return fetch("".concat(server).concat(mediaUrl, "geo-data/cn-location.json").replaceAll('//', '/')).then(res => {
|
|
36
37
|
// get locations from server
|
|
37
38
|
return res.json();
|
|
@@ -49,10 +50,10 @@ const GeolocationEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
49
50
|
if (lang !== 'cn' && window.app.countryListEn) return new Promise((resolve, reject) => {
|
|
50
51
|
resolve(window.app.countryListEn);
|
|
51
52
|
});
|
|
52
|
-
const
|
|
53
|
-
mediaUrl =
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
const {
|
|
54
|
+
mediaUrl = '',
|
|
55
|
+
server = ''
|
|
56
|
+
} = config;
|
|
56
57
|
const geoFileName = lang === 'cn' ? 'cn-region-location' : 'en-region-location';
|
|
57
58
|
return fetch("".concat(server).concat(mediaUrl, "geo-data/").concat(geoFileName, ".json").replaceAll('//', '/')).then(res => {
|
|
58
59
|
return res.json();
|
|
@@ -30,19 +30,16 @@ const MINE_MAP_ONLINE_SERVICE = {
|
|
|
30
30
|
const getMineMapUrl = function () {
|
|
31
31
|
var _window;
|
|
32
32
|
let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
domain_url =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
sprite_url = _dtableMineMapCustomC4 === void 0 ? '' : _dtableMineMapCustomC4,
|
|
44
|
-
_dtableMineMapCustomC5 = dtableMineMapCustomConfig.service_url,
|
|
45
|
-
service_url = _dtableMineMapCustomC5 === void 0 ? '' : _dtableMineMapCustomC5;
|
|
33
|
+
const {
|
|
34
|
+
dtableMineMapCustomConfig = {}
|
|
35
|
+
} = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (_window = window) === null || _window === void 0 ? void 0 : _window.dtable), config);
|
|
36
|
+
const {
|
|
37
|
+
domain_url = '',
|
|
38
|
+
data_domain_url = '',
|
|
39
|
+
server_domain_url = '',
|
|
40
|
+
sprite_url = '',
|
|
41
|
+
service_url = ''
|
|
42
|
+
} = dtableMineMapCustomConfig;
|
|
46
43
|
return {
|
|
47
44
|
domainUrl: domain_url || MINE_MAP_ONLINE_SERVICE.DOMAIN_URL,
|
|
48
45
|
dataDomainUrl: data_domain_url || MINE_MAP_ONLINE_SERVICE.DATA_DOMAIN_URL,
|
|
@@ -75,10 +72,11 @@ exports.getInitCenter = getInitCenter;
|
|
|
75
72
|
const getMapInfo = function () {
|
|
76
73
|
var _window2;
|
|
77
74
|
let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
78
|
-
const
|
|
79
|
-
baiduMapKey
|
|
80
|
-
googleMapKey
|
|
81
|
-
mineMapKey
|
|
75
|
+
const {
|
|
76
|
+
dtableBaiduMapKey: baiduMapKey,
|
|
77
|
+
dtableGoogleMapKey: googleMapKey,
|
|
78
|
+
dtableMineMapKey: mineMapKey
|
|
79
|
+
} = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.dtable), config);
|
|
82
80
|
let mapType;
|
|
83
81
|
let mapKey;
|
|
84
82
|
if (baiduMapKey) {
|
|
@@ -1,34 +1,31 @@
|
|
|
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 _Picker = _interopRequireDefault(require("../../Picker"));
|
|
12
11
|
var _List = _interopRequireDefault(require("../../List"));
|
|
13
12
|
var _MobileFullScreenPage = _interopRequireDefault(require("../../MobileFullScreenPage"));
|
|
14
13
|
var _lang = require("../../lang");
|
|
15
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
const
|
|
17
|
-
|
|
15
|
+
const {
|
|
16
|
+
Header,
|
|
17
|
+
Body
|
|
18
|
+
} = _MobileFullScreenPage.default;
|
|
18
19
|
const CountryEditor = _ref => {
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const _useState3 = (0, _react.useState)(true),
|
|
29
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
30
|
-
isLoading = _useState4[0],
|
|
31
|
-
setLoading = _useState4[1];
|
|
20
|
+
let {
|
|
21
|
+
column,
|
|
22
|
+
value: oldValue,
|
|
23
|
+
getData,
|
|
24
|
+
onToggle,
|
|
25
|
+
onCommit
|
|
26
|
+
} = _ref;
|
|
27
|
+
const [value, setValue] = (0, _react.useState)([]);
|
|
28
|
+
const [isLoading, setLoading] = (0, _react.useState)(true);
|
|
32
29
|
const locations = (0, _react.useRef)([]);
|
|
33
30
|
(0, _react.useEffect)(() => {
|
|
34
31
|
getData().then(data => {
|
|
@@ -55,10 +55,12 @@ const transCountryData = data => {
|
|
|
55
55
|
return _data;
|
|
56
56
|
};
|
|
57
57
|
const MBGeolocationEditor = _ref => {
|
|
58
|
-
let
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
let {
|
|
59
|
+
column,
|
|
60
|
+
config,
|
|
61
|
+
getLocationData,
|
|
62
|
+
getCountryData
|
|
63
|
+
} = _ref,
|
|
62
64
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
63
65
|
const format = (0, _react.useMemo)(() => {
|
|
64
66
|
let data = column.data || {};
|
|
@@ -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 _InputItem = _interopRequireDefault(require("../../InputItem"));
|
|
12
11
|
var _Picker = _interopRequireDefault(require("../../Picker"));
|
|
@@ -15,27 +14,25 @@ var _MobileFullScreenPage = _interopRequireDefault(require("../../MobileFullScre
|
|
|
15
14
|
var _lang = require("../../lang");
|
|
16
15
|
var _objectUtils = _interopRequireDefault(require("../../utils/object-utils"));
|
|
17
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
const
|
|
19
|
-
|
|
17
|
+
const {
|
|
18
|
+
Header,
|
|
19
|
+
Body
|
|
20
|
+
} = _MobileFullScreenPage.default;
|
|
20
21
|
const LocationEditor = _ref => {
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
let {
|
|
23
|
+
isShowDetails,
|
|
24
|
+
column,
|
|
25
|
+
value: oldValue,
|
|
26
|
+
getData,
|
|
27
|
+
onToggle,
|
|
28
|
+
onCommit
|
|
29
|
+
} = _ref;
|
|
27
30
|
let initValue = [(oldValue === null || oldValue === void 0 ? void 0 : oldValue.province) || '', (oldValue === null || oldValue === void 0 ? void 0 : oldValue.city) || '', (oldValue === null || oldValue === void 0 ? void 0 : oldValue.district) || ''];
|
|
28
31
|
if (isShowDetails) {
|
|
29
32
|
initValue.push((oldValue === null || oldValue === void 0 ? void 0 : oldValue.detail) || '');
|
|
30
33
|
}
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
value = _useState2[0],
|
|
34
|
-
setValue = _useState2[1];
|
|
35
|
-
const _useState3 = (0, _react.useState)(true),
|
|
36
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
37
|
-
isLoading = _useState4[0],
|
|
38
|
-
setLoading = _useState4[1];
|
|
34
|
+
const [value, setValue] = (0, _react.useState)(initValue);
|
|
35
|
+
const [isLoading, setLoading] = (0, _react.useState)(true);
|
|
39
36
|
const locations = (0, _react.useRef)([]);
|
|
40
37
|
(0, _react.useEffect)(() => {
|
|
41
38
|
getData().then(data => {
|
|
@@ -18,20 +18,23 @@ var _Loading = _interopRequireDefault(require("../../../Loading"));
|
|
|
18
18
|
var _objectUtils = _interopRequireDefault(require("../../../utils/object-utils"));
|
|
19
19
|
require("./index.css");
|
|
20
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
-
const
|
|
22
|
-
|
|
21
|
+
const {
|
|
22
|
+
Header,
|
|
23
|
+
Body
|
|
24
|
+
} = _MobileFullScreenPage.default;
|
|
23
25
|
class MapEditor extends _react.default.Component {
|
|
24
26
|
constructor(props) {
|
|
25
27
|
super(props);
|
|
26
28
|
this.loadMineMapCallBack = () => {
|
|
27
29
|
if (!this.timer) {
|
|
28
30
|
this.timer = setTimeout(() => {
|
|
29
|
-
const
|
|
30
|
-
domainUrl
|
|
31
|
-
dataDomainUrl
|
|
32
|
-
serverDomainUrl
|
|
33
|
-
spriteUrl
|
|
34
|
-
serviceUrl
|
|
31
|
+
const {
|
|
32
|
+
domainUrl,
|
|
33
|
+
dataDomainUrl,
|
|
34
|
+
serverDomainUrl,
|
|
35
|
+
spriteUrl,
|
|
36
|
+
serviceUrl
|
|
37
|
+
} = (0, _mapEditorUtils.getMineMapUrl)();
|
|
35
38
|
window.minemap.domainUrl = domainUrl;
|
|
36
39
|
window.minemap.dataDomainUrl = dataDomainUrl;
|
|
37
40
|
window.minemap.serverDomainUrl = serverDomainUrl;
|
|
@@ -59,11 +62,14 @@ class MapEditor extends _react.default.Component {
|
|
|
59
62
|
minZoom: 3,
|
|
60
63
|
projection: 'MERCATOR'
|
|
61
64
|
});
|
|
62
|
-
let
|
|
63
|
-
lng
|
|
64
|
-
lat
|
|
65
|
-
zoom
|
|
66
|
-
|
|
65
|
+
let {
|
|
66
|
+
lng,
|
|
67
|
+
lat,
|
|
68
|
+
zoom
|
|
69
|
+
} = (0, _mapEditorUtils.getInitCenter)();
|
|
70
|
+
const {
|
|
71
|
+
value
|
|
72
|
+
} = this.state;
|
|
67
73
|
if ((0, _cell.isValidPosition)(value.lng, value.lat)) {
|
|
68
74
|
lng = value.lng;
|
|
69
75
|
lat = value.lat;
|
|
@@ -87,11 +93,14 @@ class MapEditor extends _react.default.Component {
|
|
|
87
93
|
if (!window.BMap.Map) return;
|
|
88
94
|
setTimeout(() => {
|
|
89
95
|
this.map = new window.BMap.Map('dtable-ui-mobile-geolocation-map-container');
|
|
90
|
-
let
|
|
91
|
-
lng
|
|
92
|
-
lat
|
|
93
|
-
zoom
|
|
94
|
-
|
|
96
|
+
let {
|
|
97
|
+
lng,
|
|
98
|
+
lat,
|
|
99
|
+
zoom
|
|
100
|
+
} = (0, _mapEditorUtils.getInitCenter)();
|
|
101
|
+
const {
|
|
102
|
+
value
|
|
103
|
+
} = this.state;
|
|
95
104
|
if ((0, _cell.isValidPosition)(value.lng, value.lat)) {
|
|
96
105
|
lng = value.lng;
|
|
97
106
|
lat = value.lat;
|
|
@@ -128,10 +137,11 @@ class MapEditor extends _react.default.Component {
|
|
|
128
137
|
isLoading: false
|
|
129
138
|
}, () => {
|
|
130
139
|
setTimeout(() => {
|
|
131
|
-
let
|
|
132
|
-
lng
|
|
133
|
-
lat
|
|
134
|
-
zoom
|
|
140
|
+
let {
|
|
141
|
+
lng,
|
|
142
|
+
lat,
|
|
143
|
+
zoom
|
|
144
|
+
} = (0, _mapEditorUtils.getInitCenter)();
|
|
135
145
|
this.map = new window.google.maps.Map(this.ref, {
|
|
136
146
|
zoom,
|
|
137
147
|
center: {
|
|
@@ -145,7 +155,9 @@ class MapEditor extends _react.default.Component {
|
|
|
145
155
|
rotateControl: false,
|
|
146
156
|
fullscreenControl: false
|
|
147
157
|
});
|
|
148
|
-
const
|
|
158
|
+
const {
|
|
159
|
+
value
|
|
160
|
+
} = this.state;
|
|
149
161
|
if (value.lng && value.lat) {
|
|
150
162
|
lng = value.lng;
|
|
151
163
|
lat = value.lat;
|
|
@@ -231,13 +243,16 @@ class MapEditor extends _react.default.Component {
|
|
|
231
243
|
});
|
|
232
244
|
};
|
|
233
245
|
this.onSubmit = () => {
|
|
234
|
-
const
|
|
246
|
+
const {
|
|
247
|
+
value
|
|
248
|
+
} = this.state;
|
|
235
249
|
if (!_objectUtils.default.isSameObject(value, this.props.value)) {
|
|
236
250
|
this.props.onCommit(value);
|
|
237
251
|
}
|
|
238
|
-
const
|
|
239
|
-
lng
|
|
240
|
-
lat
|
|
252
|
+
const {
|
|
253
|
+
lng,
|
|
254
|
+
lat
|
|
255
|
+
} = (0, _dtableUtils.normalizeMapPoint)(value);
|
|
241
256
|
const newValue = !(0, _dtableUtils.isNumber)(lng) || !(0, _dtableUtils.isNumber)(lat) ? null : value;
|
|
242
257
|
this.props.onCommit(newValue);
|
|
243
258
|
this.onClose();
|
|
@@ -277,7 +292,9 @@ class MapEditor extends _react.default.Component {
|
|
|
277
292
|
this.props.onToggle();
|
|
278
293
|
};
|
|
279
294
|
this.onBlur = () => {
|
|
280
|
-
const
|
|
295
|
+
const {
|
|
296
|
+
value
|
|
297
|
+
} = this.state;
|
|
281
298
|
const numericValue = (0, _dtableUtils.normalizeMapPoint)(value);
|
|
282
299
|
this.setState({
|
|
283
300
|
value: numericValue
|
|
@@ -306,8 +323,10 @@ class MapEditor extends _react.default.Component {
|
|
|
306
323
|
});
|
|
307
324
|
};
|
|
308
325
|
this.rerenderMapMarker = _ref => {
|
|
309
|
-
let
|
|
310
|
-
|
|
326
|
+
let {
|
|
327
|
+
lng,
|
|
328
|
+
lat
|
|
329
|
+
} = _ref;
|
|
311
330
|
if (!(0, _dtableUtils.isNumber)(lng) || !(0, _dtableUtils.isNumber)(lat)) {
|
|
312
331
|
return;
|
|
313
332
|
}
|
|
@@ -324,10 +343,11 @@ class MapEditor extends _react.default.Component {
|
|
|
324
343
|
this.addMarkerByPosition(lng, lat);
|
|
325
344
|
};
|
|
326
345
|
this.renderMap = () => {
|
|
327
|
-
const
|
|
328
|
-
isLoading
|
|
329
|
-
mode
|
|
330
|
-
lng_lat
|
|
346
|
+
const {
|
|
347
|
+
isLoading,
|
|
348
|
+
mode,
|
|
349
|
+
value: lng_lat
|
|
350
|
+
} = this.state;
|
|
331
351
|
if (isLoading) return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
332
352
|
className: "w-100 h-100 d-flex align-items-center justify-content-center",
|
|
333
353
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Loading.default, {})
|
|
@@ -420,14 +440,17 @@ class MapEditor extends _react.default.Component {
|
|
|
420
440
|
lng: '',
|
|
421
441
|
lat: ''
|
|
422
442
|
};
|
|
423
|
-
const
|
|
424
|
-
mapType
|
|
425
|
-
mapKey
|
|
443
|
+
const {
|
|
444
|
+
mapType,
|
|
445
|
+
mapKey
|
|
446
|
+
} = (0, _mapEditorUtils.getMapInfo)(props.config);
|
|
426
447
|
this.mapType = mapType;
|
|
427
448
|
this.mapKey = mapKey;
|
|
428
449
|
this.map = null;
|
|
429
|
-
const
|
|
430
|
-
|
|
450
|
+
const {
|
|
451
|
+
lng: _lng,
|
|
452
|
+
lat: _lat
|
|
453
|
+
} = _value;
|
|
431
454
|
this.state = {
|
|
432
455
|
mode: (0, _cell.isValidPosition)(_lng, _lat) ? 'preview' : 'edit',
|
|
433
456
|
isLoading: true,
|
|
@@ -485,8 +508,12 @@ class MapEditor extends _react.default.Component {
|
|
|
485
508
|
this.map = null;
|
|
486
509
|
}
|
|
487
510
|
render() {
|
|
488
|
-
const
|
|
489
|
-
|
|
511
|
+
const {
|
|
512
|
+
column
|
|
513
|
+
} = this.props;
|
|
514
|
+
const {
|
|
515
|
+
mode
|
|
516
|
+
} = this.state;
|
|
490
517
|
const isEdit = mode === 'edit';
|
|
491
518
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_MobileFullScreenPage.default, {
|
|
492
519
|
className: "dtable-ui-mobile-geolocation-map-editor",
|