dtable-ui-component 6.0.29-beta9 → 6.0.29

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 (346) hide show
  1. package/lib/ActionSheet/index.js +196 -0
  2. package/lib/ActionSheet/style/index.css +377 -0
  3. package/lib/ActivityIndicator/index.css +110 -0
  4. package/lib/ActivityIndicator/index.js +76 -0
  5. package/lib/Badge/index.css +98 -0
  6. package/lib/Badge/index.js +65 -0
  7. package/lib/CheckboxEditor/index.js +116 -24
  8. package/lib/CollaboratorEditor/index.js +11 -23
  9. package/lib/CollaboratorEditor/mb-collaborator-editor/index.css +85 -0
  10. package/lib/CollaboratorEditor/mb-collaborator-editor/index.js +148 -0
  11. package/lib/DTableCommonAddTool/index.js +3 -1
  12. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +6 -6
  13. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +6 -6
  14. package/lib/DateEditor/index.js +95 -69
  15. package/lib/DateEditor/mb-date-editor-popover/custom-rc-calendar.css +118 -0
  16. package/lib/DateEditor/mb-date-editor-popover/index.css +45 -0
  17. package/lib/DateEditor/mb-date-editor-popover/index.js +226 -0
  18. package/lib/DateEditor/{pc-editor.js → pc-date-editor-popover.js} +9 -9
  19. package/lib/DatePicker/index.js +120 -0
  20. package/lib/DatePicker/locale/en_US.js +14 -0
  21. package/lib/DatePicker/locale/ru_RU.js +14 -0
  22. package/lib/DatePicker/locale/sv_SE.js +14 -0
  23. package/lib/DatePicker/locale/zh_CN.js +14 -0
  24. package/lib/DatePicker/style/index.css +298 -0
  25. package/lib/DatePicker/utils.js +36 -0
  26. package/lib/{DepartmentMultipleSelectEditor → Department-editor/department-multiple-select}/index.js +6 -6
  27. package/lib/{DepartmentSingleSelectEditor/pc-editor → Department-editor}/department-single-select.js +7 -7
  28. package/lib/{DepartmentSingleSelectEditor/pc-editor → Department-editor}/index.css +3 -10
  29. package/lib/{DepartmentSingleSelectEditor/pc-editor → Department-editor}/index.js +25 -8
  30. package/lib/{SelectedDepartments → Department-editor/selected-departments}/index.css +1 -0
  31. package/lib/{SelectedDepartments → Department-editor/selected-departments}/index.js +3 -3
  32. package/lib/DigitalSignEditor/index.js +171 -24
  33. package/lib/Drawer/index.css +144 -0
  34. package/lib/Drawer/index.js +21 -0
  35. package/lib/FileEditor/addition-previewer/index.css +1 -0
  36. package/lib/FileEditor/{pc-editor/addition-previewer → addition-previewer}/index.js +1 -1
  37. package/lib/FileEditor/addition-previewer/local-file-addition/index.css +1 -0
  38. package/lib/FileEditor/{pc-editor/addition-previewer → addition-previewer}/local-file-addition/index.js +4 -4
  39. package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/dropdown-menu.js +1 -1
  40. package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/file-name-editor/index.js +1 -1
  41. package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/index.css +2 -0
  42. package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/index.js +2 -2
  43. package/lib/FileEditor/files-previewer/index.js +268 -26
  44. package/lib/FileEditor/index.css +5 -0
  45. package/lib/FileEditor/index.js +265 -26
  46. package/lib/FormulaFormatter/index.css +5 -5
  47. package/lib/GeolocationEditor/{pc-editor/country-editor.js → country-editor.js} +49 -5
  48. package/lib/GeolocationEditor/{pc-editor/index.css → index.css} +4 -3
  49. package/lib/GeolocationEditor/index.js +230 -90
  50. package/lib/GeolocationEditor/{pc-editor/location-editor.js → location-editor.js} +41 -8
  51. package/lib/GeolocationEditor/{pc-editor/map-editor → map-editor}/index.js +6 -6
  52. package/lib/GeolocationEditor/{pc-editor/map-editor → map-editor}/large-editor/index.js +7 -7
  53. package/lib/GeolocationEditor/map-editor-utils.js +4 -10
  54. package/lib/GeolocationEditor/{pc-editor/map-selection-editor → map-selection-editor}/index.js +7 -7
  55. package/lib/GeolocationEditor/{pc-editor/map-selection-editor → map-selection-editor}/large-editor/index.js +7 -7
  56. package/lib/GeolocationEditor/{pc-editor/province-city-editor.js → province-city-editor.js} +38 -7
  57. package/lib/GeolocationEditor/{pc-editor/province-editor.js → province-editor.js} +31 -7
  58. package/lib/GeolocationEditor/{pc-editor/selector-header-item.js → selector-header-item.js} +1 -1
  59. package/lib/Icon/index.css +50 -0
  60. package/lib/Icon/index.js +35 -0
  61. package/lib/Icon/load-sprite.js +56 -0
  62. package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/image-link/index.js +1 -1
  63. package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/index.js +1 -1
  64. package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/local-image-addition/index.js +4 -4
  65. package/lib/ImageEditor/images-previewer/image-preview/index.js +3 -3
  66. package/lib/ImageEditor/images-previewer/index.js +4 -9
  67. package/lib/ImageEditor/index.css +16 -17
  68. package/lib/ImageEditor/index.js +185 -26
  69. package/lib/ImageThumbnail/index.js +1 -2
  70. package/lib/InputItem/custom-input.js +321 -0
  71. package/lib/InputItem/custom-keyboard.js +162 -0
  72. package/lib/InputItem/index.js +389 -0
  73. package/lib/InputItem/input.js +45 -0
  74. package/lib/InputItem/locale/en_US.js +12 -0
  75. package/lib/InputItem/locale/ru_RU.js +12 -0
  76. package/lib/InputItem/locale/sv_SE.js +12 -0
  77. package/lib/InputItem/locale/zh_CN.js +12 -0
  78. package/lib/InputItem/portal.js +23 -0
  79. package/lib/InputItem/style/index.css +524 -0
  80. package/lib/LinkEditor/index.js +5 -5
  81. package/lib/LinkEditor/{mb-popover → mb-link-editor-popover}/index.css +1 -1
  82. package/lib/List/index.css +389 -0
  83. package/lib/List/index.js +41 -0
  84. package/lib/List/list-item.js +169 -0
  85. package/lib/Modal/alert.js +86 -0
  86. package/lib/Modal/index.js +16 -0
  87. package/lib/Modal/modal.js +118 -0
  88. package/lib/Modal/operation.js +81 -0
  89. package/lib/Modal/prompt.js +211 -0
  90. package/lib/Modal/style/index.css +593 -0
  91. package/lib/MultipleSelectEditor/index.js +14 -9
  92. package/lib/Picker/AbstractPicker.js +190 -0
  93. package/lib/Picker/index.js +28 -0
  94. package/lib/Picker/locale/en_US.js +12 -0
  95. package/lib/Picker/locale/ru_RU.js +12 -0
  96. package/lib/Picker/locale/sv_SE.js +12 -0
  97. package/lib/Picker/locale/zh_CN.js +12 -0
  98. package/lib/Picker/popupProps.js +12 -0
  99. package/lib/Picker/style/index.css +145 -0
  100. package/lib/Popover/index.js +63 -0
  101. package/lib/Popover/item.js +55 -0
  102. package/lib/Popover/style/index.css +233 -0
  103. package/lib/Progress/index.css +24 -0
  104. package/lib/Progress/index.js +66 -0
  105. package/lib/Radio/Radio.js +47 -0
  106. package/lib/Radio/RadioItem.js +57 -0
  107. package/lib/Radio/index.css +92 -0
  108. package/lib/Radio/index.js +12 -0
  109. package/lib/RowExpandDialog/column-content/index.js +2 -2
  110. package/lib/RowExpandDialog/index.js +0 -2
  111. package/lib/RowExpandEditor/{add-btn/pc-add-btn → RowExpandAddBtn}/index.js +4 -6
  112. package/lib/RowExpandEditor/{checkbox-editor/pc-editor.js → RowExpandCheckboxEditor/index.js} +13 -9
  113. package/lib/RowExpandEditor/{collaborator-editor/pc-editor → RowExpandCollaboratorEditor}/index.css +1 -1
  114. package/lib/RowExpandEditor/{collaborator-editor/pc-editor → RowExpandCollaboratorEditor}/index.js +7 -6
  115. package/lib/RowExpandEditor/{date-editor/pc-editor.js → RowExpandDateEditor/index.js} +2 -2
  116. package/lib/RowExpandEditor/{department-editor/pc-editor.js → RowExpandDepartmentEditor/index.js} +49 -44
  117. package/lib/RowExpandEditor/{digital-sign-editor/pc-editor → RowExpandDigitalSignEditor}/index.css +1 -1
  118. package/lib/RowExpandEditor/{digital-sign-editor/pc-editor → RowExpandDigitalSignEditor}/index.js +11 -11
  119. package/lib/RowExpandEditor/{duration-editor/pc-editor.js → RowExpandDurationEditor/index.js} +2 -2
  120. package/lib/RowExpandEditor/RowExpandEmailEditor/index.css +2 -0
  121. package/lib/RowExpandEditor/{email-editor/pc-editor → RowExpandEmailEditor}/index.js +3 -3
  122. package/lib/RowExpandEditor/RowExpandFileEditor/index.css +1 -0
  123. package/lib/RowExpandEditor/{file-editor/pc-editor → RowExpandFileEditor}/index.js +9 -9
  124. package/lib/RowExpandEditor/{geolocation-editor/pc-editor → RowExpandGeolocationEditor}/index.js +13 -17
  125. package/lib/RowExpandEditor/{image-editor/pc-editor → RowExpandImageEditor}/index.js +9 -9
  126. package/lib/RowExpandEditor/{long-text-editor/pc-editor → RowExpandLongTextEditor}/index.js +7 -7
  127. package/lib/RowExpandEditor/{multiple-select-editor/pc-editor → RowExpandMultipleSelectEditor}/index.css +1 -1
  128. package/lib/RowExpandEditor/{multiple-select-editor/pc-editor → RowExpandMultipleSelectEditor}/index.js +6 -6
  129. package/lib/RowExpandEditor/{number-editor/pc-editor.js → RowExpandNumberEditor/index.js} +2 -2
  130. package/lib/RowExpandEditor/RowExpandRateEditor/index.css +13 -0
  131. package/lib/RowExpandEditor/{rate-editor/pc-editor.js → RowExpandRateEditor/index.js} +3 -2
  132. package/lib/RowExpandEditor/{single-select-editor/pc-editor → RowExpandSingleSelectorEditor}/index.js +17 -17
  133. package/lib/RowExpandEditor/{text-editor/pc-editor → RowExpandTextEditor}/index.js +7 -7
  134. package/lib/RowExpandEditor/{url-editor/pc-editor → RowExpandUrlEditor}/index.js +6 -6
  135. package/lib/RowExpandEditor/constants.js +34 -34
  136. package/lib/RowExpandFormatter/{department-formatter/pc-formatter.js → RowExpandDepartmentFormatter/index.js} +2 -2
  137. package/lib/RowExpandFormatter/{email-formatter → RowExpandEmailFormatter}/index.css +4 -4
  138. package/lib/RowExpandFormatter/RowExpandRateFormatter/index.css +5 -0
  139. package/lib/RowExpandFormatter/constants.js +17 -17
  140. package/lib/RowExpandFormatter/index.css +18 -33
  141. package/lib/RowExpandFormatter/index.js +1 -1
  142. package/lib/SelectItem/index.js +33 -57
  143. package/lib/SingleSelectEditor/index.js +14 -9
  144. package/lib/SvgIcon/index.js +1 -2
  145. package/lib/TabBar/Tab.js +76 -0
  146. package/lib/TabBar/index.css +142 -0
  147. package/lib/TabBar/index.js +129 -0
  148. package/lib/Tabs/index.css +453 -0
  149. package/lib/Tabs/index.js +39 -0
  150. package/lib/TextareaItem/index.css +235 -0
  151. package/lib/TextareaItem/index.js +231 -0
  152. package/lib/Toast/index.css +67 -0
  153. package/lib/Toast/index.js +131 -0
  154. package/lib/_util/class.js +34 -0
  155. package/lib/_util/closest.js +17 -0
  156. package/lib/_util/exenv.js +8 -0
  157. package/lib/_util/getDataAttr.js +15 -0
  158. package/lib/_util/getLocale.js +42 -0
  159. package/lib/constants/index.js +2 -3
  160. package/lib/css/am.css +390 -0
  161. package/lib/css/mb-cell-editor.css +1 -1
  162. package/lib/index.js +100 -51
  163. package/lib/locales/de.json +1 -3
  164. package/lib/locales/en.json +1 -3
  165. package/lib/locales/es.json +1 -3
  166. package/lib/locales/fr.json +1 -3
  167. package/lib/locales/pt.json +1 -3
  168. package/lib/locales/ru.json +1 -3
  169. package/lib/locales/zh-CN.json +1 -3
  170. package/lib/select-editor/index.js +20 -27
  171. package/lib/select-editor/mb-select-editor/index.css +127 -0
  172. package/lib/select-editor/mb-select-editor/index.js +197 -0
  173. package/lib/select-editor/{pc-editor → pc-select-editor}/index.css +1 -1
  174. package/lib/select-editor/{pc-editor → pc-select-editor}/index.js +7 -7
  175. package/lib/select-editor/select-editor-option.js +84 -0
  176. package/lib/utils/editor-utils.js +2 -6
  177. package/lib/utils/get-event-transfer.js +1 -2
  178. package/lib/utils/utils.js +2 -11
  179. package/package.json +25 -16
  180. package/lib/BodyPortal/index.js +0 -29
  181. package/lib/CheckboxEditor/mb-editor.js +0 -99
  182. package/lib/CheckboxEditor/pc-editor.js +0 -118
  183. package/lib/CollaboratorEditor/mb-editor/index.css +0 -41
  184. package/lib/CollaboratorEditor/mb-editor/index.js +0 -88
  185. package/lib/DateEditor/mb-editor/custom-rc-calendar.css +0 -118
  186. package/lib/DateEditor/mb-editor/index.css +0 -39
  187. package/lib/DateEditor/mb-editor/index.js +0 -215
  188. package/lib/DepartmentSingleSelectEditor/index.js +0 -34
  189. package/lib/DepartmentSingleSelectEditor/mb-editor/index.css +0 -4
  190. package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +0 -230
  191. package/lib/DigitalSignEditor/mb-editor/index.css +0 -35
  192. package/lib/DigitalSignEditor/mb-editor/index.js +0 -144
  193. package/lib/DigitalSignEditor/pc-editor/index.js +0 -181
  194. package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +0 -122
  195. package/lib/FileEditor/files-previewer/mb-previewer/index.css +0 -39
  196. package/lib/FileEditor/files-previewer/mb-previewer/index.js +0 -64
  197. package/lib/FileEditor/files-previewer/pc-previewer/index.js +0 -276
  198. package/lib/FileEditor/mb-editor/index.css +0 -10
  199. package/lib/FileEditor/mb-editor/index.js +0 -136
  200. package/lib/FileEditor/pc-editor/addition-previewer/index.css +0 -1
  201. package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.css +0 -1
  202. package/lib/FileEditor/pc-editor/index.css +0 -5
  203. package/lib/FileEditor/pc-editor/index.js +0 -274
  204. package/lib/GeolocationEditor/mb-editor/country-editor.js +0 -79
  205. package/lib/GeolocationEditor/mb-editor/index.css +0 -11
  206. package/lib/GeolocationEditor/mb-editor/index.js +0 -125
  207. package/lib/GeolocationEditor/mb-editor/location-editor.js +0 -101
  208. package/lib/GeolocationEditor/mb-editor/map-editor/index.css +0 -11
  209. package/lib/GeolocationEditor/mb-editor/map-editor/index.js +0 -474
  210. package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.css +0 -158
  211. package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +0 -530
  212. package/lib/GeolocationEditor/mb-editor/province-city-editor.js +0 -77
  213. package/lib/GeolocationEditor/mb-editor/province-editor.js +0 -76
  214. package/lib/GeolocationEditor/pc-editor/index.js +0 -247
  215. package/lib/ImageEditor/mb-editor/index.css +0 -29
  216. package/lib/ImageEditor/mb-editor/index.js +0 -136
  217. package/lib/ImageEditor/pc-editor/images-previewer/index.js +0 -140
  218. package/lib/ImageEditor/pc-editor/index.css +0 -24
  219. package/lib/ImageEditor/pc-editor/index.js +0 -194
  220. package/lib/MobileFullScreenPage/body/index.css +0 -9
  221. package/lib/MobileFullScreenPage/body/index.js +0 -23
  222. package/lib/MobileFullScreenPage/header/index.css +0 -39
  223. package/lib/MobileFullScreenPage/header/index.js +0 -38
  224. package/lib/MobileFullScreenPage/index.css +0 -13
  225. package/lib/MobileFullScreenPage/index.js +0 -73
  226. package/lib/MobileModal/index.js +0 -41
  227. package/lib/MobileOperationSheet/index.css +0 -27
  228. package/lib/MobileOperationSheet/index.js +0 -92
  229. package/lib/MobileSelector/empty/index.css +0 -3
  230. package/lib/MobileSelector/empty/index.js +0 -23
  231. package/lib/MobileSelector/index.css +0 -32
  232. package/lib/MobileSelector/index.js +0 -57
  233. package/lib/MobileSelector/option/index.css +0 -28
  234. package/lib/MobileSelector/option/index.js +0 -36
  235. package/lib/MobileSelector/options/index.css +0 -8
  236. package/lib/MobileSelector/options/index.js +0 -18
  237. package/lib/MobileSelector/search/index.css +0 -7
  238. package/lib/MobileSelector/search/index.js +0 -26
  239. package/lib/MobileUpload/index.css +0 -1
  240. package/lib/MobileUpload/index.js +0 -160
  241. package/lib/RowExpand/index.js +0 -24
  242. package/lib/RowExpandEditor/add-btn/index.js +0 -24
  243. package/lib/RowExpandEditor/add-btn/mb-add-btn/index.css +0 -3
  244. package/lib/RowExpandEditor/add-btn/mb-add-btn/index.js +0 -19
  245. package/lib/RowExpandEditor/checkbox-editor/index.js +0 -25
  246. package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.css +0 -6
  247. package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +0 -36
  248. package/lib/RowExpandEditor/collaborator-editor/index.js +0 -24
  249. package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.css +0 -9
  250. package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +0 -163
  251. package/lib/RowExpandEditor/date-editor/index.js +0 -24
  252. package/lib/RowExpandEditor/date-editor/mb-editor.js +0 -82
  253. package/lib/RowExpandEditor/department-editor/index.js +0 -24
  254. package/lib/RowExpandEditor/department-editor/mb-editor.js +0 -65
  255. package/lib/RowExpandEditor/digital-sign-editor/index.js +0 -24
  256. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.css +0 -1
  257. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +0 -130
  258. package/lib/RowExpandEditor/duration-editor/index.js +0 -24
  259. package/lib/RowExpandEditor/duration-editor/mb-editor.js +0 -71
  260. package/lib/RowExpandEditor/email-editor/index.js +0 -24
  261. package/lib/RowExpandEditor/email-editor/mb-editor/index.css +0 -1
  262. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +0 -84
  263. package/lib/RowExpandEditor/email-editor/pc-editor/index.css +0 -1
  264. package/lib/RowExpandEditor/file-editor/index.js +0 -24
  265. package/lib/RowExpandEditor/file-editor/mb-editor/index.js +0 -114
  266. package/lib/RowExpandEditor/file-editor/pc-editor/index.css +0 -1
  267. package/lib/RowExpandEditor/geolocation-editor/index.js +0 -24
  268. package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +0 -100
  269. package/lib/RowExpandEditor/image-editor/index.js +0 -24
  270. package/lib/RowExpandEditor/image-editor/mb-editor/index.css +0 -30
  271. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +0 -109
  272. package/lib/RowExpandEditor/long-text-editor/index.js +0 -24
  273. package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.css +0 -10
  274. package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +0 -80
  275. package/lib/RowExpandEditor/long-text-editor/mb-editor/index.css +0 -3
  276. package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +0 -91
  277. package/lib/RowExpandEditor/multiple-select-editor/index.js +0 -24
  278. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +0 -154
  279. package/lib/RowExpandEditor/number-editor/index.js +0 -24
  280. package/lib/RowExpandEditor/number-editor/mb-editor/index.css +0 -3
  281. package/lib/RowExpandEditor/number-editor/mb-editor/index.js +0 -76
  282. package/lib/RowExpandEditor/rate-editor/index.css +0 -34
  283. package/lib/RowExpandEditor/rate-editor/index.js +0 -25
  284. package/lib/RowExpandEditor/rate-editor/mb-editor.js +0 -92
  285. package/lib/RowExpandEditor/right-angle/index.css +0 -6
  286. package/lib/RowExpandEditor/right-angle/index.js +0 -17
  287. package/lib/RowExpandEditor/single-select-editor/index.js +0 -24
  288. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.css +0 -8
  289. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +0 -134
  290. package/lib/RowExpandEditor/text-editor/index.js +0 -24
  291. package/lib/RowExpandEditor/text-editor/mb-editor/index.css +0 -14
  292. package/lib/RowExpandEditor/text-editor/mb-editor/index.js +0 -37
  293. package/lib/RowExpandEditor/url-editor/index.js +0 -24
  294. package/lib/RowExpandEditor/url-editor/mb-editor/index.css +0 -17
  295. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +0 -87
  296. package/lib/RowExpandFormatter/department-formatter/index.js +0 -19
  297. package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +0 -20
  298. package/lib/RowExpandFormatter/rate-formatter/index.css +0 -5
  299. package/lib/RowExpandView/body/index.css +0 -173
  300. package/lib/RowExpandView/body/index.js +0 -111
  301. package/lib/RowExpandView/column-content/index.css +0 -27
  302. package/lib/RowExpandView/column-content/index.js +0 -25
  303. package/lib/RowExpandView/index.css +0 -3
  304. package/lib/RowExpandView/index.js +0 -178
  305. package/lib/select-editor/mb-editor/index.css +0 -1
  306. package/lib/select-editor/mb-editor/index.js +0 -105
  307. /package/lib/CollaboratorEditor/{pc-editor → pc-collaborator-editor}/index.css +0 -0
  308. /package/lib/CollaboratorEditor/{pc-editor → pc-collaborator-editor}/index.js +0 -0
  309. /package/lib/{constants/departments.js → Department-editor/constants.js} +0 -0
  310. /package/lib/{DepartmentMultipleSelectEditor → Department-editor/department-multiple-select}/index.css +0 -0
  311. /package/lib/{utils/departments.js → Department-editor/utils.js} +0 -0
  312. /package/lib/DigitalSignEditor/{pc-editor/index.css → index.css} +0 -0
  313. /package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/file-name-editor/index.css +0 -0
  314. /package/lib/GeolocationEditor/{pc-editor/map-editor → map-editor}/large-editor/index.css +0 -0
  315. /package/lib/GeolocationEditor/{pc-editor/map-selection-editor → map-selection-editor}/large-editor/index.css +0 -0
  316. /package/lib/GeolocationEditor/{pc-editor/parse-geolocation.js → parse-geolocation.js} +0 -0
  317. /package/lib/GeolocationEditor/{pc-editor/selector-list.js → selector-list.js} +0 -0
  318. /package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/image-link/index.css +0 -0
  319. /package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/index.css +0 -0
  320. /package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/local-image-addition/index.css +0 -0
  321. /package/lib/LinkEditor/{mb-popover → mb-link-editor-popover}/index.js +0 -0
  322. /package/lib/LinkEditor/{pc-popover → pc-link-editor-popover}/index.css +0 -0
  323. /package/lib/LinkEditor/{pc-popover → pc-link-editor-popover}/index.js +0 -0
  324. /package/lib/RowExpandEditor/{add-btn/pc-add-btn → RowExpandAddBtn}/index.css +0 -0
  325. /package/lib/RowExpandEditor/{checkbox-editor → RowExpandCheckboxEditor}/index.css +0 -0
  326. /package/lib/RowExpandEditor/{geolocation-editor/pc-editor → RowExpandGeolocationEditor}/index.css +0 -0
  327. /package/lib/RowExpandEditor/{image-editor/pc-editor → RowExpandImageEditor}/index.css +0 -0
  328. /package/lib/RowExpandEditor/{long-text-editor/pc-editor → RowExpandLongTextEditor}/index.css +0 -0
  329. /package/lib/RowExpandEditor/{single-select-editor/pc-editor → RowExpandSingleSelectorEditor}/index.css +0 -0
  330. /package/lib/RowExpandEditor/{text-editor/pc-editor → RowExpandTextEditor}/index.css +0 -0
  331. /package/lib/RowExpandEditor/{url-editor/pc-editor → RowExpandUrlEditor}/index.css +0 -0
  332. /package/lib/RowExpandFormatter/{email-formatter → RowExpandEmailFormatter}/index.js +0 -0
  333. /package/lib/RowExpandFormatter/{file-formatter → RowExpandFileFormatter}/index.css +0 -0
  334. /package/lib/RowExpandFormatter/{file-formatter → RowExpandFileFormatter}/index.js +0 -0
  335. /package/lib/RowExpandFormatter/{file-formatter → RowExpandFileFormatter}/row-expand-file-item-formatter.js +0 -0
  336. /package/lib/RowExpandFormatter/{formula-formatter → RowExpandFormulaFormatter}/index.js +0 -0
  337. /package/lib/RowExpandFormatter/{image-formatter → RowExpandImageFormatter}/index.css +0 -0
  338. /package/lib/RowExpandFormatter/{image-formatter → RowExpandImageFormatter}/index.js +0 -0
  339. /package/lib/RowExpandFormatter/{image-formatter → RowExpandImageFormatter}/row-expand-image-item-formatter.js +0 -0
  340. /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/collaborator-item-formatter.js +0 -0
  341. /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/index.css +0 -0
  342. /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/index.js +0 -0
  343. /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/value-display-utils.js +0 -0
  344. /package/lib/RowExpandFormatter/{rate-formatter → RowExpandRateFormatter}/index.js +0 -0
  345. /package/lib/RowExpandFormatter/{url-formatter → RowExpandUrlFormatter}/index.css +0 -0
  346. /package/lib/RowExpandFormatter/{url-formatter → RowExpandUrlFormatter}/index.js +0 -0
@@ -8,9 +8,9 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _reactstrap = require("reactstrap");
11
- var _constants = require("../../constants");
12
- var _Loading = _interopRequireDefault(require("../../Loading"));
13
- var _lang = require("../../lang");
11
+ var _constants = require("../constants");
12
+ var _Loading = _interopRequireDefault(require("../Loading"));
13
+ var _lang = require("../lang");
14
14
  class CountryEditor extends _react.Component {
15
15
  constructor(props) {
16
16
  super(props);
@@ -126,6 +126,29 @@ class CountryEditor extends _react.Component {
126
126
  }
127
127
  }, 300);
128
128
  };
129
+ this.getLocationData = () => {
130
+ const {
131
+ config
132
+ } = this.props;
133
+ const {
134
+ mediaUrl
135
+ } = {
136
+ ...window.dtable,
137
+ ...config
138
+ };
139
+ let geoFileName = 'en-region-location';
140
+ if (this.lang === 'cn') {
141
+ geoFileName = 'cn-region-location';
142
+ }
143
+ return fetch("".concat(mediaUrl, "geo-data/").concat(geoFileName, ".json")).then(res => {
144
+ return res.json();
145
+ }).catch(() => {
146
+ // get locations from local
147
+ return fetch("./geo-data/".concat(geoFileName, ".json")).then(res => {
148
+ return res.json();
149
+ });
150
+ });
151
+ };
129
152
  this.createContinentList = () => {
130
153
  let isSearchResultEmpty = true;
131
154
  const continents = Object.keys(this.filteredCountry);
@@ -237,12 +260,33 @@ class CountryEditor extends _react.Component {
237
260
  }
238
261
  componentDidMount() {
239
262
  document.addEventListener('keydown', this.onHotKey, true);
240
- this.props.getData(this.lang).then(data => {
241
- this.geolocationRegions = data;
263
+ if (this.lang === 'cn' && window.app.countryListCn) {
264
+ this.geolocationRegions = window.app.countryListCn;
265
+ this.filteredCountry = this.geolocationRegions;
266
+ this.setState({
267
+ isLoadingData: false
268
+ });
269
+ return;
270
+ }
271
+ if (this.lang !== 'cn' && window.app.countryListEn) {
272
+ this.geolocationRegions = window.app.countryListEn;
242
273
  this.filteredCountry = this.geolocationRegions;
243
274
  this.setState({
244
275
  isLoadingData: false
245
276
  });
277
+ return;
278
+ }
279
+ this.getLocationData().then(data => {
280
+ this.geolocationRegions = data || {};
281
+ this.filteredCountry = this.geolocationRegions;
282
+ if (this.lang === 'cn') {
283
+ window.app.countryListCn = this.geolocationRegions;
284
+ } else {
285
+ window.app.countryListEn = this.geolocationRegions;
286
+ }
287
+ this.setState({
288
+ isLoadingData: false
289
+ });
246
290
  });
247
291
  }
248
292
  componentWillUnmount() {
@@ -205,6 +205,7 @@
205
205
  }
206
206
 
207
207
  .dtable-ui-geolocation-map-editor .search-tables-input {
208
+ line-height: 38px;
208
209
  padding-right: 30px;
209
210
  border-bottom: 0;
210
211
  background: #fff;
@@ -434,7 +435,7 @@
434
435
  box-shadow: 0 -0 3px rgb(0 0 0 / 30%);
435
436
  }
436
437
 
437
- .dtable-ui-geolocation-map-editor-error-message {
438
+ .dtable-ui-geolocation-map-editor .error-message {
438
439
  word-break: break-all;
439
440
  padding: 10px;
440
441
  margin: auto;
@@ -479,7 +480,7 @@
479
480
  background-color: #f5f5f5;
480
481
  }
481
482
 
482
- @media screen and (max-width: 768px) {
483
+ @media screen and (max-width: 767.8px) {
483
484
  .dtable-ui-geolocation-locate-control,
484
485
  .dtable-ui-geolocation-zoom-control .dtable-ui-geolocation-zoom-control-btn {
485
486
  margin-bottom: 4px;
@@ -493,7 +494,7 @@
493
494
  }
494
495
  }
495
496
 
496
- @media screen and (min-width: 768px) {
497
+ @media screen and (min-width: 767.8px) {
497
498
  .dtable-ui-geolocation-locate-control,
498
499
  .dtable-ui-geolocation-zoom-control .dtable-ui-geolocation-zoom-control-btn {
499
500
  margin-bottom: 4px;
@@ -1,100 +1,240 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
- var _react = _interopRequireWildcard(require("react"));
10
- var _reactResponsive = _interopRequireDefault(require("react-responsive"));
11
- var _pcEditor = _interopRequireDefault(require("./pc-editor"));
12
- var _mbEditor = _interopRequireDefault(require("./mb-editor"));
13
- const GeolocationEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
14
- let {
15
- isMobile,
16
- config: propsConfig,
17
- ...props
18
- } = _ref;
19
- const config = (0, _react.useMemo)(() => {
20
- var _window;
21
- return {
22
- ...((_window = window) === null || _window === void 0 ? void 0 : _window.dtable),
23
- ...propsConfig
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _dtableUtils = require("dtable-utils");
10
+ var _constants = require("../constants");
11
+ var _objectUtils = _interopRequireDefault(require("../utils/object-utils"));
12
+ var _locationEditor = _interopRequireDefault(require("./location-editor"));
13
+ var _mapEditor = _interopRequireDefault(require("./map-editor"));
14
+ var _mapSelectionEditor = _interopRequireDefault(require("./map-selection-editor"));
15
+ var _countryEditor = _interopRequireDefault(require("./country-editor"));
16
+ var _provinceEditor = _interopRequireDefault(require("./province-editor"));
17
+ var _provinceCityEditor = _interopRequireDefault(require("./province-city-editor"));
18
+ require("./index.css");
19
+ class GeolocationEditor extends _react.default.Component {
20
+ constructor(_props) {
21
+ super(_props);
22
+ this.onHotKey = e => {
23
+ if (e.keyCode === _constants.KeyCodes.Enter && e.target.tagName !== 'TEXTAREA') {
24
+ this.onSubmit();
25
+ } else if (e.keyCode === _constants.KeyCodes.Escape) {
26
+ if (this.props.isInModal) {
27
+ e.stopPropagation();
28
+ this.onCancel();
29
+ }
30
+ }
24
31
  };
25
- }, [propsConfig]);
26
- const getLocationData = (0, _react.useCallback)(() => {
27
- var _window2, _window2$app;
28
- if ((_window2 = window) !== null && _window2 !== void 0 && (_window2$app = _window2.app) !== null && _window2$app !== void 0 && _window2$app.location) return new Promise((resolve, reject) => {
29
- resolve(window.app.location);
30
- });
31
- const {
32
- mediaUrl
33
- } = config || {};
34
- return fetch("".concat(mediaUrl, "geo-data/cn-location.json")).then(res => {
35
- // get locations from server
36
- return res.json();
37
- }).catch(() => {
38
- // get locations from local
39
- return fetch('./geo-data/cn-location.json').then(res => {
40
- return res.json();
41
- });
42
- });
43
- }, [config]);
44
- const getCountryData = (0, _react.useCallback)(lang => {
45
- if (lang === 'cn' && window.app.countryListCn) return new Promise((resolve, reject) => {
46
- resolve(window.app.countryListCn);
47
- });
48
- if (lang !== 'cn' && window.app.countryListEn) return new Promise((resolve, reject) => {
49
- resolve(window.app.countryListEn);
50
- });
51
- const {
52
- mediaUrl
53
- } = config;
54
- const geoFileName = lang === 'cn' ? 'cn-region-location' : 'en-region-location';
55
- return fetch("".concat(mediaUrl, "geo-data/").concat(geoFileName, ".json")).then(res => {
56
- return res.json();
57
- }).catch(() => {
58
- // get locations from local
59
- return fetch("./geo-data/".concat(geoFileName, ".json")).then(res => {
60
- return res.json();
61
- });
62
- }).then(res => {
63
- const data = res || {};
64
- if (lang === 'cn') {
65
- window.app.countryListCn = data;
66
- } else {
67
- window.app.countryListEn = data;
32
+ this.getValue = () => {
33
+ return this.value;
34
+ };
35
+ this.setValue = value => {
36
+ this.value = value;
37
+ };
38
+ this.onSubmit = () => {
39
+ if (_objectUtils.default.isSameObject(this.initValue, this.value)) {
40
+ this.onCancel();
41
+ return;
68
42
  }
69
- return data;
70
- });
71
- }, [config]);
72
- if (isMobile === false) return /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
73
- config: config,
74
- getLocationData: getLocationData,
75
- getCountryData: getCountryData,
76
- ref: ref
77
- }));
78
- if (isMobile === true) return /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
79
- config: config,
80
- getLocationData: getLocationData,
81
- getCountryData: getCountryData,
82
- ref: ref
83
- }));
84
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
85
- query: "(min-width: 768px)"
86
- }, /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
87
- config: config,
88
- getLocationData: getLocationData,
89
- getCountryData: getCountryData,
90
- ref: ref
91
- }))), /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
92
- query: "(max-width: 768px)"
93
- }, /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
94
- config: config,
95
- getLocationData: getLocationData,
96
- getCountryData: getCountryData,
97
- ref: ref
98
- }))));
99
- });
43
+ this.props.onCommit(this.value);
44
+ };
45
+ this.onCancel = () => {
46
+ this.props.onCommitCancel && this.props.onCommitCancel();
47
+ };
48
+ this.setEditorPosition = () => {
49
+ const {
50
+ isInModal
51
+ } = this.props;
52
+ const editorFormat = this.getGeoFormat();
53
+ if (this.ref && (editorFormat === _dtableUtils.GEOLOCATION_FORMAT.COUNTRY_REGION || editorFormat === _dtableUtils.GEOLOCATION_FORMAT.PROVINCE)) {
54
+ let height = 240;
55
+ let width = 200;
56
+ let left = this.ref.parentNode.getBoundingClientRect().x;
57
+ let top = this.ref.parentNode.getBoundingClientRect().y;
58
+ if (isInModal) {
59
+ left = 220;
60
+ }
61
+ if (top + height > window.innerHeight) {
62
+ top = window.innerHeight - height - 35;
63
+ }
64
+ this.setState({
65
+ editorPosition: {
66
+ top,
67
+ left,
68
+ width,
69
+ zIndex: 1000,
70
+ position: 'fixed'
71
+ }
72
+ });
73
+ return;
74
+ }
75
+ if (this.ref && editorFormat === _dtableUtils.GEOLOCATION_FORMAT.PROVINCE_CITY) {
76
+ let height = 215;
77
+ let width = 400;
78
+ let left = this.ref.parentNode.getBoundingClientRect().x;
79
+ let top = this.ref.parentNode.getBoundingClientRect().y;
80
+ if (isInModal) {
81
+ left = 220;
82
+ if (top + height + 35 + 200 > window.innerHeight) {
83
+ top = window.innerHeight - height - 235;
84
+ }
85
+ } else {
86
+ if (top + height + 200 > window.innerHeight) {
87
+ top = window.innerHeight - height - 200 - 5;
88
+ }
89
+ if (left + width > window.innerWidth) {
90
+ left = window.innerWidth - width - 10;
91
+ }
92
+ }
93
+ this.setState({
94
+ editorPosition: {
95
+ top,
96
+ left,
97
+ width,
98
+ zIndex: 1000,
99
+ position: 'fixed'
100
+ }
101
+ });
102
+ return;
103
+ }
104
+ if (this.ref) {
105
+ const isMapTypeEditor = editorFormat === _dtableUtils.GEOLOCATION_FORMAT.LNG_LAT || editorFormat === _dtableUtils.GEOLOCATION_FORMAT.MAP_SELECTION;
106
+ let width = isMapTypeEditor ? 500 : 400;
107
+ let height = isMapTypeEditor ? 454 : 310;
108
+ let geoEditorTop = 0;
109
+ let geoEditorLeft = 0;
110
+ if (isInModal) {
111
+ let innerHeight = window.innerHeight;
112
+ const offsetTop = this.ref.parentNode.getBoundingClientRect().y;
113
+ geoEditorTop = offsetTop;
114
+ geoEditorTop = height + geoEditorTop > innerHeight ? innerHeight - height - 30 : geoEditorTop;
115
+ geoEditorLeft = -30;
116
+ } else {
117
+ let {
118
+ offsetLeft,
119
+ offsetTop
120
+ } = this.ref.parentNode;
121
+ geoEditorLeft = offsetLeft - width;
122
+ geoEditorTop = offsetTop;
123
+ if (offsetLeft < width) {
124
+ geoEditorLeft = offsetLeft + this.props.column.width;
125
+ }
126
+ if (geoEditorLeft + width > window.innerWidth) {
127
+ geoEditorLeft = window.innerWidth - width;
128
+ }
129
+ if (offsetTop + height > window.innerHeight) {
130
+ geoEditorTop = window.innerHeight - height;
131
+ }
132
+ }
133
+ this.setState({
134
+ editorPosition: {
135
+ top: geoEditorTop,
136
+ left: geoEditorLeft,
137
+ zIndex: 1000,
138
+ position: 'fixed'
139
+ }
140
+ });
141
+ }
142
+ };
143
+ this.getGeoFormat = () => {
144
+ const {
145
+ column
146
+ } = this.props;
147
+ let data = column.data || {};
148
+ return data.geo_format ? data.geo_format : _dtableUtils.DEFAULT_GEOLOCATION_FORMAT;
149
+ };
150
+ this.getLargeEditorState = () => {
151
+ var _this$editor, _this$editor$state;
152
+ return (_this$editor = this.editor) === null || _this$editor === void 0 ? void 0 : (_this$editor$state = _this$editor.state) === null || _this$editor$state === void 0 ? void 0 : _this$editor$state.isShowLargeEditor;
153
+ };
154
+ this.createEditor = () => {
155
+ const geoFormat = this.getGeoFormat();
156
+ const {
157
+ config,
158
+ column
159
+ } = this.props;
160
+ const props = {
161
+ column,
162
+ config,
163
+ value: this.value,
164
+ setValue: this.setValue,
165
+ onSubmit: this.onSubmit,
166
+ onCancel: this.onCancel
167
+ };
168
+ switch (geoFormat) {
169
+ case _dtableUtils.GEOLOCATION_FORMAT.LNG_LAT:
170
+ {
171
+ return /*#__PURE__*/_react.default.createElement(_mapEditor.default, Object.assign({}, props, {
172
+ ref: ref => this.editor = ref
173
+ }));
174
+ }
175
+ case _dtableUtils.GEOLOCATION_FORMAT.MAP_SELECTION:
176
+ {
177
+ return /*#__PURE__*/_react.default.createElement(_mapSelectionEditor.default, Object.assign({}, props, {
178
+ ref: ref => this.editor = ref
179
+ }));
180
+ }
181
+ case _dtableUtils.GEOLOCATION_FORMAT.COUNTRY_REGION:
182
+ {
183
+ return /*#__PURE__*/_react.default.createElement(_countryEditor.default, Object.assign({}, props, {
184
+ ref: ref => this.editor = ref
185
+ }));
186
+ }
187
+ case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE:
188
+ {
189
+ return /*#__PURE__*/_react.default.createElement(_provinceEditor.default, Object.assign({}, props, {
190
+ onPressTab: this.props.onPressTab,
191
+ ref: ref => this.editor = ref
192
+ }));
193
+ }
194
+ case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE_CITY:
195
+ {
196
+ return /*#__PURE__*/_react.default.createElement(_provinceCityEditor.default, Object.assign({}, props, {
197
+ ref: ref => this.editor = ref
198
+ }));
199
+ }
200
+ case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE_CITY_DISTRICT:
201
+ {
202
+ return /*#__PURE__*/_react.default.createElement(_locationEditor.default, Object.assign({}, props, {
203
+ ref: ref => this.editor = ref
204
+ }));
205
+ }
206
+ default:
207
+ {
208
+ return /*#__PURE__*/_react.default.createElement(_locationEditor.default, Object.assign({}, props, {
209
+ isShowAddressDetail: true,
210
+ ref: ref => this.editor = ref
211
+ }));
212
+ }
213
+ }
214
+ };
215
+ this.value = _props.value || {};
216
+ this.initValue = this.value;
217
+ this.state = {
218
+ editorPosition: null
219
+ };
220
+ this.editor = null;
221
+ }
222
+ componentDidMount() {
223
+ this.setEditorPosition();
224
+ document.addEventListener('keydown', this.onHotKey, true);
225
+ }
226
+ componentWillUnmount() {
227
+ document.removeEventListener('keydown', this.onHotKey, true);
228
+ }
229
+ render() {
230
+ const {
231
+ editorPosition
232
+ } = this.state;
233
+ return /*#__PURE__*/_react.default.createElement("div", {
234
+ ref: ref => this.ref = ref,
235
+ style: editorPosition,
236
+ className: "dtable-ui-dtable-ui-geolocation-editor"
237
+ }, this.createEditor());
238
+ }
239
+ }
100
240
  var _default = exports.default = GeolocationEditor;
@@ -8,13 +8,13 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _reactstrap = require("reactstrap");
11
- var _DTableCustomFooter = _interopRequireDefault(require("../../DTableCustomFooter"));
11
+ var _DTableCustomFooter = _interopRequireDefault(require("../DTableCustomFooter"));
12
12
  var _selectorList = _interopRequireDefault(require("./selector-list"));
13
13
  var _selectorHeaderItem = _interopRequireDefault(require("./selector-header-item"));
14
- var _constants = require("../../constants");
15
- var _Loading = _interopRequireDefault(require("../../Loading"));
14
+ var _constants = require("../constants");
15
+ var _Loading = _interopRequireDefault(require("../Loading"));
16
16
  var _parseGeolocation = _interopRequireDefault(require("./parse-geolocation"));
17
- var _lang = require("../../lang");
17
+ var _lang = require("../lang");
18
18
  class LocationEditor extends _react.Component {
19
19
  constructor(props) {
20
20
  super(props);
@@ -62,6 +62,21 @@ class LocationEditor extends _react.Component {
62
62
  selectedItem: 'county'
63
63
  };
64
64
  };
65
+ this.getLocationData = () => {
66
+ const {
67
+ mediaUrl
68
+ } = window.dtable;
69
+
70
+ // get locations from server
71
+ return fetch("".concat(mediaUrl, "geo-data/cn-location.json")).then(res => {
72
+ return res.json();
73
+ }).catch(() => {
74
+ // get locations from local
75
+ return fetch('./geo-data/cn-location.json').then(res => {
76
+ return res.json();
77
+ });
78
+ });
79
+ };
65
80
  this.onKeyDown = e => {
66
81
  e.stopPropagation();
67
82
  e.nativeEvent.stopImmediatePropagation();
@@ -202,8 +217,26 @@ class LocationEditor extends _react.Component {
202
217
  this.timer = null;
203
218
  }
204
219
  UNSAFE_componentWillMount() {
205
- this.props.getData().then(data => {
206
- this.locations = data;
220
+ if (!window.app.location) {
221
+ this.getLocationData().then(data => {
222
+ this.locations = data;
223
+ window.app.location = data;
224
+ const {
225
+ selectedProvince,
226
+ selectedCity,
227
+ selectedCounty,
228
+ selectedItem
229
+ } = this.initLocationSelecting(this.value);
230
+ this.setState({
231
+ isLoadingData: false,
232
+ selectedProvince,
233
+ selectedCity,
234
+ selectedCounty,
235
+ selectedItem
236
+ });
237
+ });
238
+ } else {
239
+ this.locations = window.app.location;
207
240
  const {
208
241
  selectedProvince,
209
242
  selectedCity,
@@ -217,7 +250,7 @@ class LocationEditor extends _react.Component {
217
250
  selectedCounty,
218
251
  selectedItem
219
252
  });
220
- });
253
+ }
221
254
  }
222
255
  render() {
223
256
  const {
@@ -282,7 +315,7 @@ class LocationEditor extends _react.Component {
282
315
  parent: selectedCity,
283
316
  selectedItem: selectedCounty,
284
317
  clickHandler: this.selectCounty
285
- })))), this.props.isShowDetails && /*#__PURE__*/_react.default.createElement("div", {
318
+ })))), this.props.isShowAddressDetail && /*#__PURE__*/_react.default.createElement("div", {
286
319
  className: "dtable-ui-geolocation-editor-item dtable-ui-geolocation-editor-detail"
287
320
  }, /*#__PURE__*/_react.default.createElement("div", {
288
321
  className: "dtable-ui-geolocation-editor-item-left"
@@ -7,13 +7,13 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
- var _toaster = _interopRequireDefault(require("../../../toaster"));
11
- var _Loading = _interopRequireDefault(require("../../../Loading"));
12
- var _constants = require("../../../constants");
13
- var _cell = require("../../../utils/cell");
14
- var _mapEditorUtils = require("../../map-editor-utils");
10
+ var _toaster = _interopRequireDefault(require("../../toaster"));
11
+ var _Loading = _interopRequireDefault(require("../../Loading"));
12
+ var _constants = require("../../constants");
13
+ var _cell = require("../../utils/cell");
14
+ var _mapEditorUtils = require("../map-editor-utils");
15
15
  var _largeEditor = _interopRequireDefault(require("./large-editor"));
16
- var _lang = require("../../../lang");
16
+ var _lang = require("../../lang");
17
17
  class MapEditor extends _react.Component {
18
18
  constructor(props) {
19
19
  super(props);
@@ -7,12 +7,12 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _reactstrap = require("reactstrap");
10
- var _toaster = _interopRequireDefault(require("../../../../toaster"));
11
- var _Loading = _interopRequireDefault(require("../../../../Loading"));
12
- var _constants = require("../../../../constants");
13
- var _cell = require("../../../../utils/cell");
14
- var _mapEditorUtils = require("../../../map-editor-utils");
15
- var _lang = require("../../../../lang");
10
+ var _toaster = _interopRequireDefault(require("../../../toaster"));
11
+ var _Loading = _interopRequireDefault(require("../../../Loading"));
12
+ var _constants = require("../../../constants");
13
+ var _cell = require("../../../utils/cell");
14
+ var _mapEditorUtils = require("../../map-editor-utils");
15
+ var _lang = require("../../../lang");
16
16
  require("./index.css");
17
17
  class LargeMapEditorDialog extends _react.default.Component {
18
18
  constructor(props) {
@@ -427,7 +427,7 @@ class LargeMapEditorDialog extends _react.default.Component {
427
427
  }, (0, _lang.getLocale)('Submit'))), /*#__PURE__*/_react.default.createElement("div", {
428
428
  className: this.readOnly ? 'geolocation-map-read-only-container' : 'geolocation-map-container-large'
429
429
  }, this.mapType && isLoading && /*#__PURE__*/_react.default.createElement(_Loading.default, null), !this.mapType && /*#__PURE__*/_react.default.createElement("div", {
430
- className: "dtable-ui-geolocation-map-editor-error-message d-flex justify-content-center mt-9"
430
+ className: "error-message d-flex justify-content-center mt-9"
431
431
  }, /*#__PURE__*/_react.default.createElement("span", {
432
432
  className: "alert-danger"
433
433
  }, (0, _lang.getLocale)('The_map_plugin_is_not_properly_configured_contact_the_administrator'))), !isLoading && this.mapType && /*#__PURE__*/_react.default.createElement("div", {
@@ -3,11 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.locateCurrentPosition = exports.loadMapSource = exports.getMineMapUrl = exports.getMapInfo = exports.getInitCenter = exports.MAP_TYPES = exports.INPUT_MODE_MAP = exports.DOMESTIC_MAP_TYPE = void 0;
7
- const INPUT_MODE_MAP = exports.INPUT_MODE_MAP = {
8
- ANY_LOCATION: 'any_location',
9
- ONLY_MOBILE_POSITIONING: 'only_mobile_positioning'
10
- };
6
+ exports.locateCurrentPosition = exports.loadMapSource = exports.getMineMapUrl = exports.getMapInfo = exports.getInitCenter = exports.MAP_TYPES = exports.DOMESTIC_MAP_TYPE = void 0;
11
7
  const MAP_TYPES = exports.MAP_TYPES = {
12
8
  B_MAP: 'b_map',
13
9
  // baidu
@@ -26,12 +22,11 @@ const MINE_MAP_ONLINE_SERVICE = {
26
22
  SERVICE_URL: 'https://service.minedata.cn/service'
27
23
  };
28
24
  const getMineMapUrl = function () {
29
- var _window;
30
25
  let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
31
26
  const {
32
27
  dtableMineMapCustomConfig = {}
33
28
  } = {
34
- ...((_window = window) === null || _window === void 0 ? void 0 : _window.dtable),
29
+ ...window.dtable,
35
30
  ...config
36
31
  };
37
32
  const {
@@ -71,14 +66,13 @@ const getInitCenter = function () {
71
66
  };
72
67
  exports.getInitCenter = getInitCenter;
73
68
  const getMapInfo = function () {
74
- var _window2;
75
69
  let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
76
70
  const {
77
71
  dtableBaiduMapKey: baiduMapKey,
78
72
  dtableGoogleMapKey: googleMapKey,
79
73
  dtableMineMapKey: mineMapKey
80
74
  } = {
81
- ...((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.dtable),
75
+ ...window.dtable,
82
76
  ...config
83
77
  };
84
78
  let mapType;
@@ -105,7 +99,7 @@ const loadMapSource = (mapType, mapKey, callback) => {
105
99
  let script = document.createElement('script');
106
100
  script.type = 'text/javascript';
107
101
  if (mapType === MAP_TYPES.B_MAP) {
108
- scriptUrl = "https://api.map.baidu.com/api?v=3.0&ak=".concat(mapKey, "&callback=renderBaiduMap");
102
+ scriptUrl = "https://api.map.baidu.com/api?v=3.0&ak=".concat(mapKey, "}&callback=renderBaiduMap");
109
103
  } else if (mapType === MAP_TYPES.G_MAP) {
110
104
  scriptUrl = "https://maps.googleapis.com/maps/api/js?key=".concat(mapKey, "&callback=renderGoogleMap&libraries=&v=weekly");
111
105
  } else {
@@ -8,13 +8,13 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _dtableUtils = require("dtable-utils");
11
- var _toaster = _interopRequireDefault(require("../../../toaster"));
12
- var _Loading = _interopRequireDefault(require("../../../Loading"));
13
- var _constants = require("../../../constants");
14
- var _cell = require("../../../utils/cell");
15
- var _mapEditorUtils = require("../../map-editor-utils");
11
+ var _toaster = _interopRequireDefault(require("../../toaster"));
12
+ var _Loading = _interopRequireDefault(require("../../Loading"));
13
+ var _constants = require("../../constants");
14
+ var _cell = require("../../utils/cell");
15
+ var _mapEditorUtils = require("../map-editor-utils");
16
16
  var _largeEditor = _interopRequireDefault(require("./large-editor"));
17
- var _lang = require("../../../lang");
17
+ var _lang = require("../../lang");
18
18
  class MapSelectionEditor extends _react.Component {
19
19
  constructor(props) {
20
20
  super(props);
@@ -421,7 +421,7 @@ class MapSelectionEditor extends _react.Component {
421
421
  })))), /*#__PURE__*/_react.default.createElement("div", {
422
422
  className: this.readOnly ? 'geolocation-map-selection-read-only-container' : 'geolocation-map-selection-container'
423
423
  }, this.mapType && isLoading && /*#__PURE__*/_react.default.createElement(_Loading.default, null), !this.mapType && /*#__PURE__*/_react.default.createElement("div", {
424
- className: "dtable-ui-geolocation-map-editor-error-message d-flex justify-content-center mt-9"
424
+ className: "error-message d-flex justify-content-center mt-9"
425
425
  }, /*#__PURE__*/_react.default.createElement("span", {
426
426
  className: "alert-danger"
427
427
  }, (0, _lang.getLocale)('The_map_plugin_is_not_properly_configured_contact_the_administrator'))), !isLoading && this.mapType && /*#__PURE__*/_react.default.createElement("div", {