tntd 2.0.14 → 2.0.16

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 (456) hide show
  1. package/es/array-input/index.js +6 -31
  2. package/es/array-input/style/index.js +1 -0
  3. package/es/array-input/style/index.js.map +1 -0
  4. package/es/auth-context/style/index.js +1 -0
  5. package/es/auth-context/style/index.js.map +1 -0
  6. package/es/columns/index.js +6 -12
  7. package/es/development-login/LoginModal.js +4 -10
  8. package/es/development-login/style/index.js +1 -0
  9. package/es/development-login/style/index.js.map +1 -0
  10. package/es/drawer/drawer.js +5 -9
  11. package/es/drawer/drawer.js.map +1 -1
  12. package/es/drawer/drawer.less +13 -11
  13. package/es/ellipsis/index.js +14 -25
  14. package/es/ellipsis/style/index.js +1 -0
  15. package/es/ellipsis/style/index.js.map +1 -0
  16. package/es/empty/empty.js +9 -13
  17. package/es/empty/render-empty.js +22 -0
  18. package/es/empty/render-empty.js.map +1 -0
  19. package/es/empty/style/index.js +2 -0
  20. package/es/empty/style/index.js.map +1 -0
  21. package/es/handle/index.js +14 -27
  22. package/es/handle/style/index.js +1 -0
  23. package/es/handle/style/index.js.map +1 -0
  24. package/es/icon-list/style/index.js +1 -0
  25. package/es/icon-list/style/index.js.map +1 -0
  26. package/es/img/Contain.js +13 -19
  27. package/es/img/Cover.js +13 -24
  28. package/es/img/index.js +14 -21
  29. package/es/img/style/index.js +1 -0
  30. package/es/img/style/index.js.map +1 -0
  31. package/es/index.js +0 -1
  32. package/es/loading-button/index.js +6 -13
  33. package/es/loading-button/style/index.js +1 -0
  34. package/es/loading-button/style/index.js.map +1 -0
  35. package/es/locale/default.js +0 -2
  36. package/es/locale/en_US.js +0 -2
  37. package/es/locale/zh_CN.js +0 -2
  38. package/es/modal/index.js +11 -2
  39. package/es/modal/index.js.map +1 -1
  40. package/es/modal/modal.js +44 -0
  41. package/es/modal/modal.js.map +1 -0
  42. package/es/modal/modal.less +27 -25
  43. package/es/page/Box.js +19 -28
  44. package/es/page/index.js +22 -38
  45. package/es/page/style/index.js +1 -0
  46. package/es/page/style/index.js.map +1 -0
  47. package/es/page/utils.js +0 -5
  48. package/es/prev-locale.js +0 -3
  49. package/es/query-form/Field/Checkbox.js +4 -8
  50. package/es/query-form/Field/Select.js +10 -17
  51. package/es/query-form/Field/SelectInput.js +4 -18
  52. package/es/query-form/Field/fieldsMap.js +0 -1
  53. package/es/query-form/Field/index.js +2 -11
  54. package/es/query-form/createActions.js +0 -8
  55. package/es/query-form/index.js +2 -34
  56. package/es/query-form/style/index.js +1 -0
  57. package/es/query-form/style/index.js.map +1 -0
  58. package/es/query-list-scene/List.js +18 -39
  59. package/es/query-list-scene/QueryForm.js +10 -19
  60. package/es/query-list-scene/QueryListScene.js +0 -2
  61. package/es/query-list-scene/Toolbar.js +6 -10
  62. package/es/query-list-scene/createActions.js +0 -3
  63. package/es/query-list-scene/style/index.js +1 -0
  64. package/es/query-list-scene/style/index.js.map +1 -0
  65. package/es/render-empty/render-empty.js +0 -2
  66. package/es/render-empty/style/index.js +1 -0
  67. package/es/render-empty/style/index.js.map +1 -0
  68. package/es/steps/steps.js +9 -17
  69. package/es/svg-components/illustration-403.js +0 -2
  70. package/es/svg-components/illustration-404.js +0 -2
  71. package/es/svg-components/illustration-500.js +0 -2
  72. package/es/svg-components/illustration-empty.js +0 -2
  73. package/es/svg-components/illustration-failure.js +0 -2
  74. package/es/svg-components/illustration-no-access.js +0 -2
  75. package/es/svg-components/illustration-no-chart.js +0 -2
  76. package/es/svg-components/illustration-no-result.js +0 -2
  77. package/es/svg-components/illustration-offline.js +0 -2
  78. package/es/svg-components/illustration-success.js +0 -2
  79. package/es/table/assets/image-loading-background.js +0 -2
  80. package/es/table/assets/image-loading.js +0 -2
  81. package/es/table/context.js.map +1 -1
  82. package/es/table/hooks/use-column-setting.js +0 -1
  83. package/es/table/style/index.js +2 -0
  84. package/es/table/style/index.js.map +1 -0
  85. package/es/table/table.js +29 -33
  86. package/es/table/table.js.map +1 -1
  87. package/es/table/table.less +5 -0
  88. package/es/table/table.stories.js +0 -2
  89. package/es/table/utils.js +2 -6
  90. package/es/title/index.js +10 -14
  91. package/es/title/style/index.js +1 -0
  92. package/es/title/style/index.js.map +1 -0
  93. package/es/tntd-cascader/AntdCascader/component/context.js +2 -4
  94. package/es/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +0 -2
  95. package/es/tntd-cascader/AntdCascader/component/getIcons.js +6 -15
  96. package/es/tntd-cascader/AntdCascader/config/utils.js +0 -2
  97. package/es/tntd-cascader/AntdCascader/config/warning.js +4 -8
  98. package/es/tntd-cascader/AntdCascader/index.js +51 -73
  99. package/es/tntd-cascader/rc-cascader/Cascader.js +86 -113
  100. package/es/tntd-cascader/rc-cascader/OptionList/Column.js +16 -26
  101. package/es/tntd-cascader/rc-cascader/OptionList/index.js +26 -43
  102. package/es/tntd-cascader/rc-cascader/OptionList/useActive.js +5 -7
  103. package/es/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +12 -41
  104. package/es/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +4 -10
  105. package/es/tntd-cascader/rc-cascader/hooks/useEntities.js +2 -4
  106. package/es/tntd-cascader/rc-cascader/hooks/useMissingValues.js +0 -1
  107. package/es/tntd-cascader/rc-cascader/hooks/useRefFunc.js +0 -1
  108. package/es/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +2 -7
  109. package/es/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +8 -15
  110. package/es/tntd-cascader/rc-cascader/utils/commonUtil.js +2 -6
  111. package/es/tntd-cascader/rc-cascader/utils/treeUtil.js +2 -4
  112. package/es/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +2 -7
  113. package/es/tntd-icon/fonts/iconfont.js +7 -12
  114. package/es/tntd-icon/index.js +5 -9
  115. package/es/tntd-icon/style/index.js +1 -0
  116. package/es/tntd-icon/style/index.js.map +1 -0
  117. package/es/tntd-layout/ActionsContext.js +2 -2
  118. package/es/tntd-layout/AppList.js +2 -14
  119. package/es/tntd-layout/Application.js +0 -4
  120. package/es/tntd-layout/Avatar.js +0 -4
  121. package/es/tntd-layout/CompatibleLanguage.js +0 -13
  122. package/es/tntd-layout/EnterpriseLayout/Avatar.js +0 -4
  123. package/es/tntd-layout/EnterpriseLayout/Language.js +0 -6
  124. package/es/tntd-layout/EnterpriseLayout/Theme.js +0 -4
  125. package/es/tntd-layout/EnterpriseLayout/index.js +2 -2
  126. package/es/tntd-layout/GlobalNavigation/NavigationPopup.js +2 -33
  127. package/es/tntd-layout/GlobalNavigation/index.js +0 -6
  128. package/es/tntd-layout/HeaderActions.js +28 -32
  129. package/es/tntd-layout/HeaderNavs.js +6 -14
  130. package/es/tntd-layout/HeaderTabs.js +14 -35
  131. package/es/tntd-layout/Language.js +0 -6
  132. package/es/tntd-layout/Layout.js +2 -7
  133. package/es/tntd-layout/Logo.js +4 -11
  134. package/es/tntd-layout/OrgAppList.js +22 -39
  135. package/es/tntd-layout/SideMenu.js +8 -45
  136. package/es/tntd-layout/Theme.js +0 -6
  137. package/es/tntd-layout/index.js +9 -17
  138. package/es/tntd-layout/paaslayout/CompactSideMenu.js +0 -15
  139. package/es/tntd-layout/paaslayout/SideMenu.js +0 -15
  140. package/es/tntd-layout/paaslayout/index.js +4 -13
  141. package/es/tntd-layout/storage.js +2 -2
  142. package/es/tntd-layout/style/index.js +1 -0
  143. package/es/tntd-layout/style/index.js.map +1 -0
  144. package/es/tntd-modal/index.js +12 -18
  145. package/es/tntd-modal/style/index.js +1 -0
  146. package/es/tntd-modal/style/index.js.map +1 -0
  147. package/es/tntd-second-page/index.js +0 -3
  148. package/es/tntd-select/DropDownWrap.js +4 -8
  149. package/es/tntd-select/index.js +74 -118
  150. package/es/tntd-select/style/index.js +1 -0
  151. package/es/tntd-select/style/index.js.map +1 -0
  152. package/es/utils/checkAuth.js +0 -1
  153. package/es/utils/findMenuInfoByPath.js +0 -3
  154. package/es/utils/index.js +2 -11
  155. package/lib/affix/index.js +4 -10
  156. package/lib/alert/index.js +4 -10
  157. package/lib/anchor/index.js +4 -10
  158. package/lib/array-input/icon.js +1 -7
  159. package/lib/array-input/index.js +41 -91
  160. package/lib/array-input/style/index.d.ts +1 -0
  161. package/lib/array-input/style/index.d.ts.map +1 -0
  162. package/lib/array-input/style/index.js +1 -0
  163. package/lib/array-input/style/index.js.map +1 -0
  164. package/lib/auth-context/index.js +0 -3
  165. package/lib/auth-context/style/index.d.ts +1 -0
  166. package/lib/auth-context/style/index.d.ts.map +1 -0
  167. package/lib/auth-context/style/index.js +1 -0
  168. package/lib/auth-context/style/index.js.map +1 -0
  169. package/lib/auto-complete/index.js +4 -10
  170. package/lib/avatar/index.js +4 -10
  171. package/lib/back-top/index.js +4 -10
  172. package/lib/badge/index.js +4 -10
  173. package/lib/breadcrumb/index.js +4 -10
  174. package/lib/button/index.js +4 -10
  175. package/lib/calendar/index.js +4 -10
  176. package/lib/card/index.js +4 -10
  177. package/lib/carousel/index.js +4 -10
  178. package/lib/cascader/index.js +4 -10
  179. package/lib/checkbox/index.js +4 -10
  180. package/lib/col/index.js +4 -10
  181. package/lib/collapse/index.js +4 -11
  182. package/lib/columns/index.js +14 -28
  183. package/lib/comment/index.js +4 -10
  184. package/lib/config-provider/config-provider.js +0 -2
  185. package/lib/config-provider/index.js +4 -10
  186. package/lib/date-picker/index.js +4 -10
  187. package/lib/descriptions/index.js +4 -10
  188. package/lib/development-login/LoginModal.js +25 -50
  189. package/lib/development-login/index.js +11 -22
  190. package/lib/development-login/style/index.d.ts +1 -0
  191. package/lib/development-login/style/index.d.ts.map +1 -0
  192. package/lib/development-login/style/index.js +1 -0
  193. package/lib/development-login/style/index.js.map +1 -0
  194. package/lib/divider/index.js +4 -10
  195. package/lib/drawer/drawer.d.ts.map +1 -1
  196. package/lib/drawer/drawer.js +7 -17
  197. package/lib/drawer/drawer.js.map +1 -1
  198. package/lib/drawer/drawer.less +13 -11
  199. package/lib/drawer/index.js +1 -5
  200. package/lib/dropdown/index.js +4 -10
  201. package/lib/ellipsis/Svg/CopySVG.js +0 -4
  202. package/lib/ellipsis/Svg/TickSVG.js +0 -4
  203. package/lib/ellipsis/index.js +42 -73
  204. package/lib/ellipsis/style/index.d.ts +1 -0
  205. package/lib/ellipsis/style/index.d.ts.map +1 -0
  206. package/lib/ellipsis/style/index.js +1 -0
  207. package/lib/ellipsis/style/index.js.map +1 -0
  208. package/lib/empty/empty.js +14 -30
  209. package/lib/empty/empty.stories.js +3 -21
  210. package/lib/empty/index.js +1 -5
  211. package/lib/empty/render-empty.d.ts +3 -0
  212. package/lib/empty/render-empty.d.ts.map +1 -0
  213. package/lib/empty/render-empty.js +32 -0
  214. package/lib/empty/render-empty.js.map +1 -0
  215. package/lib/empty/style/index.d.ts +3 -0
  216. package/lib/empty/style/index.d.ts.map +1 -0
  217. package/lib/empty/style/index.js +4 -0
  218. package/lib/empty/style/index.js.map +1 -0
  219. package/lib/exception/exception.js +7 -14
  220. package/lib/exception/index.js +1 -4
  221. package/lib/form/index.js +4 -10
  222. package/lib/handle/index.js +19 -46
  223. package/lib/handle/style/index.d.ts +1 -0
  224. package/lib/handle/style/index.d.ts.map +1 -0
  225. package/lib/handle/style/index.js +1 -0
  226. package/lib/handle/style/index.js.map +1 -0
  227. package/lib/icon/index.js +4 -10
  228. package/lib/icon-list/style/index.d.ts +3 -0
  229. package/lib/icon-list/style/index.d.ts.map +1 -0
  230. package/lib/icon-list/style/index.js +8 -0
  231. package/lib/icon-list/style/index.js.map +1 -0
  232. package/lib/img/Contain.js +12 -23
  233. package/lib/img/Cover.js +31 -53
  234. package/lib/img/index.js +29 -47
  235. package/lib/img/style/index.d.ts +1 -0
  236. package/lib/img/style/index.d.ts.map +1 -0
  237. package/lib/img/style/index.js +1 -0
  238. package/lib/img/style/index.js.map +1 -0
  239. package/lib/index.js +100 -187
  240. package/lib/input/index.js +4 -10
  241. package/lib/input-number/index.js +4 -10
  242. package/lib/layout/index.js +4 -10
  243. package/lib/list/index.js +4 -10
  244. package/lib/loading-button/index.js +15 -32
  245. package/lib/loading-button/style/index.d.ts +1 -0
  246. package/lib/loading-button/style/index.d.ts.map +1 -0
  247. package/lib/loading-button/style/index.js +1 -0
  248. package/lib/loading-button/style/index.js.map +1 -0
  249. package/lib/locale/default.js +0 -5
  250. package/lib/locale/en_US.js +0 -4
  251. package/lib/locale/index.js +3 -6
  252. package/lib/locale/zh_CN.js +0 -4
  253. package/lib/locale-provider/index.js +4 -10
  254. package/lib/mention/index.js +4 -10
  255. package/lib/mentions/index.js +4 -10
  256. package/lib/menu/index.js +4 -10
  257. package/lib/message/index.js +4 -11
  258. package/lib/modal/index.d.ts +2 -2
  259. package/lib/modal/index.d.ts.map +1 -1
  260. package/lib/modal/index.js +13 -14
  261. package/lib/modal/index.js.map +1 -1
  262. package/lib/modal/modal.d.ts +15 -0
  263. package/lib/modal/modal.d.ts.map +1 -0
  264. package/lib/modal/modal.js +66 -0
  265. package/lib/modal/modal.js.map +1 -0
  266. package/lib/modal/modal.less +27 -25
  267. package/lib/notification/index.js +4 -10
  268. package/lib/page/Box.js +24 -37
  269. package/lib/page/index.js +37 -66
  270. package/lib/page/style/index.d.ts +1 -0
  271. package/lib/page/style/index.d.ts.map +1 -0
  272. package/lib/page/style/index.js +1 -0
  273. package/lib/page/style/index.js.map +1 -0
  274. package/lib/page/utils.js +1 -9
  275. package/lib/page-header/index.js +4 -10
  276. package/lib/pagination/index.js +4 -10
  277. package/lib/popconfirm/index.js +4 -10
  278. package/lib/popover/index.js +4 -10
  279. package/lib/prev-locale.js +1 -10
  280. package/lib/progress/index.js +4 -10
  281. package/lib/query-form/Field/Checkbox.js +2 -11
  282. package/lib/query-form/Field/Select.js +27 -45
  283. package/lib/query-form/Field/SelectInput.js +21 -46
  284. package/lib/query-form/Field/fieldsMap.js +1 -12
  285. package/lib/query-form/Field/index.js +38 -70
  286. package/lib/query-form/createActions.js +0 -7
  287. package/lib/query-form/index.js +52 -121
  288. package/lib/query-form/style/index.d.ts +1 -0
  289. package/lib/query-form/style/index.d.ts.map +1 -0
  290. package/lib/query-form/style/index.js +1 -0
  291. package/lib/query-form/style/index.js.map +1 -0
  292. package/lib/query-form/useForm.js +0 -4
  293. package/lib/query-list-scene/List.js +58 -111
  294. package/lib/query-list-scene/QueryForm.js +37 -67
  295. package/lib/query-list-scene/QueryListScene.js +21 -42
  296. package/lib/query-list-scene/Title.js +1 -5
  297. package/lib/query-list-scene/Toolbar.js +8 -15
  298. package/lib/query-list-scene/createActions.js +0 -6
  299. package/lib/query-list-scene/index.js +0 -10
  300. package/lib/query-list-scene/style/index.d.ts +1 -0
  301. package/lib/query-list-scene/style/index.d.ts.map +1 -0
  302. package/lib/query-list-scene/style/index.js +1 -0
  303. package/lib/query-list-scene/style/index.js.map +1 -0
  304. package/lib/query-list-scene/useActions.js +0 -4
  305. package/lib/radio/index.js +4 -10
  306. package/lib/rate/index.js +4 -10
  307. package/lib/render-empty/index.js +0 -2
  308. package/lib/render-empty/render-empty.js +0 -8
  309. package/lib/render-empty/style/index.d.ts +2 -0
  310. package/lib/render-empty/style/index.d.ts.map +1 -0
  311. package/lib/render-empty/style/index.js +3 -0
  312. package/lib/render-empty/style/index.js.map +1 -0
  313. package/lib/result/index.js +4 -10
  314. package/lib/row/index.js +4 -10
  315. package/lib/select/index.js +4 -10
  316. package/lib/skeleton/index.js +4 -10
  317. package/lib/slider/index.js +4 -10
  318. package/lib/spin/index.js +4 -10
  319. package/lib/statistic/index.js +4 -10
  320. package/lib/steps/index.js +1 -5
  321. package/lib/steps/steps.js +12 -29
  322. package/lib/svg-components/illustration-403.js +3 -9
  323. package/lib/svg-components/illustration-404.js +3 -9
  324. package/lib/svg-components/illustration-500.js +3 -9
  325. package/lib/svg-components/illustration-empty.js +3 -9
  326. package/lib/svg-components/illustration-failure.js +3 -9
  327. package/lib/svg-components/illustration-no-access.js +3 -9
  328. package/lib/svg-components/illustration-no-chart.js +3 -9
  329. package/lib/svg-components/illustration-no-result.js +3 -9
  330. package/lib/svg-components/illustration-offline.js +3 -9
  331. package/lib/svg-components/illustration-success.js +3 -9
  332. package/lib/svg-components/index.js +0 -11
  333. package/lib/switch/index.js +4 -10
  334. package/lib/table/assets/image-loading-background.js +3 -9
  335. package/lib/table/assets/image-loading.js +3 -9
  336. package/lib/table/context.d.ts +0 -9
  337. package/lib/table/context.d.ts.map +1 -1
  338. package/lib/table/context.js +0 -2
  339. package/lib/table/context.js.map +1 -1
  340. package/lib/table/hooks/index.js +1 -2
  341. package/lib/table/hooks/use-column-setting.js +8 -16
  342. package/lib/table/index.js +1 -5
  343. package/lib/table/style/index.d.ts +3 -0
  344. package/lib/table/style/index.d.ts.map +1 -0
  345. package/lib/table/style/index.js +4 -0
  346. package/lib/table/style/index.js.map +1 -0
  347. package/lib/table/table.d.ts.map +1 -1
  348. package/lib/table/table.js +46 -77
  349. package/lib/table/table.js.map +1 -1
  350. package/lib/table/table.less +5 -0
  351. package/lib/table/table.stories.js +2 -11
  352. package/lib/table/utils.js +2 -11
  353. package/lib/tabs/index.js +4 -10
  354. package/lib/tag/index.js +4 -10
  355. package/lib/time-picker/index.js +4 -10
  356. package/lib/timeline/index.js +4 -10
  357. package/lib/title/index.js +10 -20
  358. package/lib/title/style/index.d.ts +1 -0
  359. package/lib/title/style/index.d.ts.map +1 -0
  360. package/lib/title/style/index.js +1 -0
  361. package/lib/title/style/index.js.map +1 -0
  362. package/lib/tntd-cascader/AntdCascader/component/DisabledContext.js +4 -11
  363. package/lib/tntd-cascader/AntdCascader/component/FormItemInputContext.js +3 -8
  364. package/lib/tntd-cascader/AntdCascader/component/SizeContext.js +3 -8
  365. package/lib/tntd-cascader/AntdCascader/component/context.js +3 -9
  366. package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +4 -12
  367. package/lib/tntd-cascader/AntdCascader/component/getIcons.js +19 -37
  368. package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +8 -17
  369. package/lib/tntd-cascader/AntdCascader/config/utils.js +6 -15
  370. package/lib/tntd-cascader/AntdCascader/config/warning.js +7 -15
  371. package/lib/tntd-cascader/AntdCascader/index.js +80 -133
  372. package/lib/tntd-cascader/AntdCascader/interface.js +0 -3
  373. package/lib/tntd-cascader/index.js +0 -2
  374. package/lib/tntd-cascader/rc-cascader/Cascader.js +123 -188
  375. package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +11 -21
  376. package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +60 -88
  377. package/lib/tntd-cascader/rc-cascader/OptionList/index.js +65 -109
  378. package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +18 -33
  379. package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +56 -106
  380. package/lib/tntd-cascader/rc-cascader/context.js +3 -8
  381. package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +14 -31
  382. package/lib/tntd-cascader/rc-cascader/hooks/useEntities.js +5 -15
  383. package/lib/tntd-cascader/rc-cascader/hooks/useMissingValues.js +3 -11
  384. package/lib/tntd-cascader/rc-cascader/hooks/useRefFunc.js +3 -8
  385. package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +3 -15
  386. package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +26 -41
  387. package/lib/tntd-cascader/rc-cascader/index.js +0 -3
  388. package/lib/tntd-cascader/rc-cascader/utils/commonUtil.js +9 -20
  389. package/lib/tntd-cascader/rc-cascader/utils/treeUtil.js +0 -8
  390. package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +7 -14
  391. package/lib/tntd-icon/fonts/iconfont.js +7 -12
  392. package/lib/tntd-icon/index.js +6 -17
  393. package/lib/tntd-icon/style/index.d.ts +1 -0
  394. package/lib/tntd-icon/style/index.d.ts.map +1 -0
  395. package/lib/tntd-icon/style/index.js +1 -0
  396. package/lib/tntd-icon/style/index.js.map +1 -0
  397. package/lib/tntd-layout/ActionsContext.js +0 -3
  398. package/lib/tntd-layout/AppList.js +30 -105
  399. package/lib/tntd-layout/Application.js +22 -84
  400. package/lib/tntd-layout/Avatar.js +18 -72
  401. package/lib/tntd-layout/CompatibleLanguage.js +32 -105
  402. package/lib/tntd-layout/EnterpriseLayout/Avatar.js +24 -80
  403. package/lib/tntd-layout/EnterpriseLayout/Language.js +14 -45
  404. package/lib/tntd-layout/EnterpriseLayout/Theme.js +16 -46
  405. package/lib/tntd-layout/EnterpriseLayout/index.js +4 -12
  406. package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +45 -174
  407. package/lib/tntd-layout/GlobalNavigation/index.js +19 -70
  408. package/lib/tntd-layout/Header.js +20 -54
  409. package/lib/tntd-layout/HeaderActions.js +33 -64
  410. package/lib/tntd-layout/HeaderNavs.js +19 -59
  411. package/lib/tntd-layout/HeaderTabs.js +43 -111
  412. package/lib/tntd-layout/Iconfont.js +0 -5
  413. package/lib/tntd-layout/Language.js +14 -45
  414. package/lib/tntd-layout/Layout.js +74 -113
  415. package/lib/tntd-layout/Logo.js +14 -41
  416. package/lib/tntd-layout/OrgAppList.js +51 -119
  417. package/lib/tntd-layout/SideMenu.js +42 -120
  418. package/lib/tntd-layout/Theme.js +19 -71
  419. package/lib/tntd-layout/createActions.js +0 -5
  420. package/lib/tntd-layout/images/index.js +0 -28
  421. package/lib/tntd-layout/index.js +21 -49
  422. package/lib/tntd-layout/paaslayout/CompactSideMenu.js +29 -81
  423. package/lib/tntd-layout/paaslayout/Header.js +14 -47
  424. package/lib/tntd-layout/paaslayout/Logo.js +2 -19
  425. package/lib/tntd-layout/paaslayout/SideMenu.js +31 -82
  426. package/lib/tntd-layout/paaslayout/index.js +62 -108
  427. package/lib/tntd-layout/storage.d.ts +1 -1
  428. package/lib/tntd-layout/storage.d.ts.map +1 -1
  429. package/lib/tntd-layout/storage.js +3 -33
  430. package/lib/tntd-layout/style/index.d.ts +1 -0
  431. package/lib/tntd-layout/style/index.d.ts.map +1 -0
  432. package/lib/tntd-layout/style/index.js +1 -0
  433. package/lib/tntd-layout/style/index.js.map +1 -0
  434. package/lib/tntd-modal/index.js +32 -51
  435. package/lib/tntd-modal/style/index.d.ts +1 -0
  436. package/lib/tntd-modal/style/index.d.ts.map +1 -0
  437. package/lib/tntd-modal/style/index.js +1 -0
  438. package/lib/tntd-modal/style/index.js.map +1 -0
  439. package/lib/tntd-second-page/index.js +14 -24
  440. package/lib/tntd-select/DropDownWrap.js +24 -45
  441. package/lib/tntd-select/index.js +117 -206
  442. package/lib/tntd-select/style/index.d.ts +1 -0
  443. package/lib/tntd-select/style/index.d.ts.map +1 -0
  444. package/lib/tntd-select/style/index.js +1 -0
  445. package/lib/tntd-select/style/index.js.map +1 -0
  446. package/lib/tooltip/index.js +4 -10
  447. package/lib/transfer/index.js +4 -10
  448. package/lib/tree/index.js +4 -10
  449. package/lib/tree-select/index.js +4 -10
  450. package/lib/typography/index.js +4 -10
  451. package/lib/upload/index.js +4 -10
  452. package/lib/utils/checkAuth.js +4 -10
  453. package/lib/utils/findMenuInfoByPath.js +1 -7
  454. package/lib/utils/index.js +13 -41
  455. package/lib/version/index.js +4 -10
  456. package/package.json +1 -1
@@ -4,18 +4,14 @@ import _set from "lodash/set";
4
4
  import _isFunction from "lodash/isFunction";
5
5
  import _isArray from "lodash/isArray";
6
6
  import _get from "lodash/get";
7
-
8
7
  var __rest = this && this.__rest || function (s, e) {
9
8
  var t = {};
10
-
11
9
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
12
-
13
10
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
14
11
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
15
12
  }
16
13
  return t;
17
14
  };
18
-
19
15
  import React, { isValidElement, useCallback, useEffect, useState } from 'react';
20
16
  import { deleteIcon, plusIcon } from './icon';
21
17
  import Col from '../col';
@@ -26,9 +22,7 @@ import './index.less';
26
22
  const {
27
23
  Column
28
24
  } = Table;
29
-
30
25
  const getWidth = span => 1000 / span;
31
-
32
26
  export default function ArrayInput({
33
27
  children,
34
28
  defaultValue,
@@ -44,12 +38,10 @@ export default function ArrayInput({
44
38
  if (!_isFunction(children)) {
45
39
  throw new Error('ArrayInput的children必须是函数');
46
40
  }
47
-
48
41
  const [_value, setValue] = useState(value || defaultValue);
49
42
  useEffect(() => {
50
43
  setValue(value);
51
44
  }, [value]);
52
-
53
45
  const _onChange = useCallback(value => {
54
46
  if (onChange) {
55
47
  onChange(value);
@@ -57,47 +49,36 @@ export default function ArrayInput({
57
49
  setValue(value);
58
50
  }
59
51
  }, []);
60
-
61
52
  let inValue = _value || [];
62
-
63
53
  if (require && inValue.length === 0) {
64
54
  inValue = [{}];
65
55
  }
66
-
67
56
  const changeValue = (index, name, value) => {
68
57
  inValue[index] = Object.assign(Object.assign({}, inValue[index]), {
69
58
  [name]: value
70
59
  });
71
-
72
60
  _onChange([...inValue]);
73
61
  };
74
-
75
62
  const onAdd = index => {
76
63
  if (index === undefined) {
77
64
  _onChange([...inValue, {}]);
78
65
  } else {
79
66
  inValue.splice(index + 1, 0, {});
80
-
81
67
  _onChange([...inValue]);
82
68
  }
83
69
  };
84
-
85
70
  const onDelete = i => {
86
71
  inValue.splice(i, 1);
87
-
88
72
  _onChange([...inValue]);
89
73
  };
90
-
91
74
  if (mode === 'list') {
92
75
  return React.createElement("div", {
93
76
  className: "tntd-array-input"
94
77
  }, inValue.map((item, index) => {
95
78
  let fields = children(item, index);
96
-
97
79
  if (!_isArray(fields)) {
98
80
  fields = _get(fields, 'props.children', []);
99
81
  }
100
-
101
82
  return React.createElement(Row, {
102
83
  gutter: gutter,
103
84
  key: index,
@@ -109,15 +90,13 @@ export default function ArrayInput({
109
90
  key: i
110
91
  }, field) : '';
111
92
  }
112
-
113
93
  const _a = field === null || field === void 0 ? void 0 : field.props,
114
- {
115
- name,
116
- span = 4,
117
- onChange: fieldChange
118
- } = _a,
119
- other = __rest(_a, ["name", "span", "onChange"]);
120
-
94
+ {
95
+ name,
96
+ span = 4,
97
+ onChange: fieldChange
98
+ } = _a,
99
+ other = __rest(_a, ["name", "span", "onChange"]);
121
100
  return React.createElement(Col, {
122
101
  span: span,
123
102
  key: i
@@ -155,17 +134,14 @@ export default function ArrayInput({
155
134
  }, addText));
156
135
  } else {
157
136
  let fields = children({}, 0);
158
-
159
137
  if (!_isArray(fields)) {
160
138
  fields = _get(fields, 'props.children', []);
161
139
  }
162
-
163
140
  const dataSource = inValue.map((value, index) => {
164
141
  const fields = children(value, index);
165
142
  const back = {};
166
143
  fields.forEach(field => {
167
144
  var _a;
168
-
169
145
  const name = (_a = field === null || field === void 0 ? void 0 : field.props) === null || _a === void 0 ? void 0 : _a.name;
170
146
  name && _set(back, name, field);
171
147
  });
@@ -196,7 +172,6 @@ export default function ArrayInput({
196
172
  if (!isValidElement(field)) {
197
173
  return field;
198
174
  }
199
-
200
175
  const {
201
176
  onChange: fieldChange
202
177
  } = field.props;
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/array-input/style/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth-context/style/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
@@ -1,14 +1,11 @@
1
1
  var __rest = this && this.__rest || function (s, e) {
2
2
  var t = {};
3
-
4
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
5
-
6
4
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
5
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
8
6
  }
9
7
  return t;
10
8
  };
11
-
12
9
  import classnames from 'classnames';
13
10
  import React from 'react';
14
11
  import { Row, Col } from '../';
@@ -56,16 +53,14 @@ export const Item = props => {
56
53
  className: `${clsPrefix}-col-body`
57
54
  }, children)));
58
55
  };
59
-
60
56
  const Columns = props => {
61
57
  const {
62
- children,
63
- height,
64
- gutter = 0,
65
- style
66
- } = props,
67
- rest = __rest(props, ["children", "height", "gutter", "style"]);
68
-
58
+ children,
59
+ height,
60
+ gutter = 0,
61
+ style
62
+ } = props,
63
+ rest = __rest(props, ["children", "height", "gutter", "style"]);
69
64
  const rowStyle = Object.assign(Object.assign({}, style), {
70
65
  height: props.height ? `${props.height}px` : 'calc(100vh)'
71
66
  });
@@ -76,6 +71,5 @@ const Columns = props => {
76
71
  style: rowStyle
77
72
  }, rest), children);
78
73
  };
79
-
80
74
  Columns.Item = Item;
81
75
  export default Columns;
@@ -4,8 +4,8 @@ import Modal from '../modal';
4
4
  import Input from '../input';
5
5
  import Form from '../form';
6
6
  import message from '../message';
7
- const cookies = new Cookies(); // 默认
8
-
7
+ const cookies = new Cookies();
8
+ // 默认
9
9
  let accountInfoDefault = {
10
10
  account: undefined,
11
11
  password: undefined
@@ -15,26 +15,22 @@ export default (({
15
15
  close,
16
16
  signIn
17
17
  }) => {
18
- const [confirmLoading, setConfirmLoading] = useState(false); // 如果storage中已存在,则取storage
19
-
18
+ const [confirmLoading, setConfirmLoading] = useState(false);
19
+ // 如果storage中已存在,则取storage
20
20
  const storageAccountInfo = localStorage.getItem('accountInfo');
21
-
22
21
  if (storageAccountInfo) {
23
22
  try {
24
23
  accountInfoDefault = JSON.parse(storageAccountInfo);
25
24
  } catch (e) {}
26
25
  }
27
-
28
26
  const [accountInfo, setAccountInfo] = useState(accountInfoDefault);
29
27
  const {
30
28
  account,
31
29
  password
32
30
  } = accountInfo;
33
-
34
31
  const onSubmit = () => {
35
32
  setConfirmLoading(true);
36
33
  const returnVal = signIn && signIn(accountInfo);
37
-
38
34
  if (returnVal && returnVal.then) {
39
35
  returnVal.then(res => {
40
36
  message.success('模拟登陆成功');
@@ -59,13 +55,11 @@ export default (({
59
55
  });
60
56
  }
61
57
  };
62
-
63
58
  const changeFieldValue = (key, evt) => {
64
59
  setAccountInfo(Object.assign(Object.assign({}, accountInfo), {
65
60
  [key]: evt.target.value
66
61
  }));
67
62
  };
68
-
69
63
  return React.createElement(Modal, {
70
64
  title: "\u5F00\u53D1\u8005\u6A21\u62DF\u767B\u9646",
71
65
  visible: visible,
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/development-login/style/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
@@ -1,14 +1,11 @@
1
1
  var __rest = this && this.__rest || function (s, e) {
2
2
  var t = {};
3
-
4
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
5
-
6
4
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
5
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
8
6
  }
9
7
  return t;
10
8
  };
11
-
12
9
  import LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver';
13
10
  import classNames from 'classnames';
14
11
  import React from 'react';
@@ -16,11 +13,10 @@ import { ConfigConsumer } from 'antd/es/config-provider';
16
13
  import { default as AntdDrawer } from 'antd/es/drawer';
17
14
  export const Drawer = _a => {
18
15
  var {
19
- closable,
20
- className
21
- } = _a,
22
- rest = __rest(_a, ["closable", "className"]);
23
-
16
+ closable,
17
+ className
18
+ } = _a,
19
+ rest = __rest(_a, ["closable", "className"]);
24
20
  return React.createElement(ConfigConsumer, null, ({
25
21
  getPrefixCls
26
22
  }) => {
@@ -28,7 +24,7 @@ export const Drawer = _a => {
28
24
  return React.createElement(LocaleReceiver, {
29
25
  componentName: "Drawer"
30
26
  }, () => React.createElement(AntdDrawer, Object.assign({
31
- className: classNames(prefixCls, className, {
27
+ className: classNames(prefixCls, 'tntd-drawer', className, {
32
28
  [`${prefixCls}-contain-closable`]: closable !== false
33
29
  }),
34
30
  closable: closable
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../src/drawer/drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,cAAc,MAAM,wCAAwC,CAAA;AACnE,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAa,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEtD,MAAM,CAAC,MAAM,MAAM,GAAwB,CAAC,EAAgC,EAAE,EAAE;QAApC,EAAE,QAAQ,EAAE,SAAS,OAAW,EAAN,IAAI,cAA9B,yBAAgC,CAAF;IAAO,OAAA,CAC/E,oBAAC,cAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAA;QACxC,OAAO,CACL,oBAAC,cAAc,IAAC,aAAa,EAAC,QAAQ,IACnC,GAAG,EAAE,CAAC,CACH,oBAAC,UAAU,kBACT,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,SAAS,EAAE;gBAC1C,CAAC,GAAG,SAAS,mBAAmB,CAAC,EAAE,QAAQ,KAAK,KAAK;aACtD,CAAC,EACF,QAAQ,EAAE,QAAQ,IACd,IAAI,EACR,CACH,CACY,CAClB,CAAA;IACH,CAAC,CACc,CAClB,CAAA;CAAA,CAAA","sourcesContent":["import type { DrawerProps as AntdDrawerProps } from 'antd/es/drawer'\nimport LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver'\nimport classNames from 'classnames'\nimport React, { FC } from 'react'\n\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport { default as AntdDrawer } from 'antd/es/drawer'\n\nexport const Drawer: FC<AntdDrawerProps> = ({ closable, className, ...rest }) => (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('drawer')\n return (\n <LocaleReceiver componentName=\"Drawer\">\n {() => (\n <AntdDrawer\n className={classNames(prefixCls, className, {\n [`${prefixCls}-contain-closable`]: closable !== false,\n })}\n closable={closable}\n {...rest}\n />\n )}\n </LocaleReceiver>\n )\n }}\n </ConfigConsumer>\n)\n"]}
1
+ {"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../src/drawer/drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;AASA,OAAO,cAAc,MAAM,wCAAwC,CAAA;AACnE,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAa,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEtD,MAAM,CAAC,MAAM,MAAM,GAAwB,CAAC,EAAgC,EAAE,EAAE;QAApC,EAAE,QAAQ,EAAE,SAAS,OAAW,EAAN,IAAI,cAA9B,yBAAgC,CAAF;IAAO,OAAA,CAC/E,oBAAC,cAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAA;QACxC,OAAO,CACL,oBAAC,cAAc,IAAC,aAAa,EAAC,QAAQ,IACnC,GAAG,EAAE,CAAC,CACL,oBAAC,UAAU,kBACT,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE;gBACzD,CAAC,GAAG,SAAS,mBAAmB,CAAC,EAAE,QAAQ,KAAK,KAAK;aACtD,CAAC,EACF,QAAQ,EAAE,QAAQ,IACd,IAAI,EACR,CACH,CACc,CAClB,CAAA;IACH,CAAC,CACc,CAClB,CAAA;CAAA,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2023-03-08 16:45:46\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2023-03-08 18:56:20\n * @FilePath: /tntd/packages/tntd/src/drawer/drawer.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport type { DrawerProps as AntdDrawerProps } from 'antd/es/drawer'\nimport LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver'\nimport classNames from 'classnames'\nimport React, { FC } from 'react'\n\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport { default as AntdDrawer } from 'antd/es/drawer'\n\nexport const Drawer: FC<AntdDrawerProps> = ({ closable, className, ...rest }) => (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('drawer')\n return (\n <LocaleReceiver componentName=\"Drawer\">\n {() => (\n <AntdDrawer\n className={classNames(prefixCls, 'tntd-drawer', className, {\n [`${prefixCls}-contain-closable`]: closable !== false,\n })}\n closable={closable}\n {...rest}\n />\n )}\n </LocaleReceiver>\n )\n }}\n </ConfigConsumer>\n)\n"]}
@@ -1,18 +1,20 @@
1
1
  @drawer-prefix-cls: ~'@{ant-prefix}-drawer';
2
2
 
3
- .@{drawer-prefix-cls} {
4
- &-title {
5
- font-size: @font-size-lg + 2px;
6
- }
3
+ .tntd-drawer{
4
+ &.@{drawer-prefix-cls} {
5
+ .@{drawer-prefix-cls}-title {
6
+ font-size: @font-size-lg + 2px;
7
+ }
7
8
 
8
- &-close {
9
- color: fade(@text-color, 50%);;
10
- top: -4px;
11
- }
9
+ .@{drawer-prefix-cls}-close {
10
+ color: fade(@text-color, 50%);;
11
+ top: -4px;
12
+ }
12
13
 
13
- &-contain-closable{
14
- .@{drawer-prefix-cls}-header{
15
- padding: 12px 36px 12px 20px;
14
+ .@{drawer-prefix-cls}-contain-closable{
15
+ .@{drawer-prefix-cls}-header{
16
+ padding: 12px 36px 12px 20px;
17
+ }
16
18
  }
17
19
  }
18
20
  }
@@ -11,23 +11,17 @@ import CopySVG from './Svg/CopySVG';
11
11
  import TickSVG from './Svg/TickSVG';
12
12
  import './index.less';
13
13
  const tolerance = 0; // In px. Depends on the font you are using
14
-
15
14
  const isEllipsisActive = e => {
16
15
  var _a, _b;
17
-
18
16
  if (e.offsetWidth === e.scrollWidth && e.offsetHeight === e.scrollHeight) {
19
17
  let styleStr = 'overflow:visible; ';
20
-
21
18
  if (!((_b = (_a = e === null || e === void 0 ? void 0 : e.parentNode) === null || _a === void 0 ? void 0 : _a.getAttribute('style')) === null || _b === void 0 ? void 0 : _b.includes('width'))) {
22
19
  styleStr += 'max-width:100%;';
23
20
  }
24
-
25
21
  e.parentNode.setAttribute('style', styleStr);
26
22
  }
27
-
28
23
  return e.offsetWidth + tolerance < e.scrollWidth || e.offsetHeight < e.scrollHeight;
29
24
  };
30
-
31
25
  export default (props => {
32
26
  let {
33
27
  _popover = props.Popover,
@@ -51,33 +45,30 @@ export default (props => {
51
45
  prefix,
52
46
  // 前缀dom
53
47
  suffix // 后缀dom
54
-
55
- } = props; // allow visible or not state
56
-
57
- const [flag, setFlag] = useState(true); // visible[Tooltip/Popover] state
58
-
59
- const [tipVisible, setTipVisible] = useState(false); // copy animation state
60
-
48
+ } = props;
49
+ // allow visible or not state
50
+ const [flag, setFlag] = useState(true);
51
+ // visible[Tooltip/Popover] state
52
+ const [tipVisible, setTipVisible] = useState(false);
53
+ // copy animation state
61
54
  const [hasCopy, setHasCopy] = useState(false);
62
55
  const elementRef = useRef();
63
56
  useEffect(() => {
64
57
  elementRef.current && isEllipsisActive(elementRef.current) ? setFlag(true) : (setFlag(false), setTipVisible(false));
65
- }); // original Node
66
-
67
- const inner = typeof children === 'string' ? children : _popover ? content : title; // for className
68
-
58
+ });
59
+ // original Node
60
+ const inner = typeof children === 'string' ? children : _popover ? content : title;
61
+ // for className
69
62
  const getClassName = () => {
70
63
  return `overflow ${_lines ? 'ellipsis-wrap' : 'ellipsis-nowrap'} ${className || ''}`;
71
- }; // Tooltip.trigger(default 'hover') ==trigger==> onVisibleChange(visible)
72
-
73
-
64
+ };
65
+ // Tooltip.trigger(default 'hover') ==trigger==> onVisibleChange(visible)
74
66
  const handleVisibleChange = visible => {
75
67
  // const { onVisibleChange } = props;
76
68
  // onVisibleChange(visible);
77
69
  flag && setTipVisible(visible);
78
- }; // onClick Copy Button
79
-
80
-
70
+ };
71
+ // onClick Copy Button
81
72
  const handleCopy = innerText => {
82
73
  copy(innerText);
83
74
  setHasCopy(!hasCopy);
@@ -85,7 +76,6 @@ export default (props => {
85
76
  setHasCopy(false);
86
77
  }, 1000);
87
78
  };
88
-
89
79
  const renderNode = () => {
90
80
  const popoverNode = React.createElement(Popover, Object.assign({}, props, {
91
81
  content: content || children,
@@ -111,7 +101,6 @@ export default (props => {
111
101
  }, children || title));
112
102
  return _popover ? popoverNode : tooltipNode;
113
103
  };
114
-
115
104
  return React.createElement(React.Fragment, null, React.createElement("div", {
116
105
  className: "tnt-ellipsis",
117
106
  style: Object.assign(Object.assign({}, style), {
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ellipsis/style/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
package/es/empty/empty.js CHANGED
@@ -1,22 +1,19 @@
1
1
  var __rest = this && this.__rest || function (s, e) {
2
2
  var t = {};
3
-
4
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
5
-
6
4
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
5
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
8
6
  }
9
7
  return t;
10
8
  };
11
-
12
9
  import LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver';
13
10
  import classNames from 'classnames';
14
11
  import React from 'react';
15
12
  import { ConfigConsumer } from 'antd/es/config-provider';
16
13
  import { default as AntdEmpty } from 'antd/es/empty';
17
14
  import { Illustration403, Illustration404, Illustration500, IllustrationEmpty, IllustrationFailure, IllustrationNoAccess, IllustrationNoChart, IllustrationNoResult, IllustrationOffline, IllustrationSuccess } from '../svg-components';
18
- export * from 'antd/es/empty'; // description map for evert type
19
-
15
+ export * from 'antd/es/empty';
16
+ // description map for evert type
20
17
  export const EmptyDescriptionMap = {
21
18
  empty: 'noData',
22
19
  'no-result': 'noData',
@@ -43,14 +40,13 @@ const BuiltinEmptyImage = {
43
40
  };
44
41
  export function Empty(_a) {
45
42
  var {
46
- className,
47
- description,
48
- size = 'middle',
49
- type = 'empty',
50
- locale
51
- } = _a,
52
- rest = __rest(_a, ["className", "description", "size", "type", "locale"]);
53
-
43
+ className,
44
+ description,
45
+ size = 'middle',
46
+ type = 'empty',
47
+ locale
48
+ } = _a,
49
+ rest = __rest(_a, ["className", "description", "size", "type", "locale"]);
54
50
  return React.createElement(ConfigConsumer, null, ({
55
51
  getPrefixCls
56
52
  }) => {
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { ConfigConsumer } from 'antd/es/config-provider';
3
+ import { Empty } from '../empty';
4
+ export const renderEmpty = componentName => React.createElement(ConfigConsumer, null, () => {
5
+ switch (componentName) {
6
+ case 'Table':
7
+ case 'List':
8
+ return React.createElement(Empty, {
9
+ type: "no-result"
10
+ });
11
+ case 'Select':
12
+ case 'TreeSelect':
13
+ case 'Cascader':
14
+ case 'Transfer':
15
+ case 'Mentions':
16
+ return React.createElement(Empty, {
17
+ size: "mini"
18
+ });
19
+ default:
20
+ return React.createElement(Empty, null);
21
+ }
22
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-empty.js","sourceRoot":"","sources":["../../src/empty/render-empty.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAEhC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,aAAsB,EAAmB,EAAE,CAAC,CACtE,oBAAC,cAAc,QACZ,GAAG,EAAE;IACJ,QAAQ,aAAa,EAAE;QACrB,KAAK,OAAO,CAAC;QACb,KAAK,MAAM;YACT,OAAO,oBAAC,KAAK,IAAC,IAAI,EAAC,WAAW,GAAG,CAAA;QAEnC,KAAK,QAAQ,CAAC;QACd,KAAK,YAAY,CAAC;QAClB,KAAK,UAAU,CAAC;QAChB,KAAK,UAAU,CAAC;QAChB,KAAK,UAAU;YACb,OAAO,oBAAC,KAAK,IAAC,IAAI,EAAC,MAAM,GAAG,CAAA;QAC9B;YACE,OAAO,oBAAC,KAAK,OAAG,CAAA;KACnB;AACH,CAAC,CACc,CAClB,CAAA","sourcesContent":["import React from 'react'\nimport { ConfigConsumer } from 'antd/es/config-provider'\n\nimport { Empty } from '../empty'\n\nexport const renderEmpty = (componentName?: string): React.ReactNode => (\n <ConfigConsumer>\n {() => {\n switch (componentName) {\n case 'Table':\n case 'List':\n return <Empty type=\"no-result\" />\n\n case 'Select':\n case 'TreeSelect':\n case 'Cascader':\n case 'Transfer':\n case 'Mentions':\n return <Empty size=\"mini\" />\n default:\n return <Empty />\n }\n }}\n </ConfigConsumer>\n)\n"]}
@@ -0,0 +1,2 @@
1
+ import 'antd/es/empty/style';
2
+ import './empty.less';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/empty/style/index.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAA;AAC5B,OAAO,cAAc,CAAA","sourcesContent":["import 'antd/es/empty/style'\nimport './empty.less'\n"]}
@@ -1,14 +1,11 @@
1
1
  var __rest = this && this.__rest || function (s, e) {
2
2
  var t = {};
3
-
4
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
5
-
6
4
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
5
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
8
6
  }
9
7
  return t;
10
8
  };
11
-
12
9
  import React, { Fragment } from 'react';
13
10
  import LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver';
14
11
  import Icon from '../tntd-icon';
@@ -22,41 +19,35 @@ export default (props => {
22
19
  componentName: "Handle"
23
20
  }, (locale, localeCode) => {
24
21
  const _a = props || {},
25
- {
26
- children = [],
27
- type,
28
- num = 3,
29
- lang,
30
- divider = true,
31
- lessOneMoreFit,
32
- popConfirmHandle
33
- } = _a,
34
- rest = __rest(_a, ["children", "type", "num", "lang", "divider", "lessOneMoreFit", "popConfirmHandle"]);
35
-
22
+ {
23
+ children = [],
24
+ type,
25
+ num = 3,
26
+ lang,
27
+ divider = true,
28
+ lessOneMoreFit,
29
+ popConfirmHandle
30
+ } = _a,
31
+ rest = __rest(_a, ["children", "type", "num", "lang", "divider", "lessOneMoreFit", "popConfirmHandle"]);
36
32
  let newChildren = [];
37
-
38
33
  if (Array.isArray(children)) {
39
34
  newChildren = (children === null || children === void 0 ? void 0 : children.filter(item => !!item)) || [];
40
35
  } else if (children) {
41
36
  newChildren.push(children);
42
37
  }
43
-
44
38
  if (localeCode === 'en' || popConfirmHandle) {
45
39
  newChildren === null || newChildren === void 0 ? void 0 : newChildren.forEach((v, i) => {
46
40
  const {
47
41
  type,
48
42
  props
49
43
  } = v;
50
-
51
44
  if ((type === null || type === void 0 ? void 0 : type.name) === 'Popconfirm' || props.hasOwnProperty('onConfirm') && typeof (props === null || props === void 0 ? void 0 : props.onConfirm) === 'function') {
52
45
  let placement = {};
53
-
54
46
  if (lang === 'en' || num && !isNaN(num) && i + 1 > num && !(lessOneMoreFit && newChildren.length - num === 1)) {
55
47
  placement = {
56
48
  placement: 'left'
57
49
  };
58
50
  }
59
-
60
51
  newChildren[i] = React.cloneElement(v, Object.assign(Object.assign(Object.assign(Object.assign({
61
52
  overlayStyle: {
62
53
  width: 180
@@ -70,31 +61,28 @@ export default (props => {
70
61
  }
71
62
  });
72
63
  }
73
-
74
- let [preChildPart, lastChildPart] = [newChildren, null]; // 只有1个时不适配
75
-
64
+ let [preChildPart, lastChildPart] = [newChildren, null];
65
+ // 只有1个时不适配
76
66
  if (lessOneMoreFit && newChildren.length - num === 1) {
77
67
  preChildPart = newChildren;
78
68
  } else if (newChildren && num && !isNaN(num) && newChildren.length > num) {
79
69
  preChildPart = newChildren.slice(0, num);
80
70
  lastChildPart = newChildren.slice(num);
81
71
  }
82
-
83
72
  if (divider && preChildPart) {
84
73
  const preChildLen = preChildPart.length;
85
74
  preChildPart = preChildPart.map((dom, i) => React.createElement(Fragment, {
86
75
  key: i
87
- }, dom, !(i === preChildLen - 1 && !(lastChildPart === null || lastChildPart === void 0 ? void 0 : lastChildPart.length)) && React.createElement(Divider, {
76
+ }, dom, !(i === preChildLen - 1 && !(lastChildPart === null || lastChildPart === void 0 ? void 0 : lastChildPart.length) // 没有更多 且 是最后一个时 不显示 Divider
77
+ ) && React.createElement(Divider, {
88
78
  type: "vertical"
89
79
  })));
90
80
  }
91
-
92
81
  const menu = childArr => React.createElement(Menu, {
93
82
  className: "org-pop-opera-btn"
94
83
  }, childArr === null || childArr === void 0 ? void 0 : childArr.map((child, i) => React.createElement(Menu.Item, {
95
84
  key: i
96
85
  }, child)));
97
-
98
86
  if (localeCode === "en") {
99
87
  return React.createElement(Dropdown, {
100
88
  overlay: menu(newChildren || []),
@@ -109,7 +97,6 @@ export default (props => {
109
97
  type: "down"
110
98
  }))));
111
99
  }
112
-
113
100
  return React.createElement("div", Object.assign({
114
101
  onClick: e => {
115
102
  e.stopPropagation();
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/handle/style/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
@@ -0,0 +1 @@
1
+ export default ['system', 'entry', 'permission', 'graph', 'guanjia', 'case', 'celve1', 'shoucang', 'deal-type', 'pm', 'shoukuan', 'zhibiao', 'puzzle', 'user-group', 'yuce', 'jianmo', 'zhuanzhang', 'yunwei', 'baozhang', 'jizhang', 'tongji', 'pingfen', 'limit', 'spider', 'loan', 'access', 'role', 'org', 'celve', 'book', 'tag', 'shixufenxipeizhi', 'all-cases', 'xianeguanli', 'api', 'network', 'analysis', 'calendar', 'backup', 'all', 'attachment', 'chart-line', 'branches', 'chart-area', 'clock', 'check', 'charging-setting', 'chart-pie-alt', 'dashboard', 'datebase', 'check-reply', 'datacenter', 'connection', 'download', 'date-set', 'event', 'event-wait', 'fieldanalysis', 'exchange', 'knowledge', 'key', 'log', 'list', 'menu', 'index', 'project', 'monitorin', 'pointmap', 'ranking', 'model', 'plan', 'task', 'wait', 'upload', 'question-list', 'read', 'setting', 'reply', 'jinjianguanli', 'change-theme', 'application', 'flag-en', 'flag-cn', 'down', 'up', 'workflow', 'sync', 'folder', 'database', 'circle', 'edit', 'edit-color', 'box', 'layer', 'box-color', 'home-color', 'record', 'monitor', 'time-color', 'user', 'function-color', 'record-color', 'warning-color', 'layer-color', 'template', 'template-color', 'monitor-color', 'search', 'user-color', 'function', 'warning', 'search-color', 'home', 'time', 'application', 'plus', 'minus'];
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/icon-list/style/index.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,QAAQ;IACR,OAAO;IACP,YAAY;IACZ,OAAO;IACP,SAAS;IACT,MAAM;IACN,QAAQ;IACR,UAAU;IACV,WAAW;IACX,IAAI;IACJ,UAAU;IACV,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,MAAM;IACN,QAAQ;IACR,YAAY;IACZ,QAAQ;IACR,UAAU;IACV,SAAS;IACT,QAAQ;IACR,SAAS;IACT,OAAO;IACP,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,MAAM;IACN,KAAK;IACL,OAAO;IACP,MAAM;IACN,KAAK;IACL,kBAAkB;IAClB,WAAW;IACX,aAAa;IACb,KAAK;IACL,SAAS;IACT,UAAU;IACV,UAAU;IACV,QAAQ;IACR,KAAK;IACL,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,OAAO;IACP,OAAO;IACP,kBAAkB;IAClB,eAAe;IACf,WAAW;IACX,UAAU;IACV,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,UAAU;IACV,OAAO;IACP,YAAY;IACZ,eAAe;IACf,UAAU;IACV,WAAW;IACX,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,OAAO;IACP,SAAS;IACT,WAAW;IACX,UAAU;IACV,SAAS;IACT,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,QAAQ;IACR,eAAe;IACf,MAAM;IACN,SAAS;IACT,OAAO;IACP,eAAe;IACf,cAAc;IACd,aAAa;IACb,SAAS;IACT,SAAS;IACT,MAAM;IACN,IAAI;IACJ,UAAU;IACV,MAAM;IACN,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,MAAM;IACN,YAAY;IACZ,KAAK;IACL,OAAO;IACP,WAAW;IACX,YAAY;IACZ,QAAQ;IACR,SAAS;IACT,YAAY;IACZ,MAAM;IACN,gBAAgB;IAChB,cAAc;IACd,eAAe;IACf,aAAa;IACb,UAAU;IACV,gBAAgB;IAChB,eAAe;IACf,QAAQ;IACR,YAAY;IACZ,UAAU;IACV,SAAS;IACT,cAAc;IACd,MAAM;IACN,MAAM;IACN,aAAa;IACb,MAAM;IACN,OAAO;CACR,CAAA","sourcesContent":["export default [\n 'system',\n 'entry',\n 'permission',\n 'graph',\n 'guanjia',\n 'case',\n 'celve1',\n 'shoucang',\n 'deal-type',\n 'pm',\n 'shoukuan',\n 'zhibiao',\n 'puzzle',\n 'user-group',\n 'yuce',\n 'jianmo',\n 'zhuanzhang',\n 'yunwei',\n 'baozhang',\n 'jizhang',\n 'tongji',\n 'pingfen',\n 'limit',\n 'spider',\n 'loan',\n 'access',\n 'role',\n 'org',\n 'celve',\n 'book',\n 'tag',\n 'shixufenxipeizhi',\n 'all-cases',\n 'xianeguanli',\n 'api',\n 'network',\n 'analysis',\n 'calendar',\n 'backup',\n 'all',\n 'attachment',\n 'chart-line',\n 'branches',\n 'chart-area',\n 'clock',\n 'check',\n 'charging-setting',\n 'chart-pie-alt',\n 'dashboard',\n 'datebase',\n 'check-reply',\n 'datacenter',\n 'connection',\n 'download',\n 'date-set',\n 'event',\n 'event-wait',\n 'fieldanalysis',\n 'exchange',\n 'knowledge',\n 'key',\n 'log',\n 'list',\n 'menu',\n 'index',\n 'project',\n 'monitorin',\n 'pointmap',\n 'ranking',\n 'model',\n 'plan',\n 'task',\n 'wait',\n 'upload',\n 'question-list',\n 'read',\n 'setting',\n 'reply',\n 'jinjianguanli',\n 'change-theme',\n 'application',\n 'flag-en',\n 'flag-cn',\n 'down',\n 'up',\n 'workflow',\n 'sync',\n 'folder',\n 'database',\n 'circle',\n 'edit',\n 'edit-color',\n 'box',\n 'layer',\n 'box-color',\n 'home-color',\n 'record',\n 'monitor',\n 'time-color',\n 'user',\n 'function-color',\n 'record-color',\n 'warning-color',\n 'layer-color',\n 'template',\n 'template-color',\n 'monitor-color',\n 'search',\n 'user-color',\n 'function',\n 'warning',\n 'search-color',\n 'home',\n 'time',\n 'application',\n 'plus',\n 'minus',\n]\n"]}