dtable-ui-component 7.0.13 → 7.0.15
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 +58 -49
- package/lib/ActivityIndicator/index.js +17 -16
- package/lib/AsyncUserSelect/index.js +20 -46
- package/lib/AsyncUserSelect/user-item.js +6 -5
- package/lib/AutoNumberFormatter/index.js +4 -3
- package/lib/Badge/index.js +27 -29
- package/lib/ButtonFormatter/index.js +8 -6
- package/lib/CTimeFormatter/index.js +4 -3
- package/lib/CheckboxEditor/index.js +16 -13
- 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 +17 -14
- package/lib/CollaboratorEditor/mb-editor/index.js +19 -11
- package/lib/CollaboratorEditor/pc-editor/index.js +35 -26
- package/lib/CollaboratorFormatter/index.js +10 -8
- package/lib/CollaboratorItem/index.js +5 -4
- package/lib/CollapsibleSettingLayout/index.js +8 -10
- package/lib/Comment/body/comment.js +19 -11
- package/lib/Comment/body/index.js +8 -8
- package/lib/Comment/footer/btns/index.js +7 -4
- package/lib/Comment/footer/index.js +21 -10
- package/lib/Comment/footer/input/index.js +55 -34
- package/lib/Comment/footer/input/participant/index.js +6 -5
- 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 +26 -10
- package/lib/Comment/index.js +57 -39
- package/lib/Comment/utils/utilities.js +22 -16
- package/lib/CreatorFormatter/index.js +8 -6
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +26 -28
- package/lib/DTableColorPicker/index.js +53 -67
- package/lib/DTableColorPicker/utils.js +7 -5
- package/lib/DTableColumnIcon/index.js +7 -6
- package/lib/DTableCommonAddTool/index.js +10 -8
- package/lib/DTableCustomFooter/index.js +3 -1
- package/lib/DTableCustomizeSearchInput/index.js +41 -26
- package/lib/DTableCustomizeSelect/index.js +24 -19
- package/lib/DTableDropdownItem/index.js +28 -24
- package/lib/DTableDropdownMenu/index.js +17 -14
- package/lib/DTableEmptyTip/index.js +5 -4
- package/lib/DTableFiltersPopover/index.js +42 -27
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -1
- package/lib/DTableFiltersPopover/utils/index.js +114 -64
- 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 +57 -36
- package/lib/DTableFiltersPopover/widgets/filter-item.js +165 -106
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +162 -137
- package/lib/DTableFiltersPopover/widgets/rate-item.js +25 -20
- package/lib/DTableIcon/index.js +11 -10
- package/lib/DTableIcon/svg-icon.js +11 -9
- package/lib/DTableModalHeader/index.js +7 -7
- package/lib/DTablePopover/index.js +16 -12
- package/lib/DTableRadio/index.js +9 -10
- package/lib/DTableRadioGroup/index.js +20 -11
- package/lib/DTableSearchInput/index.js +29 -19
- package/lib/DTableSelect/dtable-select-label.js +6 -7
- package/lib/DTableSelect/index.js +26 -25
- package/lib/DTableSelect/select-dropdown-indicator/index.js +3 -1
- package/lib/DTableSelect/utils.js +83 -47
- package/lib/DTableSubDropdownMenu/index.js +16 -12
- package/lib/DTableSubDropdownToggle/index.js +16 -17
- package/lib/DTableSwitch/index.js +11 -12
- package/lib/DTableToolTip/index.js +12 -11
- package/lib/DateEditor/index.js +28 -30
- package/lib/DateEditor/mb-editor/index.js +31 -18
- package/lib/DateEditor/pc-editor.js +46 -27
- package/lib/DateFormatter/index.js +5 -4
- package/lib/DatePicker/index.js +15 -9
- package/lib/DatePicker/utils.js +7 -5
- package/lib/DeleteTip/index.js +6 -5
- package/lib/DepartmentMultipleSelectEditor/index.js +26 -28
- package/lib/DepartmentSelectFilter/index.js +13 -8
- package/lib/DepartmentSingleSelectEditor/index.js +16 -13
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +49 -50
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +64 -42
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +19 -13
- package/lib/DepartmentSingleSelectFormatter/index.js +6 -4
- package/lib/DigitalSignEditor/index.js +16 -13
- package/lib/DigitalSignEditor/mb-editor/index.js +24 -16
- package/lib/DigitalSignEditor/pc-editor/index.js +31 -23
- package/lib/DigitalSignEditor/service.js +5 -3
- package/lib/DigitalSignEditor/signature-board/index.js +10 -7
- package/lib/DigitalSignEditor/utils.js +4 -2
- package/lib/DigitalSignFormatter/index.js +15 -12
- package/lib/DigitalSignFormatter/utils.js +6 -5
- package/lib/Drawer/index.js +3 -2
- 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 +13 -13
- package/lib/FieldDisplaySetting/index.js +20 -20
- package/lib/FileEditor/files-previewer/index.js +16 -13
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +20 -12
- 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 +24 -17
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +57 -29
- package/lib/FileEditor/index.js +16 -13
- package/lib/FileEditor/mb-editor/index.js +20 -28
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +4 -2
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +31 -17
- package/lib/FileEditor/pc-editor/index.js +30 -22
- package/lib/FileFormatter/index.js +20 -27
- package/lib/FileItemFormatter/index.js +10 -7
- package/lib/FileUploader/index.js +46 -29
- package/lib/FormulaFormatter/index.js +44 -24
- package/lib/GeolocationEditor/index.js +32 -27
- package/lib/GeolocationEditor/map-editor-utils.js +23 -21
- package/lib/GeolocationEditor/mb-editor/country-editor.js +14 -17
- package/lib/GeolocationEditor/mb-editor/index.js +28 -22
- package/lib/GeolocationEditor/mb-editor/location-editor.js +15 -18
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +77 -47
- 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 +25 -12
- package/lib/GeolocationEditor/pc-editor/index.js +41 -27
- package/lib/GeolocationEditor/pc-editor/location-editor.js +33 -28
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +67 -43
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +69 -42
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +86 -42
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +85 -39
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +26 -20
- package/lib/GeolocationEditor/pc-editor/province-editor.js +15 -8
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +6 -5
- package/lib/GeolocationEditor/pc-editor/selector-list.js +8 -7
- package/lib/GeolocationFormatter/index.js +5 -4
- package/lib/HtmlLongTextFormatter/index.js +13 -5
- package/lib/Icon/index.js +13 -15
- package/lib/Icon/load-sprite.js +13 -2
- package/lib/IconButton/index.js +12 -13
- package/lib/ImageEditor/images-previewer/image-preview/index.js +22 -13
- package/lib/ImageEditor/images-previewer/index.js +9 -3
- package/lib/ImageEditor/index.js +16 -13
- 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 +5 -3
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +26 -12
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +10 -4
- package/lib/ImageEditor/pc-editor/index.js +16 -11
- package/lib/ImageFormatter/images-lazy-load.js +11 -19
- package/lib/ImageFormatter/index.js +14 -12
- package/lib/ImagePreviewerLightbox/index.js +15 -19
- package/lib/ImageThumbnail/index.js +15 -12
- package/lib/InputItem/custom-input.js +55 -35
- package/lib/InputItem/custom-keyboard.js +42 -42
- package/lib/InputItem/index.js +82 -63
- package/lib/InputItem/input.js +9 -11
- 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 +13 -7
- package/lib/LinkFormatter/index.js +37 -21
- package/lib/List/index.js +17 -19
- package/lib/List/list-item.js +59 -55
- package/lib/LongTextFormatter/index.js +5 -4
- package/lib/MBEditorHeader/index.js +9 -8
- package/lib/MTimeFormatter/index.js +4 -3
- package/lib/MobileFullScreenPage/body/index.js +6 -4
- package/lib/MobileFullScreenPage/header/index.js +10 -8
- package/lib/MobileFullScreenPage/index.js +12 -14
- package/lib/MobileModal/index.js +7 -8
- 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.css +0 -4
- 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/alert.js +2 -2
- package/lib/Modal/modal.js +28 -30
- package/lib/Modal/prompt.js +14 -14
- package/lib/MultipleSelectEditor/index.js +7 -7
- package/lib/MultipleSelectFormatter/index.js +9 -7
- 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 +5 -3
- package/lib/Picker/AbstractPicker.js +35 -33
- package/lib/Popover/index.js +9 -11
- package/lib/Popover/item.js +22 -24
- package/lib/Progress/index.js +18 -17
- package/lib/Radio/Radio.js +17 -15
- package/lib/Radio/RadioItem.js +23 -19
- package/lib/RateFormatter/index.js +15 -15
- package/lib/RoleStatusEditor/index.js +18 -19
- package/lib/RowExpand/index.js +7 -6
- package/lib/RowExpandDialog/body/index.js +57 -40
- package/lib/RowExpandDialog/column-content/index.js +10 -6
- package/lib/RowExpandDialog/header/index.js +12 -9
- package/lib/RowExpandDialog/index.js +59 -63
- package/lib/RowExpandEditor/add-btn/index.js +7 -6
- package/lib/RowExpandEditor/checkbox-editor/index.js +7 -6
- 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/index.js +7 -6
- 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/index.js +7 -6
- 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/index.js +7 -6
- 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/index.js +7 -6
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +38 -24
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +39 -25
- package/lib/RowExpandEditor/duration-editor/index.js +7 -6
- 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/index.js +7 -6
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +20 -10
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +25 -14
- package/lib/RowExpandEditor/file-editor/index.js +7 -6
- 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/index.js +7 -6
- 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/index.js +7 -6
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +26 -16
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +24 -14
- package/lib/RowExpandEditor/index.js +16 -11
- package/lib/RowExpandEditor/long-text-editor/index.js +7 -6
- 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/index.js +7 -6
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +20 -12
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +38 -27
- package/lib/RowExpandEditor/number-editor/index.js +7 -6
- 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/index.js +7 -6
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +26 -13
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +41 -25
- package/lib/RowExpandEditor/single-select-editor/index.js +7 -6
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +32 -21
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +37 -25
- package/lib/RowExpandEditor/text-editor/index.js +7 -6
- 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/index.js +7 -6
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +15 -7
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +20 -11
- package/lib/RowExpandFormatter/department-formatter/index.js +6 -3
- 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 +8 -5
- package/lib/RowExpandFormatter/file-formatter/index.js +9 -8
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +14 -12
- package/lib/RowExpandFormatter/formula-formatter/index.js +51 -30
- package/lib/RowExpandFormatter/image-formatter/index.js +11 -9
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +10 -9
- package/lib/RowExpandFormatter/index.js +52 -34
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +15 -9
- package/lib/RowExpandFormatter/link-formatter/index.js +25 -17
- package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +5 -3
- package/lib/RowExpandFormatter/rate-formatter/index.js +14 -13
- package/lib/RowExpandFormatter/text/index.js +5 -4
- package/lib/RowExpandFormatter/url-formatter/index.js +9 -6
- package/lib/RowExpandView/body/index.js +43 -32
- package/lib/RowExpandView/column-content/index.js +7 -3
- package/lib/RowExpandView/index.js +52 -53
- package/lib/SelectItem/index.js +7 -5
- package/lib/SelectOptionGroup/index.js +40 -30
- package/lib/SelectedDepartments/index.js +12 -10
- package/lib/SimpleLongTextFormatter/index.js +18 -12
- 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 +7 -7
- package/lib/SingleSelectFormatter/index.js +9 -8
- package/lib/TabBar/Tab.js +26 -24
- package/lib/TabBar/index.js +28 -24
- package/lib/Tabs/index.js +13 -10
- package/lib/TextEditor/index.js +23 -14
- package/lib/TextFormatter/index.js +4 -3
- package/lib/TextareaItem/index.js +53 -48
- package/lib/Toast/index.js +9 -8
- package/lib/UrlFormatter/index.js +4 -3
- package/lib/common/editor-base.js +12 -7
- package/lib/formatterConfig/index.js +3 -3
- package/lib/hooks/common-hooks.js +4 -2
- package/lib/select-editor/index.js +16 -13
- package/lib/select-editor/mb-editor/index.js +28 -17
- package/lib/select-editor/pc-editor/index.js +47 -32
- package/lib/toaster/alert.js +8 -7
- package/lib/toaster/toast.js +4 -3
- package/lib/toaster/toastManager.js +13 -13
- package/lib/toaster/toaster.js +12 -9
- package/lib/utils/cell.js +11 -8
- package/lib/utils/class.js +3 -3
- package/lib/utils/column-utils.js +14 -8
- package/lib/utils/departments.js +6 -5
- package/lib/utils/getLocale.js +11 -5
- package/lib/utils/object-utils.js +5 -4
- package/lib/utils/url.js +29 -22
- package/lib/utils/utils.js +6 -2
- package/package.json +2 -2
|
@@ -17,8 +17,10 @@ var _lang = require("../../../lang");
|
|
|
17
17
|
var _Loading = _interopRequireDefault(require("../../../Loading"));
|
|
18
18
|
require("./index.css");
|
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
const
|
|
21
|
-
|
|
20
|
+
const {
|
|
21
|
+
Header,
|
|
22
|
+
Body
|
|
23
|
+
} = _MobileFullScreenPage.default;
|
|
22
24
|
const getInputMode = column => {
|
|
23
25
|
const data = column.data;
|
|
24
26
|
if (!data) return _mapEditorUtils.INPUT_MODE_MAP.ANY_LOCATION;
|
|
@@ -39,7 +41,9 @@ class MapSelectionEditor extends _react.default.Component {
|
|
|
39
41
|
constructor(props) {
|
|
40
42
|
super(props);
|
|
41
43
|
this.addMarkerByPosition = value => {
|
|
42
|
-
const
|
|
44
|
+
const {
|
|
45
|
+
lngLat
|
|
46
|
+
} = value;
|
|
43
47
|
let point = new window.BMap.Point(lngLat.lng, lngLat.lat);
|
|
44
48
|
const marker = new window.BMap.Marker(point, {
|
|
45
49
|
offset: new window.BMap.Size(-2, -5)
|
|
@@ -58,9 +62,11 @@ class MapSelectionEditor extends _react.default.Component {
|
|
|
58
62
|
const geoCoder = new window.BMap.Geocoder();
|
|
59
63
|
let value = {};
|
|
60
64
|
geoCoder.getLocation(point, result => {
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
const {
|
|
66
|
+
surroundingPois,
|
|
67
|
+
address,
|
|
68
|
+
point
|
|
69
|
+
} = result;
|
|
64
70
|
if (surroundingPois.length === 0) {
|
|
65
71
|
value.address = address;
|
|
66
72
|
value.lngLat = {
|
|
@@ -71,10 +77,12 @@ class MapSelectionEditor extends _react.default.Component {
|
|
|
71
77
|
value.title = '';
|
|
72
78
|
} else {
|
|
73
79
|
const position = surroundingPois[0];
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
80
|
+
const {
|
|
81
|
+
address,
|
|
82
|
+
title,
|
|
83
|
+
tags,
|
|
84
|
+
point
|
|
85
|
+
} = position;
|
|
78
86
|
value.address = address || '';
|
|
79
87
|
value.title = title || '';
|
|
80
88
|
value.tag = tags || [];
|
|
@@ -98,12 +106,17 @@ class MapSelectionEditor extends _react.default.Component {
|
|
|
98
106
|
if (!window.BMap.Map) return;
|
|
99
107
|
setTimeout(() => {
|
|
100
108
|
this.map = new window.BMap.Map('dtable-ui-mobile-geolocation-map-container');
|
|
101
|
-
let
|
|
102
|
-
lng
|
|
103
|
-
lat
|
|
104
|
-
zoom
|
|
105
|
-
|
|
106
|
-
const
|
|
109
|
+
let {
|
|
110
|
+
lng,
|
|
111
|
+
lat,
|
|
112
|
+
zoom
|
|
113
|
+
} = (0, _mapEditorUtils.getInitCenter)();
|
|
114
|
+
const {
|
|
115
|
+
value
|
|
116
|
+
} = this.state;
|
|
117
|
+
const {
|
|
118
|
+
lngLat
|
|
119
|
+
} = value;
|
|
107
120
|
if ((0, _cell.isValidPosition)(lngLat.lng, lngLat.lat)) {
|
|
108
121
|
lng = lngLat.lng;
|
|
109
122
|
lat = lngLat.lat;
|
|
@@ -122,9 +135,11 @@ class MapSelectionEditor extends _react.default.Component {
|
|
|
122
135
|
const point = event.point;
|
|
123
136
|
const geoCoder = new window.BMap.Geocoder();
|
|
124
137
|
geoCoder.getLocation(point, result => {
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
|
|
138
|
+
const {
|
|
139
|
+
surroundingPois,
|
|
140
|
+
address,
|
|
141
|
+
point
|
|
142
|
+
} = result;
|
|
128
143
|
if (surroundingPois.length === 0) {
|
|
129
144
|
value.address = address;
|
|
130
145
|
value.lngLat = {
|
|
@@ -135,10 +150,12 @@ class MapSelectionEditor extends _react.default.Component {
|
|
|
135
150
|
value.title = '';
|
|
136
151
|
} else {
|
|
137
152
|
const position = surroundingPois[0];
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
153
|
+
const {
|
|
154
|
+
address,
|
|
155
|
+
title,
|
|
156
|
+
tags,
|
|
157
|
+
point
|
|
158
|
+
} = position;
|
|
142
159
|
value.address = address || '';
|
|
143
160
|
value.title = title || '';
|
|
144
161
|
value.tag = tags || [];
|
|
@@ -168,9 +185,11 @@ class MapSelectionEditor extends _react.default.Component {
|
|
|
168
185
|
const geoCoder = new window.BMap.Geocoder();
|
|
169
186
|
geoCoder.getLocation(point, result => {
|
|
170
187
|
let value = {};
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
|
|
188
|
+
const {
|
|
189
|
+
surroundingPois,
|
|
190
|
+
address,
|
|
191
|
+
point
|
|
192
|
+
} = result;
|
|
174
193
|
if (surroundingPois.length === 0) {
|
|
175
194
|
value.address = address;
|
|
176
195
|
value.lngLat = {
|
|
@@ -181,10 +200,12 @@ class MapSelectionEditor extends _react.default.Component {
|
|
|
181
200
|
value.title = '';
|
|
182
201
|
} else {
|
|
183
202
|
const position = surroundingPois[0];
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
203
|
+
const {
|
|
204
|
+
address,
|
|
205
|
+
title,
|
|
206
|
+
tags,
|
|
207
|
+
point
|
|
208
|
+
} = position;
|
|
188
209
|
value.address = address || '';
|
|
189
210
|
value.title = title || '';
|
|
190
211
|
value.tag = tags || [];
|
|
@@ -239,7 +260,9 @@ class MapSelectionEditor extends _react.default.Component {
|
|
|
239
260
|
});
|
|
240
261
|
};
|
|
241
262
|
this.onCommit = () => {
|
|
242
|
-
const
|
|
263
|
+
const {
|
|
264
|
+
value
|
|
265
|
+
} = this.state;
|
|
243
266
|
const isEmptyMapSelection = this.isEmptySelection(value);
|
|
244
267
|
this.props.onCommit(isEmptyMapSelection ? '' : value);
|
|
245
268
|
};
|
|
@@ -247,7 +270,9 @@ class MapSelectionEditor extends _react.default.Component {
|
|
|
247
270
|
this.props.onToggle();
|
|
248
271
|
};
|
|
249
272
|
this.onFillIn = () => {
|
|
250
|
-
const
|
|
273
|
+
const {
|
|
274
|
+
selectedSelection
|
|
275
|
+
} = this.state;
|
|
251
276
|
this.setState({
|
|
252
277
|
value: selectedSelection,
|
|
253
278
|
isShowLabel: false
|
|
@@ -267,7 +292,9 @@ class MapSelectionEditor extends _react.default.Component {
|
|
|
267
292
|
};
|
|
268
293
|
this.onSearch = e => {
|
|
269
294
|
e.stopPropagation();
|
|
270
|
-
const
|
|
295
|
+
const {
|
|
296
|
+
inputValue
|
|
297
|
+
} = this.state;
|
|
271
298
|
if (!inputValue) return;
|
|
272
299
|
const options = {
|
|
273
300
|
onSearchComplete: results => {
|
|
@@ -300,7 +327,9 @@ class MapSelectionEditor extends _react.default.Component {
|
|
|
300
327
|
local.search(inputValue);
|
|
301
328
|
};
|
|
302
329
|
this.renderSearchResult = () => {
|
|
303
|
-
const
|
|
330
|
+
const {
|
|
331
|
+
searchResults
|
|
332
|
+
} = this.state;
|
|
304
333
|
if (searchResults.length === 0) return null;
|
|
305
334
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
306
335
|
className: "dtable-ui-mobile-map-selection-editor-search-results",
|
|
@@ -320,10 +349,14 @@ class MapSelectionEditor extends _react.default.Component {
|
|
|
320
349
|
});
|
|
321
350
|
};
|
|
322
351
|
this.renderLabel = () => {
|
|
323
|
-
const
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
352
|
+
const {
|
|
353
|
+
selectedSelection
|
|
354
|
+
} = this.state;
|
|
355
|
+
const {
|
|
356
|
+
address,
|
|
357
|
+
title,
|
|
358
|
+
tag
|
|
359
|
+
} = selectedSelection;
|
|
327
360
|
const tagContent = Array.isArray(tag) && tag.length > 0 ? tag[0] : '';
|
|
328
361
|
if (title) {
|
|
329
362
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -373,11 +406,12 @@ class MapSelectionEditor extends _react.default.Component {
|
|
|
373
406
|
});
|
|
374
407
|
};
|
|
375
408
|
this.renderMap = () => {
|
|
376
|
-
const
|
|
377
|
-
isLoading
|
|
378
|
-
inputValue
|
|
379
|
-
isShowSearchView
|
|
380
|
-
isShowLabel
|
|
409
|
+
const {
|
|
410
|
+
isLoading,
|
|
411
|
+
inputValue,
|
|
412
|
+
isShowSearchView,
|
|
413
|
+
isShowLabel
|
|
414
|
+
} = this.state;
|
|
381
415
|
if (isLoading) return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
382
416
|
className: "w-100 h-100 d-flex align-items-center justify-content-center",
|
|
383
417
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Loading.default, {})
|
|
@@ -456,13 +490,16 @@ class MapSelectionEditor extends _react.default.Component {
|
|
|
456
490
|
}), isShowLabel && this.renderLabel()]
|
|
457
491
|
});
|
|
458
492
|
};
|
|
459
|
-
const
|
|
460
|
-
|
|
461
|
-
|
|
493
|
+
const {
|
|
494
|
+
value: _value,
|
|
495
|
+
config,
|
|
496
|
+
column
|
|
497
|
+
} = props;
|
|
462
498
|
const oldValue = _value || {};
|
|
463
|
-
const
|
|
464
|
-
mapType
|
|
465
|
-
mapKey
|
|
499
|
+
const {
|
|
500
|
+
mapType,
|
|
501
|
+
mapKey
|
|
502
|
+
} = (0, _mapEditorUtils.getMapInfo)(config);
|
|
466
503
|
this.mapType = mapType;
|
|
467
504
|
this.mapKey = mapKey;
|
|
468
505
|
const mode = getInputMode(column);
|
|
@@ -505,7 +542,9 @@ class MapSelectionEditor extends _react.default.Component {
|
|
|
505
542
|
this.map = null;
|
|
506
543
|
}
|
|
507
544
|
render() {
|
|
508
|
-
const
|
|
545
|
+
const {
|
|
546
|
+
column
|
|
547
|
+
} = this.props;
|
|
509
548
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_MobileFullScreenPage.default, {
|
|
510
549
|
className: "dtable-ui-mobile-geolocation-map-selection-editor",
|
|
511
550
|
onClose: this.onClose,
|
|
@@ -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 ProvinceCityEditor = _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)([(oldValue === null || oldValue === void 0 ? void 0 : oldValue.province) || '', (oldValue === null || oldValue === void 0 ? void 0 : oldValue.city) || '']);
|
|
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 => {
|
|
@@ -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 ProvinceEditor = _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)([(oldValue === null || oldValue === void 0 ? void 0 : oldValue.province) || '']);
|
|
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 => {
|
|
@@ -31,7 +31,9 @@ class CountryEditor extends _react.Component {
|
|
|
31
31
|
this.onDownArrow = e => {
|
|
32
32
|
e.preventDefault();
|
|
33
33
|
e.stopPropagation();
|
|
34
|
-
let
|
|
34
|
+
let {
|
|
35
|
+
highlightIndexes
|
|
36
|
+
} = this.state;
|
|
35
37
|
const continents = Object.keys(this.filteredCountry);
|
|
36
38
|
if (continents.length === 0) return;
|
|
37
39
|
const continent = continents[highlightIndexes[0]];
|
|
@@ -53,7 +55,9 @@ class CountryEditor extends _react.Component {
|
|
|
53
55
|
this.onUpArrow = e => {
|
|
54
56
|
e.preventDefault();
|
|
55
57
|
e.stopPropagation();
|
|
56
|
-
let
|
|
58
|
+
let {
|
|
59
|
+
highlightIndexes
|
|
60
|
+
} = this.state;
|
|
57
61
|
const continents = Object.keys(this.filteredCountry);
|
|
58
62
|
if (continents.length === 0) return;
|
|
59
63
|
if (highlightIndexes[1] === 0 && highlightIndexes[0] !== 0) {
|
|
@@ -91,7 +95,9 @@ class CountryEditor extends _react.Component {
|
|
|
91
95
|
});
|
|
92
96
|
this.props.onSubmit();
|
|
93
97
|
} else {
|
|
94
|
-
const
|
|
98
|
+
const {
|
|
99
|
+
highlightIndexes
|
|
100
|
+
} = this.state;
|
|
95
101
|
const continents = Object.keys(this.filteredCountry);
|
|
96
102
|
if (continents.length > 0) {
|
|
97
103
|
const continent = continents[highlightIndexes[0]];
|
|
@@ -111,7 +117,9 @@ class CountryEditor extends _react.Component {
|
|
|
111
117
|
};
|
|
112
118
|
this.onMenuMouseLeave = (continentIndex, countryIndex) => {
|
|
113
119
|
this.timer = setTimeout(() => {
|
|
114
|
-
const
|
|
120
|
+
const {
|
|
121
|
+
highlightIndexes
|
|
122
|
+
} = this.state;
|
|
115
123
|
if (highlightIndexes[0] === continentIndex && highlightIndexes[1] === countryIndex) {
|
|
116
124
|
this.setState({
|
|
117
125
|
highlightIndexes: [0, -1]
|
|
@@ -144,20 +152,21 @@ class CountryEditor extends _react.Component {
|
|
|
144
152
|
return continentsList;
|
|
145
153
|
};
|
|
146
154
|
this.createCountryList = (continent, continentIndex) => {
|
|
147
|
-
const
|
|
148
|
-
value
|
|
149
|
-
highlightIndexes
|
|
155
|
+
const {
|
|
156
|
+
value,
|
|
157
|
+
highlightIndexes
|
|
158
|
+
} = this.state;
|
|
150
159
|
let countryList = this.filteredCountry[continent].map((country, index) => {
|
|
151
160
|
const isHighlight = highlightIndexes[0] === continentIndex && highlightIndexes[1] === index;
|
|
152
161
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
153
|
-
className:
|
|
162
|
+
className: `geolocation-region-editor-country ${isHighlight ? 'geolocation-region-editor-province-highlight' : ''}`,
|
|
154
163
|
onMouseEnter: () => this.onMenuMouseEnter(continentIndex, index),
|
|
155
164
|
onMouseLeave: () => this.onMenuMouseLeave(continentIndex, index),
|
|
156
165
|
title: country,
|
|
157
166
|
"aria-label": country,
|
|
158
167
|
onClick: () => this.onClick(country),
|
|
159
168
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
160
|
-
className:
|
|
169
|
+
className: `icon ${value === country ? 'dtable-font dtable-icon-check-mark' : ''}`
|
|
161
170
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
162
171
|
className: "country-name",
|
|
163
172
|
children: country
|
|
@@ -213,8 +222,10 @@ class CountryEditor extends _react.Component {
|
|
|
213
222
|
}
|
|
214
223
|
};
|
|
215
224
|
this.countryReg = null;
|
|
216
|
-
const
|
|
217
|
-
|
|
225
|
+
const {
|
|
226
|
+
column,
|
|
227
|
+
value: _value
|
|
228
|
+
} = props;
|
|
218
229
|
const columnData = column.data || {};
|
|
219
230
|
this.lang = columnData.lang === 'cn' ? 'cn' : 'en';
|
|
220
231
|
this.state = {
|
|
@@ -246,7 +257,9 @@ class CountryEditor extends _react.Component {
|
|
|
246
257
|
}
|
|
247
258
|
}
|
|
248
259
|
render() {
|
|
249
|
-
const
|
|
260
|
+
const {
|
|
261
|
+
isLoadingData
|
|
262
|
+
} = this.state;
|
|
250
263
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
251
264
|
className: "dtable-ui-geolocation-country-editor",
|
|
252
265
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
9
|
var _dtableUtils = require("dtable-utils");
|
|
11
10
|
var _constants = require("../../constants");
|
|
@@ -48,7 +47,9 @@ class PCGeolocationEditor extends _react.default.Component {
|
|
|
48
47
|
this.props.onToggle && this.props.onToggle();
|
|
49
48
|
};
|
|
50
49
|
this.setEditorPosition = () => {
|
|
51
|
-
const
|
|
50
|
+
const {
|
|
51
|
+
isInModal
|
|
52
|
+
} = this.props;
|
|
52
53
|
const editorFormat = this.getGeoFormat();
|
|
53
54
|
if (this.ref && (editorFormat === _dtableUtils.GEOLOCATION_FORMAT.COUNTRY_REGION || editorFormat === _dtableUtils.GEOLOCATION_FORMAT.PROVINCE)) {
|
|
54
55
|
let height = 240;
|
|
@@ -114,9 +115,10 @@ class PCGeolocationEditor extends _react.default.Component {
|
|
|
114
115
|
geoEditorTop = height + geoEditorTop > innerHeight ? innerHeight - height - 30 : geoEditorTop;
|
|
115
116
|
geoEditorLeft = -30;
|
|
116
117
|
} else {
|
|
117
|
-
let
|
|
118
|
-
offsetLeft
|
|
119
|
-
offsetTop
|
|
118
|
+
let {
|
|
119
|
+
offsetLeft,
|
|
120
|
+
offsetTop
|
|
121
|
+
} = this.ref.parentNode;
|
|
120
122
|
geoEditorLeft = offsetLeft - width;
|
|
121
123
|
geoEditorTop = offsetTop;
|
|
122
124
|
if (offsetLeft < width) {
|
|
@@ -140,7 +142,9 @@ class PCGeolocationEditor extends _react.default.Component {
|
|
|
140
142
|
}
|
|
141
143
|
};
|
|
142
144
|
this.getGeoFormat = () => {
|
|
143
|
-
const
|
|
145
|
+
const {
|
|
146
|
+
column
|
|
147
|
+
} = this.props;
|
|
144
148
|
let data = column.data || {};
|
|
145
149
|
return data.geo_format ? data.geo_format : _dtableUtils.DEFAULT_GEOLOCATION_FORMAT;
|
|
146
150
|
};
|
|
@@ -150,12 +154,13 @@ class PCGeolocationEditor extends _react.default.Component {
|
|
|
150
154
|
};
|
|
151
155
|
this.createEditor = () => {
|
|
152
156
|
const geoFormat = this.getGeoFormat();
|
|
153
|
-
const
|
|
154
|
-
config
|
|
155
|
-
column
|
|
156
|
-
getCountryData
|
|
157
|
-
getLocationData
|
|
158
|
-
toggleLargeMap
|
|
157
|
+
const {
|
|
158
|
+
config,
|
|
159
|
+
column,
|
|
160
|
+
getCountryData,
|
|
161
|
+
getLocationData,
|
|
162
|
+
toggleLargeMap
|
|
163
|
+
} = this.props;
|
|
159
164
|
const props = {
|
|
160
165
|
column,
|
|
161
166
|
config,
|
|
@@ -167,54 +172,61 @@ class PCGeolocationEditor extends _react.default.Component {
|
|
|
167
172
|
switch (geoFormat) {
|
|
168
173
|
case _dtableUtils.GEOLOCATION_FORMAT.LNG_LAT:
|
|
169
174
|
{
|
|
170
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mapEditor.default,
|
|
175
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mapEditor.default, {
|
|
176
|
+
...props,
|
|
171
177
|
toggleLargeMap: toggleLargeMap,
|
|
172
178
|
ref: ref => this.editor = ref
|
|
173
|
-
})
|
|
179
|
+
});
|
|
174
180
|
}
|
|
175
181
|
case _dtableUtils.GEOLOCATION_FORMAT.MAP_SELECTION:
|
|
176
182
|
{
|
|
177
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mapSelectionEditor.default,
|
|
183
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mapSelectionEditor.default, {
|
|
184
|
+
...props,
|
|
178
185
|
toggleLargeMap: toggleLargeMap,
|
|
179
186
|
ref: ref => this.editor = ref
|
|
180
|
-
})
|
|
187
|
+
});
|
|
181
188
|
}
|
|
182
189
|
case _dtableUtils.GEOLOCATION_FORMAT.COUNTRY_REGION:
|
|
183
190
|
{
|
|
184
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_countryEditor.default,
|
|
191
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_countryEditor.default, {
|
|
192
|
+
...props,
|
|
185
193
|
getData: getCountryData,
|
|
186
194
|
ref: ref => this.editor = ref
|
|
187
|
-
})
|
|
195
|
+
});
|
|
188
196
|
}
|
|
189
197
|
case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE:
|
|
190
198
|
{
|
|
191
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_provinceEditor.default,
|
|
199
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_provinceEditor.default, {
|
|
200
|
+
...props,
|
|
192
201
|
onPressTab: this.props.onPressTab,
|
|
193
202
|
getData: getLocationData,
|
|
194
203
|
ref: ref => this.editor = ref
|
|
195
|
-
})
|
|
204
|
+
});
|
|
196
205
|
}
|
|
197
206
|
case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE_CITY:
|
|
198
207
|
{
|
|
199
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_provinceCityEditor.default,
|
|
208
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_provinceCityEditor.default, {
|
|
209
|
+
...props,
|
|
200
210
|
getData: getLocationData,
|
|
201
211
|
ref: ref => this.editor = ref
|
|
202
|
-
})
|
|
212
|
+
});
|
|
203
213
|
}
|
|
204
214
|
case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE_CITY_DISTRICT:
|
|
205
215
|
{
|
|
206
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_locationEditor.default,
|
|
216
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_locationEditor.default, {
|
|
217
|
+
...props,
|
|
207
218
|
getData: getLocationData,
|
|
208
219
|
ref: ref => this.editor = ref
|
|
209
|
-
})
|
|
220
|
+
});
|
|
210
221
|
}
|
|
211
222
|
default:
|
|
212
223
|
{
|
|
213
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_locationEditor.default,
|
|
224
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_locationEditor.default, {
|
|
225
|
+
...props,
|
|
214
226
|
isShowDetails: true,
|
|
215
227
|
getData: getLocationData,
|
|
216
228
|
ref: ref => this.editor = ref
|
|
217
|
-
})
|
|
229
|
+
});
|
|
218
230
|
}
|
|
219
231
|
}
|
|
220
232
|
};
|
|
@@ -233,7 +245,9 @@ class PCGeolocationEditor extends _react.default.Component {
|
|
|
233
245
|
document.removeEventListener('keydown', this.onHotKey, true);
|
|
234
246
|
}
|
|
235
247
|
render() {
|
|
236
|
-
const
|
|
248
|
+
const {
|
|
249
|
+
editorPosition
|
|
250
|
+
} = this.state;
|
|
237
251
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
238
252
|
ref: ref => this.ref = ref,
|
|
239
253
|
style: editorPosition,
|