tntd 2.0.13 → 2.0.14

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 (431) hide show
  1. package/es/array-input/index.js +31 -6
  2. package/es/columns/index.js +12 -6
  3. package/es/development-login/LoginModal.js +10 -4
  4. package/es/drawer/drawer.js +8 -4
  5. package/es/ellipsis/index.js +25 -14
  6. package/es/empty/empty.js +13 -9
  7. package/es/handle/index.js +27 -14
  8. package/es/img/Contain.js +19 -13
  9. package/es/img/Cover.js +24 -13
  10. package/es/img/index.js +21 -14
  11. package/es/index.js +1 -0
  12. package/es/loading-button/index.js +13 -6
  13. package/es/locale/default.js +2 -0
  14. package/es/locale/en_US.js +2 -0
  15. package/es/locale/zh_CN.js +2 -0
  16. package/es/page/Box.js +28 -19
  17. package/es/page/index.js +38 -22
  18. package/es/page/utils.js +5 -0
  19. package/es/prev-locale.js +3 -0
  20. package/es/query-form/Field/Checkbox.js +8 -4
  21. package/es/query-form/Field/Select.js +17 -10
  22. package/es/query-form/Field/SelectInput.js +18 -4
  23. package/es/query-form/Field/fieldsMap.js +1 -0
  24. package/es/query-form/Field/index.js +11 -2
  25. package/es/query-form/createActions.js +8 -0
  26. package/es/query-form/index.js +34 -2
  27. package/es/query-list-scene/List.js +39 -18
  28. package/es/query-list-scene/QueryForm.js +19 -10
  29. package/es/query-list-scene/QueryListScene.js +2 -0
  30. package/es/query-list-scene/Toolbar.js +10 -6
  31. package/es/query-list-scene/createActions.js +3 -0
  32. package/es/render-empty/render-empty.js +2 -0
  33. package/es/steps/steps.js +17 -9
  34. package/es/steps/style/nav.less +3 -1
  35. package/es/svg-components/illustration-403.js +2 -0
  36. package/es/svg-components/illustration-404.js +2 -0
  37. package/es/svg-components/illustration-500.js +2 -0
  38. package/es/svg-components/illustration-empty.js +2 -0
  39. package/es/svg-components/illustration-failure.js +2 -0
  40. package/es/svg-components/illustration-no-access.js +2 -0
  41. package/es/svg-components/illustration-no-chart.js +2 -0
  42. package/es/svg-components/illustration-no-result.js +2 -0
  43. package/es/svg-components/illustration-offline.js +2 -0
  44. package/es/svg-components/illustration-success.js +2 -0
  45. package/es/table/assets/image-loading-background.js +2 -0
  46. package/es/table/assets/image-loading.js +2 -0
  47. package/es/table/hooks/use-column-setting.js +1 -0
  48. package/es/table/table.js +19 -14
  49. package/es/table/table.stories.js +2 -0
  50. package/es/table/utils.js +6 -2
  51. package/es/title/index.js +14 -10
  52. package/es/tntd-cascader/AntdCascader/component/context.js +4 -2
  53. package/es/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +2 -0
  54. package/es/tntd-cascader/AntdCascader/component/getIcons.js +15 -6
  55. package/es/tntd-cascader/AntdCascader/config/utils.js +2 -0
  56. package/es/tntd-cascader/AntdCascader/config/warning.js +8 -4
  57. package/es/tntd-cascader/AntdCascader/index.js +73 -51
  58. package/es/tntd-cascader/rc-cascader/Cascader.js +113 -86
  59. package/es/tntd-cascader/rc-cascader/OptionList/Column.js +26 -16
  60. package/es/tntd-cascader/rc-cascader/OptionList/index.js +43 -26
  61. package/es/tntd-cascader/rc-cascader/OptionList/useActive.js +7 -5
  62. package/es/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +41 -12
  63. package/es/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +10 -4
  64. package/es/tntd-cascader/rc-cascader/hooks/useEntities.js +4 -2
  65. package/es/tntd-cascader/rc-cascader/hooks/useMissingValues.js +1 -0
  66. package/es/tntd-cascader/rc-cascader/hooks/useRefFunc.js +1 -0
  67. package/es/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +7 -2
  68. package/es/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +15 -8
  69. package/es/tntd-cascader/rc-cascader/utils/commonUtil.js +6 -2
  70. package/es/tntd-cascader/rc-cascader/utils/treeUtil.js +4 -2
  71. package/es/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +7 -2
  72. package/es/tntd-icon/fonts/iconfont.js +12 -7
  73. package/es/tntd-icon/index.js +9 -5
  74. package/es/tntd-layout/ActionsContext.js +2 -2
  75. package/es/tntd-layout/AppList.js +14 -2
  76. package/es/tntd-layout/Application.js +4 -0
  77. package/es/tntd-layout/Avatar.js +4 -0
  78. package/es/tntd-layout/CompatibleLanguage.js +13 -0
  79. package/es/tntd-layout/EnterpriseLayout/Avatar.js +4 -0
  80. package/es/tntd-layout/EnterpriseLayout/Language.js +6 -0
  81. package/es/tntd-layout/EnterpriseLayout/Theme.js +4 -0
  82. package/es/tntd-layout/EnterpriseLayout/index.js +2 -2
  83. package/es/tntd-layout/GlobalNavigation/NavigationPopup.js +33 -2
  84. package/es/tntd-layout/GlobalNavigation/index.js +6 -0
  85. package/es/tntd-layout/HeaderActions.js +32 -28
  86. package/es/tntd-layout/HeaderNavs.js +14 -6
  87. package/es/tntd-layout/HeaderTabs.js +35 -14
  88. package/es/tntd-layout/Language.js +6 -0
  89. package/es/tntd-layout/Layout.js +7 -2
  90. package/es/tntd-layout/Logo.js +11 -4
  91. package/es/tntd-layout/OrgAppList.js +39 -22
  92. package/es/tntd-layout/SideMenu.js +45 -8
  93. package/es/tntd-layout/Theme.js +6 -0
  94. package/es/tntd-layout/index.js +17 -9
  95. package/es/tntd-layout/paaslayout/CompactSideMenu.js +15 -0
  96. package/es/tntd-layout/paaslayout/SideMenu.js +15 -0
  97. package/es/tntd-layout/paaslayout/index.js +13 -4
  98. package/es/tntd-layout/storage.js +2 -2
  99. package/es/tntd-modal/index.js +18 -12
  100. package/es/tntd-second-page/index.js +3 -0
  101. package/es/tntd-select/DropDownWrap.js +8 -4
  102. package/es/tntd-select/index.js +118 -74
  103. package/es/utils/checkAuth.js +1 -0
  104. package/es/utils/findMenuInfoByPath.js +3 -0
  105. package/es/utils/index.js +11 -2
  106. package/lib/affix/index.js +10 -4
  107. package/lib/alert/index.js +10 -4
  108. package/lib/anchor/index.js +10 -4
  109. package/lib/array-input/icon.js +7 -1
  110. package/lib/array-input/index.js +91 -41
  111. package/lib/auth-context/index.js +3 -0
  112. package/lib/auto-complete/index.js +10 -4
  113. package/lib/avatar/index.js +10 -4
  114. package/lib/back-top/index.js +10 -4
  115. package/lib/badge/index.js +10 -4
  116. package/lib/breadcrumb/index.js +10 -4
  117. package/lib/button/index.js +10 -4
  118. package/lib/calendar/index.js +10 -4
  119. package/lib/card/index.js +10 -4
  120. package/lib/carousel/index.js +10 -4
  121. package/lib/cascader/index.js +10 -4
  122. package/lib/checkbox/index.js +10 -4
  123. package/lib/col/index.js +10 -4
  124. package/lib/collapse/index.js +11 -4
  125. package/lib/columns/index.js +28 -14
  126. package/lib/comment/index.js +10 -4
  127. package/lib/config-provider/config-provider.js +2 -0
  128. package/lib/config-provider/index.js +10 -4
  129. package/lib/date-picker/index.js +10 -4
  130. package/lib/descriptions/index.js +10 -4
  131. package/lib/development-login/LoginModal.js +50 -25
  132. package/lib/development-login/index.js +22 -11
  133. package/lib/divider/index.js +10 -4
  134. package/lib/drawer/drawer.js +16 -6
  135. package/lib/drawer/index.js +5 -1
  136. package/lib/dropdown/index.js +10 -4
  137. package/lib/ellipsis/Svg/CopySVG.js +4 -0
  138. package/lib/ellipsis/Svg/TickSVG.js +4 -0
  139. package/lib/ellipsis/index.js +73 -42
  140. package/lib/empty/empty.js +30 -14
  141. package/lib/empty/empty.stories.js +21 -3
  142. package/lib/empty/index.js +5 -1
  143. package/lib/exception/exception.js +14 -7
  144. package/lib/exception/index.js +4 -1
  145. package/lib/form/index.js +10 -4
  146. package/lib/handle/index.js +46 -19
  147. package/lib/icon/index.js +10 -4
  148. package/lib/img/Contain.js +23 -12
  149. package/lib/img/Cover.js +53 -31
  150. package/lib/img/index.js +47 -29
  151. package/lib/index.js +187 -100
  152. package/lib/input/index.js +10 -4
  153. package/lib/input-number/index.js +10 -4
  154. package/lib/layout/index.js +10 -4
  155. package/lib/list/index.js +10 -4
  156. package/lib/loading-button/index.js +32 -15
  157. package/lib/locale/default.js +5 -0
  158. package/lib/locale/en_US.js +4 -0
  159. package/lib/locale/index.js +6 -3
  160. package/lib/locale/zh_CN.js +4 -0
  161. package/lib/locale-provider/index.js +10 -4
  162. package/lib/mention/index.js +10 -4
  163. package/lib/mentions/index.js +10 -4
  164. package/lib/menu/index.js +10 -4
  165. package/lib/message/index.js +11 -4
  166. package/lib/modal/index.js +11 -4
  167. package/lib/notification/index.js +10 -4
  168. package/lib/page/Box.js +37 -24
  169. package/lib/page/index.js +66 -37
  170. package/lib/page/utils.js +9 -1
  171. package/lib/page-header/index.js +10 -4
  172. package/lib/pagination/index.js +10 -4
  173. package/lib/popconfirm/index.js +10 -4
  174. package/lib/popover/index.js +10 -4
  175. package/lib/prev-locale.js +10 -1
  176. package/lib/progress/index.js +10 -4
  177. package/lib/query-form/Field/Checkbox.js +11 -2
  178. package/lib/query-form/Field/Select.js +45 -27
  179. package/lib/query-form/Field/SelectInput.js +46 -21
  180. package/lib/query-form/Field/fieldsMap.js +12 -1
  181. package/lib/query-form/Field/index.js +70 -38
  182. package/lib/query-form/createActions.js +7 -0
  183. package/lib/query-form/index.js +121 -52
  184. package/lib/query-form/useForm.js +4 -0
  185. package/lib/query-list-scene/List.js +111 -58
  186. package/lib/query-list-scene/QueryForm.js +67 -37
  187. package/lib/query-list-scene/QueryListScene.js +42 -21
  188. package/lib/query-list-scene/Title.js +5 -1
  189. package/lib/query-list-scene/Toolbar.js +15 -8
  190. package/lib/query-list-scene/createActions.js +6 -0
  191. package/lib/query-list-scene/index.js +10 -0
  192. package/lib/query-list-scene/useActions.js +4 -0
  193. package/lib/radio/index.js +10 -4
  194. package/lib/rate/index.js +10 -4
  195. package/lib/render-empty/index.js +2 -0
  196. package/lib/render-empty/render-empty.js +8 -0
  197. package/lib/result/index.js +10 -4
  198. package/lib/row/index.js +10 -4
  199. package/lib/select/index.js +10 -4
  200. package/lib/skeleton/index.js +10 -4
  201. package/lib/slider/index.js +10 -4
  202. package/lib/spin/index.js +10 -4
  203. package/lib/statistic/index.js +10 -4
  204. package/lib/steps/index.js +5 -1
  205. package/lib/steps/steps.js +29 -12
  206. package/lib/steps/style/nav.less +3 -1
  207. package/lib/svg-components/illustration-403.js +9 -3
  208. package/lib/svg-components/illustration-404.js +9 -3
  209. package/lib/svg-components/illustration-500.js +9 -3
  210. package/lib/svg-components/illustration-empty.js +9 -3
  211. package/lib/svg-components/illustration-failure.js +9 -3
  212. package/lib/svg-components/illustration-no-access.js +9 -3
  213. package/lib/svg-components/illustration-no-chart.js +9 -3
  214. package/lib/svg-components/illustration-no-result.js +9 -3
  215. package/lib/svg-components/illustration-offline.js +9 -3
  216. package/lib/svg-components/illustration-success.js +9 -3
  217. package/lib/svg-components/index.js +11 -0
  218. package/lib/switch/index.js +10 -4
  219. package/lib/table/assets/image-loading-background.js +9 -3
  220. package/lib/table/assets/image-loading.js +9 -3
  221. package/lib/table/context.js +2 -0
  222. package/lib/table/hooks/index.js +2 -1
  223. package/lib/table/hooks/use-column-setting.js +16 -8
  224. package/lib/table/index.js +5 -1
  225. package/lib/table/table.js +63 -34
  226. package/lib/table/table.stories.js +11 -2
  227. package/lib/table/utils.js +11 -2
  228. package/lib/tabs/index.js +10 -4
  229. package/lib/tag/index.js +10 -4
  230. package/lib/time-picker/index.js +10 -4
  231. package/lib/timeline/index.js +10 -4
  232. package/lib/title/index.js +20 -10
  233. package/lib/tntd-cascader/AntdCascader/component/DisabledContext.js +11 -4
  234. package/lib/tntd-cascader/AntdCascader/component/FormItemInputContext.js +8 -3
  235. package/lib/tntd-cascader/AntdCascader/component/SizeContext.js +8 -3
  236. package/lib/tntd-cascader/AntdCascader/component/context.js +9 -3
  237. package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +12 -4
  238. package/lib/tntd-cascader/AntdCascader/component/getIcons.js +37 -19
  239. package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +17 -8
  240. package/lib/tntd-cascader/AntdCascader/config/utils.js +15 -6
  241. package/lib/tntd-cascader/AntdCascader/config/warning.js +15 -7
  242. package/lib/tntd-cascader/AntdCascader/index.js +133 -80
  243. package/lib/tntd-cascader/AntdCascader/interface.js +3 -0
  244. package/lib/tntd-cascader/index.js +2 -0
  245. package/lib/tntd-cascader/rc-cascader/Cascader.js +188 -123
  246. package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +21 -11
  247. package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +88 -60
  248. package/lib/tntd-cascader/rc-cascader/OptionList/index.js +109 -65
  249. package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +33 -18
  250. package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +106 -56
  251. package/lib/tntd-cascader/rc-cascader/context.js +8 -3
  252. package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +31 -14
  253. package/lib/tntd-cascader/rc-cascader/hooks/useEntities.js +15 -5
  254. package/lib/tntd-cascader/rc-cascader/hooks/useMissingValues.js +11 -3
  255. package/lib/tntd-cascader/rc-cascader/hooks/useRefFunc.js +8 -3
  256. package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +15 -3
  257. package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +41 -26
  258. package/lib/tntd-cascader/rc-cascader/index.js +3 -0
  259. package/lib/tntd-cascader/rc-cascader/utils/commonUtil.js +20 -9
  260. package/lib/tntd-cascader/rc-cascader/utils/treeUtil.js +8 -0
  261. package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +14 -7
  262. package/lib/tntd-icon/fonts/iconfont.js +12 -7
  263. package/lib/tntd-icon/index.js +17 -6
  264. package/lib/tntd-layout/ActionsContext.js +3 -0
  265. package/lib/tntd-layout/AppList.js +105 -30
  266. package/lib/tntd-layout/Application.js +84 -22
  267. package/lib/tntd-layout/Avatar.js +72 -18
  268. package/lib/tntd-layout/CompatibleLanguage.js +105 -32
  269. package/lib/tntd-layout/EnterpriseLayout/Avatar.js +80 -24
  270. package/lib/tntd-layout/EnterpriseLayout/Language.js +45 -14
  271. package/lib/tntd-layout/EnterpriseLayout/Theme.js +46 -16
  272. package/lib/tntd-layout/EnterpriseLayout/index.js +12 -4
  273. package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +174 -45
  274. package/lib/tntd-layout/GlobalNavigation/index.js +70 -19
  275. package/lib/tntd-layout/Header.js +54 -20
  276. package/lib/tntd-layout/HeaderActions.js +64 -33
  277. package/lib/tntd-layout/HeaderNavs.js +59 -19
  278. package/lib/tntd-layout/HeaderTabs.js +111 -43
  279. package/lib/tntd-layout/Iconfont.js +5 -0
  280. package/lib/tntd-layout/Language.js +45 -14
  281. package/lib/tntd-layout/Layout.js +113 -74
  282. package/lib/tntd-layout/Logo.js +41 -14
  283. package/lib/tntd-layout/OrgAppList.js +119 -51
  284. package/lib/tntd-layout/SideMenu.js +120 -42
  285. package/lib/tntd-layout/Theme.js +71 -19
  286. package/lib/tntd-layout/createActions.js +5 -0
  287. package/lib/tntd-layout/images/index.js +28 -0
  288. package/lib/tntd-layout/index.js +49 -21
  289. package/lib/tntd-layout/paaslayout/CompactSideMenu.js +81 -29
  290. package/lib/tntd-layout/paaslayout/Header.js +47 -14
  291. package/lib/tntd-layout/paaslayout/Logo.js +19 -2
  292. package/lib/tntd-layout/paaslayout/SideMenu.js +82 -31
  293. package/lib/tntd-layout/paaslayout/index.js +108 -62
  294. package/lib/tntd-layout/storage.d.ts +1 -1
  295. package/lib/tntd-layout/storage.d.ts.map +1 -1
  296. package/lib/tntd-layout/storage.js +33 -3
  297. package/lib/tntd-modal/index.js +51 -32
  298. package/lib/tntd-second-page/index.js +24 -14
  299. package/lib/tntd-select/DropDownWrap.js +45 -24
  300. package/lib/tntd-select/index.js +206 -117
  301. package/lib/tooltip/index.js +10 -4
  302. package/lib/transfer/index.js +10 -4
  303. package/lib/tree/index.js +10 -4
  304. package/lib/tree-select/index.js +10 -4
  305. package/lib/typography/index.js +10 -4
  306. package/lib/upload/index.js +10 -4
  307. package/lib/utils/checkAuth.js +10 -4
  308. package/lib/utils/findMenuInfoByPath.js +7 -1
  309. package/lib/utils/index.js +41 -13
  310. package/lib/version/index.js +10 -4
  311. package/package.json +1 -1
  312. package/es/array-input/style/index.js +0 -1
  313. package/es/array-input/style/index.js.map +0 -1
  314. package/es/auth-context/style/index.js +0 -1
  315. package/es/auth-context/style/index.js.map +0 -1
  316. package/es/development-login/style/index.js +0 -1
  317. package/es/development-login/style/index.js.map +0 -1
  318. package/es/ellipsis/style/index.js +0 -1
  319. package/es/ellipsis/style/index.js.map +0 -1
  320. package/es/empty/render-empty.js +0 -22
  321. package/es/empty/render-empty.js.map +0 -1
  322. package/es/empty/style/index.js +0 -2
  323. package/es/empty/style/index.js.map +0 -1
  324. package/es/handle/style/index.js +0 -1
  325. package/es/handle/style/index.js.map +0 -1
  326. package/es/icon-list/style/index.js +0 -1
  327. package/es/icon-list/style/index.js.map +0 -1
  328. package/es/img/style/index.js +0 -1
  329. package/es/img/style/index.js.map +0 -1
  330. package/es/loading-button/style/index.js +0 -1
  331. package/es/loading-button/style/index.js.map +0 -1
  332. package/es/page/style/index.js +0 -1
  333. package/es/page/style/index.js.map +0 -1
  334. package/es/query-form/style/index.js +0 -1
  335. package/es/query-form/style/index.js.map +0 -1
  336. package/es/query-list-scene/style/index.js +0 -1
  337. package/es/query-list-scene/style/index.js.map +0 -1
  338. package/es/render-empty/style/index.js +0 -1
  339. package/es/render-empty/style/index.js.map +0 -1
  340. package/es/table/style/index.js +0 -2
  341. package/es/table/style/index.js.map +0 -1
  342. package/es/title/style/index.js +0 -1
  343. package/es/title/style/index.js.map +0 -1
  344. package/es/tntd-icon/style/index.js +0 -1
  345. package/es/tntd-icon/style/index.js.map +0 -1
  346. package/es/tntd-layout/style/index.js +0 -1
  347. package/es/tntd-layout/style/index.js.map +0 -1
  348. package/es/tntd-modal/style/index.js +0 -1
  349. package/es/tntd-modal/style/index.js.map +0 -1
  350. package/es/tntd-select/style/index.js +0 -1
  351. package/es/tntd-select/style/index.js.map +0 -1
  352. package/lib/array-input/style/index.d.ts +0 -1
  353. package/lib/array-input/style/index.d.ts.map +0 -1
  354. package/lib/array-input/style/index.js +0 -1
  355. package/lib/array-input/style/index.js.map +0 -1
  356. package/lib/auth-context/style/index.d.ts +0 -1
  357. package/lib/auth-context/style/index.d.ts.map +0 -1
  358. package/lib/auth-context/style/index.js +0 -1
  359. package/lib/auth-context/style/index.js.map +0 -1
  360. package/lib/development-login/style/index.d.ts +0 -1
  361. package/lib/development-login/style/index.d.ts.map +0 -1
  362. package/lib/development-login/style/index.js +0 -1
  363. package/lib/development-login/style/index.js.map +0 -1
  364. package/lib/ellipsis/style/index.d.ts +0 -1
  365. package/lib/ellipsis/style/index.d.ts.map +0 -1
  366. package/lib/ellipsis/style/index.js +0 -1
  367. package/lib/ellipsis/style/index.js.map +0 -1
  368. package/lib/empty/render-empty.d.ts +0 -3
  369. package/lib/empty/render-empty.d.ts.map +0 -1
  370. package/lib/empty/render-empty.js +0 -32
  371. package/lib/empty/render-empty.js.map +0 -1
  372. package/lib/empty/style/index.d.ts +0 -3
  373. package/lib/empty/style/index.d.ts.map +0 -1
  374. package/lib/empty/style/index.js +0 -4
  375. package/lib/empty/style/index.js.map +0 -1
  376. package/lib/handle/style/index.d.ts +0 -1
  377. package/lib/handle/style/index.d.ts.map +0 -1
  378. package/lib/handle/style/index.js +0 -1
  379. package/lib/handle/style/index.js.map +0 -1
  380. package/lib/icon-list/style/index.d.ts +0 -3
  381. package/lib/icon-list/style/index.d.ts.map +0 -1
  382. package/lib/icon-list/style/index.js +0 -8
  383. package/lib/icon-list/style/index.js.map +0 -1
  384. package/lib/img/style/index.d.ts +0 -1
  385. package/lib/img/style/index.d.ts.map +0 -1
  386. package/lib/img/style/index.js +0 -1
  387. package/lib/img/style/index.js.map +0 -1
  388. package/lib/loading-button/style/index.d.ts +0 -1
  389. package/lib/loading-button/style/index.d.ts.map +0 -1
  390. package/lib/loading-button/style/index.js +0 -1
  391. package/lib/loading-button/style/index.js.map +0 -1
  392. package/lib/page/style/index.d.ts +0 -1
  393. package/lib/page/style/index.d.ts.map +0 -1
  394. package/lib/page/style/index.js +0 -1
  395. package/lib/page/style/index.js.map +0 -1
  396. package/lib/query-form/style/index.d.ts +0 -1
  397. package/lib/query-form/style/index.d.ts.map +0 -1
  398. package/lib/query-form/style/index.js +0 -1
  399. package/lib/query-form/style/index.js.map +0 -1
  400. package/lib/query-list-scene/style/index.d.ts +0 -1
  401. package/lib/query-list-scene/style/index.d.ts.map +0 -1
  402. package/lib/query-list-scene/style/index.js +0 -1
  403. package/lib/query-list-scene/style/index.js.map +0 -1
  404. package/lib/render-empty/style/index.d.ts +0 -2
  405. package/lib/render-empty/style/index.d.ts.map +0 -1
  406. package/lib/render-empty/style/index.js +0 -3
  407. package/lib/render-empty/style/index.js.map +0 -1
  408. package/lib/table/style/index.d.ts +0 -3
  409. package/lib/table/style/index.d.ts.map +0 -1
  410. package/lib/table/style/index.js +0 -4
  411. package/lib/table/style/index.js.map +0 -1
  412. package/lib/title/style/index.d.ts +0 -1
  413. package/lib/title/style/index.d.ts.map +0 -1
  414. package/lib/title/style/index.js +0 -1
  415. package/lib/title/style/index.js.map +0 -1
  416. package/lib/tntd-icon/style/index.d.ts +0 -1
  417. package/lib/tntd-icon/style/index.d.ts.map +0 -1
  418. package/lib/tntd-icon/style/index.js +0 -1
  419. package/lib/tntd-icon/style/index.js.map +0 -1
  420. package/lib/tntd-layout/style/index.d.ts +0 -1
  421. package/lib/tntd-layout/style/index.d.ts.map +0 -1
  422. package/lib/tntd-layout/style/index.js +0 -1
  423. package/lib/tntd-layout/style/index.js.map +0 -1
  424. package/lib/tntd-modal/style/index.d.ts +0 -1
  425. package/lib/tntd-modal/style/index.d.ts.map +0 -1
  426. package/lib/tntd-modal/style/index.js +0 -1
  427. package/lib/tntd-modal/style/index.js.map +0 -1
  428. package/lib/tntd-select/style/index.d.ts +0 -1
  429. package/lib/tntd-select/style/index.d.ts.map +0 -1
  430. package/lib/tntd-select/style/index.js +0 -1
  431. package/lib/tntd-select/style/index.js.map +0 -1
@@ -1,41 +1,63 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports["default"] = void 0;
7
+
8
8
  var _throttle2 = _interopRequireDefault(require("lodash/throttle"));
9
+
9
10
  var _pickBy2 = _interopRequireDefault(require("lodash/pickBy"));
11
+
10
12
  var _isEmpty2 = _interopRequireDefault(require("lodash/isEmpty"));
13
+
11
14
  var _get2 = _interopRequireDefault(require("lodash/get"));
15
+
12
16
  var _debounce2 = _interopRequireDefault(require("lodash/debounce"));
17
+
13
18
  var _classnames = _interopRequireDefault(require("classnames"));
19
+
14
20
  var _react = _interopRequireWildcard(require("react"));
21
+
15
22
  var _reactDom = require("react-dom");
23
+
16
24
  var _prevLocale = require("../prev-locale");
25
+
17
26
  var _spin = _interopRequireDefault(require("../spin"));
27
+
18
28
  var _table = _interopRequireDefault(require("../table"));
19
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
20
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
+
30
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
31
+
32
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
33
+
21
34
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
35
+
36
+ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
37
+
22
38
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
23
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
24
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
25
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
26
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
27
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
28
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
29
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
30
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
39
+
40
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
41
+
42
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
43
+
44
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
45
+
46
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
47
+
31
48
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
32
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
33
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
49
+
50
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
51
+
52
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
53
+
34
54
  var __rest = void 0 && (void 0).__rest || function (s, e) {
35
55
  var t = {};
56
+
36
57
  for (var p in s) {
37
58
  if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
38
59
  }
60
+
39
61
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
40
62
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
41
63
  }
@@ -45,20 +67,28 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
45
67
  * @file QueryList
46
68
  * @author you.zhang
47
69
  */
48
- var QueryList = /*#__PURE__*/function (_React$PureComponent) {
70
+
71
+
72
+ var QueryList =
73
+ /*#__PURE__*/
74
+ function (_React$PureComponent) {
49
75
  _inherits(QueryList, _React$PureComponent);
50
- var _super = _createSuper(QueryList);
76
+
51
77
  function QueryList(props) {
52
78
  var _this;
79
+
53
80
  _classCallCheck(this, QueryList);
81
+
54
82
  var _a;
55
- _this = _super.call(this, props);
83
+
84
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(QueryList).call(this, props));
56
85
  Object.defineProperty(_assertThisInitialized(_this), "onWindowResize", {
57
86
  enumerable: true,
58
87
  configurable: true,
59
88
  writable: true,
60
89
  value: (0, _debounce2["default"])(function () {
61
90
  var scroll = _this.state.scroll;
91
+
62
92
  _this.setState({
63
93
  scroll: Object.assign(Object.assign({}, scroll), {
64
94
  y: window.innerHeight - (_this.initialTop || _this.props.top || 200)
@@ -72,36 +102,42 @@ var QueryList = /*#__PURE__*/function (_React$PureComponent) {
72
102
  writable: true,
73
103
  value: function value() {
74
104
  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
105
+
75
106
  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
76
- callback = _ref.callback,
77
- _ref$showLoading = _ref.showLoading,
78
- showLoading = _ref$showLoading === void 0 ? true : _ref$showLoading,
79
- isInterval = _ref.isInterval;
107
+ callback = _ref.callback,
108
+ _ref$showLoading = _ref.showLoading,
109
+ showLoading = _ref$showLoading === void 0 ? true : _ref$showLoading,
110
+ isInterval = _ref.isInterval;
111
+
80
112
  var _this$props = _this.props,
81
- query = _this$props.qlsProps.query,
82
- defaultExpandAllRows = _this$props.defaultExpandAllRows,
83
- rowKey = _this$props.rowKey,
84
- actions = _this$props.actions;
113
+ query = _this$props.qlsProps.query,
114
+ defaultExpandAllRows = _this$props.defaultExpandAllRows,
115
+ rowKey = _this$props.rowKey,
116
+ actions = _this$props.actions;
85
117
  var pagination = _this.state.pagination;
86
118
  var hasPagination = _this.props.pagination !== false;
119
+
87
120
  if (hasPagination) {
88
121
  params = Object.assign({
89
122
  pageSize: pagination.pageSize,
90
123
  current: pagination.current
91
124
  }, params);
92
125
  }
126
+
93
127
  showLoading && _this.setState({
94
128
  loading: true
95
- });
96
- // 当用户操作查询还未得到服务端响应前,不要执行轮询请求时序问题导致覆盖
129
+ }); // 当用户操作查询还未得到服务端响应前,不要执行轮询请求时序问题导致覆盖
130
+
97
131
  if (!isInterval) {
98
132
  _this.isFetching = true;
99
133
  }
134
+
100
135
  actions.setData('submittedFormData', params);
101
136
  return query((0, _pickBy2["default"])(params, function (val) {
102
137
  return val !== '' && val !== null && val !== undefined;
103
138
  })).then(function (result) {
104
139
  var dataSource = hasPagination ? result.data || [] : result;
140
+
105
141
  _this.setState(Object.assign({
106
142
  loading: false,
107
143
  dataSource: dataSource,
@@ -135,6 +171,7 @@ var QueryList = /*#__PURE__*/function (_React$PureComponent) {
135
171
  _this.setState({
136
172
  dataSource: dataSource
137
173
  });
174
+
138
175
  _this.props.actions.setData('dataSource', dataSource);
139
176
  }
140
177
  });
@@ -146,6 +183,7 @@ var QueryList = /*#__PURE__*/function (_React$PureComponent) {
146
183
  _this.setState({
147
184
  pagination: pagination
148
185
  });
186
+
149
187
  _this.props.actions.setData('pagination', pagination);
150
188
  }
151
189
  });
@@ -168,11 +206,12 @@ var QueryList = /*#__PURE__*/function (_React$PureComponent) {
168
206
  writable: true,
169
207
  value: function value(values) {
170
208
  var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
171
- callback = _ref2.callback,
172
- _ref2$showLoading = _ref2.showLoading,
173
- showLoading = _ref2$showLoading === void 0 ? true : _ref2$showLoading;
174
- _this.formData = Object.assign(Object.assign({}, _this.formData), values);
175
- // this.props.actions.setData('formData', this.formData);
209
+ callback = _ref2.callback,
210
+ _ref2$showLoading = _ref2.showLoading,
211
+ showLoading = _ref2$showLoading === void 0 ? true : _ref2$showLoading;
212
+
213
+ _this.formData = Object.assign(Object.assign({}, _this.formData), values); // this.props.actions.setData('formData', this.formData);
214
+
176
215
  return _this.fetchData(_this.formData, {
177
216
  callback: callback,
178
217
  showLoading: showLoading
@@ -185,8 +224,8 @@ var QueryList = /*#__PURE__*/function (_React$PureComponent) {
185
224
  writable: true,
186
225
  value: function value(pagination, filters, sorter) {
187
226
  var _this$props2 = _this.props,
188
- actions = _this$props2.actions,
189
- localPagination = _this$props2.localPagination;
227
+ actions = _this$props2.actions,
228
+ localPagination = _this$props2.localPagination;
190
229
  var tableParams = {
191
230
  pageSize: pagination.pageSize,
192
231
  current: pagination.current,
@@ -194,15 +233,17 @@ var QueryList = /*#__PURE__*/function (_React$PureComponent) {
194
233
  sorter: (0, _isEmpty2["default"])(sorter) ? undefined : sorter
195
234
  };
196
235
  console.log('onTableChange...', actions.getSubmittedFormData(), _this.formData);
197
- Object.assign(_this.formData, tableParams);
198
- // 排序变化暂时不处理,因为有时可能是前端sorter不需要走请求
236
+ Object.assign(_this.formData, tableParams); // 排序变化暂时不处理,因为有时可能是前端sorter不需要走请求
199
237
  // 所以暂时排序有使用者自己处理
238
+
200
239
  if (!localPagination) {
201
240
  _this.fetchData(Object.assign(Object.assign({}, actions.getSubmittedFormData()), tableParams));
241
+
202
242
  return;
203
243
  }
204
- var dataSource = _this.state.dataSource;
205
- // 前端本地分页
244
+
245
+ var dataSource = _this.state.dataSource; // 前端本地分页
246
+
206
247
  if (localPagination) {
207
248
  _this.setState({
208
249
  dataSource: dataSource,
@@ -224,6 +265,7 @@ var QueryList = /*#__PURE__*/function (_React$PureComponent) {
224
265
  writable: true,
225
266
  value: (0, _throttle2["default"])(function (evt) {
226
267
  console.log('onTableBodyScroll', evt.target.scrollTop);
268
+
227
269
  _this.updateIsScrollToBottom(evt.target);
228
270
  }, 50)
229
271
  });
@@ -234,10 +276,11 @@ var QueryList = /*#__PURE__*/function (_React$PureComponent) {
234
276
  value: function value(tableBody) {
235
277
  var isScrollToBottom = function isScrollToBottom(tableBody) {
236
278
  var scrollHeight = tableBody.scrollHeight,
237
- scrollTop = tableBody.scrollTop,
238
- offsetHeight = tableBody.offsetHeight;
279
+ scrollTop = tableBody.scrollTop,
280
+ offsetHeight = tableBody.offsetHeight;
239
281
  return scrollHeight === scrollTop + offsetHeight;
240
282
  };
283
+
241
284
  _this.setState({
242
285
  hasScrollToBottom: isScrollToBottom(tableBody)
243
286
  });
@@ -262,28 +305,30 @@ var QueryList = /*#__PURE__*/function (_React$PureComponent) {
262
305
  actions.on('setFormData', _this.onFormChange);
263
306
  return _this;
264
307
  }
308
+
265
309
  _createClass(QueryList, [{
266
310
  key: "render",
267
311
  value: function render() {
268
312
  var _a = this.props,
269
- columns = _a.columns,
270
- children = _a.children,
271
- pagination = _a.pagination,
272
- _a$localPagination = _a.localPagination,
273
- localPagination = _a$localPagination === void 0 ? false : _a$localPagination,
274
- _a$paginationSticky = _a.paginationSticky,
275
- paginationSticky = _a$paginationSticky === void 0 ? false : _a$paginationSticky,
276
- _a$className = _a.className,
277
- className = _a$className === void 0 ? '' : _a$className,
278
- qlsProps = _a.qlsProps,
279
- rest = __rest(_a, ["columns", "children", "pagination", "localPagination", "paginationSticky", "className", "qlsProps"]);
313
+ columns = _a.columns,
314
+ children = _a.children,
315
+ pagination = _a.pagination,
316
+ _a$localPagination = _a.localPagination,
317
+ localPagination = _a$localPagination === void 0 ? false : _a$localPagination,
318
+ _a$paginationSticky = _a.paginationSticky,
319
+ paginationSticky = _a$paginationSticky === void 0 ? false : _a$paginationSticky,
320
+ _a$className = _a.className,
321
+ className = _a$className === void 0 ? '' : _a$className,
322
+ qlsProps = _a.qlsProps,
323
+ rest = __rest(_a, ["columns", "children", "pagination", "localPagination", "paginationSticky", "className", "qlsProps"]);
324
+
280
325
  var _this$state = this.state,
281
- dataSource = _this$state.dataSource,
282
- loading = _this$state.loading,
283
- _this$state$expandedR = _this$state.expandedRowKeys,
284
- expandedRowKeys = _this$state$expandedR === void 0 ? [] : _this$state$expandedR,
285
- scroll = _this$state.scroll,
286
- hasScrollToBottom = _this$state.hasScrollToBottom;
326
+ dataSource = _this$state.dataSource,
327
+ loading = _this$state.loading,
328
+ _this$state$expandedR = _this$state.expandedRowKeys,
329
+ expandedRowKeys = _this$state$expandedR === void 0 ? [] : _this$state$expandedR,
330
+ scroll = _this$state.scroll,
331
+ hasScrollToBottom = _this$state.hasScrollToBottom;
287
332
  var hasPagination = typeof pagination !== 'undefined' ? pagination : true;
288
333
  var paginationInfo = Object.assign(Object.assign(Object.assign({}, this.state.pagination), {
289
334
  // size: 'small',
@@ -319,11 +364,14 @@ var QueryList = /*#__PURE__*/function (_React$PureComponent) {
319
364
  key: "componentDidMount",
320
365
  value: function componentDidMount() {
321
366
  var _this2 = this;
367
+
322
368
  var _a;
369
+
323
370
  var _this$props3 = this.props,
324
- qlsProps = _this$props3.qlsProps,
325
- actions = _this$props3.actions;
371
+ qlsProps = _this$props3.qlsProps,
372
+ actions = _this$props3.actions;
326
373
  this.formData = Object.assign(Object.assign({}, actions.getFormData() || {}), qlsProps.memory ? actions.getPagination() : {});
374
+
327
375
  if (!qlsProps.initSearch) {
328
376
  // 默认进来不请求
329
377
  this.fetchData(this.formData)["finally"](function () {
@@ -347,12 +395,15 @@ var QueryList = /*#__PURE__*/function (_React$PureComponent) {
347
395
  }, ms);
348
396
  }
349
397
  };
398
+
350
399
  doIntervalQuery(qlsProps.interval);
351
400
  }
352
401
  });
353
402
  }
403
+
354
404
  if ((_a = this.state.scroll) === null || _a === void 0 ? void 0 : _a.y) {
355
405
  window.addEventListener('resize', this.onWindowResize);
406
+
356
407
  if (this.tableRef.current) {
357
408
  // table内垂直滚动,需要动态设置分页组件上阴影样式
358
409
  var tableBody = (0, _reactDom.findDOMNode)(this.tableRef.current).querySelector('.ant-table-body');
@@ -375,6 +426,8 @@ var QueryList = /*#__PURE__*/function (_React$PureComponent) {
375
426
  this.timmer && clearTimeout(this.timmer);
376
427
  }
377
428
  }]);
429
+
378
430
  return QueryList;
379
431
  }(_react["default"].PureComponent);
432
+
380
433
  exports["default"] = QueryList;
@@ -1,58 +1,77 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports["default"] = void 0;
7
+
8
8
  var _react = _interopRequireDefault(require("react"));
9
+
9
10
  var _classnames2 = _interopRequireDefault(require("classnames"));
11
+
10
12
  var _queryForm = _interopRequireDefault(require("../query-form"));
13
+
11
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
+
16
+ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
17
+
18
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
+
13
20
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
15
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
16
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
17
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
18
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
19
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
20
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
21
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
21
+
22
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
23
+
24
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
25
+
26
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
27
+
28
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
29
+
22
30
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
23
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
24
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
31
+
32
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
33
+
34
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
35
+
25
36
  var __rest = void 0 && (void 0).__rest || function (s, e) {
26
37
  var t = {};
38
+
27
39
  for (var p in s) {
28
40
  if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
29
41
  }
42
+
30
43
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
44
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
32
45
  }
33
46
  return t;
34
47
  };
48
+
35
49
  var clsPrefix = 'tnt-querylistscene-queryform';
36
- var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
50
+
51
+ var QueryForm =
52
+ /*#__PURE__*/
53
+ function (_React$PureComponent) {
37
54
  _inherits(QueryForm, _React$PureComponent);
38
- var _super = _createSuper(QueryForm);
55
+
39
56
  function QueryForm(props) {
40
57
  var _this;
58
+
41
59
  _classCallCheck(this, QueryForm);
42
- _this = _super.call(this, props);
60
+
61
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(QueryForm).call(this, props));
43
62
  Object.defineProperty(_assertThisInitialized(_this), "onSearch", {
44
63
  enumerable: true,
45
64
  configurable: true,
46
65
  writable: true,
47
66
  value: function value() {
48
67
  var _this$props = _this.props,
49
- onSearch = _this$props.onSearch,
50
- actions = _this$props.actions;
68
+ onSearch = _this$props.onSearch,
69
+ actions = _this$props.actions;
51
70
  var values = actions.getFormData();
52
71
  var params = Object.assign(Object.assign({}, values), {
53
72
  current: 1
54
- });
55
- // memory 与 url解析setForm时 监听事件异步
73
+ }); // memory 与 url解析setForm时 监听事件异步
74
+
56
75
  actions.setData('formData', values);
57
76
  Promise.resolve().then(function () {
58
77
  onSearch && onSearch(params);
@@ -66,11 +85,12 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
66
85
  writable: true,
67
86
  value: function value() {
68
87
  var _this$props2 = _this.props,
69
- initialValues = _this$props2.initialValues,
70
- onReset = _this$props2.onReset,
71
- actions = _this$props2.actions;
88
+ initialValues = _this$props2.initialValues,
89
+ onReset = _this$props2.onReset,
90
+ actions = _this$props2.actions;
72
91
  actions.setFormData(initialValues, false);
73
92
  onReset && onReset(initialValues);
93
+
74
94
  _this.onSearch();
75
95
  }
76
96
  });
@@ -80,11 +100,13 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
80
100
  writable: true,
81
101
  value: function value(newValues, changedInfo) {
82
102
  var _this$props3 = _this.props,
83
- onChange = _this$props3.onChange,
84
- actions = _this$props3.actions;
103
+ onChange = _this$props3.onChange,
104
+ actions = _this$props3.actions;
105
+
85
106
  for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
86
107
  rest[_key - 2] = arguments[_key];
87
108
  }
109
+
88
110
  onChange && onChange.apply(void 0, [newValues, changedInfo].concat(rest));
89
111
  actions.setFormData(newValues, false);
90
112
  }
@@ -96,7 +118,9 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
96
118
  value: function value(data, needSearch) {
97
119
  var actions = _this.props.actions;
98
120
  actions.setData('formData', data);
121
+
99
122
  _this.form.setValues(data);
123
+
100
124
  needSearch && _this.onSearch();
101
125
  }
102
126
  });
@@ -106,29 +130,32 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
106
130
  writable: true,
107
131
  value: function value(needSearch) {
108
132
  var _this$props4 = _this.props,
109
- initialValues = _this$props4.initialValues,
110
- actions = _this$props4.actions;
133
+ initialValues = _this$props4.initialValues,
134
+ actions = _this$props4.actions;
111
135
  actions.setFormData(initialValues, needSearch);
136
+
112
137
  _this.form.resetValues();
113
138
  }
114
139
  });
115
140
  var actions = props.actions,
116
- form = props.form;
141
+ form = props.form;
117
142
  _this.form = form || _queryForm["default"].createForm();
118
143
  actions.on('setFormData', _this.setFormData);
119
144
  actions.on('resetFormData', _this.resetFormData);
120
145
  return _this;
121
146
  }
147
+
122
148
  _createClass(QueryForm, [{
123
149
  key: "render",
124
150
  value: function render() {
125
151
  var _a = this.props,
126
- className = _a.className,
127
- actions = _a.actions,
128
- extraActions = _a.extraActions,
129
- extralActions = _a.extralActions,
130
- qlsProps = _a.qlsProps,
131
- props = __rest(_a, ["className", "actions", "extraActions", "extralActions", "qlsProps"]);
152
+ className = _a.className,
153
+ actions = _a.actions,
154
+ extraActions = _a.extraActions,
155
+ extralActions = _a.extralActions,
156
+ qlsProps = _a.qlsProps,
157
+ props = __rest(_a, ["className", "actions", "extraActions", "extralActions", "qlsProps"]);
158
+
132
159
  return _react["default"].createElement(_queryForm["default"], Object.assign({}, props, {
133
160
  form: this.form,
134
161
  className: (0, _classnames2["default"])(clsPrefix, _defineProperty({}, className, className)),
@@ -143,10 +170,11 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
143
170
  key: "componentDidMount",
144
171
  value: function componentDidMount() {
145
172
  var _this$props5 = this.props,
146
- _this$props5$initialV = _this$props5.initialValues,
147
- initialValues = _this$props5$initialV === void 0 ? {} : _this$props5$initialV,
148
- actions = _this$props5.actions,
149
- qlsProps = _this$props5.qlsProps;
173
+ _this$props5$initialV = _this$props5.initialValues,
174
+ initialValues = _this$props5$initialV === void 0 ? {} : _this$props5$initialV,
175
+ actions = _this$props5.actions,
176
+ qlsProps = _this$props5.qlsProps;
177
+
150
178
  if (qlsProps.memory) {
151
179
  actions.setFormData(Object.assign(Object.assign({}, initialValues), actions.getFormData()), false);
152
180
  } else {
@@ -161,7 +189,9 @@ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
161
189
  actions.removeListener('resetFormData', this.resetFormData);
162
190
  }
163
191
  }]);
192
+
164
193
  return QueryForm;
165
194
  }(_react["default"].PureComponent);
195
+
166
196
  exports["default"] = QueryForm;
167
197
  QueryForm.Field = _queryForm["default"].Field;