tntd 2.0.23 → 2.0.24

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 (746) hide show
  1. package/es/affix/index.js +2 -1
  2. package/es/alert/index.js +2 -1
  3. package/es/anchor/index.js +2 -1
  4. package/es/array-input/icon.js +6 -24
  5. package/es/array-input/index.js +119 -203
  6. package/es/auth-context/index.js +2 -1
  7. package/es/auto-complete/index.js +2 -1
  8. package/es/avatar/index.js +2 -1
  9. package/es/back-top/index.js +2 -1
  10. package/es/badge/index.js +2 -1
  11. package/es/breadcrumb/index.js +2 -1
  12. package/es/button/index.js +2 -1
  13. package/es/calendar/index.js +2 -1
  14. package/es/card/index.js +2 -1
  15. package/es/carousel/index.js +2 -1
  16. package/es/cascader/index.js +2 -1
  17. package/es/checkbox/index.js +2 -1
  18. package/es/col/index.js +2 -1
  19. package/es/collapse/index.js +2 -1
  20. package/es/columns/index.js +30 -66
  21. package/es/columns/style/index.js +2 -1
  22. package/es/comment/index.js +2 -1
  23. package/es/config-provider/config-provider.js +2 -1
  24. package/es/config-provider/index.js +2 -1
  25. package/es/date-picker/index.js +2 -1
  26. package/es/descriptions/descriptions.js +47 -0
  27. package/es/descriptions/descriptions.js.map +1 -0
  28. package/es/descriptions/descriptions.less +46 -0
  29. package/es/descriptions/index.js +14 -3
  30. package/es/descriptions/index.js.map +1 -1
  31. package/es/development-login/LoginModal.js +46 -81
  32. package/es/development-login/index.js +8 -17
  33. package/es/divider/index.js +2 -1
  34. package/es/drawer/drawer.js +20 -27
  35. package/es/drawer/index.js +2 -1
  36. package/es/dropdown/index.js +2 -1
  37. package/es/ellipsis/Svg/CopySVG.js +17 -63
  38. package/es/ellipsis/Svg/TickSVG.js +12 -41
  39. package/es/ellipsis/index.js +68 -100
  40. package/es/empty/empty.js +48 -58
  41. package/es/empty/empty.stories.js +6 -5
  42. package/es/empty/index.js +2 -1
  43. package/es/exception/exception.js +19 -32
  44. package/es/exception/index.js +2 -1
  45. package/es/form/index.js +2 -1
  46. package/es/handle/index.js +71 -110
  47. package/es/icon/index.js +2 -1
  48. package/es/icon-list/index.js +120 -1
  49. package/es/img/Contain.js +39 -60
  50. package/es/img/Cover.js +72 -98
  51. package/es/img/index.js +32 -48
  52. package/es/index.js +2 -1
  53. package/es/input/index.js +2 -1
  54. package/es/input-number/index.js +2 -1
  55. package/es/layout/index.js +2 -1
  56. package/es/list/index.js +2 -1
  57. package/es/loading-button/index.js +28 -33
  58. package/es/locale/default.js +4 -3
  59. package/es/locale/en_US.js +30 -29
  60. package/es/locale/index.js +2 -1
  61. package/es/locale/zh_CN.js +30 -29
  62. package/es/locale-provider/index.js +3 -2
  63. package/es/mention/index.js +2 -1
  64. package/es/mentions/index.js +2 -1
  65. package/es/menu/index.js +2 -1
  66. package/es/message/index.js +2 -1
  67. package/es/modal/index.js +2 -1
  68. package/es/modal/modal.js +17 -20
  69. package/es/notification/index.js +2 -1
  70. package/es/page/Box.js +33 -49
  71. package/es/page/index.js +88 -123
  72. package/es/page/utils.js +14 -12
  73. package/es/page-header/index.js +2 -1
  74. package/es/pagination/index.js +2 -1
  75. package/es/popconfirm/index.js +2 -1
  76. package/es/popover/index.js +2 -1
  77. package/es/prev-locale.js +47 -49
  78. package/es/progress/index.js +2 -1
  79. package/es/query-form/Field/Checkbox.js +17 -20
  80. package/es/query-form/Field/Select.js +39 -54
  81. package/es/query-form/Field/SelectInput.js +45 -63
  82. package/es/query-form/Field/fieldsMap.js +20 -19
  83. package/es/query-form/Field/index.js +66 -104
  84. package/es/query-form/createActions.js +46 -46
  85. package/es/query-form/index.js +247 -327
  86. package/es/query-form/useForm.js +4 -3
  87. package/es/query-list-scene/List.js +257 -321
  88. package/es/query-list-scene/QueryForm.js +94 -131
  89. package/es/query-list-scene/QueryListScene.js +21 -29
  90. package/es/query-list-scene/Title.js +4 -6
  91. package/es/query-list-scene/Toolbar.js +15 -21
  92. package/es/query-list-scene/createActions.js +60 -60
  93. package/es/query-list-scene/index.js +2 -1
  94. package/es/query-list-scene/useActions.js +4 -3
  95. package/es/radio/index.js +2 -1
  96. package/es/rate/index.js +2 -1
  97. package/es/render-empty/index.js +2 -1
  98. package/es/render-empty/render-empty.js +16 -19
  99. package/es/result/index.js +2 -1
  100. package/es/row/index.js +2 -1
  101. package/es/select/index.js +2 -1
  102. package/es/skeleton/index.js +2 -1
  103. package/es/slider/index.js +2 -1
  104. package/es/spin/index.js +2 -1
  105. package/es/statistic/index.js +2 -1
  106. package/es/steps/index.js +2 -1
  107. package/es/steps/steps.js +35 -51
  108. package/es/svg-components/illustration-403.js +58 -206
  109. package/es/svg-components/illustration-404.js +75 -290
  110. package/es/svg-components/illustration-500.js +83 -321
  111. package/es/svg-components/illustration-empty.js +15 -54
  112. package/es/svg-components/illustration-failure.js +36 -112
  113. package/es/svg-components/illustration-no-access.js +35 -114
  114. package/es/svg-components/illustration-no-chart.js +37 -134
  115. package/es/svg-components/illustration-no-result.js +32 -92
  116. package/es/svg-components/illustration-offline.js +43 -131
  117. package/es/svg-components/illustration-success.js +43 -137
  118. package/es/svg-components/index.js +2 -1
  119. package/es/switch/index.js +2 -1
  120. package/es/table/assets/image-loading-background.js +17 -45
  121. package/es/table/assets/image-loading.js +5 -26
  122. package/es/table/constants.js +2 -1
  123. package/es/table/context.js +2 -1
  124. package/es/table/hooks/index.js +2 -1
  125. package/es/table/hooks/use-column-setting.js +16 -13
  126. package/es/table/index.js +2 -1
  127. package/es/table/table.js +53 -73
  128. package/es/table/table.js.map +1 -1
  129. package/es/table/table.less +7 -0
  130. package/es/table/table.stories.js +139 -148
  131. package/es/table/utils.js +18 -17
  132. package/es/tabs/index.js +2 -1
  133. package/es/tag/index.js +2 -1
  134. package/es/time-picker/index.js +2 -1
  135. package/es/timeline/index.js +2 -1
  136. package/es/title/index.js +20 -34
  137. package/es/tntd-cascader/AntdCascader/component/DisabledContext.js +5 -9
  138. package/es/tntd-cascader/AntdCascader/component/FormItemInputContext.js +2 -1
  139. package/es/tntd-cascader/AntdCascader/component/SizeContext.js +2 -1
  140. package/es/tntd-cascader/AntdCascader/component/context.js +7 -5
  141. package/es/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +10 -22
  142. package/es/tntd-cascader/AntdCascader/component/getIcons.js +50 -72
  143. package/es/tntd-cascader/AntdCascader/component/useCompactItemContext.js +20 -22
  144. package/es/tntd-cascader/AntdCascader/config/utils.js +18 -17
  145. package/es/tntd-cascader/AntdCascader/config/warning.js +10 -9
  146. package/es/tntd-cascader/AntdCascader/index.js +118 -189
  147. package/es/tntd-cascader/AntdCascader/interface.js +2 -1
  148. package/es/tntd-cascader/index.js +2 -1
  149. package/es/tntd-cascader/rc-cascader/Cascader.js +239 -256
  150. package/es/tntd-cascader/rc-cascader/OptionList/Checkbox.js +11 -21
  151. package/es/tntd-cascader/rc-cascader/OptionList/Column.js +116 -175
  152. package/es/tntd-cascader/rc-cascader/OptionList/index.js +128 -180
  153. package/es/tntd-cascader/rc-cascader/OptionList/useActive.js +19 -22
  154. package/es/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +137 -144
  155. package/es/tntd-cascader/rc-cascader/context.js +2 -1
  156. package/es/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +37 -44
  157. package/es/tntd-cascader/rc-cascader/hooks/useEntities.js +24 -25
  158. package/es/tntd-cascader/rc-cascader/hooks/useMissingValues.js +17 -15
  159. package/es/tntd-cascader/rc-cascader/hooks/useRefFunc.js +8 -7
  160. package/es/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +21 -20
  161. package/es/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +41 -51
  162. package/es/tntd-cascader/rc-cascader/index.js +2 -1
  163. package/es/tntd-cascader/rc-cascader/utils/commonUtil.js +27 -33
  164. package/es/tntd-cascader/rc-cascader/utils/treeUtil.js +32 -29
  165. package/es/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +23 -26
  166. package/es/tntd-form/TntdForm/components/Item.js +30 -42
  167. package/es/tntd-form/TntdForm/components/ItemComp.js +158 -167
  168. package/es/tntd-form/TntdForm/components/List.js +78 -89
  169. package/es/tntd-form/TntdForm/index.js +33 -38
  170. package/es/tntd-form/TntdForm/interface.js +2 -1
  171. package/es/tntd-form/TntdForm/store.js +2 -1
  172. package/es/tntd-form/TntdForm/utils.js +168 -158
  173. package/es/tntd-form/index.js +2 -1
  174. package/es/tntd-icon/fonts/iconfont.js +53 -36
  175. package/es/tntd-icon/index.js +17 -23
  176. package/es/tntd-layout/ActionsContext.js +2 -1
  177. package/es/tntd-layout/AppList.js +77 -135
  178. package/es/tntd-layout/Application.js +29 -42
  179. package/es/tntd-layout/Avatar.js +42 -80
  180. package/es/tntd-layout/CompatibleLanguage.js +56 -93
  181. package/es/tntd-layout/EnterpriseLayout/Avatar.js +47 -93
  182. package/es/tntd-layout/EnterpriseLayout/Language.js +34 -56
  183. package/es/tntd-layout/EnterpriseLayout/Theme.js +24 -45
  184. package/es/tntd-layout/EnterpriseLayout/index.js +9 -17
  185. package/es/tntd-layout/GlobalNavigation/NavigationPopup.js +154 -213
  186. package/es/tntd-layout/GlobalNavigation/index.js +50 -84
  187. package/es/tntd-layout/Header.js +26 -59
  188. package/es/tntd-layout/HeaderActions.js +34 -83
  189. package/es/tntd-layout/HeaderNavs.js +35 -46
  190. package/es/tntd-layout/HeaderTabs.js +140 -176
  191. package/es/tntd-layout/Iconfont.js +2 -1
  192. package/es/tntd-layout/Language.js +33 -55
  193. package/es/tntd-layout/Layout.js +78 -176
  194. package/es/tntd-layout/Logo.js +40 -52
  195. package/es/tntd-layout/OrgAppList.js +139 -208
  196. package/es/tntd-layout/SideMenu.js +160 -230
  197. package/es/tntd-layout/Theme.js +29 -47
  198. package/es/tntd-layout/createActions.js +29 -28
  199. package/es/tntd-layout/images/index.js +32 -31
  200. package/es/tntd-layout/index.js +60 -92
  201. package/es/tntd-layout/paaslayout/CompactSideMenu.js +65 -109
  202. package/es/tntd-layout/paaslayout/Header.js +14 -37
  203. package/es/tntd-layout/paaslayout/Logo.js +3 -2
  204. package/es/tntd-layout/paaslayout/SideMenu.js +63 -109
  205. package/es/tntd-layout/paaslayout/index.js +79 -159
  206. package/es/tntd-layout/storage.js +11 -18
  207. package/es/tntd-modal/index.js +32 -73
  208. package/es/tntd-second-page/index.js +24 -47
  209. package/es/tntd-select/DropDownWrap.js +52 -73
  210. package/es/tntd-select/index.js +482 -564
  211. package/es/tooltip/index.js +2 -1
  212. package/es/transfer/index.js +2 -1
  213. package/es/tree/index.js +2 -1
  214. package/es/tree-select/index.js +2 -1
  215. package/es/typography/index.js +2 -1
  216. package/es/upload/index.js +2 -1
  217. package/es/utils/checkAuth.js +21 -24
  218. package/es/utils/findMenuInfoByPath.js +30 -33
  219. package/es/utils/index.js +59 -65
  220. package/es/version/index.js +2 -1
  221. package/lib/affix/index.d.ts +3 -3
  222. package/lib/affix/index.js +22 -23
  223. package/lib/affix/index.js.map +1 -1
  224. package/lib/alert/index.d.ts +3 -3
  225. package/lib/alert/index.js +22 -23
  226. package/lib/alert/index.js.map +1 -1
  227. package/lib/anchor/index.d.ts +3 -3
  228. package/lib/anchor/index.js +22 -23
  229. package/lib/anchor/index.js.map +1 -1
  230. package/lib/array-input/icon.js +12 -33
  231. package/lib/array-input/index.js +150 -254
  232. package/lib/auth-context/index.js +4 -10
  233. package/lib/auto-complete/index.d.ts +3 -3
  234. package/lib/auto-complete/index.js +22 -23
  235. package/lib/auto-complete/index.js.map +1 -1
  236. package/lib/avatar/index.d.ts +3 -3
  237. package/lib/avatar/index.js +22 -23
  238. package/lib/avatar/index.js.map +1 -1
  239. package/lib/back-top/index.d.ts +3 -3
  240. package/lib/back-top/index.js +22 -23
  241. package/lib/back-top/index.js.map +1 -1
  242. package/lib/badge/index.d.ts +3 -3
  243. package/lib/badge/index.js +22 -23
  244. package/lib/badge/index.js.map +1 -1
  245. package/lib/breadcrumb/index.d.ts +3 -3
  246. package/lib/breadcrumb/index.js +22 -23
  247. package/lib/breadcrumb/index.js.map +1 -1
  248. package/lib/button/index.d.ts +3 -3
  249. package/lib/button/index.js +22 -23
  250. package/lib/button/index.js.map +1 -1
  251. package/lib/calendar/index.d.ts +3 -3
  252. package/lib/calendar/index.js +22 -23
  253. package/lib/calendar/index.js.map +1 -1
  254. package/lib/card/index.d.ts +3 -3
  255. package/lib/card/index.js +22 -23
  256. package/lib/card/index.js.map +1 -1
  257. package/lib/carousel/index.d.ts +3 -3
  258. package/lib/carousel/index.js +22 -23
  259. package/lib/carousel/index.js.map +1 -1
  260. package/lib/cascader/index.d.ts +3 -3
  261. package/lib/cascader/index.js +22 -23
  262. package/lib/cascader/index.js.map +1 -1
  263. package/lib/checkbox/index.d.ts +3 -3
  264. package/lib/checkbox/index.js +22 -23
  265. package/lib/checkbox/index.js.map +1 -1
  266. package/lib/col/index.d.ts +3 -3
  267. package/lib/col/index.js +22 -23
  268. package/lib/col/index.js.map +1 -1
  269. package/lib/collapse/index.d.ts +3 -3
  270. package/lib/collapse/index.js +23 -24
  271. package/lib/collapse/index.js.map +1 -1
  272. package/lib/columns/index.js +41 -81
  273. package/lib/columns/style/index.js +2 -1
  274. package/lib/comment/index.d.ts +3 -3
  275. package/lib/comment/index.js +22 -23
  276. package/lib/comment/index.js.map +1 -1
  277. package/lib/config-provider/config-provider.d.ts +1 -1
  278. package/lib/config-provider/config-provider.js +8 -12
  279. package/lib/config-provider/config-provider.js.map +1 -1
  280. package/lib/config-provider/index.d.ts +3 -3
  281. package/lib/config-provider/index.js +22 -23
  282. package/lib/config-provider/index.js.map +1 -1
  283. package/lib/date-picker/index.d.ts +3 -3
  284. package/lib/date-picker/index.js +22 -23
  285. package/lib/date-picker/index.js.map +1 -1
  286. package/lib/descriptions/descriptions.d.ts +13 -0
  287. package/lib/descriptions/descriptions.d.ts.map +1 -0
  288. package/lib/descriptions/descriptions.js +68 -0
  289. package/lib/descriptions/descriptions.js.map +1 -0
  290. package/lib/descriptions/descriptions.less +46 -0
  291. package/lib/descriptions/index.d.ts +4 -3
  292. package/lib/descriptions/index.d.ts.map +1 -1
  293. package/lib/descriptions/index.js +29 -23
  294. package/lib/descriptions/index.js.map +1 -1
  295. package/lib/development-login/LoginModal.js +79 -110
  296. package/lib/development-login/index.js +35 -42
  297. package/lib/divider/index.d.ts +3 -3
  298. package/lib/divider/index.js +22 -23
  299. package/lib/divider/index.js.map +1 -1
  300. package/lib/drawer/drawer.d.ts +1 -1
  301. package/lib/drawer/drawer.js +30 -41
  302. package/lib/drawer/drawer.js.map +1 -1
  303. package/lib/drawer/index.d.ts +2 -2
  304. package/lib/drawer/index.js +20 -22
  305. package/lib/drawer/index.js.map +1 -1
  306. package/lib/dropdown/index.d.ts +3 -3
  307. package/lib/dropdown/index.js +22 -23
  308. package/lib/dropdown/index.js.map +1 -1
  309. package/lib/ellipsis/Svg/CopySVG.js +21 -70
  310. package/lib/ellipsis/Svg/TickSVG.js +16 -48
  311. package/lib/ellipsis/index.js +105 -128
  312. package/lib/empty/empty.d.ts +2 -2
  313. package/lib/empty/empty.js +75 -90
  314. package/lib/empty/empty.js.map +1 -1
  315. package/lib/empty/empty.stories.js +18 -19
  316. package/lib/empty/index.d.ts +1 -1
  317. package/lib/empty/index.js +19 -20
  318. package/lib/empty/index.js.map +1 -1
  319. package/lib/exception/exception.js +31 -46
  320. package/lib/exception/exception.js.map +1 -1
  321. package/lib/exception/index.js +18 -19
  322. package/lib/form/index.d.ts +3 -3
  323. package/lib/form/index.js +22 -23
  324. package/lib/form/index.js.map +1 -1
  325. package/lib/handle/index.js +104 -140
  326. package/lib/handle/index.js.map +1 -1
  327. package/lib/icon/index.d.ts +3 -3
  328. package/lib/icon/index.js +22 -23
  329. package/lib/icon/index.js.map +1 -1
  330. package/lib/icon-list/index.js +121 -7
  331. package/lib/img/Contain.js +44 -69
  332. package/lib/img/Cover.js +78 -117
  333. package/lib/img/index.js +60 -74
  334. package/lib/index.js +184 -614
  335. package/lib/input/index.d.ts +3 -3
  336. package/lib/input/index.js +22 -23
  337. package/lib/input/index.js.map +1 -1
  338. package/lib/input-number/index.d.ts +3 -3
  339. package/lib/input-number/index.js +22 -23
  340. package/lib/input-number/index.js.map +1 -1
  341. package/lib/layout/index.d.ts +3 -3
  342. package/lib/layout/index.js +22 -23
  343. package/lib/layout/index.js.map +1 -1
  344. package/lib/list/index.d.ts +3 -3
  345. package/lib/list/index.js +22 -23
  346. package/lib/list/index.js.map +1 -1
  347. package/lib/loading-button/index.js +55 -58
  348. package/lib/locale/default.js +10 -12
  349. package/lib/locale/default.js.map +1 -1
  350. package/lib/locale/en_US.js +35 -37
  351. package/lib/locale/en_US.js.map +1 -1
  352. package/lib/locale/index.js +18 -36
  353. package/lib/locale/zh_CN.js +35 -37
  354. package/lib/locale/zh_CN.js.map +1 -1
  355. package/lib/locale-provider/index.d.ts +3 -3
  356. package/lib/locale-provider/index.js +25 -26
  357. package/lib/locale-provider/index.js.map +1 -1
  358. package/lib/mention/index.d.ts +3 -3
  359. package/lib/mention/index.js +22 -23
  360. package/lib/mention/index.js.map +1 -1
  361. package/lib/mentions/index.d.ts +3 -3
  362. package/lib/mentions/index.js +22 -23
  363. package/lib/mentions/index.js.map +1 -1
  364. package/lib/menu/index.d.ts +3 -3
  365. package/lib/menu/index.js +22 -23
  366. package/lib/menu/index.js.map +1 -1
  367. package/lib/message/index.d.ts +3 -3
  368. package/lib/message/index.js +22 -23
  369. package/lib/message/index.js.map +1 -1
  370. package/lib/modal/index.d.ts +1 -1
  371. package/lib/modal/index.js +21 -22
  372. package/lib/modal/index.js.map +1 -1
  373. package/lib/modal/modal.d.ts +9 -9
  374. package/lib/modal/modal.js +49 -53
  375. package/lib/modal/modal.js.map +1 -1
  376. package/lib/notification/index.d.ts +3 -3
  377. package/lib/notification/index.js +22 -23
  378. package/lib/notification/index.js.map +1 -1
  379. package/lib/page/Box.js +40 -66
  380. package/lib/page/index.js +99 -151
  381. package/lib/page/utils.js +16 -22
  382. package/lib/page-header/index.d.ts +3 -3
  383. package/lib/page-header/index.js +22 -23
  384. package/lib/page-header/index.js.map +1 -1
  385. package/lib/pagination/index.d.ts +3 -3
  386. package/lib/pagination/index.js +22 -23
  387. package/lib/pagination/index.js.map +1 -1
  388. package/lib/popconfirm/index.d.ts +3 -3
  389. package/lib/popconfirm/index.js +22 -23
  390. package/lib/popconfirm/index.js.map +1 -1
  391. package/lib/popover/index.d.ts +3 -3
  392. package/lib/popover/index.js +22 -23
  393. package/lib/popover/index.js.map +1 -1
  394. package/lib/prev-locale.js +53 -67
  395. package/lib/progress/index.d.ts +3 -3
  396. package/lib/progress/index.js +22 -23
  397. package/lib/progress/index.js.map +1 -1
  398. package/lib/query-form/Field/Checkbox.js +22 -28
  399. package/lib/query-form/Field/Select.js +68 -79
  400. package/lib/query-form/Field/SelectInput.js +73 -85
  401. package/lib/query-form/Field/fieldsMap.d.ts +2 -2
  402. package/lib/query-form/Field/fieldsMap.js +32 -34
  403. package/lib/query-form/Field/index.js +95 -139
  404. package/lib/query-form/createActions.js +50 -53
  405. package/lib/query-form/index.js +286 -377
  406. package/lib/query-form/useForm.js +11 -11
  407. package/lib/query-list-scene/List.js +291 -360
  408. package/lib/query-list-scene/QueryForm.js +103 -160
  409. package/lib/query-list-scene/QueryListScene.js +31 -66
  410. package/lib/query-list-scene/Title.js +9 -15
  411. package/lib/query-list-scene/Toolbar.js +20 -31
  412. package/lib/query-list-scene/createActions.js +64 -79
  413. package/lib/query-list-scene/index.js +24 -28
  414. package/lib/query-list-scene/useActions.js +11 -11
  415. package/lib/radio/index.d.ts +3 -3
  416. package/lib/radio/index.js +22 -23
  417. package/lib/radio/index.js.map +1 -1
  418. package/lib/rate/index.d.ts +3 -3
  419. package/lib/rate/index.js +22 -23
  420. package/lib/rate/index.js.map +1 -1
  421. package/lib/render-empty/index.js +4 -8
  422. package/lib/render-empty/render-empty.js +22 -28
  423. package/lib/render-empty/render-empty.js.map +1 -1
  424. package/lib/result/index.d.ts +3 -3
  425. package/lib/result/index.js +22 -23
  426. package/lib/result/index.js.map +1 -1
  427. package/lib/row/index.d.ts +3 -3
  428. package/lib/row/index.js +22 -23
  429. package/lib/row/index.js.map +1 -1
  430. package/lib/select/index.d.ts +3 -3
  431. package/lib/select/index.js +22 -23
  432. package/lib/select/index.js.map +1 -1
  433. package/lib/skeleton/index.d.ts +3 -3
  434. package/lib/skeleton/index.js +22 -23
  435. package/lib/skeleton/index.js.map +1 -1
  436. package/lib/slider/index.d.ts +3 -3
  437. package/lib/slider/index.js +22 -23
  438. package/lib/slider/index.js.map +1 -1
  439. package/lib/spin/index.d.ts +3 -3
  440. package/lib/spin/index.js +22 -23
  441. package/lib/spin/index.js.map +1 -1
  442. package/lib/statistic/index.d.ts +3 -3
  443. package/lib/statistic/index.js +22 -23
  444. package/lib/statistic/index.js.map +1 -1
  445. package/lib/steps/index.d.ts +1 -1
  446. package/lib/steps/index.js +19 -20
  447. package/lib/steps/index.js.map +1 -1
  448. package/lib/steps/steps.d.ts +3 -3
  449. package/lib/steps/steps.js +59 -72
  450. package/lib/steps/steps.js.map +1 -1
  451. package/lib/svg-components/illustration-403.d.ts +1 -1
  452. package/lib/svg-components/illustration-403.js +84 -217
  453. package/lib/svg-components/illustration-404.d.ts +1 -1
  454. package/lib/svg-components/illustration-404.js +101 -301
  455. package/lib/svg-components/illustration-500.d.ts +1 -1
  456. package/lib/svg-components/illustration-500.js +109 -332
  457. package/lib/svg-components/illustration-empty.d.ts +1 -1
  458. package/lib/svg-components/illustration-empty.js +41 -65
  459. package/lib/svg-components/illustration-failure.d.ts +1 -1
  460. package/lib/svg-components/illustration-failure.js +62 -123
  461. package/lib/svg-components/illustration-no-access.d.ts +1 -1
  462. package/lib/svg-components/illustration-no-access.js +61 -125
  463. package/lib/svg-components/illustration-no-chart.d.ts +1 -1
  464. package/lib/svg-components/illustration-no-chart.js +63 -145
  465. package/lib/svg-components/illustration-no-result.d.ts +1 -1
  466. package/lib/svg-components/illustration-no-result.js +58 -103
  467. package/lib/svg-components/illustration-offline.d.ts +1 -1
  468. package/lib/svg-components/illustration-offline.js +69 -142
  469. package/lib/svg-components/illustration-success.d.ts +1 -1
  470. package/lib/svg-components/illustration-success.js +69 -148
  471. package/lib/svg-components/index.js +26 -75
  472. package/lib/switch/index.d.ts +3 -3
  473. package/lib/switch/index.js +22 -23
  474. package/lib/switch/index.js.map +1 -1
  475. package/lib/table/assets/image-loading-background.d.ts +1 -1
  476. package/lib/table/assets/image-loading-background.js +43 -56
  477. package/lib/table/assets/image-loading.d.ts +1 -1
  478. package/lib/table/assets/image-loading.js +31 -37
  479. package/lib/table/constants.js +3 -6
  480. package/lib/table/context.js +4 -7
  481. package/lib/table/hooks/index.js +16 -14
  482. package/lib/table/hooks/use-column-setting.d.ts +1 -1
  483. package/lib/table/hooks/use-column-setting.js +20 -37
  484. package/lib/table/hooks/use-column-setting.js.map +1 -1
  485. package/lib/table/index.d.ts +1 -1
  486. package/lib/table/index.js +19 -20
  487. package/lib/table/index.js.map +1 -1
  488. package/lib/table/table.d.ts +5 -4
  489. package/lib/table/table.d.ts.map +1 -1
  490. package/lib/table/table.js +92 -108
  491. package/lib/table/table.js.map +1 -1
  492. package/lib/table/table.less +7 -0
  493. package/lib/table/table.stories.js +154 -182
  494. package/lib/table/utils.d.ts +1 -1
  495. package/lib/table/utils.js +25 -24
  496. package/lib/table/utils.js.map +1 -1
  497. package/lib/tabs/index.d.ts +3 -3
  498. package/lib/tabs/index.js +22 -23
  499. package/lib/tabs/index.js.map +1 -1
  500. package/lib/tag/index.d.ts +3 -3
  501. package/lib/tag/index.js +22 -23
  502. package/lib/tag/index.js.map +1 -1
  503. package/lib/time-picker/index.d.ts +3 -3
  504. package/lib/time-picker/index.js +22 -23
  505. package/lib/time-picker/index.js.map +1 -1
  506. package/lib/timeline/index.d.ts +3 -3
  507. package/lib/timeline/index.js +22 -23
  508. package/lib/timeline/index.js.map +1 -1
  509. package/lib/title/index.js +26 -45
  510. package/lib/tntd-cascader/AntdCascader/component/DisabledContext.js +31 -18
  511. package/lib/tntd-cascader/AntdCascader/component/FormItemInputContext.js +26 -9
  512. package/lib/tntd-cascader/AntdCascader/component/SizeContext.js +26 -9
  513. package/lib/tntd-cascader/AntdCascader/component/context.js +16 -18
  514. package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +39 -36
  515. package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js.map +1 -1
  516. package/lib/tntd-cascader/AntdCascader/component/getIcons.js +75 -81
  517. package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +50 -31
  518. package/lib/tntd-cascader/AntdCascader/config/utils.js +27 -29
  519. package/lib/tntd-cascader/AntdCascader/config/warning.js +35 -19
  520. package/lib/tntd-cascader/AntdCascader/index.js +162 -216
  521. package/lib/tntd-cascader/AntdCascader/interface.js +6 -13
  522. package/lib/tntd-cascader/img/no-data-s.png +0 -0
  523. package/lib/tntd-cascader/index.js +8 -12
  524. package/lib/tntd-cascader/rc-cascader/Cascader.js +284 -325
  525. package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +41 -30
  526. package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +152 -198
  527. package/lib/tntd-cascader/rc-cascader/OptionList/index.js +163 -223
  528. package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +48 -40
  529. package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +166 -179
  530. package/lib/tntd-cascader/rc-cascader/context.js +27 -11
  531. package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +63 -62
  532. package/lib/tntd-cascader/rc-cascader/hooks/useEntities.js +49 -39
  533. package/lib/tntd-cascader/rc-cascader/hooks/useMissingValues.js +41 -26
  534. package/lib/tntd-cascader/rc-cascader/hooks/useRefFunc.js +33 -16
  535. package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +51 -30
  536. package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +65 -75
  537. package/lib/tntd-cascader/rc-cascader/index.js +7 -9
  538. package/lib/tntd-cascader/rc-cascader/utils/commonUtil.js +38 -49
  539. package/lib/tntd-cascader/rc-cascader/utils/treeUtil.js +39 -42
  540. package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +30 -34
  541. package/lib/tntd-form/TntdForm/components/Item.js +61 -55
  542. package/lib/tntd-form/TntdForm/components/ItemComp.js +190 -203
  543. package/lib/tntd-form/TntdForm/components/List.js +111 -118
  544. package/lib/tntd-form/TntdForm/index.js +67 -61
  545. package/lib/tntd-form/TntdForm/interface.js +2 -4
  546. package/lib/tntd-form/TntdForm/store.js +7 -8
  547. package/lib/tntd-form/TntdForm/utils.js +184 -182
  548. package/lib/tntd-form/index.js +8 -12
  549. package/lib/tntd-icon/fonts/iconfont.js +53 -36
  550. package/lib/tntd-icon/index.js +25 -40
  551. package/lib/tntd-layout/ActionsContext.js +4 -8
  552. package/lib/tntd-layout/AppList.js +224 -173
  553. package/lib/tntd-layout/Application.js +111 -75
  554. package/lib/tntd-layout/Avatar.js +135 -100
  555. package/lib/tntd-layout/CompatibleLanguage.js +180 -128
  556. package/lib/tntd-layout/EnterpriseLayout/Avatar.js +146 -117
  557. package/lib/tntd-layout/EnterpriseLayout/Language.js +90 -73
  558. package/lib/tntd-layout/EnterpriseLayout/Theme.js +102 -69
  559. package/lib/tntd-layout/EnterpriseLayout/index.js +17 -28
  560. package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +277 -284
  561. package/lib/tntd-layout/GlobalNavigation/index.js +115 -108
  562. package/lib/tntd-layout/Header.js +136 -77
  563. package/lib/tntd-layout/HeaderActions.js +106 -105
  564. package/lib/tntd-layout/HeaderNavs.js +107 -78
  565. package/lib/tntd-layout/HeaderTabs.js +316 -224
  566. package/lib/tntd-layout/Iconfont.js +7 -11
  567. package/lib/tntd-layout/Language.js +76 -69
  568. package/lib/tntd-layout/Layout.js +171 -214
  569. package/lib/tntd-layout/Logo.js +144 -69
  570. package/lib/tntd-layout/OrgAppList.js +388 -238
  571. package/lib/tntd-layout/SideMenu.js +408 -269
  572. package/lib/tntd-layout/Theme.js +93 -75
  573. package/lib/tntd-layout/createActions.js +34 -45
  574. package/lib/tntd-layout/images/avatar/empty.png +0 -0
  575. package/lib/tntd-layout/images/avatar/female1.png +0 -0
  576. package/lib/tntd-layout/images/avatar/female2.png +0 -0
  577. package/lib/tntd-layout/images/avatar/female3.png +0 -0
  578. package/lib/tntd-layout/images/avatar/female4.png +0 -0
  579. package/lib/tntd-layout/images/avatar/female5.png +0 -0
  580. package/lib/tntd-layout/images/avatar/female6.png +0 -0
  581. package/lib/tntd-layout/images/avatar/male1.png +0 -0
  582. package/lib/tntd-layout/images/avatar/male2.png +0 -0
  583. package/lib/tntd-layout/images/avatar/male3.png +0 -0
  584. package/lib/tntd-layout/images/avatar/male4.png +0 -0
  585. package/lib/tntd-layout/images/avatar/male5.png +0 -0
  586. package/lib/tntd-layout/images/avatar/male6.png +0 -0
  587. package/lib/tntd-layout/images/index.js +66 -68
  588. package/lib/tntd-layout/index.js +95 -137
  589. package/lib/tntd-layout/paaslayout/CompactSideMenu.js +182 -131
  590. package/lib/tntd-layout/paaslayout/Header.js +79 -51
  591. package/lib/tntd-layout/paaslayout/Logo.js +30 -15
  592. package/lib/tntd-layout/paaslayout/SideMenu.js +147 -131
  593. package/lib/tntd-layout/paaslayout/index.js +141 -205
  594. package/lib/tntd-layout/storage.js +30 -58
  595. package/lib/tntd-modal/index.js +62 -98
  596. package/lib/tntd-second-page/index.js +33 -60
  597. package/lib/tntd-second-page/index.js.map +1 -1
  598. package/lib/tntd-select/DropDownWrap.js +78 -102
  599. package/lib/tntd-select/index.d.ts +2 -3
  600. package/lib/tntd-select/index.d.ts.map +1 -1
  601. package/lib/tntd-select/index.js +519 -607
  602. package/lib/tooltip/index.d.ts +3 -3
  603. package/lib/tooltip/index.js +22 -23
  604. package/lib/tooltip/index.js.map +1 -1
  605. package/lib/transfer/index.d.ts +3 -3
  606. package/lib/transfer/index.js +22 -23
  607. package/lib/transfer/index.js.map +1 -1
  608. package/lib/tree/index.d.ts +3 -3
  609. package/lib/tree/index.js +22 -23
  610. package/lib/tree/index.js.map +1 -1
  611. package/lib/tree-select/index.d.ts +3 -3
  612. package/lib/tree-select/index.js +22 -23
  613. package/lib/tree-select/index.js.map +1 -1
  614. package/lib/typography/index.d.ts +3 -3
  615. package/lib/typography/index.js +22 -23
  616. package/lib/typography/index.js.map +1 -1
  617. package/lib/upload/index.d.ts +3 -3
  618. package/lib/upload/index.js +22 -23
  619. package/lib/upload/index.js.map +1 -1
  620. package/lib/utils/checkAuth.js +23 -34
  621. package/lib/utils/findMenuInfoByPath.js +34 -41
  622. package/lib/utils/index.js +80 -117
  623. package/lib/version/index.d.ts +3 -3
  624. package/lib/version/index.js +22 -23
  625. package/lib/version/index.js.map +1 -1
  626. package/package.json +1 -1
  627. package/es/array-input/style/index.js +0 -1
  628. package/es/array-input/style/index.js.map +0 -1
  629. package/es/auth-context/style/index.js +0 -1
  630. package/es/auth-context/style/index.js.map +0 -1
  631. package/es/development-login/style/index.js +0 -1
  632. package/es/development-login/style/index.js.map +0 -1
  633. package/es/ellipsis/style/index.js +0 -1
  634. package/es/ellipsis/style/index.js.map +0 -1
  635. package/es/empty/render-empty.js +0 -22
  636. package/es/empty/render-empty.js.map +0 -1
  637. package/es/empty/style/index.js +0 -2
  638. package/es/empty/style/index.js.map +0 -1
  639. package/es/handle/style/index.js +0 -1
  640. package/es/handle/style/index.js.map +0 -1
  641. package/es/icon-list/style/index.js +0 -1
  642. package/es/icon-list/style/index.js.map +0 -1
  643. package/es/img/style/index.js +0 -1
  644. package/es/img/style/index.js.map +0 -1
  645. package/es/loading-button/style/index.js +0 -1
  646. package/es/loading-button/style/index.js.map +0 -1
  647. package/es/page/style/index.js +0 -1
  648. package/es/page/style/index.js.map +0 -1
  649. package/es/query-form/style/index.js +0 -1
  650. package/es/query-form/style/index.js.map +0 -1
  651. package/es/query-list-scene/style/index.js +0 -1
  652. package/es/query-list-scene/style/index.js.map +0 -1
  653. package/es/render-empty/style/index.js +0 -1
  654. package/es/render-empty/style/index.js.map +0 -1
  655. package/es/table/style/index.js +0 -2
  656. package/es/table/style/index.js.map +0 -1
  657. package/es/title/style/index.js +0 -1
  658. package/es/title/style/index.js.map +0 -1
  659. package/es/tntd-icon/style/index.js +0 -1
  660. package/es/tntd-icon/style/index.js.map +0 -1
  661. package/es/tntd-layout/style/index.js +0 -1
  662. package/es/tntd-layout/style/index.js.map +0 -1
  663. package/es/tntd-modal/style/index.js +0 -1
  664. package/es/tntd-modal/style/index.js.map +0 -1
  665. package/es/tntd-select/style/index.js +0 -1
  666. package/es/tntd-select/style/index.js.map +0 -1
  667. package/lib/array-input/style/index.d.ts +0 -1
  668. package/lib/array-input/style/index.d.ts.map +0 -1
  669. package/lib/array-input/style/index.js +0 -1
  670. package/lib/array-input/style/index.js.map +0 -1
  671. package/lib/auth-context/style/index.d.ts +0 -1
  672. package/lib/auth-context/style/index.d.ts.map +0 -1
  673. package/lib/auth-context/style/index.js +0 -1
  674. package/lib/auth-context/style/index.js.map +0 -1
  675. package/lib/development-login/style/index.d.ts +0 -1
  676. package/lib/development-login/style/index.d.ts.map +0 -1
  677. package/lib/development-login/style/index.js +0 -1
  678. package/lib/development-login/style/index.js.map +0 -1
  679. package/lib/ellipsis/style/index.d.ts +0 -1
  680. package/lib/ellipsis/style/index.d.ts.map +0 -1
  681. package/lib/ellipsis/style/index.js +0 -1
  682. package/lib/ellipsis/style/index.js.map +0 -1
  683. package/lib/empty/render-empty.d.ts +0 -3
  684. package/lib/empty/render-empty.d.ts.map +0 -1
  685. package/lib/empty/render-empty.js +0 -32
  686. package/lib/empty/render-empty.js.map +0 -1
  687. package/lib/empty/style/index.d.ts +0 -3
  688. package/lib/empty/style/index.d.ts.map +0 -1
  689. package/lib/empty/style/index.js +0 -4
  690. package/lib/empty/style/index.js.map +0 -1
  691. package/lib/handle/style/index.d.ts +0 -1
  692. package/lib/handle/style/index.d.ts.map +0 -1
  693. package/lib/handle/style/index.js +0 -1
  694. package/lib/handle/style/index.js.map +0 -1
  695. package/lib/icon-list/style/index.d.ts +0 -3
  696. package/lib/icon-list/style/index.d.ts.map +0 -1
  697. package/lib/icon-list/style/index.js +0 -8
  698. package/lib/icon-list/style/index.js.map +0 -1
  699. package/lib/img/style/index.d.ts +0 -1
  700. package/lib/img/style/index.d.ts.map +0 -1
  701. package/lib/img/style/index.js +0 -1
  702. package/lib/img/style/index.js.map +0 -1
  703. package/lib/loading-button/style/index.d.ts +0 -1
  704. package/lib/loading-button/style/index.d.ts.map +0 -1
  705. package/lib/loading-button/style/index.js +0 -1
  706. package/lib/loading-button/style/index.js.map +0 -1
  707. package/lib/page/style/index.d.ts +0 -1
  708. package/lib/page/style/index.d.ts.map +0 -1
  709. package/lib/page/style/index.js +0 -1
  710. package/lib/page/style/index.js.map +0 -1
  711. package/lib/query-form/style/index.d.ts +0 -1
  712. package/lib/query-form/style/index.d.ts.map +0 -1
  713. package/lib/query-form/style/index.js +0 -1
  714. package/lib/query-form/style/index.js.map +0 -1
  715. package/lib/query-list-scene/style/index.d.ts +0 -1
  716. package/lib/query-list-scene/style/index.d.ts.map +0 -1
  717. package/lib/query-list-scene/style/index.js +0 -1
  718. package/lib/query-list-scene/style/index.js.map +0 -1
  719. package/lib/render-empty/style/index.d.ts +0 -2
  720. package/lib/render-empty/style/index.d.ts.map +0 -1
  721. package/lib/render-empty/style/index.js +0 -3
  722. package/lib/render-empty/style/index.js.map +0 -1
  723. package/lib/table/style/index.d.ts +0 -3
  724. package/lib/table/style/index.d.ts.map +0 -1
  725. package/lib/table/style/index.js +0 -4
  726. package/lib/table/style/index.js.map +0 -1
  727. package/lib/title/style/index.d.ts +0 -1
  728. package/lib/title/style/index.d.ts.map +0 -1
  729. package/lib/title/style/index.js +0 -1
  730. package/lib/title/style/index.js.map +0 -1
  731. package/lib/tntd-icon/style/index.d.ts +0 -1
  732. package/lib/tntd-icon/style/index.d.ts.map +0 -1
  733. package/lib/tntd-icon/style/index.js +0 -1
  734. package/lib/tntd-icon/style/index.js.map +0 -1
  735. package/lib/tntd-layout/style/index.d.ts +0 -1
  736. package/lib/tntd-layout/style/index.d.ts.map +0 -1
  737. package/lib/tntd-layout/style/index.js +0 -1
  738. package/lib/tntd-layout/style/index.js.map +0 -1
  739. package/lib/tntd-modal/style/index.d.ts +0 -1
  740. package/lib/tntd-modal/style/index.d.ts.map +0 -1
  741. package/lib/tntd-modal/style/index.js +0 -1
  742. package/lib/tntd-modal/style/index.js.map +0 -1
  743. package/lib/tntd-select/style/index.d.ts +0 -1
  744. package/lib/tntd-select/style/index.d.ts.map +0 -1
  745. package/lib/tntd-select/style/index.js +0 -1
  746. package/lib/tntd-select/style/index.js.map +0 -1
@@ -1,36 +1,27 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.validateFields = exports.recursionSort = exports.recursionCheck = exports.isValidKey = exports.handleCheckItem = exports.getNames = exports.getInitValue = exports.getFieldsValue = exports.getFieldValue = void 0;
7
- function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }
8
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
11
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
12
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
- var isValidKey = function isValidKey(key, object) {
14
- return key in object;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.handleCheckItem = exports.getInitValue = exports.validateFields = exports.getFieldValue = exports.getFieldsValue = exports.recursionSort = exports.recursionCheck = exports.getNames = exports.isValidKey = void 0;
4
+ const isValidKey = (key, object) => {
5
+ return key in object;
15
6
  };
7
+ exports.isValidKey = isValidKey;
16
8
  /**
17
9
  * 将xx.xx.xx 转换为数组
18
10
  * @param {*} name
19
11
  * @returns
20
12
  */
21
- exports.isValidKey = isValidKey;
22
- var getNames = function getNames(name) {
23
- var attrs = [];
24
- if (Array.isArray(name)) {
25
- var _name = _toArray(name),
26
- str = _name[0],
27
- rest = _name.slice(1);
28
- attrs = str.split('.').concat(rest);
29
- } else {
30
- attrs = typeof name === 'string' ? name.split('.') : [];
31
- }
32
- return attrs;
13
+ const getNames = (name) => {
14
+ let attrs = [];
15
+ if (Array.isArray(name)) {
16
+ const [str, ...rest] = name;
17
+ attrs = str.split('.').concat(rest);
18
+ }
19
+ else {
20
+ attrs = typeof name === 'string' ? name.split('.') : [];
21
+ }
22
+ return attrs;
33
23
  };
24
+ exports.getNames = getNames;
34
25
  /**
35
26
  * 对数据进行校验
36
27
  * @param {*} list
@@ -38,36 +29,37 @@ var getNames = function getNames(name) {
38
29
  * @param {*} formData
39
30
  * @returns
40
31
  */
41
- exports.getNames = getNames;
42
- var recursionCheck = function recursionCheck(list, dataLevel, formData) {
43
- var errorList = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
44
- try {
45
- if (Array.isArray(list)) {
46
- list.forEach(function (item) {
47
- var key = item.name;
48
- var attrs = Object.keys(formData[key]);
49
- attrs.forEach(function (attr) {
50
- var _a;
51
- var error = (_a = formData[item.name][attr]) === null || _a === void 0 ? void 0 : _a.checkItem();
52
- if (error) {
53
- errorList.push("".concat([item.name + '.' + attr], ":"), error);
54
- }
55
- });
56
- if (dataLevel[key]) {
57
- recursionCheck(dataLevel[key], dataLevel, formData, errorList);
32
+ const recursionCheck = (list, dataLevel, formData, errorList = []) => {
33
+ try {
34
+ if (Array.isArray(list)) {
35
+ list.forEach((item) => {
36
+ const key = item.name;
37
+ const attrs = Object.keys(formData[key]);
38
+ attrs.forEach((attr) => {
39
+ var _a;
40
+ const error = (_a = formData[item.name][attr]) === null || _a === void 0 ? void 0 : _a.checkItem();
41
+ if (error) {
42
+ errorList.push(`${[item.name + '.' + attr]}:`, error);
43
+ }
44
+ });
45
+ if (dataLevel[key]) {
46
+ (0, exports.recursionCheck)(dataLevel[key], dataLevel, formData, errorList);
47
+ }
48
+ });
58
49
  }
59
- });
50
+ return errorList;
60
51
  }
61
- return errorList;
62
- } catch (e) {
63
- if (typeof e === 'string') {
64
- throw e.toUpperCase();
65
- } else if (e instanceof Error) {
66
- throw e.message;
52
+ catch (e) {
53
+ if (typeof e === 'string') {
54
+ throw e.toUpperCase();
55
+ }
56
+ else if (e instanceof Error) {
57
+ throw e.message;
58
+ }
59
+ throw e;
67
60
  }
68
- throw e;
69
- }
70
61
  };
62
+ exports.recursionCheck = recursionCheck;
71
63
  /**
72
64
  * 将数据进行排序
73
65
  * @param {*} list
@@ -76,164 +68,174 @@ var recursionCheck = function recursionCheck(list, dataLevel, formData) {
76
68
  * @param {*} errorList
77
69
  * @returns
78
70
  */
79
- exports.recursionCheck = recursionCheck;
80
- var recursionSort = function recursionSort(list, dataLevel, formData) {
81
- try {
82
- if (Array.isArray(list)) {
83
- var values = list.reduce(function (total, item, index) {
84
- var attrObj = {};
85
- var key = item.name;
86
- var prefixs = key.split('.');
87
- var attrs = formData[key] ? Object.keys(formData[key]) : [];
88
- attrs.forEach(function (attr) {
89
- var _a;
90
- attrObj[attr] = (_a = formData[key][attr]) === null || _a === void 0 ? void 0 : _a.value;
91
- });
92
- var children = [];
93
- if (dataLevel[key]) {
94
- children = recursionSort(dataLevel[key], dataLevel, formData);
95
- }
96
- var len = prefixs.length - 2;
97
- if (total[prefixs[len]]) {
98
- total[prefixs[len]][index] = Object.assign(Object.assign({}, attrObj), children || []);
99
- } else {
100
- total[prefixs[len]] = [Object.assign(Object.assign({}, attrObj), children || [])];
101
- }
102
- return total;
103
- }, {});
104
- return values;
71
+ const recursionSort = (list, dataLevel, formData) => {
72
+ try {
73
+ if (Array.isArray(list)) {
74
+ const values = list.reduce((total, item, index) => {
75
+ const attrObj = {};
76
+ const key = item.name;
77
+ const prefixs = key.split('.');
78
+ const attrs = formData[key] ? Object.keys(formData[key]) : [];
79
+ attrs.forEach((attr) => {
80
+ var _a;
81
+ attrObj[attr] = (_a = formData[key][attr]) === null || _a === void 0 ? void 0 : _a.value;
82
+ });
83
+ let children = [];
84
+ if (dataLevel[key]) {
85
+ children = (0, exports.recursionSort)(dataLevel[key], dataLevel, formData);
86
+ }
87
+ const len = prefixs.length - 2;
88
+ if (total[prefixs[len]]) {
89
+ total[prefixs[len]][index] = Object.assign(Object.assign({}, attrObj), (children || []));
90
+ }
91
+ else {
92
+ total[prefixs[len]] = [
93
+ Object.assign(Object.assign({}, attrObj), (children || [])),
94
+ ];
95
+ }
96
+ return total;
97
+ }, {});
98
+ return values;
99
+ }
105
100
  }
106
- } catch (e) {
107
- if (typeof e === 'string') {
108
- console.error(e.toUpperCase());
109
- throw e.toUpperCase();
110
- } else if (e instanceof Error) {
111
- console.error(e.message);
112
- throw e.message;
101
+ catch (e) {
102
+ if (typeof e === 'string') {
103
+ console.error(e.toUpperCase());
104
+ throw e.toUpperCase();
105
+ }
106
+ else if (e instanceof Error) {
107
+ console.error(e.message);
108
+ throw e.message;
109
+ }
110
+ throw e;
113
111
  }
114
- throw e;
115
- }
116
112
  };
113
+ exports.recursionSort = recursionSort;
117
114
  /**
118
115
  * 获取form表单的value
119
116
  * @param {*} formCurrent
120
117
  * @returns
121
118
  */
122
- exports.recursionSort = recursionSort;
123
- var getFieldsValue = function getFieldsValue(formCurrent) {
124
- try {
125
- var formData = formCurrent.formData,
126
- dataLevel = formCurrent.dataLevel;
127
- var firstKey = '';
128
- // 这里不直接用Object.keys的原因是Object.keys并不能保证一定是按照属性顺序
129
- for (var i in dataLevel) {
130
- if (Object.prototype.hasOwnProperty.call(dataLevel, i)) {
131
- firstKey = i;
132
- break;
133
- }
119
+ const getFieldsValue = (formCurrent) => {
120
+ try {
121
+ const { formData, dataLevel } = formCurrent;
122
+ let firstKey = '';
123
+ // 这里不直接用Object.keys的原因是Object.keys并不能保证一定是按照属性顺序
124
+ for (const i in dataLevel) {
125
+ if (Object.prototype.hasOwnProperty.call(dataLevel, i)) {
126
+ firstKey = i;
127
+ break;
128
+ }
129
+ }
130
+ const recursionStart = dataLevel[firstKey];
131
+ const values = (0, exports.recursionSort)(recursionStart, dataLevel, formData);
132
+ return values;
134
133
  }
135
- var recursionStart = dataLevel[firstKey];
136
- var values = recursionSort(recursionStart, dataLevel, formData);
137
- return values;
138
- } catch (e) {
139
- if (typeof e === 'string') {
140
- console.error(e.toUpperCase());
141
- return e.toUpperCase();
142
- } else if (e instanceof Error) {
143
- console.error(e.message);
144
- return e.message;
134
+ catch (e) {
135
+ if (typeof e === 'string') {
136
+ console.error(e.toUpperCase());
137
+ return e.toUpperCase();
138
+ }
139
+ else if (e instanceof Error) {
140
+ console.error(e.message);
141
+ return e.message;
142
+ }
143
+ return e;
145
144
  }
146
- return e;
147
- }
148
145
  };
146
+ exports.getFieldsValue = getFieldsValue;
149
147
  /**
150
148
  * 获取form表单的value
151
149
  * @param {*} formCurrent
152
150
  * @returns
153
151
  */
154
- exports.getFieldsValue = getFieldsValue;
155
- var getFieldValue = function getFieldValue(formCurrent, field) {
156
- var _a, _b;
157
- try {
158
- var formData = formCurrent.formData;
159
- return formData && ((_b = (_a = formData === null || formData === void 0 ? void 0 : formData[field[0]]) === null || _a === void 0 ? void 0 : _a[field[1]]) === null || _b === void 0 ? void 0 : _b.value);
160
- } catch (e) {
161
- if (typeof e === 'string') {
162
- return e.toUpperCase();
163
- } else if (e instanceof Error) {
164
- return e.message;
152
+ const getFieldValue = (formCurrent, field) => {
153
+ var _a, _b;
154
+ try {
155
+ const { formData } = formCurrent;
156
+ return formData && ((_b = (_a = formData === null || formData === void 0 ? void 0 : formData[field[0]]) === null || _a === void 0 ? void 0 : _a[field[1]]) === null || _b === void 0 ? void 0 : _b.value);
157
+ }
158
+ catch (e) {
159
+ if (typeof e === 'string') {
160
+ return e.toUpperCase();
161
+ }
162
+ else if (e instanceof Error) {
163
+ return e.message;
164
+ }
165
+ return e;
165
166
  }
166
- return e;
167
- }
168
167
  };
168
+ exports.getFieldValue = getFieldValue;
169
169
  /**
170
170
  * 提交时候校验的方法
171
171
  * @param {*} formCurrent
172
172
  * @returns
173
173
  */
174
- exports.getFieldValue = getFieldValue;
175
- var validateFields = function validateFields(formCurrent) {
176
- return new Promise(function (resolve) {
177
- var formData = formCurrent.formData,
178
- dataLevel = formCurrent.dataLevel;
179
- var firstKey = '';
180
- // 这里不直接用Object.keys的原因是Object.keys并不能保证一定是按照属性顺序
181
- for (var i in dataLevel) {
182
- if (Object.prototype.hasOwnProperty.call(dataLevel, i)) {
183
- firstKey = i;
184
- break;
185
- }
186
- }
187
- var recursionStart = dataLevel[firstKey];
188
- var errorList = recursionCheck(recursionStart, dataLevel, formData);
189
- if (Array.isArray(errorList) && errorList.length) {
190
- console.error(JSON.stringify(errorList));
191
- } else {
192
- resolve(recursionSort(recursionStart, dataLevel, formData));
193
- }
194
- });
174
+ const validateFields = (formCurrent) => {
175
+ return new Promise((resolve) => {
176
+ const { formData, dataLevel } = formCurrent;
177
+ let firstKey = '';
178
+ // 这里不直接用Object.keys的原因是Object.keys并不能保证一定是按照属性顺序
179
+ for (const i in dataLevel) {
180
+ if (Object.prototype.hasOwnProperty.call(dataLevel, i)) {
181
+ firstKey = i;
182
+ break;
183
+ }
184
+ }
185
+ const recursionStart = dataLevel[firstKey];
186
+ const errorList = (0, exports.recursionCheck)(recursionStart, dataLevel, formData);
187
+ if (Array.isArray(errorList) && errorList.length) {
188
+ console.error(JSON.stringify(errorList));
189
+ }
190
+ else {
191
+ resolve((0, exports.recursionSort)(recursionStart, dataLevel, formData));
192
+ }
193
+ });
195
194
  };
196
- /** 获取初始化的值 */
197
195
  exports.validateFields = validateFields;
198
- var getInitValue = function getInitValue(initialValues, names) {
199
- var keys = [];
200
- if (Array.isArray(names)) {
201
- var _names = _toArray(names),
202
- str = _names[0],
203
- rest = _names.slice(1);
204
- keys = str.split('.').concat(rest);
205
- }
206
- if (Array.isArray(keys) && !!keys.length) {
207
- keys.forEach(function (i) {
208
- initialValues = ['', null, undefined].includes(initialValues === null || initialValues === void 0 ? void 0 : initialValues[i]) ? undefined : initialValues === null || initialValues === void 0 ? void 0 : initialValues[i];
209
- });
210
- }
211
- return initialValues;
196
+ /** 获取初始化的值 */
197
+ const getInitValue = (initialValues, names) => {
198
+ let keys = [];
199
+ if (Array.isArray(names)) {
200
+ const [str, ...rest] = names;
201
+ keys = str.split('.').concat(rest);
202
+ }
203
+ if (Array.isArray(keys) && !!keys.length) {
204
+ keys.forEach((i) => {
205
+ initialValues = ['', null, undefined].includes(initialValues === null || initialValues === void 0 ? void 0 : initialValues[i])
206
+ ? undefined
207
+ : initialValues === null || initialValues === void 0 ? void 0 : initialValues[i];
208
+ });
209
+ }
210
+ return initialValues;
212
211
  };
213
- /** 校验表单是否正确的方法 */
214
212
  exports.getInitValue = getInitValue;
215
- var handleCheckItem = function handleCheckItem(value, rules) {
216
- try {
217
- if (Array.isArray(rules)) {
218
- rules.forEach(function (i) {
219
- // @ts-ignore
220
- if (i.required && ['', null, undefined].includes(value)) {
221
- throw new Error((i === null || i === void 0 ? void 0 : i.message) || 'error');
222
- }
223
- if (i === null || i === void 0 ? void 0 : i.validator) {
224
- i.validator(rules, value, function (_errorMsg) {
225
- throw new Error(_errorMsg);
226
- });
227
- }
228
- });
213
+ /** 校验表单是否正确的方法 */
214
+ const handleCheckItem = (value, rules) => {
215
+ try {
216
+ if (Array.isArray(rules)) {
217
+ rules.forEach((i) => {
218
+ // @ts-ignore
219
+ if (i.required && ['', null, undefined].includes(value)) {
220
+ throw new Error((i === null || i === void 0 ? void 0 : i.message) || 'error');
221
+ }
222
+ if (i === null || i === void 0 ? void 0 : i.validator) {
223
+ i.validator(rules, value, function (_errorMsg) {
224
+ throw new Error(_errorMsg);
225
+ });
226
+ }
227
+ });
228
+ }
229
+ return;
229
230
  }
230
- return;
231
- } catch (e) {
232
- if (typeof e === 'string') {
233
- return e.toUpperCase();
234
- } else if (e instanceof Error) {
235
- return e.message;
231
+ catch (e) {
232
+ if (typeof e === 'string') {
233
+ return e.toUpperCase();
234
+ }
235
+ else if (e instanceof Error) {
236
+ return e.message;
237
+ }
236
238
  }
237
- }
238
239
  };
239
- exports.handleCheckItem = handleCheckItem;
240
+ exports.handleCheckItem = handleCheckItem;
241
+ //# sourceMappingURL=utils.js.map
@@ -1,13 +1,9 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "default", {
7
- enumerable: true,
8
- get: function get() {
9
- return _TntdForm["default"];
10
- }
11
- });
12
- var _TntdForm = _interopRequireDefault(require("./TntdForm"));
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = void 0;
7
+ var TntdForm_1 = require("./TntdForm");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(TntdForm_1).default; } });
9
+ //# sourceMappingURL=index.js.map