@zat-design/sisyphus-react 3.0.13

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 (818) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +93 -0
  3. package/commitlint.config.js +6 -0
  4. package/dist/index.esm.css +4002 -0
  5. package/dist/index.esm.js +3 -0
  6. package/es/ProConfigProvider/index.d.ts +22 -0
  7. package/es/ProConfigProvider/index.js +52 -0
  8. package/es/ProDownload/DownloadHelper.d.ts +32 -0
  9. package/es/ProDownload/DownloadHelper.js +170 -0
  10. package/es/ProDownload/index.d.ts +4 -0
  11. package/es/ProDownload/index.js +176 -0
  12. package/es/ProDownload/propsType.d.ts +54 -0
  13. package/es/ProDownload/propsType.js +1 -0
  14. package/es/ProDrawerForm/components/ProDrawer/index.d.ts +7 -0
  15. package/es/ProDrawerForm/components/ProDrawer/index.js +204 -0
  16. package/es/ProDrawerForm/components/ProModal/index.d.ts +7 -0
  17. package/es/ProDrawerForm/components/ProModal/index.js +161 -0
  18. package/es/ProDrawerForm/components/index.d.ts +2 -0
  19. package/es/ProDrawerForm/components/index.js +2 -0
  20. package/es/ProDrawerForm/index.d.ts +5 -0
  21. package/es/ProDrawerForm/index.js +65 -0
  22. package/es/ProDrawerForm/propsType.d.ts +88 -0
  23. package/es/ProDrawerForm/propsType.js +1 -0
  24. package/es/ProDrawerForm/style/index.less +125 -0
  25. package/es/ProDrawerForm/utils/index.d.ts +6 -0
  26. package/es/ProDrawerForm/utils/index.js +16 -0
  27. package/es/ProEditLabel/components/RenderForm.d.ts +3 -0
  28. package/es/ProEditLabel/components/RenderForm.js +65 -0
  29. package/es/ProEditLabel/index.d.ts +4 -0
  30. package/es/ProEditLabel/index.js +324 -0
  31. package/es/ProEditLabel/propsType.d.ts +43 -0
  32. package/es/ProEditLabel/propsType.js +1 -0
  33. package/es/ProEditLabel/style/index.less +105 -0
  34. package/es/ProEditLabel/utils/index.d.ts +9 -0
  35. package/es/ProEditLabel/utils/index.js +32 -0
  36. package/es/ProEditTable/components/ActionButton/index.d.ts +2 -0
  37. package/es/ProEditTable/components/ActionButton/index.js +70 -0
  38. package/es/ProEditTable/components/DndWrapper/index.d.ts +14 -0
  39. package/es/ProEditTable/components/DndWrapper/index.js +82 -0
  40. package/es/ProEditTable/components/RenderField/index.d.ts +2 -0
  41. package/es/ProEditTable/components/RenderField/index.js +467 -0
  42. package/es/ProEditTable/components/RenderToolbar/index.d.ts +2 -0
  43. package/es/ProEditTable/components/RenderToolbar/index.js +136 -0
  44. package/es/ProEditTable/components/Summary/index.d.ts +12 -0
  45. package/es/ProEditTable/components/Summary/index.js +79 -0
  46. package/es/ProEditTable/components/Validator/index.d.ts +10 -0
  47. package/es/ProEditTable/components/Validator/index.js +27 -0
  48. package/es/ProEditTable/components/index.d.ts +6 -0
  49. package/es/ProEditTable/components/index.js +6 -0
  50. package/es/ProEditTable/index.d.ts +4 -0
  51. package/es/ProEditTable/index.js +272 -0
  52. package/es/ProEditTable/propsType.d.ts +201 -0
  53. package/es/ProEditTable/propsType.js +1 -0
  54. package/es/ProEditTable/style/index.less +227 -0
  55. package/es/ProEditTable/utils/config.d.ts +25 -0
  56. package/es/ProEditTable/utils/config.js +214 -0
  57. package/es/ProEditTable/utils/index.d.ts +10 -0
  58. package/es/ProEditTable/utils/index.js +396 -0
  59. package/es/ProEditTable/utils/tools.d.ts +16 -0
  60. package/es/ProEditTable/utils/tools.js +75 -0
  61. package/es/ProEditTable/utils/transform.d.ts +5 -0
  62. package/es/ProEditTable/utils/transform.js +15 -0
  63. package/es/ProEnum/getEnumLabel.d.ts +2 -0
  64. package/es/ProEnum/getEnumLabel.js +62 -0
  65. package/es/ProEnum/index.d.ts +8 -0
  66. package/es/ProEnum/index.js +223 -0
  67. package/es/ProEnum/propsType.d.ts +80 -0
  68. package/es/ProEnum/propsType.js +1 -0
  69. package/es/ProEnum/useEnum.d.ts +14 -0
  70. package/es/ProEnum/useEnum.js +75 -0
  71. package/es/ProEnum/useEnumRequest.d.ts +3 -0
  72. package/es/ProEnum/useEnumRequest.js +232 -0
  73. package/es/ProEnum/utils.d.ts +30 -0
  74. package/es/ProEnum/utils.js +79 -0
  75. package/es/ProForm/components/Container.d.ts +8 -0
  76. package/es/ProForm/components/Container.js +27 -0
  77. package/es/ProForm/components/FormFooter/index.d.ts +4 -0
  78. package/es/ProForm/components/FormFooter/index.js +37 -0
  79. package/es/ProForm/components/FormFooter/propsType.d.ts +17 -0
  80. package/es/ProForm/components/FormFooter/propsType.js +1 -0
  81. package/es/ProForm/components/base/Checkbox/index.d.ts +13 -0
  82. package/es/ProForm/components/base/Checkbox/index.js +67 -0
  83. package/es/ProForm/components/base/DatePicker/index.d.ts +12 -0
  84. package/es/ProForm/components/base/DatePicker/index.js +64 -0
  85. package/es/ProForm/components/base/FormList/components/ActionButton.d.ts +19 -0
  86. package/es/ProForm/components/base/FormList/components/ActionButton.js +170 -0
  87. package/es/ProForm/components/base/FormList/components/BlockFields.d.ts +16 -0
  88. package/es/ProForm/components/base/FormList/components/BlockFields.js +69 -0
  89. package/es/ProForm/components/base/FormList/components/BlockTitle.d.ts +15 -0
  90. package/es/ProForm/components/base/FormList/components/BlockTitle.js +27 -0
  91. package/es/ProForm/components/base/FormList/components/LineFields.d.ts +14 -0
  92. package/es/ProForm/components/base/FormList/components/LineFields.js +46 -0
  93. package/es/ProForm/components/base/FormList/components/ToolbarButton.d.ts +12 -0
  94. package/es/ProForm/components/base/FormList/components/ToolbarButton.js +79 -0
  95. package/es/ProForm/components/base/FormList/index.d.ts +43 -0
  96. package/es/ProForm/components/base/FormList/index.js +94 -0
  97. package/es/ProForm/components/base/FormList/style/index.less +36 -0
  98. package/es/ProForm/components/base/FormList/utils.d.ts +10 -0
  99. package/es/ProForm/components/base/FormList/utils.js +19 -0
  100. package/es/ProForm/components/base/Input/index.d.ts +3 -0
  101. package/es/ProForm/components/base/Input/index.js +33 -0
  102. package/es/ProForm/components/base/Input/propsType.d.ts +14 -0
  103. package/es/ProForm/components/base/Input/propsType.js +1 -0
  104. package/es/ProForm/components/base/InputNumber/index.d.ts +10 -0
  105. package/es/ProForm/components/base/InputNumber/index.js +177 -0
  106. package/es/ProForm/components/base/Radio/index.d.ts +14 -0
  107. package/es/ProForm/components/base/Radio/index.js +63 -0
  108. package/es/ProForm/components/base/RangePicker/index.d.ts +9 -0
  109. package/es/ProForm/components/base/RangePicker/index.js +57 -0
  110. package/es/ProForm/components/base/Select/index.d.ts +9 -0
  111. package/es/ProForm/components/base/Select/index.js +66 -0
  112. package/es/ProForm/components/base/Switch/index.d.ts +9 -0
  113. package/es/ProForm/components/base/Switch/index.js +33 -0
  114. package/es/ProForm/components/base/SwitchCheckbox/index.d.ts +9 -0
  115. package/es/ProForm/components/base/SwitchCheckbox/index.js +46 -0
  116. package/es/ProForm/components/base/SwitchCheckbox/style/index.less +13 -0
  117. package/es/ProForm/components/base/TextArea/index.d.ts +8 -0
  118. package/es/ProForm/components/base/TextArea/index.js +35 -0
  119. package/es/ProForm/components/combination/ProAddressBar/index.d.ts +4 -0
  120. package/es/ProForm/components/combination/ProAddressBar/index.js +397 -0
  121. package/es/ProForm/components/combination/ProAddressBar/propsType.d.ts +28 -0
  122. package/es/ProForm/components/combination/ProAddressBar/propsType.js +1 -0
  123. package/es/ProForm/components/combination/ProAddressBar/style/index.less +26 -0
  124. package/es/ProForm/components/combination/ProCombination/index.d.ts +6 -0
  125. package/es/ProForm/components/combination/ProCombination/index.js +197 -0
  126. package/es/ProForm/components/combination/ProCombination/propsType.d.ts +62 -0
  127. package/es/ProForm/components/combination/ProCombination/propsType.js +1 -0
  128. package/es/ProForm/components/combination/ProCombination/style/index.less +15 -0
  129. package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.d.ts +33 -0
  130. package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +136 -0
  131. package/es/ProForm/components/combination/ProModalSelect/index.d.ts +4 -0
  132. package/es/ProForm/components/combination/ProModalSelect/index.js +644 -0
  133. package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +45 -0
  134. package/es/ProForm/components/combination/ProModalSelect/propsType.js +1 -0
  135. package/es/ProForm/components/combination/ProModalSelect/style/index.less +57 -0
  136. package/es/ProForm/components/combination/ProNumberRange/index.d.ts +4 -0
  137. package/es/ProForm/components/combination/ProNumberRange/index.js +182 -0
  138. package/es/ProForm/components/combination/ProNumberRange/propsType.d.ts +76 -0
  139. package/es/ProForm/components/combination/ProNumberRange/propsType.js +1 -0
  140. package/es/ProForm/components/combination/ProNumberRange/style/index.less +79 -0
  141. package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +17 -0
  142. package/es/ProForm/components/combination/ProRangeLimit/index.js +142 -0
  143. package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +8 -0
  144. package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +25 -0
  145. package/es/ProForm/components/combination/ProTimeLimit/hooks/useTransformDate.d.ts +12 -0
  146. package/es/ProForm/components/combination/ProTimeLimit/hooks/useTransformDate.js +36 -0
  147. package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +19 -0
  148. package/es/ProForm/components/combination/ProTimeLimit/index.js +126 -0
  149. package/es/ProForm/components/combination/ProTimeLimit/style/index.less +12 -0
  150. package/es/ProForm/components/index.d.ts +30 -0
  151. package/es/ProForm/components/index.js +34 -0
  152. package/es/ProForm/components/old/CertNo/index.d.ts +18 -0
  153. package/es/ProForm/components/old/CertNo/index.js +63 -0
  154. package/es/ProForm/components/old/CertNo/propsType.d.ts +13 -0
  155. package/es/ProForm/components/old/CertNo/propsType.js +1 -0
  156. package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +33 -0
  157. package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.js +108 -0
  158. package/es/ProForm/components/old/EnumSelect/index.d.ts +4 -0
  159. package/es/ProForm/components/old/EnumSelect/index.js +264 -0
  160. package/es/ProForm/components/old/EnumSelect/interface.d.ts +29 -0
  161. package/es/ProForm/components/old/EnumSelect/interface.js +1 -0
  162. package/es/ProForm/components/old/EnumSelect/style/index.less +114 -0
  163. package/es/ProForm/components/old/InputRange/index.d.ts +16 -0
  164. package/es/ProForm/components/old/InputRange/index.js +99 -0
  165. package/es/ProForm/components/old/InputWithSuffix/index.d.ts +3 -0
  166. package/es/ProForm/components/old/InputWithSuffix/index.js +44 -0
  167. package/es/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +11 -0
  168. package/es/ProForm/components/old/InputWithSuffix/propsTypes.js +1 -0
  169. package/es/ProForm/components/old/ProAddress/index.d.ts +27 -0
  170. package/es/ProForm/components/old/ProAddress/index.js +286 -0
  171. package/es/ProForm/components/old/ProAddress/propsTypes.d.ts +16 -0
  172. package/es/ProForm/components/old/ProAddress/propsTypes.js +1 -0
  173. package/es/ProForm/components/old/ProCertNo/index.d.ts +14 -0
  174. package/es/ProForm/components/old/ProCertNo/index.js +61 -0
  175. package/es/ProForm/components/old/ProCertNo/propsType.d.ts +18 -0
  176. package/es/ProForm/components/old/ProCertNo/propsType.js +1 -0
  177. package/es/ProForm/components/old/ProCertValidity/index.d.ts +9 -0
  178. package/es/ProForm/components/old/ProCertValidity/index.js +182 -0
  179. package/es/ProForm/components/old/ProCertValidity/propsType.d.ts +19 -0
  180. package/es/ProForm/components/old/ProCertValidity/propsType.js +1 -0
  181. package/es/ProForm/components/old/ProRangeBox/index.d.ts +2 -0
  182. package/es/ProForm/components/old/ProRangeBox/index.js +89 -0
  183. package/es/ProForm/components/old/ProRangeBox/propsType.d.ts +3 -0
  184. package/es/ProForm/components/old/ProRangeBox/propsType.js +1 -0
  185. package/es/ProForm/components/render/Render.d.ts +4 -0
  186. package/es/ProForm/components/render/Render.js +369 -0
  187. package/es/ProForm/components/render/RenderFields.d.ts +20 -0
  188. package/es/ProForm/components/render/RenderFields.js +176 -0
  189. package/es/ProForm/components/render/propsType.d.ts +210 -0
  190. package/es/ProForm/components/render/propsType.js +7 -0
  191. package/es/ProForm/index.d.ts +10 -0
  192. package/es/ProForm/index.js +249 -0
  193. package/es/ProForm/propsType.d.ts +69 -0
  194. package/es/ProForm/propsType.js +2 -0
  195. package/es/ProForm/style/index.less +410 -0
  196. package/es/ProForm/utils/contrastOriginal.d.ts +1 -0
  197. package/es/ProForm/utils/contrastOriginal.js +28 -0
  198. package/es/ProForm/utils/index.d.ts +59 -0
  199. package/es/ProForm/utils/index.js +298 -0
  200. package/es/ProForm/utils/rulesCreator.d.ts +1 -0
  201. package/es/ProForm/utils/rulesCreator.js +26 -0
  202. package/es/ProForm/utils/transformNames.d.ts +10 -0
  203. package/es/ProForm/utils/transformNames.js +32 -0
  204. package/es/ProForm/utils/transformValue.d.ts +6 -0
  205. package/es/ProForm/utils/transformValue.js +49 -0
  206. package/es/ProForm/utils/useChanged.d.ts +1 -0
  207. package/es/ProForm/utils/useChanged.js +10 -0
  208. package/es/ProForm/utils/useForm.d.ts +2 -0
  209. package/es/ProForm/utils/useForm.js +96 -0
  210. package/es/ProForm/utils/useShouldUpdate.d.ts +24 -0
  211. package/es/ProForm/utils/useShouldUpdate.js +184 -0
  212. package/es/ProForm/utils/valueType.d.ts +64 -0
  213. package/es/ProForm/utils/valueType.js +194 -0
  214. package/es/ProIcon/index.d.ts +5 -0
  215. package/es/ProIcon/index.js +60 -0
  216. package/es/ProIcon/propsTypes.d.ts +56 -0
  217. package/es/ProIcon/propsTypes.js +1 -0
  218. package/es/ProIcon/style/index.less +12 -0
  219. package/es/ProLayout/components/Layout/Header/index.d.ts +4 -0
  220. package/es/ProLayout/components/Layout/Header/index.js +33 -0
  221. package/es/ProLayout/components/Layout/Header/style/index.less +127 -0
  222. package/es/ProLayout/components/Layout/Icon/Icon.d.ts +10 -0
  223. package/es/ProLayout/components/Layout/Icon/Icon.js +31 -0
  224. package/es/ProLayout/components/Layout/Icon/index.d.ts +2 -0
  225. package/es/ProLayout/components/Layout/Icon/index.js +2 -0
  226. package/es/ProLayout/components/Layout/Icon/style/index.less +7 -0
  227. package/es/ProLayout/components/Layout/Menu/FoldMenu/index.d.ts +3 -0
  228. package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +98 -0
  229. package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +100 -0
  230. package/es/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +3 -0
  231. package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +144 -0
  232. package/es/ProLayout/components/Layout/Menu/OpenMenu/propsType.d.ts +14 -0
  233. package/es/ProLayout/components/Layout/Menu/OpenMenu/propsType.js +1 -0
  234. package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +177 -0
  235. package/es/ProLayout/components/Layout/Menu/SideMenu/index.d.ts +3 -0
  236. package/es/ProLayout/components/Layout/Menu/SideMenu/index.js +34 -0
  237. package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +97 -0
  238. package/es/ProLayout/components/Layout/Menu/index.d.ts +4 -0
  239. package/es/ProLayout/components/Layout/Menu/index.js +62 -0
  240. package/es/ProLayout/components/Layout/Menu/style/index.less +131 -0
  241. package/es/ProLayout/components/Layout/Notice/index.d.ts +4 -0
  242. package/es/ProLayout/components/Layout/Notice/index.js +27 -0
  243. package/es/ProLayout/components/Layout/Notice/style/index.less +34 -0
  244. package/es/ProLayout/components/Layout/index.d.ts +4 -0
  245. package/es/ProLayout/components/Layout/index.js +4 -0
  246. package/es/ProLayout/components/Layout/index.less +4 -0
  247. package/es/ProLayout/components/ProCollapse/PropTypes.d.ts +73 -0
  248. package/es/ProLayout/components/ProCollapse/PropTypes.js +1 -0
  249. package/es/ProLayout/components/ProCollapse/index.d.ts +3 -0
  250. package/es/ProLayout/components/ProCollapse/index.js +95 -0
  251. package/es/ProLayout/components/ProCollapse/style/index.less +153 -0
  252. package/es/ProLayout/components/ProFooter/PropTypes.d.ts +11 -0
  253. package/es/ProLayout/components/ProFooter/PropTypes.js +1 -0
  254. package/es/ProLayout/components/ProFooter/index.d.ts +4 -0
  255. package/es/ProLayout/components/ProFooter/index.js +47 -0
  256. package/es/ProLayout/components/ProFooter/style/index.less +10 -0
  257. package/es/ProLayout/components/ProHeader/PropTypes.d.ts +72 -0
  258. package/es/ProLayout/components/ProHeader/PropTypes.js +1 -0
  259. package/es/ProLayout/components/ProHeader/components/Copy/index.d.ts +4 -0
  260. package/es/ProLayout/components/ProHeader/components/Copy/index.js +25 -0
  261. package/es/ProLayout/components/ProHeader/components/index.d.ts +1 -0
  262. package/es/ProLayout/components/ProHeader/components/index.js +1 -0
  263. package/es/ProLayout/components/ProHeader/index.d.ts +4 -0
  264. package/es/ProLayout/components/ProHeader/index.js +367 -0
  265. package/es/ProLayout/components/ProHeader/style/index.less +337 -0
  266. package/es/ProLayout/components/index.d.ts +3 -0
  267. package/es/ProLayout/components/index.js +3 -0
  268. package/es/ProLayout/images/close.png +0 -0
  269. package/es/ProLayout/images/logoImg.png +0 -0
  270. package/es/ProLayout/images/pack.png +0 -0
  271. package/es/ProLayout/images/tipMsg.png +0 -0
  272. package/es/ProLayout/index.d.ts +20 -0
  273. package/es/ProLayout/index.js +108 -0
  274. package/es/ProLayout/propTypes.d.ts +60 -0
  275. package/es/ProLayout/propTypes.js +1 -0
  276. package/es/ProLayout/style/index.less +52 -0
  277. package/es/ProLayout/utils/index.d.ts +36 -0
  278. package/es/ProLayout/utils/index.js +159 -0
  279. package/es/ProSelect/index.d.ts +5 -0
  280. package/es/ProSelect/index.js +278 -0
  281. package/es/ProSelect/propsType.d.ts +41 -0
  282. package/es/ProSelect/propsType.js +1 -0
  283. package/es/ProStep/components/Anchor/index.d.ts +2 -0
  284. package/es/ProStep/components/Anchor/index.js +94 -0
  285. package/es/ProStep/components/Item/index.d.ts +6 -0
  286. package/es/ProStep/components/Item/index.js +18 -0
  287. package/es/ProStep/components/Listener/index.d.ts +5 -0
  288. package/es/ProStep/components/Listener/index.js +35 -0
  289. package/es/ProStep/components/Step/index.d.ts +5 -0
  290. package/es/ProStep/components/Step/index.js +68 -0
  291. package/es/ProStep/index.d.ts +18 -0
  292. package/es/ProStep/index.js +130 -0
  293. package/es/ProStep/propsType.d.ts +19 -0
  294. package/es/ProStep/propsType.js +1 -0
  295. package/es/ProStep/style/index.less +181 -0
  296. package/es/ProStep/utils/index.d.ts +2 -0
  297. package/es/ProStep/utils/index.js +16 -0
  298. package/es/ProTable/components/ResizableLine/index.d.ts +2 -0
  299. package/es/ProTable/components/ResizableLine/index.js +10 -0
  300. package/es/ProTable/components/TableResizable/index.d.ts +13 -0
  301. package/es/ProTable/components/TableResizable/index.js +98 -0
  302. package/es/ProTable/components/index.d.ts +2 -0
  303. package/es/ProTable/components/index.js +2 -0
  304. package/es/ProTable/index.d.ts +16 -0
  305. package/es/ProTable/index.js +316 -0
  306. package/es/ProTable/propsType.d.ts +87 -0
  307. package/es/ProTable/propsType.js +1 -0
  308. package/es/ProTable/style/index.less +299 -0
  309. package/es/ProTable/useAntdTable.d.ts +82 -0
  310. package/es/ProTable/useAntdTable.js +374 -0
  311. package/es/ProTable/utils.d.ts +12 -0
  312. package/es/ProTable/utils.js +234 -0
  313. package/es/ProTooltip/index.d.ts +4 -0
  314. package/es/ProTooltip/index.js +93 -0
  315. package/es/ProTooltip/propsType.d.ts +13 -0
  316. package/es/ProTooltip/propsType.js +1 -0
  317. package/es/ProTooltip/style/index.less +22 -0
  318. package/es/ProTransferModal/components/SortableItem/index.d.ts +10 -0
  319. package/es/ProTransferModal/components/SortableItem/index.js +56 -0
  320. package/es/ProTransferModal/index.d.ts +4 -0
  321. package/es/ProTransferModal/index.js +338 -0
  322. package/es/ProTransferModal/propsType.d.ts +34 -0
  323. package/es/ProTransferModal/propsType.js +1 -0
  324. package/es/ProTransferModal/style/index.less +161 -0
  325. package/es/ProUpload/Example.d.ts +7 -0
  326. package/es/ProUpload/Example.js +40 -0
  327. package/es/ProUpload/FileItem.d.ts +33 -0
  328. package/es/ProUpload/FileItem.js +207 -0
  329. package/es/ProUpload/index.d.ts +5 -0
  330. package/es/ProUpload/index.js +404 -0
  331. package/es/ProUpload/propsType.d.ts +132 -0
  332. package/es/ProUpload/propsType.js +1 -0
  333. package/es/ProUpload/style/delete.svg +1 -0
  334. package/es/ProUpload/style/download.svg +1 -0
  335. package/es/ProUpload/style/fileItem.less +158 -0
  336. package/es/ProUpload/style/icon-PDF.png +0 -0
  337. package/es/ProUpload/style/icon-TXT.png +0 -0
  338. package/es/ProUpload/style/icon-excel.png +0 -0
  339. package/es/ProUpload/style/icon-pic.png +0 -0
  340. package/es/ProUpload/style/icon-word.png +0 -0
  341. package/es/ProUpload/style/index.less +242 -0
  342. package/es/ProUpload/style/look.svg +1 -0
  343. package/es/ProUtils/utils/index.d.ts +6 -0
  344. package/es/ProUtils/utils/index.js +24 -0
  345. package/es/ProViewer/index.d.ts +4 -0
  346. package/es/ProViewer/index.js +209 -0
  347. package/es/ProViewer/propsType.d.ts +35 -0
  348. package/es/ProViewer/propsType.js +1 -0
  349. package/es/ProViewer/style/index.less +8 -0
  350. package/es/ProWaterMark/index.d.ts +4 -0
  351. package/es/ProWaterMark/index.js +13 -0
  352. package/es/ProWaterMark/propsType.d.ts +82 -0
  353. package/es/ProWaterMark/propsType.js +1 -0
  354. package/es/assets/arrow.svg +1 -0
  355. package/es/assets/catalog.svg +1 -0
  356. package/es/assets/copy.svg +1 -0
  357. package/es/assets/customColumn.svg +2 -0
  358. package/es/assets/delete.svg +1 -0
  359. package/es/assets/disabled.svg +18 -0
  360. package/es/assets/drag.svg +25 -0
  361. package/es/assets/empty.png +0 -0
  362. package/es/assets/reset.svg +11 -0
  363. package/es/assets/search.svg +1 -0
  364. package/es/assets/tip.svg +1 -0
  365. package/es/assets/view.svg +1 -0
  366. package/es/global.less +5 -0
  367. package/es/index.d.ts +30 -0
  368. package/es/index.js +44 -0
  369. package/es/old/ProBackBtn/index.d.ts +9 -0
  370. package/es/old/ProBackBtn/index.js +28 -0
  371. package/es/old/ProBackBtn/propsType.d.ts +4 -0
  372. package/es/old/ProBackBtn/propsType.js +1 -0
  373. package/es/old/ProBackBtn/style/index.less +19 -0
  374. package/es/old/ProCertValidity/index.d.ts +9 -0
  375. package/es/old/ProCertValidity/index.js +183 -0
  376. package/es/old/ProCertValidity/propsType.d.ts +19 -0
  377. package/es/old/ProCertValidity/propsType.js +1 -0
  378. package/es/old/ProCustomColumn/LeftBody.d.ts +4 -0
  379. package/es/old/ProCustomColumn/LeftBody.js +206 -0
  380. package/es/old/ProCustomColumn/RightBody.d.ts +9 -0
  381. package/es/old/ProCustomColumn/RightBody.js +145 -0
  382. package/es/old/ProCustomColumn/index.d.ts +4 -0
  383. package/es/old/ProCustomColumn/index.js +165 -0
  384. package/es/old/ProCustomColumn/propsType.d.ts +39 -0
  385. package/es/old/ProCustomColumn/propsType.js +1 -0
  386. package/es/old/ProCustomColumn/style/LeftBody.less +74 -0
  387. package/es/old/ProCustomColumn/style/RightBody.less +25 -0
  388. package/es/old/ProCustomColumn/style/index.less +88 -0
  389. package/es/old/ProEditableTable/index.d.ts +4 -0
  390. package/es/old/ProEditableTable/index.js +572 -0
  391. package/es/old/ProEditableTable/propsType.d.ts +68 -0
  392. package/es/old/ProEditableTable/propsType.js +1 -0
  393. package/es/old/ProEditableTable/style/index.less +76 -0
  394. package/es/old/ProEditableTable/utils.d.ts +29 -0
  395. package/es/old/ProEditableTable/utils.js +307 -0
  396. package/es/old/ProEnumSelectModal/hooks/useRequestList.d.ts +32 -0
  397. package/es/old/ProEnumSelectModal/hooks/useRequestList.js +110 -0
  398. package/es/old/ProEnumSelectModal/index.d.ts +12 -0
  399. package/es/old/ProEnumSelectModal/index.js +222 -0
  400. package/es/old/ProEnumSelectModal/propsType.d.ts +22 -0
  401. package/es/old/ProEnumSelectModal/propsType.js +1 -0
  402. package/es/old/ProEnumSelectModal/style/index.less +98 -0
  403. package/es/style/components.less +18 -0
  404. package/es/style/core/compatible.less +30 -0
  405. package/es/style/core/index.less +3 -0
  406. package/es/style/core/mixins.less +70 -0
  407. package/es/style/core/normalize.less +246 -0
  408. package/es/style/index.less +2 -0
  409. package/es/style/theme/antd.less +647 -0
  410. package/es/style/theme/index.less +190 -0
  411. package/lib/ProConfigProvider/index.d.ts +22 -0
  412. package/lib/ProConfigProvider/index.js +64 -0
  413. package/lib/ProDownload/DownloadHelper.d.ts +32 -0
  414. package/lib/ProDownload/DownloadHelper.js +183 -0
  415. package/lib/ProDownload/index.d.ts +4 -0
  416. package/lib/ProDownload/index.js +183 -0
  417. package/lib/ProDownload/propsType.d.ts +54 -0
  418. package/lib/ProDownload/propsType.js +5 -0
  419. package/lib/ProDrawerForm/components/ProDrawer/index.d.ts +7 -0
  420. package/lib/ProDrawerForm/components/ProDrawer/index.js +208 -0
  421. package/lib/ProDrawerForm/components/ProModal/index.d.ts +7 -0
  422. package/lib/ProDrawerForm/components/ProModal/index.js +167 -0
  423. package/lib/ProDrawerForm/components/index.d.ts +2 -0
  424. package/lib/ProDrawerForm/components/index.js +20 -0
  425. package/lib/ProDrawerForm/index.d.ts +5 -0
  426. package/lib/ProDrawerForm/index.js +73 -0
  427. package/lib/ProDrawerForm/propsType.d.ts +88 -0
  428. package/lib/ProDrawerForm/propsType.js +5 -0
  429. package/lib/ProDrawerForm/style/index.less +125 -0
  430. package/lib/ProDrawerForm/utils/index.d.ts +6 -0
  431. package/lib/ProDrawerForm/utils/index.js +23 -0
  432. package/lib/ProEditLabel/components/RenderForm.d.ts +3 -0
  433. package/lib/ProEditLabel/components/RenderForm.js +75 -0
  434. package/lib/ProEditLabel/index.d.ts +4 -0
  435. package/lib/ProEditLabel/index.js +324 -0
  436. package/lib/ProEditLabel/propsType.d.ts +43 -0
  437. package/lib/ProEditLabel/propsType.js +5 -0
  438. package/lib/ProEditLabel/style/index.less +105 -0
  439. package/lib/ProEditLabel/utils/index.d.ts +9 -0
  440. package/lib/ProEditLabel/utils/index.js +41 -0
  441. package/lib/ProEditTable/components/ActionButton/index.d.ts +2 -0
  442. package/lib/ProEditTable/components/ActionButton/index.js +75 -0
  443. package/lib/ProEditTable/components/DndWrapper/index.d.ts +14 -0
  444. package/lib/ProEditTable/components/DndWrapper/index.js +91 -0
  445. package/lib/ProEditTable/components/RenderField/index.d.ts +2 -0
  446. package/lib/ProEditTable/components/RenderField/index.js +473 -0
  447. package/lib/ProEditTable/components/RenderToolbar/index.d.ts +2 -0
  448. package/lib/ProEditTable/components/RenderToolbar/index.js +143 -0
  449. package/lib/ProEditTable/components/Summary/index.d.ts +12 -0
  450. package/lib/ProEditTable/components/Summary/index.js +84 -0
  451. package/lib/ProEditTable/components/Validator/index.d.ts +10 -0
  452. package/lib/ProEditTable/components/Validator/index.js +32 -0
  453. package/lib/ProEditTable/components/index.d.ts +6 -0
  454. package/lib/ProEditTable/components/index.js +55 -0
  455. package/lib/ProEditTable/index.d.ts +4 -0
  456. package/lib/ProEditTable/index.js +278 -0
  457. package/lib/ProEditTable/propsType.d.ts +201 -0
  458. package/lib/ProEditTable/propsType.js +5 -0
  459. package/lib/ProEditTable/style/index.less +227 -0
  460. package/lib/ProEditTable/utils/config.d.ts +25 -0
  461. package/lib/ProEditTable/utils/config.js +227 -0
  462. package/lib/ProEditTable/utils/index.d.ts +10 -0
  463. package/lib/ProEditTable/utils/index.js +401 -0
  464. package/lib/ProEditTable/utils/tools.d.ts +16 -0
  465. package/lib/ProEditTable/utils/tools.js +87 -0
  466. package/lib/ProEditTable/utils/transform.d.ts +5 -0
  467. package/lib/ProEditTable/utils/transform.js +22 -0
  468. package/lib/ProEnum/getEnumLabel.d.ts +2 -0
  469. package/lib/ProEnum/getEnumLabel.js +70 -0
  470. package/lib/ProEnum/index.d.ts +8 -0
  471. package/lib/ProEnum/index.js +225 -0
  472. package/lib/ProEnum/propsType.d.ts +80 -0
  473. package/lib/ProEnum/propsType.js +5 -0
  474. package/lib/ProEnum/useEnum.d.ts +14 -0
  475. package/lib/ProEnum/useEnum.js +84 -0
  476. package/lib/ProEnum/useEnumRequest.d.ts +3 -0
  477. package/lib/ProEnum/useEnumRequest.js +241 -0
  478. package/lib/ProEnum/utils.d.ts +30 -0
  479. package/lib/ProEnum/utils.js +92 -0
  480. package/lib/ProForm/components/Container.d.ts +8 -0
  481. package/lib/ProForm/components/Container.js +34 -0
  482. package/lib/ProForm/components/FormFooter/index.d.ts +4 -0
  483. package/lib/ProForm/components/FormFooter/index.js +42 -0
  484. package/lib/ProForm/components/FormFooter/propsType.d.ts +17 -0
  485. package/lib/ProForm/components/FormFooter/propsType.js +5 -0
  486. package/lib/ProForm/components/base/Checkbox/index.d.ts +13 -0
  487. package/lib/ProForm/components/base/Checkbox/index.js +74 -0
  488. package/lib/ProForm/components/base/DatePicker/index.d.ts +12 -0
  489. package/lib/ProForm/components/base/DatePicker/index.js +71 -0
  490. package/lib/ProForm/components/base/FormList/components/ActionButton.d.ts +19 -0
  491. package/lib/ProForm/components/base/FormList/components/ActionButton.js +174 -0
  492. package/lib/ProForm/components/base/FormList/components/BlockFields.d.ts +16 -0
  493. package/lib/ProForm/components/base/FormList/components/BlockFields.js +75 -0
  494. package/lib/ProForm/components/base/FormList/components/BlockTitle.d.ts +15 -0
  495. package/lib/ProForm/components/base/FormList/components/BlockTitle.js +35 -0
  496. package/lib/ProForm/components/base/FormList/components/LineFields.d.ts +14 -0
  497. package/lib/ProForm/components/base/FormList/components/LineFields.js +53 -0
  498. package/lib/ProForm/components/base/FormList/components/ToolbarButton.d.ts +12 -0
  499. package/lib/ProForm/components/base/FormList/components/ToolbarButton.js +85 -0
  500. package/lib/ProForm/components/base/FormList/index.d.ts +43 -0
  501. package/lib/ProForm/components/base/FormList/index.js +102 -0
  502. package/lib/ProForm/components/base/FormList/style/index.less +36 -0
  503. package/lib/ProForm/components/base/FormList/utils.d.ts +10 -0
  504. package/lib/ProForm/components/base/FormList/utils.js +26 -0
  505. package/lib/ProForm/components/base/Input/index.d.ts +3 -0
  506. package/lib/ProForm/components/base/Input/index.js +40 -0
  507. package/lib/ProForm/components/base/Input/propsType.d.ts +14 -0
  508. package/lib/ProForm/components/base/Input/propsType.js +5 -0
  509. package/lib/ProForm/components/base/InputNumber/index.d.ts +10 -0
  510. package/lib/ProForm/components/base/InputNumber/index.js +183 -0
  511. package/lib/ProForm/components/base/Radio/index.d.ts +14 -0
  512. package/lib/ProForm/components/base/Radio/index.js +70 -0
  513. package/lib/ProForm/components/base/RangePicker/index.d.ts +9 -0
  514. package/lib/ProForm/components/base/RangePicker/index.js +64 -0
  515. package/lib/ProForm/components/base/Select/index.d.ts +9 -0
  516. package/lib/ProForm/components/base/Select/index.js +73 -0
  517. package/lib/ProForm/components/base/Switch/index.d.ts +9 -0
  518. package/lib/ProForm/components/base/Switch/index.js +40 -0
  519. package/lib/ProForm/components/base/SwitchCheckbox/index.d.ts +9 -0
  520. package/lib/ProForm/components/base/SwitchCheckbox/index.js +54 -0
  521. package/lib/ProForm/components/base/SwitchCheckbox/style/index.less +13 -0
  522. package/lib/ProForm/components/base/TextArea/index.d.ts +8 -0
  523. package/lib/ProForm/components/base/TextArea/index.js +42 -0
  524. package/lib/ProForm/components/combination/ProAddressBar/index.d.ts +4 -0
  525. package/lib/ProForm/components/combination/ProAddressBar/index.js +401 -0
  526. package/lib/ProForm/components/combination/ProAddressBar/propsType.d.ts +28 -0
  527. package/lib/ProForm/components/combination/ProAddressBar/propsType.js +5 -0
  528. package/lib/ProForm/components/combination/ProAddressBar/style/index.less +26 -0
  529. package/lib/ProForm/components/combination/ProCombination/index.d.ts +6 -0
  530. package/lib/ProForm/components/combination/ProCombination/index.js +204 -0
  531. package/lib/ProForm/components/combination/ProCombination/propsType.d.ts +62 -0
  532. package/lib/ProForm/components/combination/ProCombination/propsType.js +5 -0
  533. package/lib/ProForm/components/combination/ProCombination/style/index.less +15 -0
  534. package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.d.ts +33 -0
  535. package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +145 -0
  536. package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +4 -0
  537. package/lib/ProForm/components/combination/ProModalSelect/index.js +646 -0
  538. package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +45 -0
  539. package/lib/ProForm/components/combination/ProModalSelect/propsType.js +5 -0
  540. package/lib/ProForm/components/combination/ProModalSelect/style/index.less +57 -0
  541. package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +4 -0
  542. package/lib/ProForm/components/combination/ProNumberRange/index.js +187 -0
  543. package/lib/ProForm/components/combination/ProNumberRange/propsType.d.ts +76 -0
  544. package/lib/ProForm/components/combination/ProNumberRange/propsType.js +5 -0
  545. package/lib/ProForm/components/combination/ProNumberRange/style/index.less +79 -0
  546. package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +17 -0
  547. package/lib/ProForm/components/combination/ProRangeLimit/index.js +146 -0
  548. package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +8 -0
  549. package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +33 -0
  550. package/lib/ProForm/components/combination/ProTimeLimit/hooks/useTransformDate.d.ts +12 -0
  551. package/lib/ProForm/components/combination/ProTimeLimit/hooks/useTransformDate.js +44 -0
  552. package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +19 -0
  553. package/lib/ProForm/components/combination/ProTimeLimit/index.js +131 -0
  554. package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +12 -0
  555. package/lib/ProForm/components/index.d.ts +30 -0
  556. package/lib/ProForm/components/index.js +223 -0
  557. package/lib/ProForm/components/old/CertNo/index.d.ts +18 -0
  558. package/lib/ProForm/components/old/CertNo/index.js +69 -0
  559. package/lib/ProForm/components/old/CertNo/propsType.d.ts +13 -0
  560. package/lib/ProForm/components/old/CertNo/propsType.js +5 -0
  561. package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +33 -0
  562. package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.js +115 -0
  563. package/lib/ProForm/components/old/EnumSelect/index.d.ts +4 -0
  564. package/lib/ProForm/components/old/EnumSelect/index.js +266 -0
  565. package/lib/ProForm/components/old/EnumSelect/interface.d.ts +29 -0
  566. package/lib/ProForm/components/old/EnumSelect/interface.js +5 -0
  567. package/lib/ProForm/components/old/EnumSelect/style/index.less +114 -0
  568. package/lib/ProForm/components/old/InputRange/index.d.ts +16 -0
  569. package/lib/ProForm/components/old/InputRange/index.js +105 -0
  570. package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +3 -0
  571. package/lib/ProForm/components/old/InputWithSuffix/index.js +51 -0
  572. package/lib/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +11 -0
  573. package/lib/ProForm/components/old/InputWithSuffix/propsTypes.js +5 -0
  574. package/lib/ProForm/components/old/ProAddress/index.d.ts +27 -0
  575. package/lib/ProForm/components/old/ProAddress/index.js +290 -0
  576. package/lib/ProForm/components/old/ProAddress/propsTypes.d.ts +16 -0
  577. package/lib/ProForm/components/old/ProAddress/propsTypes.js +5 -0
  578. package/lib/ProForm/components/old/ProCertNo/index.d.ts +14 -0
  579. package/lib/ProForm/components/old/ProCertNo/index.js +66 -0
  580. package/lib/ProForm/components/old/ProCertNo/propsType.d.ts +18 -0
  581. package/lib/ProForm/components/old/ProCertNo/propsType.js +5 -0
  582. package/lib/ProForm/components/old/ProCertValidity/index.d.ts +9 -0
  583. package/lib/ProForm/components/old/ProCertValidity/index.js +187 -0
  584. package/lib/ProForm/components/old/ProCertValidity/propsType.d.ts +19 -0
  585. package/lib/ProForm/components/old/ProCertValidity/propsType.js +5 -0
  586. package/lib/ProForm/components/old/ProRangeBox/index.d.ts +2 -0
  587. package/lib/ProForm/components/old/ProRangeBox/index.js +88 -0
  588. package/lib/ProForm/components/old/ProRangeBox/propsType.d.ts +3 -0
  589. package/lib/ProForm/components/old/ProRangeBox/propsType.js +5 -0
  590. package/lib/ProForm/components/render/Render.d.ts +4 -0
  591. package/lib/ProForm/components/render/Render.js +373 -0
  592. package/lib/ProForm/components/render/RenderFields.d.ts +20 -0
  593. package/lib/ProForm/components/render/RenderFields.js +185 -0
  594. package/lib/ProForm/components/render/propsType.d.ts +210 -0
  595. package/lib/ProForm/components/render/propsType.js +11 -0
  596. package/lib/ProForm/index.d.ts +10 -0
  597. package/lib/ProForm/index.js +251 -0
  598. package/lib/ProForm/propsType.d.ts +69 -0
  599. package/lib/ProForm/propsType.js +23 -0
  600. package/lib/ProForm/style/index.less +410 -0
  601. package/lib/ProForm/utils/contrastOriginal.d.ts +1 -0
  602. package/lib/ProForm/utils/contrastOriginal.js +35 -0
  603. package/lib/ProForm/utils/index.d.ts +59 -0
  604. package/lib/ProForm/utils/index.js +328 -0
  605. package/lib/ProForm/utils/rulesCreator.d.ts +1 -0
  606. package/lib/ProForm/utils/rulesCreator.js +33 -0
  607. package/lib/ProForm/utils/transformNames.d.ts +10 -0
  608. package/lib/ProForm/utils/transformNames.js +39 -0
  609. package/lib/ProForm/utils/transformValue.d.ts +6 -0
  610. package/lib/ProForm/utils/transformValue.js +58 -0
  611. package/lib/ProForm/utils/useChanged.d.ts +1 -0
  612. package/lib/ProForm/utils/useChanged.js +16 -0
  613. package/lib/ProForm/utils/useForm.d.ts +2 -0
  614. package/lib/ProForm/utils/useForm.js +103 -0
  615. package/lib/ProForm/utils/useShouldUpdate.d.ts +24 -0
  616. package/lib/ProForm/utils/useShouldUpdate.js +192 -0
  617. package/lib/ProForm/utils/valueType.d.ts +64 -0
  618. package/lib/ProForm/utils/valueType.js +202 -0
  619. package/lib/ProIcon/index.d.ts +5 -0
  620. package/lib/ProIcon/index.js +68 -0
  621. package/lib/ProIcon/propsTypes.d.ts +56 -0
  622. package/lib/ProIcon/propsTypes.js +5 -0
  623. package/lib/ProIcon/style/index.less +12 -0
  624. package/lib/ProLayout/components/Layout/Header/index.d.ts +4 -0
  625. package/lib/ProLayout/components/Layout/Header/index.js +41 -0
  626. package/lib/ProLayout/components/Layout/Header/style/index.less +127 -0
  627. package/lib/ProLayout/components/Layout/Icon/Icon.d.ts +10 -0
  628. package/lib/ProLayout/components/Layout/Icon/Icon.js +39 -0
  629. package/lib/ProLayout/components/Layout/Icon/index.d.ts +2 -0
  630. package/lib/ProLayout/components/Layout/Icon/index.js +10 -0
  631. package/lib/ProLayout/components/Layout/Icon/style/index.less +7 -0
  632. package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.d.ts +3 -0
  633. package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +103 -0
  634. package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +100 -0
  635. package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +3 -0
  636. package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +152 -0
  637. package/lib/ProLayout/components/Layout/Menu/OpenMenu/propsType.d.ts +14 -0
  638. package/lib/ProLayout/components/Layout/Menu/OpenMenu/propsType.js +5 -0
  639. package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +177 -0
  640. package/lib/ProLayout/components/Layout/Menu/SideMenu/index.d.ts +3 -0
  641. package/lib/ProLayout/components/Layout/Menu/SideMenu/index.js +43 -0
  642. package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +97 -0
  643. package/lib/ProLayout/components/Layout/Menu/index.d.ts +4 -0
  644. package/lib/ProLayout/components/Layout/Menu/index.js +71 -0
  645. package/lib/ProLayout/components/Layout/Menu/style/index.less +131 -0
  646. package/lib/ProLayout/components/Layout/Notice/index.d.ts +4 -0
  647. package/lib/ProLayout/components/Layout/Notice/index.js +35 -0
  648. package/lib/ProLayout/components/Layout/Notice/style/index.less +34 -0
  649. package/lib/ProLayout/components/Layout/index.d.ts +4 -0
  650. package/lib/ProLayout/components/Layout/index.js +34 -0
  651. package/lib/ProLayout/components/Layout/index.less +4 -0
  652. package/lib/ProLayout/components/ProCollapse/PropTypes.d.ts +73 -0
  653. package/lib/ProLayout/components/ProCollapse/PropTypes.js +5 -0
  654. package/lib/ProLayout/components/ProCollapse/index.d.ts +3 -0
  655. package/lib/ProLayout/components/ProCollapse/index.js +100 -0
  656. package/lib/ProLayout/components/ProCollapse/style/index.less +153 -0
  657. package/lib/ProLayout/components/ProFooter/PropTypes.d.ts +11 -0
  658. package/lib/ProLayout/components/ProFooter/PropTypes.js +5 -0
  659. package/lib/ProLayout/components/ProFooter/index.d.ts +4 -0
  660. package/lib/ProLayout/components/ProFooter/index.js +55 -0
  661. package/lib/ProLayout/components/ProFooter/style/index.less +10 -0
  662. package/lib/ProLayout/components/ProHeader/PropTypes.d.ts +72 -0
  663. package/lib/ProLayout/components/ProHeader/PropTypes.js +5 -0
  664. package/lib/ProLayout/components/ProHeader/components/Copy/index.d.ts +4 -0
  665. package/lib/ProLayout/components/ProHeader/components/Copy/index.js +32 -0
  666. package/lib/ProLayout/components/ProHeader/components/index.d.ts +1 -0
  667. package/lib/ProLayout/components/ProHeader/components/index.js +13 -0
  668. package/lib/ProLayout/components/ProHeader/index.d.ts +4 -0
  669. package/lib/ProLayout/components/ProHeader/index.js +371 -0
  670. package/lib/ProLayout/components/ProHeader/style/index.less +337 -0
  671. package/lib/ProLayout/components/index.d.ts +3 -0
  672. package/lib/ProLayout/components/index.js +27 -0
  673. package/lib/ProLayout/images/close.png +0 -0
  674. package/lib/ProLayout/images/logoImg.png +0 -0
  675. package/lib/ProLayout/images/pack.png +0 -0
  676. package/lib/ProLayout/images/tipMsg.png +0 -0
  677. package/lib/ProLayout/index.d.ts +20 -0
  678. package/lib/ProLayout/index.js +117 -0
  679. package/lib/ProLayout/propTypes.d.ts +60 -0
  680. package/lib/ProLayout/propTypes.js +5 -0
  681. package/lib/ProLayout/style/index.less +52 -0
  682. package/lib/ProLayout/utils/index.d.ts +36 -0
  683. package/lib/ProLayout/utils/index.js +173 -0
  684. package/lib/ProSelect/index.d.ts +5 -0
  685. package/lib/ProSelect/index.js +279 -0
  686. package/lib/ProSelect/propsType.d.ts +41 -0
  687. package/lib/ProSelect/propsType.js +5 -0
  688. package/lib/ProStep/components/Anchor/index.d.ts +2 -0
  689. package/lib/ProStep/components/Anchor/index.js +103 -0
  690. package/lib/ProStep/components/Item/index.d.ts +6 -0
  691. package/lib/ProStep/components/Item/index.js +26 -0
  692. package/lib/ProStep/components/Listener/index.d.ts +5 -0
  693. package/lib/ProStep/components/Listener/index.js +43 -0
  694. package/lib/ProStep/components/Step/index.d.ts +5 -0
  695. package/lib/ProStep/components/Step/index.js +78 -0
  696. package/lib/ProStep/index.d.ts +18 -0
  697. package/lib/ProStep/index.js +141 -0
  698. package/lib/ProStep/propsType.d.ts +19 -0
  699. package/lib/ProStep/propsType.js +5 -0
  700. package/lib/ProStep/style/index.less +181 -0
  701. package/lib/ProStep/utils/index.d.ts +2 -0
  702. package/lib/ProStep/utils/index.js +24 -0
  703. package/lib/ProTable/components/ResizableLine/index.d.ts +2 -0
  704. package/lib/ProTable/components/ResizableLine/index.js +18 -0
  705. package/lib/ProTable/components/TableResizable/index.d.ts +13 -0
  706. package/lib/ProTable/components/TableResizable/index.js +99 -0
  707. package/lib/ProTable/components/index.d.ts +2 -0
  708. package/lib/ProTable/components/index.js +20 -0
  709. package/lib/ProTable/index.d.ts +16 -0
  710. package/lib/ProTable/index.js +324 -0
  711. package/lib/ProTable/propsType.d.ts +87 -0
  712. package/lib/ProTable/propsType.js +5 -0
  713. package/lib/ProTable/style/index.less +299 -0
  714. package/lib/ProTable/useAntdTable.d.ts +82 -0
  715. package/lib/ProTable/useAntdTable.js +382 -0
  716. package/lib/ProTable/utils.d.ts +12 -0
  717. package/lib/ProTable/utils.js +242 -0
  718. package/lib/ProTooltip/index.d.ts +4 -0
  719. package/lib/ProTooltip/index.js +101 -0
  720. package/lib/ProTooltip/propsType.d.ts +13 -0
  721. package/lib/ProTooltip/propsType.js +5 -0
  722. package/lib/ProTooltip/style/index.less +22 -0
  723. package/lib/ProTransferModal/components/SortableItem/index.d.ts +10 -0
  724. package/lib/ProTransferModal/components/SortableItem/index.js +63 -0
  725. package/lib/ProTransferModal/index.d.ts +4 -0
  726. package/lib/ProTransferModal/index.js +334 -0
  727. package/lib/ProTransferModal/propsType.d.ts +34 -0
  728. package/lib/ProTransferModal/propsType.js +5 -0
  729. package/lib/ProTransferModal/style/index.less +161 -0
  730. package/lib/ProUpload/Example.d.ts +7 -0
  731. package/lib/ProUpload/Example.js +50 -0
  732. package/lib/ProUpload/FileItem.d.ts +33 -0
  733. package/lib/ProUpload/FileItem.js +216 -0
  734. package/lib/ProUpload/index.d.ts +5 -0
  735. package/lib/ProUpload/index.js +406 -0
  736. package/lib/ProUpload/propsType.d.ts +132 -0
  737. package/lib/ProUpload/propsType.js +5 -0
  738. package/lib/ProUpload/style/delete.svg +1 -0
  739. package/lib/ProUpload/style/download.svg +1 -0
  740. package/lib/ProUpload/style/fileItem.less +158 -0
  741. package/lib/ProUpload/style/icon-PDF.png +0 -0
  742. package/lib/ProUpload/style/icon-TXT.png +0 -0
  743. package/lib/ProUpload/style/icon-excel.png +0 -0
  744. package/lib/ProUpload/style/icon-pic.png +0 -0
  745. package/lib/ProUpload/style/icon-word.png +0 -0
  746. package/lib/ProUpload/style/index.less +242 -0
  747. package/lib/ProUpload/style/look.svg +1 -0
  748. package/lib/ProUtils/utils/index.d.ts +6 -0
  749. package/lib/ProUtils/utils/index.js +31 -0
  750. package/lib/ProViewer/index.d.ts +4 -0
  751. package/lib/ProViewer/index.js +214 -0
  752. package/lib/ProViewer/propsType.d.ts +35 -0
  753. package/lib/ProViewer/propsType.js +5 -0
  754. package/lib/ProViewer/style/index.less +8 -0
  755. package/lib/ProWaterMark/index.d.ts +4 -0
  756. package/lib/ProWaterMark/index.js +21 -0
  757. package/lib/ProWaterMark/propsType.d.ts +82 -0
  758. package/lib/ProWaterMark/propsType.js +5 -0
  759. package/lib/assets/arrow.svg +1 -0
  760. package/lib/assets/catalog.svg +1 -0
  761. package/lib/assets/copy.svg +1 -0
  762. package/lib/assets/customColumn.svg +2 -0
  763. package/lib/assets/delete.svg +1 -0
  764. package/lib/assets/disabled.svg +18 -0
  765. package/lib/assets/drag.svg +25 -0
  766. package/lib/assets/empty.png +0 -0
  767. package/lib/assets/reset.svg +11 -0
  768. package/lib/assets/search.svg +1 -0
  769. package/lib/assets/tip.svg +1 -0
  770. package/lib/assets/view.svg +1 -0
  771. package/lib/global.less +5 -0
  772. package/lib/index.d.ts +30 -0
  773. package/lib/index.js +267 -0
  774. package/lib/old/ProBackBtn/index.d.ts +9 -0
  775. package/lib/old/ProBackBtn/index.js +35 -0
  776. package/lib/old/ProBackBtn/propsType.d.ts +4 -0
  777. package/lib/old/ProBackBtn/propsType.js +5 -0
  778. package/lib/old/ProBackBtn/style/index.less +19 -0
  779. package/lib/old/ProCertValidity/index.d.ts +9 -0
  780. package/lib/old/ProCertValidity/index.js +188 -0
  781. package/lib/old/ProCertValidity/propsType.d.ts +19 -0
  782. package/lib/old/ProCertValidity/propsType.js +5 -0
  783. package/lib/old/ProCustomColumn/LeftBody.d.ts +4 -0
  784. package/lib/old/ProCustomColumn/LeftBody.js +212 -0
  785. package/lib/old/ProCustomColumn/RightBody.d.ts +9 -0
  786. package/lib/old/ProCustomColumn/RightBody.js +150 -0
  787. package/lib/old/ProCustomColumn/index.d.ts +4 -0
  788. package/lib/old/ProCustomColumn/index.js +171 -0
  789. package/lib/old/ProCustomColumn/propsType.d.ts +39 -0
  790. package/lib/old/ProCustomColumn/propsType.js +5 -0
  791. package/lib/old/ProCustomColumn/style/LeftBody.less +74 -0
  792. package/lib/old/ProCustomColumn/style/RightBody.less +25 -0
  793. package/lib/old/ProCustomColumn/style/index.less +88 -0
  794. package/lib/old/ProEditableTable/index.d.ts +4 -0
  795. package/lib/old/ProEditableTable/index.js +568 -0
  796. package/lib/old/ProEditableTable/propsType.d.ts +68 -0
  797. package/lib/old/ProEditableTable/propsType.js +5 -0
  798. package/lib/old/ProEditableTable/style/index.less +76 -0
  799. package/lib/old/ProEditableTable/utils.d.ts +29 -0
  800. package/lib/old/ProEditableTable/utils.js +302 -0
  801. package/lib/old/ProEnumSelectModal/hooks/useRequestList.d.ts +32 -0
  802. package/lib/old/ProEnumSelectModal/hooks/useRequestList.js +117 -0
  803. package/lib/old/ProEnumSelectModal/index.d.ts +12 -0
  804. package/lib/old/ProEnumSelectModal/index.js +220 -0
  805. package/lib/old/ProEnumSelectModal/propsType.d.ts +22 -0
  806. package/lib/old/ProEnumSelectModal/propsType.js +5 -0
  807. package/lib/old/ProEnumSelectModal/style/index.less +98 -0
  808. package/lib/style/components.less +18 -0
  809. package/lib/style/core/compatible.less +30 -0
  810. package/lib/style/core/index.less +3 -0
  811. package/lib/style/core/mixins.less +70 -0
  812. package/lib/style/core/normalize.less +246 -0
  813. package/lib/style/index.less +2 -0
  814. package/lib/style/theme/antd.less +647 -0
  815. package/lib/style/theme/index.less +190 -0
  816. package/package.json +121 -0
  817. package/source-code/package.json +16 -0
  818. package/typings.d.ts +6 -0
@@ -0,0 +1,568 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+ var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
10
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
12
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
13
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
14
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
15
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
16
+ var _icons = require("@ant-design/icons");
17
+ var _ahooks = require("ahooks");
18
+ var _antd = require("antd");
19
+ var _lodash = require("lodash");
20
+ var _react = _interopRequireWildcard(require("react"));
21
+ var _empty = _interopRequireDefault(require("../../assets/empty.png"));
22
+ var _utils = require("./utils");
23
+ var _excluded = ["form", "dataSource", "setDataSource", "columns", "actionRef", "addButtonProps", "pagination", "editType", "onlyOneLineEditorAlertMessage", "noSaveAlertMessage", "mulDeletePoconfirmMsg", "name", "disabled", "formProps"],
24
+ _excluded2 = ["isCanAdd", "isCanMultipleDelete", "multipleDeleteModalProps", "position", "buttonText", "emptyButtonText", "insertType", "onlyAddOneLineAlertMessage"];
25
+ // 1、保证再去取dataSource数据纯净 table里面用list进行处理
26
+ var ProEditableTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
27
+ var originForm = props.form,
28
+ dataSource = props.dataSource,
29
+ setDataSource = props.setDataSource,
30
+ columns = props.columns,
31
+ actionRef = props.actionRef,
32
+ addButtonProps = props.addButtonProps,
33
+ pagination = props.pagination,
34
+ editType = props.editType,
35
+ onlyOneLineEditorAlertMessage = props.onlyOneLineEditorAlertMessage,
36
+ noSaveAlertMessage = props.noSaveAlertMessage,
37
+ mulDeletePoconfirmMsg = props.mulDeletePoconfirmMsg,
38
+ _props$name = props.name,
39
+ name = _props$name === void 0 ? 'dataList' : _props$name,
40
+ disabled = props.disabled,
41
+ formProps = props.formProps,
42
+ otherProps = (0, _objectWithoutProperties2.default)(props, _excluded);
43
+ var isSingle = editType === 'single';
44
+ var _Form$useForm = _antd.Form.useForm(originForm),
45
+ _Form$useForm2 = (0, _slicedToArray2.default)(_Form$useForm, 1),
46
+ form = _Form$useForm2[0];
47
+ // table实例
48
+ var tableRef = (0, _react.useRef)();
49
+ var _useState = (0, _react.useState)(dataSource),
50
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
51
+ list = _useState2[0],
52
+ setList = _useState2[1];
53
+ var _useState3 = (0, _react.useState)([]),
54
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
55
+ selectedRowKeys = _useState4[0],
56
+ setSelectedRowKeys = _useState4[1];
57
+ var _useState5 = (0, _react.useState)([]),
58
+ _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
59
+ selectedRows = _useState6[0],
60
+ setSelectedRows = _useState6[1];
61
+ var _useSetState = (0, _ahooks.useSetState)([]),
62
+ _useSetState2 = (0, _slicedToArray2.default)(_useSetState, 2),
63
+ originRowData = _useSetState2[0],
64
+ setOriginRowData = _useSetState2[1];
65
+ var _ref = addButtonProps || {},
66
+ _ref$isCanAdd = _ref.isCanAdd,
67
+ isCanAdd = _ref$isCanAdd === void 0 ? true : _ref$isCanAdd,
68
+ _ref$isCanMultipleDel = _ref.isCanMultipleDelete,
69
+ isCanMultipleDelete = _ref$isCanMultipleDel === void 0 ? false : _ref$isCanMultipleDel,
70
+ _ref$multipleDeleteMo = _ref.multipleDeleteModalProps,
71
+ multipleDeleteModalProps = _ref$multipleDeleteMo === void 0 ? {} : _ref$multipleDeleteMo,
72
+ _ref$position = _ref.position,
73
+ position = _ref$position === void 0 ? 'bottomLeft' : _ref$position,
74
+ _ref$buttonText = _ref.buttonText,
75
+ buttonText = _ref$buttonText === void 0 ? '添加一行' : _ref$buttonText,
76
+ _ref$emptyButtonText = _ref.emptyButtonText,
77
+ emptyButtonText = _ref$emptyButtonText === void 0 ? '点击添加' : _ref$emptyButtonText,
78
+ _ref$insertType = _ref.insertType,
79
+ insertType = _ref$insertType === void 0 ? 'after' : _ref$insertType,
80
+ _ref$onlyAddOneLineAl = _ref.onlyAddOneLineAlertMessage,
81
+ onlyAddOneLineAlertMessage = _ref$onlyAddOneLineAl === void 0 ? '只能新增一行' : _ref$onlyAddOneLineAl,
82
+ antButtonProps = (0, _objectWithoutProperties2.default)(_ref, _excluded2);
83
+ // 获取key
84
+ var getRowKey = function getRowKey(record) {
85
+ return record.rowKey;
86
+ };
87
+ var rowSelection = {
88
+ onChange: function onChange(selectedRowKeys, selectedRows) {
89
+ setSelectedRows(selectedRows);
90
+ setSelectedRowKeys(selectedRowKeys);
91
+ }
92
+ // getCheckboxProps: (record: any) => ({
93
+ // disabled: !getRowKey(record) || String(getRowKey(record)).startsWith('&&'), // 新增的虚拟行不可选中
94
+ // }),
95
+ };
96
+ /**
97
+ * 监听行数据变化同步list
98
+ * @param {number} rowIndex 修改行的index
99
+ * @param {any} values 需要更新的数据
100
+ * @returns {promise}
101
+ */
102
+ var onUpdateRowData = function onUpdateRowData(rowIndex, values) {
103
+ var nextList = (0, _lodash.cloneDeep)(list);
104
+ nextList[rowIndex] = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, nextList[rowIndex]), values);
105
+ setDataSource ? setDataSource(nextList) : setList((0, _toConsumableArray2.default)(nextList));
106
+ return Promise.resolve({
107
+ rowIndex: rowIndex,
108
+ nextList: nextList,
109
+ list: (0, _utils.formatList)(nextList),
110
+ rowData: nextList[rowIndex]
111
+ });
112
+ };
113
+ var handleMulResetForm = function handleMulResetForm() {
114
+ var values = form.getFieldsValue();
115
+ var tempValues = {};
116
+ Object.keys(values).forEach(function (index) {
117
+ tempValues[+index + 1] = values[index];
118
+ });
119
+ form.resetFields([0]);
120
+ form.setFieldsValue((0, _objectSpread2.default)({}, tempValues));
121
+ };
122
+ /**
123
+ * 新增行
124
+ * @param {IRowDataPropsType} rowData 初始化数据
125
+ * @param {IAddOptionsPropsType} options 新增配置选项
126
+ * @returns {Promise<{nextList: IRowDataPropsType[], list: IRowDataPropsType[], rowData: IRowDataPropsType, rowIndex: number}>}
127
+ */
128
+ var onAdd = function onAdd(rowData) {
129
+ if (isSingle) {
130
+ var _list$filter;
131
+ var isOneEditing = ((_list$filter = list.filter(function (item) {
132
+ return item.editable;
133
+ })) === null || _list$filter === void 0 ? void 0 : _list$filter.length) >= 1;
134
+ if (isOneEditing) {
135
+ _antd.message.warning(onlyAddOneLineAlertMessage);
136
+ return Promise.reject(onlyAddOneLineAlertMessage);
137
+ }
138
+ }
139
+ var rowIndex = 0;
140
+ var nextList = (0, _lodash.cloneDeep)(list);
141
+ if (insertType === 'before') {
142
+ handleMulResetForm();
143
+ nextList.unshift((0, _objectSpread2.default)((0, _objectSpread2.default)({}, rowData), {}, {
144
+ editable: true,
145
+ isFirst: true,
146
+ rowKey: "&&".concat((0, _utils.getRandom)())
147
+ }));
148
+ } else if (insertType === 'after') {
149
+ nextList.push((0, _objectSpread2.default)((0, _objectSpread2.default)({}, rowData), {}, {
150
+ editable: true,
151
+ isFirst: true,
152
+ rowKey: "&&".concat((0, _utils.getRandom)())
153
+ }));
154
+ rowIndex = list.length;
155
+ }
156
+ setDataSource ? setDataSource(nextList) : setList((0, _toConsumableArray2.default)(nextList));
157
+ return Promise.resolve({
158
+ rowIndex: rowIndex,
159
+ nextList: nextList,
160
+ list: (0, _utils.formatList)(nextList),
161
+ rowData: nextList[rowIndex]
162
+ });
163
+ };
164
+ /**
165
+ * 删除多行
166
+ * @returns {Promise<{nextList: IRowDataPropsType[], list: IRowDataPropsType[], rowData: IRowDataPropsType, rowIndex: number}>}
167
+ */
168
+ var onMultipleDelete = /*#__PURE__*/function () {
169
+ var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
170
+ var res, values, nextList, resetFieldsIndex;
171
+ return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
172
+ while (1) switch (_context.prev = _context.next) {
173
+ case 0:
174
+ if (!(addButtonProps === null || addButtonProps === void 0 ? void 0 : addButtonProps.onMultipleDelete)) {
175
+ _context.next = 6;
176
+ break;
177
+ }
178
+ _context.next = 3;
179
+ return addButtonProps.onMultipleDelete(selectedRowKeys, selectedRows);
180
+ case 3:
181
+ _context.t0 = _context.sent;
182
+ _context.next = 7;
183
+ break;
184
+ case 6:
185
+ _context.t0 = true;
186
+ case 7:
187
+ res = _context.t0;
188
+ if (!res) {
189
+ _context.next = 20;
190
+ break;
191
+ }
192
+ values = (0, _lodash.cloneDeep)(form.getFieldsValue(true));
193
+ nextList = (0, _lodash.cloneDeep)(list);
194
+ nextList = nextList.filter(function (item) {
195
+ return !selectedRowKeys.includes(getRowKey(item));
196
+ });
197
+ resetFieldsIndex = [];
198
+ Object.keys(values).forEach(function (key) {
199
+ // eslint-disable-next-line no-restricted-globals
200
+ if (!isNaN(Number(key))) {
201
+ resetFieldsIndex.push(key);
202
+ }
203
+ });
204
+ setSelectedRows([]);
205
+ setSelectedRowKeys([]);
206
+ // 清空删除后最后一条formItem状态
207
+ form.resetFields(resetFieldsIndex);
208
+ nextList.forEach(function (item, index) {
209
+ // 可编辑状态默认给表单回填数据
210
+ if (item.editable) {
211
+ form.setFieldsValue((0, _defineProperty2.default)({}, index, item));
212
+ }
213
+ });
214
+ setDataSource ? setDataSource(nextList) : setList((0, _toConsumableArray2.default)(nextList));
215
+ return _context.abrupt("return", Promise.resolve({
216
+ rowIndex: 0,
217
+ nextList: nextList,
218
+ list: (0, _utils.formatList)(nextList),
219
+ rowData: nextList[0]
220
+ }));
221
+ case 20:
222
+ case "end":
223
+ return _context.stop();
224
+ }
225
+ }, _callee);
226
+ }));
227
+ return function onMultipleDelete() {
228
+ return _ref2.apply(this, arguments);
229
+ };
230
+ }();
231
+ /**
232
+ * 删除行
233
+ * @param {number} rowIndex 当前删除行的下标
234
+ * @returns {Promise<{nextList: IRowDataPropsType[], list: IRowDataPropsType[], rowData: IRowDataPropsType, rowIndex: number}>}
235
+ */
236
+ var onDelete = function onDelete(rowIndex) {
237
+ var values = (0, _lodash.cloneDeep)(form.getFieldsValue(true));
238
+ var lastIndex = list.length - 1;
239
+ form.resetFields([rowIndex]);
240
+ var nextList = (0, _lodash.cloneDeep)(list);
241
+ setSelectedRows(selectedRows.filter(function (item) {
242
+ var _nextList$rowIndex;
243
+ return item.rowKey !== ((_nextList$rowIndex = nextList[rowIndex]) === null || _nextList$rowIndex === void 0 ? void 0 : _nextList$rowIndex.rowKey);
244
+ }));
245
+ setSelectedRowKeys(selectedRowKeys.filter(function (key) {
246
+ var _nextList$rowIndex2;
247
+ return key !== ((_nextList$rowIndex2 = nextList[rowIndex]) === null || _nextList$rowIndex2 === void 0 ? void 0 : _nextList$rowIndex2.rowKey);
248
+ }));
249
+ nextList.splice(rowIndex, 1);
250
+ for (var i = rowIndex; i < lastIndex; i++) {
251
+ var _nextList$i = nextList[i],
252
+ editable = _nextList$i.editable,
253
+ isFirst = _nextList$i.isFirst;
254
+ nextList[i] = (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, nextList[i]), values[i + 1]), {}, {
255
+ editable: editable,
256
+ isFirst: isFirst
257
+ });
258
+ }
259
+ // 清空删除后最后一条formItem状态
260
+ form.resetFields([lastIndex]);
261
+ setDataSource ? setDataSource(nextList) : setList((0, _toConsumableArray2.default)(nextList));
262
+ return Promise.resolve({
263
+ rowIndex: rowIndex,
264
+ nextList: nextList,
265
+ list: (0, _utils.formatList)(nextList),
266
+ rowData: nextList[rowIndex]
267
+ });
268
+ };
269
+ /**
270
+ * 保存行
271
+ * @param {number} rowIndex 当前保存行的下标
272
+ * @returns {Promise<{nextList: IRowDataPropsType[], list: IRowDataPropsType[], rowData: IRowDataPropsType, rowIndex: number}>}
273
+ */
274
+ var onSave = /*#__PURE__*/function () {
275
+ var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2(rowIndex, callback) {
276
+ var _form$getFieldsValue$, _form$getFieldsValue, nextValues, res, values;
277
+ return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
278
+ while (1) switch (_context2.prev = _context2.next) {
279
+ case 0:
280
+ _context2.prev = 0;
281
+ nextValues = (_form$getFieldsValue$ = (_form$getFieldsValue = form.getFieldsValue()) === null || _form$getFieldsValue === void 0 ? void 0 : _form$getFieldsValue[rowIndex]) !== null && _form$getFieldsValue$ !== void 0 ? _form$getFieldsValue$ : {};
282
+ if (!callback) {
283
+ _context2.next = 8;
284
+ break;
285
+ }
286
+ _context2.next = 5;
287
+ return callback({
288
+ preValues: originRowData[rowIndex],
289
+ nextValues: nextValues
290
+ });
291
+ case 5:
292
+ _context2.t0 = _context2.sent;
293
+ _context2.next = 9;
294
+ break;
295
+ case 8:
296
+ _context2.t0 = true;
297
+ case 9:
298
+ res = _context2.t0;
299
+ if (!res) {
300
+ _context2.next = 15;
301
+ break;
302
+ }
303
+ _context2.next = 13;
304
+ return form.validateFields();
305
+ case 13:
306
+ values = _context2.sent;
307
+ return _context2.abrupt("return", onUpdateRowData(rowIndex, (0, _objectSpread2.default)({
308
+ editable: false,
309
+ isFirst: false
310
+ }, values[rowIndex])));
311
+ case 15:
312
+ _context2.next = 20;
313
+ break;
314
+ case 17:
315
+ _context2.prev = 17;
316
+ _context2.t1 = _context2["catch"](0);
317
+ console.warn(_context2.t1);
318
+ case 20:
319
+ case "end":
320
+ return _context2.stop();
321
+ }
322
+ }, _callee2, null, [[0, 17]]);
323
+ }));
324
+ return function onSave(_x, _x2) {
325
+ return _ref3.apply(this, arguments);
326
+ };
327
+ }();
328
+ /**
329
+ * 编辑行
330
+ * @param {number}} rowIndex 当前保存行的下标
331
+ * @returns {Promise<{nextList: IRowDataPropsType[], list: IRowDataPropsType[], rowData: IRowDataPropsType, rowIndex: number}>}
332
+ */
333
+ var onEdit = function onEdit(rowIndex) {
334
+ if (isSingle) {
335
+ var _list$filter2;
336
+ var isOneEditing = ((_list$filter2 = list.filter(function (item) {
337
+ return item.editable;
338
+ })) === null || _list$filter2 === void 0 ? void 0 : _list$filter2.length) >= 1;
339
+ if (isOneEditing) {
340
+ _antd.message.warning(onlyOneLineEditorAlertMessage);
341
+ return Promise.reject(onlyOneLineEditorAlertMessage);
342
+ }
343
+ }
344
+ setOriginRowData((0, _defineProperty2.default)({}, rowIndex, list[rowIndex]));
345
+ form.setFieldsValue((0, _defineProperty2.default)({}, rowIndex, list[rowIndex]));
346
+ return onUpdateRowData(rowIndex, {
347
+ editable: true,
348
+ isFirst: false
349
+ });
350
+ };
351
+ /**
352
+ * 取消行
353
+ * 第一次新增删除当前行 当点过编辑或者保存后,重置isFirst为false
354
+ * @param {IRowDataPropsType} rowData 原始行数据
355
+ * @param {number}} rowIndex 当前保存行的下标
356
+ * @returns {Promise<{nextList: IRowDataPropsType[], list: IRowDataPropsType[], rowData: IRowDataPropsType, rowIndex: number}>}
357
+ */
358
+ var onCancel = function onCancel(rowData, rowIndex) {
359
+ if (rowData.isFirst) {
360
+ return onDelete(rowIndex);
361
+ }
362
+ return onUpdateRowData(rowIndex, (0, _objectSpread2.default)({
363
+ editable: false,
364
+ isFirst: false
365
+ }, originRowData[rowIndex]));
366
+ };
367
+ // 渲染新增按钮
368
+ var renderAddButton = function renderAddButton() {
369
+ if (disabled || list.length === 0 || isCanAdd === false) {
370
+ return null;
371
+ }
372
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, buttonText !== false ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, typeof buttonText === 'string' ? /*#__PURE__*/_react.default.createElement(_antd.Space, {
373
+ style: {
374
+ display: 'flex',
375
+ justifyContent: ['topLeft', 'bottomLeft'].includes(position) ? 'flex-start' : 'flex-end',
376
+ margin: ['topLeft', 'topRight'].includes(position) ? '0 0 16px 0' : '16px 0 0 0'
377
+ }
378
+ }, isCanMultipleDelete ? /*#__PURE__*/_react.default.createElement(_antd.Popconfirm, {
379
+ placement: "top",
380
+ title: mulDeletePoconfirmMsg,
381
+ onConfirm: onMultipleDelete,
382
+ okText: "\u786E\u5B9A",
383
+ cancelText: "\u53D6\u6D88",
384
+ disabled: !(selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length)
385
+ }, /*#__PURE__*/_react.default.createElement(_antd.Button, {
386
+ disabled: !(selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length),
387
+ type: "link"
388
+ }, "\u5220\u9664")) : null, /*#__PURE__*/_react.default.createElement(_antd.Button, (0, _objectSpread2.default)({
389
+ type: "link",
390
+ icon: /*#__PURE__*/_react.default.createElement(_icons.PlusOutlined, null),
391
+ onClick: function onClick() {
392
+ onAdd();
393
+ }
394
+ }, antButtonProps), buttonText)) : /*#__PURE__*/(0, _react.cloneElement)(buttonText, antButtonProps)) : null);
395
+ };
396
+ var validateFields = /*#__PURE__*/function () {
397
+ var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee3() {
398
+ var values, nextValues, nextList, isEditing;
399
+ return (0, _regeneratorRuntime2.default)().wrap(function _callee3$(_context3) {
400
+ while (1) switch (_context3.prev = _context3.next) {
401
+ case 0:
402
+ _context3.next = 2;
403
+ return form.validateFields();
404
+ case 2:
405
+ values = _context3.sent;
406
+ nextValues = {};
407
+ nextList = [];
408
+ Object.keys(values).forEach(function (key) {
409
+ if (Number.isNaN(Number(key))) {
410
+ nextValues[key] = values[key];
411
+ } else {
412
+ nextList.push(values[key]);
413
+ }
414
+ });
415
+ nextValues[name] = nextList;
416
+ isEditing = list.find(function (item) {
417
+ return item.editable;
418
+ });
419
+ if (!(isSingle && isEditing)) {
420
+ _context3.next = 11;
421
+ break;
422
+ }
423
+ _antd.message.warning(noSaveAlertMessage);
424
+ // eslint-disable-next-line prefer-promise-reject-errors
425
+ return _context3.abrupt("return", Promise.reject('请保存当前行数据'));
426
+ case 11:
427
+ return _context3.abrupt("return", Promise.resolve(nextValues));
428
+ case 12:
429
+ case "end":
430
+ return _context3.stop();
431
+ }
432
+ }, _callee3);
433
+ }));
434
+ return function validateFields() {
435
+ return _ref4.apply(this, arguments);
436
+ };
437
+ }();
438
+ var newColumns = (0, _react.useMemo)(function () {
439
+ return (0, _utils.transformColumns)(columns, form, disabled);
440
+ }, [columns, form, disabled]);
441
+ (0, _react.useImperativeHandle)(actionRef, function () {
442
+ return {
443
+ /** 暴露出当前table节点 * */
444
+ tableNode: tableRef.current,
445
+ data: list,
446
+ getPureDataSource: function getPureDataSource() {
447
+ return (0, _utils.formatList)(list);
448
+ },
449
+ selectedRows: selectedRows,
450
+ selectedRowKeys: selectedRowKeys,
451
+ setSelectedRowKeys: setSelectedRowKeys,
452
+ setSelectedRows: setSelectedRows,
453
+ onUpdateRowData: onUpdateRowData,
454
+ onMultipleDelete: onMultipleDelete,
455
+ onAdd: onAdd,
456
+ onDelete: onDelete,
457
+ onEdit: onEdit,
458
+ onSave: onSave,
459
+ onCancel: onCancel,
460
+ validateFields: validateFields,
461
+ setDataSource: setList
462
+ };
463
+ });
464
+ // 实时同步外部dataSource (useDeepCompareEffect无法察觉dataSource的变更)
465
+ (0, _ahooks.useDeepCompareEffect)(function () {
466
+ var nextList = [];
467
+ if (dataSource.length) {
468
+ dataSource.forEach(function (item, index) {
469
+ var key = getRowKey(item) || "&&".concat((0, _utils.getRandom)());
470
+ var innerItem = list.find(function (child) {
471
+ return getRowKey(child) === key;
472
+ });
473
+ var nextItem = innerItem ? (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({
474
+ editable: !isSingle
475
+ }, innerItem), item), {}, {
476
+ rowKey: key
477
+ }) : (0, _objectSpread2.default)((0, _objectSpread2.default)({
478
+ editable: !isSingle
479
+ }, item), {}, {
480
+ rowKey: key
481
+ });
482
+ nextList.push(nextItem);
483
+ });
484
+ setList(nextList);
485
+ } else {
486
+ setList([]);
487
+ }
488
+ }, [dataSource]);
489
+ (0, _ahooks.useDeepCompareEffect)(function () {
490
+ try {
491
+ if (list === null || list === void 0 ? void 0 : list.length) {
492
+ list.forEach(function (item, index) {
493
+ // 可编辑状态默认给表单回填数据
494
+ if (item.editable) {
495
+ form.setFieldsValue((0, _defineProperty2.default)({}, index, item));
496
+ }
497
+ });
498
+ }
499
+ } catch (error) {
500
+ console.error('error', error);
501
+ }
502
+ }, [list]);
503
+ var empty = function empty() {
504
+ return (
505
+ /*#__PURE__*/
506
+ // 这里面就是我们自己定义的空状态
507
+ _react.default.createElement("div", {
508
+ className: "com-empty"
509
+ }, /*#__PURE__*/_react.default.createElement("img", {
510
+ className: "empty-img",
511
+ src: _empty.default
512
+ }), !disabled && isCanAdd ? /*#__PURE__*/_react.default.createElement("div", {
513
+ className: "empty-text"
514
+ }, "\u6682\u65E0\u6570\u636E\uFF0C", /*#__PURE__*/_react.default.createElement(_antd.Button, (0, _objectSpread2.default)({
515
+ type: "link",
516
+ onClick: function onClick() {
517
+ onAdd();
518
+ }
519
+ }, antButtonProps), emptyButtonText)) : /*#__PURE__*/_react.default.createElement("p", null, "\u6682\u65E0\u6570\u636E"))
520
+ );
521
+ };
522
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ['topLeft', 'topRight'].includes(position) && renderAddButton(), /*#__PURE__*/_react.default.createElement(_antd.Form, (0, _objectSpread2.default)({
523
+ form: form,
524
+ className: "proEditable pro-editable"
525
+ }, formProps), name ? /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
526
+ name: name
527
+ }, /*#__PURE__*/_react.default.createElement(_antd.ConfigProvider, {
528
+ renderEmpty: (list === null || list === void 0 ? void 0 : list.length) ? undefined : empty
529
+ }, /*#__PURE__*/_react.default.createElement(_antd.Table, (0, _objectSpread2.default)((0, _objectSpread2.default)({
530
+ dataSource: list,
531
+ columns: newColumns,
532
+ pagination: pagination,
533
+ rowSelection: isCanMultipleDelete && !disabled ? rowSelection : undefined,
534
+ ref: function ref(node) {
535
+ return tableRef.current = node;
536
+ }
537
+ }, otherProps), {}, {
538
+ rowKey: getRowKey
539
+ })))) : /*#__PURE__*/_react.default.createElement(_antd.ConfigProvider, {
540
+ renderEmpty: (list === null || list === void 0 ? void 0 : list.length) ? undefined : empty
541
+ }, /*#__PURE__*/_react.default.createElement(_antd.Table, (0, _objectSpread2.default)((0, _objectSpread2.default)({
542
+ dataSource: list,
543
+ columns: newColumns,
544
+ pagination: pagination,
545
+ rowSelection: isCanMultipleDelete && !disabled ? rowSelection : undefined,
546
+ ref: function ref(node) {
547
+ return tableRef.current = node;
548
+ }
549
+ }, otherProps), {}, {
550
+ rowKey: getRowKey
551
+ })))), ['bottomLeft', 'bottomRight'].includes(position) && renderAddButton());
552
+ });
553
+ ProEditableTable.defaultProps = {
554
+ dataSource: [],
555
+ columns: [],
556
+ editType: 'single',
557
+ pagination: false,
558
+ onlyOneLineEditorAlertMessage: '只能同时编辑一行',
559
+ noSaveAlertMessage: '请保存当前行数据',
560
+ mulDeletePoconfirmMsg: '您确定要删除吗?',
561
+ addButtonProps: {},
562
+ disabled: false,
563
+ formProps: {
564
+ preserve: false
565
+ }
566
+ };
567
+ var _default = ProEditableTable;
568
+ exports.default = _default;
@@ -0,0 +1,68 @@
1
+ import { ButtonProps } from 'antd/lib/button';
2
+ import { FormProps } from 'antd/lib/form';
3
+ import { TablePaginationConfig } from 'antd/lib/table/Table';
4
+ import React from 'react';
5
+ export type TypePropsType = 'Input' | 'InputNumber' | 'InputRange' | 'TextArea' | 'Select' | 'Switch' | 'DatePicker' | 'RangePicker' | 'Cascader' | 'Checkbox' | 'Radio';
6
+ export type editTypePropsType = 'single' | 'multiple';
7
+ export type insertTypePropsType = 'before' | 'after';
8
+ export interface IAddOptionsPropsType {
9
+ insertType: string;
10
+ }
11
+ export interface IRowDataPropsType {
12
+ editable?: boolean;
13
+ isFirst?: boolean;
14
+ [key: string]: any;
15
+ }
16
+ export interface IActionReturnPropsType {
17
+ nextList: IRowDataPropsType[];
18
+ list: IRowDataPropsType[];
19
+ rowData: IRowDataPropsType;
20
+ rowIndex: number;
21
+ }
22
+ export interface IAddButtonPropsType extends ButtonProps {
23
+ isCanAdd?: boolean;
24
+ isCanMultipleDelete?: boolean;
25
+ position?: string;
26
+ insertType?: insertTypePropsType;
27
+ buttonText?: any;
28
+ emptyButtonText?: any;
29
+ onMultipleDelete?: Function;
30
+ multipleDeleteModalProps?: any;
31
+ multipleDeleteErrorMessage?: string;
32
+ onlyAddOneLineAlertMessage?: string;
33
+ }
34
+ export interface TActionRefPropsType {
35
+ onUpdateRowData: Function;
36
+ onAdd: Function;
37
+ onDelete: Function;
38
+ onMultipleDelete: Function;
39
+ onEdit: Function;
40
+ onSave: Function;
41
+ onCancel: Function;
42
+ tableNode: HTMLDivElement;
43
+ validateFields: Function;
44
+ setDataSource: Function;
45
+ getPureDataSource: Function;
46
+ data: IRowDataPropsType[];
47
+ selectedRows: IRowDataPropsType[];
48
+ selectedRowKeys: React.Key[];
49
+ setSelectedRowKeys: React.Dispatch<React.SetStateAction<React.Key[]>>;
50
+ setSelectedRows: React.Dispatch<React.SetStateAction<IRowDataPropsType[]>>;
51
+ }
52
+ export interface ProEditableTablePropsType {
53
+ addButtonProps?: IAddButtonPropsType;
54
+ name?: string;
55
+ editType: editTypePropsType;
56
+ columns: any;
57
+ dataSource: any;
58
+ rowKey: string;
59
+ pagination?: TablePaginationConfig;
60
+ formProps?: FormProps;
61
+ isAllEditable?: boolean;
62
+ [key: string]: any;
63
+ }
64
+ export interface FormItemComponentPropsType {
65
+ type?: TypePropsType;
66
+ name?: string[];
67
+ [key: string]: any;
68
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });