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
@@ -1,35 +1,194 @@
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"));
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _reactstrap = require("reactstrap");
10
+ var _imagesPreviewer = _interopRequireDefault(require("./images-previewer"));
11
+ var _additionPreviewer = _interopRequireDefault(require("./addition-previewer"));
12
+ var _constants = require("../constants");
13
+ var _DTableModalHeader = _interopRequireDefault(require("../DTableModalHeader"));
14
+ var _lang = require("../lang");
15
+ var _constants2 = require("./constants");
13
16
  require("./index.css");
14
- const ImageEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
15
- let {
16
- isMobile,
17
- ...props
18
- } = _ref;
19
- if (isMobile === false) return /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
20
- ref: ref
21
- }));
22
- if (isMobile === true) return /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
23
- ref: ref
24
- }));
25
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
26
- query: "(min-width: 768px)"
27
- }, /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
28
- ref: ref
29
- }))), /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
30
- query: "(max-width: 768px)"
31
- }, /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
32
- ref: ref
33
- }))));
34
- });
17
+ class ImageEditor extends _react.default.Component {
18
+ constructor(props) {
19
+ var _this;
20
+ super(props);
21
+ _this = this;
22
+ this.getValue = () => {
23
+ return this.state.value;
24
+ };
25
+ this.getEditorView = () => {
26
+ const {
27
+ isInModal,
28
+ value
29
+ } = this.props;
30
+ return !value || value.length === 0 || isInModal ? _constants.FILE_EDITOR_STATUS.ADDITION : _constants.FILE_EDITOR_STATUS.PREVIEWER;
31
+ };
32
+ this.deleteImage = function (index) {
33
+ let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
34
+ let uploadLocalImageValue = _this.state.uploadLocalImageValue.slice(0);
35
+ let value = _this.state.value.slice(0);
36
+ if (_this.state.editorView === _constants.FILE_EDITOR_STATUS.PREVIEWER) {
37
+ value.splice(index, 1);
38
+ } else {
39
+ if (type === 'localPicture') {
40
+ uploadLocalImageValue.splice(index, 1);
41
+ }
42
+ }
43
+ _this.setState({
44
+ uploadLocalImageValue: uploadLocalImageValue,
45
+ isUpdated: true,
46
+ value: value
47
+ });
48
+ };
49
+ this.resetAdditionImage = () => {
50
+ this.setState({
51
+ uploadLocalImageValue: [],
52
+ imageLinkValue: []
53
+ });
54
+ };
55
+ this.toggle = e => {
56
+ e.stopPropagation();
57
+ if (this.state.isOpen && this.state.isUpdated) {
58
+ if (this.state.editorView === _constants.FILE_EDITOR_STATUS.ADDITION) {
59
+ let {
60
+ value,
61
+ uploadLocalImageValue
62
+ } = this.state;
63
+ let newValue = value.concat(uploadLocalImageValue);
64
+ this.setState({
65
+ value: newValue
66
+ }, () => {
67
+ this.props.isInModal ? this.props.onCommit(this.getValue()) : this.props.onCommit();
68
+ });
69
+ return;
70
+ }
71
+ this.props.isInModal ? this.props.onCommit(this.getValue()) : this.props.onCommit();
72
+ }
73
+ if (this.props.isInModal) {
74
+ this.props.onToggle();
75
+ }
76
+ const nextIsOpen = !this.state.isOpen;
77
+ this.setState({
78
+ isOpen: nextIsOpen
79
+ }, () => {
80
+ if (!nextIsOpen) {
81
+ this.props.onCommitCancel && this.props.onCommitCancel();
82
+ }
83
+ });
84
+ };
85
+ this.closeEditor = () => {
86
+ this.setState({
87
+ isOpen: false
88
+ });
89
+ };
90
+ this.togglePreviewer = type => {
91
+ this.setState({
92
+ editorView: type
93
+ });
94
+ };
95
+ this.fileUploadCompleted = fileMessage => {
96
+ let uploadLocalImageValue = this.state.uploadLocalImageValue.slice(0);
97
+ const imageUrl = fileMessage.url;
98
+ uploadLocalImageValue.push(imageUrl);
99
+ this.setState({
100
+ uploadLocalImageValue: uploadLocalImageValue,
101
+ isUpdated: true
102
+ });
103
+ };
104
+ this.addUploadedFile = fileMessageList => {
105
+ let uploadLocalImageValue = this.state.uploadLocalImageValue.slice(0);
106
+ // eslint-disable-next-line no-unused-vars
107
+ for (let fileMessage of fileMessageList) {
108
+ uploadLocalImageValue.push(fileMessage.url);
109
+ }
110
+ this.setState({
111
+ uploadLocalImageValue: uploadLocalImageValue,
112
+ isUpdated: true
113
+ });
114
+ };
115
+ this.renderHeader = () => {
116
+ let {
117
+ editorView
118
+ } = this.state;
119
+ if (this.props.isInModal) {
120
+ return /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Add_images'));
121
+ }
122
+ if (editorView === _constants.FILE_EDITOR_STATUS.PREVIEWER) {
123
+ return /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('All_images'));
124
+ }
125
+ return /*#__PURE__*/_react.default.createElement("div", {
126
+ onClick: this.showImageListPreviewer
127
+ }, /*#__PURE__*/_react.default.createElement("span", {
128
+ "aria-hidden": "true",
129
+ className: "dtable-font dtable-icon-return mr-2"
130
+ }), /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Add_images')));
131
+ };
132
+ this.showImageListPreviewer = () => {
133
+ let {
134
+ value,
135
+ uploadLocalImageValue,
136
+ imageLinkValue
137
+ } = this.state;
138
+ let newValue = value.concat(uploadLocalImageValue, imageLinkValue);
139
+ this.setState({
140
+ value: newValue
141
+ });
142
+ this.togglePreviewer(_constants.FILE_EDITOR_STATUS.PREVIEWER);
143
+ };
144
+ this.saveImageLink = imageUrl => {
145
+ this.setState({
146
+ imageLinkValue: imageUrl,
147
+ isUpdated: true
148
+ });
149
+ this.showImageListPreviewer();
150
+ };
151
+ this.uploadFile = (file, callback) => {
152
+ return this.props.uploadFile(file, _constants2.IMAGES_FOLDER, callback);
153
+ };
154
+ this.state = {
155
+ value: props.value || [],
156
+ editorView: this.getEditorView(),
157
+ isOpen: true,
158
+ isShowFileChooser: false,
159
+ uploadLocalImageValue: [],
160
+ imageLinkValue: [],
161
+ isUpdated: false
162
+ };
163
+ }
164
+ render() {
165
+ return /*#__PURE__*/_react.default.createElement(_reactstrap.Modal, {
166
+ className: "dtable-ui-image-editor-dialog",
167
+ contentClassName: "dtable-ui-image-editor-modal",
168
+ isOpen: this.state.isOpen,
169
+ toggle: this.toggle
170
+ }, /*#__PURE__*/_react.default.createElement(_DTableModalHeader.default, {
171
+ toggle: this.toggle
172
+ }, this.renderHeader()), /*#__PURE__*/_react.default.createElement(_reactstrap.ModalBody, {
173
+ className: "p-0"
174
+ }, /*#__PURE__*/_react.default.createElement("div", {
175
+ className: "dtable-ui-image-editor-container"
176
+ }, this.state.editorView === _constants.FILE_EDITOR_STATUS.PREVIEWER && /*#__PURE__*/_react.default.createElement(_imagesPreviewer.default, {
177
+ value: this.state.value,
178
+ togglePreviewer: this.togglePreviewer,
179
+ deleteImage: this.deleteImage,
180
+ resetAdditionImage: this.resetAdditionImage
181
+ }), this.state.editorView === _constants.FILE_EDITOR_STATUS.ADDITION && /*#__PURE__*/_react.default.createElement(_additionPreviewer.default, {
182
+ deleteImage: this.deleteImage,
183
+ handleFilesChange: this.handleFilesChange,
184
+ uploadLocalImageValue: this.state.uploadLocalImageValue,
185
+ togglePreviewer: this.togglePreviewer,
186
+ saveImageLink: this.saveImageLink,
187
+ fileUploadCompleted: this.fileUploadCompleted,
188
+ addUploadedFile: this.addUploadedFile,
189
+ showImageListPreviewer: this.showImageListPreviewer,
190
+ uploadFile: this.uploadFile
191
+ }))));
192
+ }
193
+ }
35
194
  var _default = exports.default = ImageEditor;
@@ -11,7 +11,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
11
11
  var _DeleteTip = _interopRequireDefault(require("../DeleteTip"));
12
12
  var _url = require("../utils/url");
13
13
  var _lang = require("../lang");
14
- var _constants = require("../constants");
15
14
  require("./index.css");
16
15
  class ImageThumbnail extends _react.default.Component {
17
16
  constructor(props) {
@@ -122,7 +121,7 @@ class ImageThumbnail extends _react.default.Component {
122
121
  toggle: this.closeTip,
123
122
  handleDelete: this.deleteImage,
124
123
  deleteTip: this.props.deleteTip || (0, _lang.getLocale)('Are_you_sure_you_want_to_delete_this_image')
125
- }), !_constants.isMobile && this.ref && /*#__PURE__*/_react.default.createElement(_reactstrap.Tooltip, {
124
+ }), this.ref && /*#__PURE__*/_react.default.createElement(_reactstrap.Tooltip, {
126
125
  placement: "bottom",
127
126
  isOpen: this.state.isTooltipOpen,
128
127
  toggle: this.toggle,
@@ -0,0 +1,321 @@
1
+ "use strict";
2
+
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+ var _classnames = _interopRequireDefault(require("classnames"));
10
+ var React = _interopRequireWildcard(require("react"));
11
+ var ReactDOM = _interopRequireWildcard(require("react-dom"));
12
+ var _class = require("../_util/class");
13
+ var _exenv = require("../_util/exenv");
14
+ var _customKeyboard = _interopRequireDefault(require("./custom-keyboard"));
15
+ var _portal = _interopRequireDefault(require("./portal"));
16
+ let customNumberKeyboard = null;
17
+ const IS_REACT_16 = !!ReactDOM.createPortal;
18
+ function getBodyScrollTop() {
19
+ const el = document.scrollingElement || document.documentElement;
20
+ return el && el.scrollTop || 0;
21
+ }
22
+ function setBodyScrollTop(scrollTop) {
23
+ const el = document.scrollingElement || document.documentElement;
24
+ el.scrollTop = scrollTop;
25
+ }
26
+ class NumberInput extends React.Component {
27
+ constructor(props) {
28
+ super(props);
29
+ this.onChange = value => {
30
+ if (!('value' in this.props)) {
31
+ this.setState({
32
+ value: value.target.value
33
+ });
34
+ }
35
+ this.props.onChange(value);
36
+ };
37
+ this.onConfirm = value => {
38
+ this.props.onVirtualKeyboardConfirm(value);
39
+ };
40
+ this.addBlurListener = () => {
41
+ document.addEventListener('touchend', this.doBlur, false);
42
+ };
43
+ this.removeBlurListener = () => {
44
+ document.removeEventListener('touchend', this.doBlur, false);
45
+ };
46
+ this.saveRef = el => {
47
+ if (IS_REACT_16 && el) {
48
+ customNumberKeyboard = el;
49
+ }
50
+ };
51
+ this.doBlur = ev => {
52
+ const {
53
+ value
54
+ } = this.state;
55
+ if (ev.target !== this.inputRef) {
56
+ this.onInputBlur(value);
57
+ }
58
+ };
59
+ this.unLinkInput = () => {
60
+ if (customNumberKeyboard && customNumberKeyboard.antmKeyboard && customNumberKeyboard.linkedInput && customNumberKeyboard.linkedInput === this) {
61
+ customNumberKeyboard.linkedInput = null;
62
+ if (this.props.autoAdjustHeight) {
63
+ this.getContainer().style.height = '0';
64
+ }
65
+ (0, _class.addClass)(customNumberKeyboard.antmKeyboard, "".concat(this.props.keyboardPrefixCls, "-wrapper-hide"));
66
+ }
67
+ // for unmount
68
+ this.removeBlurListener();
69
+ };
70
+ this.onInputBlur = value => {
71
+ if (IS_REACT_16) {
72
+ this.keyBoard = null;
73
+ }
74
+ const {
75
+ focus
76
+ } = this.state;
77
+ if (focus) {
78
+ this.setState({
79
+ focus: false
80
+ });
81
+ this.props.onBlur(value);
82
+ setTimeout(() => {
83
+ this.unLinkInput();
84
+ }, 50);
85
+ }
86
+ };
87
+ this.onInputFocus = () => {
88
+ const {
89
+ value
90
+ } = this.state;
91
+ this.props.onFocus(value);
92
+ this.setState({
93
+ focus: true
94
+ }, () => {
95
+ if (customNumberKeyboard) {
96
+ customNumberKeyboard.linkedInput = this;
97
+ if (customNumberKeyboard.antmKeyboard) {
98
+ if (this.props.autoAdjustHeight) {
99
+ const keyBoardHeight = customNumberKeyboard.antmKeyboard.offsetHeight;
100
+ this.getContainer().style.height = "".concat(keyBoardHeight, "px");
101
+ if (this.inputRef) {
102
+ const {
103
+ bottom
104
+ } = this.inputRef.getBoundingClientRect();
105
+ const clientHeight = window.innerHeight;
106
+ // 计算输入框距离视窗的底部距离
107
+ const distance = clientHeight - bottom;
108
+ if (distance < keyBoardHeight) {
109
+ setBodyScrollTop(getBodyScrollTop() + keyBoardHeight - distance);
110
+ }
111
+ }
112
+ }
113
+ (0, _class.removeClass)(customNumberKeyboard.antmKeyboard, "".concat(this.props.keyboardPrefixCls, "-wrapper-hide"));
114
+ }
115
+ customNumberKeyboard.confirmDisabled = value === '';
116
+ if (customNumberKeyboard.confirmKeyboardItem) {
117
+ if (value === '') {
118
+ (0, _class.addClass)(customNumberKeyboard.confirmKeyboardItem, "".concat(this.props.keyboardPrefixCls, "-item-disabled"));
119
+ } else {
120
+ (0, _class.removeClass)(customNumberKeyboard.confirmKeyboardItem, "".concat(this.props.keyboardPrefixCls, "-item-disabled"));
121
+ }
122
+ }
123
+ }
124
+ });
125
+ };
126
+ this.onKeyboardClick = KeyboardItemValue => {
127
+ const {
128
+ maxLength
129
+ } = this.props;
130
+ const {
131
+ value
132
+ } = this.state;
133
+ // tslint:disable-next-line:no-this-assignment
134
+ const {
135
+ onChange
136
+ } = this;
137
+ let valueAfterChange;
138
+ // 删除键
139
+ if (KeyboardItemValue === 'delete') {
140
+ valueAfterChange = value.substring(0, value.length - 1);
141
+ onChange({
142
+ target: {
143
+ value: valueAfterChange
144
+ }
145
+ });
146
+ // 确认键
147
+ } else if (KeyboardItemValue === 'confirm') {
148
+ valueAfterChange = value;
149
+ onChange({
150
+ target: {
151
+ value: valueAfterChange
152
+ }
153
+ });
154
+ this.onInputBlur(value);
155
+ this.onConfirm(value);
156
+ // 收起键
157
+ } else if (KeyboardItemValue === 'hide') {
158
+ valueAfterChange = value;
159
+ this.onInputBlur(valueAfterChange);
160
+ } else {
161
+ if (maxLength !== undefined && +maxLength >= 0 && (value + KeyboardItemValue).length > maxLength) {
162
+ valueAfterChange = (value + KeyboardItemValue).substr(0, maxLength);
163
+ onChange({
164
+ target: {
165
+ value: valueAfterChange
166
+ }
167
+ });
168
+ } else {
169
+ valueAfterChange = value + KeyboardItemValue;
170
+ onChange({
171
+ target: {
172
+ value: valueAfterChange
173
+ }
174
+ });
175
+ }
176
+ }
177
+ if (customNumberKeyboard) {
178
+ customNumberKeyboard.confirmDisabled = valueAfterChange === '';
179
+ if (customNumberKeyboard.confirmKeyboardItem) {
180
+ if (valueAfterChange === '') {
181
+ (0, _class.addClass)(customNumberKeyboard.confirmKeyboardItem, "".concat(this.props.keyboardPrefixCls, "-item-disabled"));
182
+ } else {
183
+ (0, _class.removeClass)(customNumberKeyboard.confirmKeyboardItem, "".concat(this.props.keyboardPrefixCls, "-item-disabled"));
184
+ }
185
+ }
186
+ }
187
+ };
188
+ this.onFakeInputClick = () => {
189
+ this.focus();
190
+ };
191
+ this.focus = () => {
192
+ // this focus may invocked by users page button click, so this click may trigger blurEventListener at the same time
193
+ this.renderCustomKeyboard();
194
+ this.removeBlurListener();
195
+ const {
196
+ focus
197
+ } = this.state;
198
+ if (!focus) {
199
+ this.onInputFocus();
200
+ }
201
+ setTimeout(() => {
202
+ this.addBlurListener();
203
+ }, 50);
204
+ };
205
+ this.state = {
206
+ focus: false,
207
+ value: props.value || ''
208
+ };
209
+ }
210
+ componentWillReceiveProps(nextProps) {
211
+ if ('value' in nextProps) {
212
+ this.setState({
213
+ value: nextProps.value
214
+ });
215
+ }
216
+ }
217
+ componentWillUnmount() {
218
+ // focus:true unmount 不能触发 blur
219
+ if (this.state.focus) {
220
+ this.props.onBlur(this.state.value);
221
+ }
222
+ this.unLinkInput();
223
+ }
224
+ getComponent() {
225
+ const {
226
+ confirmLabel,
227
+ backspaceLabel,
228
+ cancelKeyboardLabel,
229
+ keyboardPrefixCls,
230
+ moneyKeyboardWrapProps,
231
+ moneyKeyboardHeader,
232
+ disabledKeys
233
+ } = this.props;
234
+ return /*#__PURE__*/React.createElement(_customKeyboard.default, {
235
+ ref: this.saveRef,
236
+ onClick: this.onKeyboardClick,
237
+ prefixCls: keyboardPrefixCls,
238
+ confirmLabel: confirmLabel,
239
+ backspaceLabel: backspaceLabel,
240
+ cancelKeyboardLabel: cancelKeyboardLabel,
241
+ wrapProps: moneyKeyboardWrapProps,
242
+ header: moneyKeyboardHeader,
243
+ disabledKeys: disabledKeys
244
+ });
245
+ }
246
+ getContainer() {
247
+ const {
248
+ keyboardPrefixCls
249
+ } = this.props;
250
+ let container = document.querySelector("#".concat(keyboardPrefixCls, "-container"));
251
+ if (!container) {
252
+ container = document.createElement('div');
253
+ container.setAttribute('id', "".concat(keyboardPrefixCls, "-container"));
254
+ document.body.appendChild(container);
255
+ }
256
+ this.container = container;
257
+ return this.container;
258
+ }
259
+ renderCustomKeyboard() {
260
+ if (IS_REACT_16) {
261
+ this.keyBoard = /*#__PURE__*/React.createElement(_portal.default, {
262
+ getContainer: () => this.getContainer()
263
+ }, this.getComponent());
264
+ } else {
265
+ customNumberKeyboard = ReactDOM.unstable_renderSubtreeIntoContainer(this, this.getComponent(), this.getContainer());
266
+ }
267
+ }
268
+ renderPortal() {
269
+ if (!IS_REACT_16 || !_exenv.canUseDOM) {
270
+ return null;
271
+ }
272
+ return this.keyBoard;
273
+ }
274
+ render() {
275
+ const {
276
+ placeholder,
277
+ disabled,
278
+ editable,
279
+ moneyKeyboardAlign
280
+ } = this.props;
281
+ const {
282
+ focus,
283
+ value
284
+ } = this.state;
285
+ const preventKeyboard = disabled || !editable;
286
+ const fakeInputCls = (0, _classnames.default)('fake-input', {
287
+ focus,
288
+ 'fake-input-disabled': disabled
289
+ });
290
+ const fakeInputContainerCls = (0, _classnames.default)('fake-input-container', {
291
+ 'fake-input-container-left': moneyKeyboardAlign === 'left'
292
+ });
293
+ return /*#__PURE__*/React.createElement("div", {
294
+ className: fakeInputContainerCls
295
+ }, value === '' &&
296
+ /*#__PURE__*/
297
+ // tslint:disable-next-line:jsx-no-multiline-js
298
+ React.createElement("div", {
299
+ className: "fake-input-placeholder"
300
+ }, placeholder), /*#__PURE__*/React.createElement("div", {
301
+ role: "textbox",
302
+ "aria-label": value || placeholder,
303
+ className: fakeInputCls,
304
+ ref: el => this.inputRef = el,
305
+ onClick: preventKeyboard ? () => {} : this.onFakeInputClick
306
+ }, value), this.renderPortal());
307
+ }
308
+ }
309
+ NumberInput.defaultProps = {
310
+ onChange: () => {},
311
+ onFocus: () => {},
312
+ onBlur: () => {},
313
+ onVirtualKeyboardConfirm: () => {},
314
+ placeholder: '',
315
+ disabled: false,
316
+ editable: true,
317
+ prefixCls: 'am-input',
318
+ keyboardPrefixCls: 'am-number-keyboard',
319
+ autoAdjustHeight: false
320
+ };
321
+ var _default = exports.default = NumberInput;