@aloudata/aloudata-design 0.4.0-beta.10 → 0.4.0-beta.12

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 (394) hide show
  1. package/es/Avatar/component/Avatar/index.d.ts +1 -1
  2. package/es/Avatar/component/Avatar/index.js +12 -16
  3. package/es/Breadcrumb/index.js +14 -18
  4. package/es/Button/index.d.ts +2 -2
  5. package/es/Button/index.js +16 -39
  6. package/es/Button/style/index.less +1 -1
  7. package/es/Checkbox/component/CheckboxGroup/index.d.ts +0 -1
  8. package/es/Checkbox/component/CheckboxGroup/index.js +11 -11
  9. package/es/Checkbox/index.js +8 -8
  10. package/es/Checkbox/type.d.ts +1 -1
  11. package/es/Checkbox/type.js +0 -1
  12. package/es/ConfigProvider/defaultRenderEmpty.d.ts +2 -2
  13. package/es/ConfigProvider/defaultRenderEmpty.js +0 -6
  14. package/es/ConfigProvider/sizeContext.d.ts +2 -2
  15. package/es/ConfigProvider/sizeContext.js +1 -1
  16. package/es/Divider/index.js +7 -3
  17. package/es/Dropdown/Button.d.ts +1 -1
  18. package/es/Dropdown/Button.js +16 -14
  19. package/es/Dropdown/index.d.ts +3 -3
  20. package/es/Dropdown/index.js +10 -10
  21. package/es/Empty/image/Authority.d.ts +0 -1
  22. package/es/Empty/image/Authority.js +0 -2
  23. package/es/Empty/image/Dataspace.d.ts +0 -1
  24. package/es/Empty/image/Dataspace.js +0 -2
  25. package/es/Empty/image/Search.d.ts +0 -1
  26. package/es/Empty/image/Search.js +0 -2
  27. package/es/Empty/image/Simple.d.ts +0 -1
  28. package/es/Empty/image/Simple.js +0 -2
  29. package/es/Empty/image/Worksheet.d.ts +0 -1
  30. package/es/Empty/image/Worksheet.js +0 -2
  31. package/es/Empty/image/empty.d.ts +0 -1
  32. package/es/Empty/image/empty.js +0 -2
  33. package/es/Empty/index.d.ts +1 -1
  34. package/es/Empty/index.js +16 -24
  35. package/es/Icon/components/Icon.js +14 -12
  36. package/es/Icon/components/createFromScripts.js +2 -8
  37. package/es/Icon/icons/AddLine.js +17 -23
  38. package/es/Icon/icons/AlertFill.js +17 -23
  39. package/es/Icon/icons/ArrowsDownLine.js +17 -23
  40. package/es/Icon/icons/CancelFill.js +17 -23
  41. package/es/Icon/icons/CheckFill.js +17 -23
  42. package/es/Icon/icons/CheckLine.js +17 -23
  43. package/es/Icon/icons/CloseLine.js +17 -23
  44. package/es/Icon/icons/DatabaseLine.js +17 -23
  45. package/es/Icon/icons/Deleteline.js +17 -23
  46. package/es/Icon/icons/DownloadLine.js +17 -23
  47. package/es/Icon/icons/ErrorFill.js +17 -23
  48. package/es/Icon/icons/EyeOffLine.js +17 -23
  49. package/es/Icon/icons/EyeOnLine.js +17 -23
  50. package/es/Icon/icons/FileLine.js +17 -23
  51. package/es/Icon/icons/HomeFill.js +17 -23
  52. package/es/Icon/icons/LightningLine.js +17 -23
  53. package/es/Icon/icons/Loading.js +17 -23
  54. package/es/Icon/icons/More.js +17 -23
  55. package/es/Icon/icons/NewWindowsLine.js +17 -23
  56. package/es/Icon/icons/SearchLine.js +17 -23
  57. package/es/Icon/icons/SortAscendingLine.js +17 -23
  58. package/es/Icon/icons/SortDescendingLine.js +17 -23
  59. package/es/Icon/icons/TextLine.js +17 -23
  60. package/es/Icon/icons/UserLine.js +17 -23
  61. package/es/Icon/icons.js +1658 -1588
  62. package/es/Input/components/Group/index.js +11 -9
  63. package/es/Input/components/Input/index.d.ts +2 -2
  64. package/es/Input/components/Input/index.js +10 -9
  65. package/es/Input/components/Password/index.js +14 -12
  66. package/es/Input/components/TextArea/index.js +13 -11
  67. package/es/InputNumber/index.js +10 -12
  68. package/es/Menu/Divider.js +7 -1
  69. package/es/Menu/MenuItem.js +7 -1
  70. package/es/Menu/SubMenu.js +8 -6
  71. package/es/Menu/index.d.ts +1 -1
  72. package/es/Menu/index.js +8 -6
  73. package/es/Modal/index.d.ts +1 -1
  74. package/es/Modal/index.js +18 -28
  75. package/es/Modal/locale.js +4 -6
  76. package/es/Modal/style/index.less +6 -1
  77. package/es/Navigator/components/Header/index.js +0 -2
  78. package/es/Navigator/components/Menu/index.js +14 -18
  79. package/es/Navigator/components/MenuItem/index.js +6 -9
  80. package/es/Navigator/index.js +5 -7
  81. package/es/Popconfirm/index.d.ts +89 -2
  82. package/es/Popconfirm/index.js +105 -1
  83. package/es/Popconfirm/style/index.less +58 -0
  84. package/es/Popover/index.js +9 -9
  85. package/es/Radio/components/Group/index.d.ts +1 -1
  86. package/es/Radio/components/Group/index.js +23 -32
  87. package/es/Radio/components/Radio/index.js +10 -19
  88. package/es/Radio/interface/radioGroup.d.ts +3 -3
  89. package/es/Select/index.d.ts +4 -4
  90. package/es/Select/index.js +53 -70
  91. package/es/Select/rc-select/BaseSelect.d.ts +7 -7
  92. package/es/Select/rc-select/BaseSelect.js +155 -245
  93. package/es/Select/rc-select/OptGroup.js +0 -1
  94. package/es/Select/rc-select/Option.js +0 -1
  95. package/es/Select/rc-select/OptionList.d.ts +2 -2
  96. package/es/Select/rc-select/OptionList.js +76 -128
  97. package/es/Select/rc-select/Select.d.ts +8 -8
  98. package/es/Select/rc-select/Select.js +137 -205
  99. package/es/Select/rc-select/SelectTrigger.js +30 -42
  100. package/es/Select/rc-select/Selector/Input.d.ts +1 -1
  101. package/es/Select/rc-select/Selector/Input.js +29 -37
  102. package/es/Select/rc-select/Selector/MultipleSelector.js +72 -97
  103. package/es/Select/rc-select/Selector/SingleSelector.js +28 -43
  104. package/es/Select/rc-select/Selector/index.js +33 -58
  105. package/es/Select/rc-select/TransBtn.js +5 -10
  106. package/es/Select/rc-select/hooks/useBaseProps.js +0 -1
  107. package/es/Select/rc-select/hooks/useCache.d.ts +1 -1
  108. package/es/Select/rc-select/hooks/useCache.js +9 -12
  109. package/es/Select/rc-select/hooks/useDelayReset.js +4 -18
  110. package/es/Select/rc-select/hooks/useFilterOptions.d.ts +1 -1
  111. package/es/Select/rc-select/hooks/useFilterOptions.js +8 -17
  112. package/es/Select/rc-select/hooks/useId.js +6 -17
  113. package/es/Select/rc-select/hooks/useLayoutEffect.js +0 -1
  114. package/es/Select/rc-select/hooks/useLock.js +2 -6
  115. package/es/Select/rc-select/hooks/useOptions.d.ts +2 -2
  116. package/es/Select/rc-select/hooks/useOptions.js +2 -10
  117. package/es/Select/rc-select/hooks/useRefFunc.js +0 -1
  118. package/es/Select/rc-select/hooks/useSelectTriggerControl.js +0 -5
  119. package/es/Select/rc-select/utils/commonUtil.js +0 -2
  120. package/es/Select/rc-select/utils/keyUtil.js +4 -3
  121. package/es/Select/rc-select/utils/legacyUtil.js +13 -22
  122. package/es/Select/rc-select/utils/valueUtil.js +18 -50
  123. package/es/Select/rc-select/utils/warningPropsUtil.js +30 -47
  124. package/es/Select/style/index.js +2 -1
  125. package/es/Select/style/status.less +3 -1
  126. package/es/Select/utils/iconUtil.d.ts +3 -3
  127. package/es/Select/utils/iconUtil.js +16 -26
  128. package/es/Space/index.js +1 -1
  129. package/es/Spin/index.d.ts +2 -2
  130. package/es/Steps/components/Step/index.d.ts +1 -1
  131. package/es/Steps/components/Step/index.js +9 -8
  132. package/es/Steps/index.d.ts +8 -2
  133. package/es/Steps/index.js +64 -10
  134. package/es/Steps/style/index.less +11 -12
  135. package/es/Switch/index.js +17 -30
  136. package/es/Table/Table.js +115 -191
  137. package/es/Table/components/Empty/index.js +0 -2
  138. package/es/Table/components/Loading/index.js +0 -2
  139. package/es/Table/components/TableBodyRowList/index.js +20 -39
  140. package/es/Table/components/TableHead/index.js +57 -94
  141. package/es/Table/interface.d.ts +1 -1
  142. package/es/Table/style/index.less +8 -4
  143. package/es/Table/utils.js +8 -29
  144. package/es/Tabs/index.d.ts +22 -7
  145. package/es/Tabs/index.js +12 -19
  146. package/es/Tooltip/index.d.ts +1 -1
  147. package/es/Tooltip/index.js +12 -12
  148. package/es/_utils/hooks/useControlledState.d.ts +1 -1
  149. package/es/_utils/hooks/useControlledState.js +8 -21
  150. package/es/_utils/hooks/useId.js +2 -6
  151. package/es/_utils/hooks/usePrefixCls.d.ts +1 -1
  152. package/es/_utils/hooks/usePrefixCls.js +2 -5
  153. package/es/index.d.ts +1 -1
  154. package/es/locale-provider/context.d.ts +1 -1
  155. package/es/locale-provider/index.js +10 -32
  156. package/lib/Alert/index.js +0 -4
  157. package/lib/Alert/style/index.js +0 -1
  158. package/lib/Avatar/component/Avatar/index.d.ts +1 -1
  159. package/lib/Avatar/component/Avatar/index.js +11 -24
  160. package/lib/Avatar/index.js +0 -4
  161. package/lib/Avatar/style/index.js +0 -1
  162. package/lib/Breadcrumb/index.js +14 -23
  163. package/lib/Breadcrumb/style/index.js +0 -1
  164. package/lib/Button/index.d.ts +2 -2
  165. package/lib/Button/index.js +16 -47
  166. package/lib/Button/style/index.js +0 -1
  167. package/lib/Button/style/index.less +1 -1
  168. package/lib/Card/index.js +0 -4
  169. package/lib/Card/style/index.js +0 -1
  170. package/lib/Checkbox/component/CheckboxGroup/index.d.ts +0 -1
  171. package/lib/Checkbox/component/CheckboxGroup/index.js +9 -16
  172. package/lib/Checkbox/index.js +8 -14
  173. package/lib/Checkbox/style/index.js +0 -1
  174. package/lib/Checkbox/type.d.ts +1 -1
  175. package/lib/Checkbox/type.js +0 -1
  176. package/lib/Col/index.js +0 -4
  177. package/lib/Col/style/index.js +0 -1
  178. package/lib/ConfigProvider/defaultRenderEmpty.d.ts +2 -2
  179. package/lib/ConfigProvider/defaultRenderEmpty.js +0 -13
  180. package/lib/ConfigProvider/index.js +0 -5
  181. package/lib/ConfigProvider/sizeContext.d.ts +2 -2
  182. package/lib/ConfigProvider/sizeContext.js +1 -8
  183. package/lib/ConfigProvider/style/index.js +0 -1
  184. package/lib/DatePicker/index.js +0 -4
  185. package/lib/DatePicker/style/index.js +0 -1
  186. package/lib/Divider/index.js +7 -8
  187. package/lib/Divider/style/index.js +0 -1
  188. package/lib/Drawer/index.js +0 -4
  189. package/lib/Drawer/style/index.js +0 -1
  190. package/lib/Dropdown/Button.d.ts +1 -1
  191. package/lib/Dropdown/Button.js +14 -20
  192. package/lib/Dropdown/index.d.ts +3 -3
  193. package/lib/Dropdown/index.js +10 -17
  194. package/lib/Dropdown/style/index.js +0 -2
  195. package/lib/Empty/image/Authority.d.ts +0 -1
  196. package/lib/Empty/image/Authority.js +0 -6
  197. package/lib/Empty/image/Dataspace.d.ts +0 -1
  198. package/lib/Empty/image/Dataspace.js +0 -6
  199. package/lib/Empty/image/Search.d.ts +0 -1
  200. package/lib/Empty/image/Search.js +0 -6
  201. package/lib/Empty/image/Simple.d.ts +0 -1
  202. package/lib/Empty/image/Simple.js +0 -6
  203. package/lib/Empty/image/Worksheet.d.ts +0 -1
  204. package/lib/Empty/image/Worksheet.js +0 -6
  205. package/lib/Empty/image/empty.d.ts +0 -1
  206. package/lib/Empty/image/empty.js +0 -6
  207. package/lib/Empty/index.d.ts +1 -1
  208. package/lib/Empty/index.js +15 -37
  209. package/lib/Form/index.js +0 -4
  210. package/lib/Form/style/index.js +0 -1
  211. package/lib/Icon/antdIconfont.js +0 -1
  212. package/lib/Icon/components/Icon.js +14 -16
  213. package/lib/Icon/components/createFromScripts.js +2 -8
  214. package/lib/Icon/icons/AddLine.js +16 -30
  215. package/lib/Icon/icons/AlertFill.js +16 -30
  216. package/lib/Icon/icons/ArrowsDownLine.js +16 -30
  217. package/lib/Icon/icons/CancelFill.js +16 -30
  218. package/lib/Icon/icons/CheckFill.js +16 -30
  219. package/lib/Icon/icons/CheckLine.js +16 -30
  220. package/lib/Icon/icons/CloseLine.js +16 -30
  221. package/lib/Icon/icons/DatabaseLine.js +16 -30
  222. package/lib/Icon/icons/Deleteline.js +16 -30
  223. package/lib/Icon/icons/DownloadLine.js +16 -30
  224. package/lib/Icon/icons/ErrorFill.js +16 -30
  225. package/lib/Icon/icons/EyeOffLine.js +16 -30
  226. package/lib/Icon/icons/EyeOnLine.js +16 -30
  227. package/lib/Icon/icons/FileLine.js +16 -30
  228. package/lib/Icon/icons/HomeFill.js +16 -30
  229. package/lib/Icon/icons/LightningLine.js +16 -30
  230. package/lib/Icon/icons/Loading.js +16 -30
  231. package/lib/Icon/icons/More.js +16 -30
  232. package/lib/Icon/icons/NewWindowsLine.js +16 -30
  233. package/lib/Icon/icons/SearchLine.js +16 -30
  234. package/lib/Icon/icons/SortAscendingLine.js +16 -30
  235. package/lib/Icon/icons/SortDescendingLine.js +16 -30
  236. package/lib/Icon/icons/TextLine.js +16 -30
  237. package/lib/Icon/icons/UserLine.js +16 -30
  238. package/lib/Icon/icons.js +1658 -1588
  239. package/lib/Icon/index.js +0 -3
  240. package/lib/Input/components/Group/index.js +11 -16
  241. package/lib/Input/components/Input/index.d.ts +2 -2
  242. package/lib/Input/components/Input/index.js +10 -16
  243. package/lib/Input/components/Password/index.js +12 -21
  244. package/lib/Input/components/TextArea/index.js +13 -18
  245. package/lib/Input/index.js +0 -6
  246. package/lib/Input/style/index.js +0 -2
  247. package/lib/InputNumber/index.js +10 -18
  248. package/lib/InputNumber/style/index.js +0 -1
  249. package/lib/Layout/index.js +0 -4
  250. package/lib/Layout/style/index.js +0 -1
  251. package/lib/Menu/Divider.js +7 -7
  252. package/lib/Menu/MenuItem.js +7 -7
  253. package/lib/Menu/SubMenu.js +8 -13
  254. package/lib/Menu/index.d.ts +1 -1
  255. package/lib/Menu/index.js +8 -16
  256. package/lib/Menu/style/index.js +0 -2
  257. package/lib/Modal/index.d.ts +1 -1
  258. package/lib/Modal/index.js +17 -45
  259. package/lib/Modal/locale.js +4 -9
  260. package/lib/Modal/style/index.js +0 -1
  261. package/lib/Modal/style/index.less +6 -1
  262. package/lib/Navigator/components/Header/index.js +0 -4
  263. package/lib/Navigator/components/Menu/index.js +13 -24
  264. package/lib/Navigator/components/MenuItem/index.js +6 -15
  265. package/lib/Navigator/index.js +5 -15
  266. package/lib/Navigator/style/index.js +0 -1
  267. package/lib/PageHeader/index.js +0 -4
  268. package/lib/PageHeader/style/index.js +0 -1
  269. package/lib/Popconfirm/index.d.ts +89 -2
  270. package/lib/Popconfirm/index.js +106 -5
  271. package/lib/Popconfirm/style/index.js +0 -1
  272. package/lib/Popconfirm/style/index.less +58 -0
  273. package/lib/Popover/index.js +9 -14
  274. package/lib/Popover/style/index.js +0 -1
  275. package/lib/Progress/index.js +0 -3
  276. package/lib/Progress/style/index.js +0 -1
  277. package/lib/Radio/components/Group/index.d.ts +1 -1
  278. package/lib/Radio/components/Group/index.js +22 -41
  279. package/lib/Radio/components/Radio/index.js +10 -30
  280. package/lib/Radio/index.js +0 -4
  281. package/lib/Radio/interface/radioGroup.d.ts +3 -3
  282. package/lib/Radio/style/index.js +0 -1
  283. package/lib/Row/index.js +0 -4
  284. package/lib/Row/style/index.js +0 -1
  285. package/lib/Select/index.d.ts +4 -4
  286. package/lib/Select/index.js +52 -87
  287. package/lib/Select/rc-select/BaseSelect.d.ts +7 -7
  288. package/lib/Select/rc-select/BaseSelect.js +155 -266
  289. package/lib/Select/rc-select/OptGroup.js +0 -2
  290. package/lib/Select/rc-select/Option.js +0 -2
  291. package/lib/Select/rc-select/OptionList.d.ts +2 -2
  292. package/lib/Select/rc-select/OptionList.js +75 -146
  293. package/lib/Select/rc-select/Select.d.ts +8 -8
  294. package/lib/Select/rc-select/Select.js +137 -224
  295. package/lib/Select/rc-select/SelectContext.js +1 -5
  296. package/lib/Select/rc-select/SelectTrigger.js +29 -49
  297. package/lib/Select/rc-select/Selector/Input.d.ts +1 -1
  298. package/lib/Select/rc-select/Selector/Input.js +29 -46
  299. package/lib/Select/rc-select/Selector/MultipleSelector.js +71 -109
  300. package/lib/Select/rc-select/Selector/SingleSelector.js +28 -50
  301. package/lib/Select/rc-select/Selector/index.js +32 -67
  302. package/lib/Select/rc-select/TransBtn.js +5 -16
  303. package/lib/Select/rc-select/hooks/useBaseProps.js +1 -7
  304. package/lib/Select/rc-select/hooks/useCache.d.ts +1 -1
  305. package/lib/Select/rc-select/hooks/useCache.js +9 -18
  306. package/lib/Select/rc-select/hooks/useDelayReset.js +4 -22
  307. package/lib/Select/rc-select/hooks/useFilterOptions.d.ts +1 -1
  308. package/lib/Select/rc-select/hooks/useFilterOptions.js +8 -25
  309. package/lib/Select/rc-select/hooks/useId.js +6 -26
  310. package/lib/Select/rc-select/hooks/useLayoutEffect.js +0 -6
  311. package/lib/Select/rc-select/hooks/useLock.js +2 -10
  312. package/lib/Select/rc-select/hooks/useOptions.d.ts +2 -2
  313. package/lib/Select/rc-select/hooks/useOptions.js +2 -15
  314. package/lib/Select/rc-select/hooks/useRefFunc.js +0 -5
  315. package/lib/Select/rc-select/hooks/useSelectTriggerControl.js +1 -10
  316. package/lib/Select/rc-select/index.js +0 -7
  317. package/lib/Select/rc-select/utils/commonUtil.js +0 -4
  318. package/lib/Select/rc-select/utils/keyUtil.js +4 -5
  319. package/lib/Select/rc-select/utils/legacyUtil.js +12 -28
  320. package/lib/Select/rc-select/utils/platformUtil.js +0 -1
  321. package/lib/Select/rc-select/utils/valueUtil.js +18 -55
  322. package/lib/Select/rc-select/utils/warningPropsUtil.js +30 -56
  323. package/lib/Select/style/index.js +0 -2
  324. package/lib/Select/style/status.less +3 -1
  325. package/lib/Select/utils/iconUtil.d.ts +3 -3
  326. package/lib/Select/utils/iconUtil.js +16 -39
  327. package/lib/Skeleton/index.js +0 -3
  328. package/lib/Skeleton/style/index.js +0 -1
  329. package/lib/Space/index.js +2 -9
  330. package/lib/Space/style/index.js +0 -1
  331. package/lib/Spin/index.d.ts +2 -2
  332. package/lib/Spin/index.js +0 -3
  333. package/lib/Spin/style/index.js +0 -1
  334. package/lib/Steps/components/ProcessIcon/index.js +0 -4
  335. package/lib/Steps/components/Step/index.d.ts +1 -1
  336. package/lib/Steps/components/Step/index.js +9 -18
  337. package/lib/Steps/index.d.ts +8 -2
  338. package/lib/Steps/index.js +63 -17
  339. package/lib/Steps/style/index.js +0 -1
  340. package/lib/Steps/style/index.less +11 -12
  341. package/lib/Switch/index.js +17 -37
  342. package/lib/Switch/style/index.js +0 -1
  343. package/lib/Table/Table.js +117 -216
  344. package/lib/Table/components/Empty/index.js +0 -6
  345. package/lib/Table/components/Loading/index.js +0 -7
  346. package/lib/Table/components/TableBodyRowList/index.js +19 -47
  347. package/lib/Table/components/TableHead/index.js +56 -108
  348. package/lib/Table/index.js +0 -3
  349. package/lib/Table/interface.d.ts +1 -1
  350. package/lib/Table/style/index.js +0 -1
  351. package/lib/Table/style/index.less +8 -4
  352. package/lib/Table/utils.js +8 -33
  353. package/lib/Tabs/index.d.ts +22 -7
  354. package/lib/Tabs/index.js +10 -28
  355. package/lib/Tabs/style/index.js +0 -2
  356. package/lib/Tooltip/index.d.ts +1 -1
  357. package/lib/Tooltip/index.js +12 -17
  358. package/lib/Tooltip/style/index.js +0 -1
  359. package/lib/Tree/index.js +0 -3
  360. package/lib/Tree/style/index.js +0 -1
  361. package/lib/Typography/index.js +0 -4
  362. package/lib/Typography/style/index.js +0 -1
  363. package/lib/Upload/index.js +0 -4
  364. package/lib/Upload/style/index.js +0 -1
  365. package/lib/_utils/hooks/useControlledState.d.ts +1 -1
  366. package/lib/_utils/hooks/useControlledState.js +8 -23
  367. package/lib/_utils/hooks/useId.js +3 -10
  368. package/lib/_utils/hooks/usePrefixCls.d.ts +1 -1
  369. package/lib/_utils/hooks/usePrefixCls.js +2 -10
  370. package/lib/index.d.ts +1 -1
  371. package/lib/index.js +0 -42
  372. package/lib/locale/default.js +0 -3
  373. package/lib/locale/en_US.js +1 -6
  374. package/lib/locale/zh_CN.js +1 -6
  375. package/lib/locale-provider/LocaleReceiver.js +0 -5
  376. package/lib/locale-provider/context.d.ts +1 -1
  377. package/lib/locale-provider/context.js +0 -2
  378. package/lib/locale-provider/default.js +0 -3
  379. package/lib/locale-provider/en_US.js +0 -3
  380. package/lib/locale-provider/index.js +8 -37
  381. package/lib/locale-provider/zh_CN.js +0 -3
  382. package/lib/message/index.js +0 -4
  383. package/lib/message/style/index.js +0 -1
  384. package/lib/notification/index.js +0 -4
  385. package/lib/notification/style/index.js +0 -1
  386. package/package.json +4 -3
  387. package/es/Table/hooks/useFrame.d.ts +0 -7
  388. package/es/Table/hooks/useFrame.js +0 -90
  389. package/es/Tabs/TabPane.d.ts +0 -21
  390. package/es/Tabs/TabPane.js +0 -6
  391. package/lib/Table/hooks/useFrame.d.ts +0 -7
  392. package/lib/Table/hooks/useFrame.js +0 -98
  393. package/lib/Tabs/TabPane.d.ts +0 -21
  394. package/lib/Tabs/TabPane.js +0 -18
@@ -4,18 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _zh_CN = _interopRequireDefault(require("rc-pagination/lib/locale/zh_CN"));
9
-
10
8
  var _zh_CN2 = _interopRequireDefault(require("antd/es/calendar/locale/zh_CN"));
11
-
12
9
  var _zh_CN3 = _interopRequireDefault(require("antd/es/date-picker/locale/zh_CN"));
13
-
14
10
  var _zh_CN4 = _interopRequireDefault(require("antd/es/time-picker/locale/zh_CN"));
15
-
16
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
12
  /* eslint-disable no-template-curly-in-string */
13
+
19
14
  var typeTemplate = '${label}不是一个有效的${type}';
20
15
  var localeValues = {
21
16
  locale: 'zh-cn',
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
@@ -12,12 +11,8 @@ Object.defineProperty(exports, "useLocaleReceiver", {
12
11
  return _LocaleReceiver.useLocaleReceiver;
13
12
  }
14
13
  });
15
-
16
14
  var _LocaleReceiver = _interopRequireWildcard(require("antd/es/locale-provider/LocaleReceiver"));
17
-
18
15
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
-
20
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
-
22
17
  var _default = _LocaleReceiver.default;
23
18
  exports.default = _default;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { Locale } from '.';
3
- export declare type LocaleContextProps = Partial<Locale> & {
3
+ export type LocaleContextProps = Partial<Locale> & {
4
4
  exist?: boolean;
5
5
  };
6
6
  declare const LocaleContext: import("react").Context<LocaleContextProps | undefined>;
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = require("react");
9
-
10
8
  var LocaleContext = /*#__PURE__*/(0, _react.createContext)(undefined);
11
9
  var _default = LocaleContext;
12
10
  exports.default = _default;
@@ -4,10 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _default2 = _interopRequireDefault(require("../locale/default"));
9
-
10
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
12
9
  var _default = _default2.default;
13
10
  exports.default = _default;
@@ -4,10 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _en_US = _interopRequireDefault(require("../locale/en_US"));
9
-
10
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
12
9
  var _default = _en_US.default;
13
10
  exports.default = _default;
@@ -1,67 +1,41 @@
1
1
  "use strict";
2
2
 
3
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = exports.ANT_MARK = void 0;
9
-
10
8
  var _memoizeOne = _interopRequireDefault(require("memoize-one"));
11
-
12
9
  var React = _interopRequireWildcard(require("react"));
13
-
14
10
  var _warning = _interopRequireDefault(require("antd/es/_util/warning"));
15
-
16
11
  var _locale = require("antd/es/modal/locale");
17
-
18
12
  var _context = _interopRequireDefault(require("./context"));
19
-
20
13
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
-
22
14
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
-
24
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
-
26
16
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
27
-
28
17
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
29
-
30
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
31
-
18
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
32
19
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
33
-
34
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
35
-
20
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
36
21
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
37
-
22
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
23
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
38
24
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
39
-
40
25
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
41
-
42
26
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
43
-
44
27
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
45
-
46
28
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
47
-
48
29
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
49
-
50
30
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
51
-
52
31
  var ANT_MARK = 'internalMark';
53
32
  exports.ANT_MARK = ANT_MARK;
54
-
55
33
  var LocaleProvider = /*#__PURE__*/function (_React$Component) {
56
34
  _inherits(LocaleProvider, _React$Component);
57
-
58
35
  var _super = _createSuper(LocaleProvider);
59
-
60
36
  function LocaleProvider(props) {
61
37
  var _this;
62
-
63
38
  _classCallCheck(this, LocaleProvider);
64
-
65
39
  _this = _super.call(this, props);
66
40
  _this.getMemoizedContextValue = (0, _memoizeOne.default)(function (localeValue) {
67
41
  return _objectSpread(_objectSpread({}, localeValue), {}, {
@@ -69,11 +43,11 @@ var LocaleProvider = /*#__PURE__*/function (_React$Component) {
69
43
  });
70
44
  });
71
45
  (0, _locale.changeConfirmLocale)(props.locale && props.locale.Modal);
72
- (0, _warning.default)( // eslint-disable-next-line no-underscore-dangle
46
+ (0, _warning.default)(
47
+ // eslint-disable-next-line no-underscore-dangle
73
48
  props._ANT_MARK__ === ANT_MARK, 'LocaleProvider', '`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale');
74
49
  return _this;
75
50
  }
76
-
77
51
  _createClass(LocaleProvider, [{
78
52
  key: "componentDidMount",
79
53
  value: function componentDidMount() {
@@ -83,7 +57,6 @@ var LocaleProvider = /*#__PURE__*/function (_React$Component) {
83
57
  key: "componentDidUpdate",
84
58
  value: function componentDidUpdate(prevProps) {
85
59
  var locale = this.props.locale;
86
-
87
60
  if (prevProps.locale !== locale) {
88
61
  (0, _locale.changeConfirmLocale)(locale && locale.Modal);
89
62
  }
@@ -97,18 +70,16 @@ var LocaleProvider = /*#__PURE__*/function (_React$Component) {
97
70
  key: "render",
98
71
  value: function render() {
99
72
  var _this$props = this.props,
100
- locale = _this$props.locale,
101
- children = _this$props.children;
73
+ locale = _this$props.locale,
74
+ children = _this$props.children;
102
75
  var contextValue = this.getMemoizedContextValue(locale);
103
76
  return /*#__PURE__*/React.createElement(_context.default.Provider, {
104
77
  value: contextValue
105
78
  }, children);
106
79
  }
107
80
  }]);
108
-
109
81
  return LocaleProvider;
110
82
  }(React.Component);
111
-
112
83
  exports.default = LocaleProvider;
113
84
  LocaleProvider.defaultProps = {
114
85
  // eslint-disable-next-line react/default-props-match-prop-types
@@ -4,10 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _zh_CN = _interopRequireDefault(require("../locale/zh_CN"));
9
-
10
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
12
9
  var _default = _zh_CN.default;
13
10
  exports.default = _default;
@@ -4,12 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  require("antd/es/message/style");
9
-
10
8
  var _message2 = _interopRequireDefault(require("antd/es/message"));
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  var _default = _message2.default;
15
11
  exports.default = _default;
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
2
 
3
3
  require("../../style");
4
-
5
4
  require("./index.less");
@@ -4,12 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  require("antd/es/notification/style");
9
-
10
8
  var _notification2 = _interopRequireDefault(require("antd/es/notification"));
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  var _default = _notification2.default;
15
11
  exports.default = _default;
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
2
 
3
3
  require("../../style");
4
-
5
4
  require("./index.less");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aloudata/aloudata-design",
3
- "version": "0.4.0-beta.10",
3
+ "version": "0.4.0-beta.12",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -52,9 +52,10 @@
52
52
  ]
53
53
  },
54
54
  "dependencies": {
55
- "@aloudata/icons-react": "^0.0.12",
55
+ "@aloudata/icons-react": "^0.0.14",
56
56
  "@ant-design/icons": "^4.7.0",
57
- "antd": "^4.23.5",
57
+ "ahooks": "^3.7.2",
58
+ "antd": "^4.24.4",
58
59
  "babel-preset-react-app": "^10.0.1",
59
60
  "classnames": "^2.3.1",
60
61
  "lodash": "^4.17.21",
@@ -1,7 +0,0 @@
1
- export declare type Updater<State> = (prev: State) => State;
2
- /**
3
- * Execute code before next frame but async
4
- */
5
- export declare function useLayoutState<State>(defaultState: State): [State, (updater: Updater<State>) => void];
6
- /** Lock frame, when frame pass reset the lock. */
7
- export declare function useTimeoutLock<State>(defaultState?: State): [(state: State) => void, () => State];
@@ -1,90 +0,0 @@
1
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
-
3
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
-
5
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
-
7
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8
-
9
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
10
-
11
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
-
13
- // @ts-nocheck
14
- import { useRef, useState, useEffect } from 'react';
15
- /**
16
- * Execute code before next frame but async
17
- */
18
-
19
- export function useLayoutState(defaultState) {
20
- var stateRef = useRef(defaultState);
21
-
22
- var _useState = useState({}),
23
- _useState2 = _slicedToArray(_useState, 2),
24
- forceUpdate = _useState2[1];
25
-
26
- var lastPromiseRef = useRef(null);
27
- var updateBatchRef = useRef([]);
28
-
29
- function setFrameState(updater) {
30
- updateBatchRef.current.push(updater);
31
- var promise = Promise.resolve(); // @ts-ignore;
32
-
33
- lastPromiseRef.current = promise;
34
- promise.then(function () {
35
- if (lastPromiseRef.current === promise) {
36
- var prevBatch = updateBatchRef.current;
37
- var prevState = stateRef.current;
38
- updateBatchRef.current = [];
39
- prevBatch.forEach(function (batchUpdater) {
40
- stateRef.current = batchUpdater(stateRef.current);
41
- }); // @ts-ignore;
42
-
43
- lastPromiseRef.current = null;
44
-
45
- if (prevState !== stateRef.current) {
46
- forceUpdate({});
47
- }
48
- }
49
- });
50
- }
51
-
52
- useEffect(function () {
53
- return function () {
54
- // @ts-ignore;
55
- lastPromiseRef.current = null;
56
- };
57
- }, []);
58
- return [stateRef.current, setFrameState];
59
- }
60
- /** Lock frame, when frame pass reset the lock. */
61
-
62
- export function useTimeoutLock(defaultState) {
63
- var frameRef = useRef(defaultState || null);
64
- var timeoutRef = useRef();
65
- var TIMEOUT_DELAY = 50;
66
-
67
- function cleanUp() {
68
- window.clearTimeout(timeoutRef.current);
69
- }
70
-
71
- function setState(newState) {
72
- // @ts-ignore;
73
- frameRef.current = newState;
74
- cleanUp();
75
- timeoutRef.current = window.setTimeout(function () {
76
- // @ts-ignore;
77
- frameRef.current = null;
78
- timeoutRef.current = undefined;
79
- }, TIMEOUT_DELAY);
80
- }
81
-
82
- function getState() {
83
- return frameRef.current;
84
- }
85
-
86
- useEffect(function () {
87
- return cleanUp;
88
- }, []);
89
- return [setState, getState];
90
- }
@@ -1,21 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export interface ITabPaneProps {
3
- /**
4
- * @description 被隐藏时是否渲染 DOM 结构
5
- * @default false
6
- */
7
- forceRender?: boolean;
8
- /**
9
- * @description 对应 activeKey
10
- * @default -
11
- */
12
- key?: string;
13
- /**
14
- * @description 选项卡头显示的内容
15
- * @default -
16
- */
17
- tab: ReactNode;
18
- className?: string;
19
- children?: ReactNode;
20
- }
21
- export default function TabPane(props: ITabPaneProps): JSX.Element;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import AntdTabs from 'antd/lib/tabs';
3
- var AntdTabPane = AntdTabs.TabPane;
4
- export default function TabPane(props) {
5
- return /*#__PURE__*/React.createElement(AntdTabPane, Object.assign({}, props));
6
- }
@@ -1,7 +0,0 @@
1
- export declare type Updater<State> = (prev: State) => State;
2
- /**
3
- * Execute code before next frame but async
4
- */
5
- export declare function useLayoutState<State>(defaultState: State): [State, (updater: Updater<State>) => void];
6
- /** Lock frame, when frame pass reset the lock. */
7
- export declare function useTimeoutLock<State>(defaultState?: State): [(state: State) => void, () => State];
@@ -1,98 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useLayoutState = useLayoutState;
7
- exports.useTimeoutLock = useTimeoutLock;
8
-
9
- var _react = require("react");
10
-
11
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
12
-
13
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
14
-
15
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
16
-
17
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
18
-
19
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
20
-
21
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
22
-
23
- /**
24
- * Execute code before next frame but async
25
- */
26
- function useLayoutState(defaultState) {
27
- var stateRef = (0, _react.useRef)(defaultState);
28
-
29
- var _useState = (0, _react.useState)({}),
30
- _useState2 = _slicedToArray(_useState, 2),
31
- forceUpdate = _useState2[1];
32
-
33
- var lastPromiseRef = (0, _react.useRef)(null);
34
- var updateBatchRef = (0, _react.useRef)([]);
35
-
36
- function setFrameState(updater) {
37
- updateBatchRef.current.push(updater);
38
- var promise = Promise.resolve(); // @ts-ignore;
39
-
40
- lastPromiseRef.current = promise;
41
- promise.then(function () {
42
- if (lastPromiseRef.current === promise) {
43
- var prevBatch = updateBatchRef.current;
44
- var prevState = stateRef.current;
45
- updateBatchRef.current = [];
46
- prevBatch.forEach(function (batchUpdater) {
47
- stateRef.current = batchUpdater(stateRef.current);
48
- }); // @ts-ignore;
49
-
50
- lastPromiseRef.current = null;
51
-
52
- if (prevState !== stateRef.current) {
53
- forceUpdate({});
54
- }
55
- }
56
- });
57
- }
58
-
59
- (0, _react.useEffect)(function () {
60
- return function () {
61
- // @ts-ignore;
62
- lastPromiseRef.current = null;
63
- };
64
- }, []);
65
- return [stateRef.current, setFrameState];
66
- }
67
- /** Lock frame, when frame pass reset the lock. */
68
-
69
-
70
- function useTimeoutLock(defaultState) {
71
- var frameRef = (0, _react.useRef)(defaultState || null);
72
- var timeoutRef = (0, _react.useRef)();
73
- var TIMEOUT_DELAY = 50;
74
-
75
- function cleanUp() {
76
- window.clearTimeout(timeoutRef.current);
77
- }
78
-
79
- function setState(newState) {
80
- // @ts-ignore;
81
- frameRef.current = newState;
82
- cleanUp();
83
- timeoutRef.current = window.setTimeout(function () {
84
- // @ts-ignore;
85
- frameRef.current = null;
86
- timeoutRef.current = undefined;
87
- }, TIMEOUT_DELAY);
88
- }
89
-
90
- function getState() {
91
- return frameRef.current;
92
- }
93
-
94
- (0, _react.useEffect)(function () {
95
- return cleanUp;
96
- }, []);
97
- return [setState, getState];
98
- }
@@ -1,21 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export interface ITabPaneProps {
3
- /**
4
- * @description 被隐藏时是否渲染 DOM 结构
5
- * @default false
6
- */
7
- forceRender?: boolean;
8
- /**
9
- * @description 对应 activeKey
10
- * @default -
11
- */
12
- key?: string;
13
- /**
14
- * @description 选项卡头显示的内容
15
- * @default -
16
- */
17
- tab: ReactNode;
18
- className?: string;
19
- children?: ReactNode;
20
- }
21
- export default function TabPane(props: ITabPaneProps): JSX.Element;
@@ -1,18 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = TabPane;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _tabs = _interopRequireDefault(require("antd/lib/tabs"));
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
- var AntdTabPane = _tabs.default.TabPane;
15
-
16
- function TabPane(props) {
17
- return /*#__PURE__*/_react.default.createElement(AntdTabPane, Object.assign({}, props));
18
- }