tntd 2.6.4 → 2.6.5

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 (743) hide show
  1. package/es/affix/index.js +1 -2
  2. package/es/alert/index.js +1 -2
  3. package/es/anchor/index.js +1 -2
  4. package/es/array-input/icon.js +24 -6
  5. package/es/array-input/index.js +203 -119
  6. package/es/auth-context/index.js +1 -2
  7. package/es/auto-complete/index.js +1 -2
  8. package/es/avatar/index.js +1 -2
  9. package/es/back-top/index.js +1 -2
  10. package/es/badge/index.js +1 -2
  11. package/es/breadcrumb/index.js +1 -2
  12. package/es/button/index.js +1 -2
  13. package/es/calendar/index.js +1 -2
  14. package/es/card/index.js +1 -2
  15. package/es/carousel/index.js +1 -2
  16. package/es/cascader/index.js +1 -2
  17. package/es/checkbox/index.js +1 -2
  18. package/es/col/index.js +1 -2
  19. package/es/collapse/index.js +1 -2
  20. package/es/color-picker/ColorPicker.js +126 -80
  21. package/es/color-picker/index.js +8 -5
  22. package/es/columns/index.js +66 -30
  23. package/es/columns/style/index.js +1 -2
  24. package/es/comment/index.js +1 -2
  25. package/es/config-provider/config-provider.js +1 -2
  26. package/es/config-provider/index.js +1 -2
  27. package/es/date-picker/index.js +1 -2
  28. package/es/descriptions/descriptions.js +38 -30
  29. package/es/descriptions/index.js +1 -2
  30. package/es/development-login/LoginModal.js +81 -46
  31. package/es/development-login/index.js +17 -8
  32. package/es/divider/index.js +1 -2
  33. package/es/drawer/drawer.js +27 -20
  34. package/es/drawer/index.js +1 -2
  35. package/es/dropdown/index.js +1 -2
  36. package/es/ellipsis/Svg/CopySVG.js +63 -16
  37. package/es/ellipsis/Svg/TickSVG.js +41 -11
  38. package/es/ellipsis/index.js +115 -78
  39. package/es/empty/empty.js +58 -48
  40. package/es/empty/empty.stories.js +5 -6
  41. package/es/empty/index.js +1 -2
  42. package/es/exception/exception.js +32 -19
  43. package/es/exception/index.js +1 -2
  44. package/es/form/index.js +1 -2
  45. package/es/handle/index.js +110 -71
  46. package/es/icon/index.js +1 -2
  47. package/es/icon-list/index.js +1 -120
  48. package/es/img/Contain.js +60 -39
  49. package/es/img/Cover.js +98 -72
  50. package/es/img/index.js +48 -32
  51. package/es/index.js +1 -2
  52. package/es/input/index.js +1 -2
  53. package/es/input/input.js +98 -52
  54. package/es/input/input.js.map +1 -1
  55. package/es/input-number/index.js +1 -2
  56. package/es/label/index.js +115 -98
  57. package/es/label/label.js +140 -0
  58. package/es/label/label.js.map +1 -0
  59. package/es/label/label.test.js +12 -0
  60. package/es/label/label.test.js.map +1 -0
  61. package/es/layout/index.js +1 -2
  62. package/es/list/index.js +1 -2
  63. package/es/loading-button/index.js +33 -28
  64. package/es/locale/default.js +3 -4
  65. package/es/locale/en_US.js +30 -31
  66. package/es/locale/index.js +1 -2
  67. package/es/locale/zh_CN.js +30 -31
  68. package/es/locale-provider/index.js +2 -3
  69. package/es/mentions/index.js +1 -2
  70. package/es/menu/index.js +1 -2
  71. package/es/message/index.js +1 -2
  72. package/es/modal/index.js +1 -2
  73. package/es/modal/modal.js +20 -17
  74. package/es/notification/index.js +1 -2
  75. package/es/page/Box.js +49 -33
  76. package/es/page/index.js +119 -84
  77. package/es/page/utils.js +12 -14
  78. package/es/page-header/index.js +1 -2
  79. package/es/pagination/index.js +1 -2
  80. package/es/popconfirm/index.js +1 -2
  81. package/es/popover/index.js +1 -2
  82. package/es/prev-locale.js +49 -47
  83. package/es/progress/index.js +1 -2
  84. package/es/query-form/Field/Checkbox.js +20 -17
  85. package/es/query-form/Field/Select.js +54 -39
  86. package/es/query-form/Field/SelectInput.js +63 -45
  87. package/es/query-form/Field/fieldsMap.js +19 -20
  88. package/es/query-form/Field/index.js +104 -66
  89. package/es/query-form/createActions.js +46 -46
  90. package/es/query-form/index.js +327 -247
  91. package/es/query-form/index.js.map +1 -1
  92. package/es/query-form/useForm.js +3 -4
  93. package/es/query-list-scene/List.js +321 -255
  94. package/es/query-list-scene/QueryForm.js +132 -94
  95. package/es/query-list-scene/QueryListScene.js +29 -21
  96. package/es/query-list-scene/Title.js +6 -4
  97. package/es/query-list-scene/Toolbar.js +21 -15
  98. package/es/query-list-scene/createActions.js +60 -60
  99. package/es/query-list-scene/index.js +1 -2
  100. package/es/query-list-scene/useActions.js +3 -4
  101. package/es/radio/index.js +1 -2
  102. package/es/rate/index.js +1 -2
  103. package/es/render-empty/index.js +1 -2
  104. package/es/render-empty/render-empty.js +19 -16
  105. package/es/result/index.js +1 -2
  106. package/es/row/index.js +1 -2
  107. package/es/select/index.js +1 -2
  108. package/es/select/select.js +26 -21
  109. package/es/select/select.js.map +1 -1
  110. package/es/skeleton/index.js +1 -2
  111. package/es/slider/index.js +1 -2
  112. package/es/spin/index.js +1 -2
  113. package/es/statistic/index.js +1 -2
  114. package/es/steps/index.js +1 -2
  115. package/es/steps/steps.js +51 -35
  116. package/es/svg-components/illustration-403.js +206 -58
  117. package/es/svg-components/illustration-404.js +290 -75
  118. package/es/svg-components/illustration-500.js +321 -83
  119. package/es/svg-components/illustration-empty.js +54 -15
  120. package/es/svg-components/illustration-failure.js +112 -36
  121. package/es/svg-components/illustration-no-access.js +114 -35
  122. package/es/svg-components/illustration-no-chart.js +134 -37
  123. package/es/svg-components/illustration-no-result.js +92 -32
  124. package/es/svg-components/illustration-offline.js +131 -43
  125. package/es/svg-components/illustration-success.js +137 -43
  126. package/es/svg-components/index.js +1 -2
  127. package/es/switch/index.js +1 -2
  128. package/es/table/assets/image-loading-background.js +45 -17
  129. package/es/table/assets/image-loading.js +26 -5
  130. package/es/table/constants.js +1 -2
  131. package/es/table/context.js +1 -2
  132. package/es/table/hooks/index.js +1 -2
  133. package/es/table/hooks/use-column-setting.js +13 -16
  134. package/es/table/index.js +1 -2
  135. package/es/table/table.js +80 -55
  136. package/es/table/table.stories.js +148 -139
  137. package/es/table/utils.js +17 -18
  138. package/es/tabs/index.js +1 -2
  139. package/es/tag/index.js +1 -2
  140. package/es/time-picker/index.js +1 -2
  141. package/es/timeline/index.js +1 -2
  142. package/es/title/index.js +34 -20
  143. package/es/tntd-cascader/AntdCascader/component/DisabledContext.js +9 -5
  144. package/es/tntd-cascader/AntdCascader/component/FormItemInputContext.js +1 -2
  145. package/es/tntd-cascader/AntdCascader/component/SizeContext.js +1 -2
  146. package/es/tntd-cascader/AntdCascader/component/context.js +5 -7
  147. package/es/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +22 -10
  148. package/es/tntd-cascader/AntdCascader/component/getIcons.js +72 -50
  149. package/es/tntd-cascader/AntdCascader/component/useCompactItemContext.js +22 -20
  150. package/es/tntd-cascader/AntdCascader/config/utils.js +17 -18
  151. package/es/tntd-cascader/AntdCascader/config/warning.js +9 -10
  152. package/es/tntd-cascader/AntdCascader/index.js +189 -118
  153. package/es/tntd-cascader/AntdCascader/interface.js +1 -2
  154. package/es/tntd-cascader/index.js +1 -2
  155. package/es/tntd-cascader/rc-cascader/Cascader.js +256 -239
  156. package/es/tntd-cascader/rc-cascader/OptionList/Checkbox.js +21 -11
  157. package/es/tntd-cascader/rc-cascader/OptionList/Column.js +175 -116
  158. package/es/tntd-cascader/rc-cascader/OptionList/index.js +180 -128
  159. package/es/tntd-cascader/rc-cascader/OptionList/useActive.js +22 -19
  160. package/es/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +144 -137
  161. package/es/tntd-cascader/rc-cascader/context.js +1 -2
  162. package/es/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +44 -37
  163. package/es/tntd-cascader/rc-cascader/hooks/useEntities.js +25 -24
  164. package/es/tntd-cascader/rc-cascader/hooks/useMissingValues.js +15 -17
  165. package/es/tntd-cascader/rc-cascader/hooks/useRefFunc.js +7 -8
  166. package/es/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +20 -21
  167. package/es/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +51 -41
  168. package/es/tntd-cascader/rc-cascader/index.js +1 -2
  169. package/es/tntd-cascader/rc-cascader/utils/commonUtil.js +33 -27
  170. package/es/tntd-cascader/rc-cascader/utils/treeUtil.js +29 -32
  171. package/es/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +26 -23
  172. package/es/tntd-form/TntdForm/components/Item.js +42 -30
  173. package/es/tntd-form/TntdForm/components/ItemComp.js +167 -158
  174. package/es/tntd-form/TntdForm/components/ItemComp.js.map +1 -1
  175. package/es/tntd-form/TntdForm/components/List.js +89 -78
  176. package/es/tntd-form/TntdForm/index.js +38 -33
  177. package/es/tntd-form/TntdForm/interface.js +1 -2
  178. package/es/tntd-form/TntdForm/store.js +1 -2
  179. package/es/tntd-form/TntdForm/utils.js +158 -168
  180. package/es/tntd-form/index.js +1 -2
  181. package/es/tntd-icon/fonts/iconfont.js +36 -53
  182. package/es/tntd-icon/index.js +23 -17
  183. package/es/tntd-layout/ActionsContext.js +1 -2
  184. package/es/tntd-layout/AppList.js +135 -77
  185. package/es/tntd-layout/Application.js +42 -29
  186. package/es/tntd-layout/Avatar.js +80 -42
  187. package/es/tntd-layout/CompatibleLanguage.js +93 -56
  188. package/es/tntd-layout/EnterpriseLayout/Avatar.js +93 -47
  189. package/es/tntd-layout/EnterpriseLayout/Language.js +56 -34
  190. package/es/tntd-layout/EnterpriseLayout/Theme.js +45 -24
  191. package/es/tntd-layout/EnterpriseLayout/index.js +17 -9
  192. package/es/tntd-layout/GlobalNavigation/NavigationPopup.js +212 -153
  193. package/es/tntd-layout/GlobalNavigation/index.js +84 -50
  194. package/es/tntd-layout/Header.js +59 -26
  195. package/es/tntd-layout/HeaderActions.js +83 -34
  196. package/es/tntd-layout/HeaderNavs.js +46 -35
  197. package/es/tntd-layout/HeaderTabs.js +176 -140
  198. package/es/tntd-layout/Iconfont.js +1 -2
  199. package/es/tntd-layout/Language.js +55 -33
  200. package/es/tntd-layout/Layout.js +176 -78
  201. package/es/tntd-layout/Logo.js +52 -40
  202. package/es/tntd-layout/OrgAppList.js +208 -139
  203. package/es/tntd-layout/SideMenu.js +230 -160
  204. package/es/tntd-layout/Theme.js +47 -29
  205. package/es/tntd-layout/createActions.js +28 -29
  206. package/es/tntd-layout/images/index.js +31 -32
  207. package/es/tntd-layout/index.js +92 -60
  208. package/es/tntd-layout/paaslayout/CompactSideMenu.js +109 -65
  209. package/es/tntd-layout/paaslayout/Header.js +37 -14
  210. package/es/tntd-layout/paaslayout/Logo.js +2 -3
  211. package/es/tntd-layout/paaslayout/SideMenu.js +109 -63
  212. package/es/tntd-layout/paaslayout/index.js +159 -79
  213. package/es/tntd-layout/storage.js +18 -11
  214. package/es/tntd-modal/index.js +73 -32
  215. package/es/tntd-second-page/index.js +47 -24
  216. package/es/tntd-select/DropDownWrap.js +73 -52
  217. package/es/tntd-select/index.js +585 -498
  218. package/es/tooltip/index.js +1 -2
  219. package/es/transfer/index.js +1 -2
  220. package/es/tree/index.js +1 -2
  221. package/es/tree-select/index.js +1 -2
  222. package/es/typography/index.js +1 -2
  223. package/es/upload/index.js +1 -2
  224. package/es/utils/checkAuth.js +24 -21
  225. package/es/utils/findMenuInfoByPath.js +33 -30
  226. package/es/utils/index.js +65 -59
  227. package/es/version/index.js +1 -2
  228. package/lib/affix/index.d.ts +3 -3
  229. package/lib/affix/index.js +24 -19
  230. package/lib/affix/index.js.map +1 -1
  231. package/lib/alert/index.d.ts +3 -3
  232. package/lib/alert/index.js +24 -19
  233. package/lib/alert/index.js.map +1 -1
  234. package/lib/anchor/index.d.ts +3 -3
  235. package/lib/anchor/index.js +24 -19
  236. package/lib/anchor/index.js.map +1 -1
  237. package/lib/array-input/icon.js +33 -12
  238. package/lib/array-input/index.js +254 -146
  239. package/lib/array-input/index.js.map +1 -1
  240. package/lib/auth-context/index.js +10 -4
  241. package/lib/auto-complete/index.d.ts +3 -3
  242. package/lib/auto-complete/index.js +24 -19
  243. package/lib/auto-complete/index.js.map +1 -1
  244. package/lib/avatar/index.d.ts +3 -3
  245. package/lib/avatar/index.js +24 -19
  246. package/lib/avatar/index.js.map +1 -1
  247. package/lib/back-top/index.d.ts +3 -3
  248. package/lib/back-top/index.js +24 -19
  249. package/lib/back-top/index.js.map +1 -1
  250. package/lib/badge/index.d.ts +3 -3
  251. package/lib/badge/index.js +24 -19
  252. package/lib/badge/index.js.map +1 -1
  253. package/lib/breadcrumb/index.d.ts +3 -3
  254. package/lib/breadcrumb/index.js +24 -19
  255. package/lib/breadcrumb/index.js.map +1 -1
  256. package/lib/button/index.d.ts +3 -3
  257. package/lib/button/index.js +24 -19
  258. package/lib/button/index.js.map +1 -1
  259. package/lib/calendar/index.d.ts +3 -3
  260. package/lib/calendar/index.js +24 -19
  261. package/lib/calendar/index.js.map +1 -1
  262. package/lib/card/index.d.ts +3 -3
  263. package/lib/card/index.js +24 -19
  264. package/lib/card/index.js.map +1 -1
  265. package/lib/carousel/index.d.ts +3 -3
  266. package/lib/carousel/index.js +24 -19
  267. package/lib/carousel/index.js.map +1 -1
  268. package/lib/cascader/index.d.ts +3 -3
  269. package/lib/cascader/index.js +24 -19
  270. package/lib/cascader/index.js.map +1 -1
  271. package/lib/checkbox/index.d.ts +3 -3
  272. package/lib/checkbox/index.js +24 -19
  273. package/lib/checkbox/index.js.map +1 -1
  274. package/lib/col/index.d.ts +3 -3
  275. package/lib/col/index.js +24 -19
  276. package/lib/col/index.js.map +1 -1
  277. package/lib/collapse/index.d.ts +3 -3
  278. package/lib/collapse/index.js +25 -20
  279. package/lib/collapse/index.js.map +1 -1
  280. package/lib/color-picker/ColorPicker.js +156 -109
  281. package/lib/color-picker/ColorPicker.js.map +1 -1
  282. package/lib/color-picker/index.js +18 -14
  283. package/lib/color-picker/index.js.map +1 -1
  284. package/lib/columns/index.js +81 -41
  285. package/lib/columns/style/index.js +1 -2
  286. package/lib/comment/index.d.ts +3 -3
  287. package/lib/comment/index.js +24 -19
  288. package/lib/comment/index.js.map +1 -1
  289. package/lib/config-provider/config-provider.d.ts +1 -1
  290. package/lib/config-provider/config-provider.js +12 -8
  291. package/lib/config-provider/config-provider.js.map +1 -1
  292. package/lib/config-provider/index.d.ts +3 -3
  293. package/lib/config-provider/index.js +24 -19
  294. package/lib/config-provider/index.js.map +1 -1
  295. package/lib/date-picker/index.d.ts +3 -3
  296. package/lib/date-picker/index.js +24 -19
  297. package/lib/date-picker/index.js.map +1 -1
  298. package/lib/descriptions/descriptions.d.ts +4 -4
  299. package/lib/descriptions/descriptions.d.ts.map +1 -1
  300. package/lib/descriptions/descriptions.js +64 -51
  301. package/lib/descriptions/descriptions.js.map +1 -1
  302. package/lib/descriptions/index.d.ts +1 -1
  303. package/lib/descriptions/index.js +23 -18
  304. package/lib/descriptions/index.js.map +1 -1
  305. package/lib/development-login/LoginModal.js +110 -75
  306. package/lib/development-login/LoginModal.js.map +1 -1
  307. package/lib/development-login/index.js +42 -31
  308. package/lib/development-login/index.js.map +1 -1
  309. package/lib/divider/index.d.ts +3 -3
  310. package/lib/divider/index.js +24 -19
  311. package/lib/divider/index.js.map +1 -1
  312. package/lib/drawer/drawer.d.ts +1 -1
  313. package/lib/drawer/drawer.js +41 -30
  314. package/lib/drawer/drawer.js.map +1 -1
  315. package/lib/drawer/index.d.ts +2 -2
  316. package/lib/drawer/index.js +22 -16
  317. package/lib/drawer/index.js.map +1 -1
  318. package/lib/dropdown/index.d.ts +3 -3
  319. package/lib/dropdown/index.js +24 -19
  320. package/lib/dropdown/index.js.map +1 -1
  321. package/lib/ellipsis/Svg/CopySVG.js +70 -20
  322. package/lib/ellipsis/Svg/TickSVG.js +48 -15
  323. package/lib/ellipsis/index.js +146 -111
  324. package/lib/ellipsis/index.js.map +1 -1
  325. package/lib/empty/empty.d.ts +2 -2
  326. package/lib/empty/empty.js +90 -71
  327. package/lib/empty/empty.js.map +1 -1
  328. package/lib/empty/empty.stories.js +19 -18
  329. package/lib/empty/index.d.ts +1 -1
  330. package/lib/empty/index.js +21 -16
  331. package/lib/empty/index.js.map +1 -1
  332. package/lib/exception/exception.js +46 -31
  333. package/lib/exception/exception.js.map +1 -1
  334. package/lib/exception/index.js +20 -15
  335. package/lib/exception/index.js.map +1 -1
  336. package/lib/form/index.d.ts +3 -3
  337. package/lib/form/index.js +24 -19
  338. package/lib/form/index.js.map +1 -1
  339. package/lib/handle/index.js +140 -100
  340. package/lib/handle/index.js.map +1 -1
  341. package/lib/icon/index.d.ts +3 -3
  342. package/lib/icon/index.js +24 -19
  343. package/lib/icon/index.js.map +1 -1
  344. package/lib/icon-list/index.js +7 -121
  345. package/lib/img/Contain.js +69 -44
  346. package/lib/img/Cover.js +117 -78
  347. package/lib/img/index.js +74 -56
  348. package/lib/img/index.js.map +1 -1
  349. package/lib/index.js +621 -186
  350. package/lib/input/index.d.ts +1 -1
  351. package/lib/input/index.js +21 -16
  352. package/lib/input/index.js.map +1 -1
  353. package/lib/input/input.d.ts +18 -9
  354. package/lib/input/input.d.ts.map +1 -1
  355. package/lib/input/input.js +91 -61
  356. package/lib/input/input.js.map +1 -1
  357. package/lib/input-number/index.d.ts +3 -3
  358. package/lib/input-number/index.js +24 -19
  359. package/lib/input-number/index.js.map +1 -1
  360. package/lib/label/index.d.ts +2 -2
  361. package/lib/label/index.js +134 -133
  362. package/lib/label/index.js.map +1 -1
  363. package/lib/label/label.d.ts +52 -0
  364. package/lib/label/label.d.ts.map +1 -0
  365. package/lib/label/label.js +150 -0
  366. package/lib/label/label.js.map +1 -0
  367. package/lib/label/label.test.d.ts +2 -0
  368. package/lib/label/label.test.d.ts.map +1 -0
  369. package/lib/label/label.test.js +14 -0
  370. package/lib/label/label.test.js.map +1 -0
  371. package/lib/layout/index.d.ts +3 -3
  372. package/lib/layout/index.js +24 -19
  373. package/lib/layout/index.js.map +1 -1
  374. package/lib/list/index.d.ts +3 -3
  375. package/lib/list/index.js +24 -19
  376. package/lib/list/index.js.map +1 -1
  377. package/lib/loading-button/index.js +58 -51
  378. package/lib/loading-button/index.js.map +1 -1
  379. package/lib/locale/default.js +12 -10
  380. package/lib/locale/default.js.map +1 -1
  381. package/lib/locale/en_US.js +38 -36
  382. package/lib/locale/en_US.js.map +1 -1
  383. package/lib/locale/index.js +37 -15
  384. package/lib/locale/index.js.map +1 -1
  385. package/lib/locale/zh_CN.js +38 -36
  386. package/lib/locale/zh_CN.js.map +1 -1
  387. package/lib/locale-provider/index.d.ts +3 -3
  388. package/lib/locale-provider/index.js +27 -22
  389. package/lib/locale-provider/index.js.map +1 -1
  390. package/lib/mention/index.js.map +1 -1
  391. package/lib/mentions/index.d.ts +3 -3
  392. package/lib/mentions/index.js +24 -19
  393. package/lib/mentions/index.js.map +1 -1
  394. package/lib/menu/index.d.ts +3 -3
  395. package/lib/menu/index.js +24 -19
  396. package/lib/menu/index.js.map +1 -1
  397. package/lib/message/index.d.ts +3 -3
  398. package/lib/message/index.js +24 -19
  399. package/lib/message/index.js.map +1 -1
  400. package/lib/modal/index.d.ts +1 -1
  401. package/lib/modal/index.js +23 -18
  402. package/lib/modal/index.js.map +1 -1
  403. package/lib/modal/modal.d.ts +9 -9
  404. package/lib/modal/modal.js +53 -45
  405. package/lib/modal/modal.js.map +1 -1
  406. package/lib/notification/index.d.ts +3 -3
  407. package/lib/notification/index.js +24 -19
  408. package/lib/notification/index.js.map +1 -1
  409. package/lib/page/Box.js +66 -40
  410. package/lib/page/index.js +147 -95
  411. package/lib/page/utils.js +22 -16
  412. package/lib/page-header/index.d.ts +3 -3
  413. package/lib/page-header/index.js +24 -19
  414. package/lib/page-header/index.js.map +1 -1
  415. package/lib/pagination/index.d.ts +3 -3
  416. package/lib/pagination/index.js +24 -19
  417. package/lib/pagination/index.js.map +1 -1
  418. package/lib/popconfirm/index.d.ts +3 -3
  419. package/lib/popconfirm/index.js +24 -19
  420. package/lib/popconfirm/index.js.map +1 -1
  421. package/lib/popover/index.d.ts +3 -3
  422. package/lib/popover/index.js +24 -19
  423. package/lib/popover/index.js.map +1 -1
  424. package/lib/prev-locale.js +67 -53
  425. package/lib/progress/index.d.ts +3 -3
  426. package/lib/progress/index.js +24 -19
  427. package/lib/progress/index.js.map +1 -1
  428. package/lib/query-form/Field/Checkbox.js +28 -22
  429. package/lib/query-form/Field/Select.js +79 -64
  430. package/lib/query-form/Field/Select.js.map +1 -1
  431. package/lib/query-form/Field/SelectInput.js +85 -69
  432. package/lib/query-form/Field/SelectInput.js.map +1 -1
  433. package/lib/query-form/Field/fieldsMap.d.ts +2 -2
  434. package/lib/query-form/Field/fieldsMap.js +34 -32
  435. package/lib/query-form/Field/index.d.ts +6 -0
  436. package/lib/query-form/Field/index.d.ts.map +1 -1
  437. package/lib/query-form/Field/index.js +139 -91
  438. package/lib/query-form/Field/index.js.map +1 -1
  439. package/lib/query-form/createActions.js +53 -50
  440. package/lib/query-form/index.d.ts +9 -0
  441. package/lib/query-form/index.d.ts.map +1 -1
  442. package/lib/query-form/index.js +377 -282
  443. package/lib/query-form/index.js.map +1 -1
  444. package/lib/query-form/useForm.js +11 -11
  445. package/lib/query-list-scene/List.d.ts +13 -0
  446. package/lib/query-list-scene/List.d.ts.map +1 -1
  447. package/lib/query-list-scene/List.js +360 -285
  448. package/lib/query-list-scene/List.js.map +1 -1
  449. package/lib/query-list-scene/QueryForm.d.ts +3 -0
  450. package/lib/query-list-scene/QueryForm.d.ts.map +1 -1
  451. package/lib/query-list-scene/QueryForm.js +161 -103
  452. package/lib/query-list-scene/QueryListScene.d.ts +1 -0
  453. package/lib/query-list-scene/QueryListScene.d.ts.map +1 -1
  454. package/lib/query-list-scene/QueryListScene.js +66 -31
  455. package/lib/query-list-scene/Title.js +15 -9
  456. package/lib/query-list-scene/Toolbar.js +31 -20
  457. package/lib/query-list-scene/createActions.js +79 -64
  458. package/lib/query-list-scene/index.js +28 -24
  459. package/lib/query-list-scene/useActions.js +11 -11
  460. package/lib/radio/index.d.ts +3 -3
  461. package/lib/radio/index.js +24 -19
  462. package/lib/radio/index.js.map +1 -1
  463. package/lib/rate/index.d.ts +3 -3
  464. package/lib/rate/index.js +24 -19
  465. package/lib/rate/index.js.map +1 -1
  466. package/lib/render-empty/index.js +8 -4
  467. package/lib/render-empty/render-empty.js +28 -22
  468. package/lib/render-empty/render-empty.js.map +1 -1
  469. package/lib/result/index.d.ts +3 -3
  470. package/lib/result/index.js +24 -19
  471. package/lib/result/index.js.map +1 -1
  472. package/lib/row/index.d.ts +3 -3
  473. package/lib/row/index.js +24 -19
  474. package/lib/row/index.js.map +1 -1
  475. package/lib/select/index.d.ts +2 -2
  476. package/lib/select/index.js +22 -16
  477. package/lib/select/index.js.map +1 -1
  478. package/lib/select/select.d.ts +9 -7
  479. package/lib/select/select.d.ts.map +1 -1
  480. package/lib/select/select.js +39 -30
  481. package/lib/select/select.js.map +1 -1
  482. package/lib/skeleton/index.d.ts +3 -3
  483. package/lib/skeleton/index.js +24 -19
  484. package/lib/skeleton/index.js.map +1 -1
  485. package/lib/slider/index.d.ts +3 -3
  486. package/lib/slider/index.js +24 -19
  487. package/lib/slider/index.js.map +1 -1
  488. package/lib/spin/index.d.ts +3 -3
  489. package/lib/spin/index.js +24 -19
  490. package/lib/spin/index.js.map +1 -1
  491. package/lib/statistic/index.d.ts +3 -3
  492. package/lib/statistic/index.js +24 -19
  493. package/lib/statistic/index.js.map +1 -1
  494. package/lib/steps/index.d.ts +1 -1
  495. package/lib/steps/index.js +21 -16
  496. package/lib/steps/index.js.map +1 -1
  497. package/lib/steps/steps.d.ts +3 -3
  498. package/lib/steps/steps.js +72 -55
  499. package/lib/steps/steps.js.map +1 -1
  500. package/lib/svg-components/illustration-403.d.ts +1 -1
  501. package/lib/svg-components/illustration-403.js +217 -80
  502. package/lib/svg-components/illustration-403.js.map +1 -1
  503. package/lib/svg-components/illustration-404.d.ts +1 -1
  504. package/lib/svg-components/illustration-404.js +301 -97
  505. package/lib/svg-components/illustration-404.js.map +1 -1
  506. package/lib/svg-components/illustration-500.d.ts +1 -1
  507. package/lib/svg-components/illustration-500.js +332 -105
  508. package/lib/svg-components/illustration-500.js.map +1 -1
  509. package/lib/svg-components/illustration-empty.d.ts +1 -1
  510. package/lib/svg-components/illustration-empty.js +65 -37
  511. package/lib/svg-components/illustration-empty.js.map +1 -1
  512. package/lib/svg-components/illustration-failure.d.ts +1 -1
  513. package/lib/svg-components/illustration-failure.js +123 -58
  514. package/lib/svg-components/illustration-failure.js.map +1 -1
  515. package/lib/svg-components/illustration-no-access.d.ts +1 -1
  516. package/lib/svg-components/illustration-no-access.js +125 -57
  517. package/lib/svg-components/illustration-no-access.js.map +1 -1
  518. package/lib/svg-components/illustration-no-chart.d.ts +1 -1
  519. package/lib/svg-components/illustration-no-chart.js +145 -59
  520. package/lib/svg-components/illustration-no-chart.js.map +1 -1
  521. package/lib/svg-components/illustration-no-result.d.ts +1 -1
  522. package/lib/svg-components/illustration-no-result.js +103 -54
  523. package/lib/svg-components/illustration-no-result.js.map +1 -1
  524. package/lib/svg-components/illustration-offline.d.ts +1 -1
  525. package/lib/svg-components/illustration-offline.js +142 -65
  526. package/lib/svg-components/illustration-offline.js.map +1 -1
  527. package/lib/svg-components/illustration-success.d.ts +1 -1
  528. package/lib/svg-components/illustration-success.js +148 -65
  529. package/lib/svg-components/illustration-success.js.map +1 -1
  530. package/lib/svg-components/index.js +75 -26
  531. package/lib/switch/index.d.ts +3 -3
  532. package/lib/switch/index.js +24 -19
  533. package/lib/switch/index.js.map +1 -1
  534. package/lib/table/assets/image-loading-background.d.ts +1 -1
  535. package/lib/table/assets/image-loading-background.js +56 -39
  536. package/lib/table/assets/image-loading-background.js.map +1 -1
  537. package/lib/table/assets/image-loading.d.ts +1 -1
  538. package/lib/table/assets/image-loading.js +37 -27
  539. package/lib/table/assets/image-loading.js.map +1 -1
  540. package/lib/table/constants.js +6 -3
  541. package/lib/table/context.js +7 -4
  542. package/lib/table/hooks/index.js +15 -13
  543. package/lib/table/hooks/index.js.map +1 -1
  544. package/lib/table/hooks/use-column-setting.d.ts +1 -1
  545. package/lib/table/hooks/use-column-setting.js +37 -20
  546. package/lib/table/hooks/use-column-setting.js.map +1 -1
  547. package/lib/table/index.d.ts +1 -1
  548. package/lib/table/index.js +21 -16
  549. package/lib/table/index.js.map +1 -1
  550. package/lib/table/table.d.ts +3 -3
  551. package/lib/table/table.js +114 -90
  552. package/lib/table/table.js.map +1 -1
  553. package/lib/table/table.stories.js +182 -154
  554. package/lib/table/utils.d.ts +1 -1
  555. package/lib/table/utils.js +24 -25
  556. package/lib/table/utils.js.map +1 -1
  557. package/lib/tabs/index.d.ts +3 -3
  558. package/lib/tabs/index.js +24 -19
  559. package/lib/tabs/index.js.map +1 -1
  560. package/lib/tag/index.d.ts +3 -3
  561. package/lib/tag/index.js +24 -19
  562. package/lib/tag/index.js.map +1 -1
  563. package/lib/time-picker/index.d.ts +3 -3
  564. package/lib/time-picker/index.js +24 -19
  565. package/lib/time-picker/index.js.map +1 -1
  566. package/lib/timeline/index.d.ts +3 -3
  567. package/lib/timeline/index.js +24 -19
  568. package/lib/timeline/index.js.map +1 -1
  569. package/lib/title/index.js +45 -26
  570. package/lib/tntd-cascader/AntdCascader/component/DisabledContext.js +18 -27
  571. package/lib/tntd-cascader/AntdCascader/component/DisabledContext.js.map +1 -1
  572. package/lib/tntd-cascader/AntdCascader/component/FormItemInputContext.js +9 -22
  573. package/lib/tntd-cascader/AntdCascader/component/FormItemInputContext.js.map +1 -1
  574. package/lib/tntd-cascader/AntdCascader/component/SizeContext.js +9 -22
  575. package/lib/tntd-cascader/AntdCascader/component/SizeContext.js.map +1 -1
  576. package/lib/tntd-cascader/AntdCascader/component/context.js +18 -16
  577. package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +36 -35
  578. package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js.map +1 -1
  579. package/lib/tntd-cascader/AntdCascader/component/getIcons.js +81 -71
  580. package/lib/tntd-cascader/AntdCascader/component/getIcons.js.map +1 -1
  581. package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +31 -46
  582. package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js.map +1 -1
  583. package/lib/tntd-cascader/AntdCascader/config/utils.d.ts +1 -1
  584. package/lib/tntd-cascader/AntdCascader/config/utils.js +29 -27
  585. package/lib/tntd-cascader/AntdCascader/config/warning.js +19 -31
  586. package/lib/tntd-cascader/AntdCascader/config/warning.js.map +1 -1
  587. package/lib/tntd-cascader/AntdCascader/index.js +216 -158
  588. package/lib/tntd-cascader/AntdCascader/index.js.map +1 -1
  589. package/lib/tntd-cascader/AntdCascader/interface.js +13 -6
  590. package/lib/tntd-cascader/img/no-data-s.png +0 -0
  591. package/lib/tntd-cascader/index.js +12 -8
  592. package/lib/tntd-cascader/rc-cascader/Cascader.js +325 -280
  593. package/lib/tntd-cascader/rc-cascader/Cascader.js.map +1 -1
  594. package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +30 -37
  595. package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js.map +1 -1
  596. package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +198 -148
  597. package/lib/tntd-cascader/rc-cascader/OptionList/Column.js.map +1 -1
  598. package/lib/tntd-cascader/rc-cascader/OptionList/index.js +223 -159
  599. package/lib/tntd-cascader/rc-cascader/OptionList/index.js.map +1 -1
  600. package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +40 -44
  601. package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js.map +1 -1
  602. package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +179 -162
  603. package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js.map +1 -1
  604. package/lib/tntd-cascader/rc-cascader/context.js +11 -23
  605. package/lib/tntd-cascader/rc-cascader/context.js.map +1 -1
  606. package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +62 -59
  607. package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js.map +1 -1
  608. package/lib/tntd-cascader/rc-cascader/hooks/useEntities.js +39 -45
  609. package/lib/tntd-cascader/rc-cascader/hooks/useEntities.js.map +1 -1
  610. package/lib/tntd-cascader/rc-cascader/hooks/useMissingValues.js +26 -37
  611. package/lib/tntd-cascader/rc-cascader/hooks/useMissingValues.js.map +1 -1
  612. package/lib/tntd-cascader/rc-cascader/hooks/useRefFunc.js +16 -29
  613. package/lib/tntd-cascader/rc-cascader/hooks/useRefFunc.js.map +1 -1
  614. package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +30 -47
  615. package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js.map +1 -1
  616. package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +75 -61
  617. package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js.map +1 -1
  618. package/lib/tntd-cascader/rc-cascader/index.js +9 -7
  619. package/lib/tntd-cascader/rc-cascader/utils/commonUtil.js +49 -38
  620. package/lib/tntd-cascader/rc-cascader/utils/treeUtil.js +42 -39
  621. package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +34 -30
  622. package/lib/tntd-form/TntdForm/components/Item.js +55 -57
  623. package/lib/tntd-form/TntdForm/components/Item.js.map +1 -1
  624. package/lib/tntd-form/TntdForm/components/ItemComp.js +203 -186
  625. package/lib/tntd-form/TntdForm/components/ItemComp.js.map +1 -1
  626. package/lib/tntd-form/TntdForm/components/List.js +118 -107
  627. package/lib/tntd-form/TntdForm/components/List.js.map +1 -1
  628. package/lib/tntd-form/TntdForm/index.js +61 -63
  629. package/lib/tntd-form/TntdForm/index.js.map +1 -1
  630. package/lib/tntd-form/TntdForm/interface.js +4 -2
  631. package/lib/tntd-form/TntdForm/store.js +8 -7
  632. package/lib/tntd-form/TntdForm/utils.js +182 -184
  633. package/lib/tntd-form/index.js +12 -8
  634. package/lib/tntd-icon/fonts/iconfont.js +36 -53
  635. package/lib/tntd-icon/index.js +40 -25
  636. package/lib/tntd-layout/ActionsContext.js +8 -4
  637. package/lib/tntd-layout/AppList.js +173 -220
  638. package/lib/tntd-layout/AppList.js.map +1 -1
  639. package/lib/tntd-layout/Application.js +75 -107
  640. package/lib/tntd-layout/Application.js.map +1 -1
  641. package/lib/tntd-layout/Avatar.js +100 -131
  642. package/lib/tntd-layout/Avatar.js.map +1 -1
  643. package/lib/tntd-layout/CompatibleLanguage.js +128 -176
  644. package/lib/tntd-layout/CompatibleLanguage.js.map +1 -1
  645. package/lib/tntd-layout/EnterpriseLayout/Avatar.js +117 -142
  646. package/lib/tntd-layout/EnterpriseLayout/Avatar.js.map +1 -1
  647. package/lib/tntd-layout/EnterpriseLayout/Language.js +73 -86
  648. package/lib/tntd-layout/EnterpriseLayout/Language.js.map +1 -1
  649. package/lib/tntd-layout/EnterpriseLayout/Theme.js +69 -98
  650. package/lib/tntd-layout/EnterpriseLayout/Theme.js.map +1 -1
  651. package/lib/tntd-layout/EnterpriseLayout/index.js +28 -17
  652. package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +283 -272
  653. package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js.map +1 -1
  654. package/lib/tntd-layout/GlobalNavigation/index.js +108 -111
  655. package/lib/tntd-layout/GlobalNavigation/index.js.map +1 -1
  656. package/lib/tntd-layout/Header.js +77 -132
  657. package/lib/tntd-layout/Header.js.map +1 -1
  658. package/lib/tntd-layout/HeaderActions.js +105 -102
  659. package/lib/tntd-layout/HeaderActions.js.map +1 -1
  660. package/lib/tntd-layout/HeaderNavs.js +78 -103
  661. package/lib/tntd-layout/HeaderNavs.js.map +1 -1
  662. package/lib/tntd-layout/HeaderTabs.js +224 -312
  663. package/lib/tntd-layout/HeaderTabs.js.map +1 -1
  664. package/lib/tntd-layout/Iconfont.js +11 -7
  665. package/lib/tntd-layout/Language.js +69 -72
  666. package/lib/tntd-layout/Language.js.map +1 -1
  667. package/lib/tntd-layout/Layout.js +214 -167
  668. package/lib/tntd-layout/Layout.js.map +1 -1
  669. package/lib/tntd-layout/Logo.js +69 -140
  670. package/lib/tntd-layout/Logo.js.map +1 -1
  671. package/lib/tntd-layout/OrgAppList.js +238 -384
  672. package/lib/tntd-layout/OrgAppList.js.map +1 -1
  673. package/lib/tntd-layout/SideMenu.js +269 -404
  674. package/lib/tntd-layout/SideMenu.js.map +1 -1
  675. package/lib/tntd-layout/Theme.js +75 -89
  676. package/lib/tntd-layout/Theme.js.map +1 -1
  677. package/lib/tntd-layout/createActions.js +45 -34
  678. package/lib/tntd-layout/images/avatar/empty.png +0 -0
  679. package/lib/tntd-layout/images/avatar/female1.png +0 -0
  680. package/lib/tntd-layout/images/avatar/female2.png +0 -0
  681. package/lib/tntd-layout/images/avatar/female3.png +0 -0
  682. package/lib/tntd-layout/images/avatar/female4.png +0 -0
  683. package/lib/tntd-layout/images/avatar/female5.png +0 -0
  684. package/lib/tntd-layout/images/avatar/female6.png +0 -0
  685. package/lib/tntd-layout/images/avatar/male1.png +0 -0
  686. package/lib/tntd-layout/images/avatar/male2.png +0 -0
  687. package/lib/tntd-layout/images/avatar/male3.png +0 -0
  688. package/lib/tntd-layout/images/avatar/male4.png +0 -0
  689. package/lib/tntd-layout/images/avatar/male5.png +0 -0
  690. package/lib/tntd-layout/images/avatar/male6.png +0 -0
  691. package/lib/tntd-layout/images/index.js +68 -66
  692. package/lib/tntd-layout/index.js +137 -91
  693. package/lib/tntd-layout/index.js.map +1 -1
  694. package/lib/tntd-layout/paaslayout/CompactSideMenu.js +131 -178
  695. package/lib/tntd-layout/paaslayout/CompactSideMenu.js.map +1 -1
  696. package/lib/tntd-layout/paaslayout/Header.js +51 -75
  697. package/lib/tntd-layout/paaslayout/Header.js.map +1 -1
  698. package/lib/tntd-layout/paaslayout/Logo.js +15 -30
  699. package/lib/tntd-layout/paaslayout/SideMenu.js +131 -143
  700. package/lib/tntd-layout/paaslayout/SideMenu.js.map +1 -1
  701. package/lib/tntd-layout/paaslayout/index.js +205 -137
  702. package/lib/tntd-layout/paaslayout/index.js.map +1 -1
  703. package/lib/tntd-layout/storage.js +58 -30
  704. package/lib/tntd-modal/index.js +98 -58
  705. package/lib/tntd-modal/index.js.map +1 -1
  706. package/lib/tntd-second-page/index.js +60 -33
  707. package/lib/tntd-second-page/index.js.map +1 -1
  708. package/lib/tntd-select/DropDownWrap.d.ts +10 -0
  709. package/lib/tntd-select/DropDownWrap.d.ts.map +1 -1
  710. package/lib/tntd-select/DropDownWrap.js +102 -74
  711. package/lib/tntd-select/DropDownWrap.js.map +1 -1
  712. package/lib/tntd-select/index.d.ts +13 -2
  713. package/lib/tntd-select/index.d.ts.map +1 -1
  714. package/lib/tntd-select/index.js +629 -532
  715. package/lib/tntd-select/index.js.map +1 -1
  716. package/lib/tooltip/index.d.ts +3 -3
  717. package/lib/tooltip/index.js +24 -19
  718. package/lib/tooltip/index.js.map +1 -1
  719. package/lib/transfer/index.d.ts +3 -3
  720. package/lib/transfer/index.js +24 -19
  721. package/lib/transfer/index.js.map +1 -1
  722. package/lib/tree/index.d.ts +3 -3
  723. package/lib/tree/index.js +24 -19
  724. package/lib/tree/index.js.map +1 -1
  725. package/lib/tree-select/index.d.ts +3 -3
  726. package/lib/tree-select/index.js +24 -19
  727. package/lib/tree-select/index.js.map +1 -1
  728. package/lib/typography/index.d.ts +3 -3
  729. package/lib/typography/index.js +24 -19
  730. package/lib/typography/index.js.map +1 -1
  731. package/lib/upload/index.d.ts +3 -3
  732. package/lib/upload/index.js +24 -19
  733. package/lib/upload/index.js.map +1 -1
  734. package/lib/utils/checkAuth.js +34 -23
  735. package/lib/utils/findMenuInfoByPath.js +41 -34
  736. package/lib/utils/index.js +117 -76
  737. package/lib/utils/index.js.map +1 -1
  738. package/lib/version/index.d.ts +3 -3
  739. package/lib/version/index.js +24 -19
  740. package/lib/version/index.js.map +1 -1
  741. package/package.json +2 -2
  742. package/es/tag/tag.less +0 -61
  743. package/lib/tag/tag.less +0 -61
package/es/page/index.js CHANGED
@@ -1,13 +1,10 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
1
+ var __rest = this && this.__rest || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
4
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
5
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
6
+ }
7
+ return t;
11
8
  };
12
9
  import cn from 'classnames';
13
10
  import React from 'react';
@@ -16,84 +13,122 @@ import Box from './Box';
16
13
  import { addUnitForValue, computeWidth } from './utils';
17
14
  import './index.less';
18
15
  const clsPrefix = 'tnt-page';
19
- const isPageBox = (child) => { var _a; return (child === null || child === void 0 ? void 0 : child.type) === Box || ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.pageBox); };
20
- const PageLayout = (_a) => {
21
- var _b;
22
- var { height = '100vh', headerHeight = 50, children, title, goBack, goBackText, center, extra, size = 'small', inLayout = false, className } = _a, restProps = __rest(_a, ["height", "headerHeight", "children", "title", "goBack", "goBackText", "center", "extra", "size", "inLayout", "className"]);
23
- // 如果传入只有数字,需要默认加px
24
- let computedHeaderHeight = addUnitForValue(headerHeight);
25
- let computedHeight = addUnitForValue(height);
26
- // 判断是否有标题栏
27
- if (!(title || extra || center)) {
28
- computedHeaderHeight = '0px';
16
+ const isPageBox = child => {
17
+ var _a;
18
+ return (child === null || child === void 0 ? void 0 : child.type) === Box || ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.pageBox);
19
+ };
20
+ const PageLayout = _a => {
21
+ var _b;
22
+ var {
23
+ height = '100vh',
24
+ headerHeight = 50,
25
+ children,
26
+ title,
27
+ goBack,
28
+ goBackText,
29
+ center,
30
+ extra,
31
+ size = 'small',
32
+ inLayout = false,
33
+ className
34
+ } = _a,
35
+ restProps = __rest(_a, ["height", "headerHeight", "children", "title", "goBack", "goBackText", "center", "extra", "size", "inLayout", "className"]);
36
+ // 如果传入只有数字,需要默认加px
37
+ let computedHeaderHeight = addUnitForValue(headerHeight);
38
+ let computedHeight = addUnitForValue(height);
39
+ // 判断是否有标题栏
40
+ if (!(title || extra || center)) {
41
+ computedHeaderHeight = '0px';
42
+ }
43
+ if (inLayout) {
44
+ computedHeaderHeight = '40px';
45
+ }
46
+ // 计算中间的zIndex,灰色递减,白色递增
47
+ let whiteCols = 0;
48
+ let childrenToArray = [];
49
+ // 计算children type是box的数量
50
+ let boxCount = 0;
51
+ // 如果children是单个节点,统一转为数组处理计算层级
52
+ if (typeof children === 'object') {
53
+ childrenToArray = [children];
54
+ } else if (Array.isArray(children)) {
55
+ childrenToArray = [...children];
56
+ }
57
+ React.Children.map(children, child => {
58
+ if (isPageBox(child)) {
59
+ boxCount += 1;
29
60
  }
30
- if (inLayout) {
31
- computedHeaderHeight = '40px';
61
+ });
62
+ whiteCols = (_b = childrenToArray === null || childrenToArray === void 0 ? void 0 : childrenToArray.filter(({
63
+ props
64
+ }) => (props === null || props === void 0 ? void 0 : props.mode) === 'white')) === null || _b === void 0 ? void 0 : _b.length;
65
+ const total = (childrenToArray === null || childrenToArray === void 0 ? void 0 : childrenToArray.length) + 5;
66
+ let startIndex = total - whiteCols - 1;
67
+ let endIndex = total - 2;
68
+ const headerStyle = {
69
+ height: computedHeaderHeight,
70
+ padding: `${size === 'small' ? 20 : 24}px`,
71
+ zIndex: inLayout ? 1 : total || 1
72
+ };
73
+ const contentStyle = {
74
+ display: boxCount > 0 ? 'flex' : 'block',
75
+ marginTop: computedHeaderHeight,
76
+ padding: inLayout ? '16px 20px' : '0px'
77
+ };
78
+ return React.createElement("section", Object.assign({
79
+ className: cn(clsPrefix, {
80
+ [className]: className,
81
+ 'in-layout': inLayout,
82
+ 'not-in-layout': !inLayout
83
+ })
84
+ }, restProps), (title || goBack || center || extra) && React.createElement("div", {
85
+ className: `${clsPrefix}-header`,
86
+ style: headerStyle
87
+ }, React.createElement("div", {
88
+ className: `${clsPrefix}-header-section`
89
+ }, goBack && React.createElement("div", {
90
+ className: "page-header-section-back",
91
+ onClick: () => {
92
+ goBack();
32
93
  }
33
- // 计算中间的zIndex,灰色递减,白色递增
34
- let whiteCols = 0;
35
- let childrenToArray = [];
36
- // 计算children type是box的数量
37
- let boxCount = 0;
38
- // 如果children是单个节点,统一转为数组处理计算层级
39
- if (typeof children === 'object') {
40
- childrenToArray = [children];
94
+ }, React.createElement(Icon, {
95
+ type: "left"
96
+ }), React.createElement("span", null, goBackText ? goBackText : '返回')), title), [center, extra].map((item, i) => React.createElement("div", {
97
+ className: `${clsPrefix}-header-section`,
98
+ key: i
99
+ }, item))), React.createElement("div", {
100
+ className: `${clsPrefix}-content`,
101
+ style: contentStyle
102
+ }, React.Children.map(children, child => {
103
+ // 如果children不是Box,就不需要多列布局
104
+ if (!child.type) {
105
+ return React.cloneElement(React.createElement("div", null, child));
41
106
  }
42
- else if (Array.isArray(children)) {
43
- childrenToArray = [...children];
107
+ const extraProps = Object.assign({
108
+ headerHeight: computedHeaderHeight,
109
+ size,
110
+ height: computedHeight,
111
+ contentTotalMargin: inLayout ? '32px' : '0px',
112
+ inLayout
113
+ }, child.props);
114
+ if (!isPageBox(child)) {
115
+ return React.cloneElement(child, extraProps);
44
116
  }
45
- React.Children.map(children, (child) => {
46
- if (isPageBox(child)) {
47
- boxCount += 1;
48
- }
49
- });
50
- whiteCols = (_b = childrenToArray === null || childrenToArray === void 0 ? void 0 : childrenToArray.filter(({ props }) => (props === null || props === void 0 ? void 0 : props.mode) === 'white')) === null || _b === void 0 ? void 0 : _b.length;
51
- const total = (childrenToArray === null || childrenToArray === void 0 ? void 0 : childrenToArray.length) + 5;
52
- let startIndex = total - whiteCols - 1;
53
- let endIndex = total - 2;
54
- const headerStyle = {
55
- height: computedHeaderHeight,
56
- padding: `${size === 'small' ? 20 : 24}px`,
57
- zIndex: inLayout ? 1 : total || 1,
58
- };
59
- const contentStyle = {
60
- display: boxCount > 0 ? 'flex' : 'block',
61
- marginTop: computedHeaderHeight,
62
- padding: inLayout ? '16px 20px' : '0px',
117
+ const {
118
+ mode = 'gray',
119
+ width
120
+ } = child.props;
121
+ const style = {
122
+ flex: computeWidth(width),
123
+ // 设置cols层级关系
124
+ zIndex: mode === 'gray' ? endIndex-- : startIndex++
63
125
  };
64
- return (React.createElement("section", Object.assign({ className: cn(clsPrefix, {
65
- [className]: className,
66
- 'in-layout': inLayout,
67
- 'not-in-layout': !inLayout,
68
- }) }, restProps),
69
- (title || goBack || center || extra) && (React.createElement("div", { className: `${clsPrefix}-header`, style: headerStyle },
70
- React.createElement("div", { className: `${clsPrefix}-header-section` },
71
- goBack && (React.createElement("div", { className: "page-header-section-back", onClick: () => {
72
- goBack();
73
- } },
74
- React.createElement(Icon, { type: "left" }),
75
- React.createElement("span", null, goBackText ? goBackText : '返回'))),
76
- title),
77
- [center, extra].map((item, i) => (React.createElement("div", { className: `${clsPrefix}-header-section`, key: i }, item))))),
78
- React.createElement("div", { className: `${clsPrefix}-content`, style: contentStyle }, React.Children.map(children, (child) => {
79
- // 如果children不是Box,就不需要多列布局
80
- if (!child.type) {
81
- return React.cloneElement(React.createElement("div", null, child));
82
- }
83
- const extraProps = Object.assign({ headerHeight: computedHeaderHeight, size, height: computedHeight, contentTotalMargin: inLayout ? '32px' : '0px', inLayout }, child.props);
84
- if (!isPageBox(child)) {
85
- return React.cloneElement(child, extraProps);
86
- }
87
- const { mode = 'gray', width } = child.props;
88
- const style = {
89
- flex: computeWidth(width),
90
- // 设置cols层级关系
91
- zIndex: mode === 'gray' ? endIndex-- : startIndex++,
92
- };
93
- const className = cn(`${clsPrefix}-box ${clsPrefix}-box-${mode}`);
94
- return React.createElement('div', { className, style }, React.cloneElement(child, extraProps));
95
- }))));
126
+ const className = cn(`${clsPrefix}-box ${clsPrefix}-box-${mode}`);
127
+ return React.createElement('div', {
128
+ className,
129
+ style
130
+ }, React.cloneElement(child, extraProps));
131
+ })));
96
132
  };
97
133
  PageLayout.Box = Box;
98
- export default PageLayout;
99
- //# sourceMappingURL=index.js.map
134
+ export default PageLayout;
package/es/page/utils.js CHANGED
@@ -1,15 +1,13 @@
1
- const computeWidth = (width) => {
2
- let flex = '1';
3
- const validNumber = isValidNumber(width);
4
- if (/(%|px)$/.test(width) && validNumber) {
5
- flex = `0 0 ${width}`;
6
- }
7
- else if (!isNaN(width)) {
8
- flex = `0 0 ${width}px`;
9
- }
10
- return flex;
1
+ const computeWidth = width => {
2
+ let flex = '1';
3
+ const validNumber = isValidNumber(width);
4
+ if (/(%|px)$/.test(width) && validNumber) {
5
+ flex = `0 0 ${width}`;
6
+ } else if (!isNaN(width)) {
7
+ flex = `0 0 ${width}px`;
8
+ }
9
+ return flex;
11
10
  };
12
- const isValidNumber = (value) => !isNaN(parseFloat(value));
13
- const addUnitForValue = (value, unit = 'px') => (!isNaN(value) ? `${value}${unit}` : value);
14
- export { computeWidth, isValidNumber, addUnitForValue };
15
- //# sourceMappingURL=utils.js.map
11
+ const isValidNumber = value => !isNaN(parseFloat(value));
12
+ const addUnitForValue = (value, unit = 'px') => !isNaN(value) ? `${value}${unit}` : value;
13
+ export { computeWidth, isValidNumber, addUnitForValue };
@@ -1,5 +1,4 @@
1
1
  import PageHeader from 'antd/es/page-header';
2
2
  import 'antd/es/page-header/style';
3
3
  export * from 'antd/es/page-header';
4
- export default PageHeader;
5
- //# sourceMappingURL=index.js.map
4
+ export default PageHeader;
@@ -1,5 +1,4 @@
1
1
  import Pagination from 'antd/es/pagination';
2
2
  import 'antd/es/pagination/style';
3
3
  export * from 'antd/es/pagination';
4
- export default Pagination;
5
- //# sourceMappingURL=index.js.map
4
+ export default Pagination;
@@ -1,5 +1,4 @@
1
1
  import Popconfirm from 'antd/es/popconfirm';
2
2
  import 'antd/es/popconfirm/style';
3
3
  export * from 'antd/es/popconfirm';
4
- export default Popconfirm;
5
- //# sourceMappingURL=index.js.map
4
+ export default Popconfirm;
@@ -1,5 +1,4 @@
1
1
  import Popover from 'antd/es/popover';
2
2
  import 'antd/es/popover/style';
3
3
  export * from 'antd/es/popover';
4
- export default Popover;
5
- //# sourceMappingURL=index.js.map
4
+ export default Popover;
package/es/prev-locale.js CHANGED
@@ -1,54 +1,56 @@
1
1
  export const zh_CN = {
2
- globalNavigation: '全局导航',
3
- menuSearch: '菜单搜索',
4
- // QueryForm
5
- search: '搜索',
6
- reset: '重置',
7
- moreFiltering: '更多过滤',
8
- expand: '展开',
9
- collapse: '收起',
10
- // QueryListScene
11
- totalRecords: '共%s条记录',
12
- // user popover
13
- nameNull: '暂无昵称',
14
- personalSettings: '个人设置',
15
- changePwd: '修改密码',
16
- signOut: '退出',
17
- // Handle
18
- handleMore: '更多'
2
+ globalNavigation: '全局导航',
3
+ menuSearch: '菜单搜索',
4
+ // QueryForm
5
+ search: '搜索',
6
+ reset: '重置',
7
+ moreFiltering: '更多过滤',
8
+ expand: '展开',
9
+ collapse: '收起',
10
+ // QueryListScene
11
+ totalRecords: '共%s条记录',
12
+ // user popover
13
+ nameNull: '暂无昵称',
14
+ personalSettings: '个人设置',
15
+ changePwd: '修改密码',
16
+ signOut: '退出',
17
+ // Handle
18
+ handleMore: '更多'
19
19
  };
20
20
  export const en_US = {
21
- globalNavigation: 'Global Navigation',
22
- menuSearch: 'Menu Search',
23
- // QueryForm
24
- search: 'Search',
25
- reset: 'Reset',
26
- moreFiltering: 'More filtering',
27
- expand: 'Expand',
28
- collapse: 'Collapse',
29
- // QueryListScene
30
- totalRecords: 'Total of %s records',
31
- // user popover
32
- nameNull: 'No nickname yet',
33
- personalSettings: 'Setting',
34
- changePwd: 'Change password',
35
- signOut: 'Sign out',
36
- // Handle
37
- handleMore: 'More'
21
+ globalNavigation: 'Global Navigation',
22
+ menuSearch: 'Menu Search',
23
+ // QueryForm
24
+ search: 'Search',
25
+ reset: 'Reset',
26
+ moreFiltering: 'More filtering',
27
+ expand: 'Expand',
28
+ collapse: 'Collapse',
29
+ // QueryListScene
30
+ totalRecords: 'Total of %s records',
31
+ // user popover
32
+ nameNull: 'No nickname yet',
33
+ personalSettings: 'Setting',
34
+ changePwd: 'Change password',
35
+ signOut: 'Sign out',
36
+ // Handle
37
+ handleMore: 'More'
38
38
  };
39
39
  export const getText = (key, language = 'cn', ...params) => {
40
- var _a;
41
- const text = (_a = ({
42
- cn: zh_CN,
43
- en: en_US,
44
- }[language] || zh_CN)) === null || _a === void 0 ? void 0 : _a[key];
45
- if (params === null || params === void 0 ? void 0 : params.length) {
46
- return params.reduce((acc, cur) => {
47
- return acc.replace(/%s/, cur);
48
- }, text);
49
- }
50
- return text;
40
+ var _a;
41
+ const text = (_a = {
42
+ cn: zh_CN,
43
+ en: en_US
44
+ }[language] || zh_CN) === null || _a === void 0 ? void 0 : _a[key];
45
+ if (params === null || params === void 0 ? void 0 : params.length) {
46
+ return params.reduce((acc, cur) => {
47
+ return acc.replace(/%s/, cur);
48
+ }, text);
49
+ }
50
+ return text;
51
51
  };
52
52
  export const getLanguage = () => localStorage.getItem('lang') || 'cn';
53
- export default { en_US, zh_CN };
54
- //# sourceMappingURL=prev-locale.js.map
53
+ export default {
54
+ en_US,
55
+ zh_CN
56
+ };
@@ -1,5 +1,4 @@
1
1
  import Progress from 'antd/es/progress';
2
2
  import 'antd/es/progress/style';
3
3
  export * from 'antd/es/progress';
4
- export default Progress;
5
- //# sourceMappingURL=index.js.map
4
+ export default Progress;
@@ -1,20 +1,23 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
1
+ var __rest = this && this.__rest || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
4
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
5
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
6
+ }
7
+ return t;
11
8
  };
12
9
  import React from 'react';
13
10
  import Checkbox from '../../checkbox';
14
- export default (_a) => {
15
- var { value, onChange } = _a, props = __rest(_a, ["value", "onChange"]);
16
- return (React.createElement(Checkbox, Object.assign({}, props, { checked: value, onChange: (evt) => {
17
- onChange === null || onChange === void 0 ? void 0 : onChange(evt.target.checked);
18
- } })));
19
- };
20
- //# sourceMappingURL=Checkbox.js.map
11
+ export default (_a => {
12
+ var {
13
+ value,
14
+ onChange
15
+ } = _a,
16
+ props = __rest(_a, ["value", "onChange"]);
17
+ return React.createElement(Checkbox, Object.assign({}, props, {
18
+ checked: value,
19
+ onChange: evt => {
20
+ onChange === null || onChange === void 0 ? void 0 : onChange(evt.target.checked);
21
+ }
22
+ }));
23
+ });
@@ -1,44 +1,59 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
1
+ var __rest = this && this.__rest || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
4
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
5
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
6
+ }
7
+ return t;
11
8
  };
12
9
  import React, { useState, useEffect } from 'react';
13
10
  import Select from '../../select';
14
- const { Option } = Select;
15
- export default (props) => {
16
- const { options, params, queryKey = 'name', fieldNames = {
11
+ const {
12
+ Option
13
+ } = Select;
14
+ export default (props => {
15
+ const {
16
+ options,
17
+ params,
18
+ queryKey = 'name',
19
+ fieldNames = {
17
20
  label: 'label',
18
- value: 'value',
19
- }, loadData } = props, rest = __rest(props, ["options", "params", "queryKey", "fieldNames", "loadData"]);
20
- const [items, setItems] = useState(options || []);
21
- const [query, setQuery] = useState('');
22
- const onSearch = (val) => {
23
- setQuery(val);
24
- };
25
- if (loadData) {
26
- useEffect(() => {
27
- loadData(Object.assign({ [queryKey]: query }, (params || {}))).then((items) => {
28
- setItems(items);
29
- });
30
- }, [params, query]);
31
- }
21
+ value: 'value'
22
+ },
23
+ loadData
24
+ } = props,
25
+ rest = __rest(props, ["options", "params", "queryKey", "fieldNames", "loadData"]);
26
+ const [items, setItems] = useState(options || []);
27
+ const [query, setQuery] = useState('');
28
+ const onSearch = val => {
29
+ setQuery(val);
30
+ };
31
+ if (loadData) {
32
32
  useEffect(() => {
33
- setItems(options || []);
34
- }, [options]);
35
- return (React.createElement(Select, Object.assign({ allowClear: true, showSearch: true, optionFilterProp: "children", onSearch: onSearch }, rest), items.map((item) => {
36
- const labelKey = (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.label) || 'label';
37
- const valueKey = (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value) || 'value';
38
- const value = item instanceof Object ? item[valueKey] : item;
39
- const label = item instanceof Object ? item[labelKey] : item;
40
- const optionProps = item instanceof Object ? item : {};
41
- return (React.createElement(Option, Object.assign({}, optionProps, { key: value, value: value }), label));
42
- })));
43
- };
44
- //# sourceMappingURL=Select.js.map
33
+ loadData(Object.assign({
34
+ [queryKey]: query
35
+ }, params || {})).then(items => {
36
+ setItems(items);
37
+ });
38
+ }, [params, query]);
39
+ }
40
+ useEffect(() => {
41
+ setItems(options || []);
42
+ }, [options]);
43
+ return React.createElement(Select, Object.assign({
44
+ allowClear: true,
45
+ showSearch: true,
46
+ optionFilterProp: "children",
47
+ onSearch: onSearch
48
+ }, rest), items.map(item => {
49
+ const labelKey = (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.label) || 'label';
50
+ const valueKey = (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value) || 'value';
51
+ const value = item instanceof Object ? item[valueKey] : item;
52
+ const label = item instanceof Object ? item[labelKey] : item;
53
+ const optionProps = item instanceof Object ? item : {};
54
+ return React.createElement(Option, Object.assign({}, optionProps, {
55
+ key: value,
56
+ value: value
57
+ }), label);
58
+ }));
59
+ });
@@ -1,49 +1,67 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
1
+ import _get from "lodash/get";
2
+ var __rest = this && this.__rest || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
6
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
7
+ }
8
+ return t;
11
9
  };
12
10
  import React, { useState, useEffect } from 'react';
13
- import { get } from 'lodash';
14
11
  import Select from '../../select';
15
12
  import Input from '../../input';
16
- const { Option } = Select;
17
- export default (props) => {
18
- const { options = [], addonBeforeStyle } = props, inputProps = __rest(props, ["options", "addonBeforeStyle"]);
19
- const [items, setItems] = useState(options);
20
- const getInitialKey = () => {
21
- let key = get(options, '0.value');
22
- if (inputProps.value) {
23
- key = get(Object.keys(inputProps.value), '0') || key;
24
- }
25
- return key;
26
- };
27
- const [key, setKey] = useState(getInitialKey());
28
- const onKeyChange = (key) => {
29
- setKey(key);
30
- props.onChange({
31
- [key]: '',
32
- });
33
- };
34
- const onChange = (evt) => {
35
- props.onChange({
36
- [key]: evt.target.value,
37
- });
38
- };
39
- const addonBefore = (React.createElement(Select, { value: key, onChange: onKeyChange, style: Object.assign({ width: '120px' }, addonBeforeStyle) }, items.map(({ label, value }) => (React.createElement(Option, { key: value, value: value }, label)))));
40
- const getInputValue = () => {
41
- return get(inputProps.value, key);
42
- };
43
- useEffect(() => {
44
- setItems(options);
45
- setKey(getInitialKey());
46
- }, [options, inputProps.value]);
47
- return (React.createElement(Input, Object.assign({}, inputProps, { value: getInputValue(), addonBefore: addonBefore, onChange: onChange })));
48
- };
49
- //# sourceMappingURL=SelectInput.js.map
13
+ const {
14
+ Option
15
+ } = Select;
16
+ export default (props => {
17
+ const {
18
+ options = [],
19
+ addonBeforeStyle
20
+ } = props,
21
+ inputProps = __rest(props, ["options", "addonBeforeStyle"]);
22
+ const [items, setItems] = useState(options);
23
+ const getInitialKey = () => {
24
+ let key = _get(options, '0.value');
25
+ if (inputProps.value) {
26
+ key = _get(Object.keys(inputProps.value), '0') || key;
27
+ }
28
+ return key;
29
+ };
30
+ const [key, setKey] = useState(getInitialKey());
31
+ const onKeyChange = key => {
32
+ setKey(key);
33
+ props.onChange({
34
+ [key]: ''
35
+ });
36
+ };
37
+ const onChange = evt => {
38
+ props.onChange({
39
+ [key]: evt.target.value
40
+ });
41
+ };
42
+ const addonBefore = React.createElement(Select, {
43
+ value: key,
44
+ onChange: onKeyChange,
45
+ style: Object.assign({
46
+ width: '120px'
47
+ }, addonBeforeStyle)
48
+ }, items.map(({
49
+ label,
50
+ value
51
+ }) => React.createElement(Option, {
52
+ key: value,
53
+ value: value
54
+ }, label)));
55
+ const getInputValue = () => {
56
+ return _get(inputProps.value, key);
57
+ };
58
+ useEffect(() => {
59
+ setItems(options);
60
+ setKey(getInitialKey());
61
+ }, [options, inputProps.value]);
62
+ return React.createElement(Input, Object.assign({}, inputProps, {
63
+ value: getInputValue(),
64
+ addonBefore: addonBefore,
65
+ onChange: onChange
66
+ }));
67
+ });