@unicom-cloud/ui 0.8.43 → 0.8.45

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 (495) hide show
  1. package/Affix.js +54 -51
  2. package/Alert.js +46 -43
  3. package/Anchor.js +5 -4
  4. package/AutoComplete.js +60 -55
  5. package/Avatar.js +10 -155
  6. package/BackTop.js +41 -38
  7. package/Badge.js +63 -93
  8. package/Breadcrumb.js +63 -118
  9. package/Button.js +105 -109
  10. package/Calendar.js +139 -536
  11. package/Card.js +65 -101
  12. package/Carousel.js +169 -270
  13. package/Cascader.js +9 -8
  14. package/Checkbox.js +4 -3
  15. package/Collapse.js +4 -3
  16. package/ColorPicker.js +95 -546
  17. package/Comment.js +14 -12
  18. package/ConfigProvider.js +6 -5
  19. package/Copy.js +33 -31
  20. package/DatePicker.js +35 -1993
  21. package/Descriptions.js +30 -28
  22. package/Divider.js +8 -6
  23. package/Draggable.js +28 -85
  24. package/Drawer.js +5 -4
  25. package/Dropdown.js +107 -167
  26. package/Empty.js +28 -8
  27. package/Form.js +30 -1418
  28. package/Grid.js +13 -248
  29. package/Icon.js +19 -45
  30. package/IconHover.js +39 -6
  31. package/Image.js +3 -3
  32. package/Input.js +4 -4
  33. package/InputNumber.js +213 -17
  34. package/InputTag.js +5 -4
  35. package/Layout.js +35 -48
  36. package/Link.js +16 -14
  37. package/List.js +191 -228
  38. package/Loading.js +18 -17
  39. package/Mentions.js +99 -115
  40. package/Menu.js +8 -7
  41. package/Message.js +147 -10
  42. package/Modal.js +5 -4
  43. package/Notice.js +196 -13
  44. package/Notification.js +136 -11
  45. package/NotificationBase.js +5 -4
  46. package/OverflowEllipsis.js +48 -71
  47. package/PageHeader.js +52 -52
  48. package/Pagination.js +12 -11
  49. package/Picker.js +6 -4
  50. package/Popconfirm.js +47 -44
  51. package/Popover.js +25 -23
  52. package/Portal.js +12 -32
  53. package/Progress.js +65 -328
  54. package/Radio.js +6 -5
  55. package/Rate.js +48 -45
  56. package/ResizeBox.js +127 -505
  57. package/Result.js +60 -1417
  58. package/Select.js +9 -8
  59. package/SelectView.js +49 -328
  60. package/Skeleton.js +41 -78
  61. package/Slider.js +228 -702
  62. package/Space.js +53 -57
  63. package/Spin.js +57 -72
  64. package/Statistic.js +84 -153
  65. package/Steps.js +64 -123
  66. package/SuspenseFallbackTest.js +4 -3
  67. package/Switch.js +41 -38
  68. package/Table.js +20 -1999
  69. package/Tabs.js +9 -8
  70. package/Tag.js +24 -21
  71. package/TimePicker.js +19 -272
  72. package/Timeline.js +4 -3
  73. package/Tooltip.js +79 -72
  74. package/Transfer.js +138 -402
  75. package/Tree.js +5 -4
  76. package/TreeSelect.js +8 -7
  77. package/Trigger.js +407 -571
  78. package/Typography.js +11 -721
  79. package/Upload.js +9 -8
  80. package/VerificationCode.js +6 -5
  81. package/Version.js +1 -1
  82. package/VirtualList.js +4 -3
  83. package/Watermark.js +3 -2
  84. package/anchor/Anchor.js +193 -0
  85. package/anchor/Link.js +54 -0
  86. package/anchor/context.js +14 -0
  87. package/anchor/util.js +41 -0
  88. package/avatar/Avatar.js +85 -0
  89. package/avatar/Group.js +84 -0
  90. package/avatar/context.js +5 -0
  91. package/badge/Count.js +35 -0
  92. package/breadcrumb/Item.js +67 -0
  93. package/button/Group.js +15 -0
  94. package/calendar/Month.js +142 -0
  95. package/calendar/WeekList.js +24 -0
  96. package/calendar/Year.js +75 -0
  97. package/calendar/header/Panel.js +57 -0
  98. package/calendar/header/index.js +118 -0
  99. package/calendar/hook/useCellClassName.js +41 -0
  100. package/card/Grid.js +27 -0
  101. package/card/Meta.js +32 -0
  102. package/carousel/Arrow.js +57 -0
  103. package/carousel/Indicator.js +68 -0
  104. package/cascader/Cascader.js +300 -0
  105. package/cascader/base/node.js +142 -0
  106. package/cascader/base/store.js +93 -0
  107. package/cascader/hook/useRefCurrent.js +12 -0
  108. package/cascader/panel/List.js +275 -0
  109. package/cascader/panel/Option.js +35 -0
  110. package/cascader/panel/Search.js +171 -0
  111. package/cascader/util.js +66 -0
  112. package/checkbox/Checkbox.js +111 -0
  113. package/checkbox/Group.js +97 -0
  114. package/checkbox/useCheckbox.js +45 -0
  115. package/collapse/Collapse.js +90 -0
  116. package/collapse/Item.js +165 -0
  117. package/color-picker/ControlBar.js +64 -0
  118. package/color-picker/InputAlpha.js +24 -0
  119. package/color-picker/InputHex.js +59 -0
  120. package/color-picker/InputRgb.js +66 -0
  121. package/color-picker/Palette.js +36 -0
  122. package/color-picker/Panel.js +165 -0
  123. package/color-picker/colors.js +37 -0
  124. package/color-picker/hooks/useColorPicker.js +63 -0
  125. package/color-picker/hooks/useControlBlock.js +40 -0
  126. package/config-provider/ConfigProvider.js +94 -0
  127. package/config-provider/context.js +24 -0
  128. package/date-picker/Picker.js +399 -0
  129. package/date-picker/PickerRange.js +568 -0
  130. package/date-picker/context.js +5 -0
  131. package/date-picker/hook/useCellClassName.js +58 -0
  132. package/date-picker/panel/Body.js +78 -0
  133. package/date-picker/panel/Footer.js +71 -0
  134. package/date-picker/panel/Header.js +74 -0
  135. package/date-picker/panel/Shortcut.js +45 -0
  136. package/date-picker/panel/WeekList.js +19 -0
  137. package/date-picker/panel/date/index.js +194 -0
  138. package/date-picker/panel/month/index.js +113 -0
  139. package/date-picker/panel/quarter/index.js +93 -0
  140. package/date-picker/panel/range/index.js +251 -0
  141. package/date-picker/panel/week/index.js +35 -0
  142. package/date-picker/panel/year/index.js +74 -0
  143. package/date-picker/util.js +69 -0
  144. package/draggable/Item.js +66 -0
  145. package/drawer/Drawer.js +226 -0
  146. package/dropdown/Button.js +91 -0
  147. package/form/Control.js +264 -0
  148. package/form/Form.js +156 -0
  149. package/form/FormItem.js +241 -0
  150. package/form/FormLabel.js +54 -0
  151. package/form/FormList.js +96 -0
  152. package/form/FormProvider.js +48 -0
  153. package/form/IconSymbol.js +20 -0
  154. package/form/context.js +43 -0
  155. package/form/hook/useContext.js +32 -0
  156. package/form/hook/useState.js +31 -0
  157. package/form/hook/useWatch.js +36 -0
  158. package/form/interface.js +11 -0
  159. package/form/promisify.js +23 -0
  160. package/form/store.js +354 -0
  161. package/form/useForm.js +53 -0
  162. package/form/util.js +72 -0
  163. package/grid/Col.js +87 -0
  164. package/grid/Row.js +88 -0
  165. package/grid/context.js +9 -0
  166. package/grid/grid-item.js +77 -0
  167. package/grid/grid.js +104 -0
  168. package/grid/hook/useResponsiveState.js +38 -0
  169. package/grid/util.js +51 -0
  170. package/{chunk/I4RV9SKZ.js → hooks/factory/createHTMLMediaHook.js} +35 -43
  171. package/hooks/index.js +246 -4
  172. package/{chunk/BdYAMaw9.js → hooks/misc/hookState.js} +1 -1
  173. package/hooks/misc/parseTimeRanges.js +12 -0
  174. package/{chunk/TXCrI0jN.js → hooks/misc/util.js} +6 -6
  175. package/hooks/use-watermark/utils.js +8 -0
  176. package/hooks/use-watermark.js +71 -76
  177. package/hooks/useAudio.js +3 -3
  178. package/hooks/useBeforeUnload.js +2 -2
  179. package/hooks/useClickAway.js +10 -10
  180. package/hooks/useCounter.js +1 -1
  181. package/hooks/useCreation.js +2 -4
  182. package/hooks/useDrop.js +12 -12
  183. package/hooks/useDropArea.js +5 -5
  184. package/hooks/useEvent.js +6 -6
  185. package/hooks/useEventListener.js +2 -4
  186. package/hooks/useFavicon.js +1 -2
  187. package/hooks/useFullscreen.js +11 -13
  188. package/hooks/useGetSet.js +5 -5
  189. package/hooks/useHash.js +6 -6
  190. package/hooks/useHover.js +6 -6
  191. package/hooks/useHoverDirty.js +7 -7
  192. package/hooks/useIdle.js +17 -17
  193. package/hooks/useIsomorphicLayoutEffect2.js +3 -3
  194. package/hooks/useKey.js +5 -5
  195. package/hooks/useList.js +1 -1
  196. package/hooks/useLocalStorage.js +2 -3
  197. package/hooks/useLocation.js +1 -1
  198. package/hooks/useLockBodyScroll.js +13 -14
  199. package/hooks/useLongPress.js +7 -7
  200. package/hooks/useMeasure.js +3 -3
  201. package/hooks/useMedia.js +4 -4
  202. package/hooks/useMediaDevices.js +10 -10
  203. package/hooks/useMotion.js +11 -11
  204. package/hooks/useMouse.js +9 -9
  205. package/hooks/useMouseWheel.js +7 -7
  206. package/hooks/useNetworkState.js +7 -7
  207. package/hooks/useOrientation.js +10 -11
  208. package/hooks/useOverrideRef.js +14 -0
  209. package/hooks/usePageLeave.js +4 -4
  210. package/hooks/usePermission.js +9 -9
  211. package/hooks/usePersistCallback.js +15 -0
  212. package/hooks/useScroll.js +6 -6
  213. package/hooks/useScrolling.js +7 -7
  214. package/hooks/useSearchParam.js +5 -5
  215. package/hooks/useSessionStorage.js +9 -9
  216. package/hooks/useSize.js +1 -1
  217. package/hooks/useSlider.js +6 -6
  218. package/hooks/useStartTyping.js +4 -4
  219. package/hooks/useStateList.js +4 -5
  220. package/hooks/useStateWithHistory.js +1 -1
  221. package/hooks/useTimeout.js +1 -2
  222. package/hooks/useVibrate.js +5 -5
  223. package/hooks/useVideo.js +3 -3
  224. package/hooks/useWindowScroll.js +13 -13
  225. package/hooks/useWindowSize.js +6 -6
  226. package/icon/addFromIconFontCn.js +33 -0
  227. package/image/Image.js +189 -0
  228. package/image/ImageFooter.js +45 -0
  229. package/image/ImagePreview.js +473 -0
  230. package/image/ImagePreviewArrow.js +40 -0
  231. package/image/ImagePreviewGroup.js +125 -0
  232. package/image/ImagePreviewToolbar.js +98 -0
  233. package/image/TriggerForToolbar.js +10 -0
  234. package/image/previewGroupContext.js +17 -0
  235. package/image/util/getFixTranslate.js +7 -0
  236. package/image/util/getScale.js +72 -0
  237. package/image/util/hook/useImageStatus.js +16 -0
  238. package/image/util/hook/useShowFooter.js +7 -0
  239. package/index.js +440 -395
  240. package/input/Group.js +20 -0
  241. package/input/Input.js +185 -0
  242. package/input/InputElement.js +233 -0
  243. package/input/Number.js +4 -0
  244. package/input/Password.js +72 -0
  245. package/input/Search.js +80 -0
  246. package/input/Tag.js +7 -0
  247. package/input/Textarea.js +168 -0
  248. package/input/autoSizeTextAreaHeight.js +65 -0
  249. package/input/useComposition.js +39 -0
  250. package/input-number/decimal.js +154 -0
  251. package/input-number/useSelectionRange.js +26 -0
  252. package/input-number/util.js +57 -0
  253. package/input-tag/InputTag.js +381 -0
  254. package/layout/Content.js +15 -0
  255. package/layout/Footer.js +15 -0
  256. package/layout/Header.js +15 -0
  257. package/{chunk/B9asjXwm.js → layout/Sider.js} +23 -22
  258. package/list/Item.js +46 -0
  259. package/list/Meta.js +21 -0
  260. package/loading/style/index.module.less.js +4 -0
  261. package/locale/de-DE.js +1 -1
  262. package/mentions/util.js +26 -0
  263. package/menu/Indent.js +17 -0
  264. package/menu/Item.js +125 -0
  265. package/menu/ItemGroup.js +39 -0
  266. package/menu/Menu.js +181 -0
  267. package/menu/OverflowWrap.js +85 -0
  268. package/menu/context.js +5 -0
  269. package/menu/sub-menu/Inline.js +111 -0
  270. package/menu/sub-menu/Pop.js +126 -0
  271. package/menu/sub-menu/index.js +17 -0
  272. package/menu/util.js +80 -0
  273. package/message/useMessage.js +53 -0
  274. package/modal/Confirm.js +98 -0
  275. package/modal/Modal.js +419 -0
  276. package/modal/config.js +25 -0
  277. package/modal/use-modal/Hook.js +55 -0
  278. package/modal/use-modal/index.js +68 -0
  279. package/notification/useNotification.js +55 -0
  280. package/overflow-ellipsis/OverflowItem.js +34 -0
  281. package/package.json +27 -1
  282. package/pagination/PageItem.js +121 -0
  283. package/pagination/PageJumper.js +64 -0
  284. package/pagination/PageOption.js +55 -0
  285. package/pagination/Pagination.js +245 -0
  286. package/picker/Input.js +124 -0
  287. package/picker/InputRange.js +155 -0
  288. package/portal/Portal.js +25 -0
  289. package/progress/CircleProgress.js +117 -0
  290. package/progress/LineProgess.js +103 -0
  291. package/progress/StepProgress.js +74 -0
  292. package/radio/Group.js +91 -0
  293. package/radio/Radio.js +90 -0
  294. package/resize-box/ResizeTrigger.js +78 -0
  295. package/resize-box/Split.js +132 -0
  296. package/resize-box/SplitGroup.js +204 -0
  297. package/result/403.js +695 -0
  298. package/result/404.js +513 -0
  299. package/result/500.js +166 -0
  300. package/select/OptGroup.js +20 -0
  301. package/select/Option.js +97 -0
  302. package/select/Select.js +544 -0
  303. package/select/util.js +140 -0
  304. package/select-view/Core.js +309 -0
  305. package/skeleton/Image.js +24 -0
  306. package/skeleton/Text.js +27 -0
  307. package/slider/Button.js +159 -0
  308. package/slider/Dot.js +43 -0
  309. package/slider/Input.js +75 -0
  310. package/slider/Mark.js +28 -0
  311. package/slider/Tick.js +44 -0
  312. package/slider/hook/useInterval.js +73 -0
  313. package/slider/hook/useLegalValue.js +70 -0
  314. package/slider/util.js +63 -0
  315. package/space/toArray.js +11 -0
  316. package/spin/DotLoading.js +26 -0
  317. package/statistic/Countdown.js +57 -0
  318. package/statistic/util.js +33 -0
  319. package/steps/Step.js +68 -0
  320. package/style.css +1 -1
  321. package/table/ColGroup.js +59 -0
  322. package/table/Table.js +634 -0
  323. package/table/constant.js +5 -0
  324. package/table/hook/useColumns.js +141 -0
  325. package/table/hook/useComponent.js +64 -0
  326. package/table/hook/useExpand.js +36 -0
  327. package/table/hook/useRowSelection.js +92 -0
  328. package/table/hook/useSorter.js +54 -0
  329. package/table/hook/useStickyClassNames.js +30 -0
  330. package/table/hook/useStickyOffsets.js +30 -0
  331. package/table/summary/Cell.js +10 -0
  332. package/table/summary/Row.js +26 -0
  333. package/table/summary/context.js +5 -0
  334. package/table/summary/index.js +10 -0
  335. package/table/tbody/Td.js +160 -0
  336. package/table/tbody/Tr.js +168 -0
  337. package/table/tbody/index.js +156 -0
  338. package/table/tfoot/index.js +16 -0
  339. package/table/thead/Column.js +250 -0
  340. package/table/thead/index.js +131 -0
  341. package/table/util.js +121 -0
  342. package/tabs/Tab.js +170 -0
  343. package/tabs/TabContent.js +54 -0
  344. package/tabs/TabPane.js +26 -0
  345. package/tabs/hook/useDomSize.js +17 -0
  346. package/tabs/hook/useHeaderScroll.js +64 -0
  347. package/tabs/tab-header/DropdownIcon.js +71 -0
  348. package/tabs/tab-header/TabInk.js +65 -0
  349. package/tabs/tab-header/TabNavIcon.js +65 -0
  350. package/tabs/tab-header/TabTitle.js +78 -0
  351. package/tabs/tab-header/index.js +335 -0
  352. package/tabs/util.js +22 -0
  353. package/time-picker/Picker.js +221 -0
  354. package/time-picker/RangePicker.js +56 -0
  355. package/time-picker/TimeColumn.js +65 -0
  356. package/time-picker/TimePicker.js +242 -0
  357. package/time-picker/context.js +5 -0
  358. package/time-picker/util.js +43 -0
  359. package/timeline/Item.js +94 -0
  360. package/timeline/Timeline.js +80 -0
  361. package/transfer/Item.js +107 -0
  362. package/transfer/List.js +192 -0
  363. package/tree/Animation.js +104 -0
  364. package/tree/Context.js +5 -0
  365. package/tree/Node.js +215 -0
  366. package/tree/NodeList.js +84 -0
  367. package/tree/Tree.js +549 -0
  368. package/tree/util.js +76 -0
  369. package/tree-select/List.js +127 -0
  370. package/tree-select/Select.js +260 -0
  371. package/tree-select/hook/useKeyCache.js +56 -0
  372. package/tree-select/hook/useStateValue.js +98 -0
  373. package/tree-select/hook/useTreeData.js +13 -0
  374. package/tree-select/interface.js +13 -0
  375. package/tree-select/util.js +9 -0
  376. package/trigger/Portal.js +14 -0
  377. package/trigger/getPopupStyle.js +190 -0
  378. package/types/badge/Count.d.ts +2 -1
  379. package/types/badge/index.d.ts +2 -2
  380. package/types/button/index.d.ts +2 -2
  381. package/types/carousel/index.d.ts +1 -1
  382. package/types/color-picker/colors.d.ts +1 -1
  383. package/types/color-picker/style/index.d.ts +1 -1
  384. package/types/drawer/Drawer.d.ts +1 -1
  385. package/types/dropdown/interface.d.ts +1 -0
  386. package/types/grid/index.d.ts +1 -0
  387. package/types/hooks/index.d.ts +122 -0
  388. package/types/hooks/use-verification-code/interface.d.ts +1 -1
  389. package/types/hooks/useAsync.d.ts +1 -1
  390. package/types/hooks/useDropArea.d.ts +1 -0
  391. package/types/hooks/useOverrideRef.d.ts +5 -0
  392. package/types/hooks/usePersistCallback.d.ts +1 -0
  393. package/types/hooks/useUpsert.d.ts +1 -1
  394. package/types/icon-hover/index.d.ts +5 -3
  395. package/types/index.d.ts +4 -120
  396. package/types/input-tag/InputTag.d.ts +1 -1
  397. package/types/input-tag/interface.d.ts +1 -1
  398. package/types/link/interface.d.ts +1 -1
  399. package/types/list/index.d.ts +1 -1
  400. package/types/modal/interface.d.ts +1 -0
  401. package/types/notice/index.d.ts +3 -0
  402. package/types/notification/index.d.ts +1 -1
  403. package/types/page-header/index.d.ts +1 -1
  404. package/types/select/Select.d.ts +1 -1
  405. package/types/select-view/Core.d.ts +3 -2
  406. package/types/select-view/index.d.ts +1 -0
  407. package/types/statistic/index.d.ts +1 -1
  408. package/types/switch/index.d.ts +1 -1
  409. package/types/switch/interface.d.ts +1 -1
  410. package/types/table/interface.d.ts +2 -1
  411. package/types/tooltip/index.d.ts +1 -1
  412. package/types/trigger/index.d.ts +12 -8
  413. package/types/trigger/interface.d.ts +1 -0
  414. package/types/typography/Base.d.ts +8 -7
  415. package/types/typography/EditContent.d.ts +3 -2
  416. package/types/typography/Paragraph.d.ts +2 -5
  417. package/types/typography/Text.d.ts +1 -5
  418. package/types/typography/Title.d.ts +2 -5
  419. package/types/upload/TriggerNode.d.ts +5 -3
  420. package/types/upload/list/PictureItem.d.ts +3 -3
  421. package/types/upload/list/TextItem.d.ts +3 -3
  422. package/types/utils/CSSTransition.d.ts +2 -0
  423. package/types/utils/constant.d.ts +1 -1
  424. package/types/utils/is.d.ts +4 -0
  425. package/types/utils/reactDOM.d.ts +3 -1
  426. package/types/utils/warning.d.ts +1 -1
  427. package/types/version/index.d.ts +1 -1
  428. package/typography/Base.js +184 -0
  429. package/typography/EditContent.js +49 -0
  430. package/typography/Ellipsis.js +293 -0
  431. package/typography/Operations.js +78 -0
  432. package/typography/Paragraph.js +26 -0
  433. package/typography/Text.js +11 -0
  434. package/typography/Title.js +12 -0
  435. package/typography/Typography.js +15 -0
  436. package/typography/useCssEllipsis.js +37 -0
  437. package/typography/useEllipsis.js +150 -0
  438. package/upload/TriggerNode.js +118 -0
  439. package/upload/Upload.js +205 -0
  440. package/upload/Uploader.js +205 -0
  441. package/upload/interface.js +9 -0
  442. package/upload/list/PictureItem.js +91 -0
  443. package/upload/list/TextItem.js +99 -0
  444. package/upload/list/UploadProgress.js +97 -0
  445. package/upload/list/index.js +120 -0
  446. package/upload/request.js +51 -0
  447. package/upload/util.js +61 -0
  448. package/utils/CSSTransition.js +27 -0
  449. package/utils/contextHolder.js +29 -4
  450. package/utils/getHighlightText.js +1 -2
  451. package/utils/is.js +81 -68
  452. package/utils/reactDOM.js +33 -22
  453. package/utils/style.js +1 -2
  454. package/utils/warning.js +7 -3
  455. package/verification-code/VerificationCode.js +83 -0
  456. package/virtual-list/Filler.js +31 -0
  457. package/virtual-list/VirtualList.js +378 -0
  458. package/virtual-list/util/algorithm.js +32 -0
  459. package/virtual-list/util/item.js +99 -0
  460. package/{chunk/BCEX3Acw.js → watermark/Watermark.js} +13 -11
  461. package/chunk/B1P8u7kB.js +0 -798
  462. package/chunk/B2ufZjjd.js +0 -1000
  463. package/chunk/B7QOJqps.js +0 -162
  464. package/chunk/BBz3S3zo.js +0 -966
  465. package/chunk/BGzBxiWE.js +0 -517
  466. package/chunk/BNRfcEHj.js +0 -984
  467. package/chunk/BSs6uXmc.js +0 -946
  468. package/chunk/BTjUAV8T.js +0 -277
  469. package/chunk/BYQeEcKe.js +0 -375
  470. package/chunk/Ba4UXIST.js +0 -605
  471. package/chunk/BfaXVcik.js +0 -271
  472. package/chunk/Bs11tCU6.js +0 -240
  473. package/chunk/C7FC7dzS.js +0 -516
  474. package/chunk/CLzbve11.js +0 -694
  475. package/chunk/CN4zXU4b.js +0 -877
  476. package/chunk/CYTPZUHD.js +0 -769
  477. package/chunk/CcCo_dK0.js +0 -335
  478. package/chunk/CoCXcpQd.js +0 -261
  479. package/chunk/D4yH4UKK.js +0 -80
  480. package/chunk/DiSLYN2-.js +0 -167
  481. package/chunk/Dr0iXIXO.js +0 -736
  482. package/chunk/G3-2uJao.js +0 -229
  483. package/chunk/RnTpOC5-.js +0 -1
  484. package/chunk/Z-mtdHUQ.js +0 -226
  485. package/chunk/ZISxNnaR.js +0 -165
  486. package/chunk/aPJXnDSb.js +0 -450
  487. package/chunk/i605JRmI.js +0 -232
  488. package/chunk/l0sNRNKZ.js +0 -1
  489. package/types/form/FormItemTip.d.ts +0 -8
  490. /package/{chunk/C6Kfwj0f.js → loading/style/index.less.js} +0 -0
  491. /package/{chunk/DP2rzg_V.js → suspense-fallback-test/style/index.less.js} +0 -0
  492. /package/types/{Popover → popover}/index.d.ts +0 -0
  493. /package/types/{Popover → popover}/interface.d.ts +0 -0
  494. /package/types/{Popover → popover}/style/index.d.ts +0 -0
  495. /package/{chunk/K6Dvbx-E.js → virtual-list/style/index.less.js} +0 -0
package/Table.js CHANGED
@@ -1,2001 +1,22 @@
1
- import "./chunk/C6Kfwj0f.js";
2
- import "./chunk/RnTpOC5-.js";
3
- import { C as It } from "./chunk/i605JRmI.js";
4
- import { a as Xe } from "./chunk/Dr0iXIXO.js";
5
- import "./chunk/DP2rzg_V.js";
6
- import "./Tag.js";
7
- import "./chunk/BYQeEcKe.js";
8
- import Fn from "./Trigger.js";
9
- import "./chunk/CYTPZUHD.js";
10
- import { P as Qt } from "./chunk/aPJXnDSb.js";
11
- import { R as rn } from "./chunk/ZISxNnaR.js";
12
- import Ln from "./Space.js";
13
- import On from "./Spin.js";
14
- import sn from "./Tooltip.js";
15
- import { jsx as a, jsxs as ue, Fragment as yt } from "react/jsx-runtime";
16
- import { Tween as Bn, quintInOut as Kn } from "@unicom-cloud/utils/tween";
17
- import Dn from "lodash/debounce";
18
- import ie from "lodash/isArray";
19
- import He from "lodash/isNumber";
20
- import q from "lodash/isPlainObject";
21
- import Hn from "lodash/throttle";
22
- import Pe, { useRef as xe, useEffect as nt, useMemo as de, useCallback as tt, useState as we, useContext as We, forwardRef as Pt, createElement as ln, createContext as Wn, useImperativeHandle as Mn } from "react";
23
- import zn from "./hooks/useIsomorphicLayoutEffect.js";
24
- import Jt from "./hooks/useMergeProps.js";
25
- import Tt from "./hooks/useUpdateEffect.js";
26
- import ne from "@unicom-cloud/utils/class-name";
27
- import { on as ut, off as ht } from "./utils/dom.js";
28
- import Un, { pickDataAttributes as Vn } from "./utils/pick.js";
29
- import jn from "lodash/merge";
30
- import Yn from "lodash/isNull";
31
- import Ye from "lodash/isString";
32
- import qn from "lodash/isUndefined";
33
- import { V as Gn } from "./chunk/BGzBxiWE.js";
34
- import Xn from "@unicom-cloud/icons/IconUiMinus";
35
- import Qn from "@unicom-cloud/icons/IconUiPlus";
36
- import xt from "lodash/get";
37
- import kt from "lodash/isFunction";
38
- import Jn from "./hooks/useForceUpdate.js";
39
- import Zn from "./utils/mergedToString.js";
40
- import eo from "@unicom-cloud/icons/IconUiCaretDown";
41
- import to from "@unicom-cloud/icons/IconUiCaretUp";
42
- import no from "@unicom-cloud/icons/IconUiFilter";
43
- import Zt from "./Button.js";
44
- import oo from "./hooks/useMergeValue.js";
45
- import ro from "./utils/omit.js";
46
- const qe = "table_internal_selection_key", Ge = "table_internal_expand_key";
47
- function St(t) {
48
- return typeof t == "number" || typeof t == "string" ? {
49
- width: t
50
- } : {};
51
- }
52
- function mt(t) {
53
- var y;
54
- const o = xe(), {
55
- prefixCls: r,
56
- columns: h,
57
- columnWidths: e,
58
- producer: d,
59
- expandedRowKeys: c,
60
- data: l,
61
- onSetColumnWidths: s
62
- } = t;
63
- nt(() => {
64
- if (d && o.current) {
65
- const N = Array.from(
66
- o.current.querySelectorAll("col") || []
67
- ).filter(
68
- (g) => !g.classList.contains(`${r}-expand-icon-col`) && !g.classList.contains(`${r}-selection-col`)
69
- ).map((g) => {
70
- const { width: T } = g.getBoundingClientRect();
71
- return T;
72
- });
73
- s == null || s(N);
74
- }
75
- }, [d, s, r, c, l, h]);
76
- let C = 0;
77
- return /* @__PURE__ */ a("colgroup", { ref: o, children: (y = h == null ? void 0 : h.map) == null ? void 0 : y.call(h, (m, N) => {
78
- if (m.title === Ge)
79
- return /* @__PURE__ */ a(
80
- "col",
81
- {
82
- className: `${r}-expand-icon-col`,
83
- style: St(m.width)
84
- },
85
- Ge
86
- );
87
- if (m.title === qe)
88
- return /* @__PURE__ */ a(
89
- "col",
90
- {
91
- className: `${r}-selection-col`,
92
- style: St(m.width)
93
- },
94
- qe
95
- );
96
- let g;
97
- return m.width ? g = m.width : !d && e && (g = e[C]), C++, /* @__PURE__ */ a("col", { style: St(g) }, m.key ?? N);
98
- }) });
99
- }
100
- const en = {
101
- table: "table",
102
- header: {
103
- operations: ({ selectionNode: t, expandNode: o }) => [
104
- {
105
- name: "expandNode",
106
- node: o
107
- },
108
- {
109
- name: "selectionNode",
110
- node: t
111
- }
112
- ],
113
- wrapper: "div",
114
- thead: "thead",
115
- row: "tr",
116
- th: "th",
117
- cell: "div"
118
- },
119
- body: {
120
- operations: ({ selectionNode: t, expandNode: o }) => [
121
- {
122
- name: "expandNode",
123
- node: o
124
- },
125
- {
126
- name: "selectionNode",
127
- node: t
128
- }
129
- ],
130
- wrapper: "div",
131
- tbody: "tbody",
132
- row: "tr",
133
- td: "td",
134
- cell: "span"
135
- }
136
- };
137
- function Me(t) {
138
- const o = de(
139
- () => q(t) ? jn({}, en, t) : en,
140
- [t]
141
- );
142
- return {
143
- getHeaderComponentOperations: o.header.operations,
144
- getBodyComponentOperations: o.body.operations,
145
- ComponentTable: o.table,
146
- ComponentHeaderWrapper: o.header.wrapper,
147
- ComponentThead: o.header.thead,
148
- ComponentHeaderRow: o.header.row,
149
- ComponentTh: o.header.th,
150
- ComponentHeaderCell: o.header.cell,
151
- ComponentBodyWrapper: o.body.wrapper,
152
- ComponentTbody: o.body.tbody,
153
- ComponentBodyRow: o.body.row,
154
- ComponentTd: o.body.td,
155
- ComponentBodyCell: o.body.cell
156
- };
157
- }
158
- function tn(t, o) {
159
- const r = [];
160
- function h(e) {
161
- e && e.length > 0 && e.forEach((d) => {
162
- d[o] ? h(d[o]) : r.push({ ...d, key: d.dataIndex || d.key });
163
- });
164
- }
165
- return h(t), r;
166
- }
167
- function cn(t, o) {
168
- let r = 0;
169
- return t && t.length > 0 && t.forEach((h) => {
170
- const e = cn(h[o], o) + 1;
171
- r = Math.max(e, r);
172
- }), r;
173
- }
174
- function so(t) {
175
- const {
176
- component: o,
177
- rowSelection: r,
178
- expandedRowRender: h,
179
- expandProps: e = {},
180
- columns: d = [],
181
- childrenColumnName: c
182
- } = t, l = de(() => d || [], [d]), s = de(
183
- () => tn(l, c),
184
- [l, c]
185
- ), C = r && r.type === "checkbox" || r && !("type" in r), y = r && r.type === "radio", { width: m } = e, N = !!h, g = C || y, { getHeaderComponentOperations: T, getBodyComponentOperations: _ } = Me(o), S = de(
186
- () => T({
187
- selectionNode: g ? "holder_node" : "",
188
- expandNode: N ? "holder_node" : ""
189
- }),
190
- [
191
- g,
192
- N,
193
- T
194
- ]
195
- ), w = de(
196
- () => _({
197
- selectionNode: g ? "holder_node" : "",
198
- expandNode: N ? "holder_node" : ""
199
- }),
200
- [
201
- g,
202
- N,
203
- _
204
- ]
205
- ), p = r && r.fixed, k = r && r.columnWidth, B = tt(
206
- (K, P, E) => {
207
- const I = {}, D = [];
208
- K.forEach((x, A) => {
209
- const $ = { ...x };
210
- (!("key" in x) || typeof x.key > "u") && ($.key = $.dataIndex || A), A === 0 ? ($.$$isFirstColumn = !0, $.fixed === "left" && (I.fixed = $.fixed)) : $.$$isFirstColumn = !1, D.push($);
211
- });
212
- const H = N && {
213
- key: Ge,
214
- title: Ge,
215
- width: m,
216
- $$isOperation: !0
217
- }, O = g && {
218
- key: qe,
219
- title: qe,
220
- width: k,
221
- $$isOperation: !0
222
- };
223
- return p && (I.fixed = "left"), (typeof E != "number" || E === 0) && [...P].reverse().forEach((x, A) => {
224
- if (x.node) {
225
- const $ = S.filter((R) => R.node).length - A - 1;
226
- x.name === "expandNode" ? D.unshift({
227
- ...H,
228
- ...I,
229
- $$columnIndex: $
230
- }) : x.name === "selectionNode" ? D.unshift({
231
- ...O,
232
- ...I,
233
- $$columnIndex: $
234
- }) : D.unshift({
235
- ...x,
236
- ...I,
237
- title: x.name,
238
- key: x.name,
239
- $$isOperation: !0,
240
- width: x.width || 40,
241
- $$columnIndex: $
242
- });
243
- }
244
- }), D;
245
- },
246
- [
247
- m,
248
- N,
249
- g,
250
- k,
251
- p,
252
- S
253
- ]
254
- ), G = de(
255
- () => B(s, w),
256
- [s, B, w]
257
- ), ee = de(
258
- () => cn(l, c),
259
- [l, c]
260
- );
261
- return [de(() => {
262
- const K = Array.isArray(S) ? S.filter((D) => D.node).length : 0;
263
- if (ee === 1) {
264
- const D = l.map((H, O) => ({
265
- ...H,
266
- $$columnIndex: O + K
267
- }));
268
- return [B(D, S, 0)];
269
- }
270
- let P = K;
271
- const E = [], I = (D, H = 0) => {
272
- E[H] = E[H] || [], D.forEach((O) => {
273
- const x = { ...O };
274
- x[c] ? (x.colSpan = tn(
275
- O[c],
276
- c
277
- ).length, x.$$columnIndex = [P], E[H].push(x), I(x[c], H + 1), x.$$columnIndex.push(P - 1)) : (x.rowSpan = ee - H, x.$$columnIndex = P++, E[H].push(x));
278
- }), E[H] = B(
279
- E[H],
280
- S,
281
- H
282
- );
283
- };
284
- return I(l), E;
285
- }, [
286
- l,
287
- c,
288
- ee,
289
- B,
290
- S
291
- ]), G];
292
- }
293
- function Rt(t) {
294
- return He(t) ? t : Ye(t) && t.includes("px") ? +t.replace("px", "") : t;
295
- }
296
- function io(t) {
297
- return t ? t.offsetHeight - t.clientHeight : 0;
298
- }
299
- function lo(t) {
300
- return t ? t.offsetWidth - t.clientWidth : 0;
301
- }
302
- function vt(t, o) {
303
- return ie(t[o]) && t[o].length;
304
- }
305
- function co(t, o) {
306
- function r(h) {
307
- if (!h)
308
- return [];
309
- const e = [];
310
- return h.forEach((d) => {
311
- if (!q(d))
312
- e.push(d);
313
- else {
314
- const c = { ...d };
315
- c.__ORIGIN_DATA = d;
316
- const l = c[o];
317
- q(c) && l && ie(l) && (c[o] = r(l)), e.push(c);
318
- }
319
- }), e;
320
- }
321
- return r(t);
322
- }
323
- function te(t) {
324
- return q(t) ? t.__ORIGIN_DATA : !t || !ie(t) ? t : t.map((o) => !q(o) || !("__ORIGIN_DATA" in o) ? o : o.__ORIGIN_DATA);
325
- }
326
- function ao(t, o, r = [], h = [], e, d, c) {
327
- const l = new Set(r), s = new Set(h);
328
- function C(y) {
329
- o ? (l.add(e(y)), s.delete(e(y))) : l.delete(e(y)), ie(y[d]) && y[d].forEach((m) => {
330
- C(m);
331
- });
332
- }
333
- return c ? (C(t), At(
334
- t,
335
- l,
336
- s,
337
- e,
338
- d
339
- )) : o ? l.add(e(t)) : l.delete(e(t)), {
340
- selectedRowKeys: [...l],
341
- indeterminateKeys: [...s]
342
- };
343
- }
344
- function fo(t, o = [], r, h, e) {
345
- if (!e)
346
- return {
347
- selectedRowKeys: o,
348
- indeterminateKeys: []
349
- };
350
- const d = new Set(o), c = /* @__PURE__ */ new Set([]);
351
- function l(s) {
352
- d.add(r(s)), c.delete(r(s)), ie(s[h]) && s[h].forEach((C) => {
353
- l(C);
354
- });
355
- }
356
- return o.forEach((s) => {
357
- const C = t.find((y) => r(y) === s);
358
- !qn(C) && !Yn(C) && (l(C), At(
359
- C,
360
- d,
361
- c,
362
- r,
363
- h
364
- ));
365
- }), {
366
- selectedRowKeys: [...d],
367
- indeterminateKeys: [...c]
368
- };
369
- }
370
- function At(t, o, r, h, e) {
371
- if (t.__INTERNAL_PARENT) {
372
- const d = h(t.__INTERNAL_PARENT);
373
- if (ie(t.__INTERNAL_PARENT[e])) {
374
- const c = t.__INTERNAL_PARENT[e].length;
375
- let l = 0, s = !1;
376
- t.__INTERNAL_PARENT[e].forEach((C) => {
377
- o.has(h(C)) && (l += 1), r.has(h(C)) && (r.add(d), s = !0);
378
- }), c === l ? (o.add(d), r.delete(d)) : l > 0 && c > l ? (o.delete(d), r.add(d)) : l === 0 && (o.delete(d), s || r.delete(d));
379
- }
380
- At(
381
- t.__INTERNAL_PARENT,
382
- o,
383
- r,
384
- h,
385
- e
386
- );
387
- }
388
- }
389
- function _t(t) {
390
- return typeof t == "function" ? t : typeof t == "object" && typeof t.compare == "function" ? t.compare : null;
391
- }
392
- function Et(t) {
393
- if (typeof t == "object" && typeof t.multiple == "number")
394
- return t.multiple;
395
- }
396
- function po(t, o, r) {
397
- const {
398
- defaultExpandedRowKeys: h,
399
- defaultExpandAllRows: e,
400
- expandedRowRender: d,
401
- onExpand: c,
402
- onExpandedRowsChange: l,
403
- childrenColumnName: s = "children",
404
- expandProps: C
405
- } = t, [y, m] = we(
406
- g()
407
- ), N = t.expandedRowKeys || y;
408
- function g() {
409
- let S = [];
410
- return t.expandedRowKeys ? S = t.expandedRowKeys : h ? S = h : e && (S = o.map((w, p) => {
411
- const k = te(w);
412
- return C && "rowExpandable" in C && typeof C.rowExpandable == "function" ? C.rowExpandable(k) && r(w) : typeof d == "function" ? d(k, p) && r(w) : vt(w, s) && r(w);
413
- }).filter((w) => w)), S;
414
- }
415
- function T(S) {
416
- const w = N.indexOf(S) === -1, p = w ? N.concat(S) : N.filter((B) => S !== B), k = o.filter((B) => p.indexOf(r(B)) !== -1).map((B) => r(B));
417
- m(k), _(S, w), l == null || l(k);
418
- }
419
- function _(S, w) {
420
- c == null || c(
421
- te(o.find((p) => r(p) === S)),
422
- w
423
- );
424
- }
425
- return [N, T];
426
- }
427
- function nn(t) {
428
- return [...new Set(t)];
429
- }
430
- function uo(t, o, r, h) {
431
- const { rowSelection: e, childrenColumnName: d } = t, c = e == null ? void 0 : e.selectedRowKeys, l = e == null ? void 0 : e.onSelectAll, s = e == null ? void 0 : e.onSelect, C = e == null ? void 0 : e.onChange, y = e == null ? void 0 : e.pureKeys, m = typeof (e == null ? void 0 : e.checkStrictly) == "boolean" ? !e.checkStrictly : !1, N = e == null ? void 0 : e.preserveSelectedRowKeys;
432
- function g() {
433
- const x = [], A = [], $ = (F) => {
434
- ie(F) && F.length && F.forEach((f) => {
435
- const v = h(f);
436
- (e && typeof e.checkboxProps == "function" ? e.checkboxProps(te(f)) : {}).disabled || x.push(v), vt(f, t.childrenColumnName) && $(f[t.childrenColumnName]);
437
- });
438
- };
439
- $(o);
440
- const R = (F, f) => {
441
- ie(F) && F.length && F.forEach((v) => {
442
- if (f && m && (v.__INTERNAL_PARENT = f), A.push(v), vt(v, t.childrenColumnName)) {
443
- const Y = { ...v };
444
- R(v[t.childrenColumnName], Y);
445
- }
446
- });
447
- };
448
- return R(r, void 0), {
449
- allSelectedRowKeys: x,
450
- flattenData: A
451
- };
452
- }
453
- const { allSelectedRowKeys: T, flattenData: _ } = g(), [S, w] = we([]), [p, k] = we([]), B = fo(
454
- _,
455
- nn(c || S),
456
- h,
457
- d,
458
- m
459
- ), G = m && !c ? S : B.selectedRowKeys, ee = m && !c ? p : B.indeterminateKeys, [V, K] = we(
460
- y ? [] : P(G)
461
- );
462
- function P(x, A) {
463
- const $ = A ? V.concat(_) : _, R = new Map($.map((F) => [h(F), F]));
464
- return x.map((F) => R.get(F)).filter((F) => F);
465
- }
466
- const E = new Set(_.map((x) => h(x)));
467
- function I(x) {
468
- return N ? x : x.filter((A) => E.has(A));
469
- }
470
- function D(x) {
471
- let A = [], $ = [];
472
- if (x)
473
- A = I(
474
- nn(G.concat(T))
475
- );
476
- else {
477
- const F = new Set(T);
478
- A = I(
479
- G.filter((f) => !F.has(f))
480
- );
481
- }
482
- y || ($ = P(A, !0));
483
- const R = te($);
484
- w(A), K($), k([]), C == null || C(A, R), l == null || l(x, R);
485
- }
486
- function H(x, A) {
487
- const { selectedRowKeys: $, indeterminateKeys: R } = ao(
488
- A,
489
- x,
490
- G,
491
- p,
492
- h,
493
- d,
494
- m
495
- ), F = I($), f = P(F, !0), v = te(f);
496
- w(F), K(f), k(R), s == null || s(x, te(A), v), C == null || C(F, v);
497
- }
498
- function O(x, A) {
499
- const $ = [_.find((F) => h(F) === x)], R = te($);
500
- w([x]), s == null || s(!0, te(A), R), C == null || C([x], R);
501
- }
502
- return {
503
- selectedRowKeys: G,
504
- indeterminateKeys: ee,
505
- onCheckAll: D,
506
- onCheck: H,
507
- onCheckRadio: O,
508
- setSelectedRowKeys: w,
509
- allSelectedRowKeys: T,
510
- flattenData: _
511
- };
512
- }
513
- function ho(t, o) {
514
- const [r, h] = we(o), [e, d] = we({}), c = xe(t), l = tt(
515
- (y) => {
516
- const { field: m, direction: N } = y;
517
- return r.find((g) => g.field === m) ? N ? r.map(
518
- (g) => g.field === m ? y : g
519
- ) : r.filter((g) => g.field !== m) : N ? !He(y.priority) || r.find((g) => !He(g.priority)) ? [y] : [...r, y] : [...r];
520
- },
521
- [r]
522
- ), s = tt((y) => {
523
- const m = y.filter((g) => "sortOrder" in g);
524
- let N = [];
525
- return m.forEach((g) => {
526
- const T = Et(g.sorter), _ = g.sortOrder, S = {
527
- field: g.dataIndex || g.key,
528
- direction: _,
529
- sorterFn: _t(g.sorter),
530
- priority: T
531
- };
532
- _ ? He(T) ? N.every((w) => He(w.priority) || !w.direction) && N.push(S) : N.every((w) => !w.direction) ? N.push(S) : N = [S] : N.push(S);
533
- }), N;
534
- }, []), C = tt(
535
- (y, m) => {
536
- s(t).length || (h(m), d(y));
537
- },
538
- [t, s, h, d]
539
- );
540
- return Tt(() => {
541
- const y = c.current, m = s(y), N = s(t), g = m.map(
542
- (_) => _.field
543
- ), T = N.filter((_) => m.find(
544
- ({ field: w, direction: p }) => _.field === w && _.direction !== p
545
- ) ? !0 : !g.includes(_.field));
546
- T && T.length && (h(N), d({})), c.current = t;
547
- }, [
548
- t,
549
- s,
550
- l,
551
- d,
552
- h
553
- ]), {
554
- currentSorter: e,
555
- activeSorters: r,
556
- getNextActiveSorters: l,
557
- updateStateSorters: C
558
- };
559
- }
560
- function mo(t, o, r) {
561
- const h = o.map((l) => l.fixed);
562
- function e(l, s) {
563
- return ne({
564
- [`${r}-col-fixed-left`]: l.fixed === "left",
565
- [`${r}-col-fixed-right`]: l.fixed === "right",
566
- [`${r}-col-fixed-left-last`]: l.fixed === "left" && (q(o[s + 1]) ? o[s + 1].fixed !== "left" : !0),
567
- [`${r}-col-fixed-right-first`]: l.fixed === "right" && (q(o[s - 1]) ? o[s - 1].fixed !== "right" : !0)
568
- });
569
- }
570
- const d = de(() => o.map(
571
- (l, s) => e(l, s)
572
- ), [h.join("-")]);
573
- return [de(
574
- () => t.map((l) => l.map((s, C) => {
575
- let y = C;
576
- const m = s.$$columnIndex;
577
- return Array.isArray(m) && m.length === 2 ? y = s.fixed === "right" ? m[0] : m[1] : typeof m == "number" && (y = m), e(s, y);
578
- })),
579
- [
580
- t.map((l) => `|${l.map((s) => s.fixed || "undefined").join("-")}|`).join("_")
581
- ]
582
- ), d];
583
- }
584
- function yo(t) {
585
- const o = t.map((e) => Rt(e.width)), r = t.map((e) => e.fixed);
586
- return de(() => t.map((e) => {
587
- let d = 0;
588
- return e.fixed === "left" && t.some((c) => {
589
- if (c.fixed === "left") {
590
- if (c.key === e.key)
591
- return !0;
592
- let l = Rt(c.width);
593
- const s = c.$$isOperation ? l || 40 : l;
594
- return d += s, !1;
595
- }
596
- return !1;
597
- }), e.fixed === "right" && [...t].reverse().some((c) => {
598
- if (c.fixed === "right") {
599
- if (c.key === e.key)
600
- return !0;
601
- let l = Rt(c.width);
602
- const s = c.$$isOperation ? l || 40 : l;
603
- return d += s, !1;
604
- }
605
- return !1;
606
- }), d;
607
- }), [o.join("-"), r.join("-")]);
608
- }
609
- function xo(t) {
610
- return t && !Pe.isValidElement(t) && q(t);
611
- }
612
- function go(t) {
613
- var le, fe, he, pe, me, z, be, Ne, re;
614
- const o = Jn(), {
615
- component: r,
616
- InnerComponentTd: h,
617
- column: e,
618
- columnIndex: d,
619
- prefixCls: c,
620
- stickyClassName: l,
621
- stickyOffset: s,
622
- currentSorter: C,
623
- virtualized: y,
624
- record: m,
625
- trIndex: N,
626
- level: g,
627
- placeholder: T = "-",
628
- indentSize: _,
629
- renderExpandIcon: S,
630
- rowKey: w,
631
- recordHaveChildren: p,
632
- haveTreeData: k
633
- } = t, { rtl: B } = We(Xe), { ComponentBodyCell: G } = Me(r), ee = xe(null), V = xe(null), K = xe(null), P = xe(null), E = ne(
634
- `${c}-td`,
635
- l,
636
- {
637
- [`${c}-col-sorted`]: C && C.direction && C.field === (e == null ? void 0 : e.dataIndex)
638
- },
639
- e == null ? void 0 : e.className
640
- );
641
- let I = {}, D, H, O = {};
642
- (e == null ? void 0 : e.fixed) === "left" && (O[B ? "right" : "left"] = s), (e == null ? void 0 : e.fixed) === "right" && (O[B ? "left" : "right"] = s), q(e == null ? void 0 : e.cellStyle) && (O = {
643
- ...O,
644
- ...e == null ? void 0 : e.cellStyle
645
- }), q(e == null ? void 0 : e.bodyCellStyle) && (O = {
646
- ...O,
647
- ...e == null ? void 0 : e.bodyCellStyle
648
- }), kt(e == null ? void 0 : e.bodyCellStyle) && (O = {
649
- ...O,
650
- ...((le = e == null ? void 0 : e.bodyCellStyle) == null ? void 0 : le.call(e, m, N)) ?? {}
651
- }), e != null && e.align && (O.textAlign = e == null ? void 0 : e.align), y && e.width && (O.width = e.width, O.minWidth = e.width, O.maxWidth = e.width);
652
- const { onHandleSave: x, ...A } = e != null && e.onCell ? (e == null ? void 0 : e.onCell(m, N, e)) ?? {} : { onHandleSave: () => {
653
- } }, $ = e == null ? void 0 : e.render;
654
- let R = de(() => $ == null ? void 0 : $(
655
- xt(m, e == null ? void 0 : e.dataIndex),
656
- te(m),
657
- N
658
- ), [m, e, N]);
659
- if (kt($) || (R = xt(m, (e == null ? void 0 : e.dataIndex) ?? "")), xo(R) && (I = R == null ? void 0 : R.props, D = I == null ? void 0 : I.rowSpan, H = I == null ? void 0 : I.colSpan, R = R == null ? void 0 : R.children), D === 0 || H === 0)
660
- return null;
661
- Ye(R) && (R = R.trim()), !R && R !== 0 && (R = (e == null ? void 0 : e.placeholder) ?? T ?? "-");
662
- const F = e != null && e.ellipsis && Ye(R) ? {
663
- // title: cellChildren // 暂时不需要title属性了,因为单独加了tooltip组件,潘启宝2023年4月1日于广东省惠州市
664
- } : {}, f = k && (e == null ? void 0 : e.$$isFirstColumn), v = f && p;
665
- let Y = f && g > 0 ? _ * g : 0;
666
- f && !p && (Y += 20);
667
- const W = `${d}-${N}-${Y}-${v}`, J = /* @__PURE__ */ a(
668
- "div",
669
- {
670
- ref: ee,
671
- className: ne(`${c}-cell`, {
672
- [`${c}-cell-text-ellipsis`]: e == null ? void 0 : e.ellipsis
673
- }),
674
- ...F,
675
- children: /* @__PURE__ */ ue(
676
- G,
677
- {
678
- ref: V,
679
- className: `${c}-cell-wrap-value`,
680
- ...Ye(G) ? {} : {
681
- rowData: te(m),
682
- column: e,
683
- onHandleSave: x,
684
- ...A
685
- },
686
- children: [
687
- !!Y && /* @__PURE__ */ a(
688
- "span",
689
- {
690
- ref: K,
691
- className: `${c}-cell-indent`,
692
- style: { paddingLeft: Y }
693
- }
694
- ),
695
- !!v && /* @__PURE__ */ a(
696
- "span",
697
- {
698
- ref: P,
699
- className: `${c}-cell-expand-icon`,
700
- children: S(m, w)
701
- }
702
- ),
703
- t.___dangerouslySetInnerHTML___ ? /* @__PURE__ */ a(
704
- "span",
705
- {
706
- dangerouslySetInnerHTML: {
707
- __html: R
708
- }
709
- }
710
- ) : R
711
- ]
712
- },
713
- W
714
- )
715
- },
716
- W
717
- );
718
- let oe = /* @__PURE__ */ a(
719
- h,
720
- {
721
- className: E,
722
- style: O,
723
- ...Un(A, [
724
- "onClick",
725
- "onDoubleClick",
726
- "onContextMenu",
727
- "onMouseOver",
728
- "onMouseEnter",
729
- "onMouseLeave",
730
- "onMouseMove",
731
- "onMouseDown",
732
- "onMouseUp"
733
- ]),
734
- ...I,
735
- children: J
736
- },
737
- (e == null ? void 0 : e.key) || (e == null ? void 0 : e.dataIndex) || d
738
- );
739
- if ((e == null ? void 0 : e.showTooltip) !== !1 && (e != null && e.ellipsis)) {
740
- const ce = (he = (fe = ee.current) == null ? void 0 : fe.getBoundingClientRect) == null ? void 0 : he.call(fe), X = (me = (pe = V.current) == null ? void 0 : pe.getBoundingClientRect) == null ? void 0 : me.call(pe), ye = (be = (z = K.current) == null ? void 0 : z.getBoundingClientRect) == null ? void 0 : be.call(z), Re = (re = (Ne = P.current) == null ? void 0 : Ne.getBoundingClientRect) == null ? void 0 : re.call(Ne), ge = (ce == null ? void 0 : ce.width) ?? 0, _e = (X == null ? void 0 : X.width) ?? 0, Ae = (ye == null ? void 0 : ye.width) ?? 0, Fe = (Re == null ? void 0 : Re.width) ?? 0;
741
- _e + (Ae ?? Y) + Fe > ge && (oe = /* @__PURE__ */ a(sn, { content: Zn(oe), children: oe }));
742
- }
743
- return nt(() => (o(), () => {
744
- }), [ee.current, V.current]), oe;
745
- }
746
- const Co = Pe.memo(go);
747
- function wo(t, o) {
748
- const {
749
- expandedRowRender: r,
750
- onClickExpandBtn: h,
751
- columns: e,
752
- component: d,
753
- onCheck: c,
754
- onCheckRadio: l,
755
- prefixCls: s,
756
- selectedRowKeys: C,
757
- indeterminateKeys: y,
758
- rowClassName: m,
759
- onRow: N,
760
- rowSelection: g,
761
- indentSize: T = 16,
762
- activeSorters: _,
763
- virtualized: S,
764
- stickyOffsets: w,
765
- stickyClassNames: p,
766
- getRowKey: k,
767
- placeholder: B,
768
- expandProps: G = { strictTreeData: !0 },
769
- data: ee,
770
- expandedRowKeys: V,
771
- childrenColumnName: K,
772
- record: P,
773
- index: E,
774
- type: I,
775
- shouldRowExpand: D,
776
- level: H
777
- } = t, { rtl: O } = We(Xe), x = te(P), { ...A } = (N == null ? void 0 : N(x, E)) || {}, $ = k(P), R = I === "radio" ? C.slice(0, 1) : C, F = $ || E, f = R.indexOf($) > -1, v = V.indexOf($) > -1, Y = y.indexOf($) > -1, W = ne(
778
- `${s}-tr`,
779
- {
780
- [`${s}-row-checked`]: f,
781
- [`${s}-row-expanded`]: v
782
- },
783
- m == null ? void 0 : m(x, E)
784
- ), J = g && typeof g.checkboxProps == "function" ? g.checkboxProps(x) : {}, oe = ne(`${s}-td`, `${s}-operation`), le = (U) => ne(oe, `${s}-${U}`, {
785
- [`${s}-selection-col`]: S && I === "checkbox" || I === "radio",
786
- [`${s}-expand-icon-col`]: S && r
787
- });
788
- function fe(U) {
789
- return G.strictTreeData ? ie(U[K]) && U[K].length : U[K] !== void 0;
790
- }
791
- function he() {
792
- return ee.find((U) => fe(U));
793
- }
794
- const pe = D(P, E), me = fe(P), z = he() && !r, be = z && me, re = G.expandRowByClick && (pe || be) ? {
795
- onClick: (U) => {
796
- var Ce;
797
- h($), (Ce = A == null ? void 0 : A.onClick) == null || Ce.call(A, U);
798
- }
799
- } : {}, { ComponentBodyRow: ce, ComponentTd: X, getBodyComponentOperations: ye } = Me(d), Re = S ? "div" : ce, ge = S ? "div" : X, _e = {
800
- className: W,
801
- key: F,
802
- ...A,
803
- ...re
804
- }, Ae = Ye(ce) ? _e : { ..._e, record: P, index: E };
805
- function Fe(U, Ce) {
806
- const { icon: Te } = G, Be = !!~V.indexOf(Ce), Ke = {
807
- onClick: (Le) => {
808
- Le.stopPropagation(), h(Ce);
809
- }
810
- };
811
- return typeof Te == "function" ? Te({ expanded: Be, record: U, ...Ke }) : /* @__PURE__ */ a("button", { ...Ke, type: "button", children: Be ? /* @__PURE__ */ a(Xn, {}) : /* @__PURE__ */ a(Qn, {}) });
812
- }
813
- const Oe = r && /* @__PURE__ */ a(ge, { className: le("expand-icon-cell"), children: pe && Fe(P, $) }), Se = g && g.renderCell;
814
- let M;
815
- const ae = /* @__PURE__ */ a(
816
- It,
817
- {
818
- value: $,
819
- onChange: (U) => c(U, P),
820
- checked: f,
821
- indeterminate: Y,
822
- ...J
823
- }
824
- ), Z = /* @__PURE__ */ a(
825
- rn,
826
- {
827
- onChange: () => l($, P),
828
- value: $,
829
- checked: f,
830
- ...J
831
- }
832
- );
833
- I === "checkbox" && (M = /* @__PURE__ */ a(ge, { className: le("checkbox"), children: Se ? Se(ae, f, x) : ae })), I === "radio" && (M = /* @__PURE__ */ a(ge, { className: le("radio"), children: Se ? Se(Z, f, x) : Z }));
834
- const se = ye({
835
- selectionNode: M,
836
- expandNode: Oe
837
- });
838
- return /* @__PURE__ */ a(Re, { ...Ae, ref: o, children: e.map((U, Ce) => {
839
- var Le, ot, De, ke;
840
- const Te = `${U.key}-${U.dataIndex}-${U.title}-${Ce}`, Be = w[Ce], Ke = p[Ce];
841
- if (U.$$isOperation) {
842
- let Ee = U.node, Qe = !0;
843
- U.title === qe && (Ee = (Le = se.find((ze) => ze.name === "selectionNode")) == null ? void 0 : Le.node, Qe = !1), U.title === Ge && (Ee = (ot = se.find((ze) => ze.name === "expandNode")) == null ? void 0 : ot.node, Qe = !1);
844
- const ve = typeof Ee == "function" ? Ee(P) : Ee;
845
- return Pe.cloneElement(ve, {
846
- key: Te || Ce,
847
- ...ve.props,
848
- className: ne(
849
- Qe ? oe : "",
850
- (De = ve == null ? void 0 : ve.props) == null ? void 0 : De.className,
851
- Ke
852
- ),
853
- style: {
854
- ...(ke = ve == null ? void 0 : ve.props) == null ? void 0 : ke.style,
855
- ...U.fixed === "left" ? {
856
- [O ? "right" : "left"]: Be
857
- } : {},
858
- width: U.width,
859
- minWidth: U.width
860
- }
861
- });
862
- }
863
- return /* @__PURE__ */ a(
864
- Co,
865
- {
866
- prefixCls: s,
867
- virtualized: S,
868
- component: d,
869
- currentSorter: _.find(
870
- (Ee) => Ee.field === (U.dataIndex || U.key)
871
- ),
872
- placeholder: B,
873
- indentSize: T,
874
- stickyClassName: Ke,
875
- stickyOffset: Be,
876
- InnerComponentTd: ge,
877
- column: U,
878
- columnIndex: Ce,
879
- record: P,
880
- trIndex: E,
881
- level: H,
882
- haveTreeData: z,
883
- recordHaveChildren: me,
884
- rowKey: $,
885
- renderExpandIcon: Fe,
886
- ___dangerouslySetInnerHTML___: t.___dangerouslySetInnerHTML___
887
- },
888
- Te
889
- );
890
- }) });
891
- }
892
- const on = Pt(wo), No = Pt(function({
893
- record: o,
894
- index: r,
895
- virtualized: h,
896
- tbodyProps: e
897
- }, d) {
898
- const {
899
- prefixCls: c,
900
- columns: l,
901
- indentSize: s = 16,
902
- childrenColumnName: C = "children",
903
- expandProps: y = {},
904
- rowSelection: m,
905
- hasFixedColumn: N,
906
- tableViewWidth: g,
907
- getRowKey: T,
908
- expandedRowKeys: _,
909
- expandedRowRender: S
910
- } = e;
911
- let w;
912
- m && "type" in m ? w = m.type : m && !("type" in m) && (w = "checkbox");
913
- const p = S && ((E, I) => S(te(E), I)), k = (E) => ie(E[C]) && E[C].length, B = (E, I) => "rowExpandable" in y && typeof y.rowExpandable == "function" ? y.rowExpandable(E) : (p == null ? void 0 : p(E, I)) !== null, G = (E, I) => {
914
- const D = [], H = {
915
- ...e,
916
- type: w,
917
- shouldRowExpand: B
918
- };
919
- D.push(
920
- /* @__PURE__ */ a(
921
- on,
922
- {
923
- ref: d,
924
- ...H,
925
- record: E,
926
- level: 0,
927
- index: I
928
- },
929
- T(E)
930
- )
931
- );
932
- const O = (x, A, $ = 0) => {
933
- ie(x) && x.length && x.forEach((R, F) => {
934
- _.indexOf(A) !== -1 && (D.push(
935
- /* @__PURE__ */ ln(
936
- on,
937
- {
938
- ...H,
939
- key: T(R),
940
- record: R,
941
- level: $ + 1,
942
- index: F
943
- }
944
- )
945
- ), k(R) && O(R[C], T(R), $ + 1));
946
- });
947
- };
948
- return p || O(E[C], T(E)), D;
949
- }, ee = T(o), V = B(o, r) && _.indexOf(ee) !== -1, K = h ? "div" : "tr", P = h ? "div" : "td";
950
- return /* @__PURE__ */ ue(Pe.Fragment, { children: [
951
- G(o, r),
952
- V && /* @__PURE__ */ a(
953
- K,
954
- {
955
- className: ne(`${c}-tr`, `${c}-expand-content`),
956
- children: /* @__PURE__ */ a(
957
- P,
958
- {
959
- className: ne(`${c}-td`),
960
- style: { paddingLeft: s },
961
- colSpan: l.length,
962
- children: N ? /* @__PURE__ */ a(
963
- "div",
964
- {
965
- className: `${c}-expand-fixed-row`,
966
- style: { width: g },
967
- children: p == null ? void 0 : p(o, r)
968
- }
969
- ) : p == null ? void 0 : p(o, r)
970
- }
971
- )
972
- },
973
- `${ee}-expanded`
974
- )
975
- ] }, ee);
976
- });
977
- function $o(t) {
978
- const {
979
- data: o,
980
- columns: r,
981
- prefixCls: h,
982
- component: e,
983
- noDataElement: d,
984
- scroll: c,
985
- tableViewWidth: l,
986
- virtualized: s,
987
- virtualListProps: C,
988
- getRowKey: y,
989
- saveVirtualListRef: m
990
- } = t, { ComponentTbody: N } = Me(e);
991
- let g = {}, T = {};
992
- c && (c.x && (typeof c.x == "number" || typeof c.x == "string") && (g = {
993
- width: c.x
994
- }), c.y && (typeof c.y == "number" || typeof c.y == "string") && (T = {
995
- maxHeight: c.y
996
- }));
997
- const _ = {
998
- className: `${h}-no-data`
999
- };
1000
- l && (_.className = `${h}-no-data ${h}-expand-fixed-row`, _.style = { width: l });
1001
- const S = /* @__PURE__ */ a("tr", { className: ne(`${h}-tr`, `${h}-empty-row`), children: /* @__PURE__ */ a("td", { className: `${h}-td`, colSpan: r.length, children: /* @__PURE__ */ a("div", { ..._, children: d }) }) }), w = (p, k) => {
1002
- const B = y(p) || k;
1003
- return /* @__PURE__ */ a(
1004
- No,
1005
- {
1006
- record: p,
1007
- index: k,
1008
- virtualized: s,
1009
- tbodyProps: t
1010
- },
1011
- B
1012
- );
1013
- };
1014
- return s ? o.length > 0 ? /* @__PURE__ */ a(
1015
- Gn,
1016
- {
1017
- data: o,
1018
- height: T.maxHeight,
1019
- isStaticItemHeight: !1,
1020
- outerStyle: { ...g, minWidth: "100%", overflow: "visible" },
1021
- innerStyle: { right: "auto", minWidth: "100%" },
1022
- className: `${h}-body`,
1023
- ref: (p) => m(p),
1024
- itemKey: y,
1025
- ...C,
1026
- children: w
1027
- }
1028
- ) : /* @__PURE__ */ a("div", { className: `${h}-body`, children: /* @__PURE__ */ a("table", { children: /* @__PURE__ */ a("tbody", { children: S }) }) }) : /* @__PURE__ */ a(N, { children: o.length > 0 ? o.map(w) : S });
1029
- }
1030
- const an = Wn({});
1031
- function bo(t) {
1032
- const { summary: o, data: r, prefixCls: h, columns: e, stickyOffsets: d, stickyClassNames: c } = t;
1033
- return /* @__PURE__ */ a("tfoot", { className: `${h}-tfoot`, children: /* @__PURE__ */ a(
1034
- an.Provider,
1035
- {
1036
- value: { columns: e, stickyOffsets: d, stickyClassNames: c, prefixCls: h },
1037
- children: o(te(r))
1038
- }
1039
- ) });
1040
- }
1041
- function So(t, o) {
1042
- return t === "ascend" ? o.Table.sortAscend : t === "descend" ? o.Table.sortDescend : o.Table.cancelSort;
1043
- }
1044
- const Ro = { bottom: 0 };
1045
- function To({
1046
- onSort: t,
1047
- onFilter: o,
1048
- onHandleFilter: r,
1049
- onHandleFilterReset: h,
1050
- currentFilters: e = {},
1051
- currentSorter: d,
1052
- _key: c,
1053
- dataIndex: l,
1054
- title: s,
1055
- sorter: C,
1056
- sortDirections: y = ["ascend", "descend"],
1057
- filters: m = [],
1058
- columnFixedStyle: N,
1059
- className: g,
1060
- cellStyle: T,
1061
- headerCellStyle: _,
1062
- rowSpan: S,
1063
- colSpan: w,
1064
- headerCellProps: p,
1065
- prefixCls: k,
1066
- align: B = "left",
1067
- component: G,
1068
- filterIcon: ee,
1069
- filterDropdown: V,
1070
- filterMultiple: K = !0,
1071
- ellipsis: P,
1072
- filterDropdownProps: E,
1073
- onFilterDropdownVisibleChange: I,
1074
- column: D,
1075
- showSorterTooltip: H,
1076
- index: O
1077
- }) {
1078
- const { locale: x, rtl: A } = We(Xe), $ = c || l || O, [R, F, f] = oo([], {
1079
- value: e[$] || []
1080
- }), [v, Y] = we(!1), [W, J] = we(!1), oe = C && ie(y) && y.length, le = oe ? fe() : void 0;
1081
- nt(() => {
1082
- F(e[$] || []);
1083
- }, [e, $]), nt(() => {
1084
- R && R !== f && F(R);
1085
- }, [v]);
1086
- function fe() {
1087
- const M = d && d.direction;
1088
- if (!M || d && d.field !== $)
1089
- return y[0];
1090
- const ae = y.indexOf(M);
1091
- if (ae < y.length)
1092
- return y[ae + 1];
1093
- }
1094
- function he() {
1095
- R && (r == null || r(
1096
- { onFilter: o, filters: m, dataIndex: $ },
1097
- f
1098
- ), me(!1));
1099
- }
1100
- function pe() {
1101
- h({ dataIndex: $ }), me(!1);
1102
- }
1103
- function me(M) {
1104
- Y(M), I == null || I(M);
1105
- }
1106
- function z(M, ae) {
1107
- let Z = [...f];
1108
- if (K)
1109
- ae ? Z = Z.concat(M) : Z.splice(
1110
- Z.findIndex((se) => se === M),
1111
- 1
1112
- );
1113
- else if (Z.length > 0)
1114
- if (Z[0] !== M)
1115
- Z = [M];
1116
- else
1117
- return;
1118
- else
1119
- Z = [M];
1120
- F(Z);
1121
- }
1122
- function be(M) {
1123
- F(M || f), Y(!1), r == null || r(
1124
- { filters: m, onFilter: o, dataIndex: $ },
1125
- M || f
1126
- );
1127
- }
1128
- function Ne() {
1129
- return typeof V == "function" ? V({
1130
- filterKeys: f,
1131
- setFilterKeys: (M, ae) => {
1132
- F(M), ae == null || ae();
1133
- },
1134
- confirm: be
1135
- }) : /* @__PURE__ */ ue("div", { className: `${k}-filters-popup`, children: [
1136
- /* @__PURE__ */ a("div", { className: `${k}-filters-list`, children: m.map((M) => {
1137
- const ae = f.findIndex((Z) => Z === M.value) !== -1;
1138
- return /* @__PURE__ */ a("div", { className: `${k}-filters-item`, children: K ? /* @__PURE__ */ a(
1139
- It,
1140
- {
1141
- checked: ae,
1142
- onChange: (Z) => z(M.value, Z),
1143
- children: M.text
1144
- }
1145
- ) : /* @__PURE__ */ a(
1146
- rn,
1147
- {
1148
- checked: ae,
1149
- onChange: (Z) => z(M.value, Z),
1150
- children: M.text
1151
- }
1152
- ) }, M.value);
1153
- }) }),
1154
- /* @__PURE__ */ ue(Ln, { className: `${k}-filters-btn`, children: [
1155
- /* @__PURE__ */ a(Zt, { onClick: pe, size: "mini", children: x.Table.resetText }),
1156
- /* @__PURE__ */ a(Zt, { onClick: he, type: "primary", size: "mini", children: x.Table.okText })
1157
- ] })
1158
- ] });
1159
- }
1160
- const re = (M) => ne(`${k}-sorter-icon`, {
1161
- [`${k}-sorter-icon-active`]: d && d.direction === M && d.field === $
1162
- }), ce = ne(`${k}-filters`, {
1163
- [`${k}-filters-open`]: v,
1164
- [`${k}-filters-active`]: R && R.length
1165
- });
1166
- let X = {
1167
- ...N
1168
- };
1169
- q(T) && (X = {
1170
- ...X,
1171
- ...T
1172
- }), q(_) && (X = {
1173
- ...X,
1174
- ..._
1175
- }), kt(_) && (X = {
1176
- ...X,
1177
- ..._()
1178
- }), B && B !== "left" && (X.textAlign = B);
1179
- const ye = {
1180
- style: X,
1181
- key: c || $
1182
- };
1183
- w && w > 1 && (ye.colSpan = w), S && S > 1 && (ye.rowSpan = S);
1184
- const { ComponentTh: Re, ComponentHeaderCell: ge } = Me(G), _e = ie(m) && m.length > 0 || typeof V == "function", Ae = P && typeof s == "string" ? { title: s } : {}, Fe = E && E.triggerProps, Oe = /* @__PURE__ */ ue(yt, { children: [
1185
- oe ? /* @__PURE__ */ a(
1186
- sn,
1187
- {
1188
- content: So(le, x),
1189
- disabled: !H,
1190
- ...q(H) ? H : {},
1191
- children: /* @__PURE__ */ ue(
1192
- "div",
1193
- {
1194
- className: `${k}-cell-with-sorter`,
1195
- onMouseEnter: () => {
1196
- J(!0);
1197
- },
1198
- onMouseLeave: () => {
1199
- J(!1);
1200
- },
1201
- onClick: () => t(le, $),
1202
- children: [
1203
- /* @__PURE__ */ a("span", { className: `${k}-th-item-title`, ...Ae, children: s }),
1204
- oe && /* @__PURE__ */ ue(
1205
- "div",
1206
- {
1207
- className: ne(`${k}-sorter`, {
1208
- [`${k}-sorter-direction-one`]: y.length === 1
1209
- }),
1210
- children: [
1211
- y.indexOf("ascend") !== -1 && /* @__PURE__ */ a("div", { className: re("ascend"), children: /* @__PURE__ */ a(to, {}) }),
1212
- y.indexOf("descend") !== -1 && /* @__PURE__ */ a("div", { className: re("descend"), children: /* @__PURE__ */ a(eo, {}) })
1213
- ]
1214
- }
1215
- )
1216
- ]
1217
- }
1218
- )
1219
- }
1220
- ) : /* @__PURE__ */ a("span", { className: `${k}-th-item-title`, ...Ae, children: s }),
1221
- _e && /* @__PURE__ */ a(
1222
- Fn,
1223
- {
1224
- popup: Ne,
1225
- trigger: "click",
1226
- classNames: "slideDynamicOrigin",
1227
- position: A ? "bl" : "br",
1228
- popupAlign: Ro,
1229
- popupVisible: v,
1230
- onVisibleChange: me,
1231
- ...Fe,
1232
- children: /* @__PURE__ */ a("div", { className: ce, children: ee || /* @__PURE__ */ a(no, {}) })
1233
- }
1234
- )
1235
- ] }), Se = ne(`${k}-th-item`, {
1236
- [`${k}-cell-text-ellipsis`]: P,
1237
- [`${k}-cell-mouseenter`]: W,
1238
- [`${k}-cell-next-${le}`]: W && le,
1239
- [`${k}-col-has-sorter`]: oe,
1240
- [`${k}-col-has-filter`]: _e
1241
- });
1242
- return w !== 0 && /* @__PURE__ */ a(
1243
- Re,
1244
- {
1245
- className: ne(
1246
- `${k}-th`,
1247
- {
1248
- [`${k}-col-sorted`]: d && d.direction && d.field === $
1249
- },
1250
- g
1251
- ),
1252
- ...ye,
1253
- ...p,
1254
- children: Ye(ge) ? /* @__PURE__ */ a(ge, { className: Se, children: Oe }) : /* @__PURE__ */ a(
1255
- ge,
1256
- {
1257
- className: Se,
1258
- column: D,
1259
- children: Oe
1260
- }
1261
- )
1262
- }
1263
- );
1264
- }
1265
- function ko(t) {
1266
- const {
1267
- activeSorters: o,
1268
- expandedRowRender: r,
1269
- expandProps: h = {},
1270
- onSort: e,
1271
- onHandleFilter: d,
1272
- onHandleFilterReset: c,
1273
- onHeaderRow: l,
1274
- prefixCls: s,
1275
- currentFilters: C,
1276
- component: y,
1277
- data: m,
1278
- selectedRowKeys: N,
1279
- rowSelection: g,
1280
- allSelectedRowKeys: T = [],
1281
- groupColumns: _,
1282
- stickyOffsets: S,
1283
- groupStickyClassNames: w,
1284
- showSorterTooltip: p
1285
- } = t, { rtl: k } = We(Xe), { ComponentThead: B, ComponentHeaderRow: G, getHeaderComponentOperations: ee } = Me(y), V = g && (g.type === "checkbox" || !("type" in g)), K = g && "checkAll" in g ? g.checkAll : !0, P = g && g.type === "radio", { columnTitle: E } = h, I = de(() => {
1286
- const O = new Set(T);
1287
- return N.filter((x) => O.has(x));
1288
- }, [N, T]), D = _.length > 1 ? { rowSpan: _.length } : {}, H = ne(`${s}-th`, `${s}-operation`);
1289
- return /* @__PURE__ */ a(B, { children: _.map((O, x) => {
1290
- const A = l == null ? void 0 : l(O, x), $ = (V || P) && x === 0 && /* @__PURE__ */ a(
1291
- "th",
1292
- {
1293
- className: ne(
1294
- H,
1295
- `${s}-${P ? "radio" : "checkbox"}`
1296
- ),
1297
- children: /* @__PURE__ */ ue("div", { className: `${s}-th-item`, children: [
1298
- K && !P ? /* @__PURE__ */ a(
1299
- It,
1300
- {
1301
- indeterminate: m && I.length > 0 && I.length !== T.length,
1302
- checked: m && I.length !== 0 && I.length === T.length,
1303
- disabled: !T.length,
1304
- onChange: t.onCheckAll
1305
- }
1306
- ) : null,
1307
- g && g.columnTitle
1308
- ] })
1309
- }
1310
- ), R = r && /* @__PURE__ */ a("th", { className: ne(H, `${s}-expand`), children: E && /* @__PURE__ */ a("div", { className: `${s}-th-item`, children: E }) }), F = w[x], f = ee({
1311
- selectionNode: $,
1312
- expandNode: R
1313
- });
1314
- return /* @__PURE__ */ ln(
1315
- G,
1316
- {
1317
- ...A,
1318
- key: x,
1319
- className: `${s}-tr`
1320
- },
1321
- O.map((v, Y) => {
1322
- var pe, me, z, be, Ne;
1323
- const W = v.$$columnIndex;
1324
- let J = 0;
1325
- Array.isArray(W) && W.length === 2 ? J = v.fixed === "right" ? S[W[1]] : S[W[0]] : typeof W == "number" && (J = S[W] || 0);
1326
- const oe = F[Y];
1327
- if (v.$$isOperation) {
1328
- let re = v.node, ce = !0;
1329
- v.title === qe && (re = (pe = f.find(
1330
- (ye) => ye.name === "selectionNode"
1331
- )) == null ? void 0 : pe.node, ce = !1), v.title === Ge && (re = (me = f.find(
1332
- (ye) => ye.name === "expandNode"
1333
- )) == null ? void 0 : me.node, ce = !1);
1334
- const X = re;
1335
- return Pe.cloneElement(X, {
1336
- key: v.key || Y,
1337
- ...X.props,
1338
- ...D,
1339
- className: ne(
1340
- ce ? H : "",
1341
- (z = X == null ? void 0 : X.props) == null ? void 0 : z.className,
1342
- oe
1343
- ),
1344
- style: {
1345
- ...(be = X == null ? void 0 : X.props) == null ? void 0 : be.style,
1346
- ...v.fixed === "left" ? {
1347
- [k ? "right" : "left"]: J
1348
- } : {},
1349
- width: v.width,
1350
- minWidth: v.width
1351
- }
1352
- });
1353
- }
1354
- const le = (Ne = v == null ? void 0 : v.onHeaderCell) == null ? void 0 : Ne.call(v, v, Y), fe = ne(oe, v.className), he = {};
1355
- return v.fixed === "left" && (he[k ? "right" : "left"] = J), v.fixed === "right" && (he[k ? "left" : "right"] = J), /* @__PURE__ */ a(
1356
- To,
1357
- {
1358
- index: Y,
1359
- onSort: e,
1360
- onHandleFilter: d,
1361
- onHandleFilterReset: c,
1362
- currentSorter: o.find(
1363
- (re) => re.field === (v.dataIndex || v.key)
1364
- ),
1365
- currentFilters: C,
1366
- _key: v.key || v.dataIndex || Y,
1367
- ...v,
1368
- column: v,
1369
- headerCellProps: le,
1370
- prefixCls: s,
1371
- component: y,
1372
- className: fe,
1373
- columnFixedStyle: he,
1374
- showSorterTooltip: p
1375
- },
1376
- v.key
1377
- );
1378
- })
1379
- );
1380
- }) });
1381
- }
1382
- const vo = [], _o = [], Eo = {
1383
- showHeader: !0,
1384
- border: !0,
1385
- hover: !0,
1386
- rowKey: "key",
1387
- pagePosition: "br",
1388
- childrenColumnName: "children",
1389
- indentSize: 15,
1390
- showSorterTooltip: !0
1391
- };
1392
- function Io(t, o) {
1393
- var Gt, Xt;
1394
- const {
1395
- getPrefixCls: r,
1396
- loadingElement: h,
1397
- size: e,
1398
- tablePagination: d,
1399
- renderEmpty: c,
1400
- componentConfig: l,
1401
- rtl: s
1402
- } = We(Xe), C = Jt(
1403
- t,
1404
- Eo,
1405
- l == null ? void 0 : l.Table
1406
- ), y = Jt(
1407
- q(t == null ? void 0 : t.pagination) ? t == null ? void 0 : t.pagination : {},
1408
- q((Gt = l == null ? void 0 : l.Table) == null ? void 0 : Gt.pagination) ? (Xt = l == null ? void 0 : l.Table) == null ? void 0 : Xt.pagination : {},
1409
- d || {}
1410
- ), {
1411
- style: m,
1412
- className: N,
1413
- component: g,
1414
- border: T,
1415
- borderCell: _,
1416
- columns: S = _o,
1417
- data: w = vo,
1418
- scroll: p,
1419
- noDataElement: k,
1420
- showHeader: B,
1421
- stripe: G,
1422
- hover: ee,
1423
- pagination: V,
1424
- onChange: K,
1425
- pagePosition: P,
1426
- childrenColumnName: E,
1427
- indentSize: I,
1428
- rowSelection: D,
1429
- tableLayoutFixed: H,
1430
- footer: O,
1431
- virtualized: x,
1432
- renderPagination: A,
1433
- summary: $,
1434
- rowKey: R
1435
- } = C, F = de(
1436
- () => co(w, E),
1437
- [w, E]
1438
- ), f = r("table"), v = C.size || (["default", "middle", "small"].indexOf(e) > -1 ? e : "default"), Y = xe(null), W = xe(null), J = xe(null), oe = xe(null), le = xe(null), fe = xe(null), he = xe(0), pe = xe(!1), [me, z] = so(C), { currentFilters: be, defaultSorters: Ne } = ot(), [re, ce] = we(1), [X, ye] = we(
1439
- y.pageSize || y.defaultPageSize || 10
1440
- ), [Re, ge] = we(be), [_e, Ae] = we(0), [Fe, Oe] = we([]), Se = yo(z), [M, ae] = mo(
1441
- me,
1442
- z,
1443
- f
1444
- ), {
1445
- currentSorter: Z,
1446
- activeSorters: se,
1447
- getNextActiveSorters: U,
1448
- updateStateSorters: Ce
1449
- } = ho(z, Ne), { ComponentTable: Te, ComponentBodyWrapper: Be, ComponentHeaderWrapper: Ke } = Me(g), Le = de(() => typeof R == "function" ? (n) => R(te(n)) : (n) => n[R], [R]);
1450
- function ot() {
1451
- const n = {};
1452
- let i = [];
1453
- return z.forEach((u) => {
1454
- const b = u.dataIndex || u.key;
1455
- if (u.defaultFilters && (n[b] = u.defaultFilters), u.filteredValue && (n[b] = u.filteredValue), "defaultSortOrder" in u || "sortOrder" in u) {
1456
- const L = Et(u.sorter), Q = "sortOrder" in u ? u.sortOrder : u.defaultSortOrder, j = {
1457
- field: b,
1458
- direction: Q,
1459
- sorterFn: _t(u.sorter),
1460
- priority: L
1461
- };
1462
- Q ? He(L) ? i.every(
1463
- ($e) => He($e.priority) || !$e.direction
1464
- ) && i.push(j) : i.every(($e) => !$e.direction) ? i.push(j) : i = [j] : i.push(j);
1465
- }
1466
- }), { currentFilters: n, defaultSorters: i };
1467
- }
1468
- const De = de(() => {
1469
- const n = z.filter(
1470
- (u) => "filteredValue" in u
1471
- ), i = {};
1472
- return n.length && n.forEach((u, b) => {
1473
- const L = u.key || u.dataIndex || b;
1474
- L !== void 0 && (i[L] = u.filteredValue);
1475
- }), i;
1476
- }, [z]), ke = de(() => Object.keys(De).length ? De : Re, [Re, De]);
1477
- function Ee(n, i) {
1478
- const u = Ht(i);
1479
- if (!u)
1480
- return;
1481
- const b = {
1482
- direction: n,
1483
- field: i,
1484
- sorterFn: _t(u.sorter),
1485
- priority: Et(u.sorter)
1486
- }, L = U(b);
1487
- Ce(b, L);
1488
- const Q = lt(
1489
- b,
1490
- L,
1491
- ke
1492
- ), j = Ze(Q);
1493
- K == null || K(Ve(Q), b, ke, {
1494
- currentData: te(j),
1495
- currentAllData: te(Q),
1496
- action: "sort"
1497
- });
1498
- }
1499
- function Qe(n) {
1500
- const i = function(b, L) {
1501
- return (Q, j) => {
1502
- const $e = b(Q, j);
1503
- return L === "descend" ? -$e : $e;
1504
- };
1505
- }, u = [...n];
1506
- return u.sort((b, L) => L.priority - b.priority), (b, L) => {
1507
- for (let Q = 0, j = u.length; Q < j; Q++) {
1508
- const { sorterFn: $e, direction: bt } = u[Q];
1509
- if (typeof $e != "function")
1510
- continue;
1511
- const pt = i($e, bt)(b, L);
1512
- if (pt !== 0)
1513
- return pt;
1514
- }
1515
- return 0;
1516
- };
1517
- }
1518
- function ve(n, i) {
1519
- const u = {
1520
- ...ke,
1521
- [n.dataIndex]: i
1522
- }, b = {
1523
- ...u,
1524
- ...De
1525
- };
1526
- if (ie(i) && i.length) {
1527
- ge(b);
1528
- const L = lt(
1529
- Z,
1530
- se,
1531
- u
1532
- ), Q = Ze(L);
1533
- K == null || K(
1534
- Ve(L),
1535
- se.length === 1 ? se[0] : se,
1536
- u,
1537
- {
1538
- currentData: te(Q),
1539
- currentAllData: te(L),
1540
- action: "filter"
1541
- }
1542
- );
1543
- } else
1544
- ie(i) && !i.length && ze(n);
1545
- }
1546
- function ze({ dataIndex: n }) {
1547
- const i = {
1548
- ...ke
1549
- };
1550
- delete i[n], ge(i);
1551
- const u = lt(
1552
- Z,
1553
- se,
1554
- i
1555
- ), b = Ze(u);
1556
- K == null || K(
1557
- Ve(u),
1558
- se.length === 1 ? se[0] : se,
1559
- i,
1560
- {
1561
- currentData: te(b),
1562
- currentAllData: te(u),
1563
- action: "filter"
1564
- }
1565
- );
1566
- }
1567
- const rt = !!z.find((n) => n.fixed === "left"), st = !!z.find((n) => n.fixed === "right"), it = rt || st;
1568
- function lt(n, i, u) {
1569
- let b = (F || []).slice();
1570
- Object.keys(u).forEach((Q) => {
1571
- if (u[Q] && u[Q].length) {
1572
- const j = Ht(Q);
1573
- j && typeof j.onFilter == "function" && (b = b.filter(($e) => u[Q].reduce(
1574
- (bt, pt) => bt || j.onFilter(pt, $e),
1575
- !1
1576
- )));
1577
- }
1578
- });
1579
- const L = (Q) => Q.slice().sort(Qe(i)).map((j) => ie(j[E]) ? {
1580
- ...j,
1581
- [E]: L(j[E])
1582
- } : j);
1583
- return n.direction && typeof n.sorterFn == "function" || i.length ? L(b) : b;
1584
- }
1585
- const Ue = lt(
1586
- Z,
1587
- se,
1588
- ke
1589
- );
1590
- function Ve(n = Ue) {
1591
- const i = y.pageSize || X || 10, u = v === "middle" ? "default" : v;
1592
- let b = "top";
1593
- P === "tl" || P === "bl" ? b = "bottom" : b = "top";
1594
- const L = ie(n) ? n.length : 0, Q = Math.ceil(L / i) < re ? 1 : re;
1595
- Q !== re && ce(Q);
1596
- let j = {
1597
- size: u,
1598
- total: L,
1599
- pageSize: i,
1600
- current: Q,
1601
- selectProps: {
1602
- triggerProps: {
1603
- position: b
1604
- }
1605
- }
1606
- };
1607
- return typeof V == "object" && V.selectProps && (j.selectProps = {
1608
- ...j.selectProps,
1609
- ...V.selectProps
1610
- }), q(V) && (j = {
1611
- ...j,
1612
- ...V
1613
- }), q(y) && (j = {
1614
- ...j,
1615
- ...y
1616
- }), j.onChange = Nn, j;
1617
- }
1618
- const ct = Ve(), Je = Ze();
1619
- function Ze(n = Ue, i = ct) {
1620
- const { current: u = 0, pageSize: b = 10 } = i;
1621
- return V === !1 || q(V) && w.length <= b ? n : n.slice((u - 1) * b, u * b);
1622
- }
1623
- const Lt = Dn(Bt, 100), Ie = !!(p && p.y), et = $ == null ? void 0 : $(te(Ue)), gt = $ && Pe.isValidElement(et) && et.props.fixed, pn = Ie && gt;
1624
- zn(() => {
1625
- Bt(), ut(window, "resize", Lt);
1626
- const n = Y.current, i = W.current, u = J.current;
1627
- i && ut(i, "scroll", je);
1628
- const b = n && n.parentNode;
1629
- return n && b && ut(b, "scroll", je), u && ut(u, "scroll", je), () => {
1630
- ht(window, "resize", Lt), i && ht(i, "scroll", je), b && ht(b, "scroll", je), u && ht(u, "scroll", je);
1631
- };
1632
- }, [
1633
- rt,
1634
- st,
1635
- p == null ? void 0 : p.x,
1636
- p == null ? void 0 : p.y,
1637
- z.length,
1638
- w
1639
- ]), Tt(() => {
1640
- const { total: n, pageSize: i } = Ve(w);
1641
- Math.ceil(n / i) < re && ce(1);
1642
- }, [w == null ? void 0 : w.length]), Tt(() => {
1643
- at();
1644
- }, [w, rt, st, s]), Mn(o, () => ({
1645
- getRootDomElement: Ot,
1646
- scrollIntoView: (n) => {
1647
- le.current && le.current.scrollTo({ key: n });
1648
- }
1649
- }));
1650
- function Ot() {
1651
- return oe.current;
1652
- }
1653
- function Bt() {
1654
- var i, u;
1655
- at();
1656
- const n = Ot();
1657
- if (n && (it || p && p.x)) {
1658
- const b = n.querySelector(`.${f}-body`) || n.querySelector(`.${f}-content-inner`), L = (u = (i = b == null ? void 0 : b.getBoundingClientRect) == null ? void 0 : i.call(b)) == null ? void 0 : u.width;
1659
- Ae(L);
1660
- }
1661
- }
1662
- const un = tt(
1663
- Hn(() => {
1664
- const n = oe.current, i = Ie ? W.current : fe.current && fe.current.parentNode;
1665
- if (i) {
1666
- const u = s ? -i.scrollLeft : i.scrollLeft, b = u === 0, L = u + 1 >= i.children[0].getBoundingClientRect().width - i.getBoundingClientRect().width;
1667
- b && L ? dt(
1668
- n.classList,
1669
- `${f}-scroll-position-both`
1670
- ) : b ? dt(
1671
- n.classList,
1672
- `${f}-scroll-position-${s ? "right" : "left"}`
1673
- ) : L ? dt(
1674
- n.classList,
1675
- `${f}-scroll-position-${s ? "left" : "right"}`
1676
- ) : dt(
1677
- n.classList,
1678
- `${f}-scroll-position-middle`
1679
- );
1680
- } else
1681
- n && Dt(n.classList);
1682
- }, 100),
1683
- [oe.current, W.current, Ie, s]
1684
- );
1685
- function at() {
1686
- if (it || p && q(p) && p.x) {
1687
- const n = oe.current;
1688
- n && (rt && Kt(
1689
- n.classList,
1690
- `${f}-has-fixed-col-left`
1691
- ), st && Kt(
1692
- n.classList,
1693
- `${f}-has-fixed-col-right`
1694
- )), un();
1695
- }
1696
- }
1697
- function Kt(n, i) {
1698
- n.contains(i) || n.add(i);
1699
- }
1700
- function Dt(n) {
1701
- n.remove(`${f}-scroll-position-both`), n.remove(`${f}-scroll-position-left`), n.remove(`${f}-scroll-position-right`), n.remove(`${f}-scroll-position-middle`);
1702
- }
1703
- function dt(n, i) {
1704
- n.contains(i) || (Dt(n), n.add(i));
1705
- }
1706
- const {
1707
- selectedRowKeys: Ct,
1708
- indeterminateKeys: hn,
1709
- onCheckAll: mn,
1710
- onCheck: yn,
1711
- onCheckRadio: xn,
1712
- setSelectedRowKeys: gn,
1713
- allSelectedRowKeys: Cn,
1714
- flattenData: wn
1715
- } = uo(C, Je, F, Le);
1716
- function Ht(n) {
1717
- return z.find((i, u) => typeof i.key < "u" ? typeof i.key == "number" && typeof n == "string" ? i.key.toString() === n : i.key === n : typeof i.dataIndex < "u" ? i.dataIndex === n : typeof n == "number" ? u === n : !1);
1718
- }
1719
- function Nn(n, i) {
1720
- var b, L;
1721
- ce(n), ye(i), n !== re && $n(), D && !D.checkCrossPage && Ct.length && (gn([]), (b = D.onChange) == null || b.call(D, [], []));
1722
- const u = { ...Ve(), current: n, pageSize: i };
1723
- K == null || K(
1724
- u,
1725
- se.length === 1 ? se[0] : se,
1726
- ke,
1727
- {
1728
- currentData: te(
1729
- Ze(Ue, u)
1730
- ),
1731
- currentAllData: te(Ue),
1732
- action: "paginate"
1733
- }
1734
- ), (L = y.onChange) == null || L.call(y, n, i);
1735
- }
1736
- function $n() {
1737
- if (!W.current)
1738
- return;
1739
- const i = W.current.scrollTop;
1740
- new Bn({
1741
- from: { scrollTop: i },
1742
- to: { scrollTop: 0 },
1743
- easing: Kn,
1744
- duration: 300,
1745
- onUpdate: (b) => {
1746
- W.current && (W.current.scrollTop = b.scrollTop);
1747
- }
1748
- }).start();
1749
- }
1750
- function je(n) {
1751
- const { target: i } = n, u = W.current, b = Y.current && Y.current.parentNode, L = J.current;
1752
- i.scrollLeft !== he.current && (b && (b.scrollLeft = i.scrollLeft), u && (u.scrollLeft = i.scrollLeft), L && (L.scrollLeft = i.scrollLeft), at()), he.current = n.target.scrollLeft;
1753
- }
1754
- function bn(n) {
1755
- const { target: i } = n, u = fe.current;
1756
- i.scrollLeft !== he.current && (u.scrollLeft = i.scrollLeft, at()), he.current = n.target.scrollLeft;
1757
- }
1758
- const [Wt, Sn] = po(
1759
- C,
1760
- wn,
1761
- Le
1762
- );
1763
- let Mt = {}, wt = {};
1764
- p && (p.x && (typeof p.x == "number" || typeof p.x == "string") && (wt = {
1765
- width: p.x
1766
- }), p.y && (typeof p.y == "number" || typeof p.y == "string") && (Mt = {
1767
- maxHeight: p.y
1768
- }));
1769
- function Rn() {
1770
- const n = Y.current && Y.current.parentNode, i = io(n);
1771
- i && i > 0 && (n.style.marginBottom = `-${i}px`, n.style.paddingBottom = "0px", J.current && (J.current.style.marginBottom = `-${i}px`, J.current.style.paddingBottom = "0px")), setTimeout(() => {
1772
- const u = W.current;
1773
- lo(u) ? (pe.current = !0, n && (n.style.overflowY = "scroll"), J.current && (J.current.style.overflowY = "scroll")) : n && pe.current && (pe.current = !1, n.style.overflowY = "auto", J.current && (J.current.style.overflowY = "auto"));
1774
- });
1775
- }
1776
- const zt = /* @__PURE__ */ a(
1777
- ko,
1778
- {
1779
- ...C,
1780
- activeSorters: se,
1781
- currentSorter: Z,
1782
- selectedRowKeys: Ct,
1783
- currentFilters: ke,
1784
- onCheckAll: mn,
1785
- onSort: Ee,
1786
- data: Je,
1787
- onHandleFilter: ve,
1788
- onHandleFilterReset: ze,
1789
- prefixCls: f,
1790
- allSelectedRowKeys: Cn,
1791
- groupColumns: me,
1792
- stickyOffsets: Se,
1793
- groupStickyClassNames: M
1794
- }
1795
- );
1796
- function Tn() {
1797
- const n = q(p) && p.x === "max-content";
1798
- return Ie || x ? /* @__PURE__ */ a(Ke, { className: `${f}-header`, children: /* @__PURE__ */ ue(
1799
- Te,
1800
- {
1801
- ref: Y,
1802
- style: n ? {} : wt,
1803
- children: [
1804
- /* @__PURE__ */ a(
1805
- mt,
1806
- {
1807
- columns: z,
1808
- prefixCls: f,
1809
- producer: !1,
1810
- columnWidths: n && p.y ? Fe : null
1811
- }
1812
- ),
1813
- zt
1814
- ]
1815
- }
1816
- ) }) : zt;
1817
- }
1818
- const Ut = et && /* @__PURE__ */ a(
1819
- bo,
1820
- {
1821
- prefixCls: f,
1822
- summary: $,
1823
- data: Je,
1824
- columns: z,
1825
- stickyOffsets: Se,
1826
- stickyClassNames: ae
1827
- }
1828
- ), Vt = /* @__PURE__ */ a(
1829
- $o,
1830
- {
1831
- ...C,
1832
- selectedRowKeys: Ct,
1833
- indeterminateKeys: hn,
1834
- expandedRowKeys: Wt,
1835
- onCheck: yn,
1836
- onCheckRadio: xn,
1837
- onClickExpandBtn: Sn,
1838
- columns: z,
1839
- data: Je,
1840
- prefixCls: f,
1841
- hasFixedColumn: it,
1842
- tableViewWidth: _e,
1843
- indentSize: I,
1844
- noDataElement: k || c("Table"),
1845
- activeSorters: se,
1846
- currentSorter: Z,
1847
- stickyOffsets: Se,
1848
- stickyClassNames: ae,
1849
- getRowKey: Le,
1850
- saveVirtualListRef: (n) => {
1851
- x && (le.current = n, W.current = n == null ? void 0 : n.dom);
1852
- },
1853
- ___dangerouslySetInnerHTML___: C.___dangerouslySetInnerHTML___
1854
- }
1855
- ), jt = !x && !pn ? /* @__PURE__ */ ue(yt, { children: [
1856
- Vt,
1857
- Ut
1858
- ] }) : Vt;
1859
- nt(() => {
1860
- let n;
1861
- return W.current && (n = new ResizeObserver(Rn), n.observe(W.current)), () => {
1862
- var i, u;
1863
- W.current && ((i = n == null ? void 0 : n.unobserve) == null || i.call(n, W.current)), (u = n == null ? void 0 : n.disconnect) == null || u.call(n), n = null;
1864
- };
1865
- }, [W.current]);
1866
- function kn() {
1867
- const n = q(p) && p.x === "max-content" && !!p.y && ie(w) && w.length > 0;
1868
- return Ie && !x ? /* @__PURE__ */ a(
1869
- Be,
1870
- {
1871
- ref: W,
1872
- className: `${f}-body`,
1873
- style: Mt,
1874
- children: /* @__PURE__ */ ue(Te, { style: wt, children: [
1875
- /* @__PURE__ */ a(
1876
- mt,
1877
- {
1878
- columns: z,
1879
- prefixCls: f,
1880
- producer: n,
1881
- onSetColumnWidths: Oe,
1882
- expandedRowKeys: Wt,
1883
- data: w
1884
- }
1885
- ),
1886
- jt
1887
- ] })
1888
- }
1889
- ) : jt;
1890
- }
1891
- function vn() {
1892
- let n = {};
1893
- p && q(p) && p.x && (n = {
1894
- width: p.x
1895
- });
1896
- const i = /* @__PURE__ */ a("div", { className: `${f}-tfoot`, ref: J, children: /* @__PURE__ */ ue(Te, { style: n, children: [
1897
- /* @__PURE__ */ a(mt, { columns: z, prefixCls: f }),
1898
- Ut
1899
- ] }) }), u = et && Ie && gt === "top", b = et && Ie && gt === "bottom", L = /* @__PURE__ */ ue(yt, { children: [
1900
- B ? Tn() : null,
1901
- u && i,
1902
- kn(),
1903
- b && i
1904
- ] });
1905
- return /* @__PURE__ */ ue(yt, { children: [
1906
- /* @__PURE__ */ a("div", { className: `${f}-container`, children: /* @__PURE__ */ a("div", { className: `${f}-content-scroll`, children: /* @__PURE__ */ a(
1907
- "div",
1908
- {
1909
- className: `${f}-content-inner`,
1910
- onScroll: Ie ? void 0 : bn,
1911
- children: Ie || x ? L : /* @__PURE__ */ ue(Te, { ref: fe, style: n, children: [
1912
- /* @__PURE__ */ a(mt, { prefixCls: f, columns: z }),
1913
- L
1914
- ] })
1915
- }
1916
- ) }) }),
1917
- typeof O == "function" && /* @__PURE__ */ a("div", { className: `${f}-footer`, children: O(Je) })
1918
- ] });
1919
- }
1920
- if (!S.length)
1921
- return null;
1922
- const _n = q(T) ? T.wrapper : T, Nt = q(T) ? T.cell : _, En = q(T) ? T.cell || T.headerCell : _, In = q(T) ? T.cell || T.bodyCell : _, Pn = ne(
1923
- f,
1924
- `${f}-size-${v}`,
1925
- {
1926
- [`${f}-border`]: _n,
1927
- [`${f}-border-cell`]: Nt,
1928
- [`${f}-border-header-cell`]: !Nt && En,
1929
- [`${f}-border-body-cell`]: !Nt && In,
1930
- [`${f}-stripe`]: G,
1931
- [`${f}-hover`]: ee,
1932
- [`${f}-type-radio`]: D && D.type === "radio",
1933
- [`${f}-layout-fixed`]: H || p && (p.x || p.y) || S.find((n) => n.ellipsis),
1934
- [`${f}-fixed-column`]: it,
1935
- [`${f}-virtualized`]: x,
1936
- [`${f}-rtl`]: s
1937
- },
1938
- N
1939
- ), $t = P === "tl" || P === "tr" || P === "topCenter", An = ne(`${f}-pagination`, {
1940
- [`${f}-pagination-left`]: P === "tl" || P === "bl",
1941
- [`${f}-pagination-center`]: P === "topCenter" || P === "bottomCenter",
1942
- [`${f}-pagination-top`]: $t
1943
- });
1944
- let ft = C.loading;
1945
- typeof ft == "boolean" && (ft = { loading: ft });
1946
- const Yt = typeof A == "function" ? A(/* @__PURE__ */ a(Qt, { ...ct })) : /* @__PURE__ */ a("div", { className: An, children: /* @__PURE__ */ a(Qt, { ...ct }) }), qt = V !== !1 && (Ue.length !== 0 || ct.total > 0);
1947
- return /* @__PURE__ */ a(
1948
- "div",
1949
- {
1950
- ref: oe,
1951
- style: m,
1952
- className: Pn,
1953
- ...Vn(C),
1954
- children: /* @__PURE__ */ ue(
1955
- On,
1956
- {
1957
- className: `${f}-spin`,
1958
- element: h,
1959
- ...ft,
1960
- children: [
1961
- qt && $t && Yt,
1962
- vn(),
1963
- qt && !$t && Yt
1964
- ]
1965
- }
1966
- )
1967
- }
1968
- );
1969
- }
1970
- const dn = Pt(Io);
1971
- dn.displayName = "Table";
1972
- function fn(t) {
1973
- const { children: o, ...r } = t;
1974
- return /* @__PURE__ */ a("td", { ...ro(r, ["$$PqbTableSummaryCell"]), children: o });
1975
- }
1976
- fn.__PQB_TABLE_SUMMARY_CELL__ = !0;
1977
- function Po(t) {
1978
- const { rtl: o } = We(Xe), { columns: r, stickyOffsets: h, stickyClassNames: e, prefixCls: d } = We(an), { children: c, ...l } = t, s = Pe.Children.map(
1979
- c,
1980
- (y) => y.props.colSpan || 1
1981
- ), C = Pe.Children.map(c, (y, m) => {
1982
- var B, G;
1983
- const N = y, g = xt(N, "type.__PQB_TABLE_SUMMARY_CELL__") || xt(N, "props.$$PqbTableSummaryCell"), T = (B = N == null ? void 0 : N.props) == null ? void 0 : B.style, _ = (G = N == null ? void 0 : N.props) == null ? void 0 : G.className, w = s.slice(0, m).reduce((ee, V) => ee + V, 0), p = r[w].fixed === "left" ? { [o ? "right" : "left"]: h[w] } : r[w].fixed === "right" ? { [o ? "left" : "right"]: h[w] } : {}, k = r[w].fixed === "left" || r[w].fixed === "right" ? e[w] : "";
1984
- return g ? Pe.cloneElement(N, {
1985
- ...N.props,
1986
- className: ne(`${d}-td`, k, _),
1987
- style: { ...T, ...p }
1988
- }) : y;
1989
- });
1990
- return /* @__PURE__ */ a("tr", { ...l, children: C });
1991
- }
1992
- function Ft(t) {
1993
- return t.children;
1994
- }
1995
- Ft.Row = Po;
1996
- Ft.Cell = fn;
1997
- const Ao = dn;
1998
- Ao.Summary = Ft;
1
+ /* empty css */
2
+ /* empty css */
3
+ /* empty css */
4
+ /* empty css */
5
+ /* empty css */
6
+ /* empty css */
7
+ /* empty css */
8
+ /* empty css */
9
+ /* empty css */
10
+ /* empty css */
11
+ /* empty css */
12
+ /* empty css */
13
+ /* empty css */
14
+ /* empty css */
15
+ /* empty css */
16
+ import m from "./table/Table.js";
17
+ import o from "./table/summary/index.js";
18
+ const r = m;
19
+ r.Summary = o;
1999
20
  export {
2000
- Ao as default
21
+ r as default
2001
22
  };