assui 3.2.42 → 3.2.44

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 (525) hide show
  1. package/es/a-select/index.d.ts +5 -5
  2. package/es/a-select/index.js +59 -88
  3. package/es/a-select/style/index.css +47 -52
  4. package/es/a-select/style/index.js +2 -2
  5. package/es/a-select/style/index.less +1 -2
  6. package/es/area-text/index.d.ts +2 -2
  7. package/es/area-text/index.js +5 -9
  8. package/es/area-text/style/index.js +1 -1
  9. package/es/beautiful-dnd/index.js +1 -1
  10. package/es/button-drawer/index.d.ts +8 -10
  11. package/es/button-drawer/index.js +61 -94
  12. package/es/button-drawer/style/index.js +1 -1
  13. package/es/button-modal/index.d.ts +8 -10
  14. package/es/button-modal/index.js +60 -93
  15. package/es/button-modal/style/index.js +1 -1
  16. package/es/client-only/index.d.ts +2 -2
  17. package/es/client-only/index.js +1 -1
  18. package/es/client-only/useClientOnly.js +22 -24
  19. package/es/color-select/index.d.ts +18 -18
  20. package/es/color-select/index.js +68 -113
  21. package/es/color-select/style/index.css +47 -52
  22. package/es/color-select/style/index.js +1 -1
  23. package/es/complex-val-select/index.d.ts +13 -25
  24. package/es/complex-val-select/index.js +54 -71
  25. package/es/complex-val-select/style/index.js +1 -1
  26. package/es/condition-input/index.d.ts +13 -21
  27. package/es/condition-input/index.js +51 -67
  28. package/es/condition-input/parse2RegexOption.d.ts +7 -10
  29. package/es/condition-input/parse2RegexOption.js +21 -31
  30. package/es/condition-input/style/index.js +1 -1
  31. package/es/condition-select/index.d.ts +1 -7
  32. package/es/condition-select/index.js +85 -141
  33. package/es/condition-select/style/index.js +3 -3
  34. package/es/condition-select/types.d.ts +14 -16
  35. package/es/condition-select/types.js +1 -1
  36. package/es/condition-select/utils/index.d.ts +2 -5
  37. package/es/condition-select/utils/index.js +2 -2
  38. package/es/condition-select-input/index.d.ts +29 -29
  39. package/es/condition-select-input/index.js +106 -196
  40. package/es/condition-select-input/style/index.d.ts +1 -1
  41. package/es/condition-select-input/style/index.js +3 -3
  42. package/es/config-provider/context.d.ts +1 -1
  43. package/es/config-provider/context.js +2 -2
  44. package/es/config-provider/index.d.ts +3 -27
  45. package/es/config-provider/index.js +5 -9
  46. package/es/copy-to-clipboard/index.d.ts +18 -20
  47. package/es/copy-to-clipboard/index.js +44 -63
  48. package/es/copy-to-clipboard/style/index.css +14 -23
  49. package/es/copy-to-clipboard/style/index.js +1 -1
  50. package/es/count-down/index.d.ts +3 -3
  51. package/es/count-down/index.js +26 -44
  52. package/es/count-up/index.d.ts +2 -2
  53. package/es/count-up/index.js +1 -1
  54. package/es/flex/index.d.ts +18 -21
  55. package/es/flex/index.js +32 -64
  56. package/es/flex/style/index.css +47 -52
  57. package/es/flex/style/index.js +1 -1
  58. package/es/flex/utils/gapSize.js +1 -1
  59. package/es/flex/utils/index.d.ts +3 -27
  60. package/es/flex/utils/index.js +19 -53
  61. package/es/highlight-textarea/HighlighedContents.d.ts +3 -6
  62. package/es/highlight-textarea/HighlighedContents.js +5 -9
  63. package/es/highlight-textarea/extractSpansOfClasses.d.ts +10 -10
  64. package/es/highlight-textarea/extractSpansOfClasses.js +45 -62
  65. package/es/highlight-textarea/getRanges.js +34 -41
  66. package/es/highlight-textarea/getType.js +2 -6
  67. package/es/highlight-textarea/index.d.ts +7 -14
  68. package/es/highlight-textarea/index.js +70 -114
  69. package/es/highlight-textarea/style/index.css +55 -125
  70. package/es/highlight-textarea/style/index.js +1 -1
  71. package/es/highlight-textarea/types.d.ts +7 -26
  72. package/es/highlight-textarea/types.js +1 -1
  73. package/es/highlight-words/index.d.ts +2 -6
  74. package/es/highlight-words/index.js +1 -1
  75. package/es/img-crop/EasyCrop.d.ts +2 -6
  76. package/es/img-crop/EasyCrop.js +79 -104
  77. package/es/img-crop/getCroppedImg.d.ts +3 -8
  78. package/es/img-crop/getCroppedImg.js +118 -155
  79. package/es/img-crop/index.d.ts +29 -29
  80. package/es/img-crop/index.js +340 -490
  81. package/es/img-crop/style/index.css +47 -52
  82. package/es/img-crop/style/index.d.ts +1 -1
  83. package/es/img-crop/style/index.js +3 -3
  84. package/es/index.d.ts +56 -62
  85. package/es/index.js +29 -29
  86. package/es/json-editor/index.d.ts +5 -7
  87. package/es/json-editor/index.js +62 -91
  88. package/es/json-editor/style/index.js +1 -1
  89. package/es/keep-tab/index.d.ts +17 -17
  90. package/es/keep-tab/index.js +78 -125
  91. package/es/keep-tab/style/index.css +32 -72
  92. package/es/keep-tab/style/index.js +1 -1
  93. package/es/label-auto-complete/index.d.ts +3 -3
  94. package/es/label-auto-complete/index.js +58 -82
  95. package/es/label-auto-complete/style/index.css +50 -61
  96. package/es/label-auto-complete/style/index.js +2 -2
  97. package/es/label-condition-input/index.d.ts +11 -12
  98. package/es/label-condition-input/index.js +62 -100
  99. package/es/label-condition-input/style/index.css +47 -52
  100. package/es/label-condition-input/style/index.js +1 -1
  101. package/es/label-condition-select-input/index.d.ts +33 -35
  102. package/es/label-condition-select-input/index.js +109 -198
  103. package/es/label-condition-select-input/style/index.css +47 -52
  104. package/es/label-condition-select-input/style/index.d.ts +1 -1
  105. package/es/label-condition-select-input/style/index.js +2 -2
  106. package/es/label-customize-range-picker/defaultRadioList.d.ts +28 -34
  107. package/es/label-customize-range-picker/defaultRadioList.js +114 -206
  108. package/es/label-customize-range-picker/index.d.ts +24 -27
  109. package/es/label-customize-range-picker/index.js +141 -300
  110. package/es/label-customize-range-picker/style/index.css +47 -52
  111. package/es/label-customize-range-picker/style/index.d.ts +2 -2
  112. package/es/label-customize-range-picker/style/index.js +4 -4
  113. package/es/label-customize-range-picker/utils/index.d.ts +3 -9
  114. package/es/label-customize-range-picker/utils/index.js +29 -57
  115. package/es/label-date-picker/index.d.ts +2 -2
  116. package/es/label-date-picker/index.js +57 -81
  117. package/es/label-date-picker/style/index.css +47 -52
  118. package/es/label-date-picker/style/index.js +2 -2
  119. package/es/label-input/index.d.ts +25 -29
  120. package/es/label-input/index.js +80 -122
  121. package/es/label-input/style/index.css +47 -52
  122. package/es/label-input/style/index.js +1 -1
  123. package/es/label-number-input/index.d.ts +6 -6
  124. package/es/label-number-input/index.js +63 -101
  125. package/es/label-number-input/style/index.css +48 -54
  126. package/es/label-number-input/style/index.js +1 -1
  127. package/es/label-range-number/index.d.ts +17 -17
  128. package/es/label-range-number/index.js +95 -156
  129. package/es/label-range-number/style/index.css +47 -52
  130. package/es/label-range-number/style/index.js +1 -1
  131. package/es/label-range-picker/index.d.ts +3 -3
  132. package/es/label-range-picker/index.js +71 -103
  133. package/es/label-range-picker/style/index.css +47 -52
  134. package/es/label-range-picker/style/index.js +2 -2
  135. package/es/label-select/index.d.ts +5 -7
  136. package/es/label-select/index.js +69 -100
  137. package/es/label-select/style/index.css +51 -65
  138. package/es/label-select/style/index.js +2 -2
  139. package/es/label-text-area/index.d.ts +17 -21
  140. package/es/label-text-area/index.js +64 -97
  141. package/es/label-text-area/style/index.css +47 -52
  142. package/es/label-text-area/style/index.js +1 -1
  143. package/es/label-tree-select/index.d.ts +7 -8
  144. package/es/label-tree-select/index.js +61 -98
  145. package/es/label-tree-select/style/index.css +48 -55
  146. package/es/label-tree-select/style/index.js +2 -2
  147. package/es/messages/ar_EG.d.ts +24 -24
  148. package/es/messages/ar_EG.js +5 -5
  149. package/es/messages/bg_BG.d.ts +24 -24
  150. package/es/messages/bg_BG.js +5 -5
  151. package/es/messages/cs_CZ.d.ts +24 -24
  152. package/es/messages/cs_CZ.js +5 -5
  153. package/es/messages/de_DE.d.ts +24 -24
  154. package/es/messages/de_DE.js +5 -5
  155. package/es/messages/en_US.d.ts +24 -24
  156. package/es/messages/en_US.js +5 -5
  157. package/es/messages/es_ES.d.ts +24 -24
  158. package/es/messages/es_ES.js +5 -5
  159. package/es/messages/fi_FI.d.ts +24 -24
  160. package/es/messages/fi_FI.js +5 -5
  161. package/es/messages/fr_FR.d.ts +24 -24
  162. package/es/messages/fr_FR.js +5 -5
  163. package/es/messages/id_ID.d.ts +24 -24
  164. package/es/messages/id_ID.js +5 -5
  165. package/es/messages/index.d.ts +23 -27
  166. package/es/messages/index.js +3 -3
  167. package/es/messages/it_IT.d.ts +24 -24
  168. package/es/messages/it_IT.js +5 -5
  169. package/es/messages/ja_JP.d.ts +24 -24
  170. package/es/messages/ja_JP.js +5 -5
  171. package/es/messages/ko_KR.d.ts +24 -24
  172. package/es/messages/ko_KR.js +5 -5
  173. package/es/messages/ms_MY.d.ts +24 -24
  174. package/es/messages/ms_MY.js +5 -5
  175. package/es/messages/nb_NO.d.ts +24 -24
  176. package/es/messages/nb_NO.js +5 -5
  177. package/es/messages/nl_NL.d.ts +24 -24
  178. package/es/messages/nl_NL.js +5 -5
  179. package/es/messages/pt_PT.d.ts +24 -24
  180. package/es/messages/pt_PT.js +5 -5
  181. package/es/messages/ro_RO.d.ts +24 -24
  182. package/es/messages/ro_RO.js +5 -5
  183. package/es/messages/ru_RU.d.ts +24 -24
  184. package/es/messages/ru_RU.js +5 -5
  185. package/es/messages/sv_SE.d.ts +24 -24
  186. package/es/messages/sv_SE.js +5 -5
  187. package/es/messages/th_TH.d.ts +24 -24
  188. package/es/messages/th_TH.js +5 -5
  189. package/es/messages/ug_UG.d.ts +24 -24
  190. package/es/messages/ug_UG.js +5 -5
  191. package/es/messages/vi_VN.d.ts +24 -24
  192. package/es/messages/vi_VN.js +5 -5
  193. package/es/messages/zh_CN.d.ts +24 -24
  194. package/es/messages/zh_CN.js +5 -5
  195. package/es/messages/zh_TW.d.ts +24 -24
  196. package/es/messages/zh_TW.js +5 -5
  197. package/es/multipart-upload/getMultipartUploadHandler.d.ts +1 -3
  198. package/es/multipart-upload/getMultipartUploadHandler.js +6 -8
  199. package/es/multipart-upload/index.d.ts +33 -39
  200. package/es/multipart-upload/index.js +121 -217
  201. package/es/multipart-upload/parse2RegexOption.d.ts +7 -10
  202. package/es/multipart-upload/parse2RegexOption.js +21 -31
  203. package/es/multipart-upload/style/index.css +47 -52
  204. package/es/multipart-upload/style/index.js +2 -2
  205. package/es/number-format-input/index.js +25 -36
  206. package/es/number-format-input/style/index.js +1 -1
  207. package/es/number-input/const/dataTypeEnum.d.ts +2 -2
  208. package/es/number-input/const/dataTypeEnum.js +1 -1
  209. package/es/number-input/const/numberType.d.ts +2 -2
  210. package/es/number-input/const/numberType.js +1 -1
  211. package/es/number-input/index.d.ts +35 -37
  212. package/es/number-input/index.js +65 -94
  213. package/es/number-input/style/index.js +1 -1
  214. package/es/number-input/utils.d.ts +6 -15
  215. package/es/number-input/utils.js +2 -2
  216. package/es/rc-echart/core.d.ts +13 -13
  217. package/es/rc-echart/core.js +19 -28
  218. package/es/rc-echart/index.d.ts +12 -12
  219. package/es/rc-echart/index.js +16 -26
  220. package/es/rc-motion/index.d.ts +2 -14
  221. package/es/rc-motion/index.js +1 -1
  222. package/es/rc-qrcode/index.d.ts +8 -11
  223. package/es/rc-qrcode/index.js +17 -21
  224. package/es/rc-qrcode/useQrcode.d.ts +2 -5
  225. package/es/rc-qrcode/useQrcode.js +33 -38
  226. package/es/rc-transition-group/index.js +1 -1
  227. package/es/resizable/index.d.ts +1 -10
  228. package/es/resizable/index.js +1 -1
  229. package/es/resizable/style/index.js +1 -1
  230. package/es/rich-text-editor/index.d.ts +18 -18
  231. package/es/rich-text-editor/index.js +45 -78
  232. package/es/rich-text-editor/lang/zh_CN.d.ts +404 -404
  233. package/es/rich-text-editor/lang/zh_CN.js +393 -416
  234. package/es/rich-text-editor/plugins/code/index.js +20 -25
  235. package/es/rich-text-editor/style/index.css +47 -52
  236. package/es/rich-text-editor/style/index.js +1 -1
  237. package/es/single-img-upload/index.d.ts +8 -8
  238. package/es/single-img-upload/index.js +230 -338
  239. package/es/single-img-upload/style/index.css +47 -52
  240. package/es/single-img-upload/style/index.js +4 -4
  241. package/es/sortable-hoc/index.js +1 -1
  242. package/es/split-pane/index.d.ts +53 -53
  243. package/es/split-pane/index.js +13 -17
  244. package/es/split-pane/style/index.js +1 -1
  245. package/es/step-number-input/const/countType.d.ts +2 -2
  246. package/es/step-number-input/const/countType.js +1 -1
  247. package/es/step-number-input/const/numberType.d.ts +2 -2
  248. package/es/step-number-input/const/numberType.js +1 -1
  249. package/es/step-number-input/index.d.ts +31 -31
  250. package/es/step-number-input/index.js +85 -135
  251. package/es/step-number-input/style/index.css +47 -52
  252. package/es/step-number-input/style/index.js +2 -2
  253. package/es/table-col/index.d.ts +3 -3
  254. package/es/table-col/index.js +7 -11
  255. package/es/table-col/style/index.js +1 -1
  256. package/es/text-area/index.d.ts +8 -13
  257. package/es/text-area/index.js +48 -64
  258. package/es/text-area/style/index.js +1 -1
  259. package/es/text-input/index.d.ts +1 -3
  260. package/es/text-input/index.js +58 -76
  261. package/es/text-input/style/index.css +53 -123
  262. package/es/text-input/style/index.js +1 -1
  263. package/lib/a-select/index.d.ts +5 -5
  264. package/lib/a-select/index.js +69 -102
  265. package/lib/a-select/style/index.css +47 -52
  266. package/lib/a-select/style/index.js +5 -5
  267. package/lib/a-select/style/index.less +1 -2
  268. package/lib/area-text/index.d.ts +2 -2
  269. package/lib/area-text/index.js +13 -21
  270. package/lib/area-text/style/index.js +4 -4
  271. package/lib/beautiful-dnd/index.js +37 -52
  272. package/lib/button-drawer/index.d.ts +8 -10
  273. package/lib/button-drawer/index.js +101 -153
  274. package/lib/button-drawer/style/index.js +4 -4
  275. package/lib/button-modal/index.d.ts +8 -10
  276. package/lib/button-modal/index.js +99 -151
  277. package/lib/button-modal/style/index.js +4 -4
  278. package/lib/client-only/index.d.ts +2 -2
  279. package/lib/client-only/index.js +5 -5
  280. package/lib/client-only/useClientOnly.js +26 -28
  281. package/lib/color-select/index.d.ts +18 -18
  282. package/lib/color-select/index.js +112 -180
  283. package/lib/color-select/style/index.css +47 -52
  284. package/lib/color-select/style/index.js +5 -5
  285. package/lib/complex-val-select/index.d.ts +13 -25
  286. package/lib/complex-val-select/index.js +102 -140
  287. package/lib/complex-val-select/style/index.js +4 -4
  288. package/lib/condition-input/index.d.ts +13 -21
  289. package/lib/condition-input/index.js +96 -131
  290. package/lib/condition-input/parse2RegexOption.d.ts +7 -10
  291. package/lib/condition-input/parse2RegexOption.js +33 -47
  292. package/lib/condition-input/style/index.js +4 -4
  293. package/lib/condition-select/index.d.ts +1 -7
  294. package/lib/condition-select/index.js +94 -154
  295. package/lib/condition-select/style/index.js +6 -6
  296. package/lib/condition-select/types.d.ts +14 -16
  297. package/lib/condition-select/types.js +4 -4
  298. package/lib/condition-select/utils/index.d.ts +2 -5
  299. package/lib/condition-select/utils/index.js +5 -5
  300. package/lib/condition-select-input/index.d.ts +29 -29
  301. package/lib/condition-select-input/index.js +150 -259
  302. package/lib/condition-select-input/style/index.d.ts +1 -1
  303. package/lib/condition-select-input/style/index.js +6 -6
  304. package/lib/config-provider/context.d.ts +1 -1
  305. package/lib/config-provider/context.js +11 -15
  306. package/lib/config-provider/index.d.ts +3 -27
  307. package/lib/config-provider/index.js +61 -69
  308. package/lib/copy-to-clipboard/index.d.ts +18 -20
  309. package/lib/copy-to-clipboard/index.js +86 -124
  310. package/lib/copy-to-clipboard/style/index.css +14 -23
  311. package/lib/copy-to-clipboard/style/index.js +4 -4
  312. package/lib/count-down/index.d.ts +3 -3
  313. package/lib/count-down/index.js +36 -58
  314. package/lib/count-up/index.d.ts +2 -2
  315. package/lib/count-up/index.js +39 -54
  316. package/lib/flex/index.d.ts +18 -21
  317. package/lib/flex/index.js +42 -78
  318. package/lib/flex/style/index.css +47 -52
  319. package/lib/flex/style/index.js +4 -4
  320. package/lib/flex/utils/gapSize.js +4 -4
  321. package/lib/flex/utils/index.d.ts +3 -27
  322. package/lib/flex/utils/index.js +27 -65
  323. package/lib/highlight-textarea/HighlighedContents.d.ts +3 -6
  324. package/lib/highlight-textarea/HighlighedContents.js +16 -24
  325. package/lib/highlight-textarea/extractSpansOfClasses.d.ts +10 -10
  326. package/lib/highlight-textarea/extractSpansOfClasses.js +54 -75
  327. package/lib/highlight-textarea/getRanges.js +44 -55
  328. package/lib/highlight-textarea/getType.js +6 -10
  329. package/lib/highlight-textarea/index.d.ts +7 -14
  330. package/lib/highlight-textarea/index.js +113 -176
  331. package/lib/highlight-textarea/style/index.css +55 -125
  332. package/lib/highlight-textarea/style/index.js +4 -4
  333. package/lib/highlight-textarea/types.d.ts +7 -26
  334. package/lib/highlight-textarea/types.js +4 -4
  335. package/lib/highlight-words/index.d.ts +2 -6
  336. package/lib/highlight-words/index.js +9 -13
  337. package/lib/img-crop/EasyCrop.d.ts +2 -6
  338. package/lib/img-crop/EasyCrop.js +120 -164
  339. package/lib/img-crop/getCroppedImg.d.ts +3 -8
  340. package/lib/img-crop/getCroppedImg.js +121 -158
  341. package/lib/img-crop/index.d.ts +29 -29
  342. package/lib/img-crop/index.js +383 -555
  343. package/lib/img-crop/style/index.css +47 -52
  344. package/lib/img-crop/style/index.d.ts +1 -1
  345. package/lib/img-crop/style/index.js +6 -6
  346. package/lib/index.d.ts +56 -62
  347. package/lib/index.js +202 -254
  348. package/lib/json-editor/index.d.ts +5 -7
  349. package/lib/json-editor/index.js +108 -156
  350. package/lib/json-editor/style/index.js +5 -5
  351. package/lib/keep-tab/index.d.ts +17 -17
  352. package/lib/keep-tab/index.js +120 -186
  353. package/lib/keep-tab/style/index.css +32 -72
  354. package/lib/keep-tab/style/index.js +4 -4
  355. package/lib/label-auto-complete/index.d.ts +3 -3
  356. package/lib/label-auto-complete/index.js +71 -103
  357. package/lib/label-auto-complete/style/index.css +50 -61
  358. package/lib/label-auto-complete/style/index.js +5 -5
  359. package/lib/label-condition-input/index.d.ts +11 -12
  360. package/lib/label-condition-input/index.js +77 -119
  361. package/lib/label-condition-input/style/index.css +47 -52
  362. package/lib/label-condition-input/style/index.js +4 -4
  363. package/lib/label-condition-select-input/index.d.ts +33 -35
  364. package/lib/label-condition-select-input/index.js +154 -262
  365. package/lib/label-condition-select-input/style/index.css +47 -52
  366. package/lib/label-condition-select-input/style/index.d.ts +1 -1
  367. package/lib/label-condition-select-input/style/index.js +6 -6
  368. package/lib/label-customize-range-picker/defaultRadioList.d.ts +28 -34
  369. package/lib/label-customize-range-picker/defaultRadioList.js +156 -297
  370. package/lib/label-customize-range-picker/index.d.ts +24 -27
  371. package/lib/label-customize-range-picker/index.js +186 -363
  372. package/lib/label-customize-range-picker/style/index.css +47 -52
  373. package/lib/label-customize-range-picker/style/index.d.ts +2 -2
  374. package/lib/label-customize-range-picker/style/index.js +8 -8
  375. package/lib/label-customize-range-picker/utils/index.d.ts +3 -9
  376. package/lib/label-customize-range-picker/utils/index.js +38 -75
  377. package/lib/label-date-picker/index.d.ts +2 -2
  378. package/lib/label-date-picker/index.js +68 -96
  379. package/lib/label-date-picker/style/index.css +47 -52
  380. package/lib/label-date-picker/style/index.js +5 -5
  381. package/lib/label-input/index.d.ts +25 -29
  382. package/lib/label-input/index.js +96 -142
  383. package/lib/label-input/style/index.css +47 -52
  384. package/lib/label-input/style/index.js +4 -4
  385. package/lib/label-number-input/index.d.ts +6 -6
  386. package/lib/label-number-input/index.js +78 -122
  387. package/lib/label-number-input/style/index.css +48 -54
  388. package/lib/label-number-input/style/index.js +4 -4
  389. package/lib/label-range-number/index.d.ts +17 -17
  390. package/lib/label-range-number/index.js +107 -172
  391. package/lib/label-range-number/style/index.css +47 -52
  392. package/lib/label-range-number/style/index.js +4 -4
  393. package/lib/label-range-picker/index.d.ts +3 -3
  394. package/lib/label-range-picker/index.js +83 -122
  395. package/lib/label-range-picker/style/index.css +47 -52
  396. package/lib/label-range-picker/style/index.js +5 -5
  397. package/lib/label-select/index.d.ts +5 -7
  398. package/lib/label-select/index.js +83 -130
  399. package/lib/label-select/style/index.css +51 -65
  400. package/lib/label-select/style/index.js +5 -5
  401. package/lib/label-text-area/index.d.ts +17 -21
  402. package/lib/label-text-area/index.js +77 -114
  403. package/lib/label-text-area/style/index.css +47 -52
  404. package/lib/label-text-area/style/index.js +4 -4
  405. package/lib/label-tree-select/index.d.ts +7 -8
  406. package/lib/label-tree-select/index.js +72 -113
  407. package/lib/label-tree-select/style/index.css +48 -55
  408. package/lib/label-tree-select/style/index.js +5 -5
  409. package/lib/messages/ar_EG.d.ts +24 -24
  410. package/lib/messages/ar_EG.js +8 -8
  411. package/lib/messages/bg_BG.d.ts +24 -24
  412. package/lib/messages/bg_BG.js +8 -8
  413. package/lib/messages/cs_CZ.d.ts +24 -24
  414. package/lib/messages/cs_CZ.js +8 -8
  415. package/lib/messages/de_DE.d.ts +24 -24
  416. package/lib/messages/de_DE.js +8 -8
  417. package/lib/messages/en_US.d.ts +24 -24
  418. package/lib/messages/en_US.js +8 -8
  419. package/lib/messages/es_ES.d.ts +24 -24
  420. package/lib/messages/es_ES.js +8 -8
  421. package/lib/messages/fi_FI.d.ts +24 -24
  422. package/lib/messages/fi_FI.js +8 -8
  423. package/lib/messages/fr_FR.d.ts +24 -24
  424. package/lib/messages/fr_FR.js +8 -8
  425. package/lib/messages/id_ID.d.ts +24 -24
  426. package/lib/messages/id_ID.js +8 -8
  427. package/lib/messages/index.d.ts +23 -27
  428. package/lib/messages/index.js +7 -7
  429. package/lib/messages/it_IT.d.ts +24 -24
  430. package/lib/messages/it_IT.js +8 -8
  431. package/lib/messages/ja_JP.d.ts +24 -24
  432. package/lib/messages/ja_JP.js +8 -8
  433. package/lib/messages/ko_KR.d.ts +24 -24
  434. package/lib/messages/ko_KR.js +8 -8
  435. package/lib/messages/ms_MY.d.ts +24 -24
  436. package/lib/messages/ms_MY.js +8 -8
  437. package/lib/messages/nb_NO.d.ts +24 -24
  438. package/lib/messages/nb_NO.js +8 -8
  439. package/lib/messages/nl_NL.d.ts +24 -24
  440. package/lib/messages/nl_NL.js +8 -8
  441. package/lib/messages/pt_PT.d.ts +24 -24
  442. package/lib/messages/pt_PT.js +8 -8
  443. package/lib/messages/ro_RO.d.ts +24 -24
  444. package/lib/messages/ro_RO.js +8 -8
  445. package/lib/messages/ru_RU.d.ts +24 -24
  446. package/lib/messages/ru_RU.js +8 -8
  447. package/lib/messages/sv_SE.d.ts +24 -24
  448. package/lib/messages/sv_SE.js +8 -8
  449. package/lib/messages/th_TH.d.ts +24 -24
  450. package/lib/messages/th_TH.js +8 -8
  451. package/lib/messages/ug_UG.d.ts +24 -24
  452. package/lib/messages/ug_UG.js +8 -8
  453. package/lib/messages/vi_VN.d.ts +24 -24
  454. package/lib/messages/vi_VN.js +8 -8
  455. package/lib/messages/zh_CN.d.ts +24 -24
  456. package/lib/messages/zh_CN.js +8 -8
  457. package/lib/messages/zh_TW.d.ts +24 -24
  458. package/lib/messages/zh_TW.js +8 -8
  459. package/lib/multipart-upload/getMultipartUploadHandler.d.ts +1 -3
  460. package/lib/multipart-upload/getMultipartUploadHandler.js +10 -12
  461. package/lib/multipart-upload/index.d.ts +33 -39
  462. package/lib/multipart-upload/index.js +165 -286
  463. package/lib/multipart-upload/parse2RegexOption.d.ts +7 -10
  464. package/lib/multipart-upload/parse2RegexOption.js +33 -47
  465. package/lib/multipart-upload/style/index.css +47 -52
  466. package/lib/multipart-upload/style/index.js +5 -5
  467. package/lib/number-format-input/index.js +34 -49
  468. package/lib/number-format-input/style/index.js +4 -4
  469. package/lib/number-input/const/dataTypeEnum.d.ts +2 -2
  470. package/lib/number-input/const/dataTypeEnum.js +4 -4
  471. package/lib/number-input/const/numberType.d.ts +2 -2
  472. package/lib/number-input/const/numberType.js +4 -4
  473. package/lib/number-input/index.d.ts +35 -37
  474. package/lib/number-input/index.js +105 -153
  475. package/lib/number-input/style/index.js +4 -4
  476. package/lib/number-input/utils.d.ts +6 -15
  477. package/lib/number-input/utils.js +5 -5
  478. package/lib/rc-echart/core.d.ts +13 -13
  479. package/lib/rc-echart/core.js +60 -88
  480. package/lib/rc-echart/index.d.ts +12 -12
  481. package/lib/rc-echart/index.js +57 -86
  482. package/lib/rc-motion/index.d.ts +2 -14
  483. package/lib/rc-motion/index.js +9 -13
  484. package/lib/rc-qrcode/index.d.ts +8 -11
  485. package/lib/rc-qrcode/index.js +62 -85
  486. package/lib/rc-qrcode/useQrcode.d.ts +2 -5
  487. package/lib/rc-qrcode/useQrcode.js +42 -51
  488. package/lib/rc-transition-group/index.js +37 -52
  489. package/lib/resizable/index.d.ts +1 -10
  490. package/lib/resizable/index.js +9 -9
  491. package/lib/resizable/style/index.js +4 -4
  492. package/lib/rich-text-editor/index.d.ts +18 -18
  493. package/lib/rich-text-editor/index.js +70 -107
  494. package/lib/rich-text-editor/lang/zh_CN.d.ts +404 -404
  495. package/lib/rich-text-editor/lang/zh_CN.js +397 -420
  496. package/lib/rich-text-editor/plugins/code/index.js +29 -38
  497. package/lib/rich-text-editor/style/index.css +47 -52
  498. package/lib/rich-text-editor/style/index.js +4 -4
  499. package/lib/single-img-upload/index.d.ts +8 -8
  500. package/lib/single-img-upload/index.js +273 -400
  501. package/lib/single-img-upload/style/index.css +47 -52
  502. package/lib/single-img-upload/style/index.js +7 -7
  503. package/lib/sortable-hoc/index.js +37 -52
  504. package/lib/split-pane/index.d.ts +53 -53
  505. package/lib/split-pane/index.js +22 -33
  506. package/lib/split-pane/style/index.js +4 -4
  507. package/lib/step-number-input/const/countType.d.ts +2 -2
  508. package/lib/step-number-input/const/countType.js +4 -4
  509. package/lib/step-number-input/const/numberType.d.ts +2 -2
  510. package/lib/step-number-input/const/numberType.js +4 -4
  511. package/lib/step-number-input/index.d.ts +31 -31
  512. package/lib/step-number-input/index.js +133 -204
  513. package/lib/step-number-input/style/index.css +47 -52
  514. package/lib/step-number-input/style/index.js +5 -5
  515. package/lib/table-col/index.d.ts +3 -3
  516. package/lib/table-col/index.js +15 -23
  517. package/lib/table-col/style/index.js +4 -4
  518. package/lib/text-area/index.d.ts +8 -13
  519. package/lib/text-area/index.js +89 -124
  520. package/lib/text-area/style/index.js +4 -4
  521. package/lib/text-input/index.d.ts +1 -3
  522. package/lib/text-input/index.js +67 -89
  523. package/lib/text-input/style/index.css +53 -123
  524. package/lib/text-input/style/index.js +4 -4
  525. package/package.json +4 -4
@@ -1,269 +1,211 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- var __assign =
4
- (this && this.__assign) ||
5
- function () {
6
- __assign =
7
- Object.assign ||
8
- function (t) {
9
- for (var s, i = 1, n = arguments.length; i < n; i++) {
10
- s = arguments[i];
11
- for (var p in s) {
12
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
13
- }
14
- }
15
- return t;
16
- };
17
- return __assign.apply(this, arguments);
18
- };
19
- var __createBinding =
20
- (this && this.__createBinding) ||
21
- (Object.create
22
- ? function (o, m, k, k2) {
23
- if (k2 === undefined) k2 = k;
24
- var desc = Object.getOwnPropertyDescriptor(m, k);
25
- if (
26
- !desc ||
27
- ('get' in desc ? !m.__esModule : desc.writable || desc.configurable)
28
- ) {
29
- desc = {
30
- enumerable: true,
31
- get: function get() {
32
- return m[k];
33
- },
34
- };
35
- }
36
- Object.defineProperty(o, k2, desc);
37
- }
38
- : function (o, m, k, k2) {
39
- if (k2 === undefined) k2 = k;
40
- o[k2] = m[k];
41
- });
42
- var __setModuleDefault =
43
- (this && this.__setModuleDefault) ||
44
- (Object.create
45
- ? function (o, v) {
46
- Object.defineProperty(o, 'default', {
47
- enumerable: true,
48
- value: v,
49
- });
3
+ var __assign = this && this.__assign || function () {
4
+ __assign = Object.assign || function (t) {
5
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
6
+ s = arguments[i];
7
+ for (var p in s) {
8
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
50
9
  }
51
- : function (o, v) {
52
- o['default'] = v;
53
- });
54
- var __importStar =
55
- (this && this.__importStar) ||
56
- function (mod) {
57
- if (mod && mod.__esModule) return mod;
58
- var result = {};
59
- if (mod != null)
60
- for (var k in mod) {
61
- if (k !== 'default' && Object.prototype.hasOwnProperty.call(mod, k))
62
- __createBinding(result, mod, k);
63
- }
64
- __setModuleDefault(result, mod);
65
- return result;
66
- };
67
- var __awaiter =
68
- (this && this.__awaiter) ||
69
- function (thisArg, _arguments, P, generator) {
70
- function adopt(value) {
71
- return value instanceof P
72
- ? value
73
- : new P(function (resolve) {
74
- resolve(value);
75
- });
76
10
  }
77
- return new (P || (P = Promise))(function (resolve, reject) {
78
- function fulfilled(value) {
79
- try {
80
- step(generator.next(value));
81
- } catch (e) {
82
- reject(e);
83
- }
11
+ return t;
12
+ };
13
+ return __assign.apply(this, arguments);
14
+ };
15
+ var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ var desc = Object.getOwnPropertyDescriptor(m, k);
18
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
+ desc = {
20
+ enumerable: true,
21
+ get: function get() {
22
+ return m[k];
84
23
  }
85
- function rejected(value) {
86
- try {
87
- step(generator['throw'](value));
88
- } catch (e) {
89
- reject(e);
90
- }
24
+ };
25
+ }
26
+ Object.defineProperty(o, k2, desc);
27
+ } : function (o, m, k, k2) {
28
+ if (k2 === undefined) k2 = k;
29
+ o[k2] = m[k];
30
+ });
31
+ var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {
32
+ Object.defineProperty(o, "default", {
33
+ enumerable: true,
34
+ value: v
35
+ });
36
+ } : function (o, v) {
37
+ o["default"] = v;
38
+ });
39
+ var __importStar = this && this.__importStar || function (mod) {
40
+ if (mod && mod.__esModule) return mod;
41
+ var result = {};
42
+ if (mod != null) for (var k in mod) {
43
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
44
+ }
45
+ __setModuleDefault(result, mod);
46
+ return result;
47
+ };
48
+ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
49
+ function adopt(value) {
50
+ return value instanceof P ? value : new P(function (resolve) {
51
+ resolve(value);
52
+ });
53
+ }
54
+ return new (P || (P = Promise))(function (resolve, reject) {
55
+ function fulfilled(value) {
56
+ try {
57
+ step(generator.next(value));
58
+ } catch (e) {
59
+ reject(e);
91
60
  }
92
- function step(result) {
93
- result.done
94
- ? resolve(result.value)
95
- : adopt(result.value).then(fulfilled, rejected);
61
+ }
62
+ function rejected(value) {
63
+ try {
64
+ step(generator["throw"](value));
65
+ } catch (e) {
66
+ reject(e);
96
67
  }
97
- step((generator = generator.apply(thisArg, _arguments || [])).next());
98
- });
99
- };
100
- var __generator =
101
- (this && this.__generator) ||
102
- function (thisArg, body) {
103
- var _ = {
104
- label: 0,
105
- sent: function sent() {
106
- if (t[0] & 1) throw t[1];
107
- return t[1];
108
- },
109
- trys: [],
110
- ops: [],
111
- },
112
- f,
113
- y,
114
- t,
115
- g = Object.create((typeof Iterator === 'function' ? Iterator : Object).prototype);
116
- return (
117
- (g.next = verb(0)),
118
- (g['throw'] = verb(1)),
119
- (g['return'] = verb(2)),
120
- typeof Symbol === 'function' &&
121
- (g[Symbol.iterator] = function () {
122
- return this;
123
- }),
124
- g
125
- );
126
- function verb(n) {
127
- return function (v) {
128
- return step([n, v]);
129
- };
130
68
  }
131
- function step(op) {
132
- if (f) throw new TypeError('Generator is already executing.');
133
- while ((g && ((g = 0), op[0] && (_ = 0)), _)) {
134
- try {
135
- if (
136
- ((f = 1),
137
- y &&
138
- (t =
139
- op[0] & 2
140
- ? y['return']
141
- : op[0]
142
- ? y['throw'] || ((t = y['return']) && t.call(y), 0)
143
- : y.next) &&
144
- !(t = t.call(y, op[1])).done)
145
- )
146
- return t;
147
- if (((y = 0), t)) op = [op[0] & 2, t.value];
148
- switch (op[0]) {
149
- case 0:
150
- case 1:
69
+ function step(result) {
70
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
71
+ }
72
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
73
+ });
74
+ };
75
+ var __generator = this && this.__generator || function (thisArg, body) {
76
+ var _ = {
77
+ label: 0,
78
+ sent: function sent() {
79
+ if (t[0] & 1) throw t[1];
80
+ return t[1];
81
+ },
82
+ trys: [],
83
+ ops: []
84
+ },
85
+ f,
86
+ y,
87
+ t,
88
+ g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
89
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function () {
90
+ return this;
91
+ }), g;
92
+ function verb(n) {
93
+ return function (v) {
94
+ return step([n, v]);
95
+ };
96
+ }
97
+ function step(op) {
98
+ if (f) throw new TypeError("Generator is already executing.");
99
+ while (g && (g = 0, op[0] && (_ = 0)), _) {
100
+ try {
101
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
102
+ if (y = 0, t) op = [op[0] & 2, t.value];
103
+ switch (op[0]) {
104
+ case 0:
105
+ case 1:
106
+ t = op;
107
+ break;
108
+ case 4:
109
+ _.label++;
110
+ return {
111
+ value: op[1],
112
+ done: false
113
+ };
114
+ case 5:
115
+ _.label++;
116
+ y = op[1];
117
+ op = [0];
118
+ continue;
119
+ case 7:
120
+ op = _.ops.pop();
121
+ _.trys.pop();
122
+ continue;
123
+ default:
124
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
125
+ _ = 0;
126
+ continue;
127
+ }
128
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
129
+ _.label = op[1];
130
+ break;
131
+ }
132
+ if (op[0] === 6 && _.label < t[1]) {
133
+ _.label = t[1];
151
134
  t = op;
152
135
  break;
153
- case 4:
154
- _.label++;
155
- return {
156
- value: op[1],
157
- done: false,
158
- };
159
- case 5:
160
- _.label++;
161
- y = op[1];
162
- op = [0];
163
- continue;
164
- case 7:
165
- op = _.ops.pop();
166
- _.trys.pop();
167
- continue;
168
- default:
169
- if (
170
- !((t = _.trys), (t = t.length > 0 && t[t.length - 1])) &&
171
- (op[0] === 6 || op[0] === 2)
172
- ) {
173
- _ = 0;
174
- continue;
175
- }
176
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
177
- _.label = op[1];
178
- break;
179
- }
180
- if (op[0] === 6 && _.label < t[1]) {
181
- _.label = t[1];
182
- t = op;
183
- break;
184
- }
185
- if (t && _.label < t[2]) {
186
- _.label = t[2];
187
- _.ops.push(op);
188
- break;
189
- }
190
- if (t[2]) _.ops.pop();
191
- _.trys.pop();
192
- continue;
193
- }
194
- op = body.call(thisArg, _);
195
- } catch (e) {
196
- op = [6, e];
197
- y = 0;
198
- } finally {
199
- f = t = 0;
136
+ }
137
+ if (t && _.label < t[2]) {
138
+ _.label = t[2];
139
+ _.ops.push(op);
140
+ break;
141
+ }
142
+ if (t[2]) _.ops.pop();
143
+ _.trys.pop();
144
+ continue;
200
145
  }
146
+ op = body.call(thisArg, _);
147
+ } catch (e) {
148
+ op = [6, e];
149
+ y = 0;
150
+ } finally {
151
+ f = t = 0;
201
152
  }
202
- if (op[0] & 5) throw op[1];
203
- return {
204
- value: op[0] ? op[1] : void 0,
205
- done: true,
206
- };
207
153
  }
208
- };
209
- var __rest =
210
- (this && this.__rest) ||
211
- function (s, e) {
212
- var t = {};
213
- for (var p in s) {
214
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
154
+ if (op[0] & 5) throw op[1];
155
+ return {
156
+ value: op[0] ? op[1] : void 0,
157
+ done: true
158
+ };
159
+ }
160
+ };
161
+ var __rest = this && this.__rest || function (s, e) {
162
+ var t = {};
163
+ for (var p in s) {
164
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
165
+ }
166
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
167
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
168
+ }
169
+ return t;
170
+ };
171
+ var __read = this && this.__read || function (o, n) {
172
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
173
+ if (!m) return o;
174
+ var i = m.call(o),
175
+ r,
176
+ ar = [],
177
+ e;
178
+ try {
179
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
180
+ ar.push(r.value);
215
181
  }
216
- if (s != null && typeof Object.getOwnPropertySymbols === 'function')
217
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
218
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
219
- t[p[i]] = s[p[i]];
220
- }
221
- return t;
222
- };
223
- var __read =
224
- (this && this.__read) ||
225
- function (o, n) {
226
- var m = typeof Symbol === 'function' && o[Symbol.iterator];
227
- if (!m) return o;
228
- var i = m.call(o),
229
- r,
230
- ar = [],
231
- e;
182
+ } catch (error) {
183
+ e = {
184
+ error: error
185
+ };
186
+ } finally {
232
187
  try {
233
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
234
- ar.push(r.value);
235
- }
236
- } catch (error) {
237
- e = {
238
- error: error,
239
- };
188
+ if (r && !r.done && (m = i["return"])) m.call(i);
240
189
  } finally {
241
- try {
242
- if (r && !r.done && (m = i['return'])) m.call(i);
243
- } finally {
244
- if (e) throw e.error;
245
- }
190
+ if (e) throw e.error;
246
191
  }
247
- return ar;
248
- };
249
- var __importDefault =
250
- (this && this.__importDefault) ||
251
- function (mod) {
252
- return mod && mod.__esModule
253
- ? mod
254
- : {
255
- default: mod,
256
- };
192
+ }
193
+ return ar;
194
+ };
195
+ var __importDefault = this && this.__importDefault || function (mod) {
196
+ return mod && mod.__esModule ? mod : {
197
+ "default": mod
257
198
  };
258
- Object.defineProperty(exports, '__esModule', {
259
- value: true,
199
+ };
200
+ Object.defineProperty(exports, "__esModule", {
201
+ value: true
260
202
  });
261
- var modal_1 = __importDefault(require('antd/lib/modal'));
262
- var slider_1 = __importDefault(require('antd/lib/slider'));
263
- var React = __importStar(require('react'));
264
- var EasyCrop_1 = __importDefault(require('./EasyCrop'));
265
- var getCroppedImg_1 = __importDefault(require('./getCroppedImg'));
266
- require('./style/index.less');
203
+ var modal_1 = __importDefault(require("antd/lib/modal"));
204
+ var slider_1 = __importDefault(require("antd/lib/slider"));
205
+ var React = __importStar(require("react"));
206
+ var EasyCrop_1 = __importDefault(require("./EasyCrop"));
207
+ var getCroppedImg_1 = __importDefault(require("./getCroppedImg"));
208
+ require("./style/index.less");
267
209
  var noop = function noop() {};
268
210
  var ZOOM_STEP = 0.1;
269
211
  var MIN_ROTATE = 0;
@@ -300,8 +242,8 @@ var ImgCrop = function ImgCrop(props) {
300
242
  zipImg = props.zipImg,
301
243
  children = props.children,
302
244
  cropperProps = props.cropperProps;
303
- var pkg = ''.concat(prefix, '-img-crop');
304
- var MEDIA_CLASS = ''.concat(pkg, '-media');
245
+ var pkg = "".concat(prefix, "-img-crop");
246
+ var MEDIA_CLASS = "".concat(pkg, "-media");
305
247
  var hasZoom = zoom === true;
306
248
  var hasRotate = rotate === true;
307
249
  var _m = __read(React.useState(''), 2),
@@ -321,38 +263,35 @@ var ImgCrop = function ImgCrop(props) {
321
263
  /**
322
264
  * Upload
323
265
  */
324
- var renderUpload = React.useCallback(
325
- function () {
326
- var upload = Array.isArray(children) ? children[0] : children;
327
- var _a = upload.props,
328
- beforeUpload = _a.beforeUpload,
329
- accept = _a.accept,
330
- restUploadProps = __rest(_a, ['beforeUpload', 'accept']);
331
- beforeUploadRef.current = beforeUpload;
332
- return __assign(__assign({}, upload), {
333
- props: __assign(__assign({}, restUploadProps), {
334
- accept: accept || 'image/*',
335
- beforeUpload: function beforeUpload(file, fileList) {
336
- return new Promise(function (resolve, reject) {
337
- if (beforeCrop && !beforeCrop(file, fileList)) {
338
- reject();
339
- return;
340
- }
341
- fileRef.current = file;
342
- resolveRef.current = resolve;
343
- rejectRef.current = reject;
344
- var reader = new FileReader();
345
- reader.addEventListener('load', function () {
346
- setSrc(reader.result);
347
- });
348
- reader.readAsDataURL(file);
266
+ var renderUpload = React.useCallback(function () {
267
+ var upload = Array.isArray(children) ? children[0] : children;
268
+ var _a = upload.props,
269
+ beforeUpload = _a.beforeUpload,
270
+ accept = _a.accept,
271
+ restUploadProps = __rest(_a, ["beforeUpload", "accept"]);
272
+ beforeUploadRef.current = beforeUpload;
273
+ return __assign(__assign({}, upload), {
274
+ props: __assign(__assign({}, restUploadProps), {
275
+ accept: accept || 'image/*',
276
+ beforeUpload: function beforeUpload(file, fileList) {
277
+ return new Promise(function (resolve, reject) {
278
+ if (beforeCrop && !beforeCrop(file, fileList)) {
279
+ reject();
280
+ return;
281
+ }
282
+ fileRef.current = file;
283
+ resolveRef.current = resolve;
284
+ rejectRef.current = reject;
285
+ var reader = new FileReader();
286
+ reader.addEventListener('load', function () {
287
+ setSrc(reader.result);
349
288
  });
350
- },
351
- }),
352
- });
353
- },
354
- [beforeCrop, children],
355
- );
289
+ reader.readAsDataURL(file);
290
+ });
291
+ }
292
+ })
293
+ });
294
+ }, [beforeCrop, children]);
356
295
  /**
357
296
  * EasyCrop
358
297
  */
@@ -366,290 +305,179 @@ var ImgCrop = function ImgCrop(props) {
366
305
  var isMaxZoom = zoomVal + ZOOM_STEP > maxZoom;
367
306
  var isMinRotate = rotateVal === MIN_ROTATE;
368
307
  var isMaxRotate = rotateVal === MAX_ROTATE;
369
- var subZoomVal = React.useCallback(
370
- function () {
371
- if (!isMinZoom) setZoomVal(zoomVal - ZOOM_STEP);
372
- },
373
- [isMinZoom, zoomVal],
374
- );
375
- var addZoomVal = React.useCallback(
376
- function () {
377
- if (!isMaxZoom) setZoomVal(zoomVal + ZOOM_STEP);
378
- },
379
- [isMaxZoom, zoomVal],
380
- );
381
- var subRotateVal = React.useCallback(
382
- function () {
383
- if (!isMinRotate) setRotateVal(rotateVal - ROTATE_STEP);
384
- },
385
- [isMinRotate, rotateVal],
386
- );
387
- var addRotateVal = React.useCallback(
388
- function () {
389
- if (!isMaxRotate) setRotateVal(rotateVal + ROTATE_STEP);
390
- },
391
- [isMaxRotate, rotateVal],
392
- );
308
+ var subZoomVal = React.useCallback(function () {
309
+ if (!isMinZoom) setZoomVal(zoomVal - ZOOM_STEP);
310
+ }, [isMinZoom, zoomVal]);
311
+ var addZoomVal = React.useCallback(function () {
312
+ if (!isMaxZoom) setZoomVal(zoomVal + ZOOM_STEP);
313
+ }, [isMaxZoom, zoomVal]);
314
+ var subRotateVal = React.useCallback(function () {
315
+ if (!isMinRotate) setRotateVal(rotateVal - ROTATE_STEP);
316
+ }, [isMinRotate, rotateVal]);
317
+ var addRotateVal = React.useCallback(function () {
318
+ if (!isMaxRotate) setRotateVal(rotateVal + ROTATE_STEP);
319
+ }, [isMaxRotate, rotateVal]);
393
320
  /**
394
321
  * Modal
395
322
  */
396
- var modalProps = React.useMemo(
397
- function () {
398
- var obj = {
399
- width: modalWidth,
400
- okText: modalOk,
401
- cancelText: modalCancel,
402
- closable: closable,
403
- };
404
- return obj;
405
- },
406
- [modalCancel, modalOk, modalWidth],
407
- );
323
+ var modalProps = React.useMemo(function () {
324
+ var obj = {
325
+ width: modalWidth,
326
+ okText: modalOk,
327
+ cancelText: modalCancel,
328
+ closable: closable
329
+ };
330
+ return obj;
331
+ }, [modalCancel, modalOk, modalWidth]);
408
332
  var onClose = React.useCallback(function () {
409
333
  setSrc('');
410
334
  setZoomVal(1);
411
335
  setRotateVal(0);
412
336
  }, []);
413
- var onOk = React.useCallback(
414
- function () {
415
- return __awaiter(void 0, void 0, void 0, function () {
416
- var naturalImg,
417
- naturalWidth,
418
- naturalHeight,
419
- canvas,
420
- ctx,
421
- maxLen,
422
- halfMax,
423
- left,
424
- top,
425
- maxImgData,
426
- _a,
427
- width,
428
- height,
429
- x,
430
- y,
431
- _b,
432
- type,
433
- name,
434
- uid;
435
- return __generator(this, function (_c) {
436
- onClose();
437
- naturalImg = document.querySelector('.'.concat(MEDIA_CLASS));
438
- (naturalWidth = naturalImg.naturalWidth),
439
- (naturalHeight = naturalImg.naturalHeight);
440
- canvas = document.createElement('canvas');
441
- ctx = canvas.getContext('2d');
442
- maxLen = Math.sqrt(Math.pow(naturalWidth, 2) + Math.pow(naturalHeight, 2));
443
- canvas.width = maxLen;
444
- canvas.height = maxLen;
445
- // rotate the image
446
- if (hasRotate && rotateVal > 0 && rotateVal < 360) {
447
- halfMax = maxLen / 2;
448
- ctx === null || ctx === void 0 ? void 0 : ctx.translate(halfMax, halfMax);
449
- ctx === null || ctx === void 0
450
- ? void 0
451
- : ctx.rotate((rotateVal * Math.PI) / 180);
452
- ctx === null || ctx === void 0 ? void 0 : ctx.translate(-halfMax, -halfMax);
453
- }
454
- ctx.fillStyle = fillColor;
455
- ctx === null || ctx === void 0
456
- ? void 0
457
- : ctx.fillRect(0, 0, canvas.width, canvas.height);
458
- left = (maxLen - naturalWidth) / 2;
459
- top = (maxLen - naturalHeight) / 2;
460
- ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(naturalImg, left, top);
461
- maxImgData =
462
- ctx === null || ctx === void 0
463
- ? void 0
464
- : ctx.getImageData(0, 0, maxLen, maxLen);
465
- (_a = cropPixelsRef.current),
466
- (width = _a.width),
467
- (height = _a.height),
468
- (x = _a.x),
469
- (y = _a.y);
470
- canvas.width = width;
471
- canvas.height = height;
472
- ctx.putImageData(maxImgData, Math.round(-left - x), Math.round(-top - y));
473
- (_b = fileRef.current), (type = _b.type), (name = _b.name), (uid = _b.uid);
474
- canvas.toBlob(
475
- function (blob) {
476
- return __awaiter(void 0, void 0, void 0, function () {
477
- var newFile, url, imgUrl, fileObj, res, passedFile, fileType, err_1;
478
- return __generator(this, function (_a) {
479
- switch (_a.label) {
480
- case 0:
481
- newFile = new File([blob], name, {
482
- type: type,
483
- });
484
- if (!zipImg) return [3 /*break*/, 2];
485
- url = window.URL || window.webkitURL;
486
- imgUrl = url.createObjectURL(newFile);
487
- return [
488
- 4 /*yield*/,
489
- (0, getCroppedImg_1['default'])(imgUrl, zipImg, name, type),
490
- ];
491
- case 1:
492
- fileObj = _a.sent().fileObj;
493
- newFile = fileObj;
494
- _a.label = 2;
495
- case 2:
496
- newFile.uid = uid;
497
- if (typeof beforeUploadRef.current !== 'function')
498
- return [2 /*return*/, resolveRef.current(newFile)];
499
- res = beforeUploadRef.current(newFile, [newFile]);
500
- if (!(typeof res !== 'boolean' && !res)) return [3 /*break*/, 3];
501
- console.error('beforeUpload must return a boolean or Promise');
502
- return [3 /*break*/, 7];
503
- case 3:
504
- if (res === true)
505
- return [2 /*return*/, resolveRef.current(newFile)];
506
- if (res === false)
507
- return [2 /*return*/, rejectRef.current('not upload')];
508
- if (!(res && typeof res.then === 'function'))
509
- return [3 /*break*/, 7];
510
- _a.label = 4;
511
- case 4:
512
- _a.trys.push([4, 6, , 7]);
513
- return [4 /*yield*/, res];
514
- case 5:
515
- passedFile = _a.sent();
516
- fileType = Object.prototype.toString.call(passedFile);
517
- if (fileType === '[object File]' || fileType === '[object Blob]')
518
- newFile = passedFile;
519
- resolveRef.current(newFile);
520
- return [3 /*break*/, 7];
521
- case 6:
522
- err_1 = _a.sent();
523
- rejectRef.current(err_1);
524
- return [3 /*break*/, 7];
525
- case 7:
526
- return [2 /*return*/, null];
527
- }
528
- });
529
- });
530
- },
531
- type,
532
- quality,
533
- );
534
- return [2 /*return*/];
535
- });
337
+ var onOk = React.useCallback(function () {
338
+ return __awaiter(void 0, void 0, void 0, function () {
339
+ var naturalImg, naturalWidth, naturalHeight, canvas, ctx, maxLen, halfMax, left, top, maxImgData, _a, width, height, x, y, _b, type, name, uid;
340
+ return __generator(this, function (_c) {
341
+ onClose();
342
+ naturalImg = document.querySelector(".".concat(MEDIA_CLASS));
343
+ naturalWidth = naturalImg.naturalWidth, naturalHeight = naturalImg.naturalHeight;
344
+ canvas = document.createElement('canvas');
345
+ ctx = canvas.getContext('2d');
346
+ maxLen = Math.sqrt(Math.pow(naturalWidth, 2) + Math.pow(naturalHeight, 2));
347
+ canvas.width = maxLen;
348
+ canvas.height = maxLen;
349
+ // rotate the image
350
+ if (hasRotate && rotateVal > 0 && rotateVal < 360) {
351
+ halfMax = maxLen / 2;
352
+ ctx === null || ctx === void 0 ? void 0 : ctx.translate(halfMax, halfMax);
353
+ ctx === null || ctx === void 0 ? void 0 : ctx.rotate(rotateVal * Math.PI / 180);
354
+ ctx === null || ctx === void 0 ? void 0 : ctx.translate(-halfMax, -halfMax);
355
+ }
356
+ ctx.fillStyle = fillColor;
357
+ ctx === null || ctx === void 0 ? void 0 : ctx.fillRect(0, 0, canvas.width, canvas.height);
358
+ left = (maxLen - naturalWidth) / 2;
359
+ top = (maxLen - naturalHeight) / 2;
360
+ ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(naturalImg, left, top);
361
+ maxImgData = ctx === null || ctx === void 0 ? void 0 : ctx.getImageData(0, 0, maxLen, maxLen);
362
+ _a = cropPixelsRef.current, width = _a.width, height = _a.height, x = _a.x, y = _a.y;
363
+ canvas.width = width;
364
+ canvas.height = height;
365
+ ctx.putImageData(maxImgData, Math.round(-left - x), Math.round(-top - y));
366
+ _b = fileRef.current, type = _b.type, name = _b.name, uid = _b.uid;
367
+ canvas.toBlob(function (blob) {
368
+ return __awaiter(void 0, void 0, void 0, function () {
369
+ var newFile, url, imgUrl, fileObj, res, passedFile, fileType, err_1;
370
+ return __generator(this, function (_a) {
371
+ switch (_a.label) {
372
+ case 0:
373
+ newFile = new File([blob], name, {
374
+ type: type
375
+ });
376
+ if (!zipImg) return [3 /*break*/, 2];
377
+ url = window.URL || window.webkitURL;
378
+ imgUrl = url.createObjectURL(newFile);
379
+ return [4 /*yield*/, (0, getCroppedImg_1["default"])(imgUrl, zipImg, name, type)];
380
+ case 1:
381
+ fileObj = _a.sent().fileObj;
382
+ newFile = fileObj;
383
+ _a.label = 2;
384
+ case 2:
385
+ newFile.uid = uid;
386
+ if (typeof beforeUploadRef.current !== 'function') return [2 /*return*/, resolveRef.current(newFile)];
387
+ res = beforeUploadRef.current(newFile, [newFile]);
388
+ if (!(typeof res !== 'boolean' && !res)) return [3 /*break*/, 3];
389
+ console.error('beforeUpload must return a boolean or Promise');
390
+ return [3 /*break*/, 7];
391
+ case 3:
392
+ if (res === true) return [2 /*return*/, resolveRef.current(newFile)];
393
+ if (res === false) return [2 /*return*/, rejectRef.current('not upload')];
394
+ if (!(res && typeof res.then === 'function')) return [3 /*break*/, 7];
395
+ _a.label = 4;
396
+ case 4:
397
+ _a.trys.push([4, 6,, 7]);
398
+ return [4 /*yield*/, res];
399
+ case 5:
400
+ passedFile = _a.sent();
401
+ fileType = Object.prototype.toString.call(passedFile);
402
+ if (fileType === '[object File]' || fileType === '[object Blob]') newFile = passedFile;
403
+ resolveRef.current(newFile);
404
+ return [3 /*break*/, 7];
405
+ case 6:
406
+ err_1 = _a.sent();
407
+ rejectRef.current(err_1);
408
+ return [3 /*break*/, 7];
409
+ case 7:
410
+ return [2 /*return*/, null];
411
+ }
412
+ });
413
+ });
414
+ }, type, quality);
415
+ return [2 /*return*/];
536
416
  });
537
- },
538
- [hasRotate, onClose, quality, rotateVal],
539
- );
417
+ });
418
+ }, [hasRotate, onClose, quality, rotateVal]);
540
419
  var renderComponent = function renderComponent(titleOfModal) {
541
- return React.createElement(
542
- React.Fragment,
543
- null,
544
- renderUpload(),
545
- src &&
546
- React.createElement(
547
- modal_1['default'],
548
- __assign(
549
- {
550
- open: true,
551
- wrapClassName: ''.concat(pkg, '-modal'),
552
- title: titleOfModal,
553
- onOk: onOk,
554
- onCancel: onClose,
555
- maskClosable: false,
556
- destroyOnClose: true,
557
- centered: true,
558
- },
559
- modalProps,
560
- ),
561
- React.createElement(
562
- EasyCrop_1['default'],
563
- __assign(
564
- {
565
- image: src,
566
- aspect: aspect,
567
- cropShape: shape,
568
- showGrid: grid,
569
- zoomWithScroll: hasZoom,
570
- zoom: zoomVal,
571
- rotation: rotateVal,
572
- onZoomChange: setZoomVal,
573
- onRotationChange: setRotateVal,
574
- minZoom: minZoom,
575
- maxZoom: maxZoom,
576
- onComplete: onComplete,
577
- classes: {
578
- containerClassName: ''.concat(pkg, '-container'),
579
- mediaClassName: MEDIA_CLASS,
580
- },
581
- },
582
- cropperProps,
583
- ),
584
- ),
585
- hasZoom &&
586
- React.createElement(
587
- 'div',
588
- {
589
- className: ''.concat(pkg, '-control zoom'),
590
- },
591
- React.createElement(
592
- 'button',
593
- {
594
- type: 'button',
595
- onClick: subZoomVal,
596
- disabled: isMinZoom,
597
- },
598
- '\uFF0D',
599
- ),
600
- React.createElement(slider_1['default'], {
601
- min: minZoom,
602
- max: maxZoom,
603
- step: ZOOM_STEP,
604
- value: zoomVal,
605
- onChange: setZoomVal,
606
- }),
607
- React.createElement(
608
- 'button',
609
- {
610
- type: 'button',
611
- onClick: addZoomVal,
612
- disabled: isMaxZoom,
613
- },
614
- '\uFF0B',
615
- ),
616
- ),
617
- hasRotate &&
618
- React.createElement(
619
- 'div',
620
- {
621
- className: ''.concat(pkg, '-control rotate'),
622
- },
623
- React.createElement(
624
- 'button',
625
- {
626
- type: 'button',
627
- onClick: subRotateVal,
628
- disabled: isMinRotate,
629
- },
630
- '\u21BA',
631
- ),
632
- React.createElement(slider_1['default'], {
633
- min: MIN_ROTATE,
634
- max: MAX_ROTATE,
635
- step: ROTATE_STEP,
636
- value: rotateVal,
637
- onChange: setRotateVal,
638
- }),
639
- React.createElement(
640
- 'button',
641
- {
642
- type: 'button',
643
- onClick: addRotateVal,
644
- disabled: isMaxRotate,
645
- },
646
- '\u21BB',
647
- ),
648
- ),
649
- ),
650
- );
420
+ return React.createElement(React.Fragment, null, renderUpload(), src && React.createElement(modal_1["default"], __assign({
421
+ open: true,
422
+ wrapClassName: "".concat(pkg, "-modal"),
423
+ title: titleOfModal,
424
+ onOk: onOk,
425
+ onCancel: onClose,
426
+ maskClosable: false,
427
+ destroyOnClose: true,
428
+ centered: true
429
+ }, modalProps), React.createElement(EasyCrop_1["default"], __assign({
430
+ image: src,
431
+ aspect: aspect,
432
+ cropShape: shape,
433
+ showGrid: grid,
434
+ zoomWithScroll: hasZoom,
435
+ zoom: zoomVal,
436
+ rotation: rotateVal,
437
+ onZoomChange: setZoomVal,
438
+ onRotationChange: setRotateVal,
439
+ minZoom: minZoom,
440
+ maxZoom: maxZoom,
441
+ onComplete: onComplete,
442
+ classes: {
443
+ containerClassName: "".concat(pkg, "-container"),
444
+ mediaClassName: MEDIA_CLASS
445
+ }
446
+ }, cropperProps)), hasZoom && React.createElement("div", {
447
+ className: "".concat(pkg, "-control zoom")
448
+ }, React.createElement("button", {
449
+ type: "button",
450
+ onClick: subZoomVal,
451
+ disabled: isMinZoom
452
+ }, "\uFF0D"), React.createElement(slider_1["default"], {
453
+ min: minZoom,
454
+ max: maxZoom,
455
+ step: ZOOM_STEP,
456
+ value: zoomVal,
457
+ onChange: setZoomVal
458
+ }), React.createElement("button", {
459
+ type: "button",
460
+ onClick: addZoomVal,
461
+ disabled: isMaxZoom
462
+ }, "\uFF0B")), hasRotate && React.createElement("div", {
463
+ className: "".concat(pkg, "-control rotate")
464
+ }, React.createElement("button", {
465
+ type: "button",
466
+ onClick: subRotateVal,
467
+ disabled: isMinRotate
468
+ }, "\u21BA"), React.createElement(slider_1["default"], {
469
+ min: MIN_ROTATE,
470
+ max: MAX_ROTATE,
471
+ step: ROTATE_STEP,
472
+ value: rotateVal,
473
+ onChange: setRotateVal
474
+ }), React.createElement("button", {
475
+ type: "button",
476
+ onClick: addRotateVal,
477
+ disabled: isMaxRotate
478
+ }, "\u21BB"))));
651
479
  };
652
480
  return renderComponent(modalTitle);
653
481
  };
654
- ImgCrop.getCroppedImg = getCroppedImg_1['default'];
655
- exports['default'] = ImgCrop;
482
+ ImgCrop.getCroppedImg = getCroppedImg_1["default"];
483
+ exports["default"] = ImgCrop;