@ant-design/pro-components 3.0.2-0 → 3.1.1-0

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 (829) hide show
  1. package/README.es-PR.md +1 -3
  2. package/README.md +8 -10
  3. package/README.zh-CN.md +11 -11
  4. package/dist/pro-components.min.js +1 -1
  5. package/es/card/ProCard.js +7 -7
  6. package/es/card/components/Actions/index.js +25 -25
  7. package/es/card/components/Actions/style.d.ts +1 -1
  8. package/es/card/components/Actions/style.js +79 -71
  9. package/es/card/components/Card/index.js +160 -141
  10. package/es/card/components/Card/style.d.ts +1 -1
  11. package/es/card/components/Card/style.js +249 -192
  12. package/es/card/components/CheckCard/Group.js +94 -115
  13. package/es/card/components/CheckCard/index.d.ts +6 -0
  14. package/es/card/components/CheckCard/index.js +85 -78
  15. package/es/card/components/CheckCard/style.d.ts +1 -1
  16. package/es/card/components/CheckCard/style.js +184 -168
  17. package/es/card/components/Divider/index.js +19 -15
  18. package/es/card/components/Divider/style.d.ts +1 -1
  19. package/es/card/components/Divider/style.js +32 -29
  20. package/es/card/components/Loading/index.js +19 -16
  21. package/es/card/components/Loading/style.d.ts +1 -1
  22. package/es/card/components/Loading/style.js +34 -31
  23. package/es/card/components/Operation/index.js +16 -13
  24. package/es/card/components/Operation/style.d.ts +1 -1
  25. package/es/card/components/Operation/style.js +19 -18
  26. package/es/card/components/Statistic/index.js +46 -41
  27. package/es/card/components/Statistic/style.d.ts +1 -1
  28. package/es/card/components/Statistic/style.js +89 -70
  29. package/es/card/components/StatisticCard/index.js +45 -38
  30. package/es/card/components/StatisticCard/style.d.ts +1 -1
  31. package/es/card/components/StatisticCard/style.js +37 -35
  32. package/es/card/typing.d.ts +5 -0
  33. package/es/descriptions/index.js +214 -225
  34. package/es/descriptions/useFetchData.js +53 -91
  35. package/es/field/AllProField.js +265 -216
  36. package/es/field/FieldHOC/index.js +9 -14
  37. package/es/field/PureProField.js +82 -80
  38. package/es/field/ValueTypeToComponent.js +517 -618
  39. package/es/field/components/Cascader/index.d.ts +2 -3
  40. package/es/field/components/Cascader/index.js +65 -84
  41. package/es/field/components/Checkbox/index.d.ts +2 -3
  42. package/es/field/components/Checkbox/index.js +75 -72
  43. package/es/field/components/Code/index.js +40 -39
  44. package/es/field/components/ColorPicker/index.d.ts +1 -1
  45. package/es/field/components/ColorPicker/index.js +38 -32
  46. package/es/field/components/DatePicker/index.d.ts +2 -2
  47. package/es/field/components/DatePicker/index.js +49 -53
  48. package/es/field/components/Digit/index.js +41 -42
  49. package/es/field/components/DigitRange/index.js +71 -77
  50. package/es/field/components/FromNow/index.js +27 -25
  51. package/es/field/components/Image/index.js +28 -24
  52. package/es/field/components/IndexColumn/index.js +22 -16
  53. package/es/field/components/Money/index.js +107 -116
  54. package/es/field/components/Options/index.js +34 -33
  55. package/es/field/components/Password/index.js +35 -38
  56. package/es/field/components/Percent/index.js +40 -44
  57. package/es/field/components/Percent/util.d.ts +1 -1
  58. package/es/field/components/Percent/util.js +3 -5
  59. package/es/field/components/Progress/index.js +29 -27
  60. package/es/field/components/Radio/index.d.ts +1 -2
  61. package/es/field/components/Radio/index.js +61 -62
  62. package/es/field/components/RangePicker/index.d.ts +2 -2
  63. package/es/field/components/RangePicker/index.js +52 -63
  64. package/es/field/components/Rate/index.js +24 -21
  65. package/es/field/components/Second/index.js +36 -33
  66. package/es/field/components/Segmented/index.d.ts +1 -2
  67. package/es/field/components/Segmented/index.js +37 -46
  68. package/es/field/components/Select/LightSelect/index.d.ts +1 -1
  69. package/es/field/components/Select/LightSelect/index.js +102 -110
  70. package/es/field/components/Select/SearchSelect/index.d.ts +6 -1
  71. package/es/field/components/Select/SearchSelect/index.js +189 -129
  72. package/es/field/components/Select/index.d.ts +2 -5
  73. package/es/field/components/Select/index.js +197 -221
  74. package/es/field/components/Slider/index.js +25 -22
  75. package/es/field/components/Status/index.js +67 -78
  76. package/es/field/components/Switch/index.d.ts +1 -1
  77. package/es/field/components/Switch/index.js +32 -30
  78. package/es/field/components/Text/index.js +34 -37
  79. package/es/field/components/TextArea/index.js +26 -21
  80. package/es/field/components/TextArea/readonly.js +24 -21
  81. package/es/field/components/TimePicker/index.js +96 -105
  82. package/es/field/components/TreeSelect/index.d.ts +2 -3
  83. package/es/field/components/TreeSelect/index.js +107 -125
  84. package/es/form/BaseForm/BaseForm.d.ts +3 -0
  85. package/es/form/BaseForm/BaseForm.js +418 -498
  86. package/es/form/BaseForm/EditOrReadOnlyContext.js +1 -1
  87. package/es/form/BaseForm/LightWrapper/index.js +56 -65
  88. package/es/form/BaseForm/LightWrapper/style.d.ts +1 -1
  89. package/es/form/BaseForm/LightWrapper/style.js +17 -13
  90. package/es/form/BaseForm/Submitter/index.js +44 -43
  91. package/es/form/FieldContext.js +1 -1
  92. package/es/form/components/Captcha/index.d.ts +8 -2
  93. package/es/form/components/Captcha/index.js +76 -128
  94. package/es/form/components/Cascader/index.js +26 -28
  95. package/es/form/components/Checkbox/index.js +60 -61
  96. package/es/form/components/ColorPicker/index.js +24 -26
  97. package/es/form/components/DatePicker/BaseDatePicker.js +33 -31
  98. package/es/form/components/DatePicker/DatePicker.js +14 -13
  99. package/es/form/components/DatePicker/DateTimePicker.js +11 -12
  100. package/es/form/components/DatePicker/MonthPicker.js +14 -13
  101. package/es/form/components/DatePicker/QuarterPicker.js +14 -13
  102. package/es/form/components/DatePicker/TimePicker.js +26 -27
  103. package/es/form/components/DatePicker/WeekPicker.js +14 -13
  104. package/es/form/components/DatePicker/YearPicker.js +14 -13
  105. package/es/form/components/DatePicker/index.js +1 -1
  106. package/es/form/components/DateRangePicker/BaseDateRanger.js +35 -35
  107. package/es/form/components/DateRangePicker/DateMonthRangePicker.js +15 -16
  108. package/es/form/components/DateRangePicker/DateQuarterRangePicker.js +15 -16
  109. package/es/form/components/DateRangePicker/DateTimeRangePicker.js +15 -16
  110. package/es/form/components/DateRangePicker/DateWeekRangePicker.js +15 -16
  111. package/es/form/components/DateRangePicker/DateYearRangePicker.js +15 -16
  112. package/es/form/components/DateRangePicker/TimeRangePicker.js +26 -29
  113. package/es/form/components/DateRangePicker/index.js +15 -16
  114. package/es/form/components/Dependency/index.js +31 -34
  115. package/es/form/components/Digit/DigitRange.js +23 -24
  116. package/es/form/components/Digit/index.js +27 -29
  117. package/es/form/components/Field/index.js +55 -63
  118. package/es/form/components/FieldSet/index.js +68 -76
  119. package/es/form/components/FormItem/FormItemRender/index.js +58 -48
  120. package/es/form/components/FormItem/Group/index.js +95 -95
  121. package/es/form/components/FormItem/Group/style.d.ts +1 -1
  122. package/es/form/components/FormItem/Group/style.js +46 -40
  123. package/es/form/components/FormItem/index.js +135 -141
  124. package/es/form/components/FormItem/warpField.js +165 -149
  125. package/es/form/components/List/ListContainer.js +98 -189
  126. package/es/form/components/List/ListItem.js +151 -198
  127. package/es/form/components/List/index.d.ts +1 -1
  128. package/es/form/components/List/index.js +97 -107
  129. package/es/form/components/List/style.d.ts +1 -1
  130. package/es/form/components/List/style.js +71 -47
  131. package/es/form/components/Money/index.js +28 -30
  132. package/es/form/components/Radio/index.js +45 -49
  133. package/es/form/components/Rate/index.js +17 -20
  134. package/es/form/components/SchemaForm/index.js +58 -72
  135. package/es/form/components/SchemaForm/layoutType/Embed.js +5 -6
  136. package/es/form/components/SchemaForm/layoutType/StepsForm.js +22 -26
  137. package/es/form/components/SchemaForm/valueType/dependency.js +11 -11
  138. package/es/form/components/SchemaForm/valueType/divider.js +4 -5
  139. package/es/form/components/SchemaForm/valueType/field.js +45 -44
  140. package/es/form/components/SchemaForm/valueType/formList.js +8 -7
  141. package/es/form/components/SchemaForm/valueType/formSet.js +8 -7
  142. package/es/form/components/SchemaForm/valueType/group.js +7 -8
  143. package/es/form/components/SchemaForm/valueType/ignore.js +2 -2
  144. package/es/form/components/SchemaForm/valueType/index.js +5 -5
  145. package/es/form/components/Segmented/index.js +20 -23
  146. package/es/form/components/Select/index.js +69 -73
  147. package/es/form/components/Slider/index.js +33 -35
  148. package/es/form/components/Switch/index.js +24 -26
  149. package/es/form/components/Text/index.js +79 -88
  150. package/es/form/components/TextArea/index.js +17 -20
  151. package/es/form/components/TreeSelect/index.js +20 -23
  152. package/es/form/components/UploadButton/index.js +56 -103
  153. package/es/form/components/UploadDragger/index.js +37 -44
  154. package/es/form/helpers/grid.js +65 -67
  155. package/es/form/index.d.ts +1 -0
  156. package/es/form/layouts/DrawerForm/index.d.ts +1 -1
  157. package/es/form/layouts/DrawerForm/index.js +152 -242
  158. package/es/form/layouts/DrawerForm/style.d.ts +1 -1
  159. package/es/form/layouts/DrawerForm/style.js +26 -25
  160. package/es/form/layouts/LightFilter/index.d.ts +12 -1
  161. package/es/form/layouts/LightFilter/index.js +158 -140
  162. package/es/form/layouts/LightFilter/style.d.ts +1 -1
  163. package/es/form/layouts/LightFilter/style.js +52 -48
  164. package/es/form/layouts/LoginForm/index.d.ts +1 -1
  165. package/es/form/layouts/LoginForm/index.js +44 -47
  166. package/es/form/layouts/LoginForm/style.d.ts +1 -1
  167. package/es/form/layouts/LoginForm/style.js +71 -67
  168. package/es/form/layouts/LoginFormPage/index.d.ts +1 -1
  169. package/es/form/layouts/LoginFormPage/index.js +45 -48
  170. package/es/form/layouts/LoginFormPage/style.d.ts +1 -1
  171. package/es/form/layouts/LoginFormPage/style.js +136 -126
  172. package/es/form/layouts/ModalForm/index.js +120 -203
  173. package/es/form/layouts/ProForm/index.d.ts +2 -2
  174. package/es/form/layouts/ProForm/index.js +5 -5
  175. package/es/form/layouts/QueryFilter/Actions.js +23 -22
  176. package/es/form/layouts/QueryFilter/index.d.ts +2 -1
  177. package/es/form/layouts/QueryFilter/index.js +178 -203
  178. package/es/form/layouts/QueryFilter/style.d.ts +1 -1
  179. package/es/form/layouts/QueryFilter/style.js +45 -37
  180. package/es/form/layouts/StepsForm/StepForm.d.ts +2 -3
  181. package/es/form/layouts/StepsForm/StepForm.js +50 -71
  182. package/es/form/layouts/StepsForm/index.js +187 -216
  183. package/es/form/layouts/StepsForm/style.d.ts +1 -1
  184. package/es/form/layouts/StepsForm/style.js +30 -28
  185. package/es/form/layouts/index.js +1 -1
  186. package/es/layout/ProLayout.js +281 -292
  187. package/es/layout/WrapContent.js +16 -12
  188. package/es/layout/assert/Logo.js +95 -97
  189. package/es/layout/components/AppsLogoComponents/AppsLogo.js +10 -12
  190. package/es/layout/components/AppsLogoComponents/DefaultContent.js +17 -16
  191. package/es/layout/components/AppsLogoComponents/SimpleContent.js +19 -18
  192. package/es/layout/components/AppsLogoComponents/index.js +34 -37
  193. package/es/layout/components/AppsLogoComponents/style/default.js +2 -2
  194. package/es/layout/components/AppsLogoComponents/style/index.d.ts +1 -1
  195. package/es/layout/components/AppsLogoComponents/style/index.js +52 -50
  196. package/es/layout/components/AppsLogoComponents/style/simple.js +1 -1
  197. package/es/layout/components/CollapsedIcon/index.js +18 -15
  198. package/es/layout/components/CollapsedIcon/style.d.ts +1 -1
  199. package/es/layout/components/CollapsedIcon/style.js +40 -40
  200. package/es/layout/components/Footer.js +22 -21
  201. package/es/layout/components/FooterToolbar/index.js +58 -52
  202. package/es/layout/components/FooterToolbar/style/index.d.ts +1 -1
  203. package/es/layout/components/FooterToolbar/style/index.js +38 -37
  204. package/es/layout/components/FooterToolbar/style/stylish.d.ts +1 -1
  205. package/es/layout/components/FooterToolbar/style/stylish.js +11 -9
  206. package/es/layout/components/GlobalFooter/index.d.ts +1 -1
  207. package/es/layout/components/GlobalFooter/index.js +25 -25
  208. package/es/layout/components/GlobalFooter/style.d.ts +1 -1
  209. package/es/layout/components/GlobalFooter/style.js +31 -30
  210. package/es/layout/components/GlobalHeader/ActionsContent.js +62 -78
  211. package/es/layout/components/GlobalHeader/index.js +59 -47
  212. package/es/layout/components/GlobalHeader/rightContentStyle.d.ts +1 -1
  213. package/es/layout/components/GlobalHeader/rightContentStyle.js +49 -49
  214. package/es/layout/components/GlobalHeader/style.d.ts +1 -1
  215. package/es/layout/components/GlobalHeader/style.js +58 -54
  216. package/es/layout/components/GridContent/index.js +24 -19
  217. package/es/layout/components/GridContent/style.d.ts +1 -1
  218. package/es/layout/components/GridContent/style.js +14 -13
  219. package/es/layout/components/Header/index.js +63 -57
  220. package/es/layout/components/Header/style/header.d.ts +1 -1
  221. package/es/layout/components/Header/style/header.js +49 -47
  222. package/es/layout/components/Header/style/stylish.d.ts +1 -1
  223. package/es/layout/components/Header/style/stylish.js +15 -11
  224. package/es/layout/components/Help/AsyncContentPanel.js +13 -18
  225. package/es/layout/components/Help/HelpProvide.js +1 -1
  226. package/es/layout/components/Help/ProHelpContentPanel.js +64 -83
  227. package/es/layout/components/Help/ProHelpDrawer.d.ts +1 -1
  228. package/es/layout/components/Help/ProHelpDrawer.js +25 -29
  229. package/es/layout/components/Help/ProHelpModal.d.ts +1 -1
  230. package/es/layout/components/Help/ProHelpModal.js +24 -27
  231. package/es/layout/components/Help/ProHelpPanel.js +86 -94
  232. package/es/layout/components/Help/ProHelpPopover.js +19 -17
  233. package/es/layout/components/Help/RenderContentPanel.js +34 -24
  234. package/es/layout/components/Help/Search.js +52 -78
  235. package/es/layout/components/Help/index.js +9 -11
  236. package/es/layout/components/Help/style.d.ts +1 -1
  237. package/es/layout/components/Help/style.js +82 -75
  238. package/es/layout/components/PageContainer/index.js +168 -149
  239. package/es/layout/components/PageContainer/style/index.d.ts +1 -1
  240. package/es/layout/components/PageContainer/style/index.js +95 -78
  241. package/es/layout/components/PageContainer/style/stylish.d.ts +1 -1
  242. package/es/layout/components/PageContainer/style/stylish.js +11 -9
  243. package/es/layout/components/PageHeader/index.js +96 -97
  244. package/es/layout/components/PageHeader/style/index.d.ts +1 -1
  245. package/es/layout/components/PageHeader/style/index.js +142 -122
  246. package/es/layout/components/PageLoading/index.js +17 -20
  247. package/es/layout/components/SettingDrawer/BlockCheckbox.js +29 -32
  248. package/es/layout/components/SettingDrawer/LayoutChange.js +22 -22
  249. package/es/layout/components/SettingDrawer/RegionalChange.js +14 -15
  250. package/es/layout/components/SettingDrawer/ThemeColor.js +32 -35
  251. package/es/layout/components/SettingDrawer/index.js +139 -170
  252. package/es/layout/components/SettingDrawer/style/index.d.ts +1 -1
  253. package/es/layout/components/SettingDrawer/style/index.js +141 -137
  254. package/es/layout/components/SiderMenu/BaseMenu.d.ts +1 -1
  255. package/es/layout/components/SiderMenu/BaseMenu.js +236 -222
  256. package/es/layout/components/SiderMenu/SiderMenu.js +127 -117
  257. package/es/layout/components/SiderMenu/index.js +51 -43
  258. package/es/layout/components/SiderMenu/style/index.d.ts +1 -1
  259. package/es/layout/components/SiderMenu/style/index.js +179 -161
  260. package/es/layout/components/SiderMenu/style/menu.d.ts +1 -1
  261. package/es/layout/components/SiderMenu/style/menu.js +148 -110
  262. package/es/layout/components/SiderMenu/style/stylish.d.ts +1 -1
  263. package/es/layout/components/SiderMenu/style/stylish.js +15 -11
  264. package/es/layout/components/TopNavHeader/index.js +71 -60
  265. package/es/layout/components/TopNavHeader/style.d.ts +1 -1
  266. package/es/layout/components/TopNavHeader/style.js +64 -63
  267. package/es/layout/context/RouteContext.js +1 -1
  268. package/es/layout/defaultSettings.d.ts +6 -0
  269. package/es/layout/defaultSettings.js +1 -1
  270. package/es/layout/getPageTitle.js +23 -24
  271. package/es/layout/locales/en-US.js +3 -2
  272. package/es/layout/locales/index.js +5 -5
  273. package/es/layout/locales/it-IT.js +3 -2
  274. package/es/layout/locales/ko-KR.js +3 -2
  275. package/es/layout/locales/zh-CN.js +3 -2
  276. package/es/layout/locales/zh-TW.js +3 -2
  277. package/es/layout/style/index.d.ts +1 -1
  278. package/es/layout/style/index.js +48 -42
  279. package/es/layout/utils/getBreadcrumbProps.js +60 -60
  280. package/es/layout/utils/getMenuData.js +7 -11
  281. package/es/layout/utils/pathTools.js +2 -6
  282. package/es/layout/utils/useCurrentMenuLayoutProps.js +4 -9
  283. package/es/layout/utils/utils.js +15 -17
  284. package/es/list/Item.js +157 -137
  285. package/es/list/ListView.js +106 -115
  286. package/es/list/constants.js +2 -2
  287. package/es/list/index.js +72 -70
  288. package/es/list/style/index.d.ts +1 -1
  289. package/es/list/style/index.js +281 -213
  290. package/es/provider/index.d.ts +1 -0
  291. package/es/provider/index.js +126 -114
  292. package/es/provider/intl.js +53 -55
  293. package/es/provider/typing/layoutToken.js +26 -23
  294. package/es/provider/useStyle/index.d.ts +2 -1
  295. package/es/provider/useStyle/index.js +60 -60
  296. package/es/provider/utils/merge.js +10 -12
  297. package/es/skeleton/components/Descriptions/index.js +211 -229
  298. package/es/skeleton/components/List/index.js +208 -223
  299. package/es/skeleton/components/Result/index.js +45 -47
  300. package/es/skeleton/index.js +13 -10
  301. package/es/table/Store/Provide.d.ts +4 -4
  302. package/es/table/Store/Provide.js +102 -117
  303. package/es/table/Table.d.ts +5 -2
  304. package/es/table/Table.js +593 -603
  305. package/es/table/TableSearch.d.ts +24 -0
  306. package/es/table/TableSearch.js +54 -0
  307. package/es/table/TableToolbar.d.ts +22 -0
  308. package/es/table/TableToolbar.js +47 -0
  309. package/es/table/components/Alert/index.d.ts +1 -1
  310. package/es/table/components/Alert/index.js +41 -40
  311. package/es/table/components/Alert/style.d.ts +1 -1
  312. package/es/table/components/Alert/style.js +28 -27
  313. package/es/table/components/ColumnSetting/index.d.ts +1 -1
  314. package/es/table/components/ColumnSetting/index.js +230 -223
  315. package/es/table/components/ColumnSetting/style.d.ts +1 -1
  316. package/es/table/components/ColumnSetting/style.js +86 -71
  317. package/es/table/components/DragSortTable/index.d.ts +1 -1
  318. package/es/table/components/DragSortTable/index.js +65 -79
  319. package/es/table/components/DragSortTable/style.d.ts +1 -1
  320. package/es/table/components/DragSortTable/style.js +20 -19
  321. package/es/table/components/Dropdown/index.js +42 -47
  322. package/es/table/components/EditableTable/CellEditorTable.js +24 -32
  323. package/es/table/components/EditableTable/RowEditorTable.js +23 -28
  324. package/es/table/components/EditableTable/index.js +601 -302
  325. package/es/table/components/Form/FormRender.js +99 -103
  326. package/es/table/components/Form/index.d.ts +4 -19
  327. package/es/table/components/Form/index.js +112 -159
  328. package/es/table/components/ListToolBar/HeaderMenu.js +44 -52
  329. package/es/table/components/ListToolBar/index.js +122 -147
  330. package/es/table/components/ListToolBar/style.d.ts +1 -1
  331. package/es/table/components/ListToolBar/style.js +127 -117
  332. package/es/table/components/ToolBar/DensityIcon.js +10 -9
  333. package/es/table/components/ToolBar/FullscreenIcon.js +5 -9
  334. package/es/table/components/ToolBar/index.d.ts +2 -8
  335. package/es/table/components/ToolBar/index.js +155 -195
  336. package/es/table/style/index.d.ts +1 -1
  337. package/es/table/style/index.js +144 -112
  338. package/es/table/typing.d.ts +13 -6
  339. package/es/table/useFetchData.js +204 -348
  340. package/es/table/utils/cellRenderToFromItem.js +105 -119
  341. package/es/table/utils/columnRender.js +63 -54
  342. package/es/table/utils/columnSort.js +22 -22
  343. package/es/table/utils/genProColumnToColumn.d.ts +13 -9
  344. package/es/table/utils/genProColumnToColumn.js +121 -98
  345. package/es/table/utils/index.d.ts +12 -0
  346. package/es/table/utils/index.js +114 -178
  347. package/es/table/utils/useDragSort.d.ts +1 -1
  348. package/es/table/utils/useDragSort.js +99 -92
  349. package/es/table/utils/usePageInfo.d.ts +6 -0
  350. package/es/table/utils/usePageInfo.js +55 -0
  351. package/es/utils/components/DropdownFooter/index.js +23 -21
  352. package/es/utils/components/DropdownFooter/style.d.ts +1 -1
  353. package/es/utils/components/DropdownFooter/style.js +16 -15
  354. package/es/utils/components/ErrorBoundary/index.js +27 -50
  355. package/es/utils/components/FieldLabel/index.js +70 -70
  356. package/es/utils/components/FieldLabel/style.d.ts +1 -1
  357. package/es/utils/components/FieldLabel/style.js +104 -81
  358. package/es/utils/components/FilterDropdown/index.d.ts +11 -0
  359. package/es/utils/components/FilterDropdown/index.js +43 -32
  360. package/es/utils/components/FilterDropdown/style.d.ts +1 -1
  361. package/es/utils/components/FilterDropdown/style.js +19 -16
  362. package/es/utils/components/InlineErrorFormItem/index.js +78 -78
  363. package/es/utils/components/InlineErrorFormItem/style.d.ts +1 -1
  364. package/es/utils/components/InlineErrorFormItem/style.js +56 -49
  365. package/es/utils/components/LabelIconTip/index.js +30 -31
  366. package/es/utils/components/LabelIconTip/style.d.ts +1 -1
  367. package/es/utils/components/LabelIconTip/style.js +36 -35
  368. package/es/utils/components/ProFormContext/index.js +1 -1
  369. package/es/utils/conversionMomentValue/index.js +19 -22
  370. package/es/utils/dateArrayFormatter/index.js +9 -14
  371. package/es/utils/genCopyable/index.js +74 -32
  372. package/es/utils/getFieldPropsOrFormItemProps/index.js +1 -1
  373. package/es/utils/hooks/useDebounceFn/index.js +18 -51
  374. package/es/utils/hooks/useDebounceValue/index.js +7 -16
  375. package/es/utils/hooks/useDeepCompareEffect/index.js +6 -18
  376. package/es/utils/hooks/useDocumentTitle/index.js +2 -2
  377. package/es/utils/hooks/useFetchData/index.js +36 -65
  378. package/es/utils/hooks/useForceRender/index.js +2 -9
  379. package/es/utils/hooks/useLatest/index.js +2 -2
  380. package/es/utils/hooks/usePrevious/index.js +3 -3
  381. package/es/utils/hooks/useReactiveRef/index.js +2 -2
  382. package/es/utils/hooks/useRefCallback/index.js +3 -3
  383. package/es/utils/hooks/useRefFunction/index.js +4 -9
  384. package/es/utils/index.d.ts +1 -2
  385. package/es/utils/index.js +1 -2
  386. package/es/utils/isBrowser/index.js +2 -2
  387. package/es/utils/isDeepEqualReact/index.js +9 -44
  388. package/es/utils/isDropdownValueType/index.js +2 -2
  389. package/es/utils/isNil/index.js +1 -3
  390. package/es/utils/isUrl/index.js +2 -2
  391. package/es/utils/merge/index.js +10 -12
  392. package/es/utils/nanoid/index.js +5 -6
  393. package/es/utils/omitBoolean/index.js +1 -1
  394. package/es/utils/omitUndefined/index.js +3 -3
  395. package/es/utils/omitUndefinedAndEmptyArr/index.js +4 -5
  396. package/es/utils/parseValueToMoment/index.js +3 -7
  397. package/es/utils/pickProFormItemProps/index.js +3 -3
  398. package/es/utils/pickProProps/index.js +6 -7
  399. package/es/utils/proFieldParsingText/index.js +86 -99
  400. package/es/utils/runFunction/index.js +2 -5
  401. package/es/utils/stringify/index.js +1 -1
  402. package/es/utils/transformKeySubmitValue/index.js +99 -116
  403. package/es/utils/typing.d.ts +1 -1
  404. package/es/utils/useEditableArray/index.d.ts +9 -7
  405. package/es/utils/useEditableArray/index.js +788 -700
  406. package/es/utils/useEditableMap/index.d.ts +1 -1
  407. package/es/utils/useEditableMap/index.js +148 -137
  408. package/es/utils/useMediaQuery/index.js +16 -18
  409. package/es/utils/useMediaQuery/query.js +15 -19
  410. package/es/version.js +1 -1
  411. package/lib/card/ProCard.js +7 -7
  412. package/lib/card/components/Actions/index.js +25 -25
  413. package/lib/card/components/Actions/style.d.ts +1 -1
  414. package/lib/card/components/Actions/style.js +79 -72
  415. package/lib/card/components/Card/index.js +157 -138
  416. package/lib/card/components/Card/style.d.ts +1 -1
  417. package/lib/card/components/Card/style.js +249 -193
  418. package/lib/card/components/CheckCard/Group.js +97 -115
  419. package/lib/card/components/CheckCard/index.d.ts +6 -0
  420. package/lib/card/components/CheckCard/index.js +85 -77
  421. package/lib/card/components/CheckCard/style.d.ts +1 -1
  422. package/lib/card/components/CheckCard/style.js +184 -169
  423. package/lib/card/components/Divider/index.js +20 -16
  424. package/lib/card/components/Divider/style.d.ts +1 -1
  425. package/lib/card/components/Divider/style.js +32 -30
  426. package/lib/card/components/Loading/index.js +19 -16
  427. package/lib/card/components/Loading/style.d.ts +1 -1
  428. package/lib/card/components/Loading/style.js +34 -32
  429. package/lib/card/components/Operation/index.js +16 -14
  430. package/lib/card/components/Operation/style.d.ts +1 -1
  431. package/lib/card/components/Operation/style.js +19 -19
  432. package/lib/card/components/Statistic/index.js +46 -42
  433. package/lib/card/components/Statistic/style.d.ts +1 -1
  434. package/lib/card/components/Statistic/style.js +89 -71
  435. package/lib/card/components/StatisticCard/index.js +45 -38
  436. package/lib/card/components/StatisticCard/style.d.ts +1 -1
  437. package/lib/card/components/StatisticCard/style.js +37 -36
  438. package/lib/card/index.js +4 -4
  439. package/lib/card/typing.d.ts +5 -0
  440. package/lib/descriptions/index.js +219 -225
  441. package/lib/descriptions/useFetchData.js +51 -90
  442. package/lib/field/AllProField.js +267 -217
  443. package/lib/field/FieldHOC/index.js +9 -15
  444. package/lib/field/PureProField.js +84 -82
  445. package/lib/field/ValueTypeToComponent.js +517 -618
  446. package/lib/field/components/Cascader/index.d.ts +2 -3
  447. package/lib/field/components/Cascader/index.js +65 -85
  448. package/lib/field/components/Checkbox/index.d.ts +1 -2
  449. package/lib/field/components/Checkbox/index.js +75 -73
  450. package/lib/field/components/Code/index.js +40 -39
  451. package/lib/field/components/ColorPicker/index.js +38 -33
  452. package/lib/field/components/DatePicker/index.d.ts +1 -1
  453. package/lib/field/components/DatePicker/index.js +49 -53
  454. package/lib/field/components/Digit/index.js +41 -43
  455. package/lib/field/components/DigitRange/index.js +69 -76
  456. package/lib/field/components/FromNow/index.js +27 -25
  457. package/lib/field/components/Image/index.js +28 -24
  458. package/lib/field/components/IndexColumn/index.js +22 -17
  459. package/lib/field/components/Money/index.js +106 -116
  460. package/lib/field/components/Options/index.js +34 -34
  461. package/lib/field/components/Password/index.js +35 -38
  462. package/lib/field/components/Percent/index.js +40 -45
  463. package/lib/field/components/Percent/util.js +3 -6
  464. package/lib/field/components/Progress/index.js +29 -28
  465. package/lib/field/components/Radio/index.d.ts +1 -2
  466. package/lib/field/components/Radio/index.js +61 -63
  467. package/lib/field/components/RangePicker/index.d.ts +1 -1
  468. package/lib/field/components/RangePicker/index.js +52 -63
  469. package/lib/field/components/Rate/index.js +24 -21
  470. package/lib/field/components/Second/index.js +36 -33
  471. package/lib/field/components/Segmented/index.d.ts +1 -2
  472. package/lib/field/components/Segmented/index.js +37 -48
  473. package/lib/field/components/Select/LightSelect/index.d.ts +1 -1
  474. package/lib/field/components/Select/LightSelect/index.js +103 -111
  475. package/lib/field/components/Select/SearchSelect/index.d.ts +6 -1
  476. package/lib/field/components/Select/SearchSelect/index.js +193 -130
  477. package/lib/field/components/Select/index.d.ts +1 -4
  478. package/lib/field/components/Select/index.js +198 -220
  479. package/lib/field/components/Slider/index.js +25 -22
  480. package/lib/field/components/Status/index.js +69 -79
  481. package/lib/field/components/Switch/index.d.ts +1 -1
  482. package/lib/field/components/Switch/index.js +32 -31
  483. package/lib/field/components/Text/index.js +34 -38
  484. package/lib/field/components/TextArea/index.js +26 -21
  485. package/lib/field/components/TextArea/readonly.js +24 -22
  486. package/lib/field/components/TimePicker/index.js +96 -105
  487. package/lib/field/components/TreeSelect/index.d.ts +2 -3
  488. package/lib/field/components/TreeSelect/index.js +105 -124
  489. package/lib/field/index.js +34 -34
  490. package/lib/form/BaseForm/BaseForm.d.ts +3 -0
  491. package/lib/form/BaseForm/BaseForm.js +415 -495
  492. package/lib/form/BaseForm/EditOrReadOnlyContext.js +1 -1
  493. package/lib/form/BaseForm/LightWrapper/index.js +57 -66
  494. package/lib/form/BaseForm/LightWrapper/style.d.ts +1 -1
  495. package/lib/form/BaseForm/LightWrapper/style.js +17 -14
  496. package/lib/form/BaseForm/Submitter/index.js +44 -44
  497. package/lib/form/BaseForm/index.js +3 -3
  498. package/lib/form/FieldContext.js +1 -1
  499. package/lib/form/components/Captcha/index.d.ts +8 -2
  500. package/lib/form/components/Captcha/index.js +76 -129
  501. package/lib/form/components/Cascader/index.js +26 -29
  502. package/lib/form/components/Checkbox/index.js +60 -61
  503. package/lib/form/components/ColorPicker/index.js +24 -26
  504. package/lib/form/components/DatePicker/BaseDatePicker.js +32 -30
  505. package/lib/form/components/DatePicker/DatePicker.js +14 -13
  506. package/lib/form/components/DatePicker/DateTimePicker.js +11 -12
  507. package/lib/form/components/DatePicker/MonthPicker.js +14 -13
  508. package/lib/form/components/DatePicker/QuarterPicker.js +14 -13
  509. package/lib/form/components/DatePicker/TimePicker.js +26 -27
  510. package/lib/form/components/DatePicker/WeekPicker.js +14 -13
  511. package/lib/form/components/DatePicker/YearPicker.js +14 -13
  512. package/lib/form/components/DatePicker/index.js +1 -1
  513. package/lib/form/components/DateRangePicker/BaseDateRanger.js +34 -34
  514. package/lib/form/components/DateRangePicker/DateMonthRangePicker.js +15 -16
  515. package/lib/form/components/DateRangePicker/DateQuarterRangePicker.js +15 -16
  516. package/lib/form/components/DateRangePicker/DateTimeRangePicker.js +15 -16
  517. package/lib/form/components/DateRangePicker/DateWeekRangePicker.js +15 -16
  518. package/lib/form/components/DateRangePicker/DateYearRangePicker.js +15 -16
  519. package/lib/form/components/DateRangePicker/TimeRangePicker.js +26 -29
  520. package/lib/form/components/DateRangePicker/index.js +15 -16
  521. package/lib/form/components/Dependency/index.js +31 -35
  522. package/lib/form/components/Digit/DigitRange.js +23 -24
  523. package/lib/form/components/Digit/index.js +27 -29
  524. package/lib/form/components/Field/index.js +55 -63
  525. package/lib/form/components/FieldSet/index.js +68 -76
  526. package/lib/form/components/FormItem/FormItemRender/index.js +58 -48
  527. package/lib/form/components/FormItem/Group/index.js +95 -95
  528. package/lib/form/components/FormItem/Group/style.d.ts +1 -1
  529. package/lib/form/components/FormItem/Group/style.js +46 -41
  530. package/lib/form/components/FormItem/index.js +135 -141
  531. package/lib/form/components/FormItem/warpField.js +165 -149
  532. package/lib/form/components/List/ListContainer.js +100 -191
  533. package/lib/form/components/List/ListItem.js +153 -200
  534. package/lib/form/components/List/index.d.ts +1 -1
  535. package/lib/form/components/List/index.js +97 -107
  536. package/lib/form/components/List/style.d.ts +1 -1
  537. package/lib/form/components/List/style.js +71 -48
  538. package/lib/form/components/Money/index.js +28 -30
  539. package/lib/form/components/Radio/index.js +45 -49
  540. package/lib/form/components/Rate/index.js +17 -21
  541. package/lib/form/components/SchemaForm/index.js +54 -68
  542. package/lib/form/components/SchemaForm/layoutType/Embed.js +5 -6
  543. package/lib/form/components/SchemaForm/layoutType/StepsForm.js +22 -26
  544. package/lib/form/components/SchemaForm/layoutType/index.js +2 -2
  545. package/lib/form/components/SchemaForm/valueType/dependency.js +13 -12
  546. package/lib/form/components/SchemaForm/valueType/divider.js +6 -7
  547. package/lib/form/components/SchemaForm/valueType/field.js +47 -45
  548. package/lib/form/components/SchemaForm/valueType/formList.js +10 -9
  549. package/lib/form/components/SchemaForm/valueType/formSet.js +10 -8
  550. package/lib/form/components/SchemaForm/valueType/group.js +9 -10
  551. package/lib/form/components/SchemaForm/valueType/ignore.js +4 -3
  552. package/lib/form/components/SchemaForm/valueType/index.js +7 -6
  553. package/lib/form/components/Segmented/index.js +20 -24
  554. package/lib/form/components/Select/index.js +69 -73
  555. package/lib/form/components/Slider/index.js +33 -35
  556. package/lib/form/components/Switch/index.js +24 -26
  557. package/lib/form/components/Text/index.js +77 -86
  558. package/lib/form/components/TextArea/index.js +17 -21
  559. package/lib/form/components/TreeSelect/index.js +20 -23
  560. package/lib/form/components/UploadButton/index.js +56 -103
  561. package/lib/form/components/UploadDragger/index.js +37 -44
  562. package/lib/form/components/index.js +42 -42
  563. package/lib/form/helpers/grid.js +68 -69
  564. package/lib/form/helpers/index.js +1 -1
  565. package/lib/form/index.d.ts +1 -0
  566. package/lib/form/index.js +8 -8
  567. package/lib/form/layouts/DrawerForm/index.d.ts +1 -1
  568. package/lib/form/layouts/DrawerForm/index.js +151 -242
  569. package/lib/form/layouts/DrawerForm/style.d.ts +1 -1
  570. package/lib/form/layouts/DrawerForm/style.js +26 -26
  571. package/lib/form/layouts/LightFilter/index.d.ts +12 -1
  572. package/lib/form/layouts/LightFilter/index.js +158 -141
  573. package/lib/form/layouts/LightFilter/style.d.ts +1 -1
  574. package/lib/form/layouts/LightFilter/style.js +52 -49
  575. package/lib/form/layouts/LoginForm/index.d.ts +1 -1
  576. package/lib/form/layouts/LoginForm/index.js +44 -48
  577. package/lib/form/layouts/LoginForm/style.d.ts +1 -1
  578. package/lib/form/layouts/LoginForm/style.js +71 -68
  579. package/lib/form/layouts/LoginFormPage/index.d.ts +1 -1
  580. package/lib/form/layouts/LoginFormPage/index.js +45 -49
  581. package/lib/form/layouts/LoginFormPage/style.d.ts +1 -1
  582. package/lib/form/layouts/LoginFormPage/style.js +136 -127
  583. package/lib/form/layouts/ModalForm/index.js +119 -203
  584. package/lib/form/layouts/ProForm/index.d.ts +1 -1
  585. package/lib/form/layouts/ProForm/index.js +5 -5
  586. package/lib/form/layouts/QueryFilter/Actions.js +23 -22
  587. package/lib/form/layouts/QueryFilter/index.d.ts +2 -1
  588. package/lib/form/layouts/QueryFilter/index.js +177 -202
  589. package/lib/form/layouts/QueryFilter/style.d.ts +1 -1
  590. package/lib/form/layouts/QueryFilter/style.js +45 -38
  591. package/lib/form/layouts/StepsForm/StepForm.d.ts +2 -3
  592. package/lib/form/layouts/StepsForm/StepForm.js +50 -72
  593. package/lib/form/layouts/StepsForm/index.js +186 -215
  594. package/lib/form/layouts/StepsForm/style.d.ts +1 -1
  595. package/lib/form/layouts/StepsForm/style.js +30 -29
  596. package/lib/form/layouts/index.js +9 -9
  597. package/lib/index.js +11 -11
  598. package/lib/layout/ProLayout.js +281 -292
  599. package/lib/layout/WrapContent.js +18 -14
  600. package/lib/layout/assert/Logo.js +96 -97
  601. package/lib/layout/components/AppsLogoComponents/AppsLogo.js +11 -12
  602. package/lib/layout/components/AppsLogoComponents/DefaultContent.js +19 -17
  603. package/lib/layout/components/AppsLogoComponents/SimpleContent.js +22 -19
  604. package/lib/layout/components/AppsLogoComponents/index.js +37 -39
  605. package/lib/layout/components/AppsLogoComponents/style/default.js +4 -3
  606. package/lib/layout/components/AppsLogoComponents/style/index.d.ts +1 -1
  607. package/lib/layout/components/AppsLogoComponents/style/index.js +52 -51
  608. package/lib/layout/components/AppsLogoComponents/style/simple.js +3 -2
  609. package/lib/layout/components/CollapsedIcon/index.js +20 -17
  610. package/lib/layout/components/CollapsedIcon/style.d.ts +1 -1
  611. package/lib/layout/components/CollapsedIcon/style.js +40 -41
  612. package/lib/layout/components/Footer.js +23 -22
  613. package/lib/layout/components/FooterToolbar/index.js +59 -53
  614. package/lib/layout/components/FooterToolbar/style/index.d.ts +1 -1
  615. package/lib/layout/components/FooterToolbar/style/index.js +38 -38
  616. package/lib/layout/components/FooterToolbar/style/stylish.d.ts +1 -1
  617. package/lib/layout/components/FooterToolbar/style/stylish.js +11 -10
  618. package/lib/layout/components/GlobalFooter/index.d.ts +1 -1
  619. package/lib/layout/components/GlobalFooter/index.js +27 -27
  620. package/lib/layout/components/GlobalFooter/style.d.ts +1 -1
  621. package/lib/layout/components/GlobalFooter/style.js +31 -31
  622. package/lib/layout/components/GlobalHeader/ActionsContent.js +65 -81
  623. package/lib/layout/components/GlobalHeader/index.js +61 -49
  624. package/lib/layout/components/GlobalHeader/rightContentStyle.d.ts +1 -1
  625. package/lib/layout/components/GlobalHeader/rightContentStyle.js +49 -50
  626. package/lib/layout/components/GlobalHeader/style.d.ts +1 -1
  627. package/lib/layout/components/GlobalHeader/style.js +58 -55
  628. package/lib/layout/components/GridContent/index.js +26 -21
  629. package/lib/layout/components/GridContent/style.d.ts +1 -1
  630. package/lib/layout/components/GridContent/style.js +14 -14
  631. package/lib/layout/components/Header/index.js +65 -59
  632. package/lib/layout/components/Header/style/header.d.ts +1 -1
  633. package/lib/layout/components/Header/style/header.js +49 -48
  634. package/lib/layout/components/Header/style/stylish.d.ts +1 -1
  635. package/lib/layout/components/Header/style/stylish.js +15 -12
  636. package/lib/layout/components/Help/AsyncContentPanel.js +15 -20
  637. package/lib/layout/components/Help/HelpProvide.js +1 -1
  638. package/lib/layout/components/Help/ProHelpContentPanel.js +66 -85
  639. package/lib/layout/components/Help/ProHelpDrawer.d.ts +1 -1
  640. package/lib/layout/components/Help/ProHelpDrawer.js +27 -30
  641. package/lib/layout/components/Help/ProHelpModal.d.ts +1 -1
  642. package/lib/layout/components/Help/ProHelpModal.js +26 -28
  643. package/lib/layout/components/Help/ProHelpPanel.js +86 -94
  644. package/lib/layout/components/Help/ProHelpPopover.js +21 -19
  645. package/lib/layout/components/Help/RenderContentPanel.js +36 -26
  646. package/lib/layout/components/Help/Search.js +55 -80
  647. package/lib/layout/components/Help/index.js +19 -20
  648. package/lib/layout/components/Help/style.d.ts +1 -1
  649. package/lib/layout/components/Help/style.js +82 -76
  650. package/lib/layout/components/PageContainer/index.js +172 -151
  651. package/lib/layout/components/PageContainer/style/index.d.ts +1 -1
  652. package/lib/layout/components/PageContainer/style/index.js +95 -79
  653. package/lib/layout/components/PageContainer/style/stylish.d.ts +1 -1
  654. package/lib/layout/components/PageContainer/style/stylish.js +11 -10
  655. package/lib/layout/components/PageHeader/index.js +99 -99
  656. package/lib/layout/components/PageHeader/style/index.d.ts +1 -1
  657. package/lib/layout/components/PageHeader/style/index.js +142 -123
  658. package/lib/layout/components/PageLoading/index.js +18 -20
  659. package/lib/layout/components/SettingDrawer/BlockCheckbox.js +31 -34
  660. package/lib/layout/components/SettingDrawer/LayoutChange.js +25 -23
  661. package/lib/layout/components/SettingDrawer/RegionalChange.js +16 -16
  662. package/lib/layout/components/SettingDrawer/ThemeColor.js +34 -36
  663. package/lib/layout/components/SettingDrawer/index.js +140 -170
  664. package/lib/layout/components/SettingDrawer/style/index.d.ts +1 -1
  665. package/lib/layout/components/SettingDrawer/style/index.js +141 -138
  666. package/lib/layout/components/SiderMenu/BaseMenu.d.ts +1 -1
  667. package/lib/layout/components/SiderMenu/BaseMenu.js +236 -222
  668. package/lib/layout/components/SiderMenu/SiderMenu.js +130 -119
  669. package/lib/layout/components/SiderMenu/index.js +53 -45
  670. package/lib/layout/components/SiderMenu/style/index.d.ts +1 -1
  671. package/lib/layout/components/SiderMenu/style/index.js +179 -162
  672. package/lib/layout/components/SiderMenu/style/menu.d.ts +1 -1
  673. package/lib/layout/components/SiderMenu/style/menu.js +148 -111
  674. package/lib/layout/components/SiderMenu/style/stylish.d.ts +1 -1
  675. package/lib/layout/components/SiderMenu/style/stylish.js +15 -12
  676. package/lib/layout/components/TopNavHeader/index.js +73 -62
  677. package/lib/layout/components/TopNavHeader/style.d.ts +1 -1
  678. package/lib/layout/components/TopNavHeader/style.js +64 -64
  679. package/lib/layout/context/RouteContext.js +1 -1
  680. package/lib/layout/defaultSettings.d.ts +6 -0
  681. package/lib/layout/defaultSettings.js +1 -1
  682. package/lib/layout/getPageTitle.js +27 -26
  683. package/lib/layout/index.js +16 -16
  684. package/lib/layout/locales/en-US.js +3 -2
  685. package/lib/layout/locales/index.js +8 -6
  686. package/lib/layout/locales/it-IT.js +3 -2
  687. package/lib/layout/locales/ko-KR.js +3 -2
  688. package/lib/layout/locales/zh-CN.js +3 -2
  689. package/lib/layout/locales/zh-TW.js +3 -2
  690. package/lib/layout/style/index.d.ts +1 -1
  691. package/lib/layout/style/index.js +48 -43
  692. package/lib/layout/utils/getBreadcrumbProps.js +65 -62
  693. package/lib/layout/utils/getMenuData.js +9 -13
  694. package/lib/layout/utils/pathTools.js +2 -6
  695. package/lib/layout/utils/useCurrentMenuLayoutProps.js +6 -11
  696. package/lib/layout/utils/utils.js +16 -18
  697. package/lib/list/Item.js +155 -136
  698. package/lib/list/ListView.js +110 -119
  699. package/lib/list/constants.js +2 -2
  700. package/lib/list/index.js +72 -70
  701. package/lib/list/style/index.d.ts +1 -1
  702. package/lib/list/style/index.js +281 -214
  703. package/lib/provider/index.d.ts +1 -0
  704. package/lib/provider/index.js +132 -117
  705. package/lib/provider/intl.js +56 -56
  706. package/lib/provider/typing/layoutToken.js +28 -25
  707. package/lib/provider/useStyle/index.d.ts +2 -1
  708. package/lib/provider/useStyle/index.js +64 -61
  709. package/lib/provider/utils/merge.js +12 -14
  710. package/lib/skeleton/components/Descriptions/index.js +213 -229
  711. package/lib/skeleton/components/List/index.js +211 -221
  712. package/lib/skeleton/components/Result/index.js +45 -47
  713. package/lib/skeleton/index.js +23 -19
  714. package/lib/table/Store/Provide.d.ts +4 -4
  715. package/lib/table/Store/Provide.js +103 -117
  716. package/lib/table/Table.d.ts +5 -2
  717. package/lib/table/Table.js +592 -602
  718. package/lib/table/TableSearch.d.ts +24 -0
  719. package/lib/table/TableSearch.js +61 -0
  720. package/lib/table/TableToolbar.d.ts +22 -0
  721. package/lib/table/TableToolbar.js +55 -0
  722. package/lib/table/components/Alert/index.d.ts +1 -1
  723. package/lib/table/components/Alert/index.js +41 -40
  724. package/lib/table/components/Alert/style.d.ts +1 -1
  725. package/lib/table/components/Alert/style.js +28 -28
  726. package/lib/table/components/ColumnSetting/index.d.ts +1 -1
  727. package/lib/table/components/ColumnSetting/index.js +230 -224
  728. package/lib/table/components/ColumnSetting/style.d.ts +1 -1
  729. package/lib/table/components/ColumnSetting/style.js +86 -72
  730. package/lib/table/components/DragSortTable/index.d.ts +1 -1
  731. package/lib/table/components/DragSortTable/index.js +64 -78
  732. package/lib/table/components/DragSortTable/style.d.ts +1 -1
  733. package/lib/table/components/DragSortTable/style.js +20 -20
  734. package/lib/table/components/Dropdown/index.js +42 -48
  735. package/lib/table/components/EditableTable/CellEditorTable.js +24 -32
  736. package/lib/table/components/EditableTable/RowEditorTable.js +23 -28
  737. package/lib/table/components/EditableTable/index.js +598 -299
  738. package/lib/table/components/Form/FormRender.js +99 -104
  739. package/lib/table/components/Form/index.d.ts +4 -19
  740. package/lib/table/components/Form/index.js +113 -159
  741. package/lib/table/components/ListToolBar/HeaderMenu.js +42 -51
  742. package/lib/table/components/ListToolBar/index.js +123 -148
  743. package/lib/table/components/ListToolBar/style.d.ts +1 -1
  744. package/lib/table/components/ListToolBar/style.js +127 -118
  745. package/lib/table/components/ToolBar/DensityIcon.js +10 -9
  746. package/lib/table/components/ToolBar/FullscreenIcon.js +5 -10
  747. package/lib/table/components/ToolBar/index.d.ts +2 -8
  748. package/lib/table/components/ToolBar/index.js +154 -194
  749. package/lib/table/index.js +27 -27
  750. package/lib/table/style/index.d.ts +1 -1
  751. package/lib/table/style/index.js +144 -113
  752. package/lib/table/typing.d.ts +13 -6
  753. package/lib/table/useFetchData.js +202 -347
  754. package/lib/table/utils/cellRenderToFromItem.js +106 -120
  755. package/lib/table/utils/columnRender.js +65 -54
  756. package/lib/table/utils/columnSort.js +24 -23
  757. package/lib/table/utils/genProColumnToColumn.d.ts +13 -9
  758. package/lib/table/utils/genProColumnToColumn.js +121 -99
  759. package/lib/table/utils/index.d.ts +12 -0
  760. package/lib/table/utils/index.js +129 -181
  761. package/lib/table/utils/useDragSort.d.ts +1 -1
  762. package/lib/table/utils/useDragSort.js +99 -93
  763. package/lib/table/utils/usePageInfo.d.ts +6 -0
  764. package/lib/table/utils/usePageInfo.js +61 -0
  765. package/lib/utils/components/DropdownFooter/index.js +25 -23
  766. package/lib/utils/components/DropdownFooter/style.d.ts +1 -1
  767. package/lib/utils/components/DropdownFooter/style.js +16 -16
  768. package/lib/utils/components/ErrorBoundary/index.js +28 -50
  769. package/lib/utils/components/FieldLabel/index.js +70 -71
  770. package/lib/utils/components/FieldLabel/style.d.ts +1 -1
  771. package/lib/utils/components/FieldLabel/style.js +104 -82
  772. package/lib/utils/components/FilterDropdown/index.d.ts +11 -0
  773. package/lib/utils/components/FilterDropdown/index.js +44 -33
  774. package/lib/utils/components/FilterDropdown/style.d.ts +1 -1
  775. package/lib/utils/components/FilterDropdown/style.js +19 -17
  776. package/lib/utils/components/InlineErrorFormItem/index.js +80 -80
  777. package/lib/utils/components/InlineErrorFormItem/style.d.ts +1 -1
  778. package/lib/utils/components/InlineErrorFormItem/style.js +56 -50
  779. package/lib/utils/components/LabelIconTip/index.js +30 -32
  780. package/lib/utils/components/LabelIconTip/style.d.ts +1 -1
  781. package/lib/utils/components/LabelIconTip/style.js +36 -36
  782. package/lib/utils/components/ProFormContext/index.js +1 -1
  783. package/lib/utils/conversionMomentValue/index.js +22 -23
  784. package/lib/utils/dateArrayFormatter/index.js +11 -15
  785. package/lib/utils/genCopyable/index.js +75 -33
  786. package/lib/utils/getFieldPropsOrFormItemProps/index.js +3 -2
  787. package/lib/utils/hooks/useDebounceFn/index.js +18 -52
  788. package/lib/utils/hooks/useDebounceValue/index.js +7 -17
  789. package/lib/utils/hooks/useDeepCompareEffect/index.js +7 -19
  790. package/lib/utils/hooks/useDocumentTitle/index.js +2 -2
  791. package/lib/utils/hooks/useFetchData/index.js +36 -65
  792. package/lib/utils/hooks/useForceRender/index.js +2 -10
  793. package/lib/utils/hooks/useLatest/index.js +4 -3
  794. package/lib/utils/hooks/usePrevious/index.js +5 -4
  795. package/lib/utils/hooks/useReactiveRef/index.js +2 -2
  796. package/lib/utils/hooks/useRefCallback/index.js +3 -3
  797. package/lib/utils/hooks/useRefFunction/index.js +6 -11
  798. package/lib/utils/index.d.ts +1 -2
  799. package/lib/utils/index.js +57 -65
  800. package/lib/utils/isBrowser/index.js +4 -3
  801. package/lib/utils/isDeepEqualReact/index.js +9 -45
  802. package/lib/utils/isDropdownValueType/index.js +4 -3
  803. package/lib/utils/isNil/index.js +2 -3
  804. package/lib/utils/isUrl/index.js +4 -3
  805. package/lib/utils/merge/index.js +12 -14
  806. package/lib/utils/nanoid/index.js +7 -7
  807. package/lib/utils/omitBoolean/index.js +3 -2
  808. package/lib/utils/omitUndefined/index.js +5 -4
  809. package/lib/utils/omitUndefinedAndEmptyArr/index.js +6 -6
  810. package/lib/utils/parseValueToMoment/index.js +5 -8
  811. package/lib/utils/pickProFormItemProps/index.js +3 -3
  812. package/lib/utils/pickProProps/index.js +6 -7
  813. package/lib/utils/proFieldParsingText/index.js +90 -100
  814. package/lib/utils/runFunction/index.js +2 -5
  815. package/lib/utils/stringify/index.js +2 -2
  816. package/lib/utils/transformKeySubmitValue/index.js +101 -117
  817. package/lib/utils/typing.d.ts +1 -1
  818. package/lib/utils/useEditableArray/index.d.ts +9 -7
  819. package/lib/utils/useEditableArray/index.js +791 -700
  820. package/lib/utils/useEditableMap/index.d.ts +1 -1
  821. package/lib/utils/useEditableMap/index.js +147 -137
  822. package/lib/utils/useMediaQuery/index.js +19 -19
  823. package/lib/utils/useMediaQuery/query.js +14 -19
  824. package/lib/version.js +1 -1
  825. package/package.json +34 -45
  826. package/es/utils/useMountMergeState/index.d.ts +0 -2
  827. package/es/utils/useMountMergeState/index.js +0 -2
  828. package/lib/utils/useMountMergeState/index.d.ts +0 -2
  829. package/lib/utils/useMountMergeState/index.js +0 -12
@@ -1,7 +1,5 @@
1
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
1
  import { ConfigProvider } from 'antd';
4
- import classNames from 'classnames';
2
+ import { clsx } from 'clsx';
5
3
  import React, { useContext, useMemo, useRef } from 'react';
6
4
  import { isNeedOpenHash, ProProvider } from "../../../provider";
7
5
  import { AppsLogoComponents } from "../AppsLogoComponents";
@@ -11,38 +9,43 @@ import { renderLogoAndTitle } from "../SiderMenu/SiderMenu";
11
9
  import { useStyle } from "./style";
12
10
  import { jsx as _jsx } from "react/jsx-runtime";
13
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
- var TopNavHeader = function TopNavHeader(props) {
15
- var _token$layout12, _token$layout13, _token$layout14, _token$layout15, _token$layout16, _token$layout17, _token$layout18;
16
- var ref = useRef(null);
17
- var onMenuHeaderClick = props.onMenuHeaderClick,
18
- contentWidth = props.contentWidth,
19
- propsClassName = props.className,
20
- style = props.style,
21
- headerContentRender = props.headerContentRender,
22
- layout = props.layout,
23
- actionsRender = props.actionsRender;
24
- var _useContext = useContext(ConfigProvider.ConfigContext),
25
- getPrefixCls = _useContext.getPrefixCls;
26
- var _useContext2 = useContext(ProProvider),
27
- dark = _useContext2.dark;
28
- var prefixCls = "".concat(props.prefixCls || getPrefixCls('pro'), "-top-nav-header");
29
- var _useStyle = useStyle(prefixCls),
30
- wrapSSR = _useStyle.wrapSSR,
31
- hashId = _useStyle.hashId;
32
- var renderKey = undefined;
12
+ const TopNavHeader = props => {
13
+ const ref = useRef(null);
14
+ const {
15
+ onMenuHeaderClick,
16
+ contentWidth,
17
+ className: propsClassName,
18
+ style,
19
+ headerContentRender,
20
+ layout,
21
+ actionsRender
22
+ } = props;
23
+ const {
24
+ getPrefixCls
25
+ } = useContext(ConfigProvider.ConfigContext);
26
+ const {
27
+ dark
28
+ } = useContext(ProProvider);
29
+ const prefixCls = `${props.prefixCls || getPrefixCls('pro')}-top-nav-header`;
30
+ const {
31
+ wrapSSR,
32
+ hashId
33
+ } = useStyle(prefixCls);
34
+ let renderKey = undefined;
33
35
  if (props.menuHeaderRender !== undefined) {
34
36
  renderKey = 'menuHeaderRender';
35
37
  } else if (layout === 'mix' || layout === 'top') {
36
38
  renderKey = 'headerTitleRender';
37
39
  }
38
- var headerDom = renderLogoAndTitle(_objectSpread(_objectSpread({}, props), {}, {
40
+ const headerDom = renderLogoAndTitle({
41
+ ...props,
39
42
  collapsed: false
40
- }), renderKey);
41
- var _useContext3 = useContext(ProProvider),
42
- token = _useContext3.token;
43
- var contentDom = useMemo(function () {
44
- var _token$layout, _token$layout2, _token$layout3, _token$layout4, _token$layout5, _token$layout6, _token$layout7, _token$layout8, _token$layout9, _token$layout10, _token$layout11, _props$menuProps;
45
- var defaultDom = /*#__PURE__*/_jsx(ConfigProvider // @ts-ignore
43
+ }, renderKey);
44
+ const {
45
+ token
46
+ } = useContext(ProProvider);
47
+ const contentDom = useMemo(() => {
48
+ const defaultDom = /*#__PURE__*/_jsx(ConfigProvider // @ts-ignore
46
49
  , {
47
50
  theme: {
48
51
  hashed: isNeedOpenHash(),
@@ -52,59 +55,66 @@ var TopNavHeader = function TopNavHeader(props) {
52
55
  bodyBg: 'transparent'
53
56
  },
54
57
  Menu: {
55
- itemBg: ((_token$layout = token.layout) === null || _token$layout === void 0 || (_token$layout = _token$layout.header) === null || _token$layout === void 0 ? void 0 : _token$layout.colorBgHeader) || 'transparent',
56
- subMenuItemBg: ((_token$layout2 = token.layout) === null || _token$layout2 === void 0 || (_token$layout2 = _token$layout2.header) === null || _token$layout2 === void 0 ? void 0 : _token$layout2.colorBgHeader) || 'transparent',
58
+ itemBg: token.layout?.header?.colorBgHeader || 'transparent',
59
+ subMenuItemBg: token.layout?.header?.colorBgHeader || 'transparent',
57
60
  itemBorderRadius: token.borderRadius,
58
- itemSelectedBg: ((_token$layout3 = token.layout) === null || _token$layout3 === void 0 || (_token$layout3 = _token$layout3.header) === null || _token$layout3 === void 0 ? void 0 : _token$layout3.colorBgMenuItemSelected) || (token === null || token === void 0 ? void 0 : token.colorBgTextHover),
59
- horizontalItemSelectedBg: ((_token$layout4 = token.layout) === null || _token$layout4 === void 0 || (_token$layout4 = _token$layout4.header) === null || _token$layout4 === void 0 ? void 0 : _token$layout4.colorBgMenuItemSelected) || (token === null || token === void 0 ? void 0 : token.colorBgTextHover),
61
+ itemSelectedBg: token.layout?.header?.colorBgMenuItemSelected || token?.colorBgTextHover,
62
+ horizontalItemSelectedBg: token.layout?.header?.colorBgMenuItemSelected || token?.colorBgTextHover,
60
63
  activeBarWidth: 0,
61
64
  activeBarHeight: 0,
62
65
  activeBarBorderWidth: 0,
63
- itemColor: ((_token$layout5 = token.layout) === null || _token$layout5 === void 0 || (_token$layout5 = _token$layout5.header) === null || _token$layout5 === void 0 ? void 0 : _token$layout5.colorTextMenu) || (token === null || token === void 0 ? void 0 : token.colorTextSecondary),
64
- horizontalItemHoverColor: ((_token$layout6 = token.layout) === null || _token$layout6 === void 0 || (_token$layout6 = _token$layout6.header) === null || _token$layout6 === void 0 ? void 0 : _token$layout6.colorTextMenuActive) || (token === null || token === void 0 ? void 0 : token.colorText),
65
- horizontalItemSelectedColor: ((_token$layout7 = token.layout) === null || _token$layout7 === void 0 || (_token$layout7 = _token$layout7.header) === null || _token$layout7 === void 0 ? void 0 : _token$layout7.colorTextMenuSelected) || (token === null || token === void 0 ? void 0 : token.colorTextBase),
66
+ itemColor: token.layout?.header?.colorTextMenu || token?.colorTextSecondary,
67
+ horizontalItemHoverColor: token.layout?.header?.colorTextMenuActive || token?.colorText,
68
+ horizontalItemSelectedColor: token.layout?.header?.colorTextMenuSelected || token?.colorTextBase,
66
69
  horizontalItemBorderRadius: 4,
67
- itemHoverColor: ((_token$layout8 = token.layout) === null || _token$layout8 === void 0 || (_token$layout8 = _token$layout8.header) === null || _token$layout8 === void 0 ? void 0 : _token$layout8.colorTextMenuActive) || 'rgba(0, 0, 0, 0.85)',
68
- horizontalItemHoverBg: ((_token$layout9 = token.layout) === null || _token$layout9 === void 0 || (_token$layout9 = _token$layout9.header) === null || _token$layout9 === void 0 ? void 0 : _token$layout9.colorBgMenuItemHover) || 'rgba(0, 0, 0, 0.04)',
69
- itemSelectedColor: ((_token$layout10 = token.layout) === null || _token$layout10 === void 0 || (_token$layout10 = _token$layout10.header) === null || _token$layout10 === void 0 ? void 0 : _token$layout10.colorTextMenuSelected) || 'rgba(0, 0, 0, 1)',
70
- popupBg: token === null || token === void 0 ? void 0 : token.colorBgElevated,
70
+ itemHoverColor: token.layout?.header?.colorTextMenuActive || 'rgba(0, 0, 0, 0.85)',
71
+ horizontalItemHoverBg: token.layout?.header?.colorBgMenuItemHover || 'rgba(0, 0, 0, 0.04)',
72
+ itemSelectedColor: token.layout?.header?.colorTextMenuSelected || 'rgba(0, 0, 0, 1)',
73
+ popupBg: token?.colorBgElevated,
71
74
  darkSubMenuItemBg: 'transparent',
72
- darkPopupBg: token === null || token === void 0 ? void 0 : token.colorBgElevated
75
+ darkPopupBg: token?.colorBgElevated
73
76
  }
74
77
  },
75
78
  token: {
76
- colorBgElevated: ((_token$layout11 = token.layout) === null || _token$layout11 === void 0 || (_token$layout11 = _token$layout11.header) === null || _token$layout11 === void 0 ? void 0 : _token$layout11.colorBgHeader) || 'transparent'
79
+ colorBgElevated: token.layout?.header?.colorBgHeader || 'transparent'
77
80
  }
78
81
  },
79
- children: /*#__PURE__*/_jsx(BaseMenu, _objectSpread(_objectSpread(_objectSpread({
80
- theme: dark ? 'dark' : 'light'
81
- }, props), {}, {
82
- className: "".concat(prefixCls, "-base-menu ").concat(hashId).trim()
83
- }, props.menuProps), {}, {
84
- style: _objectSpread({
85
- width: '100%'
86
- }, (_props$menuProps = props.menuProps) === null || _props$menuProps === void 0 ? void 0 : _props$menuProps.style),
82
+ children: /*#__PURE__*/_jsx(BaseMenu, {
83
+ theme: dark ? 'dark' : 'light',
84
+ ...props,
85
+ className: `${prefixCls}-base-menu ${hashId}`.trim(),
86
+ ...props.menuProps,
87
+ style: {
88
+ width: '100%',
89
+ ...props.menuProps?.style
90
+ },
87
91
  collapsed: false,
88
92
  menuRenderType: "header",
89
93
  mode: "horizontal"
90
- }))
94
+ })
91
95
  });
92
96
  if (headerContentRender) {
93
97
  return headerContentRender(props, defaultDom);
94
98
  }
95
99
  return defaultDom;
96
- }, [(_token$layout12 = token.layout) === null || _token$layout12 === void 0 || (_token$layout12 = _token$layout12.header) === null || _token$layout12 === void 0 ? void 0 : _token$layout12.colorBgHeader, (_token$layout13 = token.layout) === null || _token$layout13 === void 0 || (_token$layout13 = _token$layout13.header) === null || _token$layout13 === void 0 ? void 0 : _token$layout13.colorBgMenuItemSelected, (_token$layout14 = token.layout) === null || _token$layout14 === void 0 || (_token$layout14 = _token$layout14.header) === null || _token$layout14 === void 0 ? void 0 : _token$layout14.colorBgMenuItemHover, (_token$layout15 = token.layout) === null || _token$layout15 === void 0 || (_token$layout15 = _token$layout15.header) === null || _token$layout15 === void 0 ? void 0 : _token$layout15.colorTextMenu, (_token$layout16 = token.layout) === null || _token$layout16 === void 0 || (_token$layout16 = _token$layout16.header) === null || _token$layout16 === void 0 ? void 0 : _token$layout16.colorTextMenuActive, (_token$layout17 = token.layout) === null || _token$layout17 === void 0 || (_token$layout17 = _token$layout17.header) === null || _token$layout17 === void 0 ? void 0 : _token$layout17.colorTextMenuSelected, (_token$layout18 = token.layout) === null || _token$layout18 === void 0 || (_token$layout18 = _token$layout18.header) === null || _token$layout18 === void 0 ? void 0 : _token$layout18.colorBgMenuElevated, token.borderRadius, token === null || token === void 0 ? void 0 : token.colorBgTextHover, token === null || token === void 0 ? void 0 : token.colorTextSecondary, token === null || token === void 0 ? void 0 : token.colorText, token === null || token === void 0 ? void 0 : token.colorTextBase, token.colorBgElevated, dark, props, prefixCls, hashId, headerContentRender]);
100
+ }, [token.layout?.header?.colorBgHeader, token.layout?.header?.colorBgMenuItemSelected, token.layout?.header?.colorBgMenuItemHover, token.layout?.header?.colorTextMenu, token.layout?.header?.colorTextMenuActive, token.layout?.header?.colorTextMenuSelected, token.layout?.header?.colorBgMenuElevated, token.borderRadius, token?.colorBgTextHover, token?.colorTextSecondary, token?.colorText, token?.colorTextBase, token.colorBgElevated, dark, props, prefixCls, hashId, headerContentRender]);
97
101
  return wrapSSR( /*#__PURE__*/_jsx("div", {
98
- className: classNames(prefixCls, hashId, propsClassName, _defineProperty({}, "".concat(prefixCls, "-light"), true)),
102
+ className: clsx(prefixCls, hashId, propsClassName, {
103
+ [`${prefixCls}-light`]: true
104
+ }),
99
105
  style: style,
100
106
  children: /*#__PURE__*/_jsxs("div", {
101
107
  ref: ref,
102
- className: classNames("".concat(prefixCls, "-main"), hashId, _defineProperty({}, "".concat(prefixCls, "-wide"), contentWidth === 'Fixed' && layout === 'top')),
108
+ className: clsx(`${prefixCls}-main`, hashId, {
109
+ [`${prefixCls}-wide`]: contentWidth === 'Fixed' && layout === 'top'
110
+ }),
103
111
  children: [headerDom && /*#__PURE__*/_jsxs("div", {
104
- className: classNames("".concat(prefixCls, "-main-left ").concat(hashId)),
112
+ className: clsx(`${prefixCls}-main-left ${hashId}`),
105
113
  onClick: onMenuHeaderClick,
106
- children: [/*#__PURE__*/_jsx(AppsLogoComponents, _objectSpread({}, props)), /*#__PURE__*/_jsx("div", {
107
- className: "".concat(prefixCls, "-logo ").concat(hashId).trim(),
114
+ children: [/*#__PURE__*/_jsx(AppsLogoComponents, {
115
+ ...props
116
+ }), /*#__PURE__*/_jsx("div", {
117
+ className: `${prefixCls}-logo ${hashId}`.trim(),
108
118
  id: "logo",
109
119
  children: headerDom
110
120
  }, "logo")]
@@ -112,11 +122,12 @@ var TopNavHeader = function TopNavHeader(props) {
112
122
  style: {
113
123
  flex: 1
114
124
  },
115
- className: "".concat(prefixCls, "-menu ").concat(hashId).trim(),
125
+ className: `${prefixCls}-menu ${hashId}`.trim(),
116
126
  children: contentDom
117
- }), (actionsRender || props.avatarProps) && /*#__PURE__*/_jsx(ActionsContent, _objectSpread(_objectSpread({}, props), {}, {
127
+ }), (actionsRender || props.avatarProps) && /*#__PURE__*/_jsx(ActionsContent, {
128
+ ...props,
118
129
  prefixCls: prefixCls
119
- }))]
130
+ })]
120
131
  })
121
132
  }));
122
133
  };
@@ -4,6 +4,6 @@ export interface TopNavHeaderToken extends ProAliasToken {
4
4
  componentCls: string;
5
5
  }
6
6
  export declare function useStyle(prefixCls: string): {
7
- wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
7
+ wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
8
8
  hashId: string;
9
9
  };
@@ -1,76 +1,77 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
1
  import { useStyle as useAntdStyle } from "../../../provider";
4
- var genTopNavHeaderStyle = function genTopNavHeaderStyle(token) {
5
- var _token$layout, _token$layout2;
6
- return _defineProperty({}, token.componentCls, {
7
- position: 'relative',
8
- width: '100%',
9
- height: '100%',
10
- backgroundColor: 'transparent',
11
- '.anticon': {
12
- color: 'inherit'
13
- },
14
- '&-main': {
15
- display: 'flex',
16
- height: '100%',
17
- paddingInlineStart: '16px',
18
- '&-left': _defineProperty({
19
- display: 'flex',
20
- alignItems: 'center'
21
- }, "".concat(token.proComponentsCls, "-layout-apps-icon"), {
22
- marginInlineEnd: 16,
23
- marginInlineStart: -8
24
- })
25
- },
26
- '&-wide': {
27
- maxWidth: 1152,
28
- margin: '0 auto'
29
- },
30
- '&-logo': {
2
+ const genTopNavHeaderStyle = token => {
3
+ return {
4
+ [token.componentCls]: {
31
5
  position: 'relative',
32
- display: 'flex',
6
+ width: '100%',
33
7
  height: '100%',
34
- alignItems: 'center',
35
- overflow: 'hidden',
36
- '> *:first-child': {
8
+ backgroundColor: 'transparent',
9
+ '.anticon': {
10
+ color: 'inherit'
11
+ },
12
+ '&-main': {
37
13
  display: 'flex',
38
- alignItems: 'center',
39
- minHeight: '22px',
40
- fontSize: '22px'
14
+ height: '100%',
15
+ paddingInlineStart: '16px',
16
+ '&-left': {
17
+ display: 'flex',
18
+ alignItems: 'center',
19
+ [`${token.proComponentsCls}-layout-apps-icon`]: {
20
+ marginInlineEnd: 16,
21
+ marginInlineStart: -8
22
+ }
23
+ }
24
+ },
25
+ '&-wide': {
26
+ maxWidth: 1152,
27
+ margin: '0 auto'
41
28
  },
42
- '> *:first-child > img': {
43
- display: 'inline-block',
44
- height: '32px',
45
- verticalAlign: 'middle'
29
+ '&-logo': {
30
+ position: 'relative',
31
+ display: 'flex',
32
+ height: '100%',
33
+ alignItems: 'center',
34
+ overflow: 'hidden',
35
+ '> *:first-child': {
36
+ display: 'flex',
37
+ alignItems: 'center',
38
+ minHeight: '22px',
39
+ fontSize: '22px'
40
+ },
41
+ '> *:first-child > img': {
42
+ display: 'inline-block',
43
+ height: '32px',
44
+ verticalAlign: 'middle'
45
+ },
46
+ '> *:first-child > h1': {
47
+ display: 'inline-block',
48
+ marginBlock: 0,
49
+ marginInline: 0,
50
+ lineHeight: '24px',
51
+ marginInlineStart: 6,
52
+ fontWeight: '600',
53
+ fontSize: '16px',
54
+ color: token.layout?.header?.colorHeaderTitle,
55
+ verticalAlign: 'top'
56
+ }
46
57
  },
47
- '> *:first-child > h1': {
48
- display: 'inline-block',
49
- marginBlock: 0,
50
- marginInline: 0,
51
- lineHeight: '24px',
52
- marginInlineStart: 6,
53
- fontWeight: '600',
54
- fontSize: '16px',
55
- color: (_token$layout = token.layout) === null || _token$layout === void 0 || (_token$layout = _token$layout.header) === null || _token$layout === void 0 ? void 0 : _token$layout.colorHeaderTitle,
56
- verticalAlign: 'top'
58
+ '&-menu': {
59
+ minWidth: 0,
60
+ display: 'flex',
61
+ alignItems: 'center',
62
+ paddingInline: 6,
63
+ paddingBlock: 6,
64
+ lineHeight: `${Math.max((token.layout?.header?.heightLayoutHeader || 56) - 12, 40)}px`
57
65
  }
58
- },
59
- '&-menu': {
60
- minWidth: 0,
61
- display: 'flex',
62
- alignItems: 'center',
63
- paddingInline: 6,
64
- paddingBlock: 6,
65
- lineHeight: "".concat(Math.max((((_token$layout2 = token.layout) === null || _token$layout2 === void 0 || (_token$layout2 = _token$layout2.header) === null || _token$layout2 === void 0 ? void 0 : _token$layout2.heightLayoutHeader) || 56) - 12, 40), "px")
66
66
  }
67
- });
67
+ };
68
68
  };
69
69
  export function useStyle(prefixCls) {
70
- return useAntdStyle('ProLayoutTopNavHeader', function (token) {
71
- var topNavHeaderToken = _objectSpread(_objectSpread({}, token), {}, {
72
- componentCls: ".".concat(prefixCls)
73
- });
70
+ return useAntdStyle('ProLayoutTopNavHeader', token => {
71
+ const topNavHeaderToken = {
72
+ ...token,
73
+ componentCls: `.${prefixCls}`
74
+ };
74
75
  return [genTopNavHeaderStyle(topNavHeaderToken)];
75
76
  });
76
77
  }
@@ -1,2 +1,2 @@
1
1
  import { createContext } from 'react';
2
- export var RouteContext = /*#__PURE__*/createContext({});
2
+ export const RouteContext = /*#__PURE__*/createContext({});
@@ -86,6 +86,12 @@ export type PureSettings = {
86
86
  * @name 取消自动关闭菜单
87
87
  */
88
88
  autoClose?: false;
89
+ /**
90
+ * @name 菜单收起时的宽度
91
+ *
92
+ * @example 设置收起宽度为 80px menu={{ collapsedWidth: 80 }}
93
+ */
94
+ collapsedWidth?: number;
89
95
  };
90
96
  /**
91
97
  * 设置为 false,在 layout 中只展示 pageName,而不是 pageName - title
@@ -1,4 +1,4 @@
1
- var defaultSettings = {
1
+ const defaultSettings = {
2
2
  navTheme: 'light',
3
3
  layout: 'side',
4
4
  contentWidth: 'Fluid',
@@ -1,10 +1,9 @@
1
- import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
1
  import { match } from 'path-to-regexp';
3
- export var matchParamsPath = function matchParamsPath(pathname, breadcrumb, breadcrumbMap) {
2
+ export const matchParamsPath = (pathname, breadcrumb, breadcrumbMap) => {
4
3
  // Internal logic use breadcrumbMap to ensure the order
5
4
  // 内部逻辑使用 breadcrumbMap 来确保查询顺序
6
5
  if (breadcrumbMap) {
7
- var pathKey = _toConsumableArray(breadcrumbMap.keys()).find(function (key) {
6
+ const pathKey = [...breadcrumbMap.keys()].find(key => {
8
7
  try {
9
8
  if (key.startsWith('http')) {
10
9
  return false;
@@ -23,9 +22,9 @@ export var matchParamsPath = function matchParamsPath(pathname, breadcrumb, brea
23
22
  // External uses use breadcrumb
24
23
  // 外部用户使用 breadcrumb 参数
25
24
  if (breadcrumb) {
26
- var _pathKey = Object.keys(breadcrumb).find(function (key) {
25
+ const pathKey = Object.keys(breadcrumb).find(key => {
27
26
  try {
28
- if (key !== null && key !== void 0 && key.startsWith('http')) {
27
+ if (key?.startsWith('http')) {
29
28
  return false;
30
29
  }
31
30
  return match(key)(pathname);
@@ -34,8 +33,8 @@ export var matchParamsPath = function matchParamsPath(pathname, breadcrumb, brea
34
33
  return false;
35
34
  }
36
35
  });
37
- if (_pathKey) {
38
- return breadcrumb[_pathKey];
36
+ if (pathKey) {
37
+ return breadcrumb[pathKey];
39
38
  }
40
39
  }
41
40
  return {
@@ -48,19 +47,19 @@ export var matchParamsPath = function matchParamsPath(pathname, breadcrumb, brea
48
47
  * @param props
49
48
  * @param ignoreTitle
50
49
  */
51
- export var getPageTitleInfo = function getPageTitleInfo(props, ignoreTitle) {
52
- var _props$pathname = props.pathname,
53
- pathname = _props$pathname === void 0 ? '/' : _props$pathname,
54
- breadcrumb = props.breadcrumb,
55
- breadcrumbMap = props.breadcrumbMap,
56
- formatMessage = props.formatMessage,
57
- title = props.title,
58
- _props$menu = props.menu,
59
- menu = _props$menu === void 0 ? {
50
+ export const getPageTitleInfo = (props, ignoreTitle) => {
51
+ const {
52
+ pathname = '/',
53
+ breadcrumb,
54
+ breadcrumbMap,
55
+ formatMessage,
56
+ title,
57
+ menu = {
60
58
  locale: false
61
- } : _props$menu;
62
- var pageTitle = ignoreTitle ? '' : title || '';
63
- var currRouterData = matchParamsPath(pathname, breadcrumb, breadcrumbMap);
59
+ }
60
+ } = props;
61
+ const pageTitle = ignoreTitle ? '' : title || '';
62
+ const currRouterData = matchParamsPath(pathname, breadcrumb, breadcrumbMap);
64
63
  if (!currRouterData) {
65
64
  return {
66
65
  title: pageTitle,
@@ -68,7 +67,7 @@ export var getPageTitleInfo = function getPageTitleInfo(props, ignoreTitle) {
68
67
  pageName: pageTitle
69
68
  };
70
69
  }
71
- var pageName = currRouterData.name;
70
+ let pageName = currRouterData.name;
72
71
  if (menu.locale !== false && currRouterData.locale && formatMessage) {
73
72
  pageName = formatMessage({
74
73
  id: currRouterData.locale || '',
@@ -86,15 +85,15 @@ export var getPageTitleInfo = function getPageTitleInfo(props, ignoreTitle) {
86
85
  return {
87
86
  title: pageName,
88
87
  id: currRouterData.locale || '',
89
- pageName: pageName
88
+ pageName
90
89
  };
91
90
  }
92
91
  return {
93
- title: "".concat(pageName, " - ").concat(title),
92
+ title: `${pageName} - ${title}`,
94
93
  id: currRouterData.locale || '',
95
- pageName: pageName
94
+ pageName
96
95
  };
97
96
  };
98
- export var getPageTitle = function getPageTitle(props, ignoreTitle) {
97
+ export const getPageTitle = (props, ignoreTitle) => {
99
98
  return getPageTitleInfo(props, ignoreTitle).title;
100
99
  };
@@ -1,3 +1,4 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
1
  import settingDrawer from "./en-US/settingDrawer";
3
- export default _objectSpread({}, settingDrawer);
2
+ export default {
3
+ ...settingDrawer
4
+ };
@@ -4,20 +4,20 @@ import itITLocal from "./it-IT";
4
4
  import koKRLocal from "./ko-KR";
5
5
  import zhLocal from "./zh-CN";
6
6
  import zhTWLocal from "./zh-TW";
7
- var locales = {
7
+ const locales = {
8
8
  'zh-CN': zhLocal,
9
9
  'zh-TW': zhTWLocal,
10
10
  'en-US': enUSLocal,
11
11
  'it-IT': itITLocal,
12
12
  'ko-KR': koKRLocal
13
13
  };
14
- export var getLanguage = function getLanguage() {
14
+ export const getLanguage = () => {
15
15
  // support ssr
16
16
  if (!isBrowser()) return 'zh-CN';
17
- var lang = window.localStorage.getItem('umi_locale');
17
+ const lang = window.localStorage.getItem('umi_locale');
18
18
  return lang || window.g_locale || navigator.language;
19
19
  };
20
- export var gLocaleObject = function gLocaleObject() {
21
- var gLocale = getLanguage();
20
+ export const gLocaleObject = () => {
21
+ const gLocale = getLanguage();
22
22
  return locales[gLocale] || locales['zh-CN'];
23
23
  };
@@ -1,3 +1,4 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
1
  import settingDrawer from "./it-IT/settingDrawer";
3
- export default _objectSpread({}, settingDrawer);
2
+ export default {
3
+ ...settingDrawer
4
+ };
@@ -1,3 +1,4 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
1
  import settingDrawer from "./ko-KR/settingDrawer";
3
- export default _objectSpread({}, settingDrawer);
2
+ export default {
3
+ ...settingDrawer
4
+ };
@@ -1,3 +1,4 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
1
  import settingDrawer from "./zh-CN/settingDrawer";
3
- export default _objectSpread({}, settingDrawer);
2
+ export default {
3
+ ...settingDrawer
4
+ };
@@ -1,3 +1,4 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
1
  import settingDrawer from "./zh-TW/settingDrawer";
3
- export default _objectSpread({}, settingDrawer);
2
+ export default {
3
+ ...settingDrawer
4
+ };
@@ -4,6 +4,6 @@ export interface ProLayoutToken extends ProAliasToken {
4
4
  componentCls: string;
5
5
  }
6
6
  export declare function useStyle(prefixCls: string): {
7
- wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
7
+ wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
8
8
  hashId: string;
9
9
  };
@@ -1,49 +1,55 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
1
  import { useStyle as useAntdStyle } from "../../provider";
4
- var genProLayoutStyle = function genProLayoutStyle(token) {
5
- var _token$layout, _token$layout2, _token$layout3, _token$layout4;
6
- return _defineProperty(_defineProperty({}, "".concat(token.antCls, "-layout"), {
7
- backgroundColor: 'transparent !important'
8
- }), token.componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "& ".concat(token.antCls, "-layout"), {
9
- display: 'flex',
10
- backgroundColor: 'transparent',
11
- width: '100%'
12
- }), "".concat(token.componentCls, "-content"), {
13
- display: 'flex',
14
- flexDirection: 'column',
15
- width: '100%',
16
- backgroundColor: ((_token$layout = token.layout) === null || _token$layout === void 0 || (_token$layout = _token$layout.pageContainer) === null || _token$layout === void 0 ? void 0 : _token$layout.colorBgPageContainer) || 'transparent',
17
- position: 'relative',
18
- paddingBlock: (_token$layout2 = token.layout) === null || _token$layout2 === void 0 || (_token$layout2 = _token$layout2.pageContainer) === null || _token$layout2 === void 0 ? void 0 : _token$layout2.paddingBlockPageContainerContent,
19
- paddingInline: (_token$layout3 = token.layout) === null || _token$layout3 === void 0 || (_token$layout3 = _token$layout3.pageContainer) === null || _token$layout3 === void 0 ? void 0 : _token$layout3.paddingInlinePageContainerContent,
20
- '&-has-page-container': {
21
- padding: 0
2
+ const genProLayoutStyle = token => {
3
+ return {
4
+ [`${token.antCls}-layout`]: {
5
+ backgroundColor: 'transparent !important'
6
+ },
7
+ [token.componentCls]: {
8
+ [`& ${token.antCls}-layout`]: {
9
+ display: 'flex',
10
+ backgroundColor: 'transparent',
11
+ width: '100%'
12
+ },
13
+ [`${token.componentCls}-content`]: {
14
+ display: 'flex',
15
+ flexDirection: 'column',
16
+ width: '100%',
17
+ backgroundColor: token.layout?.pageContainer?.colorBgPageContainer || 'transparent',
18
+ position: 'relative',
19
+ paddingBlock: token.layout?.pageContainer?.paddingBlockPageContainerContent,
20
+ paddingInline: token.layout?.pageContainer?.paddingInlinePageContainerContent,
21
+ '&-has-page-container': {
22
+ padding: 0
23
+ }
24
+ },
25
+ [`${token.componentCls}-container`]: {
26
+ width: '100%',
27
+ display: 'flex',
28
+ flexDirection: 'column',
29
+ minWidth: 0,
30
+ minHeight: 0,
31
+ backgroundColor: 'transparent'
32
+ },
33
+ [`${token.componentCls}-bg-list`]: {
34
+ pointerEvents: 'none',
35
+ position: 'fixed',
36
+ overflow: 'hidden',
37
+ insetBlockStart: 0,
38
+ insetInlineStart: 0,
39
+ zIndex: 0,
40
+ height: '100%',
41
+ width: '100%',
42
+ background: token.layout?.bgLayout
43
+ }
22
44
  }
23
- }), "".concat(token.componentCls, "-container"), {
24
- width: '100%',
25
- display: 'flex',
26
- flexDirection: 'column',
27
- minWidth: 0,
28
- minHeight: 0,
29
- backgroundColor: 'transparent'
30
- }), "".concat(token.componentCls, "-bg-list"), {
31
- pointerEvents: 'none',
32
- position: 'fixed',
33
- overflow: 'hidden',
34
- insetBlockStart: 0,
35
- insetInlineStart: 0,
36
- zIndex: 0,
37
- height: '100%',
38
- width: '100%',
39
- background: (_token$layout4 = token.layout) === null || _token$layout4 === void 0 ? void 0 : _token$layout4.bgLayout
40
- }));
45
+ };
41
46
  };
42
47
  export function useStyle(prefixCls) {
43
- return useAntdStyle('ProLayout', function (token) {
44
- var proLayoutToken = _objectSpread(_objectSpread({}, token), {}, {
45
- componentCls: ".".concat(prefixCls)
46
- });
48
+ return useAntdStyle('ProLayout', token => {
49
+ const proLayoutToken = {
50
+ ...token,
51
+ componentCls: `.${prefixCls}`
52
+ };
47
53
  return [genProLayoutStyle(proLayoutToken)];
48
54
  });
49
55
  }