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
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = exports.DefaultTabBar = void 0;
8
+ var React = _interopRequireWildcard(require("react"));
9
+ var _rmcTabs = require("rmc-tabs");
10
+ require("./index.css");
11
+ class DefaultTabBar extends _rmcTabs.DefaultTabBar {}
12
+ exports.DefaultTabBar = DefaultTabBar;
13
+ DefaultTabBar.defaultProps = {
14
+ ..._rmcTabs.DefaultTabBar.defaultProps,
15
+ prefixCls: 'am-tabs-default-bar'
16
+ };
17
+ class Tabs extends React.PureComponent {
18
+ constructor() {
19
+ super(...arguments);
20
+ this.renderTabBar = props => {
21
+ const {
22
+ renderTab
23
+ } = this.props;
24
+ return /*#__PURE__*/React.createElement(DefaultTabBar, Object.assign({}, props, {
25
+ renderTab: renderTab
26
+ }));
27
+ };
28
+ }
29
+ render() {
30
+ return /*#__PURE__*/React.createElement(_rmcTabs.Tabs, Object.assign({
31
+ renderTabBar: this.renderTabBar
32
+ }, this.props));
33
+ }
34
+ }
35
+ exports.default = Tabs;
36
+ Tabs.DefaultTabBar = DefaultTabBar;
37
+ Tabs.defaultProps = {
38
+ prefixCls: 'am-tabs'
39
+ };
@@ -0,0 +1,235 @@
1
+ @import url('../css/am.css');
2
+
3
+ .am-list .am-list-item.am-textarea-item {
4
+ display: -webkit-box;
5
+ display: -webkit-flex;
6
+ display: -ms-flexbox;
7
+ display: flex;
8
+ -webkit-box-align: start;
9
+ -webkit-align-items: flex-start;
10
+ -ms-flex-align: start;
11
+ align-items: flex-start;
12
+ -webkit-box-sizing: border-box;
13
+ box-sizing: border-box;
14
+ min-height: 44px;
15
+ padding-left: 15px;
16
+ padding-right: 15px;
17
+ border-bottom: 1PX solid #ddd;
18
+ }
19
+
20
+ @media (-webkit-min-device-pixel-ratio: 2),
21
+ (min-resolution: 2dppx) {
22
+ html:not([data-scale]) .am-list .am-list-item.am-textarea-item {
23
+ border-bottom: none;
24
+ }
25
+
26
+ html:not([data-scale]) .am-list .am-list-item.am-textarea-item::after {
27
+ content: '';
28
+ position: absolute;
29
+ background-color: #ddd;
30
+ display: block;
31
+ z-index: 1;
32
+ top: auto;
33
+ right: auto;
34
+ bottom: 0;
35
+ left: 0;
36
+ width: 100%;
37
+ height: 1PX;
38
+ -webkit-transform-origin: 50% 100%;
39
+ -ms-transform-origin: 50% 100%;
40
+ transform-origin: 50% 100%;
41
+ -webkit-transform: scaleY(0.5);
42
+ -ms-transform: scaleY(0.5);
43
+ transform: scaleY(0.5);
44
+ }
45
+ }
46
+
47
+ @media (-webkit-min-device-pixel-ratio: 2) and (-webkit-min-device-pixel-ratio: 3),
48
+ (min-resolution: 2dppx) and (min-resolution: 3dppx) {
49
+ html:not([data-scale]) .am-list .am-list-item.am-textarea-item::after {
50
+ -webkit-transform: scaleY(0.33);
51
+ -ms-transform: scaleY(0.33);
52
+ transform: scaleY(0.33);
53
+ }
54
+ }
55
+
56
+ .am-list .am-list-item.am-textarea-item.am-textarea-item-single-line {
57
+ -webkit-box-align: center;
58
+ -webkit-align-items: center;
59
+ -ms-flex-align: center;
60
+ align-items: center;
61
+ }
62
+
63
+ .am-list .am-list-item.am-textarea-item.am-textarea-item-single-line .am-textarea-label {
64
+ -webkit-align-self: center;
65
+ -ms-flex-item-align: center;
66
+ align-self: center;
67
+ }
68
+
69
+ .am-list .am-list-item.am-textarea-item.am-textarea-item-single-line .am-textarea-control {
70
+ padding-top: 0;
71
+ padding-bottom: 0;
72
+ }
73
+
74
+ .am-list .am-list-item.am-textarea-item.am-textarea-item-single-line .am-textarea-control textarea {
75
+ line-height: 25.5px;
76
+ }
77
+
78
+ .am-list .am-list-item.am-textarea-item.am-textarea-item-single-line .am-textarea-clear {
79
+ margin-top: 0;
80
+ }
81
+
82
+ .am-list .am-list-item.am-textarea-item.am-textarea-item-single-line.am-textarea-error .am-textarea-error-extra {
83
+ margin-top: 0;
84
+ }
85
+
86
+ .am-textarea-label {
87
+ -webkit-align-self: flex-start;
88
+ -ms-flex-item-align: start;
89
+ align-self: flex-start;
90
+ color: #000;
91
+ text-align: left;
92
+ min-height: 44px;
93
+ font-size: 17px;
94
+ line-height: 44px;
95
+ margin-left: 0;
96
+ margin-right: 5px;
97
+ white-space: nowrap;
98
+ overflow: hidden;
99
+ }
100
+
101
+ .am-textarea-label.am-textarea-label-2 {
102
+ width: 34px;
103
+ }
104
+
105
+ .am-textarea-label.am-textarea-label-3 {
106
+ width: 51px;
107
+ }
108
+
109
+ .am-textarea-label.am-textarea-label-4 {
110
+ width: 68px;
111
+ }
112
+
113
+ .am-textarea-label.am-textarea-label-5 {
114
+ width: 85px;
115
+ }
116
+
117
+ .am-textarea-label.am-textarea-label-6 {
118
+ width: 102px;
119
+ }
120
+
121
+ .am-textarea-label.am-textarea-label-7 {
122
+ width: 119px;
123
+ }
124
+
125
+ .am-textarea-control {
126
+ -webkit-box-flex: 1;
127
+ -webkit-flex: 1;
128
+ -ms-flex: 1;
129
+ flex: 1;
130
+ padding-top: 10px;
131
+ padding-bottom: 9px;
132
+ }
133
+
134
+ .am-textarea-control textarea {
135
+ color: #000;
136
+ font-size: 17px;
137
+ line-height: 25.5px;
138
+ -webkit-appearance: none;
139
+ -moz-appearance: none;
140
+ appearance: none;
141
+ width: 100%;
142
+ padding: 0;
143
+ border: 0;
144
+ background-color: transparent;
145
+ overflow: visible;
146
+ display: block;
147
+ resize: none;
148
+ word-break: break-word;
149
+ word-wrap: break-word;
150
+ }
151
+
152
+ .am-textarea-control textarea::-webkit-input-placeholder {
153
+ color: #bbb;
154
+ }
155
+
156
+ .am-textarea-control textarea::-moz-placeholder {
157
+ color: #bbb;
158
+ }
159
+
160
+ .am-textarea-control textarea::-ms-input-placeholder {
161
+ color: #bbb;
162
+ }
163
+
164
+ .am-textarea-control textarea::placeholder {
165
+ color: #bbb;
166
+ }
167
+
168
+ .am-textarea-control textarea:disabled {
169
+ color: #bbb;
170
+ background-color: #fff;
171
+ }
172
+
173
+ .am-textarea-clear {
174
+ display: none;
175
+ width: 21px;
176
+ height: 21px;
177
+ margin-top: 12px;
178
+ border-radius: 50%;
179
+ overflow: hidden;
180
+ font-style: normal;
181
+ color: #fff;
182
+ background-color: #ccc;
183
+ background-repeat: no-repeat;
184
+ background-size: 21px auto;
185
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20fill%3D'%23fff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E");
186
+ }
187
+
188
+ .am-textarea-clear-active {
189
+ background-color: #108ee9;
190
+ }
191
+
192
+ .am-textarea-focus .am-textarea-clear {
193
+ display: block;
194
+ }
195
+
196
+ .am-textarea-has-count {
197
+ padding-bottom: 14px;
198
+ }
199
+
200
+ .am-textarea-count {
201
+ position: absolute;
202
+ bottom: 6px;
203
+ right: 5px;
204
+ color: #bbb;
205
+ font-size: 14px;
206
+ }
207
+
208
+ .am-textarea-count span {
209
+ color: #000;
210
+ }
211
+
212
+ .am-textarea-error .am-textarea-control textarea {
213
+ color: #f50;
214
+ }
215
+
216
+ .am-textarea-error .am-textarea-error-extra {
217
+ margin-top: 12px;
218
+ width: 21px;
219
+ height: 21px;
220
+ margin-left: 8px;
221
+ background-size: 21px 21px;
222
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D'18'%20height%3D'18'%20viewBox%3D'0%200%2018%2018'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cg%20stroke%3D'none'%20stroke-width%3D'1'%20fill%3D'none'%20fill-rule%3D'evenodd'%3E%3Cg%20transform%3D'translate(-300.000000%2C%20-1207.000000)'%20fill%3D'%23FF5500'%3E%3Cg%20id%3D'exclamation-circle-o'%20transform%3D'translate(300.000000%2C%201207.000000)'%3E%3Cpath%20d%3D'M9%2C16.734375%20C10.0441406%2C16.734375%2011.0566406%2C16.5304688%2012.009375%2C16.1279297%20C12.9304688%2C15.7376953%2013.7566406%2C15.1804687%2014.4685547%2C14.4703125%20C15.1787109%2C13.7601563%2015.7376953%2C12.9322266%2016.1261719%2C12.0111328%20C16.5304688%2C11.0566406%2016.734375%2C10.0441406%2016.734375%2C9%20C16.734375%2C7.95585938%2016.5304688%2C6.94335938%2016.1279297%2C5.990625%20C15.7376953%2C5.06953125%2015.1804687%2C4.24335938%2014.4703125%2C3.53144531%20C13.7601563%2C2.82128906%2012.9322266%2C2.26230469%2012.0111328%2C1.87382813%20C11.0566406%2C1.46953125%2010.0441406%2C1.265625%209%2C1.265625%20C7.95585938%2C1.265625%206.94335938%2C1.46953125%205.990625%2C1.87207031%20C5.06953125%2C2.26230469%204.24335938%2C2.81953125%203.53144531%2C3.5296875%20C2.82128906%2C4.23984375%202.26230469%2C5.06777344%201.87382813%2C5.98886719%20C1.46953125%2C6.94335938%201.265625%2C7.95585938%201.265625%2C9%20C1.265625%2C10.0441406%201.46953125%2C11.0566406%201.87207031%2C12.009375%20C2.26230469%2C12.9304688%202.81953125%2C13.7566406%203.5296875%2C14.4685547%20C4.23984375%2C15.1787109%205.06777344%2C15.7376953%205.98886719%2C16.1261719%20C6.94335938%2C16.5304688%207.95585938%2C16.734375%209%2C16.734375%20L9%2C16.734375%20Z%20M9%2C18%20C4.02890625%2C18%200%2C13.9710937%200%2C9%20C0%2C4.02890625%204.02890625%2C0%209%2C0%20C13.9710937%2C0%2018%2C4.02890625%2018%2C9%20C18%2C13.9710937%2013.9710937%2C18%209%2C18%20L9%2C18%20L9%2C18%20Z%20M9%2C6.75%20C8.61152344%2C6.75%208.296875%2C7.06464844%208.296875%2C7.453125%20L8.296875%2C13.9394531%20C8.296875%2C14.3279297%208.61152344%2C14.6425781%209%2C14.6425781%20C9.38847656%2C14.6425781%209.703125%2C14.3279297%209.703125%2C13.9394531%20L9.703125%2C7.453125%20C9.703125%2C7.06464844%209.38847656%2C6.75%209%2C6.75%20L9%2C6.75%20Z%20M8.20898438%2C4.83398438%20C8.20898438%2C5.27085024%208.56313413%2C5.625%209%2C5.625%20C9.43686587%2C5.625%209.79101562%2C5.27085024%209.79101562%2C4.83398438%20C9.79101562%2C4.39711851%209.43686587%2C4.04296875%209%2C4.04296875%20C8.56313413%2C4.04296875%208.20898438%2C4.39711851%208.20898438%2C4.83398438%20L8.20898438%2C4.83398438%20Z'%20id%3D'Shape'%20transform%3D'translate(9.000000%2C%209.000000)%20scale(1%2C%20-1)%20translate(-9.000000%2C%20-9.000000)%20'%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E");
223
+ }
224
+
225
+ .am-textarea-disabled .am-textarea-label {
226
+ color: #bbb;
227
+ }
228
+
229
+ .am-list-body .am-list-item:last-child {
230
+ border-bottom: 0;
231
+ }
232
+
233
+ .am-list-body .am-list-item:last-child:after {
234
+ display: none !important;
235
+ }
@@ -0,0 +1,231 @@
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 _rmcFeedback = _interopRequireDefault(require("rmc-feedback"));
12
+ var _exenv = require("../_util/exenv");
13
+ require("./index.css");
14
+ /* tslint:disable:jsx-no-multiline-js */
15
+
16
+ function noop() {}
17
+ function fixControlledValue(value) {
18
+ if (typeof value === 'undefined' || value === null) {
19
+ return '';
20
+ }
21
+ return value;
22
+ }
23
+ const regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]|\n/g;
24
+ function countSymbols() {
25
+ let text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
26
+ return text.replace(regexAstralSymbols, '_').length;
27
+ }
28
+ class TextareaItem extends React.Component {
29
+ constructor(props) {
30
+ super(props);
31
+ this.focus = () => {
32
+ this.textareaRef.focus();
33
+ };
34
+ this.reAlignHeight = () => {
35
+ const textareaDom = this.textareaRef;
36
+ textareaDom.style.height = ''; // 字数减少时能自动减小高度
37
+ textareaDom.style.height = "".concat(textareaDom.scrollHeight, "px");
38
+ };
39
+ this.onChange = e => {
40
+ const value = e.target.value;
41
+ if ('value' in this.props) {
42
+ this.setState({
43
+ value: this.props.value
44
+ });
45
+ } else {
46
+ this.setState({
47
+ value
48
+ });
49
+ }
50
+ const {
51
+ onChange
52
+ } = this.props;
53
+ if (onChange) {
54
+ onChange(value);
55
+ }
56
+ // 设置 defaultValue 时,用户输入不会触发 componentDidUpdate ,此处手工调用
57
+ this.componentDidUpdate();
58
+ };
59
+ this.onBlur = e => {
60
+ this.debounceTimeout = setTimeout(() => {
61
+ if (document.activeElement !== this.textareaRef) {
62
+ this.setState({
63
+ focus: false
64
+ });
65
+ }
66
+ }, 100);
67
+ const value = e.currentTarget.value;
68
+ if (this.props.onBlur) {
69
+ // fix autoFocus item blur with flash
70
+ setTimeout(() => {
71
+ // fix ios12 wechat browser click failure after input
72
+ if (document.body) {
73
+ // eslint-disable-next-line no-self-assign
74
+ document.body.scrollTop = document.body.scrollTop;
75
+ }
76
+ }, 100);
77
+ this.props.onBlur(value);
78
+ }
79
+ };
80
+ this.onFocus = e => {
81
+ if (this.debounceTimeout) {
82
+ clearTimeout(this.debounceTimeout);
83
+ this.debounceTimeout = null;
84
+ }
85
+ this.setState({
86
+ focus: true
87
+ });
88
+ const value = e.currentTarget.value;
89
+ if (this.props.onFocus) {
90
+ this.props.onFocus(value);
91
+ }
92
+ };
93
+ this.onErrorClick = () => {
94
+ if (this.props.onErrorClick) {
95
+ this.props.onErrorClick();
96
+ }
97
+ };
98
+ this.clearInput = () => {
99
+ this.setState({
100
+ value: ''
101
+ });
102
+ if (this.props.onChange) {
103
+ this.props.onChange('');
104
+ }
105
+ };
106
+ this.state = {
107
+ focus: false,
108
+ value: props.value || props.defaultValue || ''
109
+ };
110
+ }
111
+ componentWillReceiveProps(nextProps) {
112
+ if ('value' in nextProps) {
113
+ this.setState({
114
+ value: fixControlledValue(nextProps.value)
115
+ });
116
+ }
117
+ }
118
+ componentDidMount() {
119
+ if (this.props.autoHeight) {
120
+ this.reAlignHeight();
121
+ }
122
+ }
123
+ componentDidUpdate() {
124
+ if (this.props.autoHeight) {
125
+ this.reAlignHeight();
126
+ }
127
+ }
128
+ componentWillUnmount() {
129
+ if (this.debounceTimeout) {
130
+ clearTimeout(this.debounceTimeout);
131
+ this.debounceTimeout = null;
132
+ }
133
+ }
134
+ render() {
135
+ const {
136
+ prefixCls,
137
+ prefixListCls,
138
+ editable,
139
+ style,
140
+ clear,
141
+ children,
142
+ error,
143
+ className,
144
+ count,
145
+ labelNumber,
146
+ title,
147
+ onErrorClick,
148
+ autoHeight,
149
+ defaultValue,
150
+ ...otherProps
151
+ } = this.props;
152
+ const {
153
+ disabled
154
+ } = otherProps;
155
+ const {
156
+ value,
157
+ focus
158
+ } = this.state;
159
+ const hasCount = count > 0 && this.props.rows > 1;
160
+ const wrapCls = (0, _classnames.default)(className, "".concat(prefixListCls, "-item"), "".concat(prefixCls, "-item"), {
161
+ ["".concat(prefixCls, "-disabled")]: disabled,
162
+ ["".concat(prefixCls, "-item-single-line")]: this.props.rows === 1 && !autoHeight,
163
+ ["".concat(prefixCls, "-error")]: error,
164
+ ["".concat(prefixCls, "-focus")]: focus,
165
+ ["".concat(prefixCls, "-has-count")]: hasCount
166
+ });
167
+ const labelCls = (0, _classnames.default)("".concat(prefixCls, "-label"), {
168
+ ["".concat(prefixCls, "-label-2")]: labelNumber === 2,
169
+ ["".concat(prefixCls, "-label-3")]: labelNumber === 3,
170
+ ["".concat(prefixCls, "-label-4")]: labelNumber === 4,
171
+ ["".concat(prefixCls, "-label-5")]: labelNumber === 5,
172
+ ["".concat(prefixCls, "-label-6")]: labelNumber === 6,
173
+ ["".concat(prefixCls, "-label-7")]: labelNumber === 7
174
+ });
175
+ const characterLength = countSymbols(value);
176
+ const lengthCtrlProps = {};
177
+ if (count > 0) {
178
+ // Note: If in the iOS environment of dev-tools, It will fail.
179
+ if (_exenv.IS_IOS) {
180
+ const entValue = value ? value.replace(regexAstralSymbols, '_') : '';
181
+ const entLen = entValue ? entValue.split('_').length - 1 : 0;
182
+ lengthCtrlProps.maxLength = count + entLen - characterLength + (value ? value.length : 0);
183
+ } else {
184
+ lengthCtrlProps.maxLength = count - characterLength + (value ? value.length : 0);
185
+ }
186
+ }
187
+ return /*#__PURE__*/React.createElement("div", {
188
+ className: wrapCls
189
+ }, title && /*#__PURE__*/React.createElement("div", {
190
+ className: labelCls
191
+ }, title), /*#__PURE__*/React.createElement("div", {
192
+ className: "".concat(prefixCls, "-control")
193
+ }, /*#__PURE__*/React.createElement("textarea", Object.assign({
194
+ ref: el => this.textareaRef = el
195
+ }, lengthCtrlProps, otherProps, {
196
+ value: value,
197
+ onChange: this.onChange,
198
+ onBlur: this.onBlur,
199
+ onFocus: this.onFocus,
200
+ readOnly: !editable,
201
+ style: style
202
+ }))), clear && editable && value && characterLength > 0 && /*#__PURE__*/React.createElement(_rmcFeedback.default, {
203
+ activeClassName: "".concat(prefixCls, "-clear-active")
204
+ }, /*#__PURE__*/React.createElement("div", {
205
+ className: "".concat(prefixCls, "-clear"),
206
+ onClick: this.clearInput
207
+ })), error && /*#__PURE__*/React.createElement("div", {
208
+ className: "".concat(prefixCls, "-error-extra"),
209
+ onClick: this.onErrorClick
210
+ }), hasCount && /*#__PURE__*/React.createElement("span", {
211
+ className: "".concat(prefixCls, "-count")
212
+ }, /*#__PURE__*/React.createElement("span", null, value ? characterLength : 0), "/", count));
213
+ }
214
+ }
215
+ exports.default = TextareaItem;
216
+ TextareaItem.defaultProps = {
217
+ prefixCls: 'am-textarea',
218
+ prefixListCls: 'am-list',
219
+ autoHeight: false,
220
+ editable: true,
221
+ disabled: false,
222
+ placeholder: '',
223
+ clear: false,
224
+ rows: 1,
225
+ onChange: noop,
226
+ onBlur: noop,
227
+ onFocus: noop,
228
+ onErrorClick: noop,
229
+ error: false,
230
+ labelNumber: 5
231
+ };
@@ -0,0 +1,67 @@
1
+ @import url('../css/am.css');
2
+
3
+ .am-toast {
4
+ position: fixed;
5
+ width: 100%;
6
+ z-index: 1999;
7
+ font-size: 14px;
8
+ text-align: center;
9
+ }
10
+
11
+ .am-toast>span {
12
+ max-width: 50%;
13
+ }
14
+
15
+ .am-toast.am-toast-mask {
16
+ height: 100%;
17
+ display: -webkit-box;
18
+ display: -webkit-flex;
19
+ display: -ms-flexbox;
20
+ display: flex;
21
+ -webkit-box-pack: center;
22
+ -webkit-justify-content: center;
23
+ -ms-flex-pack: center;
24
+ justify-content: center;
25
+ -webkit-box-align: center;
26
+ -webkit-align-items: center;
27
+ -ms-flex-align: center;
28
+ align-items: center;
29
+ left: 0;
30
+ top: 0;
31
+ -webkit-transform: translateZ(1px);
32
+ transform: translateZ(1px);
33
+ }
34
+
35
+ .am-toast.am-toast-nomask {
36
+ position: fixed;
37
+ max-width: 50%;
38
+ width: auto;
39
+ left: 50%;
40
+ top: 50%;
41
+ -webkit-transform: translateZ(1px);
42
+ transform: translateZ(1px);
43
+ }
44
+
45
+ .am-toast.am-toast-nomask .am-toast-notice {
46
+ -webkit-transform: translateX(-50%) translateY(-50%);
47
+ -ms-transform: translateX(-50%) translateY(-50%);
48
+ transform: translateX(-50%) translateY(-50%);
49
+ }
50
+
51
+ .am-toast-notice-content .am-toast-text {
52
+ min-width: 60px;
53
+ border-radius: 3px;
54
+ color: #fff;
55
+ background-color: rgba(58, 58, 58, 0.9);
56
+ line-height: 1.5;
57
+ padding: 9px 15px;
58
+ }
59
+
60
+ .am-toast-notice-content .am-toast-text.am-toast-text-icon {
61
+ border-radius: 5px;
62
+ padding: 15px 15px;
63
+ }
64
+
65
+ .am-toast-notice-content .am-toast-text.am-toast-text-icon .am-toast-text-info {
66
+ margin-top: 6px;
67
+ }
@@ -0,0 +1,131 @@
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 _rmcNotification = _interopRequireDefault(require("rmc-notification"));
12
+ var _Icon = _interopRequireDefault(require("../Icon"));
13
+ require("./index.css");
14
+ const SHORT = 3;
15
+ const config = {
16
+ duration: SHORT,
17
+ mask: true
18
+ };
19
+ let messageInstance;
20
+ let messageNeedHide;
21
+ const prefixCls = 'am-toast';
22
+ function getMessageInstance(mask, callback) {
23
+ _rmcNotification.default.newInstance({
24
+ prefixCls,
25
+ style: {},
26
+ // clear rmc-notification default style
27
+ transitionName: 'am-fade',
28
+ className: (0, _classnames.default)({
29
+ ["".concat(prefixCls, "-mask")]: mask,
30
+ ["".concat(prefixCls, "-nomask")]: !mask
31
+ })
32
+ }, notification => callback && callback(notification));
33
+ }
34
+ function notice(content, type) {
35
+ let duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : config.duration;
36
+ let onClose = arguments.length > 3 ? arguments[3] : undefined;
37
+ let mask = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : config.mask;
38
+ const iconTypes = {
39
+ info: '',
40
+ success: 'success',
41
+ fail: 'fail',
42
+ offline: 'dislike',
43
+ loading: 'loading'
44
+ };
45
+ const iconType = iconTypes[type];
46
+ messageNeedHide = false;
47
+ getMessageInstance(mask, notification => {
48
+ if (!notification) {
49
+ return;
50
+ }
51
+ if (messageInstance) {
52
+ messageInstance.destroy();
53
+ messageInstance = null;
54
+ }
55
+ if (messageNeedHide) {
56
+ notification.destroy();
57
+ messageNeedHide = false;
58
+ return;
59
+ }
60
+ messageInstance = notification;
61
+ notification.notice({
62
+ duration,
63
+ style: {},
64
+ content: iconType ? /*#__PURE__*/React.createElement("div", {
65
+ className: "".concat(prefixCls, "-text ").concat(prefixCls, "-text-icon"),
66
+ role: "alert",
67
+ "aria-live": "assertive"
68
+ }, /*#__PURE__*/React.createElement(_Icon.default, {
69
+ type: iconType,
70
+ size: "lg"
71
+ }), /*#__PURE__*/React.createElement("div", {
72
+ className: "".concat(prefixCls, "-text-info")
73
+ }, content)) : /*#__PURE__*/React.createElement("div", {
74
+ className: "".concat(prefixCls, "-text"),
75
+ role: "alert",
76
+ "aria-live": "assertive"
77
+ }, /*#__PURE__*/React.createElement("div", null, content)),
78
+ closable: true,
79
+ onClose() {
80
+ if (onClose) {
81
+ onClose();
82
+ }
83
+ notification.destroy();
84
+ notification = null;
85
+ messageInstance = null;
86
+ }
87
+ });
88
+ });
89
+ }
90
+ const Toast = {
91
+ SHORT,
92
+ LONG: 8,
93
+ show(content, duration, mask) {
94
+ return notice(content, 'info', duration, () => {}, mask);
95
+ },
96
+ info(content, duration, onClose, mask) {
97
+ return notice(content, 'info', duration, onClose, mask);
98
+ },
99
+ success(content, duration, onClose, mask) {
100
+ return notice(content, 'success', duration, onClose, mask);
101
+ },
102
+ fail(content, duration, onClose, mask) {
103
+ return notice(content, 'fail', duration, onClose, mask);
104
+ },
105
+ offline(content, duration, onClose, mask) {
106
+ return notice(content, 'offline', duration, onClose, mask);
107
+ },
108
+ loading(content, duration, onClose, mask) {
109
+ return notice(content, 'loading', duration, onClose, mask);
110
+ },
111
+ hide() {
112
+ if (messageInstance) {
113
+ messageInstance.destroy();
114
+ messageInstance = null;
115
+ } else {
116
+ messageNeedHide = true;
117
+ }
118
+ },
119
+ config() {
120
+ let conf = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
121
+ const {
122
+ duration = SHORT,
123
+ mask
124
+ } = conf;
125
+ config.duration = duration;
126
+ if (mask === false) {
127
+ config.mask = false;
128
+ }
129
+ }
130
+ };
131
+ var _default = exports.default = Toast;