@ant-design/pro-components 3.0.0-beta.1 → 3.0.0-beta.2

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 (786) hide show
  1. package/dist/pro-components.min.js +1 -1
  2. package/es/card/ProCard.d.ts +0 -1
  3. package/es/card/ProCard.js +11 -23
  4. package/es/card/components/Actions/index.js +33 -28
  5. package/es/card/components/Actions/style.js +72 -100
  6. package/es/card/components/Card/index.js +213 -258
  7. package/es/card/components/Card/style.js +192 -266
  8. package/es/card/components/CheckCard/Group.js +198 -208
  9. package/es/card/components/CheckCard/index.js +151 -160
  10. package/es/card/components/CheckCard/style.js +186 -212
  11. package/es/card/components/Divider/index.js +23 -18
  12. package/es/card/components/Divider/style.js +30 -54
  13. package/es/card/components/Loading/index.js +80 -13
  14. package/es/card/components/Loading/style.js +42 -63
  15. package/es/card/components/Operation/index.js +22 -17
  16. package/es/card/components/Operation/style.js +19 -43
  17. package/es/card/components/Statistic/index.js +79 -96
  18. package/es/card/components/Statistic/style.js +76 -115
  19. package/es/card/components/StatisticCard/index.d.ts +0 -2
  20. package/es/card/components/StatisticCard/index.js +59 -70
  21. package/es/card/components/StatisticCard/style.js +36 -55
  22. package/es/card/index.d.ts +2 -2
  23. package/es/card/index.js +2 -9
  24. package/es/card/typing.js +1 -0
  25. package/es/descriptions/index.js +364 -414
  26. package/es/descriptions/useFetchData.js +94 -73
  27. package/es/field/AllProField.js +438 -361
  28. package/es/field/FieldHOC/index.js +32 -28
  29. package/es/field/PureProField.js +129 -160
  30. package/es/field/ValueTypeToComponent.js +686 -396
  31. package/es/field/components/Cascader/index.d.ts +2 -2
  32. package/es/field/components/Cascader/index.js +124 -149
  33. package/es/field/components/Checkbox/index.d.ts +1 -1
  34. package/es/field/components/Checkbox/index.js +106 -128
  35. package/es/field/components/Code/index.js +67 -60
  36. package/es/field/components/ColorPicker/index.d.ts +2 -2
  37. package/es/field/components/ColorPicker/index.js +55 -78
  38. package/es/field/components/DatePicker/index.d.ts +2 -2
  39. package/es/field/components/DatePicker/index.js +100 -116
  40. package/es/field/components/Digit/index.js +84 -83
  41. package/es/field/components/DigitRange/index.js +102 -96
  42. package/es/field/components/FromNow/index.js +50 -62
  43. package/es/field/components/Image/index.js +46 -50
  44. package/es/field/components/IndexColumn/index.js +45 -43
  45. package/es/field/components/Money/index.js +245 -253
  46. package/es/field/components/Options/index.js +61 -71
  47. package/es/field/components/Password/index.js +62 -59
  48. package/es/field/components/Percent/index.js +74 -80
  49. package/es/field/components/Percent/util.js +23 -18
  50. package/es/field/components/Progress/index.js +53 -54
  51. package/es/field/components/Radio/index.d.ts +1 -1
  52. package/es/field/components/Radio/index.js +85 -107
  53. package/es/field/components/RangePicker/index.d.ts +2 -2
  54. package/es/field/components/RangePicker/index.js +122 -137
  55. package/es/field/components/Rate/index.js +39 -35
  56. package/es/field/components/Second/index.js +61 -59
  57. package/es/field/components/Segmented/index.d.ts +1 -1
  58. package/es/field/components/Segmented/index.js +68 -90
  59. package/es/field/components/Select/LightSelect/index.d.ts +1 -1
  60. package/es/field/components/Select/LightSelect/index.js +210 -256
  61. package/es/field/components/Select/SearchSelect/index.js +192 -225
  62. package/es/field/components/Select/index.d.ts +2 -2
  63. package/es/field/components/Select/index.js +299 -368
  64. package/es/field/components/Slider/index.js +39 -45
  65. package/es/field/components/Status/index.js +83 -23
  66. package/es/field/components/Switch/index.d.ts +1 -1
  67. package/es/field/components/Switch/index.js +60 -71
  68. package/es/field/components/Text/index.js +53 -48
  69. package/es/field/components/TextArea/index.js +39 -53
  70. package/es/field/components/TextArea/readonly.js +36 -50
  71. package/es/field/components/TimePicker/index.js +182 -190
  72. package/es/field/components/TreeSelect/index.d.ts +2 -2
  73. package/es/field/components/TreeSelect/index.js +178 -184
  74. package/es/field/index.js +3 -43
  75. package/es/form/BaseForm/BaseForm.js +582 -621
  76. package/es/form/BaseForm/EditOrReadOnlyContext.js +4 -8
  77. package/es/form/BaseForm/LightWrapper/index.js +104 -161
  78. package/es/form/BaseForm/LightWrapper/style.js +14 -41
  79. package/es/form/BaseForm/Submitter/index.js +69 -100
  80. package/es/form/BaseForm/index.js +1 -2
  81. package/es/form/FieldContext.js +4 -8
  82. package/es/form/components/Captcha/index.js +162 -169
  83. package/es/form/components/Cascader/index.js +46 -75
  84. package/es/form/components/Checkbox/index.js +73 -98
  85. package/es/form/components/ColorPicker/index.js +43 -64
  86. package/es/form/components/DatePicker/BaseDatePicker.js +45 -69
  87. package/es/form/components/DatePicker/DatePicker.js +26 -51
  88. package/es/form/components/DatePicker/DateTimePicker.js +26 -50
  89. package/es/form/components/DatePicker/MonthPicker.js +26 -51
  90. package/es/form/components/DatePicker/QuarterPicker.js +26 -51
  91. package/es/form/components/DatePicker/TimePicker.js +43 -72
  92. package/es/form/components/DatePicker/WeekPicker.js +26 -51
  93. package/es/form/components/DatePicker/YearPicker.js +26 -51
  94. package/es/form/components/DatePicker/index.js +4 -6
  95. package/es/form/components/DateRangePicker/BaseDateRanger.js +42 -70
  96. package/es/form/components/DateRangePicker/DateMonthRangePicker.js +29 -51
  97. package/es/form/components/DateRangePicker/DateQuarterRangePicker.js +29 -51
  98. package/es/form/components/DateRangePicker/DateTimeRangePicker.js +29 -51
  99. package/es/form/components/DateRangePicker/DateWeekRangePicker.js +29 -51
  100. package/es/form/components/DateRangePicker/DateYearRangePicker.js +29 -51
  101. package/es/form/components/DateRangePicker/TimeRangePicker.js +42 -67
  102. package/es/form/components/DateRangePicker/index.js +29 -51
  103. package/es/form/components/Dependency/index.js +56 -96
  104. package/es/form/components/Digit/DigitRange.js +42 -75
  105. package/es/form/components/Digit/index.js +47 -78
  106. package/es/form/components/Field/index.js +80 -124
  107. package/es/form/components/FieldSet/index.js +95 -123
  108. package/es/form/components/FormItem/FormItemRender/index.js +135 -92
  109. package/es/form/components/FormItem/Group/index.js +134 -169
  110. package/es/form/components/FormItem/Group/style.js +41 -62
  111. package/es/form/components/FormItem/index.js +252 -293
  112. package/es/form/components/FormItem/warpField.js +218 -285
  113. package/es/form/components/List/ListContainer.js +221 -181
  114. package/es/form/components/List/ListItem.js +259 -350
  115. package/es/form/components/List/index.d.ts +2 -2
  116. package/es/form/components/List/index.js +195 -252
  117. package/es/form/components/List/style.js +48 -95
  118. package/es/form/components/Money/index.js +50 -80
  119. package/es/form/components/Radio/index.js +52 -86
  120. package/es/form/components/Rate/index.js +37 -60
  121. package/es/form/components/SchemaForm/index.js +121 -167
  122. package/es/form/components/SchemaForm/layoutType/Embed.js +8 -5
  123. package/es/form/components/SchemaForm/layoutType/StepsForm.js +35 -68
  124. package/es/form/components/SchemaForm/layoutType/index.js +2 -7
  125. package/es/form/components/SchemaForm/typing.js +1 -0
  126. package/es/form/components/SchemaForm/valueType/dependency.js +19 -43
  127. package/es/form/components/SchemaForm/valueType/divider.js +11 -30
  128. package/es/form/components/SchemaForm/valueType/field.js +59 -100
  129. package/es/form/components/SchemaForm/valueType/formList.js +16 -42
  130. package/es/form/components/SchemaForm/valueType/formSet.js +16 -42
  131. package/es/form/components/SchemaForm/valueType/group.js +15 -37
  132. package/es/form/components/SchemaForm/valueType/ignore.js +4 -7
  133. package/es/form/components/SchemaForm/valueType/index.js +16 -17
  134. package/es/form/components/Segmented/index.js +43 -61
  135. package/es/form/components/Select/index.js +114 -151
  136. package/es/form/components/Slider/index.js +54 -91
  137. package/es/form/components/Switch/index.js +47 -71
  138. package/es/form/components/Text/index.js +132 -161
  139. package/es/form/components/TextArea/index.js +34 -57
  140. package/es/form/components/TreeSelect/index.js +42 -61
  141. package/es/form/components/UploadButton/index.js +125 -145
  142. package/es/form/components/UploadDragger/index.js +77 -92
  143. package/es/form/components/index.js +36 -88
  144. package/es/form/helpers/grid.js +77 -82
  145. package/es/form/helpers/index.js +1 -2
  146. package/es/form/index.js +6 -15
  147. package/es/form/layouts/DrawerForm/index.js +309 -315
  148. package/es/form/layouts/DrawerForm/style.js +26 -50
  149. package/es/form/layouts/LightFilter/index.js +208 -270
  150. package/es/form/layouts/LightFilter/style.js +49 -74
  151. package/es/form/layouts/LoginForm/index.js +85 -104
  152. package/es/form/layouts/LoginForm/style.js +68 -95
  153. package/es/form/layouts/LoginFormPage/index.js +141 -147
  154. package/es/form/layouts/LoginFormPage/style.js +129 -154
  155. package/es/form/layouts/ModalForm/index.js +247 -253
  156. package/es/form/layouts/ProForm/index.d.ts +1 -1
  157. package/es/form/layouts/ProForm/index.js +15 -32
  158. package/es/form/layouts/QueryFilter/Actions.js +52 -47
  159. package/es/form/layouts/QueryFilter/index.js +298 -358
  160. package/es/form/layouts/QueryFilter/style.js +38 -69
  161. package/es/form/layouts/StepsForm/StepForm.js +88 -119
  162. package/es/form/layouts/StepsForm/index.js +340 -353
  163. package/es/form/layouts/StepsForm/style.js +29 -50
  164. package/es/form/layouts/index.js +9 -20
  165. package/es/form/typing.js +1 -0
  166. package/es/index.js +1 -5
  167. package/es/layout/ProLayout.js +428 -497
  168. package/es/layout/WrapContent.js +26 -15
  169. package/es/layout/assert/Logo.js +107 -79
  170. package/es/layout/components/AppsLogoComponents/AppsLogo.js +13 -11
  171. package/es/layout/components/AppsLogoComponents/DefaultContent.js +50 -56
  172. package/es/layout/components/AppsLogoComponents/SimpleContent.js +73 -66
  173. package/es/layout/components/AppsLogoComponents/index.js +90 -73
  174. package/es/layout/components/AppsLogoComponents/style/default.js +31 -35
  175. package/es/layout/components/AppsLogoComponents/style/index.js +51 -77
  176. package/es/layout/components/AppsLogoComponents/style/simple.js +37 -40
  177. package/es/layout/components/CollapsedIcon/index.js +19 -55
  178. package/es/layout/components/CollapsedIcon/style.js +42 -66
  179. package/es/layout/components/Footer.js +27 -38
  180. package/es/layout/components/FooterToolbar/index.js +78 -102
  181. package/es/layout/components/FooterToolbar/style/index.js +38 -62
  182. package/es/layout/components/FooterToolbar/style/stylish.js +10 -38
  183. package/es/layout/components/GlobalFooter/index.js +37 -31
  184. package/es/layout/components/GlobalFooter/style.js +32 -53
  185. package/es/layout/components/GlobalHeader/ActionsContent.js +132 -181
  186. package/es/layout/components/GlobalHeader/index.d.ts +0 -5
  187. package/es/layout/components/GlobalHeader/index.js +76 -84
  188. package/es/layout/components/GlobalHeader/rightContentStyle.js +52 -76
  189. package/es/layout/components/GlobalHeader/style.js +57 -83
  190. package/es/layout/components/GridContent/index.js +35 -33
  191. package/es/layout/components/GridContent/style.js +14 -38
  192. package/es/layout/components/Header/index.js +95 -124
  193. package/es/layout/components/Header/style/header.js +48 -72
  194. package/es/layout/components/Header/style/stylish.js +12 -42
  195. package/es/layout/components/Help/AsyncContentPanel.js +53 -42
  196. package/es/layout/components/Help/HelpProvide.js +55 -6
  197. package/es/layout/components/Help/ProHelpContentPanel.js +128 -127
  198. package/es/layout/components/Help/ProHelpDrawer.js +48 -76
  199. package/es/layout/components/Help/ProHelpModal.js +47 -76
  200. package/es/layout/components/Help/ProHelpPanel.js +183 -224
  201. package/es/layout/components/Help/ProHelpPopover.js +37 -64
  202. package/es/layout/components/Help/RenderContentPanel.js +90 -103
  203. package/es/layout/components/Help/Search.js +124 -163
  204. package/es/layout/components/Help/index.js +19 -40
  205. package/es/layout/components/Help/style.js +90 -115
  206. package/es/layout/components/PageContainer/index.js +233 -280
  207. package/es/layout/components/PageContainer/style/index.js +78 -118
  208. package/es/layout/components/PageContainer/style/stylish.js +10 -38
  209. package/es/layout/components/PageHeader/index.js +144 -129
  210. package/es/layout/components/PageHeader/style/index.js +125 -172
  211. package/es/layout/components/PageLoading/index.js +23 -50
  212. package/es/layout/components/SettingDrawer/BlockCheckbox.js +42 -42
  213. package/es/layout/components/SettingDrawer/LayoutChange.js +108 -98
  214. package/es/layout/components/SettingDrawer/RegionalChange.js +31 -34
  215. package/es/layout/components/SettingDrawer/ThemeColor.js +50 -69
  216. package/es/layout/components/SettingDrawer/icon/group.js +109 -88
  217. package/es/layout/components/SettingDrawer/icon/sub.js +70 -116
  218. package/es/layout/components/SettingDrawer/index.js +406 -420
  219. package/es/layout/components/SettingDrawer/style/index.js +142 -146
  220. package/es/layout/components/SiderMenu/Arrow.js +12 -15
  221. package/es/layout/components/SiderMenu/BaseMenu.js +402 -451
  222. package/es/layout/components/SiderMenu/SiderMenu.js +246 -336
  223. package/es/layout/components/SiderMenu/index.js +72 -101
  224. package/es/layout/components/SiderMenu/style/index.js +171 -210
  225. package/es/layout/components/SiderMenu/style/menu.js +110 -173
  226. package/es/layout/components/SiderMenu/style/stylish.js +12 -42
  227. package/es/layout/components/TopNavHeader/index.js +106 -179
  228. package/es/layout/components/TopNavHeader/style.js +67 -95
  229. package/es/layout/context/RouteContext.js +2 -6
  230. package/es/layout/defaultSettings.js +6 -9
  231. package/es/layout/getPageTitle.js +46 -40
  232. package/es/layout/index.js +4 -27
  233. package/es/layout/locales/en-US/settingDrawer.js +43 -47
  234. package/es/layout/locales/en-US.js +2 -22
  235. package/es/layout/locales/index.js +13 -18
  236. package/es/layout/locales/it-IT/settingDrawer.js +34 -38
  237. package/es/layout/locales/it-IT.js +2 -22
  238. package/es/layout/locales/ko-KR/settingDrawer.js +39 -43
  239. package/es/layout/locales/ko-KR.js +2 -22
  240. package/es/layout/locales/zh-CN/settingDrawer.js +43 -47
  241. package/es/layout/locales/zh-CN.js +2 -22
  242. package/es/layout/locales/zh-TW/settingDrawer.js +35 -39
  243. package/es/layout/locales/zh-TW.js +2 -22
  244. package/es/layout/style/index.js +43 -73
  245. package/es/layout/typing.js +1 -0
  246. package/es/layout/utils/getBreadcrumbProps.js +111 -91
  247. package/es/layout/utils/getMenuData.js +18 -21
  248. package/es/layout/utils/pathTools.js +11 -12
  249. package/es/layout/utils/useCurrentMenuLayoutProps.js +21 -29
  250. package/es/layout/utils/utils.js +35 -51
  251. package/es/list/Item.js +222 -294
  252. package/es/list/ListView.js +188 -232
  253. package/es/list/constants.js +4 -17
  254. package/es/list/index.js +121 -178
  255. package/es/list/style/index.js +224 -287
  256. package/es/provider/index.js +228 -179
  257. package/es/provider/intl.js +100 -124
  258. package/es/provider/locale/ar_EG.js +47 -51
  259. package/es/provider/locale/ca_ES.js +45 -49
  260. package/es/provider/locale/cs_CZ.js +50 -54
  261. package/es/provider/locale/de_DE.js +47 -51
  262. package/es/provider/locale/en_GB.js +49 -53
  263. package/es/provider/locale/en_US.js +51 -55
  264. package/es/provider/locale/es_ES.js +47 -51
  265. package/es/provider/locale/fa_IR.js +47 -51
  266. package/es/provider/locale/fr_FR.js +47 -51
  267. package/es/provider/locale/he_IL.js +50 -54
  268. package/es/provider/locale/hr_HR.js +47 -51
  269. package/es/provider/locale/id_ID.js +47 -51
  270. package/es/provider/locale/it_IT.js +47 -51
  271. package/es/provider/locale/ja_JP.js +47 -51
  272. package/es/provider/locale/ko_KR.js +47 -51
  273. package/es/provider/locale/mn_MN.js +47 -51
  274. package/es/provider/locale/ms_MY.js +47 -51
  275. package/es/provider/locale/nl_NL.js +50 -54
  276. package/es/provider/locale/pl_PL.js +47 -51
  277. package/es/provider/locale/pt_BR.js +47 -51
  278. package/es/provider/locale/ro_RO.js +50 -54
  279. package/es/provider/locale/ru_RU.js +47 -51
  280. package/es/provider/locale/sk_SK.js +50 -54
  281. package/es/provider/locale/sr_RS.js +47 -51
  282. package/es/provider/locale/sv_SE.js +50 -54
  283. package/es/provider/locale/th_TH.js +50 -54
  284. package/es/provider/locale/tr_TR.js +47 -51
  285. package/es/provider/locale/uk_UA.js +50 -54
  286. package/es/provider/locale/uz_UZ.js +47 -51
  287. package/es/provider/locale/vi_VN.js +47 -51
  288. package/es/provider/locale/zh_CN.js +50 -54
  289. package/es/provider/locale/zh_HK.js +50 -54
  290. package/es/provider/locale/zh_TW.js +50 -54
  291. package/es/provider/typing/layoutToken.d.ts +0 -10
  292. package/es/provider/typing/layoutToken.js +19 -42
  293. package/es/provider/useStyle/index.d.ts +1 -1
  294. package/es/provider/useStyle/index.js +91 -78
  295. package/es/provider/utils/merge.js +13 -29
  296. package/es/skeleton/components/Descriptions/index.js +240 -252
  297. package/es/skeleton/components/List/index.js +217 -207
  298. package/es/skeleton/components/Result/index.js +57 -54
  299. package/es/skeleton/index.js +18 -62
  300. package/es/table/Store/Provide.d.ts +0 -1
  301. package/es/table/Store/Provide.js +141 -128
  302. package/es/table/Table.js +645 -698
  303. package/es/table/components/Alert/index.js +60 -37
  304. package/es/table/components/Alert/style.js +28 -52
  305. package/es/table/components/ColumnSetting/index.js +382 -387
  306. package/es/table/components/ColumnSetting/style.js +72 -108
  307. package/es/table/components/DragSortTable/index.js +101 -137
  308. package/es/table/components/DragSortTable/style.js +20 -44
  309. package/es/table/components/Dropdown/index.js +70 -83
  310. package/es/table/components/EditableTable/CellEditorTable.js +50 -65
  311. package/es/table/components/EditableTable/RowEditorTable.js +44 -62
  312. package/es/table/components/EditableTable/index.js +343 -347
  313. package/es/table/components/Form/FormRender.js +167 -173
  314. package/es/table/components/Form/index.js +123 -132
  315. package/es/table/components/ListToolBar/HeaderMenu.js +68 -102
  316. package/es/table/components/ListToolBar/index.js +254 -273
  317. package/es/table/components/ListToolBar/style.js +119 -134
  318. package/es/table/components/ToolBar/DensityIcon.js +36 -41
  319. package/es/table/components/ToolBar/FullscreenIcon.js +21 -14
  320. package/es/table/components/ToolBar/index.js +235 -267
  321. package/es/table/index.js +3 -50
  322. package/es/table/style/index.js +129 -175
  323. package/es/table/typing.d.ts +2 -2
  324. package/es/table/typing.js +1 -0
  325. package/es/table/useFetchData.js +432 -232
  326. package/es/table/utils/cellRenderToFromItem.js +186 -261
  327. package/es/table/utils/columnRender.js +116 -115
  328. package/es/table/utils/columnSort.js +23 -21
  329. package/es/table/utils/genProColumnToColumn.js +101 -129
  330. package/es/table/utils/index.js +197 -115
  331. package/es/table/utils/useDragSort.js +135 -174
  332. package/es/utils/components/DropdownFooter/index.js +48 -58
  333. package/es/utils/components/DropdownFooter/style.js +16 -40
  334. package/es/utils/components/ErrorBoundary/index.js +51 -25
  335. package/es/utils/components/FieldLabel/index.js +119 -146
  336. package/es/utils/components/FieldLabel/style.js +82 -128
  337. package/es/utils/components/FilterDropdown/index.js +54 -81
  338. package/es/utils/components/FilterDropdown/style.js +17 -38
  339. package/es/utils/components/InlineErrorFormItem/index.js +132 -167
  340. package/es/utils/components/InlineErrorFormItem/style.js +51 -79
  341. package/es/utils/components/LabelIconTip/index.js +58 -56
  342. package/es/utils/components/LabelIconTip/style.js +36 -57
  343. package/es/utils/components/ProFormContext/index.js +2 -6
  344. package/es/utils/conversionMomentValue/index.js +102 -83
  345. package/es/utils/dateArrayFormatter/index.js +31 -16
  346. package/es/utils/genCopyable/index.js +44 -38
  347. package/es/utils/getFieldPropsOrFormItemProps/index.js +10 -7
  348. package/es/utils/hooks/useDebounceFn/index.js +58 -48
  349. package/es/utils/hooks/useDebounceValue/index.js +29 -19
  350. package/es/utils/hooks/useDeepCompareEffect/index.js +29 -44
  351. package/es/utils/hooks/useDeepCompareMemo/index.js +12 -10
  352. package/es/utils/hooks/useDocumentTitle/index.js +5 -9
  353. package/es/utils/hooks/useFetchData/index.js +70 -63
  354. package/es/utils/hooks/useForceRender/index.js +12 -9
  355. package/es/utils/hooks/useLatest/index.js +8 -8
  356. package/es/utils/hooks/usePrevious/index.js +5 -9
  357. package/es/utils/hooks/useReactiveRef/index.js +4 -8
  358. package/es/utils/hooks/useRefCallback/index.js +6 -10
  359. package/es/utils/hooks/useRefFunction/index.js +11 -10
  360. package/es/utils/index.d.ts +1 -3
  361. package/es/utils/index.js +9 -84
  362. package/es/utils/isBrowser/index.js +14 -9
  363. package/es/utils/isDeepEqualReact/index.js +79 -53
  364. package/es/utils/isDropdownValueType/index.js +4 -8
  365. package/es/utils/isImg/index.js +3 -6
  366. package/es/utils/isNil/index.js +3 -5
  367. package/es/utils/isUrl/index.js +10 -10
  368. package/es/utils/merge/index.js +20 -27
  369. package/es/utils/nanoid/index.js +24 -18
  370. package/es/utils/omitBoolean/index.js +8 -7
  371. package/es/utils/omitUndefined/index.js +6 -10
  372. package/es/utils/omitUndefinedAndEmptyArr/index.js +7 -11
  373. package/es/utils/parseValueToMoment/index.js +16 -14
  374. package/es/utils/pickProFormItemProps/index.js +9 -42
  375. package/es/utils/pickProProps/index.js +9 -11
  376. package/es/utils/proFieldParsingText/index.js +141 -49
  377. package/es/utils/runFunction/index.js +8 -8
  378. package/es/utils/stringify/index.js +4 -9
  379. package/es/utils/transformKeySubmitValue/index.js +254 -130
  380. package/es/utils/typing.js +1 -0
  381. package/es/utils/useEditableArray/index.js +776 -611
  382. package/es/utils/useEditableMap/index.js +179 -161
  383. package/es/utils/useMediaQuery/index.js +47 -43
  384. package/es/utils/useMediaQuery/query.js +19 -15
  385. package/es/utils/useMountMergeState/index.d.ts +1 -1
  386. package/es/utils/useMountMergeState/index.js +2 -5
  387. package/es/version.js +3 -7
  388. package/lib/card/ProCard.d.ts +0 -1
  389. package/lib/card/ProCard.js +20 -52
  390. package/lib/card/components/Actions/index.js +39 -57
  391. package/lib/card/components/Actions/style.js +77 -115
  392. package/lib/card/components/Card/index.js +222 -287
  393. package/lib/card/components/Card/style.js +197 -281
  394. package/lib/card/components/CheckCard/Group.js +205 -230
  395. package/lib/card/components/CheckCard/index.js +160 -190
  396. package/lib/card/components/CheckCard/style.js +192 -227
  397. package/lib/card/components/Divider/index.js +30 -47
  398. package/lib/card/components/Divider/style.js +35 -69
  399. package/lib/card/components/Loading/index.js +85 -42
  400. package/lib/card/components/Loading/style.js +48 -78
  401. package/lib/card/components/Operation/index.js +29 -46
  402. package/lib/card/components/Operation/style.js +24 -58
  403. package/lib/card/components/Statistic/index.js +84 -117
  404. package/lib/card/components/Statistic/style.js +81 -130
  405. package/lib/card/components/StatisticCard/index.d.ts +0 -2
  406. package/lib/card/components/StatisticCard/index.js +72 -103
  407. package/lib/card/components/StatisticCard/style.js +41 -70
  408. package/lib/card/index.d.ts +2 -2
  409. package/lib/card/index.js +34 -41
  410. package/lib/card/typing.js +4 -16
  411. package/lib/descriptions/index.js +369 -436
  412. package/lib/descriptions/useFetchData.js +99 -100
  413. package/lib/field/AllProField.js +477 -415
  414. package/lib/field/FieldHOC/index.js +37 -56
  415. package/lib/field/PureProField.js +141 -187
  416. package/lib/field/ValueTypeToComponent.js +725 -454
  417. package/lib/field/components/Cascader/index.d.ts +2 -2
  418. package/lib/field/components/Cascader/index.js +132 -171
  419. package/lib/field/components/Checkbox/index.d.ts +1 -1
  420. package/lib/field/components/Checkbox/index.js +113 -155
  421. package/lib/field/components/Code/index.js +73 -86
  422. package/lib/field/components/ColorPicker/index.d.ts +2 -2
  423. package/lib/field/components/ColorPicker/index.js +61 -103
  424. package/lib/field/components/DatePicker/index.d.ts +2 -2
  425. package/lib/field/components/DatePicker/index.js +109 -145
  426. package/lib/field/components/Digit/index.js +92 -110
  427. package/lib/field/components/DigitRange/index.js +108 -122
  428. package/lib/field/components/FromNow/index.js +57 -90
  429. package/lib/field/components/Image/index.js +52 -76
  430. package/lib/field/components/IndexColumn/index.js +50 -72
  431. package/lib/field/components/Money/index.js +254 -281
  432. package/lib/field/components/Options/index.js +68 -98
  433. package/lib/field/components/Password/index.js +66 -85
  434. package/lib/field/components/Percent/index.js +80 -101
  435. package/lib/field/components/Percent/util.js +28 -33
  436. package/lib/field/components/Progress/index.js +61 -80
  437. package/lib/field/components/Radio/index.d.ts +1 -1
  438. package/lib/field/components/Radio/index.js +92 -134
  439. package/lib/field/components/RangePicker/index.d.ts +2 -2
  440. package/lib/field/components/RangePicker/index.js +129 -164
  441. package/lib/field/components/Rate/index.js +43 -60
  442. package/lib/field/components/Second/index.js +67 -84
  443. package/lib/field/components/Segmented/index.d.ts +1 -1
  444. package/lib/field/components/Segmented/index.js +74 -117
  445. package/lib/field/components/Select/LightSelect/index.d.ts +1 -1
  446. package/lib/field/components/Select/LightSelect/index.js +216 -282
  447. package/lib/field/components/Select/SearchSelect/index.js +195 -245
  448. package/lib/field/components/Select/index.d.ts +2 -2
  449. package/lib/field/components/Select/index.js +307 -379
  450. package/lib/field/components/Slider/index.js +43 -70
  451. package/lib/field/components/Status/index.js +89 -52
  452. package/lib/field/components/Switch/index.d.ts +1 -1
  453. package/lib/field/components/Switch/index.js +67 -98
  454. package/lib/field/components/Text/index.js +58 -74
  455. package/lib/field/components/TextArea/index.js +44 -80
  456. package/lib/field/components/TextArea/readonly.js +43 -76
  457. package/lib/field/components/TimePicker/index.js +188 -217
  458. package/lib/field/components/TreeSelect/index.d.ts +2 -2
  459. package/lib/field/components/TreeSelect/index.js +185 -206
  460. package/lib/field/index.js +240 -96
  461. package/lib/form/BaseForm/BaseForm.js +595 -634
  462. package/lib/form/BaseForm/EditOrReadOnlyContext.js +9 -36
  463. package/lib/form/BaseForm/LightWrapper/index.js +111 -182
  464. package/lib/form/BaseForm/LightWrapper/style.js +19 -56
  465. package/lib/form/BaseForm/Submitter/index.js +75 -126
  466. package/lib/form/BaseForm/index.js +37 -20
  467. package/lib/form/FieldContext.js +8 -36
  468. package/lib/form/components/Captcha/index.js +169 -196
  469. package/lib/form/components/Cascader/index.js +56 -104
  470. package/lib/form/components/Checkbox/index.js +83 -128
  471. package/lib/form/components/ColorPicker/index.js +51 -92
  472. package/lib/form/components/DatePicker/BaseDatePicker.js +54 -98
  473. package/lib/form/components/DatePicker/DatePicker.js +32 -77
  474. package/lib/form/components/DatePicker/DateTimePicker.js +32 -76
  475. package/lib/form/components/DatePicker/MonthPicker.js +32 -77
  476. package/lib/form/components/DatePicker/QuarterPicker.js +32 -77
  477. package/lib/form/components/DatePicker/TimePicker.js +55 -103
  478. package/lib/form/components/DatePicker/WeekPicker.js +32 -77
  479. package/lib/form/components/DatePicker/YearPicker.js +32 -77
  480. package/lib/form/components/DatePicker/index.js +19 -44
  481. package/lib/form/components/DateRangePicker/BaseDateRanger.js +53 -100
  482. package/lib/form/components/DateRangePicker/DateMonthRangePicker.js +36 -78
  483. package/lib/form/components/DateRangePicker/DateQuarterRangePicker.js +36 -78
  484. package/lib/form/components/DateRangePicker/DateTimeRangePicker.js +36 -78
  485. package/lib/form/components/DateRangePicker/DateWeekRangePicker.js +36 -78
  486. package/lib/form/components/DateRangePicker/DateYearRangePicker.js +36 -78
  487. package/lib/form/components/DateRangePicker/TimeRangePicker.js +53 -97
  488. package/lib/form/components/DateRangePicker/index.js +36 -78
  489. package/lib/form/components/Dependency/index.js +68 -127
  490. package/lib/form/components/Digit/DigitRange.js +50 -103
  491. package/lib/form/components/Digit/index.js +55 -106
  492. package/lib/form/components/Field/index.js +89 -153
  493. package/lib/form/components/FieldSet/index.js +107 -153
  494. package/lib/form/components/FormItem/FormItemRender/index.js +142 -114
  495. package/lib/form/components/FormItem/Group/index.js +143 -198
  496. package/lib/form/components/FormItem/Group/style.js +46 -77
  497. package/lib/form/components/FormItem/index.js +257 -316
  498. package/lib/form/components/FormItem/warpField.js +229 -308
  499. package/lib/form/components/List/ListContainer.js +227 -211
  500. package/lib/form/components/List/ListItem.js +268 -374
  501. package/lib/form/components/List/index.d.ts +2 -2
  502. package/lib/form/components/List/index.js +211 -277
  503. package/lib/form/components/List/style.js +53 -110
  504. package/lib/form/components/Money/index.js +58 -108
  505. package/lib/form/components/Radio/index.js +60 -114
  506. package/lib/form/components/Rate/index.js +45 -88
  507. package/lib/form/components/SchemaForm/index.js +154 -193
  508. package/lib/form/components/SchemaForm/layoutType/Embed.js +12 -24
  509. package/lib/form/components/SchemaForm/layoutType/StepsForm.js +43 -96
  510. package/lib/form/components/SchemaForm/layoutType/index.js +18 -35
  511. package/lib/form/components/SchemaForm/typing.js +4 -16
  512. package/lib/form/components/SchemaForm/valueType/dependency.js +25 -69
  513. package/lib/form/components/SchemaForm/valueType/divider.js +16 -45
  514. package/lib/form/components/SchemaForm/valueType/field.js +67 -128
  515. package/lib/form/components/SchemaForm/valueType/formList.js +22 -58
  516. package/lib/form/components/SchemaForm/valueType/formSet.js +22 -68
  517. package/lib/form/components/SchemaForm/valueType/group.js +21 -53
  518. package/lib/form/components/SchemaForm/valueType/ignore.js +8 -25
  519. package/lib/form/components/SchemaForm/valueType/index.js +27 -43
  520. package/lib/form/components/Segmented/index.js +50 -89
  521. package/lib/form/components/Select/index.js +125 -181
  522. package/lib/form/components/Slider/index.js +62 -119
  523. package/lib/form/components/Switch/index.js +55 -99
  524. package/lib/form/components/Text/index.js +141 -190
  525. package/lib/form/components/TextArea/index.js +42 -85
  526. package/lib/form/components/TreeSelect/index.js +50 -89
  527. package/lib/form/components/UploadButton/index.js +131 -172
  528. package/lib/form/components/UploadDragger/index.js +84 -119
  529. package/lib/form/components/index.js +294 -110
  530. package/lib/form/helpers/grid.js +82 -97
  531. package/lib/form/helpers/index.js +15 -18
  532. package/lib/form/index.js +78 -38
  533. package/lib/form/layouts/DrawerForm/index.js +318 -338
  534. package/lib/form/layouts/DrawerForm/style.js +31 -65
  535. package/lib/form/layouts/LightFilter/index.js +217 -293
  536. package/lib/form/layouts/LightFilter/style.js +54 -89
  537. package/lib/form/layouts/LoginForm/index.js +93 -133
  538. package/lib/form/layouts/LoginForm/style.js +73 -110
  539. package/lib/form/layouts/LoginFormPage/index.js +148 -174
  540. package/lib/form/layouts/LoginFormPage/style.js +133 -165
  541. package/lib/form/layouts/ModalForm/index.js +253 -273
  542. package/lib/form/layouts/ProForm/index.d.ts +1 -1
  543. package/lib/form/layouts/ProForm/index.js +28 -68
  544. package/lib/form/layouts/QueryFilter/Actions.js +57 -77
  545. package/lib/form/layouts/QueryFilter/index.js +308 -390
  546. package/lib/form/layouts/QueryFilter/style.js +43 -84
  547. package/lib/form/layouts/StepsForm/StepForm.js +95 -146
  548. package/lib/form/layouts/StepsForm/index.js +352 -378
  549. package/lib/form/layouts/StepsForm/style.js +34 -65
  550. package/lib/form/layouts/index.js +62 -40
  551. package/lib/form/typing.js +4 -16
  552. package/lib/index.js +133 -34
  553. package/lib/layout/ProLayout.js +449 -528
  554. package/lib/layout/WrapContent.js +34 -46
  555. package/lib/layout/assert/Logo.js +110 -97
  556. package/lib/layout/components/AppsLogoComponents/AppsLogo.js +17 -29
  557. package/lib/layout/components/AppsLogoComponents/DefaultContent.js +55 -85
  558. package/lib/layout/components/AppsLogoComponents/SimpleContent.js +78 -95
  559. package/lib/layout/components/AppsLogoComponents/index.js +98 -105
  560. package/lib/layout/components/AppsLogoComponents/style/default.js +36 -55
  561. package/lib/layout/components/AppsLogoComponents/style/index.js +58 -94
  562. package/lib/layout/components/AppsLogoComponents/style/simple.js +41 -59
  563. package/lib/layout/components/CollapsedIcon/index.js +26 -82
  564. package/lib/layout/components/CollapsedIcon/style.js +47 -81
  565. package/lib/layout/components/Footer.js +33 -65
  566. package/lib/layout/components/FooterToolbar/index.js +87 -132
  567. package/lib/layout/components/FooterToolbar/style/index.js +43 -77
  568. package/lib/layout/components/FooterToolbar/style/stylish.js +16 -54
  569. package/lib/layout/components/GlobalFooter/index.js +43 -61
  570. package/lib/layout/components/GlobalFooter/style.js +37 -68
  571. package/lib/layout/components/GlobalHeader/ActionsContent.js +138 -208
  572. package/lib/layout/components/GlobalHeader/index.d.ts +0 -5
  573. package/lib/layout/components/GlobalHeader/index.js +86 -116
  574. package/lib/layout/components/GlobalHeader/rightContentStyle.js +57 -91
  575. package/lib/layout/components/GlobalHeader/style.js +62 -98
  576. package/lib/layout/components/GridContent/index.js +43 -64
  577. package/lib/layout/components/GridContent/style.js +19 -53
  578. package/lib/layout/components/Header/index.js +105 -156
  579. package/lib/layout/components/Header/style/header.js +53 -87
  580. package/lib/layout/components/Header/style/stylish.js +18 -58
  581. package/lib/layout/components/Help/AsyncContentPanel.js +59 -62
  582. package/lib/layout/components/Help/HelpProvide.js +59 -34
  583. package/lib/layout/components/Help/ProHelpContentPanel.js +139 -157
  584. package/lib/layout/components/Help/ProHelpDrawer.js +54 -102
  585. package/lib/layout/components/Help/ProHelpModal.js +53 -102
  586. package/lib/layout/components/Help/ProHelpPanel.js +192 -254
  587. package/lib/layout/components/Help/ProHelpPopover.js +46 -92
  588. package/lib/layout/components/Help/RenderContentPanel.js +97 -130
  589. package/lib/layout/components/Help/Search.js +130 -191
  590. package/lib/layout/components/Help/index.js +113 -74
  591. package/lib/layout/components/Help/style.js +96 -130
  592. package/lib/layout/components/PageContainer/index.js +245 -308
  593. package/lib/layout/components/PageContainer/style/index.js +83 -133
  594. package/lib/layout/components/PageContainer/style/stylish.js +16 -54
  595. package/lib/layout/components/PageHeader/index.js +149 -156
  596. package/lib/layout/components/PageHeader/style/index.js +129 -182
  597. package/lib/layout/components/PageLoading/index.js +28 -76
  598. package/lib/layout/components/SettingDrawer/BlockCheckbox.js +46 -71
  599. package/lib/layout/components/SettingDrawer/LayoutChange.js +114 -129
  600. package/lib/layout/components/SettingDrawer/RegionalChange.js +38 -65
  601. package/lib/layout/components/SettingDrawer/ThemeColor.js +55 -95
  602. package/lib/layout/components/SettingDrawer/icon/group.js +111 -105
  603. package/lib/layout/components/SettingDrawer/icon/sub.js +72 -133
  604. package/lib/layout/components/SettingDrawer/index.js +425 -447
  605. package/lib/layout/components/SettingDrawer/style/index.js +147 -161
  606. package/lib/layout/components/SiderMenu/Arrow.js +16 -34
  607. package/lib/layout/components/SiderMenu/BaseMenu.js +416 -487
  608. package/lib/layout/components/SiderMenu/SiderMenu.js +254 -367
  609. package/lib/layout/components/SiderMenu/index.js +81 -130
  610. package/lib/layout/components/SiderMenu/style/index.js +178 -226
  611. package/lib/layout/components/SiderMenu/style/menu.js +115 -188
  612. package/lib/layout/components/SiderMenu/style/stylish.js +18 -58
  613. package/lib/layout/components/TopNavHeader/index.js +117 -211
  614. package/lib/layout/components/TopNavHeader/style.js +72 -110
  615. package/lib/layout/context/RouteContext.js +6 -24
  616. package/lib/layout/defaultSettings.js +11 -29
  617. package/lib/layout/getPageTitle.js +53 -60
  618. package/lib/layout/index.js +145 -55
  619. package/lib/layout/locales/en-US/settingDrawer.js +47 -65
  620. package/lib/layout/locales/en-US.js +8 -48
  621. package/lib/layout/locales/index.js +24 -52
  622. package/lib/layout/locales/it-IT/settingDrawer.js +38 -56
  623. package/lib/layout/locales/it-IT.js +8 -48
  624. package/lib/layout/locales/ko-KR/settingDrawer.js +43 -61
  625. package/lib/layout/locales/ko-KR.js +8 -48
  626. package/lib/layout/locales/zh-CN/settingDrawer.js +47 -65
  627. package/lib/layout/locales/zh-CN.js +8 -48
  628. package/lib/layout/locales/zh-TW/settingDrawer.js +39 -57
  629. package/lib/layout/locales/zh-TW.js +8 -48
  630. package/lib/layout/style/index.js +48 -88
  631. package/lib/layout/typing.js +4 -16
  632. package/lib/layout/utils/getBreadcrumbProps.js +117 -107
  633. package/lib/layout/utils/getMenuData.js +23 -40
  634. package/lib/layout/utils/pathTools.js +14 -29
  635. package/lib/layout/utils/useCurrentMenuLayoutProps.js +27 -49
  636. package/lib/layout/utils/utils.js +40 -64
  637. package/lib/list/Item.js +229 -321
  638. package/lib/list/ListView.js +197 -260
  639. package/lib/list/constants.js +7 -35
  640. package/lib/list/index.js +132 -207
  641. package/lib/list/style/index.js +230 -302
  642. package/lib/provider/index.js +270 -215
  643. package/lib/provider/intl.js +140 -188
  644. package/lib/provider/locale/ar_EG.js +51 -69
  645. package/lib/provider/locale/ca_ES.js +49 -67
  646. package/lib/provider/locale/cs_CZ.js +54 -72
  647. package/lib/provider/locale/de_DE.js +51 -69
  648. package/lib/provider/locale/en_GB.js +53 -71
  649. package/lib/provider/locale/en_US.js +55 -73
  650. package/lib/provider/locale/es_ES.js +51 -69
  651. package/lib/provider/locale/fa_IR.js +51 -69
  652. package/lib/provider/locale/fr_FR.js +51 -69
  653. package/lib/provider/locale/he_IL.js +54 -72
  654. package/lib/provider/locale/hr_HR.js +51 -69
  655. package/lib/provider/locale/id_ID.js +51 -69
  656. package/lib/provider/locale/it_IT.js +51 -69
  657. package/lib/provider/locale/ja_JP.js +51 -69
  658. package/lib/provider/locale/ko_KR.js +51 -69
  659. package/lib/provider/locale/mn_MN.js +51 -69
  660. package/lib/provider/locale/ms_MY.js +51 -69
  661. package/lib/provider/locale/nl_NL.js +54 -72
  662. package/lib/provider/locale/pl_PL.js +51 -69
  663. package/lib/provider/locale/pt_BR.js +51 -69
  664. package/lib/provider/locale/ro_RO.js +54 -72
  665. package/lib/provider/locale/ru_RU.js +51 -69
  666. package/lib/provider/locale/sk_SK.js +54 -72
  667. package/lib/provider/locale/sr_RS.js +51 -69
  668. package/lib/provider/locale/sv_SE.js +54 -72
  669. package/lib/provider/locale/th_TH.js +54 -72
  670. package/lib/provider/locale/tr_TR.js +51 -69
  671. package/lib/provider/locale/uk_UA.js +54 -72
  672. package/lib/provider/locale/uz_UZ.js +51 -69
  673. package/lib/provider/locale/vi_VN.js +51 -69
  674. package/lib/provider/locale/zh_CN.js +54 -72
  675. package/lib/provider/locale/zh_HK.js +54 -72
  676. package/lib/provider/locale/zh_TW.js +54 -72
  677. package/lib/provider/typing/layoutToken.d.ts +0 -10
  678. package/lib/provider/typing/layoutToken.js +36 -69
  679. package/lib/provider/useStyle/index.d.ts +1 -1
  680. package/lib/provider/useStyle/index.js +98 -94
  681. package/lib/provider/utils/merge.js +18 -44
  682. package/lib/skeleton/components/Descriptions/index.js +246 -282
  683. package/lib/skeleton/components/List/index.js +221 -236
  684. package/lib/skeleton/components/Result/index.js +63 -84
  685. package/lib/skeleton/index.js +73 -79
  686. package/lib/table/Store/Provide.d.ts +0 -1
  687. package/lib/table/Store/Provide.js +147 -151
  688. package/lib/table/Table.js +664 -712
  689. package/lib/table/components/Alert/index.js +66 -67
  690. package/lib/table/components/Alert/style.js +33 -67
  691. package/lib/table/components/ColumnSetting/index.js +391 -404
  692. package/lib/table/components/ColumnSetting/style.js +77 -123
  693. package/lib/table/components/DragSortTable/index.js +110 -165
  694. package/lib/table/components/DragSortTable/style.js +25 -59
  695. package/lib/table/components/Dropdown/index.js +75 -108
  696. package/lib/table/components/EditableTable/CellEditorTable.js +55 -90
  697. package/lib/table/components/EditableTable/RowEditorTable.js +49 -87
  698. package/lib/table/components/EditableTable/index.js +351 -365
  699. package/lib/table/components/Form/FormRender.js +176 -201
  700. package/lib/table/components/Form/index.js +132 -161
  701. package/lib/table/components/ListToolBar/HeaderMenu.js +74 -128
  702. package/lib/table/components/ListToolBar/index.js +263 -302
  703. package/lib/table/components/ListToolBar/style.js +124 -149
  704. package/lib/table/components/ToolBar/DensityIcon.js +43 -71
  705. package/lib/table/components/ToolBar/FullscreenIcon.js +30 -45
  706. package/lib/table/components/ToolBar/index.js +247 -299
  707. package/lib/table/index.js +179 -71
  708. package/lib/table/style/index.js +135 -190
  709. package/lib/table/typing.d.ts +2 -2
  710. package/lib/table/typing.js +4 -16
  711. package/lib/table/useFetchData.js +437 -241
  712. package/lib/table/utils/cellRenderToFromItem.js +192 -277
  713. package/lib/table/utils/columnRender.js +126 -144
  714. package/lib/table/utils/columnSort.js +27 -39
  715. package/lib/table/utils/genProColumnToColumn.js +111 -141
  716. package/lib/table/utils/index.js +204 -128
  717. package/lib/table/utils/useDragSort.js +141 -188
  718. package/lib/utils/components/DropdownFooter/index.js +56 -89
  719. package/lib/utils/components/DropdownFooter/style.js +21 -55
  720. package/lib/utils/components/ErrorBoundary/index.js +55 -53
  721. package/lib/utils/components/FieldLabel/index.js +126 -176
  722. package/lib/utils/components/FieldLabel/style.js +87 -143
  723. package/lib/utils/components/FilterDropdown/index.js +61 -109
  724. package/lib/utils/components/FilterDropdown/style.js +22 -53
  725. package/lib/utils/components/InlineErrorFormItem/index.js +137 -193
  726. package/lib/utils/components/InlineErrorFormItem/style.js +56 -94
  727. package/lib/utils/components/LabelIconTip/index.js +62 -82
  728. package/lib/utils/components/LabelIconTip/style.js +41 -72
  729. package/lib/utils/components/ProFormContext/index.js +7 -34
  730. package/lib/utils/conversionMomentValue/index.js +112 -115
  731. package/lib/utils/dateArrayFormatter/index.js +38 -46
  732. package/lib/utils/genCopyable/index.js +49 -66
  733. package/lib/utils/getFieldPropsOrFormItemProps/index.js +15 -27
  734. package/lib/utils/hooks/useDebounceFn/index.js +63 -65
  735. package/lib/utils/hooks/useDebounceValue/index.js +35 -38
  736. package/lib/utils/hooks/useDeepCompareEffect/index.js +37 -61
  737. package/lib/utils/hooks/useDeepCompareMemo/index.js +17 -39
  738. package/lib/utils/hooks/useDocumentTitle/index.js +10 -28
  739. package/lib/utils/hooks/useFetchData/index.js +74 -89
  740. package/lib/utils/hooks/useForceRender/index.js +16 -26
  741. package/lib/utils/hooks/useLatest/index.js +11 -26
  742. package/lib/utils/hooks/usePrevious/index.js +9 -27
  743. package/lib/utils/hooks/useReactiveRef/index.js +10 -37
  744. package/lib/utils/hooks/useRefCallback/index.js +9 -27
  745. package/lib/utils/hooks/useRefFunction/index.js +16 -29
  746. package/lib/utils/index.d.ts +1 -3
  747. package/lib/utils/index.js +455 -138
  748. package/lib/utils/isBrowser/index.js +18 -27
  749. package/lib/utils/isDeepEqualReact/index.js +83 -70
  750. package/lib/utils/isDropdownValueType/index.js +8 -26
  751. package/lib/utils/isImg/index.js +6 -23
  752. package/lib/utils/isNil/index.js +7 -23
  753. package/lib/utils/isUrl/index.js +14 -28
  754. package/lib/utils/merge/index.js +26 -44
  755. package/lib/utils/nanoid/index.js +28 -36
  756. package/lib/utils/omitBoolean/index.js +12 -25
  757. package/lib/utils/omitUndefined/index.js +10 -28
  758. package/lib/utils/omitUndefinedAndEmptyArr/index.js +11 -29
  759. package/lib/utils/parseValueToMoment/index.js +26 -47
  760. package/lib/utils/pickProFormItemProps/index.js +12 -59
  761. package/lib/utils/pickProProps/index.js +13 -29
  762. package/lib/utils/proFieldParsingText/index.js +146 -77
  763. package/lib/utils/runFunction/index.js +12 -26
  764. package/lib/utils/stringify/index.js +14 -28
  765. package/lib/utils/transformKeySubmitValue/index.js +262 -160
  766. package/lib/utils/typing.js +4 -16
  767. package/lib/utils/useEditableArray/index.js +790 -630
  768. package/lib/utils/useEditableMap/index.js +188 -179
  769. package/lib/utils/useMediaQuery/index.js +53 -73
  770. package/lib/utils/useMediaQuery/query.js +23 -32
  771. package/lib/utils/useMountMergeState/index.d.ts +1 -1
  772. package/lib/utils/useMountMergeState/index.js +10 -33
  773. package/lib/version.js +7 -25
  774. package/package.json +2 -1
  775. package/es/card/components/TabPane/index.d.ts +0 -26
  776. package/es/card/components/TabPane/index.js +0 -84
  777. package/es/utils/compareVersions/coverToNewToken.d.ts +0 -2
  778. package/es/utils/compareVersions/coverToNewToken.js +0 -56
  779. package/es/utils/compareVersions/index.d.ts +0 -8
  780. package/es/utils/compareVersions/index.js +0 -48
  781. package/lib/card/components/TabPane/index.d.ts +0 -26
  782. package/lib/card/components/TabPane/index.js +0 -111
  783. package/lib/utils/compareVersions/coverToNewToken.d.ts +0 -2
  784. package/lib/utils/compareVersions/coverToNewToken.js +0 -73
  785. package/lib/utils/compareVersions/index.d.ts +0 -8
  786. package/lib/utils/compareVersions/index.js +0 -68
@@ -1,78 +1,20 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __objRest = (source, exclude) => {
21
- var target = {};
22
- for (var prop in source)
23
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
- target[prop] = source[prop];
25
- if (source != null && __getOwnPropSymbols)
26
- for (var prop of __getOwnPropSymbols(source)) {
27
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
- target[prop] = source[prop];
29
- }
30
- return target;
31
- };
32
- var __async = (__this, __arguments, generator) => {
33
- return new Promise((resolve, reject) => {
34
- var fulfilled = (value) => {
35
- try {
36
- step(generator.next(value));
37
- } catch (e) {
38
- reject(e);
39
- }
40
- };
41
- var rejected = (value) => {
42
- try {
43
- step(generator.throw(value));
44
- } catch (e) {
45
- reject(e);
46
- }
47
- };
48
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
49
- step((generator = generator.apply(__this, __arguments)).next());
50
- });
51
- };
52
-
53
- // src/layout/ProLayout.tsx
54
- import { getMatchMenu } from "@umijs/route-utils";
55
- import { ConfigProvider, Layout } from "antd";
56
- import classNames from "classnames";
57
- import useMergedState from "rc-util/lib/hooks/useMergedState";
58
- import omit from "rc-util/lib/omit";
59
- import warning from "rc-util/lib/warning";
60
- import React, {
61
- useCallback,
62
- useContext,
63
- useEffect,
64
- useMemo,
65
- useState
66
- } from "react";
67
- import useSWR, { useSWRConfig } from "swr";
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
3
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
4
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
6
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
7
+ var _excluded = ["id", "defaultMessage"],
8
+ _excluded2 = ["fixSiderbar", "navTheme", "layout"];
9
+ import { getMatchMenu } from '@umijs/route-utils';
10
+ import { ConfigProvider, Layout } from 'antd';
11
+ import classNames from 'classnames';
12
+ import { useMergedState, warning } from 'rc-util';
13
+ import omit from 'rc-util/lib/omit';
14
+ import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';
15
+ import useSWR, { useSWRConfig } from 'swr';
68
16
  import { ProConfigProvider, ProProvider, isNeedOpenHash } from "../provider";
69
- import {
70
- coverToNewToken,
71
- isBrowser,
72
- useBreakpoint,
73
- useDocumentTitle,
74
- useMountMergeState
75
- } from "../utils";
17
+ import { isBrowser, useBreakpoint, useDocumentTitle, useMountMergeState } from "../utils";
76
18
  import { Logo } from "./assert/Logo";
77
19
  import { DefaultFooter as Footer } from "./components/Footer";
78
20
  import { DefaultHeader as Header } from "./components/Header";
@@ -88,509 +30,498 @@ import { getMenuData } from "./utils/getMenuData";
88
30
  import { useCurrentMenuLayoutProps } from "./utils/useCurrentMenuLayoutProps";
89
31
  import { clearMenuItem } from "./utils/utils";
90
32
  import { WrapContent } from "./WrapContent";
33
+ import { jsx as _jsx } from "react/jsx-runtime";
34
+ import { Fragment as _Fragment } from "react/jsx-runtime";
35
+ import { jsxs as _jsxs } from "react/jsx-runtime";
91
36
  var layoutIndex = 0;
92
- var headerRender = (props, matchMenuKeys) => {
93
- var _a;
37
+ var headerRender = function headerRender(props, matchMenuKeys) {
38
+ var _props$stylish;
94
39
  if (props.headerRender === false || props.pure) {
95
40
  return null;
96
41
  }
97
- return /* @__PURE__ */ React.createElement(
98
- Header,
99
- __spreadProps(__spreadValues({
100
- matchMenuKeys
101
- }, props), {
102
- stylish: (_a = props.stylish) == null ? void 0 : _a.header
103
- })
104
- );
42
+ return /*#__PURE__*/_jsx(Header, _objectSpread(_objectSpread({
43
+ matchMenuKeys: matchMenuKeys
44
+ }, props), {}, {
45
+ stylish: (_props$stylish = props.stylish) === null || _props$stylish === void 0 ? void 0 : _props$stylish.header
46
+ }));
105
47
  };
106
- var footerRender = (props) => {
48
+ var footerRender = function footerRender(props) {
107
49
  if (props.footerRender === false || props.pure) {
108
50
  return null;
109
51
  }
110
52
  if (props.footerRender) {
111
- return props.footerRender(__spreadValues({}, props), /* @__PURE__ */ React.createElement(Footer, null));
53
+ return props.footerRender(_objectSpread({}, props), /*#__PURE__*/_jsx(Footer, {}));
112
54
  }
113
55
  return null;
114
56
  };
115
- var renderSiderMenu = (props, matchMenuKeys) => {
116
- var _a, _b, _c, _d;
117
- const {
118
- layout,
119
- isMobile,
120
- selectedKeys,
121
- openKeys,
122
- splitMenus,
123
- suppressSiderWhenMenuEmpty,
124
- menuRender
125
- } = props;
57
+ var renderSiderMenu = function renderSiderMenu(props, matchMenuKeys) {
58
+ var _props$stylish3;
59
+ var layout = props.layout,
60
+ isMobile = props.isMobile,
61
+ selectedKeys = props.selectedKeys,
62
+ openKeys = props.openKeys,
63
+ splitMenus = props.splitMenus,
64
+ suppressSiderWhenMenuEmpty = props.suppressSiderWhenMenuEmpty,
65
+ menuRender = props.menuRender;
126
66
  if (props.menuRender === false || props.pure) {
127
67
  return null;
128
68
  }
129
- let { menuData } = props;
130
- if (splitMenus && (openKeys !== false || layout === "mix") && !isMobile) {
131
- const [key] = selectedKeys || matchMenuKeys;
69
+ var menuData = props.menuData;
70
+
71
+ /** 如果是分割菜单模式,需要专门实现一下 */
72
+ if (splitMenus && (openKeys !== false || layout === 'mix') && !isMobile) {
73
+ var _ref = selectedKeys || matchMenuKeys,
74
+ _ref2 = _slicedToArray(_ref, 1),
75
+ key = _ref2[0];
132
76
  if (key) {
133
- menuData = ((_b = (_a = props.menuData) == null ? void 0 : _a.find((item) => item.key === key)) == null ? void 0 : _b.children) || [];
77
+ var _props$menuData;
78
+ menuData = ((_props$menuData = props.menuData) === null || _props$menuData === void 0 || (_props$menuData = _props$menuData.find(function (item) {
79
+ return item.key === key;
80
+ })) === null || _props$menuData === void 0 ? void 0 : _props$menuData.children) || [];
134
81
  } else {
135
82
  menuData = [];
136
83
  }
137
84
  }
138
- const clearMenuData = clearMenuItem(menuData || []);
139
- if (clearMenuData && (clearMenuData == null ? void 0 : clearMenuData.length) < 1 && (splitMenus || suppressSiderWhenMenuEmpty)) {
85
+ // 这里走了可以少一次循环
86
+ var clearMenuData = clearMenuItem(menuData || []);
87
+ if (clearMenuData && (clearMenuData === null || clearMenuData === void 0 ? void 0 : clearMenuData.length) < 1 && (splitMenus || suppressSiderWhenMenuEmpty)) {
140
88
  return null;
141
89
  }
142
- if (layout === "top" && !isMobile) {
143
- return /* @__PURE__ */ React.createElement(
144
- SiderMenu,
145
- __spreadProps(__spreadValues({
146
- matchMenuKeys
147
- }, props), {
148
- hide: true,
149
- stylish: (_c = props.stylish) == null ? void 0 : _c.sider
150
- })
151
- );
90
+ if (layout === 'top' && !isMobile) {
91
+ var _props$stylish2;
92
+ return /*#__PURE__*/_jsx(SiderMenu, _objectSpread(_objectSpread({
93
+ matchMenuKeys: matchMenuKeys
94
+ }, props), {}, {
95
+ hide: true,
96
+ stylish: (_props$stylish2 = props.stylish) === null || _props$stylish2 === void 0 ? void 0 : _props$stylish2.sider
97
+ }));
152
98
  }
153
- const defaultDom = /* @__PURE__ */ React.createElement(
154
- SiderMenu,
155
- __spreadProps(__spreadValues({
156
- matchMenuKeys
157
- }, props), {
158
- menuData: clearMenuData,
159
- stylish: (_d = props.stylish) == null ? void 0 : _d.sider
160
- })
161
- );
99
+ var defaultDom = /*#__PURE__*/_jsx(SiderMenu, _objectSpread(_objectSpread({
100
+ matchMenuKeys: matchMenuKeys
101
+ }, props), {}, {
102
+ // 这里走了可以少一次循环
103
+ menuData: clearMenuData,
104
+ stylish: (_props$stylish3 = props.stylish) === null || _props$stylish3 === void 0 ? void 0 : _props$stylish3.sider
105
+ }));
162
106
  if (menuRender) {
163
107
  return menuRender(props, defaultDom);
164
108
  }
165
109
  return defaultDom;
166
110
  };
167
- var defaultPageTitleRender = (pageProps, props) => {
168
- const { pageTitleRender } = props;
169
- const pageTitleInfo = getPageTitleInfo(pageProps);
111
+ var defaultPageTitleRender = function defaultPageTitleRender(pageProps, props) {
112
+ var pageTitleRender = props.pageTitleRender;
113
+ var pageTitleInfo = getPageTitleInfo(pageProps);
170
114
  if (pageTitleRender === false) {
171
115
  return {
172
- title: props.title || "",
173
- id: "",
174
- pageName: ""
116
+ title: props.title || '',
117
+ id: '',
118
+ pageName: ''
175
119
  };
176
120
  }
177
121
  if (pageTitleRender) {
178
- const title = pageTitleRender(
179
- pageProps,
180
- pageTitleInfo.title,
181
- pageTitleInfo
182
- );
183
- if (typeof title === "string") {
184
- return getPageTitleInfo(__spreadProps(__spreadValues({}, pageTitleInfo), {
185
- title
122
+ var title = pageTitleRender(pageProps, pageTitleInfo.title, pageTitleInfo);
123
+ if (typeof title === 'string') {
124
+ return getPageTitleInfo(_objectSpread(_objectSpread({}, pageTitleInfo), {}, {
125
+ title: title
186
126
  }));
187
127
  }
188
- warning(
189
- typeof title === "string",
190
- "pro-layout: renderPageTitle return value should be a string"
191
- );
128
+ warning(typeof title === 'string', 'pro-layout: renderPageTitle return value should be a string');
192
129
  }
193
130
  return pageTitleInfo;
194
131
  };
195
- var getPaddingInlineStart = (hasLeftPadding, collapsed, siderWidth) => {
132
+ var getPaddingInlineStart = function getPaddingInlineStart(hasLeftPadding, collapsed, siderWidth) {
196
133
  if (hasLeftPadding) {
197
134
  return collapsed ? 64 : siderWidth;
198
135
  }
199
136
  return 0;
200
137
  };
201
- var BaseProLayout = (props) => {
202
- var _a, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B;
203
- const {
204
- children,
205
- onCollapse: propsOnCollapse,
206
- location = { pathname: "/" },
207
- contentStyle,
208
- route,
209
- defaultCollapsed,
210
- style,
211
- siderWidth: propsSiderWidth,
212
- menu,
213
- siderMenuType,
214
- isChildrenLayout: propsIsChildrenLayout,
215
- menuDataRender,
216
- actionRef,
217
- bgLayoutImgList,
218
- formatMessage: propsFormatMessage,
219
- loading
220
- } = props || {};
221
- const siderWidth = useMemo(() => {
222
- if (propsSiderWidth)
223
- return propsSiderWidth;
224
- if (props.layout === "mix")
225
- return 215;
138
+
139
+ /**
140
+ * 🌃 Powerful and easy to use beautiful layout 🏄‍ Support multiple topics and layout types
141
+ *
142
+ * @param props
143
+ */
144
+ var BaseProLayout = function BaseProLayout(props) {
145
+ var _props$prefixCls, _location$pathname, _token$layout, _token$layout2, _token$layout3, _token$layout4, _token$layout5, _token$layout6, _token$layout7, _token$layout8, _token$layout9, _token$layout10, _token$layout11, _token$layout12;
146
+ var _ref3 = props || {},
147
+ children = _ref3.children,
148
+ propsOnCollapse = _ref3.onCollapse,
149
+ _ref3$location = _ref3.location,
150
+ location = _ref3$location === void 0 ? {
151
+ pathname: '/'
152
+ } : _ref3$location,
153
+ contentStyle = _ref3.contentStyle,
154
+ route = _ref3.route,
155
+ defaultCollapsed = _ref3.defaultCollapsed,
156
+ style = _ref3.style,
157
+ propsSiderWidth = _ref3.siderWidth,
158
+ menu = _ref3.menu,
159
+ siderMenuType = _ref3.siderMenuType,
160
+ propsIsChildrenLayout = _ref3.isChildrenLayout,
161
+ menuDataRender = _ref3.menuDataRender,
162
+ actionRef = _ref3.actionRef,
163
+ bgLayoutImgList = _ref3.bgLayoutImgList,
164
+ propsFormatMessage = _ref3.formatMessage,
165
+ loading = _ref3.loading;
166
+ var siderWidth = useMemo(function () {
167
+ if (propsSiderWidth) return propsSiderWidth;
168
+ if (props.layout === 'mix') return 215;
226
169
  return 256;
227
170
  }, [props.layout, propsSiderWidth]);
228
- const context = useContext(ConfigProvider.ConfigContext);
229
- const prefixCls = (_a = props.prefixCls) != null ? _a : context.getPrefixCls("pro");
230
- const [menuLoading, setMenuLoading] = useMountMergeState(false, {
231
- value: menu == null ? void 0 : menu.loading,
232
- onChange: menu == null ? void 0 : menu.onLoadingChange
233
- });
234
- const [defaultId] = useState(() => {
235
- layoutIndex += 1;
236
- return `pro-layout-${layoutIndex}`;
237
- });
238
- const formatMessage = useCallback(
239
- (_b) => {
240
- var _c = _b, {
241
- id,
242
- defaultMessage
243
- } = _c, restParams = __objRest(_c, [
244
- "id",
245
- "defaultMessage"
246
- ]);
247
- if (propsFormatMessage) {
248
- return propsFormatMessage(__spreadValues({
249
- id,
250
- defaultMessage
251
- }, restParams));
252
- }
253
- const locales = gLocaleObject();
254
- return locales[id] ? locales[id] : defaultMessage;
255
- },
256
- [propsFormatMessage]
257
- );
258
- const { data, mutate, isLoading } = useSWR(
259
- [defaultId, menu == null ? void 0 : menu.params],
260
- (_0) => __async(void 0, [_0], function* ([, params]) {
261
- var _a2;
262
- setMenuLoading(true);
263
- const menuDataItems = yield (_a2 = menu == null ? void 0 : menu.request) == null ? void 0 : _a2.call(
264
- menu,
265
- params || {},
266
- (route == null ? void 0 : route.children) || (route == null ? void 0 : route.routes) || []
267
- );
268
- setMenuLoading(false);
269
- return menuDataItems;
171
+ var context = useContext(ConfigProvider.ConfigContext);
172
+ var prefixCls = (_props$prefixCls = props.prefixCls) !== null && _props$prefixCls !== void 0 ? _props$prefixCls : context.getPrefixCls('pro');
173
+ var _useMountMergeState = useMountMergeState(false, {
174
+ value: menu === null || menu === void 0 ? void 0 : menu.loading,
175
+ onChange: menu === null || menu === void 0 ? void 0 : menu.onLoadingChange
270
176
  }),
271
- {
177
+ _useMountMergeState2 = _slicedToArray(_useMountMergeState, 2),
178
+ menuLoading = _useMountMergeState2[0],
179
+ setMenuLoading = _useMountMergeState2[1];
180
+
181
+ // give a default key for swr
182
+ var _useState = useState(function () {
183
+ layoutIndex += 1;
184
+ return "pro-layout-".concat(layoutIndex);
185
+ }),
186
+ _useState2 = _slicedToArray(_useState, 1),
187
+ defaultId = _useState2[0];
188
+
189
+ /**
190
+ * 处理国际化相关 formatMessage
191
+ * 如果有用户配置的以用户为主
192
+ * 如果没有用自己实现的
193
+ */
194
+ var formatMessage = useCallback(function (_ref4) {
195
+ var id = _ref4.id,
196
+ defaultMessage = _ref4.defaultMessage,
197
+ restParams = _objectWithoutProperties(_ref4, _excluded);
198
+ if (propsFormatMessage) {
199
+ return propsFormatMessage(_objectSpread({
200
+ id: id,
201
+ defaultMessage: defaultMessage
202
+ }, restParams));
203
+ }
204
+ var locales = gLocaleObject();
205
+ return locales[id] ? locales[id] : defaultMessage;
206
+ }, [propsFormatMessage]);
207
+ var _useSWR = useSWR([defaultId, menu === null || menu === void 0 ? void 0 : menu.params], /*#__PURE__*/function () {
208
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref5) {
209
+ var _menu$request;
210
+ var _ref7, params, menuDataItems;
211
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
212
+ while (1) switch (_context.prev = _context.next) {
213
+ case 0:
214
+ _ref7 = _slicedToArray(_ref5, 2), params = _ref7[1];
215
+ setMenuLoading(true);
216
+ _context.next = 4;
217
+ return menu === null || menu === void 0 || (_menu$request = menu.request) === null || _menu$request === void 0 ? void 0 : _menu$request.call(menu, params || {}, (route === null || route === void 0 ? void 0 : route.children) || (route === null || route === void 0 ? void 0 : route.routes) || []);
218
+ case 4:
219
+ menuDataItems = _context.sent;
220
+ setMenuLoading(false);
221
+ return _context.abrupt("return", menuDataItems);
222
+ case 7:
223
+ case "end":
224
+ return _context.stop();
225
+ }
226
+ }, _callee);
227
+ }));
228
+ return function (_x) {
229
+ return _ref6.apply(this, arguments);
230
+ };
231
+ }(), {
272
232
  revalidateOnFocus: false,
273
233
  shouldRetryOnError: false,
274
234
  revalidateOnReconnect: false
275
- }
276
- );
277
- useEffect(() => {
235
+ }),
236
+ data = _useSWR.data,
237
+ mutate = _useSWR.mutate,
238
+ isLoading = _useSWR.isLoading;
239
+ useEffect(function () {
278
240
  setMenuLoading(isLoading);
241
+ // eslint-disable-next-line react-hooks/exhaustive-deps
279
242
  }, [isLoading]);
280
- const { cache } = useSWRConfig();
281
- useEffect(() => {
282
- return () => {
283
- if (cache instanceof Map)
284
- cache.delete(defaultId);
243
+ var _useSWRConfig = useSWRConfig(),
244
+ cache = _useSWRConfig.cache;
245
+ useEffect(function () {
246
+ return function () {
247
+ if (cache instanceof Map) cache.delete(defaultId);
285
248
  };
249
+ // eslint-disable-next-line react-hooks/exhaustive-deps
286
250
  }, []);
287
- const menuInfoData = useMemo(
288
- () => getMenuData(
289
- data || (route == null ? void 0 : route.children) || (route == null ? void 0 : route.routes) || [],
290
- menu,
291
- formatMessage,
292
- menuDataRender
293
- ),
294
- [formatMessage, menu, menuDataRender, data, route == null ? void 0 : route.children]
295
- );
296
- const { breadcrumb, breadcrumbMap, menuData = [] } = menuInfoData || {};
297
- if (actionRef && (menu == null ? void 0 : menu.request)) {
251
+ var menuInfoData = useMemo(function () {
252
+ return getMenuData(data || (route === null || route === void 0 ? void 0 : route.children) || (route === null || route === void 0 ? void 0 : route.routes) || [], menu, formatMessage, menuDataRender);
253
+ }, [formatMessage, menu, menuDataRender, data, route === null || route === void 0 ? void 0 : route.children]);
254
+ var _ref8 = menuInfoData || {},
255
+ breadcrumb = _ref8.breadcrumb,
256
+ breadcrumbMap = _ref8.breadcrumbMap,
257
+ _ref8$menuData = _ref8.menuData,
258
+ menuData = _ref8$menuData === void 0 ? [] : _ref8$menuData;
259
+ if (actionRef && menu !== null && menu !== void 0 && menu.request) {
298
260
  actionRef.current = {
299
- reload: () => {
261
+ reload: function reload() {
300
262
  mutate();
301
263
  }
302
264
  };
303
265
  }
304
- const matchMenus = useMemo(() => {
305
- return getMatchMenu(location.pathname || "/", menuData || [], true);
266
+ var matchMenus = useMemo(function () {
267
+ return getMatchMenu(location.pathname || '/', menuData || [], true);
306
268
  }, [location.pathname, menuData]);
307
- const matchMenuKeys = useMemo(
308
- () => Array.from(
309
- new Set(matchMenus.map((item) => item.key || item.path || ""))
310
- ),
311
- [matchMenus]
312
- );
313
- const currentMenu = matchMenus[matchMenus.length - 1] || {};
314
- const currentMenuLayoutProps = useCurrentMenuLayoutProps(currentMenu);
315
- const _d = __spreadValues(__spreadValues({}, props), currentMenuLayoutProps), {
316
- fixSiderbar,
317
- navTheme,
318
- layout: propsLayout
319
- } = _d, rest = __objRest(_d, [
320
- "fixSiderbar",
321
- "navTheme",
322
- "layout"
323
- ]);
324
- const colSize = useBreakpoint();
325
- const isMobile = useMemo(() => {
326
- return (colSize === "sm" || colSize === "xs") && !props.disableMobile;
269
+ var matchMenuKeys = useMemo(function () {
270
+ return Array.from(new Set(matchMenus.map(function (item) {
271
+ return item.key || item.path || '';
272
+ })));
273
+ }, [matchMenus]);
274
+
275
+ // 当前选中的menu,一般不会为空
276
+ var currentMenu = matchMenus[matchMenus.length - 1] || {};
277
+ var currentMenuLayoutProps = useCurrentMenuLayoutProps(currentMenu);
278
+ var _props$currentMenuLay = _objectSpread(_objectSpread({}, props), currentMenuLayoutProps),
279
+ fixSiderbar = _props$currentMenuLay.fixSiderbar,
280
+ navTheme = _props$currentMenuLay.navTheme,
281
+ propsLayout = _props$currentMenuLay.layout,
282
+ rest = _objectWithoutProperties(_props$currentMenuLay, _excluded2);
283
+ var colSize = useBreakpoint();
284
+ var isMobile = useMemo(function () {
285
+ return (colSize === 'sm' || colSize === 'xs') && !props.disableMobile;
327
286
  }, [colSize, props.disableMobile]);
328
- const hasLeftPadding = propsLayout !== "top" && !isMobile;
329
- const [collapsed, onCollapse] = useMergedState(
330
- () => {
331
- if (defaultCollapsed !== void 0)
332
- return defaultCollapsed;
333
- if (false)
334
- return false;
335
- if (isMobile)
336
- return true;
337
- if (colSize === "md")
338
- return true;
287
+
288
+ // If it is a fix menu, calculate padding
289
+ // don't need padding in phone mode
290
+ /* Checking if the menu is loading and if it is, it will return a skeleton loading screen. */
291
+ var hasLeftPadding = propsLayout !== 'top' && !isMobile;
292
+ var _useMergedState = useMergedState(function () {
293
+ if (defaultCollapsed !== undefined) return defaultCollapsed;
294
+ if (process.env.NODE_ENV === 'TEST') return false;
295
+ if (isMobile) return true;
296
+ if (colSize === 'md') return true;
339
297
  return false;
340
- },
341
- {
298
+ }, {
342
299
  value: props.collapsed,
343
300
  onChange: propsOnCollapse
344
- }
345
- );
346
- const defaultProps = omit(
347
- __spreadProps(__spreadValues(__spreadProps(__spreadValues({
348
- prefixCls
349
- }, props), {
350
- siderWidth
351
- }), currentMenuLayoutProps), {
352
- formatMessage,
353
- breadcrumb,
354
- menu: __spreadProps(__spreadValues({}, menu), {
355
- type: siderMenuType || (menu == null ? void 0 : menu.type),
356
- loading: menuLoading
357
- }),
358
- layout: propsLayout
359
- }),
360
- ["className", "style", "breadcrumbRender"]
361
- );
362
- const pageTitleInfo = defaultPageTitleRender(
363
- __spreadProps(__spreadValues({
364
- pathname: location.pathname
365
- }, defaultProps), {
366
- breadcrumbMap
367
- }),
368
- props
369
- );
370
- const breadcrumbProps = getBreadcrumbProps(
371
- __spreadProps(__spreadValues({}, defaultProps), {
372
- breadcrumbRender: props.breadcrumbRender,
373
- breadcrumbMap
374
- }),
375
- props
376
- );
377
- const siderMenuDom = renderSiderMenu(
378
- __spreadProps(__spreadValues({}, defaultProps), {
379
- menuData,
380
- onCollapse,
381
- isMobile,
382
- collapsed
383
301
  }),
384
- matchMenuKeys
385
- );
386
- const headerDom = headerRender(
387
- __spreadProps(__spreadValues({}, defaultProps), {
388
- children: null,
389
- hasSiderMenu: !!siderMenuDom,
390
- menuData,
391
- isMobile,
392
- collapsed,
393
- onCollapse
302
+ _useMergedState2 = _slicedToArray(_useMergedState, 2),
303
+ collapsed = _useMergedState2[0],
304
+ onCollapse = _useMergedState2[1];
305
+
306
+ // Splicing parameters, adding menuData and formatMessage in props
307
+ var defaultProps = omit(_objectSpread(_objectSpread(_objectSpread({
308
+ prefixCls: prefixCls
309
+ }, props), {}, {
310
+ siderWidth: siderWidth
311
+ }, currentMenuLayoutProps), {}, {
312
+ formatMessage: formatMessage,
313
+ breadcrumb: breadcrumb,
314
+ menu: _objectSpread(_objectSpread({}, menu), {}, {
315
+ type: siderMenuType || (menu === null || menu === void 0 ? void 0 : menu.type),
316
+ loading: menuLoading
394
317
  }),
395
- matchMenuKeys
396
- );
397
- const footerDom = footerRender(__spreadValues({
398
- isMobile,
399
- collapsed
318
+ layout: propsLayout
319
+ }), ['className', 'style', 'breadcrumbRender']);
320
+
321
+ // gen page title
322
+ var pageTitleInfo = defaultPageTitleRender(_objectSpread(_objectSpread({
323
+ pathname: location.pathname
324
+ }, defaultProps), {}, {
325
+ breadcrumbMap: breadcrumbMap
326
+ }), props);
327
+
328
+ // gen breadcrumbProps, parameter for pageHeader
329
+ var breadcrumbProps = getBreadcrumbProps(_objectSpread(_objectSpread({}, defaultProps), {}, {
330
+ breadcrumbRender: props.breadcrumbRender,
331
+ breadcrumbMap: breadcrumbMap
332
+ }), props);
333
+
334
+ // render sider dom
335
+ var siderMenuDom = renderSiderMenu(_objectSpread(_objectSpread({}, defaultProps), {}, {
336
+ menuData: menuData,
337
+ onCollapse: onCollapse,
338
+ isMobile: isMobile,
339
+ collapsed: collapsed
340
+ }), matchMenuKeys);
341
+
342
+ // render header dom
343
+ var headerDom = headerRender(_objectSpread(_objectSpread({}, defaultProps), {}, {
344
+ children: null,
345
+ hasSiderMenu: !!siderMenuDom,
346
+ menuData: menuData,
347
+ isMobile: isMobile,
348
+ collapsed: collapsed,
349
+ onCollapse: onCollapse
350
+ }), matchMenuKeys);
351
+
352
+ // render footer dom
353
+ var footerDom = footerRender(_objectSpread({
354
+ isMobile: isMobile,
355
+ collapsed: collapsed
400
356
  }, defaultProps));
401
- const { isChildrenLayout: contextIsChildrenLayout } = useContext(RouteContext);
402
- const isChildrenLayout = propsIsChildrenLayout !== void 0 ? propsIsChildrenLayout : contextIsChildrenLayout;
403
- const proLayoutClassName = `${prefixCls}-layout`;
404
- const { wrapSSR, hashId } = useStyle(proLayoutClassName);
405
- const className = classNames(
406
- props.className,
407
- hashId,
408
- "ant-design-pro",
409
- proLayoutClassName,
410
- {
411
- [`screen-${colSize}`]: colSize,
412
- [`${proLayoutClassName}-top-menu`]: propsLayout === "top",
413
- [`${proLayoutClassName}-is-children`]: isChildrenLayout,
414
- [`${proLayoutClassName}-fix-siderbar`]: fixSiderbar,
415
- [`${proLayoutClassName}-${propsLayout}`]: propsLayout
416
- }
417
- );
418
- const leftSiderWidth = getPaddingInlineStart(
419
- !!hasLeftPadding,
420
- collapsed,
421
- siderWidth
422
- );
423
- const genLayoutStyle = {
424
- position: "relative"
357
+ var _useContext = useContext(RouteContext),
358
+ contextIsChildrenLayout = _useContext.isChildrenLayout;
359
+
360
+ // 如果 props 中定义,以 props 为准
361
+ var isChildrenLayout = propsIsChildrenLayout !== undefined ? propsIsChildrenLayout : contextIsChildrenLayout;
362
+ var proLayoutClassName = "".concat(prefixCls, "-layout");
363
+ var _useStyle = useStyle(proLayoutClassName),
364
+ wrapSSR = _useStyle.wrapSSR,
365
+ hashId = _useStyle.hashId;
366
+
367
+ // gen className
368
+ var className = classNames(props.className, hashId, 'ant-design-pro', proLayoutClassName, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "screen-".concat(colSize), colSize), "".concat(proLayoutClassName, "-top-menu"), propsLayout === 'top'), "".concat(proLayoutClassName, "-is-children"), isChildrenLayout), "".concat(proLayoutClassName, "-fix-siderbar"), fixSiderbar), "".concat(proLayoutClassName, "-").concat(propsLayout), propsLayout));
369
+
370
+ /** 计算 slider 的宽度 */
371
+ var leftSiderWidth = getPaddingInlineStart(!!hasLeftPadding, collapsed, siderWidth);
372
+
373
+ // siderMenuDom 为空的时候,不需要 padding
374
+ var genLayoutStyle = {
375
+ position: 'relative'
425
376
  };
377
+
378
+ // if is some layout children, don't need min height
426
379
  if (isChildrenLayout || contentStyle && contentStyle.minHeight) {
427
380
  genLayoutStyle.minHeight = 0;
428
381
  }
429
- useEffect(() => {
430
- var _a2;
431
- (_a2 = props.onPageChange) == null ? void 0 : _a2.call(props, props.location);
432
- }, [location.pathname, (_e = location.pathname) == null ? void 0 : _e.search]);
433
- const [hasFooterToolbar, setHasFooterToolbar] = useState(false);
434
- const [hasPageContainer, setHasPageContainer] = useState(0);
382
+
383
+ /** 页面切换的时候触发 */
384
+ useEffect(function () {
385
+ var _props$onPageChange;
386
+ (_props$onPageChange = props.onPageChange) === null || _props$onPageChange === void 0 || _props$onPageChange.call(props, props.location);
387
+ // eslint-disable-next-line react-hooks/exhaustive-deps
388
+ }, [location.pathname, (_location$pathname = location.pathname) === null || _location$pathname === void 0 ? void 0 : _location$pathname.search]);
389
+ var _useState3 = useState(false),
390
+ _useState4 = _slicedToArray(_useState3, 2),
391
+ hasFooterToolbar = _useState4[0],
392
+ setHasFooterToolbar = _useState4[1];
393
+ /**
394
+ * 使用number是因为多标签页的时候有多个 PageContainer,只有有任意一个就应该展示这个className
395
+ */
396
+ var _useState5 = useState(0),
397
+ _useState6 = _slicedToArray(_useState5, 2),
398
+ hasPageContainer = _useState6[0],
399
+ setHasPageContainer = _useState6[1];
435
400
  useDocumentTitle(pageTitleInfo, props.title || false);
436
- const { token } = useContext(ProProvider);
437
- const bgImgStyleList = useMemo(() => {
401
+ var _useContext2 = useContext(ProProvider),
402
+ token = _useContext2.token;
403
+ var bgImgStyleList = useMemo(function () {
438
404
  if (bgLayoutImgList && bgLayoutImgList.length > 0) {
439
- return bgLayoutImgList == null ? void 0 : bgLayoutImgList.map((item, index) => {
440
- return /* @__PURE__ */ React.createElement(
441
- "img",
442
- {
443
- key: index,
444
- src: item.src,
445
- style: __spreadValues({
446
- position: "absolute"
447
- }, item)
448
- }
449
- );
405
+ return bgLayoutImgList === null || bgLayoutImgList === void 0 ? void 0 : bgLayoutImgList.map(function (item, index) {
406
+ return /*#__PURE__*/_jsx("img", {
407
+ src: item.src,
408
+ style: _objectSpread({
409
+ position: 'absolute'
410
+ }, item)
411
+ }, index);
450
412
  });
451
413
  }
452
414
  return null;
453
415
  }, [bgLayoutImgList]);
454
- return wrapSSR(
455
- /* @__PURE__ */ React.createElement(
456
- RouteContext.Provider,
457
- {
458
- value: __spreadProps(__spreadValues({}, defaultProps), {
459
- breadcrumb: breadcrumbProps,
460
- menuData,
461
- isMobile,
462
- collapsed,
463
- hasPageContainer,
464
- setHasPageContainer,
465
- isChildrenLayout: true,
466
- title: pageTitleInfo.pageName,
467
- hasSiderMenu: !!siderMenuDom,
468
- hasHeader: !!headerDom,
469
- siderWidth: leftSiderWidth,
470
- hasFooter: !!footerDom,
471
- hasFooterToolbar,
472
- setHasFooterToolbar,
473
- pageTitleInfo,
474
- matchMenus,
475
- matchMenuKeys,
476
- currentMenu
477
- })
478
- },
479
- props.pure ? /* @__PURE__ */ React.createElement(React.Fragment, null, children) : /* @__PURE__ */ React.createElement("div", { className }, bgImgStyleList || ((_f = token.layout) == null ? void 0 : _f.bgLayout) ? /* @__PURE__ */ React.createElement(
480
- "div",
481
- {
482
- className: classNames(`${proLayoutClassName}-bg-list`, hashId)
483
- },
484
- bgImgStyleList
485
- ) : null, /* @__PURE__ */ React.createElement(
486
- Layout,
487
- {
488
- style: __spreadValues({
489
- minHeight: "100%",
490
- // hack style
491
- flexDirection: siderMenuDom ? "row" : void 0
492
- }, style)
493
- },
494
- /* @__PURE__ */ React.createElement(
495
- ConfigProvider,
496
- {
497
- theme: {
498
- hashed: isNeedOpenHash(),
499
- token: {
500
- controlHeightLG: ((_h = (_g = token.layout) == null ? void 0 : _g.sider) == null ? void 0 : _h.menuHeight) || (token == null ? void 0 : token.controlHeightLG)
501
- },
502
- components: {
503
- Menu: coverToNewToken({
504
- colorItemBg: ((_j = (_i = token.layout) == null ? void 0 : _i.sider) == null ? void 0 : _j.colorMenuBackground) || "transparent",
505
- colorSubItemBg: ((_l = (_k = token.layout) == null ? void 0 : _k.sider) == null ? void 0 : _l.colorMenuBackground) || "transparent",
506
- radiusItem: token.borderRadius,
507
- colorItemBgSelected: ((_n = (_m = token.layout) == null ? void 0 : _m.sider) == null ? void 0 : _n.colorBgMenuItemSelected) || (token == null ? void 0 : token.colorBgTextHover),
508
- colorItemBgHover: ((_p = (_o = token.layout) == null ? void 0 : _o.sider) == null ? void 0 : _p.colorBgMenuItemHover) || (token == null ? void 0 : token.colorBgTextHover),
509
- colorItemBgActive: ((_r = (_q = token.layout) == null ? void 0 : _q.sider) == null ? void 0 : _r.colorBgMenuItemActive) || (token == null ? void 0 : token.colorBgTextActive),
510
- colorItemBgSelectedHorizontal: ((_t = (_s = token.layout) == null ? void 0 : _s.sider) == null ? void 0 : _t.colorBgMenuItemSelected) || (token == null ? void 0 : token.colorBgTextHover),
511
- colorActiveBarWidth: 0,
512
- colorActiveBarHeight: 0,
513
- colorActiveBarBorderSize: 0,
514
- colorItemText: ((_v = (_u = token.layout) == null ? void 0 : _u.sider) == null ? void 0 : _v.colorTextMenu) || (token == null ? void 0 : token.colorTextSecondary),
515
- colorItemTextHover: ((_x = (_w = token.layout) == null ? void 0 : _w.sider) == null ? void 0 : _x.colorTextMenuItemHover) || "rgba(0, 0, 0, 0.85)",
516
- // 悬浮态
517
- colorItemTextSelected: ((_z = (_y = token.layout) == null ? void 0 : _y.sider) == null ? void 0 : _z.colorTextMenuSelected) || "rgba(0, 0, 0, 1)",
518
- popupBg: token == null ? void 0 : token.colorBgElevated,
519
- subMenuItemBg: token == null ? void 0 : token.colorBgElevated,
520
- darkSubMenuItemBg: "transparent",
521
- darkPopupBg: token == null ? void 0 : token.colorBgElevated
522
- })
416
+ return wrapSSR( /*#__PURE__*/_jsx(RouteContext.Provider, {
417
+ value: _objectSpread(_objectSpread({}, defaultProps), {}, {
418
+ breadcrumb: breadcrumbProps,
419
+ menuData: menuData,
420
+ isMobile: isMobile,
421
+ collapsed: collapsed,
422
+ hasPageContainer: hasPageContainer,
423
+ setHasPageContainer: setHasPageContainer,
424
+ isChildrenLayout: true,
425
+ title: pageTitleInfo.pageName,
426
+ hasSiderMenu: !!siderMenuDom,
427
+ hasHeader: !!headerDom,
428
+ siderWidth: leftSiderWidth,
429
+ hasFooter: !!footerDom,
430
+ hasFooterToolbar: hasFooterToolbar,
431
+ setHasFooterToolbar: setHasFooterToolbar,
432
+ pageTitleInfo: pageTitleInfo,
433
+ matchMenus: matchMenus,
434
+ matchMenuKeys: matchMenuKeys,
435
+ currentMenu: currentMenu
436
+ }),
437
+ children: props.pure ? /*#__PURE__*/_jsx(_Fragment, {
438
+ children: children
439
+ }) : /*#__PURE__*/_jsxs("div", {
440
+ className: className,
441
+ children: [bgImgStyleList || (_token$layout = token.layout) !== null && _token$layout !== void 0 && _token$layout.bgLayout ? /*#__PURE__*/_jsx("div", {
442
+ className: classNames("".concat(proLayoutClassName, "-bg-list"), hashId),
443
+ children: bgImgStyleList
444
+ }) : null, /*#__PURE__*/_jsxs(Layout, {
445
+ style: _objectSpread({
446
+ minHeight: '100%',
447
+ // hack style
448
+ flexDirection: siderMenuDom ? 'row' : undefined
449
+ }, style),
450
+ children: [/*#__PURE__*/_jsx(ConfigProvider
451
+ // @ts-ignore
452
+ , {
453
+ theme: {
454
+ hashed: isNeedOpenHash(),
455
+ token: {
456
+ controlHeightLG: ((_token$layout2 = token.layout) === null || _token$layout2 === void 0 || (_token$layout2 = _token$layout2.sider) === null || _token$layout2 === void 0 ? void 0 : _token$layout2.menuHeight) || (token === null || token === void 0 ? void 0 : token.controlHeightLG)
457
+ },
458
+ components: {
459
+ Menu: {
460
+ colorItemBg: ((_token$layout3 = token.layout) === null || _token$layout3 === void 0 || (_token$layout3 = _token$layout3.sider) === null || _token$layout3 === void 0 ? void 0 : _token$layout3.colorMenuBackground) || 'transparent',
461
+ colorSubItemBg: ((_token$layout4 = token.layout) === null || _token$layout4 === void 0 || (_token$layout4 = _token$layout4.sider) === null || _token$layout4 === void 0 ? void 0 : _token$layout4.colorMenuBackground) || 'transparent',
462
+ itemBorderRadius: token.borderRadius,
463
+ itemSelectedBg: ((_token$layout5 = token.layout) === null || _token$layout5 === void 0 || (_token$layout5 = _token$layout5.sider) === null || _token$layout5 === void 0 ? void 0 : _token$layout5.colorBgMenuItemSelected) || (token === null || token === void 0 ? void 0 : token.colorBgTextHover),
464
+ itemHoverBg: ((_token$layout6 = token.layout) === null || _token$layout6 === void 0 || (_token$layout6 = _token$layout6.sider) === null || _token$layout6 === void 0 ? void 0 : _token$layout6.colorBgMenuItemHover) || (token === null || token === void 0 ? void 0 : token.colorBgTextHover),
465
+ itemActiveBg: ((_token$layout7 = token.layout) === null || _token$layout7 === void 0 || (_token$layout7 = _token$layout7.sider) === null || _token$layout7 === void 0 ? void 0 : _token$layout7.colorBgMenuItemActive) || (token === null || token === void 0 ? void 0 : token.colorBgTextActive),
466
+ horizontalItemSelectedBg: ((_token$layout8 = token.layout) === null || _token$layout8 === void 0 || (_token$layout8 = _token$layout8.sider) === null || _token$layout8 === void 0 ? void 0 : _token$layout8.colorBgMenuItemSelected) || (token === null || token === void 0 ? void 0 : token.colorBgTextHover),
467
+ activeBarWidth: 0,
468
+ activeBarHeight: 0,
469
+ activeBarBorderWidth: 0,
470
+ itemColor: ((_token$layout9 = token.layout) === null || _token$layout9 === void 0 || (_token$layout9 = _token$layout9.sider) === null || _token$layout9 === void 0 ? void 0 : _token$layout9.colorTextMenu) || (token === null || token === void 0 ? void 0 : token.colorTextSecondary),
471
+ itemHoverColor: ((_token$layout10 = token.layout) === null || _token$layout10 === void 0 || (_token$layout10 = _token$layout10.sider) === null || _token$layout10 === void 0 ? void 0 : _token$layout10.colorTextMenuItemHover) || 'rgba(0, 0, 0, 0.85)',
472
+ // 悬浮态
473
+ itemSelectedColor: ((_token$layout11 = token.layout) === null || _token$layout11 === void 0 || (_token$layout11 = _token$layout11.sider) === null || _token$layout11 === void 0 ? void 0 : _token$layout11.colorTextMenuSelected) || 'rgba(0, 0, 0, 1)',
474
+ popupBg: token === null || token === void 0 ? void 0 : token.colorBgElevated,
475
+ subMenuItemBg: token === null || token === void 0 ? void 0 : token.colorBgElevated,
476
+ darkSubMenuItemBg: 'transparent',
477
+ darkPopupBg: token === null || token === void 0 ? void 0 : token.colorBgElevated
523
478
  }
524
479
  }
525
480
  },
526
- siderMenuDom
527
- ),
528
- /* @__PURE__ */ React.createElement(
529
- "div",
530
- {
531
- style: genLayoutStyle,
532
- className: `${proLayoutClassName}-container ${hashId}`.trim()
533
- },
534
- headerDom,
535
- /* @__PURE__ */ React.createElement(
536
- WrapContent,
537
- __spreadProps(__spreadValues({
538
- hasPageContainer,
539
- isChildrenLayout
540
- }, rest), {
541
- hasHeader: !!headerDom,
542
- prefixCls: proLayoutClassName,
543
- style: contentStyle
544
- }),
545
- loading ? /* @__PURE__ */ React.createElement(PageLoading, null) : children
546
- ),
547
- footerDom,
548
- hasFooterToolbar && /* @__PURE__ */ React.createElement(
549
- "div",
550
- {
551
- className: `${proLayoutClassName}-has-footer`,
552
- style: {
553
- height: 64,
554
- marginBlockStart: (_B = (_A = token.layout) == null ? void 0 : _A.pageContainer) == null ? void 0 : _B.paddingBlockPageContainerContent
555
- }
481
+ children: siderMenuDom
482
+ }), /*#__PURE__*/_jsxs("div", {
483
+ style: genLayoutStyle,
484
+ className: "".concat(proLayoutClassName, "-container ").concat(hashId).trim(),
485
+ children: [headerDom, /*#__PURE__*/_jsx(WrapContent, _objectSpread(_objectSpread({
486
+ hasPageContainer: hasPageContainer,
487
+ isChildrenLayout: isChildrenLayout
488
+ }, rest), {}, {
489
+ hasHeader: !!headerDom,
490
+ prefixCls: proLayoutClassName,
491
+ style: contentStyle,
492
+ children: loading ? /*#__PURE__*/_jsx(PageLoading, {}) : children
493
+ })), footerDom, hasFooterToolbar && /*#__PURE__*/_jsx("div", {
494
+ className: "".concat(proLayoutClassName, "-has-footer"),
495
+ style: {
496
+ height: 64,
497
+ marginBlockStart: (_token$layout12 = token.layout) === null || _token$layout12 === void 0 || (_token$layout12 = _token$layout12.pageContainer) === null || _token$layout12 === void 0 ? void 0 : _token$layout12.paddingBlockPageContainerContent
556
498
  }
557
- )
558
- )
559
- ))
560
- )
561
- );
499
+ })]
500
+ })]
501
+ })]
502
+ })
503
+ }));
562
504
  };
563
- var ProLayout = (props) => {
564
- const { colorPrimary } = props;
565
- const darkProps = props.navTheme !== void 0 ? {
566
- dark: props.navTheme === "realDark"
505
+ var ProLayout = function ProLayout(props) {
506
+ var colorPrimary = props.colorPrimary;
507
+ var darkProps = props.navTheme !== undefined ? {
508
+ dark: props.navTheme === 'realDark'
567
509
  } : {};
568
- return /* @__PURE__ */ React.createElement(
569
- ConfigProvider,
570
- {
571
- theme: colorPrimary ? {
572
- token: {
573
- colorPrimary
574
- }
575
- } : void 0
576
- },
577
- /* @__PURE__ */ React.createElement(
578
- ProConfigProvider,
579
- __spreadProps(__spreadValues({}, darkProps), {
580
- token: props.token,
581
- prefixCls: props.prefixCls
582
- }),
583
- /* @__PURE__ */ React.createElement(
584
- BaseProLayout,
585
- __spreadValues(__spreadProps(__spreadValues({
586
- logo: /* @__PURE__ */ React.createElement(Logo, null)
587
- }, defaultSettings), {
588
- location: isBrowser() ? window.location : void 0
589
- }), props)
590
- )
591
- )
592
- );
593
- };
594
- export {
595
- ProLayout
510
+ return /*#__PURE__*/_jsx(ConfigProvider, {
511
+ theme: colorPrimary ? {
512
+ token: {
513
+ colorPrimary: colorPrimary
514
+ }
515
+ } : undefined,
516
+ children: /*#__PURE__*/_jsx(ProConfigProvider, _objectSpread(_objectSpread({}, darkProps), {}, {
517
+ token: props.token,
518
+ prefixCls: props.prefixCls,
519
+ children: /*#__PURE__*/_jsx(BaseProLayout, _objectSpread(_objectSpread({
520
+ logo: /*#__PURE__*/_jsx(Logo, {})
521
+ }, defaultSettings), {}, {
522
+ location: isBrowser() ? window.location : undefined
523
+ }, props))
524
+ }))
525
+ });
596
526
  };
527
+ export { ProLayout };