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.
Files changed (282) hide show
  1. package/lib/ActionSheet/index.js +16 -14
  2. package/lib/ActivityIndicator/index.js +8 -7
  3. package/lib/AsyncUserSelect/index.js +19 -40
  4. package/lib/AsyncUserSelect/user-item.js +6 -5
  5. package/lib/AutoNumberFormatter/index.js +4 -3
  6. package/lib/Badge/index.js +11 -9
  7. package/lib/ButtonFormatter/index.js +8 -6
  8. package/lib/CTimeFormatter/index.js +4 -3
  9. package/lib/CheckboxEditor/index.js +3 -1
  10. package/lib/CheckboxEditor/mb-editor.js +20 -9
  11. package/lib/CheckboxEditor/pc-editor.js +24 -12
  12. package/lib/CheckboxFormatter/index.js +5 -4
  13. package/lib/CollaboratorEditor/index.js +4 -2
  14. package/lib/CollaboratorEditor/mb-editor/index.js +19 -11
  15. package/lib/CollaboratorEditor/pc-editor/index.js +34 -25
  16. package/lib/CollaboratorFormatter/index.js +10 -8
  17. package/lib/CollaboratorItem/index.js +5 -4
  18. package/lib/CollapsibleSettingLayout/index.js +7 -9
  19. package/lib/Comment/body/comment.js +18 -10
  20. package/lib/Comment/body/index.js +4 -2
  21. package/lib/Comment/footer/btns/index.js +7 -4
  22. package/lib/Comment/footer/index.js +20 -9
  23. package/lib/Comment/footer/input/index.js +50 -29
  24. package/lib/Comment/footer/input/participant/index.js +5 -4
  25. package/lib/Comment/footer/participants/index.js +5 -4
  26. package/lib/Comment/footer/participants/participant/index.js +3 -1
  27. package/lib/Comment/footer/participants/participant-select/index.js +24 -8
  28. package/lib/Comment/index.js +57 -39
  29. package/lib/Comment/utils/utilities.js +21 -15
  30. package/lib/CreatorFormatter/index.js +8 -6
  31. package/lib/DTableColorPicker/ColorPickerPortal/index.js +18 -22
  32. package/lib/DTableColorPicker/index.js +40 -55
  33. package/lib/DTableColorPicker/utils.js +6 -4
  34. package/lib/DTableColumnIcon/index.js +7 -6
  35. package/lib/DTableCommonAddTool/index.js +8 -6
  36. package/lib/DTableCustomFooter/index.js +3 -1
  37. package/lib/DTableCustomizeCollaboratorSelect/index.js +20 -17
  38. package/lib/DTableCustomizeSelect/index.js +24 -19
  39. package/lib/DTableDropdownItem/index.js +18 -16
  40. package/lib/DTableDropdownMenu/index.js +10 -8
  41. package/lib/DTableEmptyTip/index.js +5 -4
  42. package/lib/DTableFiltersPopover/index.js +50 -34
  43. package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -1
  44. package/lib/DTableFiltersPopover/utils/index.js +113 -63
  45. package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +9 -8
  46. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +13 -16
  47. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +15 -18
  48. package/lib/DTableFiltersPopover/widgets/filter-calendar.js +14 -8
  49. package/lib/DTableFiltersPopover/widgets/filter-group.js +56 -35
  50. package/lib/DTableFiltersPopover/widgets/filter-item.js +171 -108
  51. package/lib/DTableFiltersPopover/widgets/filter-list/index.css +5 -5
  52. package/lib/DTableFiltersPopover/widgets/filter-list/index.js +161 -136
  53. package/lib/DTableFiltersPopover/widgets/rate-item.js +20 -15
  54. package/lib/DTableGroupSelect/index.js +15 -11
  55. package/lib/DTableGroupSelect/select-option-group.js +32 -23
  56. package/lib/DTableIcon/index.js +7 -6
  57. package/lib/DTableIcon/svg-icon.js +7 -5
  58. package/lib/DTableModalHeader/index.css +3 -20
  59. package/lib/DTableModalHeader/index.js +3 -1
  60. package/lib/DTablePopover/index.js +15 -11
  61. package/lib/DTableRadio/index.js +9 -10
  62. package/lib/DTableRadioGroup/index.js +17 -8
  63. package/lib/DTableSearchInput/index.js +29 -19
  64. package/lib/DTableSelect/dtable-select-label.js +5 -6
  65. package/lib/DTableSelect/index.js +22 -21
  66. package/lib/DTableSelect/utils.js +15 -7
  67. package/lib/DTableSubDropdownMenu/index.js +10 -8
  68. package/lib/DTableSubDropdownToggle/index.js +12 -12
  69. package/lib/DTableSwitch/index.js +11 -12
  70. package/lib/DTableToolTip/index.js +8 -7
  71. package/lib/DateEditor/index.js +15 -20
  72. package/lib/DateEditor/mb-editor/index.js +31 -18
  73. package/lib/DateEditor/pc-editor.js +45 -26
  74. package/lib/DateFormatter/index.js +5 -4
  75. package/lib/DatePicker/index.js +15 -9
  76. package/lib/DatePicker/utils.js +3 -1
  77. package/lib/DeleteTip/index.js +6 -5
  78. package/lib/DepartmentMultipleSelectEditor/index.js +23 -25
  79. package/lib/DepartmentSelectFilter/index.js +8 -6
  80. package/lib/DepartmentSingleSelectEditor/index.js +3 -1
  81. package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +47 -48
  82. package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +58 -36
  83. package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +19 -13
  84. package/lib/DepartmentSingleSelectFormatter/index.js +6 -4
  85. package/lib/DigitalSignEditor/index.js +3 -1
  86. package/lib/DigitalSignEditor/mb-editor/index.js +20 -12
  87. package/lib/DigitalSignEditor/pc-editor/index.js +24 -17
  88. package/lib/DigitalSignEditor/service.js +4 -2
  89. package/lib/DigitalSignEditor/signature-board/index.js +8 -5
  90. package/lib/DigitalSignEditor/utils.js +4 -2
  91. package/lib/DigitalSignFormatter/index.js +15 -12
  92. package/lib/DigitalSignFormatter/utils.js +5 -4
  93. package/lib/DurationEditor/index.js +31 -21
  94. package/lib/DurationFormatter/index.js +5 -4
  95. package/lib/EditEditorButton/index.js +3 -1
  96. package/lib/EmailFormatter/index.js +4 -3
  97. package/lib/FieldDisplaySetting/field-item.js +12 -12
  98. package/lib/FieldDisplaySetting/index.js +10 -12
  99. package/lib/FileEditor/files-previewer/index.js +3 -1
  100. package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +18 -10
  101. package/lib/FileEditor/files-previewer/mb-previewer/index.js +8 -7
  102. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +4 -3
  103. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +6 -5
  104. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +21 -14
  105. package/lib/FileEditor/files-previewer/pc-previewer/index.js +57 -29
  106. package/lib/FileEditor/index.js +3 -1
  107. package/lib/FileEditor/mb-editor/index.js +20 -28
  108. package/lib/FileEditor/pc-editor/addition-previewer/index.js +3 -1
  109. package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +25 -11
  110. package/lib/FileEditor/pc-editor/index.js +27 -19
  111. package/lib/FileFormatter/index.js +19 -26
  112. package/lib/FileItemFormatter/index.js +9 -6
  113. package/lib/FileUploader/index.js +45 -28
  114. package/lib/FormulaFormatter/index.js +29 -15
  115. package/lib/GeolocationEditor/index.js +12 -11
  116. package/lib/GeolocationEditor/map-editor-utils.js +15 -17
  117. package/lib/GeolocationEditor/mb-editor/country-editor.js +14 -17
  118. package/lib/GeolocationEditor/mb-editor/index.js +6 -4
  119. package/lib/GeolocationEditor/mb-editor/location-editor.js +15 -18
  120. package/lib/GeolocationEditor/mb-editor/map-editor/index.js +68 -41
  121. package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +89 -50
  122. package/lib/GeolocationEditor/mb-editor/province-city-editor.js +14 -17
  123. package/lib/GeolocationEditor/mb-editor/province-editor.js +14 -17
  124. package/lib/GeolocationEditor/pc-editor/country-editor.js +23 -10
  125. package/lib/GeolocationEditor/pc-editor/index.js +20 -12
  126. package/lib/GeolocationEditor/pc-editor/location-editor.js +31 -26
  127. package/lib/GeolocationEditor/pc-editor/map-editor/index.js +54 -34
  128. package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +60 -36
  129. package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +62 -35
  130. package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +65 -36
  131. package/lib/GeolocationEditor/pc-editor/province-city-editor.js +25 -19
  132. package/lib/GeolocationEditor/pc-editor/province-editor.js +13 -6
  133. package/lib/GeolocationEditor/pc-editor/selector-header-item.js +6 -5
  134. package/lib/GeolocationEditor/pc-editor/selector-list.js +7 -6
  135. package/lib/GeolocationFormatter/index.js +5 -4
  136. package/lib/HtmlLongTextFormatter/index.js +12 -4
  137. package/lib/Icon/index.js +5 -3
  138. package/lib/IconButton/index.js +6 -4
  139. package/lib/ImageEditor/images-previewer/image-preview/index.js +21 -12
  140. package/lib/ImageEditor/images-previewer/index.js +9 -3
  141. package/lib/ImageEditor/index.js +3 -1
  142. package/lib/ImageEditor/mb-editor/index.js +20 -28
  143. package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +6 -2
  144. package/lib/ImageEditor/pc-editor/addition-previewer/index.js +3 -1
  145. package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +21 -7
  146. package/lib/ImageEditor/pc-editor/images-previewer/index.js +9 -3
  147. package/lib/ImageEditor/pc-editor/index.js +16 -11
  148. package/lib/ImageFormatter/images-lazy-load.js +11 -19
  149. package/lib/ImageFormatter/index.js +13 -11
  150. package/lib/ImagePreviewerLightbox/index.js +13 -15
  151. package/lib/ImageThumbnail/index.js +13 -10
  152. package/lib/InputItem/custom-input.js +46 -26
  153. package/lib/InputItem/custom-keyboard.js +18 -15
  154. package/lib/InputItem/index.js +50 -34
  155. package/lib/InputItem/input.js +4 -2
  156. package/lib/LastModifierFormatter/index.js +8 -6
  157. package/lib/LinkEditor/index.js +53 -33
  158. package/lib/LinkEditor/link-editor-option.js +4 -3
  159. package/lib/LinkEditor/mb-popover/index.js +22 -9
  160. package/lib/LinkEditor/pc-popover/index.js +10 -5
  161. package/lib/LinkFormatter/index.js +37 -21
  162. package/lib/List/index.js +8 -6
  163. package/lib/List/list-item.js +28 -22
  164. package/lib/LongTextFormatter/index.js +5 -4
  165. package/lib/MBEditorHeader/index.js +8 -7
  166. package/lib/MTimeFormatter/index.js +4 -3
  167. package/lib/MobileFullScreenPage/body/index.js +5 -3
  168. package/lib/MobileFullScreenPage/header/index.js +6 -4
  169. package/lib/MobileFullScreenPage/index.js +11 -13
  170. package/lib/MobileModal/index.js +3 -1
  171. package/lib/MobileOperationSheet/index.js +8 -7
  172. package/lib/MobileSelector/empty/index.js +3 -1
  173. package/lib/MobileSelector/index.js +7 -5
  174. package/lib/MobileSelector/option/index.js +5 -3
  175. package/lib/MobileSelector/options/index.js +3 -1
  176. package/lib/MobileSelector/search/index.js +5 -3
  177. package/lib/MobileUpload/index.js +5 -4
  178. package/lib/Modal/modal.js +15 -14
  179. package/lib/Modal/prompt.js +4 -4
  180. package/lib/MultipleSelectEditor/index.js +3 -1
  181. package/lib/MultipleSelectFormatter/index.js +8 -6
  182. package/lib/NotificationPopover/index.js +5 -4
  183. package/lib/NumberEditor/index.js +21 -12
  184. package/lib/NumberFormatter/index.js +5 -4
  185. package/lib/PhoneNumberLink/index.js +4 -2
  186. package/lib/Picker/AbstractPicker.js +27 -23
  187. package/lib/Popover/index.js +4 -3
  188. package/lib/Popover/item.js +9 -7
  189. package/lib/Progress/index.js +8 -9
  190. package/lib/Radio/Radio.js +8 -4
  191. package/lib/Radio/RadioItem.js +12 -8
  192. package/lib/RateFormatter/index.js +13 -13
  193. package/lib/RoleStatusEditor/index.js +17 -18
  194. package/lib/RowExpandDialog/body/index.js +49 -32
  195. package/lib/RowExpandDialog/column-content/index.js +9 -5
  196. package/lib/RowExpandDialog/header/index.js +8 -6
  197. package/lib/RowExpandDialog/index.js +34 -49
  198. package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +5 -4
  199. package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +10 -8
  200. package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +33 -22
  201. package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +40 -26
  202. package/lib/RowExpandEditor/date-editor/mb-editor.js +18 -12
  203. package/lib/RowExpandEditor/date-editor/pc-editor.js +20 -15
  204. package/lib/RowExpandEditor/department-editor/mb-editor.js +11 -16
  205. package/lib/RowExpandEditor/department-editor/pc-editor.js +14 -19
  206. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +34 -20
  207. package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +35 -21
  208. package/lib/RowExpandEditor/duration-editor/mb-editor.js +17 -10
  209. package/lib/RowExpandEditor/duration-editor/pc-editor.js +19 -13
  210. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +19 -9
  211. package/lib/RowExpandEditor/email-editor/pc-editor/index.js +24 -13
  212. package/lib/RowExpandEditor/file-editor/mb-editor/index.js +31 -18
  213. package/lib/RowExpandEditor/file-editor/pc-editor/index.js +23 -16
  214. package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +29 -17
  215. package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +26 -13
  216. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +25 -15
  217. package/lib/RowExpandEditor/image-editor/pc-editor/index.js +23 -13
  218. package/lib/RowExpandEditor/index.js +8 -4
  219. package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +18 -17
  220. package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +16 -10
  221. package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +23 -16
  222. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +19 -11
  223. package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +33 -22
  224. package/lib/RowExpandEditor/number-editor/mb-editor/index.js +14 -8
  225. package/lib/RowExpandEditor/number-editor/pc-editor.js +20 -13
  226. package/lib/RowExpandEditor/rate-editor/mb-editor.js +25 -12
  227. package/lib/RowExpandEditor/rate-editor/pc-editor.js +36 -20
  228. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +28 -17
  229. package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +34 -22
  230. package/lib/RowExpandEditor/text-editor/mb-editor/index.js +5 -4
  231. package/lib/RowExpandEditor/text-editor/pc-editor/index.js +26 -15
  232. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +13 -5
  233. package/lib/RowExpandEditor/url-editor/pc-editor/index.js +18 -9
  234. package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +4 -2
  235. package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +4 -2
  236. package/lib/RowExpandFormatter/email-formatter/index.js +7 -4
  237. package/lib/RowExpandFormatter/file-formatter/index.js +9 -8
  238. package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +12 -10
  239. package/lib/RowExpandFormatter/formula-formatter/index.js +34 -19
  240. package/lib/RowExpandFormatter/image-formatter/index.js +11 -9
  241. package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +8 -7
  242. package/lib/RowExpandFormatter/index.js +41 -27
  243. package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +14 -8
  244. package/lib/RowExpandFormatter/link-formatter/index.js +19 -11
  245. package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +5 -3
  246. package/lib/RowExpandFormatter/rate-formatter/index.js +12 -11
  247. package/lib/RowExpandFormatter/text/index.js +5 -4
  248. package/lib/RowExpandFormatter/url-formatter/index.js +7 -4
  249. package/lib/RowExpandView/body/index.js +35 -22
  250. package/lib/RowExpandView/column-content/index.js +7 -3
  251. package/lib/RowExpandView/index.js +30 -42
  252. package/lib/SelectItem/index.js +8 -6
  253. package/lib/SelectOptionGroup/index.js +40 -30
  254. package/lib/SelectedDepartments/index.js +9 -7
  255. package/lib/SimpleLongTextFormatter/index.js +16 -10
  256. package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +4 -3
  257. package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +21 -12
  258. package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +4 -3
  259. package/lib/SingleSelectEditor/index.js +3 -1
  260. package/lib/SingleSelectFormatter/index.js +9 -8
  261. package/lib/TabBar/Tab.js +16 -14
  262. package/lib/TabBar/index.js +21 -18
  263. package/lib/Tabs/index.js +3 -1
  264. package/lib/TextEditor/index.js +23 -14
  265. package/lib/TextFormatter/index.js +4 -3
  266. package/lib/TextareaItem/index.js +26 -19
  267. package/lib/Toast/index.js +4 -3
  268. package/lib/UrlFormatter/index.js +4 -3
  269. package/lib/common/editor-base.js +12 -7
  270. package/lib/hooks/common-hooks.js +4 -2
  271. package/lib/select-editor/index.js +3 -1
  272. package/lib/select-editor/mb-editor/index.js +28 -17
  273. package/lib/select-editor/pc-editor/index.js +42 -27
  274. package/lib/toaster/alert.js +7 -6
  275. package/lib/toaster/toast.js +3 -2
  276. package/lib/toaster/toastManager.js +4 -2
  277. package/lib/utils/cell.js +11 -8
  278. package/lib/utils/column-utils.js +14 -8
  279. package/lib/utils/departments.js +3 -1
  280. package/lib/utils/url.js +31 -24
  281. package/lib/utils/utils.js +6 -2
  282. package/package.json +1 -1
@@ -50,12 +50,13 @@ class MapEditor extends _react.Component {
50
50
  this.loadMineMapCallBack = () => {
51
51
  if (!this.timer) {
52
52
  this.timer = setTimeout(() => {
53
- const _getMineMapUrl = (0, _mapEditorUtils.getMineMapUrl)(),
54
- domainUrl = _getMineMapUrl.domainUrl,
55
- dataDomainUrl = _getMineMapUrl.dataDomainUrl,
56
- serverDomainUrl = _getMineMapUrl.serverDomainUrl,
57
- spriteUrl = _getMineMapUrl.spriteUrl,
58
- serviceUrl = _getMineMapUrl.serviceUrl;
53
+ const {
54
+ domainUrl,
55
+ dataDomainUrl,
56
+ serverDomainUrl,
57
+ spriteUrl,
58
+ serviceUrl
59
+ } = (0, _mapEditorUtils.getMineMapUrl)();
59
60
  window.minemap.domainUrl = domainUrl;
60
61
  window.minemap.dataDomainUrl = dataDomainUrl;
61
62
  window.minemap.serverDomainUrl = serverDomainUrl;
@@ -82,11 +83,14 @@ class MapEditor extends _react.Component {
82
83
  minZoom: 3,
83
84
  projection: 'MERCATOR'
84
85
  });
85
- let _getInitCenter = (0, _mapEditorUtils.getInitCenter)(),
86
- lng = _getInitCenter.lng,
87
- lat = _getInitCenter.lat,
88
- zoom = _getInitCenter.zoom;
89
- const value = this.state.value;
86
+ let {
87
+ lng,
88
+ lat,
89
+ zoom
90
+ } = (0, _mapEditorUtils.getInitCenter)();
91
+ const {
92
+ value
93
+ } = this.state;
90
94
  if ((0, _cell.isValidPosition)(value.lng, value.lat)) {
91
95
  lng = value.lng;
92
96
  lat = value.lat;
@@ -110,11 +114,14 @@ class MapEditor extends _react.Component {
110
114
  this.map = new window.BMap.Map('geolocation-map-container', {
111
115
  enableMapClick: false
112
116
  });
113
- let _getInitCenter2 = (0, _mapEditorUtils.getInitCenter)(),
114
- lng = _getInitCenter2.lng,
115
- lat = _getInitCenter2.lat,
116
- zoom = _getInitCenter2.zoom;
117
- const value = this.state.value;
117
+ let {
118
+ lng,
119
+ lat,
120
+ zoom
121
+ } = (0, _mapEditorUtils.getInitCenter)();
122
+ const {
123
+ value
124
+ } = this.state;
118
125
  if ((0, _cell.isValidPosition)(value.lng, value.lat)) {
119
126
  lng = value.lng;
120
127
  lat = value.lat;
@@ -149,10 +156,11 @@ class MapEditor extends _react.Component {
149
156
  this.setState({
150
157
  isLoading: false
151
158
  }, () => {
152
- let _getInitCenter3 = (0, _mapEditorUtils.getInitCenter)(),
153
- lng = _getInitCenter3.lng,
154
- lat = _getInitCenter3.lat,
155
- zoom = _getInitCenter3.zoom;
159
+ let {
160
+ lng,
161
+ lat,
162
+ zoom
163
+ } = (0, _mapEditorUtils.getInitCenter)();
156
164
  this.map = new window.google.maps.Map(this.ref, {
157
165
  zoom,
158
166
  center: {
@@ -166,7 +174,9 @@ class MapEditor extends _react.Component {
166
174
  rotateControl: false,
167
175
  fullscreenControl: false
168
176
  });
169
- const value = this.state.value;
177
+ const {
178
+ value
179
+ } = this.state;
170
180
  if (value.lng && value.lat) {
171
181
  lng = value.lng;
172
182
  lat = value.lat;
@@ -201,8 +211,10 @@ class MapEditor extends _react.Component {
201
211
  });
202
212
  };
203
213
  this.setPropsValue = _ref => {
204
- let lng = _ref.lng,
205
- lat = _ref.lat;
214
+ let {
215
+ lng,
216
+ lat
217
+ } = _ref;
206
218
  if (!(0, _dtableUtils.isNumber)(lng) || !(0, _dtableUtils.isNumber)(lat)) {
207
219
  this.props.setValue(null);
208
220
  return;
@@ -266,7 +278,9 @@ class MapEditor extends _react.Component {
266
278
  event.preventDefault();
267
279
  event.stopPropagation();
268
280
  event.nativeEvent.stopImmediatePropagation();
269
- const value = this.state.value;
281
+ const {
282
+ value
283
+ } = this.state;
270
284
  const numericValue = (0, _dtableUtils.normalizeMapPoint)(value);
271
285
  this.setPropsValue(numericValue);
272
286
  this.setState({
@@ -283,8 +297,10 @@ class MapEditor extends _react.Component {
283
297
  this.props.onSubmit();
284
298
  };
285
299
  this.rerenderMapMarker = _ref2 => {
286
- let lng = _ref2.lng,
287
- lat = _ref2.lat;
300
+ let {
301
+ lng,
302
+ lat
303
+ } = _ref2;
288
304
  if (!(0, _dtableUtils.isNumber)(lng) || !(0, _dtableUtils.isNumber)(lat)) return;
289
305
  if (this.map) {
290
306
  if (this.mapType === _mapEditorUtils.MAP_TYPES.G_MAP || this.mapType === _mapEditorUtils.MAP_TYPES.M_MAP) {
@@ -299,7 +315,9 @@ class MapEditor extends _react.Component {
299
315
  this.addMarkerByPosition(lng, lat);
300
316
  };
301
317
  this.onBlur = () => {
302
- const value = this.state.value;
318
+ const {
319
+ value
320
+ } = this.state;
303
321
  const numericValue = (0, _dtableUtils.normalizeMapPoint)(value);
304
322
  this.setState({
305
323
  value: numericValue
@@ -351,9 +369,10 @@ class MapEditor extends _react.Component {
351
369
  lng: '',
352
370
  lat: ''
353
371
  };
354
- const _getMapInfo = (0, _mapEditorUtils.getMapInfo)(props.config),
355
- mapType = _getMapInfo.mapType,
356
- mapKey = _getMapInfo.mapKey;
372
+ const {
373
+ mapType,
374
+ mapKey
375
+ } = (0, _mapEditorUtils.getMapInfo)(props.config);
357
376
  this.mapType = mapType;
358
377
  this.mapKey = mapKey;
359
378
  this.readOnly = props.readOnly;
@@ -389,10 +408,11 @@ class MapEditor extends _react.Component {
389
408
  this.onSubmit();
390
409
  }
391
410
  render() {
392
- const _this$state = this.state,
393
- isLoading = _this$state.isLoading,
394
- lng_lat = _this$state.value,
395
- isShowLargeEditor = _this$state.isShowLargeEditor;
411
+ const {
412
+ isLoading,
413
+ value: lng_lat,
414
+ isShowLargeEditor
415
+ } = this.state;
396
416
  const lat = lng_lat && !(0, _dtableUtils.isEmpty)(lng_lat.lat) ? lng_lat.lat : '';
397
417
  const lng = lng_lat && !(0, _dtableUtils.isEmpty)(lng_lat.lng) ? lng_lat.lng : '';
398
418
  if (!isShowLargeEditor) {
@@ -23,12 +23,13 @@ class LargeMapEditorDialog extends _react.default.Component {
23
23
  this.loadMineMapCallBack = () => {
24
24
  if (!this.timer) {
25
25
  this.timer = setTimeout(() => {
26
- const _getMineMapUrl = (0, _mapEditorUtils.getMineMapUrl)(),
27
- domainUrl = _getMineMapUrl.domainUrl,
28
- dataDomainUrl = _getMineMapUrl.dataDomainUrl,
29
- serverDomainUrl = _getMineMapUrl.serverDomainUrl,
30
- spriteUrl = _getMineMapUrl.spriteUrl,
31
- serviceUrl = _getMineMapUrl.serviceUrl;
26
+ const {
27
+ domainUrl,
28
+ dataDomainUrl,
29
+ serverDomainUrl,
30
+ spriteUrl,
31
+ serviceUrl
32
+ } = (0, _mapEditorUtils.getMineMapUrl)();
32
33
  window.minemap.domainUrl = domainUrl;
33
34
  window.minemap.dataDomainUrl = dataDomainUrl;
34
35
  window.minemap.serverDomainUrl = serverDomainUrl;
@@ -55,11 +56,14 @@ class LargeMapEditorDialog extends _react.default.Component {
55
56
  minZoom: 3,
56
57
  projection: 'MERCATOR'
57
58
  });
58
- let _getInitCenter = (0, _mapEditorUtils.getInitCenter)(),
59
- lng = _getInitCenter.lng,
60
- lat = _getInitCenter.lat,
61
- zoom = _getInitCenter.zoom;
62
- const value = this.state.value;
59
+ let {
60
+ lng,
61
+ lat,
62
+ zoom
63
+ } = (0, _mapEditorUtils.getInitCenter)();
64
+ const {
65
+ value
66
+ } = this.state;
63
67
  if ((0, _cell.isValidPosition)(value.lng, value.lat)) {
64
68
  lng = value.lng;
65
69
  lat = value.lat;
@@ -81,11 +85,14 @@ class LargeMapEditorDialog extends _react.default.Component {
81
85
  }, () => {
82
86
  if (!window.BMap.Map) return;
83
87
  this.map = new window.BMap.Map('geolocation-map-container-large');
84
- let _getInitCenter2 = (0, _mapEditorUtils.getInitCenter)(),
85
- lng = _getInitCenter2.lng,
86
- lat = _getInitCenter2.lat,
87
- zoom = _getInitCenter2.zoom;
88
- const value = this.state.value;
88
+ let {
89
+ lng,
90
+ lat,
91
+ zoom
92
+ } = (0, _mapEditorUtils.getInitCenter)();
93
+ const {
94
+ value
95
+ } = this.state;
89
96
  if ((0, _cell.isValidPosition)(value.lng, value.lat)) {
90
97
  lng = value.lng;
91
98
  lat = value.lat;
@@ -106,10 +113,11 @@ class LargeMapEditorDialog extends _react.default.Component {
106
113
  this.setState({
107
114
  isLoading: false
108
115
  }, () => {
109
- let _getInitCenter3 = (0, _mapEditorUtils.getInitCenter)(),
110
- lng = _getInitCenter3.lng,
111
- lat = _getInitCenter3.lat,
112
- zoom = _getInitCenter3.zoom;
116
+ let {
117
+ lng,
118
+ lat,
119
+ zoom
120
+ } = (0, _mapEditorUtils.getInitCenter)();
113
121
  this.map = new window.google.maps.Map(this.ref, {
114
122
  zoom,
115
123
  center: {
@@ -123,7 +131,9 @@ class LargeMapEditorDialog extends _react.default.Component {
123
131
  rotateControl: false,
124
132
  fullscreenControl: false
125
133
  });
126
- const value = this.state.value;
134
+ const {
135
+ value
136
+ } = this.state;
127
137
  if (value.lng && value.lat) {
128
138
  lng = value.lng;
129
139
  lat = value.lat;
@@ -160,8 +170,10 @@ class LargeMapEditorDialog extends _react.default.Component {
160
170
  }
161
171
  };
162
172
  this.setPropsValue = _ref => {
163
- let lng = _ref.lng,
164
- lat = _ref.lat;
173
+ let {
174
+ lng,
175
+ lat
176
+ } = _ref;
165
177
  if (!(0, _dtableUtils.isNumber)(lng) || !(0, _dtableUtils.isNumber)(lat)) {
166
178
  this.props.setValue(null);
167
179
  return;
@@ -229,8 +241,10 @@ class LargeMapEditorDialog extends _react.default.Component {
229
241
  }
230
242
  };
231
243
  this.rerenderMapMarker = _ref2 => {
232
- let lng = _ref2.lng,
233
- lat = _ref2.lat;
244
+ let {
245
+ lng,
246
+ lat
247
+ } = _ref2;
234
248
  if (!(0, _dtableUtils.isNumber)(lng) || !(0, _dtableUtils.isNumber)(lat)) return;
235
249
  if (this.map) {
236
250
  if (this.mapType === _mapEditorUtils.MAP_TYPES.G_MAP || this.mapType === _mapEditorUtils.MAP_TYPES.M_MAP) {
@@ -245,7 +259,9 @@ class LargeMapEditorDialog extends _react.default.Component {
245
259
  this.addMarkerByPosition(lng, lat);
246
260
  };
247
261
  this.onBlur = () => {
248
- const value = this.state.value;
262
+ const {
263
+ value
264
+ } = this.state;
249
265
  const numericValue = (0, _dtableUtils.normalizeMapPoint)(value);
250
266
  this.setState({
251
267
  value: numericValue
@@ -283,7 +299,9 @@ class LargeMapEditorDialog extends _react.default.Component {
283
299
  }
284
300
  };
285
301
  this.onSubmit = () => {
286
- const value = this.state.value;
302
+ const {
303
+ value
304
+ } = this.state;
287
305
  this.props.setValue(value);
288
306
  this.props.onSubmit();
289
307
  };
@@ -304,7 +322,9 @@ class LargeMapEditorDialog extends _react.default.Component {
304
322
  event.preventDefault();
305
323
  event.stopPropagation();
306
324
  event.nativeEvent.stopImmediatePropagation();
307
- const value = this.state.value;
325
+ const {
326
+ value
327
+ } = this.state;
308
328
  this.props.setValue(value);
309
329
  this.props.toggleFullScreen(event);
310
330
  };
@@ -313,16 +333,19 @@ class LargeMapEditorDialog extends _react.default.Component {
313
333
  e.nativeEvent.stopImmediatePropagation();
314
334
  e.stopPropagation();
315
335
  };
316
- const readOnly = props.readOnly,
317
- config = props.config;
336
+ const {
337
+ readOnly,
338
+ config
339
+ } = props;
318
340
  const _value = props.value || {
319
341
  lng: '',
320
342
  lat: ''
321
343
  };
322
344
  this.readOnly = readOnly;
323
- const _getMapInfo = (0, _mapEditorUtils.getMapInfo)(config),
324
- mapType = _getMapInfo.mapType,
325
- mapKey = _getMapInfo.mapKey;
345
+ const {
346
+ mapType,
347
+ mapKey
348
+ } = (0, _mapEditorUtils.getMapInfo)(config);
326
349
  this.mapType = mapType;
327
350
  this.mapKey = mapKey;
328
351
  this.map = null;
@@ -377,9 +400,10 @@ class LargeMapEditorDialog extends _react.default.Component {
377
400
  this.map = null;
378
401
  }
379
402
  render() {
380
- const _this$state = this.state,
381
- isLoading = _this$state.isLoading,
382
- lng_lat = _this$state.value;
403
+ const {
404
+ isLoading,
405
+ value: lng_lat
406
+ } = this.state;
383
407
  const lat = lng_lat && !(0, _dtableUtils.isEmpty)(lng_lat.lat) ? lng_lat.lat : '';
384
408
  const lng = lng_lat && !(0, _dtableUtils.isEmpty)(lng_lat.lng) ? lng_lat.lng : '';
385
409
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.Modal, {
@@ -40,12 +40,17 @@ class MapSelectionEditor extends _react.Component {
40
40
  this.map = new window.BMap.Map('geolocation-map-selection-container', {
41
41
  enableMapClick: false
42
42
  });
43
- let _getInitCenter = (0, _mapEditorUtils.getInitCenter)(true),
44
- lng = _getInitCenter.lng,
45
- lat = _getInitCenter.lat,
46
- zoom = _getInitCenter.zoom;
47
- const value = this.state.value;
48
- const lngLat = value.lngLat;
43
+ let {
44
+ lng,
45
+ lat,
46
+ zoom
47
+ } = (0, _mapEditorUtils.getInitCenter)(true);
48
+ const {
49
+ value
50
+ } = this.state;
51
+ const {
52
+ lngLat
53
+ } = value;
49
54
  if ((0, _cell.isValidPosition)(lngLat.lng, lngLat.lat)) {
50
55
  lng = lngLat.lng;
51
56
  lat = lngLat.lat;
@@ -66,9 +71,11 @@ class MapSelectionEditor extends _react.Component {
66
71
  const point = event.point;
67
72
  const geoCoder = new window.BMap.Geocoder();
68
73
  geoCoder.getLocation(point, result => {
69
- const surroundingPois = result.surroundingPois,
70
- address = result.address,
71
- point = result.point;
74
+ const {
75
+ surroundingPois,
76
+ address,
77
+ point
78
+ } = result;
72
79
  if (surroundingPois.length === 0) {
73
80
  value.address = address;
74
81
  value.lngLat = {
@@ -79,10 +86,12 @@ class MapSelectionEditor extends _react.Component {
79
86
  value.title = '';
80
87
  } else {
81
88
  const position = surroundingPois[0];
82
- const address = position.address,
83
- title = position.title,
84
- tags = position.tags,
85
- point = position.point;
89
+ const {
90
+ address,
91
+ title,
92
+ tags,
93
+ point
94
+ } = position;
86
95
  value.address = address || '';
87
96
  value.title = title || '';
88
97
  value.tag = tags || [];
@@ -97,7 +106,9 @@ class MapSelectionEditor extends _react.Component {
97
106
  });
98
107
  };
99
108
  this.addMarkerByPosition = value => {
100
- const lngLat = value.lngLat;
109
+ const {
110
+ lngLat
111
+ } = value;
101
112
  let point = new window.BMap.Point(lngLat.lng, lngLat.lat);
102
113
  const marker = new window.BMap.Marker(point, {
103
114
  offset: new window.BMap.Size(-2, -5)
@@ -150,9 +161,11 @@ class MapSelectionEditor extends _react.Component {
150
161
  }
151
162
  };
152
163
  this.getLabelContent = value => {
153
- const address = value.address,
154
- title = value.title,
155
- tag = value.tag;
164
+ const {
165
+ address,
166
+ title,
167
+ tag
168
+ } = value;
156
169
  const tagContent = Array.isArray(tag) && tag.length > 0 ? tag[0] : '';
157
170
  if (title) {
158
171
  return "\n <div class='dtable-ui-selection-label-content' id='dtable-ui-selection-label-content'>\n <i class='dtable-font dtable-icon-down3'></i>\n <span class='label-title text-truncate' title=".concat(title, ">").concat(title, "</span>\n ").concat(tagContent && "<span class='label-tag'>".concat(tagContent, "</span>"), "\n <span class='dtable-font dtable-icon-x' id='selection-label-close'></span>\n <span class='label-address-tip'>").concat((0, _lang.getLocale)('Address'), "</span>\n <span class='label-address text-truncate' title=").concat(address, ">").concat(address, "</span>\n <div class='label-submit btn btn-primary' id='selection-label-submit'>").concat((0, _lang.getLocale)('Fill_in'), "</div>\n </div>\n ");
@@ -160,7 +173,9 @@ class MapSelectionEditor extends _react.Component {
160
173
  return "\n <div class='dtable-ui-selection-label-content simple' id='dtable-ui-selection-label-content'>\n <i class='dtable-font dtable-icon-down3'></i>\n <span class='dtable-font dtable-icon-x' id='selection-label-close'></span>\n <span class='label-address text-truncate simple' title=".concat(address, ">").concat(address, "</span>\n <div class='label-submit btn btn-primary' id='selection-label-submit'>").concat((0, _lang.getLocale)('Fill_in'), "</div>\n </div>\n ");
161
174
  };
162
175
  this.getInitValue = () => {
163
- const value = this.props.value;
176
+ const {
177
+ value
178
+ } = this.props;
164
179
  if (!value || (0, _dtableUtils.isEmptyObject)(value)) {
165
180
  return {
166
181
  address: '',
@@ -172,7 +187,9 @@ class MapSelectionEditor extends _react.Component {
172
187
  return value;
173
188
  };
174
189
  this.onSearch = () => {
175
- const inputValue = this.state.inputValue;
190
+ const {
191
+ inputValue
192
+ } = this.state;
176
193
  let options = {
177
194
  onSearchComplete: results => {
178
195
  const status = local.getStatus();
@@ -229,7 +246,9 @@ class MapSelectionEditor extends _react.Component {
229
246
  event.preventDefault();
230
247
  event.stopPropagation();
231
248
  event.nativeEvent.stopImmediatePropagation();
232
- const value = this.state.value;
249
+ const {
250
+ value
251
+ } = this.state;
233
252
  this.props.setValue(value);
234
253
  this.setState({
235
254
  isShowLargeEditor: !this.state.isShowLargeEditor
@@ -252,9 +271,11 @@ class MapSelectionEditor extends _react.Component {
252
271
  const geoCoder = new window.BMap.Geocoder();
253
272
  geoCoder.getLocation(point, result => {
254
273
  let value = {};
255
- const surroundingPois = result.surroundingPois,
256
- address = result.address,
257
- point = result.point;
274
+ const {
275
+ surroundingPois,
276
+ address,
277
+ point
278
+ } = result;
258
279
  if (surroundingPois.length === 0) {
259
280
  value.address = address;
260
281
  value.lngLat = {
@@ -265,10 +286,12 @@ class MapSelectionEditor extends _react.Component {
265
286
  value.title = '';
266
287
  } else {
267
288
  const position = surroundingPois[0];
268
- const address = position.address,
269
- title = position.title,
270
- tags = position.tags,
271
- point = position.point;
289
+ const {
290
+ address,
291
+ title,
292
+ tags,
293
+ point
294
+ } = position;
272
295
  value.address = address || '';
273
296
  value.title = title || '';
274
297
  value.tag = tags || [];
@@ -297,7 +320,9 @@ class MapSelectionEditor extends _react.Component {
297
320
  (0, _mapEditorUtils.locateCurrentPosition)(this.map, this.mapType, this.geolocationCallback);
298
321
  };
299
322
  this.renderSearchResults = () => {
300
- const searchResults = this.state.searchResults;
323
+ const {
324
+ searchResults
325
+ } = this.state;
301
326
  if (searchResults.length === 0) return null;
302
327
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
303
328
  className: "search-results-container",
@@ -319,9 +344,10 @@ class MapSelectionEditor extends _react.Component {
319
344
  const _value = this.getInitValue();
320
345
  this.readOnly = props.readOnly;
321
346
  const _inputValue = _value.title || _value.address || '';
322
- const _getMapInfo = (0, _mapEditorUtils.getMapInfo)(props.config),
323
- mapType = _getMapInfo.mapType,
324
- mapKey = _getMapInfo.mapKey;
347
+ const {
348
+ mapType,
349
+ mapKey
350
+ } = (0, _mapEditorUtils.getMapInfo)(props.config);
325
351
  this.state = {
326
352
  isLoading: true,
327
353
  value: _value,
@@ -350,10 +376,11 @@ class MapSelectionEditor extends _react.Component {
350
376
  }
351
377
  }
352
378
  render() {
353
- const _this$state = this.state,
354
- isLoading = _this$state.isLoading,
355
- inputValue = _this$state.inputValue,
356
- isShowLargeEditor = _this$state.isShowLargeEditor;
379
+ const {
380
+ isLoading,
381
+ inputValue,
382
+ isShowLargeEditor
383
+ } = this.state;
357
384
  if (isShowLargeEditor) {
358
385
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_largeEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, this.props), {}, {
359
386
  toggleFullScreen: this.toggleFullScreen