tntd 2.8.36 → 2.8.39

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 (563) hide show
  1. package/es/_util/context.js +1 -1
  2. package/es/_util/defaultRenderEmpty.js +1 -1
  3. package/es/_util/hooks/useFlexGapSupport.js +4 -4
  4. package/es/_util/hooks/useForceUpdate.js +4 -4
  5. package/es/_util/hooks/useScrollLock.js +64 -0
  6. package/es/_util/hooks/useScrollLock.js.map +1 -0
  7. package/es/_util/responsiveObserve.js +1 -1
  8. package/es/_util/styleChecker.js +1 -1
  9. package/es/actions/index.js +1 -1
  10. package/es/alert/alert.js +93 -0
  11. package/es/alert/alert.js.map +1 -0
  12. package/es/anchor/anchor.js +96 -0
  13. package/es/anchor/anchor.js.map +1 -0
  14. package/es/array-input/icon.js +32 -0
  15. package/es/array-input/icon.js.map +1 -0
  16. package/es/array-input/index.js +9 -9
  17. package/es/cascader/cascader.js +49 -0
  18. package/es/cascader/cascader.js.map +1 -0
  19. package/es/check-card/group.js +8 -8
  20. package/es/check-card/index.js +6 -6
  21. package/es/checkbox/checkbox-group.js +1 -1
  22. package/es/checkbox/checkbox.js +65 -0
  23. package/es/checkbox/checkbox.js.map +1 -0
  24. package/es/color-picker/ColorPicker.js +6 -6
  25. package/es/color-picker/index.js +1 -1
  26. package/es/columns/index.js +1 -1
  27. package/es/config-provider/config-provider.js +1 -1
  28. package/es/date-picker/DatePicker.js +128 -0
  29. package/es/date-picker/DatePicker.js.map +1 -0
  30. package/es/descriptions/descriptions.js +5 -5
  31. package/es/development-login/LoginModal.js +6 -6
  32. package/es/development-login/index.js +4 -4
  33. package/es/drawer/drawer.js +2 -2
  34. package/es/ellipsis/Svg/CopySVG.js +1 -1
  35. package/es/ellipsis/Svg/TickSVG.js +1 -1
  36. package/es/ellipsis/index.js +16 -6
  37. package/es/ellipsis/index.js.map +1 -1
  38. package/es/empty/empty.js +2 -2
  39. package/es/empty/empty.stories.js +2 -2
  40. package/es/exception/exception.js +1 -1
  41. package/es/form/form.js +2 -2
  42. package/es/grid-v4/col.js +2 -2
  43. package/es/grid-v4/hooks/useBreakpoint.js +1 -1
  44. package/es/grid-v4/index.js +1 -1
  45. package/es/grid-v4/row.js +6 -6
  46. package/es/handle/index.js +1 -1
  47. package/es/handle-icon/index.js +11 -11
  48. package/es/icon/IconFont.js +1 -1
  49. package/es/icon/components/Icon.js +9 -9
  50. package/es/icon/components/index.js +1 -1
  51. package/es/icon/components/utils.js +3 -3
  52. package/es/icon/index.js +7 -7
  53. package/es/icon/twoTonePrimaryColor.js +1 -1
  54. package/es/icon/utils.js +1 -1
  55. package/es/img/Contain.js +1 -1
  56. package/es/img/Cover.js +5 -5
  57. package/es/img/index.js +5 -5
  58. package/es/index.js +1 -1
  59. package/es/input/input.js +2 -2
  60. package/es/input-number/index.js +1 -1
  61. package/es/input-number/inputNumber.js +54 -0
  62. package/es/input-number/inputNumber.js.map +1 -0
  63. package/es/label/index.js +2 -2
  64. package/es/loading-button/index.js +5 -5
  65. package/es/locale/default.js +1 -1
  66. package/es/locale/en_US.js +1 -1
  67. package/es/locale/zh_CN.js +1 -1
  68. package/es/modal/modal.js +1 -1
  69. package/es/notification/assets/index.js +1 -1
  70. package/es/notification/index.js +1 -1
  71. package/es/notification/notification.js +1 -1
  72. package/es/page/Box.js +1 -1
  73. package/es/page/index.js +7 -7
  74. package/es/page-container/index.js +1 -1
  75. package/es/page-loading/index.js +1 -1
  76. package/es/page-loading/index.less +4 -4
  77. package/es/page-loading/loading.gif +0 -0
  78. package/es/page-loading/loading1.gif +0 -0
  79. package/es/popconfirm/popconfirm.js +61 -0
  80. package/es/popconfirm/popconfirm.js.map +1 -0
  81. package/es/popover/popover.js +55 -0
  82. package/es/popover/popover.js.map +1 -0
  83. package/es/preview-text/index.js +7 -7
  84. package/es/progress/progress.js +148 -0
  85. package/es/progress/progress.js.map +1 -0
  86. package/es/query-form/Field/Checkbox.js +1 -1
  87. package/es/query-form/Field/Composition/FieldPopover.js +464 -0
  88. package/es/query-form/Field/Composition/FieldPopover.js.map +1 -0
  89. package/es/query-form/Field/Composition/FieldPopover.less +35 -0
  90. package/es/query-form/Field/Composition/Select.js +260 -0
  91. package/es/query-form/Field/Composition/Select.js.map +1 -0
  92. package/es/query-form/Field/Composition/SelectInput.js +112 -0
  93. package/es/query-form/Field/Composition/SelectInput.js.map +1 -0
  94. package/es/query-form/Field/Composition/ValueTag.js +240 -0
  95. package/es/query-form/Field/Composition/ValueTag.js.map +1 -0
  96. package/es/query-form/Field/Composition/index.js +448 -0
  97. package/es/query-form/Field/Composition/index.js.map +1 -0
  98. package/es/query-form/Field/Composition/index.less +145 -0
  99. package/es/query-form/Field/Composition/utils.js +173 -0
  100. package/es/query-form/Field/Composition/utils.js.map +1 -0
  101. package/es/query-form/Field/Select.js +6 -6
  102. package/es/query-form/Field/SelectInput.js +6 -6
  103. package/es/query-form/Field/fieldsMap.js +1 -1
  104. package/es/query-form/Field/index.js +10 -10
  105. package/es/query-form/createActions.js +1 -1
  106. package/es/query-form/index.js +10 -10
  107. package/es/query-form/useForm.js +1 -1
  108. package/es/query-form-v2/index.less +133 -0
  109. package/es/query-list-scene/List.js +13 -13
  110. package/es/query-list-scene/QueryForm.js +10 -10
  111. package/es/query-list-scene/QueryListScene.js +10 -10
  112. package/es/query-list-scene/Title.js +1 -1
  113. package/es/query-list-scene/Toolbar.js +2 -2
  114. package/es/query-list-scene/createActions.js +1 -1
  115. package/es/query-list-scene/index.js +1 -1
  116. package/es/query-list-scene/useActions.js +1 -1
  117. package/es/radio/index.js +1 -1
  118. package/es/radio/radio-group.js +1 -1
  119. package/es/radio/radio.js +75 -0
  120. package/es/radio/radio.js.map +1 -0
  121. package/es/render-empty/render-empty.js +1 -1
  122. package/es/scroll-bar/Bar.js +169 -0
  123. package/es/scroll-bar/Bar.js.map +1 -0
  124. package/es/scroll-bar/Context.js +17 -0
  125. package/es/scroll-bar/Context.js.map +1 -0
  126. package/es/scroll-bar/ScrollBar.js +132 -0
  127. package/es/scroll-bar/ScrollBar.js.map +1 -0
  128. package/es/scroll-bar/Thumb.js +203 -0
  129. package/es/scroll-bar/Thumb.js.map +1 -0
  130. package/es/scroll-bar/index.js +14 -0
  131. package/es/scroll-bar/index.js.map +1 -0
  132. package/es/scroll-bar/scrollBar.less +59 -0
  133. package/es/scroll-bar/util.js +72 -0
  134. package/es/scroll-bar/util.js.map +1 -0
  135. package/es/segmented/index.js +2 -2
  136. package/es/select/select.js +2 -2
  137. package/es/spin/spin.js +44 -0
  138. package/es/spin/spin.js.map +1 -0
  139. package/es/steps/steps.js +2 -2
  140. package/es/svg-components/index.js +1 -1
  141. package/es/switch/switch.js +1 -1
  142. package/es/table/hooks/use-column-setting.js +4 -4
  143. package/es/table/hooks/use-expand-fixed.js +6 -6
  144. package/es/table/resizableTable/index.js +40 -11
  145. package/es/table/resizableTable/index.js.map +1 -1
  146. package/es/table/resizableTable/index.less +9 -1
  147. package/es/table/table-hoc.js +1 -1
  148. package/es/table/table.js +9 -9
  149. package/es/table/table.stories.js +2 -2
  150. package/es/table/total-shower.js +1 -1
  151. package/es/table/utils.js +1 -1
  152. package/es/table-container/index.js +1 -1
  153. package/es/tabs-container/index.js +1 -1
  154. package/es/tag/tag.js +2 -2
  155. package/es/time-picker/TimePicker.js +55 -0
  156. package/es/time-picker/TimePicker.js.map +1 -0
  157. package/es/title/index.js +1 -1
  158. package/es/tntd-action/Action.js +141 -0
  159. package/es/tntd-action/Action.js.map +1 -0
  160. package/es/tntd-cascader/AntdCascader/component/context.js +1 -1
  161. package/es/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +1 -1
  162. package/es/tntd-cascader/AntdCascader/component/getIcons.js +1 -1
  163. package/es/tntd-cascader/AntdCascader/component/useCompactItemContext.js +2 -2
  164. package/es/tntd-cascader/AntdCascader/config/utils.js +2 -2
  165. package/es/tntd-cascader/AntdCascader/index.js +7 -7
  166. package/es/tntd-cascader/index.js +1 -1
  167. package/es/tntd-cascader/rc-cascader/Cascader.js +8 -8
  168. package/es/tntd-cascader/rc-cascader/OptionList/Checkbox.js +2 -2
  169. package/es/tntd-cascader/rc-cascader/OptionList/Column.js +7 -7
  170. package/es/tntd-cascader/rc-cascader/OptionList/index.js +9 -9
  171. package/es/tntd-cascader/rc-cascader/OptionList/useActive.js +5 -5
  172. package/es/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +8 -8
  173. package/es/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +5 -5
  174. package/es/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +1 -1
  175. package/es/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +6 -6
  176. package/es/tntd-cascader/rc-cascader/index.js +1 -1
  177. package/es/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +4 -4
  178. package/es/tntd-form/ErrorList.js +7 -7
  179. package/es/tntd-form/Form.js +6 -6
  180. package/es/tntd-form/FormItem/ItemHolder.js +6 -6
  181. package/es/tntd-form/FormItem/index.js +8 -8
  182. package/es/tntd-form/FormItemInput.js +1 -1
  183. package/es/tntd-form/FormItemLabel.js +2 -2
  184. package/es/tntd-form/FormList.js +1 -1
  185. package/es/tntd-form/context.js +1 -1
  186. package/es/tntd-form/hooks/useDebounce.js +4 -4
  187. package/es/tntd-form/hooks/useForm.js +5 -5
  188. package/es/tntd-form/hooks/useFormItemStatus.js +1 -1
  189. package/es/tntd-form/hooks/useFrameState.js +5 -5
  190. package/es/tntd-form/index.js +1 -1
  191. package/es/tntd-icon/index.js +1 -1
  192. package/es/tntd-layout/AppList.js +6 -6
  193. package/es/tntd-layout/Application.js +6 -6
  194. package/es/tntd-layout/Avatar.js +2 -2
  195. package/es/tntd-layout/CompatibleLanguage.js +6 -6
  196. package/es/tntd-layout/EnterpriseLayout/Avatar.js +2 -2
  197. package/es/tntd-layout/EnterpriseLayout/Language.js +6 -6
  198. package/es/tntd-layout/EnterpriseLayout/Theme.js +6 -6
  199. package/es/tntd-layout/EnterpriseLayout/index.js +1 -1
  200. package/es/tntd-layout/GlobalNavigation/NavigationPopup.js +6 -6
  201. package/es/tntd-layout/GlobalNavigation/index.js +9 -9
  202. package/es/tntd-layout/Header.js +2 -2
  203. package/es/tntd-layout/HeaderActions.js +2 -2
  204. package/es/tntd-layout/HeaderNavs.js +6 -6
  205. package/es/tntd-layout/HeaderTabs.js +7 -7
  206. package/es/tntd-layout/Iconfont.js +1 -1
  207. package/es/tntd-layout/Language.js +6 -6
  208. package/es/tntd-layout/Layout.js +6 -6
  209. package/es/tntd-layout/Logo.js +2 -2
  210. package/es/tntd-layout/OrgAppList.js +6 -6
  211. package/es/tntd-layout/SideMenu.js +6 -6
  212. package/es/tntd-layout/Theme.js +6 -6
  213. package/es/tntd-layout/createActions.js +1 -1
  214. package/es/tntd-layout/images/index.js +1 -1
  215. package/es/tntd-layout/index.js +1 -1
  216. package/es/tntd-layout/paaslayout/CompactSideMenu.js +6 -6
  217. package/es/tntd-layout/paaslayout/Header.js +2 -2
  218. package/es/tntd-layout/paaslayout/Logo.js +2 -2
  219. package/es/tntd-layout/paaslayout/SideMenu.js +6 -6
  220. package/es/tntd-layout/paaslayout/index.js +6 -6
  221. package/es/tntd-layout/storage.js +1 -1
  222. package/es/tntd-modal/index.js +6 -6
  223. package/es/tntd-rc-select/_util/PurePanel.js +5 -5
  224. package/es/tntd-rc-select/_util/context.js +1 -1
  225. package/es/tntd-rc-select/_util/defaultRenderEmpty.js +1 -1
  226. package/es/tntd-rc-select/_util/getIcons.js +1 -1
  227. package/es/tntd-rc-select/_util/useCompactItemContext.js +2 -2
  228. package/es/tntd-rc-select/index.js +2 -2
  229. package/es/tntd-rc-select/style/index.less +23 -2
  230. package/es/tntd-reference/AHref/index.js +1 -1
  231. package/es/tntd-reference/ReferenceBatchCheck/index.js +1 -1
  232. package/es/tntd-reference/ReferenceBatchDrawer/index.js +5 -5
  233. package/es/tntd-reference/ReferenceCheck/index.js +1 -1
  234. package/es/tntd-reference/ReferenceDrawer/index.js +5 -5
  235. package/es/tntd-reference/ReferenceInfo/index.js +1 -1
  236. package/es/tntd-reference/index.js +1 -1
  237. package/es/tntd-second-page/index.js +1 -1
  238. package/es/tntd-select/DropDownWrap.js +8 -8
  239. package/es/tntd-select/index.js +10 -9
  240. package/es/tntd-virtual-tree/index.js +8 -8
  241. package/es/tntd-virtual-tree/utils.js +28 -28
  242. package/es/tntd-virtual-tree-select/index.js +10 -10
  243. package/es/tntd-virtual-tree-select/utils.js +9 -9
  244. package/es/tooltip/tooltip.js +19 -5
  245. package/es/tooltip/tooltip.js.map +1 -1
  246. package/es/upload/index.js +6 -6
  247. package/es/upload/svg/UploadSVG.js +1 -1
  248. package/es/utils/checkAuth.js +4 -4
  249. package/es/utils/index.js +9 -9
  250. package/es/utils/lang.js +1 -1
  251. package/es/water-mark/index.js +5 -5
  252. package/lib/_util/context.js +3 -3
  253. package/lib/_util/defaultRenderEmpty.js +3 -3
  254. package/lib/_util/hooks/useFlexGapSupport.js +14 -15
  255. package/lib/_util/hooks/useForceUpdate.js +14 -15
  256. package/lib/_util/hooks/useScrollLock.d.ts +9 -0
  257. package/lib/_util/hooks/useScrollLock.d.ts.map +1 -0
  258. package/lib/_util/hooks/useScrollLock.js +106 -0
  259. package/lib/_util/hooks/useScrollLock.js.map +1 -0
  260. package/lib/_util/responsiveObserve.js +7 -13
  261. package/lib/_util/styleChecker.js +3 -3
  262. package/lib/actions/index.js +3 -3
  263. package/lib/alert/alert.d.ts +12 -0
  264. package/lib/alert/alert.d.ts.map +1 -0
  265. package/lib/alert/alert.js +147 -0
  266. package/lib/alert/alert.js.map +1 -0
  267. package/lib/anchor/anchor.d.ts +15 -0
  268. package/lib/anchor/anchor.d.ts.map +1 -0
  269. package/lib/anchor/anchor.js +131 -0
  270. package/lib/anchor/anchor.js.map +1 -0
  271. package/lib/array-input/icon.d.ts +4 -0
  272. package/lib/array-input/icon.d.ts.map +1 -0
  273. package/lib/array-input/icon.js +36 -0
  274. package/lib/array-input/icon.js.map +1 -0
  275. package/lib/array-input/index.js +30 -37
  276. package/lib/cascader/cascader.d.ts +10 -0
  277. package/lib/cascader/cascader.d.ts.map +1 -0
  278. package/lib/cascader/cascader.js +84 -0
  279. package/lib/cascader/cascader.js.map +1 -0
  280. package/lib/check-card/group.js +23 -24
  281. package/lib/check-card/index.js +24 -31
  282. package/lib/checkbox/checkbox-group.js +3 -3
  283. package/lib/checkbox/checkbox.d.ts +16 -0
  284. package/lib/checkbox/checkbox.d.ts.map +1 -0
  285. package/lib/checkbox/checkbox.js +100 -0
  286. package/lib/checkbox/checkbox.js.map +1 -0
  287. package/lib/color-picker/ColorPicker.js +24 -31
  288. package/lib/color-picker/index.js +3 -3
  289. package/lib/columns/index.js +3 -3
  290. package/lib/config-provider/config-provider.js +3 -3
  291. package/lib/date-picker/DatePicker.d.ts +21 -0
  292. package/lib/date-picker/DatePicker.d.ts.map +1 -0
  293. package/lib/date-picker/DatePicker.js +163 -0
  294. package/lib/date-picker/DatePicker.js.map +1 -0
  295. package/lib/descriptions/descriptions.js +13 -19
  296. package/lib/development-login/LoginModal.js +24 -31
  297. package/lib/development-login/index.js +14 -15
  298. package/lib/drawer/drawer.js +10 -16
  299. package/lib/ellipsis/Svg/CopySVG.js +3 -3
  300. package/lib/ellipsis/Svg/TickSVG.js +3 -3
  301. package/lib/ellipsis/index.d.ts.map +1 -1
  302. package/lib/ellipsis/index.js +28 -19
  303. package/lib/ellipsis/index.js.map +1 -1
  304. package/lib/empty/empty.js +10 -16
  305. package/lib/empty/empty.stories.js +6 -9
  306. package/lib/exception/exception.js +3 -3
  307. package/lib/form/form.js +10 -16
  308. package/lib/grid-v4/col.js +10 -16
  309. package/lib/grid-v4/hooks/useBreakpoint.js +3 -3
  310. package/lib/grid-v4/index.js +3 -3
  311. package/lib/grid-v4/row.js +24 -31
  312. package/lib/handle/index.js +3 -3
  313. package/lib/handle-icon/index.js +13 -13
  314. package/lib/icon/IconFont.js +3 -3
  315. package/lib/icon/components/Icon.js +44 -70
  316. package/lib/icon/components/index.js +3 -3
  317. package/lib/icon/components/utils.js +10 -18
  318. package/lib/icon/index.js +26 -33
  319. package/lib/icon/twoTonePrimaryColor.js +3 -3
  320. package/lib/icon/utils.js +3 -3
  321. package/lib/img/Contain.js +3 -3
  322. package/lib/img/Cover.js +17 -18
  323. package/lib/img/index.js +17 -18
  324. package/lib/index.js +3 -3
  325. package/lib/input/input.js +10 -16
  326. package/lib/input-number/index.js +3 -3
  327. package/lib/input-number/inputNumber.d.ts +10 -0
  328. package/lib/input-number/inputNumber.d.ts.map +1 -0
  329. package/lib/input-number/inputNumber.js +89 -0
  330. package/lib/input-number/inputNumber.js.map +1 -0
  331. package/lib/label/index.js +10 -16
  332. package/lib/loading-button/index.js +17 -18
  333. package/lib/locale/default.js +3 -3
  334. package/lib/locale/en_US.js +3 -3
  335. package/lib/locale/zh_CN.js +3 -3
  336. package/lib/modal/modal.js +3 -3
  337. package/lib/notification/assets/index.js +3 -3
  338. package/lib/notification/index.js +3 -3
  339. package/lib/notification/notification.js +3 -3
  340. package/lib/page/Box.js +3 -3
  341. package/lib/page/index.js +26 -33
  342. package/lib/page-container/index.js +3 -3
  343. package/lib/page-loading/index.js +3 -3
  344. package/lib/page-loading/index.less +4 -4
  345. package/lib/page-loading/loading.gif +0 -0
  346. package/lib/page-loading/loading1.gif +0 -0
  347. package/lib/popconfirm/popconfirm.d.ts +8 -0
  348. package/lib/popconfirm/popconfirm.d.ts.map +1 -0
  349. package/lib/popconfirm/popconfirm.js +96 -0
  350. package/lib/popconfirm/popconfirm.js.map +1 -0
  351. package/lib/popover/popover.d.ts +14 -0
  352. package/lib/popover/popover.d.ts.map +1 -0
  353. package/lib/popover/popover.js +90 -0
  354. package/lib/popover/popover.js.map +1 -0
  355. package/lib/preview-text/index.js +9 -9
  356. package/lib/progress/progress.d.ts +12 -0
  357. package/lib/progress/progress.d.ts.map +1 -0
  358. package/lib/progress/progress.js +179 -0
  359. package/lib/progress/progress.js.map +1 -0
  360. package/lib/query-form/Field/Checkbox.js +3 -3
  361. package/lib/query-form/Field/Composition/FieldPopover.d.ts +19 -0
  362. package/lib/query-form/Field/Composition/FieldPopover.d.ts.map +1 -0
  363. package/lib/query-form/Field/Composition/FieldPopover.js +464 -0
  364. package/lib/query-form/Field/Composition/FieldPopover.js.map +1 -0
  365. package/lib/query-form/Field/Composition/FieldPopover.less +35 -0
  366. package/lib/query-form/Field/Composition/Select.d.ts +4 -0
  367. package/lib/query-form/Field/Composition/Select.d.ts.map +1 -0
  368. package/lib/query-form/Field/Composition/Select.js +260 -0
  369. package/lib/query-form/Field/Composition/Select.js.map +1 -0
  370. package/lib/query-form/Field/Composition/SelectInput.d.ts +3 -0
  371. package/lib/query-form/Field/Composition/SelectInput.d.ts.map +1 -0
  372. package/lib/query-form/Field/Composition/SelectInput.js +112 -0
  373. package/lib/query-form/Field/Composition/SelectInput.js.map +1 -0
  374. package/lib/query-form/Field/Composition/ValueTag.d.ts +13 -0
  375. package/lib/query-form/Field/Composition/ValueTag.d.ts.map +1 -0
  376. package/lib/query-form/Field/Composition/ValueTag.js +240 -0
  377. package/lib/query-form/Field/Composition/ValueTag.js.map +1 -0
  378. package/lib/query-form/Field/Composition/index.d.ts +15 -0
  379. package/lib/query-form/Field/Composition/index.d.ts.map +1 -0
  380. package/lib/query-form/Field/Composition/index.js +448 -0
  381. package/lib/query-form/Field/Composition/index.js.map +1 -0
  382. package/lib/query-form/Field/Composition/index.less +145 -0
  383. package/lib/query-form/Field/Composition/utils.d.ts +21 -0
  384. package/lib/query-form/Field/Composition/utils.d.ts.map +1 -0
  385. package/lib/query-form/Field/Composition/utils.js +173 -0
  386. package/lib/query-form/Field/Composition/utils.js.map +1 -0
  387. package/lib/query-form/Field/Select.js +24 -31
  388. package/lib/query-form/Field/SelectInput.js +24 -31
  389. package/lib/query-form/Field/fieldsMap.js +3 -3
  390. package/lib/query-form/Field/index.js +47 -73
  391. package/lib/query-form/createActions.js +3 -3
  392. package/lib/query-form/index.js +44 -70
  393. package/lib/query-form/useForm.js +3 -3
  394. package/lib/query-form-v2/index.less +133 -0
  395. package/lib/query-list-scene/List.js +41 -61
  396. package/lib/query-list-scene/QueryForm.js +44 -70
  397. package/lib/query-list-scene/QueryListScene.js +44 -70
  398. package/lib/query-list-scene/Title.js +3 -3
  399. package/lib/query-list-scene/Toolbar.js +10 -16
  400. package/lib/query-list-scene/createActions.js +3 -3
  401. package/lib/query-list-scene/index.js +3 -3
  402. package/lib/query-list-scene/useActions.js +3 -3
  403. package/lib/radio/index.js +3 -3
  404. package/lib/radio/radio-group.js +3 -3
  405. package/lib/radio/radio.d.ts +17 -0
  406. package/lib/radio/radio.d.ts.map +1 -0
  407. package/lib/radio/radio.js +110 -0
  408. package/lib/radio/radio.js.map +1 -0
  409. package/lib/render-empty/render-empty.js +3 -3
  410. package/lib/scroll-bar/Bar.d.ts +4 -0
  411. package/lib/scroll-bar/Bar.d.ts.map +1 -0
  412. package/lib/scroll-bar/Bar.js +169 -0
  413. package/lib/scroll-bar/Bar.js.map +1 -0
  414. package/lib/scroll-bar/Context.d.ts +7 -0
  415. package/lib/scroll-bar/Context.d.ts.map +1 -0
  416. package/lib/scroll-bar/Context.js +17 -0
  417. package/lib/scroll-bar/Context.js.map +1 -0
  418. package/lib/scroll-bar/ScrollBar.d.ts +4 -0
  419. package/lib/scroll-bar/ScrollBar.d.ts.map +1 -0
  420. package/lib/scroll-bar/ScrollBar.js +132 -0
  421. package/lib/scroll-bar/ScrollBar.js.map +1 -0
  422. package/lib/scroll-bar/Thumb.d.ts +3 -0
  423. package/lib/scroll-bar/Thumb.d.ts.map +1 -0
  424. package/lib/scroll-bar/Thumb.js +203 -0
  425. package/lib/scroll-bar/Thumb.js.map +1 -0
  426. package/lib/scroll-bar/index.d.ts +3 -0
  427. package/lib/scroll-bar/index.d.ts.map +1 -0
  428. package/lib/scroll-bar/index.js +14 -0
  429. package/lib/scroll-bar/index.js.map +1 -0
  430. package/lib/scroll-bar/scrollBar.less +59 -0
  431. package/lib/scroll-bar/util.d.ts +40 -0
  432. package/lib/scroll-bar/util.d.ts.map +1 -0
  433. package/lib/scroll-bar/util.js +72 -0
  434. package/lib/scroll-bar/util.js.map +1 -0
  435. package/lib/segmented/index.d.ts +1 -1
  436. package/lib/segmented/index.js +10 -16
  437. package/lib/select/select.js +10 -16
  438. package/lib/spin/spin.d.ts +9 -0
  439. package/lib/spin/spin.d.ts.map +1 -0
  440. package/lib/spin/spin.js +79 -0
  441. package/lib/spin/spin.js.map +1 -0
  442. package/lib/steps/steps.js +10 -16
  443. package/lib/svg-components/index.js +3 -3
  444. package/lib/switch/switch.js +3 -3
  445. package/lib/table/hooks/use-column-setting.js +14 -15
  446. package/lib/table/hooks/use-expand-fixed.js +30 -36
  447. package/lib/table/resizableTable/index.d.ts +3 -0
  448. package/lib/table/resizableTable/index.d.ts.map +1 -1
  449. package/lib/table/resizableTable/index.js +58 -36
  450. package/lib/table/resizableTable/index.js.map +1 -1
  451. package/lib/table/resizableTable/index.less +9 -1
  452. package/lib/table/table-hoc.js +3 -3
  453. package/lib/table/table.js +27 -34
  454. package/lib/table/table.stories.js +10 -16
  455. package/lib/table/total-shower.js +3 -3
  456. package/lib/table/utils.js +3 -3
  457. package/lib/table-container/index.js +3 -3
  458. package/lib/tabs-container/index.js +3 -3
  459. package/lib/tag/tag.js +10 -16
  460. package/lib/time-picker/TimePicker.d.ts +9 -0
  461. package/lib/time-picker/TimePicker.d.ts.map +1 -0
  462. package/lib/time-picker/TimePicker.js +90 -0
  463. package/lib/time-picker/TimePicker.js.map +1 -0
  464. package/lib/title/index.js +3 -3
  465. package/lib/tntd-action/Action.d.ts +6 -0
  466. package/lib/tntd-action/Action.d.ts.map +1 -0
  467. package/lib/tntd-action/Action.js +218 -0
  468. package/lib/tntd-action/Action.js.map +1 -0
  469. package/lib/tntd-cascader/AntdCascader/component/context.js +3 -3
  470. package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +3 -3
  471. package/lib/tntd-cascader/AntdCascader/component/getIcons.js +3 -3
  472. package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +10 -16
  473. package/lib/tntd-cascader/AntdCascader/config/utils.js +10 -16
  474. package/lib/tntd-cascader/AntdCascader/index.js +26 -33
  475. package/lib/tntd-cascader/index.js +3 -3
  476. package/lib/tntd-cascader/rc-cascader/Cascader.js +23 -24
  477. package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +10 -16
  478. package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +26 -33
  479. package/lib/tntd-cascader/rc-cascader/OptionList/index.js +30 -37
  480. package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +17 -18
  481. package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +23 -24
  482. package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +16 -17
  483. package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +3 -3
  484. package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +23 -30
  485. package/lib/tntd-cascader/rc-cascader/index.js +3 -3
  486. package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +6 -6
  487. package/lib/tntd-form/ErrorList.js +26 -33
  488. package/lib/tntd-form/Form.js +24 -31
  489. package/lib/tntd-form/FormItem/ItemHolder.js +24 -31
  490. package/lib/tntd-form/FormItem/index.js +23 -24
  491. package/lib/tntd-form/FormItemInput.js +3 -3
  492. package/lib/tntd-form/FormItemLabel.js +10 -16
  493. package/lib/tntd-form/FormList.js +3 -3
  494. package/lib/tntd-form/context.js +3 -3
  495. package/lib/tntd-form/hooks/useDebounce.js +14 -15
  496. package/lib/tntd-form/hooks/useForm.js +17 -18
  497. package/lib/tntd-form/hooks/useFormItemStatus.js +3 -3
  498. package/lib/tntd-form/hooks/useFrameState.js +17 -18
  499. package/lib/tntd-form/index.js +3 -3
  500. package/lib/tntd-icon/index.js +3 -3
  501. package/lib/tntd-layout/AppList.js +20 -24
  502. package/lib/tntd-layout/Application.js +20 -24
  503. package/lib/tntd-layout/Avatar.js +6 -9
  504. package/lib/tntd-layout/CompatibleLanguage.js +20 -24
  505. package/lib/tntd-layout/EnterpriseLayout/Avatar.js +6 -9
  506. package/lib/tntd-layout/EnterpriseLayout/Language.js +20 -24
  507. package/lib/tntd-layout/EnterpriseLayout/Theme.js +20 -24
  508. package/lib/tntd-layout/EnterpriseLayout/index.js +3 -3
  509. package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +20 -24
  510. package/lib/tntd-layout/GlobalNavigation/index.js +26 -30
  511. package/lib/tntd-layout/Header.js +6 -9
  512. package/lib/tntd-layout/HeaderActions.js +6 -9
  513. package/lib/tntd-layout/HeaderNavs.js +20 -24
  514. package/lib/tntd-layout/HeaderTabs.js +27 -37
  515. package/lib/tntd-layout/Iconfont.js +3 -3
  516. package/lib/tntd-layout/Language.js +20 -24
  517. package/lib/tntd-layout/Layout.js +20 -24
  518. package/lib/tntd-layout/Logo.js +6 -9
  519. package/lib/tntd-layout/OrgAppList.js +20 -24
  520. package/lib/tntd-layout/SideMenu.js +20 -24
  521. package/lib/tntd-layout/Theme.js +20 -24
  522. package/lib/tntd-layout/createActions.js +3 -3
  523. package/lib/tntd-layout/images/index.js +3 -3
  524. package/lib/tntd-layout/index.js +3 -3
  525. package/lib/tntd-layout/paaslayout/CompactSideMenu.js +20 -24
  526. package/lib/tntd-layout/paaslayout/Header.js +6 -9
  527. package/lib/tntd-layout/paaslayout/Logo.js +6 -9
  528. package/lib/tntd-layout/paaslayout/SideMenu.js +20 -24
  529. package/lib/tntd-layout/paaslayout/index.js +20 -24
  530. package/lib/tntd-layout/storage.js +3 -3
  531. package/lib/tntd-modal/index.js +24 -31
  532. package/lib/tntd-rc-select/_util/PurePanel.js +17 -18
  533. package/lib/tntd-rc-select/_util/context.js +3 -3
  534. package/lib/tntd-rc-select/_util/defaultRenderEmpty.js +3 -3
  535. package/lib/tntd-rc-select/_util/getIcons.js +3 -3
  536. package/lib/tntd-rc-select/_util/useCompactItemContext.js +10 -16
  537. package/lib/tntd-rc-select/index.js +10 -16
  538. package/lib/tntd-rc-select/style/index.less +23 -2
  539. package/lib/tntd-reference/AHref/index.js +3 -3
  540. package/lib/tntd-reference/ReferenceBatchCheck/index.js +3 -3
  541. package/lib/tntd-reference/ReferenceBatchDrawer/index.js +17 -18
  542. package/lib/tntd-reference/ReferenceCheck/index.js +3 -3
  543. package/lib/tntd-reference/ReferenceDrawer/index.js +17 -18
  544. package/lib/tntd-reference/ReferenceInfo/index.js +3 -3
  545. package/lib/tntd-reference/index.js +3 -3
  546. package/lib/tntd-second-page/index.js +3 -3
  547. package/lib/tntd-select/DropDownWrap.js +34 -54
  548. package/lib/tntd-select/index.js +40 -57
  549. package/lib/tntd-virtual-tree/index.js +23 -24
  550. package/lib/tntd-virtual-tree/utils.js +62 -66
  551. package/lib/tntd-virtual-tree-select/index.js +22 -23
  552. package/lib/tntd-virtual-tree-select/utils.js +20 -21
  553. package/lib/tooltip/tooltip.d.ts +1 -0
  554. package/lib/tooltip/tooltip.d.ts.map +1 -1
  555. package/lib/tooltip/tooltip.js +23 -9
  556. package/lib/tooltip/tooltip.js.map +1 -1
  557. package/lib/upload/index.js +41 -45
  558. package/lib/upload/svg/UploadSVG.js +3 -3
  559. package/lib/utils/checkAuth.js +6 -6
  560. package/lib/utils/index.js +20 -21
  561. package/lib/utils/lang.js +3 -3
  562. package/lib/water-mark/index.js +17 -18
  563. package/package.json +1 -1
@@ -37,9 +37,9 @@ function _interopRequireWildcard(e, r) {
37
37
  }
38
38
  return n["default"] = e, t && t.set(e, n), n;
39
39
  }
40
- function _interopRequireDefault(obj) {
41
- return obj && obj.__esModule ? obj : {
42
- "default": obj
40
+ function _interopRequireDefault(e) {
41
+ return e && e.__esModule ? e : {
42
+ "default": e
43
43
  };
44
44
  }
45
45
  function _typeof(o) {
@@ -51,19 +51,13 @@ function _typeof(o) {
51
51
  return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
52
52
  }, _typeof(o);
53
53
  }
54
- function _defineProperty(obj, key, value) {
55
- key = _toPropertyKey(key);
56
- if (key in obj) {
57
- Object.defineProperty(obj, key, {
58
- value: value,
59
- enumerable: true,
60
- configurable: true,
61
- writable: true
62
- });
63
- } else {
64
- obj[key] = value;
65
- }
66
- return obj;
54
+ function _defineProperty(e, r, t) {
55
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
56
+ value: t,
57
+ enumerable: !0,
58
+ configurable: !0,
59
+ writable: !0
60
+ }) : e[r] = t, e;
67
61
  }
68
62
  function _toPropertyKey(t) {
69
63
  var i = _toPrimitive(t, "string");
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
- function _interopRequireDefault(obj) {
9
- return obj && obj.__esModule ? obj : {
10
- "default": obj
8
+ function _interopRequireDefault(e) {
9
+ return e && e.__esModule ? e : {
10
+ "default": e
11
11
  };
12
12
  }
13
13
  var _default = exports["default"] = function _default(props) {
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
- function _interopRequireDefault(obj) {
9
- return obj && obj.__esModule ? obj : {
10
- "default": obj
8
+ function _interopRequireDefault(e) {
9
+ return e && e.__esModule ? e : {
10
+ "default": e
11
11
  };
12
12
  }
13
13
  var _default = exports["default"] = function _default(props) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ellipsis/index.js"],"names":[],"mappings":"AAgCe,yDA4Jd"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ellipsis/index.js"],"names":[],"mappings":"AAiCe,yDAoKd"}
@@ -19,6 +19,7 @@ var _popover2 = _interopRequireDefault(require("../popover"));
19
19
  var _tooltip = _interopRequireDefault(require("../tooltip"));
20
20
  var _CopySVG = _interopRequireDefault(require("./Svg/CopySVG"));
21
21
  var _TickSVG = _interopRequireDefault(require("./Svg/TickSVG"));
22
+ var _useScrollLock = _interopRequireDefault(require("../_util/hooks/useScrollLock"));
22
23
  require("./index.less");
23
24
  function _getRequireWildcardCache(e) {
24
25
  if ("function" != typeof WeakMap) return null;
@@ -45,29 +46,28 @@ function _interopRequireWildcard(e, r) {
45
46
  }
46
47
  return n["default"] = e, t && t.set(e, n), n;
47
48
  }
48
- function _interopRequireDefault(obj) {
49
- return obj && obj.__esModule ? obj : {
50
- "default": obj
49
+ function _interopRequireDefault(e) {
50
+ return e && e.__esModule ? e : {
51
+ "default": e
51
52
  };
52
53
  }
53
- function _slicedToArray(arr, i) {
54
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
54
+ function _slicedToArray(r, e) {
55
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
55
56
  }
56
57
  function _nonIterableRest() {
57
58
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
58
59
  }
59
- function _unsupportedIterableToArray(o, minLen) {
60
- if (!o) return;
61
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
62
- var n = Object.prototype.toString.call(o).slice(8, -1);
63
- if (n === "Object" && o.constructor) n = o.constructor.name;
64
- if (n === "Map" || n === "Set") return Array.from(o);
65
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
60
+ function _unsupportedIterableToArray(r, a) {
61
+ if (r) {
62
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
63
+ var t = {}.toString.call(r).slice(8, -1);
64
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
65
+ }
66
66
  }
67
- function _arrayLikeToArray(arr, len) {
68
- if (len == null || len > arr.length) len = arr.length;
69
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
70
- return arr2;
67
+ function _arrayLikeToArray(r, a) {
68
+ (null == a || a > r.length) && (a = r.length);
69
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
70
+ return n;
71
71
  }
72
72
  function _iterableToArrayLimit(r, l) {
73
73
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
@@ -96,8 +96,8 @@ function _iterableToArrayLimit(r, l) {
96
96
  return a;
97
97
  }
98
98
  }
99
- function _arrayWithHoles(arr) {
100
- if (Array.isArray(arr)) return arr;
99
+ function _arrayWithHoles(r) {
100
+ if (Array.isArray(r)) return r;
101
101
  } /*
102
102
  * @Author: 梁洪刚
103
103
  * @CreatDate: 2021-03-31 13:57:32
@@ -135,7 +135,8 @@ var _default = exports["default"] = function _default(props) {
135
135
  prefix = props.prefix,
136
136
  suffix = props.suffix,
137
137
  _props$needRefresh = props.needRefresh,
138
- needRefresh = _props$needRefresh === void 0 ? true : _props$needRefresh;
138
+ needRefresh = _props$needRefresh === void 0 ? true : _props$needRefresh,
139
+ enableScrollObserver = props.enableScrollObserver;
139
140
  var _useState = (0, _react.useState)(1),
140
141
  _useState2 = _slicedToArray(_useState, 2),
141
142
  renderId = _useState2[0],
@@ -160,6 +161,14 @@ var _default = exports["default"] = function _default(props) {
160
161
  lineHeight = _useState10[0],
161
162
  setLineHeight = _useState10[1];
162
163
  var elementRef = (0, _react.useRef)();
164
+ var isScrolling = (0, _useScrollLock["default"])({
165
+ enableScrollObserver: enableScrollObserver
166
+ });
167
+ (0, _react.useEffect)(function () {
168
+ if (isScrolling) {
169
+ setTipVisible(false);
170
+ }
171
+ }, [isScrolling]);
163
172
  var computeElement = function computeElement() {
164
173
  elementRef.current && isEllipsisActive(elementRef.current) ? setFlag(true) : (setFlag(false), setTipVisible(false));
165
174
  if (elementRef.current) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ellipsis/index.js"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0EAAoC;AACpC,+CAA2E;AAE3E,yDAAgC;AAChC,yDAAgC;AAEhC,4DAAmC;AACnC,4DAAmC;AACnC,wBAAqB;AAErB,MAAM,SAAS,GAAG,CAAC,CAAA,CAAC,2CAA2C;AAE/D,MAAM,gBAAgB,GAAG,CAAC,CAAC,EAAE,EAAE;;IAC7B,IAAI,CAAC,CAAC,WAAW,KAAK,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,YAAY,EAAE;QACxE,IAAI,QAAQ,GAAG,oBAAoB,CAAA;QACnC,IAAI,CAAC,CAAA,MAAA,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,UAAU,0CAAE,YAAY,CAAC,OAAO,CAAC,0CAAE,QAAQ,CAAC,OAAO,CAAC,CAAA,EAAE;YAC5D,QAAQ,IAAI,iBAAiB,CAAA;SAC9B;QACD,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;QAC5C,CAAC,CAAC,YAAY,CAAC,OAAO,EAAC,kBAAkB,CAAC,CAAC;KAC5C;SAAK;QACJ,CAAC,CAAC,YAAY,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;KAC5B;IACD,OAAO,CAAC,CAAC,WAAW,GAAG,SAAS,GAAG,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC,YAAY,CAAA;AACrF,CAAC,CAAA;AAED,kBAAe,CAAC,KAAK,EAAE,EAAE;IACvB,IAAI,EACF,QAAQ,GAAG,KAAK,CAAC,OAAO,EAAE,2BAA2B;IACrD,KAAK,EAAE,8BAA8B;IACrC,OAAO,EAAE,8BAA8B;IAC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,IAAI,MAAM;YAEjB,uCAAK,SAAS,EAAE,YAAY,EAAE,EAAE,GAAG,EAAE,QAAQ,IAAG,CAAC,KAAK,IAAE,KAAK,KAAG,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAO;YAEnG,CAAC,CAAC,MAAM,IAAI,MAAM;YAElB,CAAC,KAAK,IAAE,KAAK,KAAG,CAAC,CAAC,IAAI,SAAS,IAAI,UAAU,IAAI,CAChD,uCACE,SAAS,EAAC,YAAY,EACtB,KAAK,EAAE;oBACL,MAAM,EAAE,UAAU;iBACnB,EACD,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,IAEtD,CAAC,OAAO,CAAC,CAAC,CAAC,CACV,8BAAC,iBAAO,IACN,KAAK,EAAE;oBACL,MAAM,EAAE,UAAU;iBACnB,GACD,CACH,CAAC,CAAC,CAAC,CACF,8BAAC,iBAAO,IACN,KAAK,EAAE;oBACL,MAAM,EAAE,UAAU;iBACnB,GACD,CACH,CACG,CACP,CACG,CACL,CACJ,CAAA;AACH,CAAC,CAAA","sourcesContent":["/*\n * @Author: 梁洪刚\n * @CreatDate: 2021-03-31 13:57:32\n * @Describe: 省略号组件\n */\n\nimport copy from 'copy-to-clipboard'\nimport React, { useEffect, useLayoutEffect, useRef, useState } from 'react'\n\nimport Popover from '../popover'\nimport Tooltip from '../tooltip'\n\nimport CopySVG from './Svg/CopySVG'\nimport TickSVG from './Svg/TickSVG'\nimport './index.less'\n\nconst tolerance = 0 // In px. Depends on the font you are using\n\nconst isEllipsisActive = (e) => {\n if (e.offsetWidth === e.scrollWidth && e.offsetHeight === e.scrollHeight) {\n let styleStr = 'overflow:visible; '\n if (!e?.parentNode?.getAttribute('style')?.includes('width')) {\n styleStr += 'max-width:100%;'\n }\n e.parentNode.setAttribute('style', styleStr)\n e.setAttribute(\"style\",'overflow:inherit');\n }else {\n e.setAttribute(\"style\", \"\")\n }\n return e.offsetWidth + tolerance < e.scrollWidth || e.offsetHeight < e.scrollHeight\n}\n\nexport default (props) => {\n let {\n _popover = props.Popover, // `Popover` or `Tooltip` ?\n title, // in most cases for `Tooltip`\n content, // in most cases for `Popover`\n className,\n style,\n widthLimit, // width trigger value\n _lines = props.lines !== 1 && props.lines, // number or lines, default 1 line;\n children, // children Node\n emptyText, // default: null\n _copyable = props.copyable, // copy function\n prefix, // 前缀dom\n suffix, // 后缀dom\n needRefresh = true // select.options的情况下不要刷新\n } = props\n\n const [renderId, setRenderId] = useState(1);\n // allow visible or not state\n const [flag, setFlag] = useState(true)\n // visible[Tooltip/Popover] state\n const [tipVisible, setTipVisible] = useState(false)\n // copy animation state\n const [hasCopy, setHasCopy] = useState(false)\n const [lineHeight, setLineHeight] = useState()\n\n const elementRef = useRef()\n\n const computeElement = ()=>{\n elementRef.current && isEllipsisActive(elementRef.current)\n ? setFlag(true)\n : (setFlag(false), setTipVisible(false))\n\n if (elementRef.current) {\n setLineHeight(getComputedStyle(elementRef.current, null).getPropertyValue('line-height'))\n }\n }\n\n useLayoutEffect(()=>{\n if (needRefresh) {\n setRenderId(id => id + 1);\n }else {\n if(renderId < 2) {\n setRenderId(id => id + 1);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [title, needRefresh, content, children])\n\n useEffect(() => {\n computeElement()\n },[renderId])\n\n useEffect(()=>{\n window.addEventListener(\"resize\",computeElement)\n return ()=>{\n window.removeEventListener('resize',computeElement)\n }\n },[])\n\n // original Node\n const inner = typeof children === 'string' ? children : _popover ? content : title\n\n // for className\n const getClassName = () => {\n return `overflow min-width-0 ${_lines ? 'ellipsis-wrap' : 'ellipsis-nowrap'} ${className || ''}`\n }\n\n // Tooltip.trigger(default 'hover') ==trigger==> onVisibleChange(visible)\n const handleVisibleChange = (visible) => {\n // const { onVisibleChange } = props;\n // onVisibleChange(visible);\n flag && setTipVisible(visible)\n }\n\n // onClick Copy Button\n const handleCopy = (innerText) => {\n copy(innerText)\n setHasCopy(!hasCopy)\n setTimeout(() => {\n setHasCopy(false)\n }, 1000)\n }\n\n const renderNode = () => {\n const popoverNode = (\n <Popover\n {...props}\n content={content || children}\n visible={tipVisible}\n onVisibleChange={(visible) => handleVisibleChange(visible)}\n >\n <div className={className} style={{ WebkitLineClamp: _lines }} ref={elementRef}>\n {children || content}\n </div>\n </Popover>\n )\n\n const tooltipNode = (\n <Tooltip\n {...props}\n title={title || children}\n visible={tipVisible}\n onVisibleChange={(visible) => handleVisibleChange(visible)}\n >\n <div className={className} style={{ WebkitLineClamp: _lines }} ref={elementRef}>\n {children || title}\n </div>\n </Tooltip>\n )\n\n return _popover ? popoverNode : tooltipNode\n }\n\n return (\n <>\n <div\n className=\"tntd-ellipsis\"\n style={{\n ...style,\n maxWidth: widthLimit,\n }}\n >\n {/* prefix */}\n {prefix && prefix}\n {/* content */}\n <div className={getClassName()} key={renderId}>{(inner||inner===0) ? renderNode() : emptyText}</div>\n {/* suffix */}\n {!!suffix && suffix}\n {/* copyable button */}\n {(inner||inner===0) && _copyable && lineHeight && (\n <div\n className=\"svg-button\"\n style={{\n height: lineHeight,\n }}\n onClick={() => handleCopy(elementRef.current.innerText)}\n >\n {!hasCopy ? (\n <CopySVG\n style={{\n height: lineHeight,\n }}\n />\n ) : (\n <TickSVG\n style={{\n height: lineHeight,\n }}\n />\n )}\n </div>\n )}\n </div>\n </>\n )\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ellipsis/index.js"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0EAAoC;AACpC,+CAA2E;AAE3E,yDAAgC;AAChC,yDAAgC;AAEhC,4DAAmC;AACnC,4DAAmC;AACnC,iFAAwD;AACxD,wBAAqB;AAErB,MAAM,SAAS,GAAG,CAAC,CAAA,CAAC,2CAA2C;AAE/D,MAAM,gBAAgB,GAAG,CAAC,CAAC,EAAE,EAAE;;IAC7B,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UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAO;YAEnG,CAAC,CAAC,MAAM,IAAI,MAAM;YAElB,CAAC,KAAK,IAAE,KAAK,KAAG,CAAC,CAAC,IAAI,SAAS,IAAI,UAAU,IAAI,CAChD,uCACE,SAAS,EAAC,YAAY,EACtB,KAAK,EAAE;oBACL,MAAM,EAAE,UAAU;iBACnB,EACD,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,IAEtD,CAAC,OAAO,CAAC,CAAC,CAAC,CACV,8BAAC,iBAAO,IACN,KAAK,EAAE;oBACL,MAAM,EAAE,UAAU;iBACnB,GACD,CACH,CAAC,CAAC,CAAC,CACF,8BAAC,iBAAO,IACN,KAAK,EAAE;oBACL,MAAM,EAAE,UAAU;iBACnB,GACD,CACH,CACG,CACP,CACG,CACL,CACJ,CAAA;AACH,CAAC,CAAA","sourcesContent":["/*\n * @Author: 梁洪刚\n * @CreatDate: 2021-03-31 13:57:32\n * @Describe: 省略号组件\n */\n\nimport copy from 'copy-to-clipboard'\nimport React, { useEffect, useLayoutEffect, useRef, useState } from 'react'\n\nimport Popover from '../popover'\nimport Tooltip from '../tooltip'\n\nimport CopySVG from './Svg/CopySVG'\nimport TickSVG from './Svg/TickSVG'\nimport useScrollLock from '../_util/hooks/useScrollLock'\nimport './index.less'\n\nconst tolerance = 0 // In px. Depends on the font you are using\n\nconst isEllipsisActive = (e) => {\n if (e.offsetWidth === e.scrollWidth && e.offsetHeight === e.scrollHeight) {\n let styleStr = 'overflow:visible; '\n if (!e?.parentNode?.getAttribute('style')?.includes('width')) {\n styleStr += 'max-width:100%;'\n }\n e.parentNode.setAttribute('style', styleStr)\n e.setAttribute(\"style\",'overflow:inherit');\n }else {\n e.setAttribute(\"style\", \"\")\n }\n return e.offsetWidth + tolerance < e.scrollWidth || e.offsetHeight < e.scrollHeight\n}\n\nexport default (props) => {\n let {\n _popover = props.Popover, // `Popover` or `Tooltip` ?\n title, // in most cases for `Tooltip`\n content, // in most cases for `Popover`\n className,\n style,\n widthLimit, // width trigger value\n _lines = props.lines !== 1 && props.lines, // number or lines, default 1 line;\n children, // children Node\n emptyText, // default: null\n _copyable = props.copyable, // copy function\n prefix, // 前缀dom\n suffix, // 后缀dom\n needRefresh = true, \n enableScrollObserver// select.options的情况下不要刷新\n } = props\n\n const [renderId, setRenderId] = useState(1);\n // allow visible or not state\n const [flag, setFlag] = useState(true)\n // visible[Tooltip/Popover] state\n const [tipVisible, setTipVisible] = useState(false)\n // copy animation state\n const [hasCopy, setHasCopy] = useState(false)\n const [lineHeight, setLineHeight] = useState()\n\n const elementRef = useRef()\n\n const isScrolling = useScrollLock({enableScrollObserver});\n useEffect(()=>{\n if(isScrolling) {\n setTipVisible(false)\n }\n },[isScrolling])\n \n const computeElement = ()=>{\n elementRef.current && isEllipsisActive(elementRef.current)\n ? setFlag(true)\n : (setFlag(false), setTipVisible(false))\n\n if (elementRef.current) {\n setLineHeight(getComputedStyle(elementRef.current, null).getPropertyValue('line-height'))\n }\n }\n\n useLayoutEffect(()=>{\n if (needRefresh) {\n setRenderId(id => id + 1);\n }else {\n if(renderId < 2) {\n setRenderId(id => id + 1);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [title, needRefresh, content, children])\n\n useEffect(() => {\n computeElement()\n },[renderId])\n\n useEffect(()=>{\n window.addEventListener(\"resize\",computeElement)\n return ()=>{\n window.removeEventListener('resize',computeElement)\n }\n },[])\n\n // original Node\n const inner = typeof children === 'string' ? children : _popover ? content : title\n\n // for className\n const getClassName = () => {\n return `overflow min-width-0 ${_lines ? 'ellipsis-wrap' : 'ellipsis-nowrap'} ${className || ''}`\n }\n\n // Tooltip.trigger(default 'hover') ==trigger==> onVisibleChange(visible)\n const handleVisibleChange = (visible) => {\n // const { onVisibleChange } = props;\n // onVisibleChange(visible);\n flag && setTipVisible(visible)\n }\n\n // onClick Copy Button\n const handleCopy = (innerText) => {\n copy(innerText)\n setHasCopy(!hasCopy)\n setTimeout(() => {\n setHasCopy(false)\n }, 1000)\n }\n\n const renderNode = () => {\n const popoverNode = (\n <Popover\n {...props}\n content={content || children}\n visible={tipVisible}\n onVisibleChange={(visible) => handleVisibleChange(visible)}\n >\n <div className={className} style={{ WebkitLineClamp: _lines }} ref={elementRef}>\n {children || content}\n </div>\n </Popover>\n )\n\n const tooltipNode = (\n <Tooltip\n {...props}\n title={title || children}\n visible={tipVisible}\n onVisibleChange={(visible) => handleVisibleChange(visible)}\n >\n <div className={className} style={{ WebkitLineClamp: _lines }} ref={elementRef}>\n {children || title}\n </div>\n </Tooltip>\n )\n\n return _popover ? popoverNode : tooltipNode\n }\n\n return (\n <>\n <div\n className=\"tntd-ellipsis\"\n style={{\n ...style,\n maxWidth: widthLimit,\n }}\n >\n {/* prefix */}\n {prefix && prefix}\n {/* content */}\n <div className={getClassName()} key={renderId}>{(inner||inner===0) ? renderNode() : emptyText}</div>\n {/* suffix */}\n {!!suffix && suffix}\n {/* copyable button */}\n {(inner||inner===0) && _copyable && lineHeight && (\n <div\n className=\"svg-button\"\n style={{\n height: lineHeight,\n }}\n onClick={() => handleCopy(elementRef.current.innerText)}\n >\n {!hasCopy ? (\n <CopySVG\n style={{\n height: lineHeight,\n }}\n />\n ) : (\n <TickSVG\n style={{\n height: lineHeight,\n }}\n />\n )}\n </div>\n )}\n </div>\n </>\n )\n}\n"]}
@@ -51,9 +51,9 @@ function _interopRequireWildcard(e, r) {
51
51
  }
52
52
  return n["default"] = e, t && t.set(e, n), n;
53
53
  }
54
- function _interopRequireDefault(obj) {
55
- return obj && obj.__esModule ? obj : {
56
- "default": obj
54
+ function _interopRequireDefault(e) {
55
+ return e && e.__esModule ? e : {
56
+ "default": e
57
57
  };
58
58
  }
59
59
  function _typeof(o) {
@@ -65,19 +65,13 @@ function _typeof(o) {
65
65
  return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
66
66
  }, _typeof(o);
67
67
  }
68
- function _defineProperty(obj, key, value) {
69
- key = _toPropertyKey(key);
70
- if (key in obj) {
71
- Object.defineProperty(obj, key, {
72
- value: value,
73
- enumerable: true,
74
- configurable: true,
75
- writable: true
76
- });
77
- } else {
78
- obj[key] = value;
79
- }
80
- return obj;
68
+ function _defineProperty(e, r, t) {
69
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
70
+ value: t,
71
+ enumerable: !0,
72
+ configurable: !0,
73
+ writable: !0
74
+ }) : e[r] = t, e;
81
75
  }
82
76
  function _toPropertyKey(t) {
83
77
  var i = _toPrimitive(t, "string");
@@ -8,18 +8,15 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
  var _empty = require("./empty");
10
10
  var _templateObject;
11
- function _interopRequireDefault(obj) {
12
- return obj && obj.__esModule ? obj : {
13
- "default": obj
11
+ function _interopRequireDefault(e) {
12
+ return e && e.__esModule ? e : {
13
+ "default": e
14
14
  };
15
15
  }
16
- function _taggedTemplateLiteral(strings, raw) {
17
- if (!raw) {
18
- raw = strings.slice(0);
19
- }
20
- return Object.freeze(Object.defineProperties(strings, {
16
+ function _taggedTemplateLiteral(e, t) {
17
+ return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
21
18
  raw: {
22
- value: Object.freeze(raw)
19
+ value: Object.freeze(t)
23
20
  }
24
21
  }));
25
22
  }
@@ -10,9 +10,9 @@ var _classnames = _interopRequireDefault(require("classnames"));
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
  var _configProvider = require("../config-provider");
12
12
  var _empty = _interopRequireDefault(require("../empty"));
13
- function _interopRequireDefault(obj) {
14
- return obj && obj.__esModule ? obj : {
15
- "default": obj
13
+ function _interopRequireDefault(e) {
14
+ return e && e.__esModule ? e : {
15
+ "default": e
16
16
  };
17
17
  }
18
18
  /*
package/lib/form/form.js CHANGED
@@ -24,9 +24,9 @@ Object.keys(_form).forEach(function (key) {
24
24
  var _utils = require("../utils");
25
25
  require("./form.less");
26
26
  var _classnames = _interopRequireDefault(require("classnames"));
27
- function _interopRequireDefault(obj) {
28
- return obj && obj.__esModule ? obj : {
29
- "default": obj
27
+ function _interopRequireDefault(e) {
28
+ return e && e.__esModule ? e : {
29
+ "default": e
30
30
  };
31
31
  }
32
32
  function _getRequireWildcardCache(e) {
@@ -63,19 +63,13 @@ function _typeof(o) {
63
63
  return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
64
64
  }, _typeof(o);
65
65
  }
66
- function _defineProperty(obj, key, value) {
67
- key = _toPropertyKey(key);
68
- if (key in obj) {
69
- Object.defineProperty(obj, key, {
70
- value: value,
71
- enumerable: true,
72
- configurable: true,
73
- writable: true
74
- });
75
- } else {
76
- obj[key] = value;
77
- }
78
- return obj;
66
+ function _defineProperty(e, r, t) {
67
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
68
+ value: t,
69
+ enumerable: !0,
70
+ configurable: !0,
71
+ writable: !0
72
+ }) : e[r] = t, e;
79
73
  }
80
74
  function _toPropertyKey(t) {
81
75
  var i = _toPrimitive(t, "string");
@@ -33,24 +33,18 @@ function _interopRequireWildcard(e, r) {
33
33
  }
34
34
  return n["default"] = e, t && t.set(e, n), n;
35
35
  }
36
- function _interopRequireDefault(obj) {
37
- return obj && obj.__esModule ? obj : {
38
- "default": obj
36
+ function _interopRequireDefault(e) {
37
+ return e && e.__esModule ? e : {
38
+ "default": e
39
39
  };
40
40
  }
41
- function _defineProperty(obj, key, value) {
42
- key = _toPropertyKey(key);
43
- if (key in obj) {
44
- Object.defineProperty(obj, key, {
45
- value: value,
46
- enumerable: true,
47
- configurable: true,
48
- writable: true
49
- });
50
- } else {
51
- obj[key] = value;
52
- }
53
- return obj;
41
+ function _defineProperty(e, r, t) {
42
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
43
+ value: t,
44
+ enumerable: !0,
45
+ configurable: !0,
46
+ writable: !0
47
+ }) : e[r] = t, e;
54
48
  }
55
49
  function _toPropertyKey(t) {
56
50
  var i = _toPrimitive(t, "string");
@@ -7,9 +7,9 @@ exports["default"] = void 0;
7
7
  var _react = require("react");
8
8
  var _useForceUpdate = _interopRequireDefault(require("../../_util/hooks/useForceUpdate"));
9
9
  var _responsiveObserve = _interopRequireDefault(require("../../_util/responsiveObserve"));
10
- function _interopRequireDefault(obj) {
11
- return obj && obj.__esModule ? obj : {
12
- "default": obj
10
+ function _interopRequireDefault(e) {
11
+ return e && e.__esModule ? e : {
12
+ "default": e
13
13
  };
14
14
  }
15
15
  function useBreakpoint() {
@@ -20,9 +20,9 @@ var _col = _interopRequireDefault(require("./col"));
20
20
  var _useBreakpoint = _interopRequireDefault(require("./hooks/useBreakpoint"));
21
21
  var _row = _interopRequireDefault(require("./row"));
22
22
  require("./style");
23
- function _interopRequireDefault(obj) {
24
- return obj && obj.__esModule ? obj : {
25
- "default": obj
23
+ function _interopRequireDefault(e) {
24
+ return e && e.__esModule ? e : {
25
+ "default": e
26
26
  };
27
27
  }
28
28
  // Do not export params
@@ -36,24 +36,18 @@ function _interopRequireWildcard(e, r) {
36
36
  }
37
37
  return n["default"] = e, t && t.set(e, n), n;
38
38
  }
39
- function _interopRequireDefault(obj) {
40
- return obj && obj.__esModule ? obj : {
41
- "default": obj
39
+ function _interopRequireDefault(e) {
40
+ return e && e.__esModule ? e : {
41
+ "default": e
42
42
  };
43
43
  }
44
- function _defineProperty(obj, key, value) {
45
- key = _toPropertyKey(key);
46
- if (key in obj) {
47
- Object.defineProperty(obj, key, {
48
- value: value,
49
- enumerable: true,
50
- configurable: true,
51
- writable: true
52
- });
53
- } else {
54
- obj[key] = value;
55
- }
56
- return obj;
44
+ function _defineProperty(e, r, t) {
45
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
46
+ value: t,
47
+ enumerable: !0,
48
+ configurable: !0,
49
+ writable: !0
50
+ }) : e[r] = t, e;
57
51
  }
58
52
  function _toPropertyKey(t) {
59
53
  var i = _toPrimitive(t, "string");
@@ -78,24 +72,23 @@ function _typeof(o) {
78
72
  return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
79
73
  }, _typeof(o);
80
74
  }
81
- function _slicedToArray(arr, i) {
82
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
75
+ function _slicedToArray(r, e) {
76
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
83
77
  }
84
78
  function _nonIterableRest() {
85
79
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
86
80
  }
87
- function _unsupportedIterableToArray(o, minLen) {
88
- if (!o) return;
89
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
90
- var n = Object.prototype.toString.call(o).slice(8, -1);
91
- if (n === "Object" && o.constructor) n = o.constructor.name;
92
- if (n === "Map" || n === "Set") return Array.from(o);
93
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
81
+ function _unsupportedIterableToArray(r, a) {
82
+ if (r) {
83
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
84
+ var t = {}.toString.call(r).slice(8, -1);
85
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
86
+ }
94
87
  }
95
- function _arrayLikeToArray(arr, len) {
96
- if (len == null || len > arr.length) len = arr.length;
97
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
98
- return arr2;
88
+ function _arrayLikeToArray(r, a) {
89
+ (null == a || a > r.length) && (a = r.length);
90
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
91
+ return n;
99
92
  }
100
93
  function _iterableToArrayLimit(r, l) {
101
94
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
@@ -124,8 +117,8 @@ function _iterableToArrayLimit(r, l) {
124
117
  return a;
125
118
  }
126
119
  }
127
- function _arrayWithHoles(arr) {
128
- if (Array.isArray(arr)) return arr;
120
+ function _arrayWithHoles(r) {
121
+ if (Array.isArray(r)) return r;
129
122
  }
130
123
  var __rest = void 0 && (void 0).__rest || function (s, e) {
131
124
  var t = {};
@@ -21,9 +21,9 @@ var _divider = _interopRequireDefault(require("../divider"));
21
21
  var _dropdown = _interopRequireDefault(require("../dropdown"));
22
22
  var _menu = _interopRequireDefault(require("../menu"));
23
23
  require("./index.less");
24
- function _interopRequireDefault(obj) {
25
- return obj && obj.__esModule ? obj : {
26
- "default": obj
24
+ function _interopRequireDefault(e) {
25
+ return e && e.__esModule ? e : {
26
+ "default": e
27
27
  };
28
28
  }
29
29
  function _getRequireWildcardCache(e) {
@@ -15,9 +15,9 @@ var _tooltip = _interopRequireDefault(require("../tooltip"));
15
15
  var _utils = require("../utils");
16
16
  var _menu = _interopRequireDefault(require("../menu"));
17
17
  require("./index.less");
18
- function _interopRequireDefault(obj) {
19
- return obj && obj.__esModule ? obj : {
20
- "default": obj
18
+ function _interopRequireDefault(e) {
19
+ return e && e.__esModule ? e : {
20
+ "default": e
21
21
  };
22
22
  }
23
23
  var __rest = void 0 && (void 0).__rest || function (s, e) {
@@ -52,20 +52,20 @@ var HandleIcon = function HandleIcon(props) {
52
52
  } else if (children) {
53
53
  newChildren.push(children);
54
54
  }
55
- var flattenChildren = function flattenChildren(children) {
55
+ var _flattenChildren = function flattenChildren(children) {
56
56
  if (!children) {
57
57
  return [];
58
58
  }
59
59
  return (0, _toArray["default"])(children).reduce(function (flatChildren, child) {
60
60
  if (child && child.type === _react["default"].Fragment) {
61
- return flatChildren.concat(flattenChildren(child.props.children));
61
+ return flatChildren.concat(_flattenChildren(child.props.children));
62
62
  }
63
63
  flatChildren.push(child);
64
64
  return flatChildren;
65
65
  }, []);
66
66
  };
67
67
  // 解决需要Fragment包的场景
68
- newChildren = flattenChildren(newChildren);
68
+ newChildren = _flattenChildren(newChildren);
69
69
  var preChildPart = newChildren,
70
70
  lastChildPart = null;
71
71
  // 只有1个时不适配
@@ -83,7 +83,7 @@ var HandleIcon = function HandleIcon(props) {
83
83
  }));
84
84
  });
85
85
  }
86
- var decoratePopconfirm = function decoratePopconfirm(element, parentElement) {
86
+ var _decoratePopconfirm = function decoratePopconfirm(element, parentElement) {
87
87
  if (_react["default"].isValidElement(element)) {
88
88
  var type = element.type,
89
89
  _props = element.props;
@@ -118,7 +118,7 @@ var HandleIcon = function HandleIcon(props) {
118
118
  }
119
119
  if (_props && _props.children) {
120
120
  var modifiedChildren = _react["default"].Children.map(_props.children, function (child) {
121
- return decoratePopconfirm(child, element);
121
+ return _decoratePopconfirm(child, element);
122
122
  });
123
123
  return _react["default"].cloneElement(element, _props, modifiedChildren);
124
124
  }
@@ -128,7 +128,7 @@ var HandleIcon = function HandleIcon(props) {
128
128
  // 对更多的popConfirm
129
129
  if (lastChildPart === null || lastChildPart === void 0 ? void 0 : lastChildPart.length) {
130
130
  lastChildPart === null || lastChildPart === void 0 ? void 0 : lastChildPart.forEach(function (v, i) {
131
- v = decoratePopconfirm(v);
131
+ v = _decoratePopconfirm(v);
132
132
  lastChildPart[i] = _react["default"].cloneElement(v, Object.assign(Object.assign({}, (v === null || v === void 0 ? void 0 : v.props) || {}), {
133
133
  inMore: true
134
134
  }));
@@ -176,7 +176,7 @@ HandleIcon.Item = function (props) {
176
176
  rest = __rest(props, ["children", "title", "desc", "tooltip", "inMore", "disabled", "upperCaseIgnore"]);
177
177
  var upTitle = (0, _utils.doUpperTitle)(title, upperCaseIgnore);
178
178
  ;
179
- var replaceIconWithText = function replaceIconWithText(element) {
179
+ var _replaceIconWithText = function replaceIconWithText(element) {
180
180
  if (_react["default"].isValidElement(element)) {
181
181
  var type = element.type,
182
182
  eleProps = element.props;
@@ -201,7 +201,7 @@ HandleIcon.Item = function (props) {
201
201
  }
202
202
  if (eleProps && eleProps.children) {
203
203
  var modifiedChildren = _react["default"].Children.map(eleProps.children, function (child) {
204
- return replaceIconWithText(child);
204
+ return _replaceIconWithText(child);
205
205
  });
206
206
  return _react["default"].cloneElement(element, eleProps, modifiedChildren);
207
207
  }
@@ -211,10 +211,10 @@ HandleIcon.Item = function (props) {
211
211
  var newChildren = children;
212
212
  if (Array.isArray(newChildren)) {
213
213
  newChildren = children === null || children === void 0 ? void 0 : children.map(function (child) {
214
- return replaceIconWithText(child);
214
+ return _replaceIconWithText(child);
215
215
  });
216
216
  } else {
217
- newChildren = replaceIconWithText(children);
217
+ newChildren = _replaceIconWithText(children);
218
218
  }
219
219
  if ((inMore && desc || !inMore) && tooltip) {
220
220
  return _react["default"].createElement(_tooltip["default"], Object.assign({
@@ -15,9 +15,9 @@ Object.defineProperty(exports, "__esModule", {
15
15
  exports["default"] = create;
16
16
  var React = _interopRequireWildcard(require("react"));
17
17
  var _index = _interopRequireDefault(require("./index"));
18
- function _interopRequireDefault(obj) {
19
- return obj && obj.__esModule ? obj : {
20
- "default": obj
18
+ function _interopRequireDefault(e) {
19
+ return e && e.__esModule ? e : {
20
+ "default": e
21
21
  };
22
22
  }
23
23
  function _getRequireWildcardCache(e) {