@teamix/pro 1.4.25-bugfix.2 → 1.4.25-bugfix.3

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 (356) hide show
  1. package/dist/pro.css +1 -1
  2. package/dist/pro.js +64943 -84006
  3. package/dist/pro.min.css +1 -1
  4. package/dist/pro.min.js +1 -1
  5. package/dist/pro.min.js.LICENSE.txt +6 -13
  6. package/es/actions/base.js +21 -8
  7. package/es/actions/dialog-component.js +9 -2
  8. package/es/actions/dialog-form.js +75 -37
  9. package/es/actions/dialog-info.js +5 -1
  10. package/es/actions/dialog.js +95 -57
  11. package/es/actions/index.d.ts +0 -7
  12. package/es/actions/index.js +153 -93
  13. package/es/actions/index.scss +1 -6
  14. package/es/actions/link.js +5 -3
  15. package/es/actions/request.js +27 -12
  16. package/es/actions/utils.js +9 -1
  17. package/es/card/card-container.js +5 -0
  18. package/es/card/divider.js +5 -0
  19. package/es/card/index.js +100 -61
  20. package/es/card/index.scss +0 -15
  21. package/es/card/selectable.js +13 -4
  22. package/es/card/tab.js +10 -1
  23. package/es/card/utils.js +2 -0
  24. package/es/form/Components/Editable/index.js +55 -16
  25. package/es/form/Components/FormGroup/index.d.ts +0 -1
  26. package/es/form/Components/FormGroup/index.js +22 -7
  27. package/es/form/Components/LightFilter/index.js +35 -15
  28. package/es/form/Components/ProField/index.js +14 -2
  29. package/es/form/Components/ProField/mapDateFormat.js +28 -2
  30. package/es/form/Components/Text/index.d.ts +0 -1
  31. package/es/form/Components/Text/index.js +11 -2
  32. package/es/form/Filter/AdvancedFilter.js +26 -11
  33. package/es/form/Filter/Layout.js +24 -11
  34. package/es/form/Filter/LightFilter.js +24 -13
  35. package/es/form/Filter/SimpleFilter.js +21 -7
  36. package/es/form/Filter/index.js +171 -117
  37. package/es/form/Filter/index2.js +28 -11
  38. package/es/form/Filter/layout.scss +1 -1
  39. package/es/form/Filter/useBindUrl.js +46 -18
  40. package/es/form/Filter/useSpecialProps.js +13 -8
  41. package/es/form/ProForm/customComponent.js +5 -0
  42. package/es/form/ProForm/index.js +38 -30
  43. package/es/form/ProForm/useAutoLayout.js +42 -21
  44. package/es/form/ProForm/useAutoSubmit.js +8 -3
  45. package/es/form/ProForm/useFieldRequest.js +5 -0
  46. package/es/form/ProForm/useFormDisplayValues.js +28 -12
  47. package/es/form/ProForm/useInitialRequest.js +5 -0
  48. package/es/form/SchemaForm/adapterComponent.js +3 -0
  49. package/es/form/SchemaForm/adapterDecorator.d.ts +1 -1
  50. package/es/form/SchemaForm/adapterDecorator.js +8 -0
  51. package/es/form/SchemaForm/adapterType.js +2 -0
  52. package/es/form/SchemaForm/index.js +114 -78
  53. package/es/form/SchemaForm/initializeArrayCards.js +6 -0
  54. package/es/form/SchemaForm/initializeArrayCollapse.js +6 -0
  55. package/es/form/SchemaForm/initializeArrayItems.js +9 -2
  56. package/es/form/SchemaForm/initializeArrayTable.js +34 -21
  57. package/es/form/SchemaForm/initializeDataSource.js +6 -2
  58. package/es/form/SchemaForm/initializeFormButton.js +31 -14
  59. package/es/form/SchemaForm/initializeFormCollapse.js +18 -8
  60. package/es/form/SchemaForm/initializeFormGroup.js +20 -10
  61. package/es/form/SchemaForm/initializeFormStep.js +23 -11
  62. package/es/form/SchemaForm/initializeFormTab.js +20 -10
  63. package/es/form/SchemaForm/initializeReactions.js +33 -9
  64. package/es/form/SchemaForm/initializeRequest.js +16 -2
  65. package/es/form/SchemaForm/initializeRules.js +22 -4
  66. package/es/form/SchemaForm/initializeSelectTable.js +33 -7
  67. package/es/form/SchemaForm/reactions.js +34 -19
  68. package/es/form/docs/ActionResponse.d.ts +0 -1
  69. package/es/form/index.d.ts +9 -9
  70. package/es/form/index.js +9 -0
  71. package/es/form/typing.d.ts +4 -26
  72. package/es/form/utils.d.ts +1 -1
  73. package/es/form/utils.js +49 -4
  74. package/es/form/warning.js +7 -2
  75. package/es/global.scss +1 -3
  76. package/es/index-without-icon.js +3 -4
  77. package/es/index.d.ts +1 -1
  78. package/es/index.js +8 -18
  79. package/es/info/components/InfoGroup/index.js +32 -21
  80. package/es/info/components/InfoValueItem/index.js +119 -66
  81. package/es/info/components/ProInfoItem/index.js +21 -13
  82. package/es/info/components/baseInfo/index.js +27 -17
  83. package/es/info/components/headerInfo/index.js +20 -8
  84. package/es/info/components/tableInfo/index.js +50 -20
  85. package/es/info/index.js +86 -61
  86. package/es/info/typing.d.ts +0 -2
  87. package/es/info/utils/index.js +11 -0
  88. package/es/nocode/configurators/ProTable.js +22 -1
  89. package/es/nocode/configurators/common.js +6 -5
  90. package/es/nocode/configurators/index.js +3 -2
  91. package/es/nocode/index.js +6 -6
  92. package/es/nocode/pages/editor.js +9 -5
  93. package/es/nocode/pages/index.js +30 -5
  94. package/es/nocode/pages/playground.js +35 -18
  95. package/es/nocode/pages/renderer.js +42 -9
  96. package/es/nocode/playground.js +23 -10
  97. package/es/page-header/index.d.ts +2 -2
  98. package/es/page-header/index.js +76 -40
  99. package/es/page-header/index.scss +1 -2
  100. package/es/sidebar/components/sidebar-container/index.js +69 -54
  101. package/es/sidebar/components/sidebar-container/index.scss +14 -21
  102. package/es/sidebar/components/tree/index.js +138 -100
  103. package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +26 -11
  104. package/es/sidebar/components/tree-node/components/IconAction/index.js +35 -9
  105. package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +2 -2
  106. package/es/sidebar/components/tree-node/components/IconSwitch/index.js +25 -12
  107. package/es/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
  108. package/es/sidebar/components/tree-node/index.js +84 -42
  109. package/es/sidebar/components/tree-node/index.scss +0 -6
  110. package/es/sidebar/index.d.ts +0 -2
  111. package/es/sidebar/index.js +95 -72
  112. package/es/sidebar/typing.d.ts +0 -4
  113. package/es/sidebar/utils/action-ref.js +7 -2
  114. package/es/sidebar/utils/index.d.ts +2 -5
  115. package/es/sidebar/utils/index.js +98 -41
  116. package/es/table/components/Filter/index.d.ts +3 -6
  117. package/es/table/components/Filter/index.js +128 -115
  118. package/es/table/components/Layout/index.js +47 -32
  119. package/es/table/components/Layout/index.scss +1 -2
  120. package/es/table/components/Pagination/index.js +58 -25
  121. package/es/table/components/QuickAction/index.d.ts +0 -1
  122. package/es/table/components/QuickAction/index.js +11 -3
  123. package/es/table/components/ToolBar/DensityIcon.js +31 -19
  124. package/es/table/components/ToolBar/FilterColumnIcon.js +125 -87
  125. package/es/table/components/ToolBar/FullScreenIcon.js +62 -7
  126. package/es/table/components/ToolBar/Fullscreen.js +28 -25
  127. package/es/table/components/ToolBar/RefreshIcon.js +27 -162
  128. package/es/table/components/ToolBar/index.d.ts +1 -1
  129. package/es/table/components/ToolBar/index.js +38 -130
  130. package/es/table/components/ToolBar/index.scss +3 -49
  131. package/es/table/index.js +423 -455
  132. package/es/table/index.scss +0 -8
  133. package/es/table/typing.d.ts +6 -125
  134. package/es/table/utils/columnRender.d.ts +3 -3
  135. package/es/table/utils/columnRender.js +79 -39
  136. package/es/table/utils/genProColumnToColumn.d.ts +2 -2
  137. package/es/table/utils/genProColumnToColumn.js +16 -13
  138. package/es/table/utils/index.js +47 -14
  139. package/es/table/utils/pureColumnRender.js +53 -21
  140. package/es/table/utils/pureGenProColumnToColumn.d.ts +1 -1
  141. package/es/table/utils/pureGenProColumnToColumn.js +10 -2
  142. package/es/table/utils/useTableSelection.js +33 -6
  143. package/es/templates/List/index.js +9 -2
  144. package/es/timeline/ProTimeLineItem/index.js +65 -25
  145. package/es/timeline/index.js +22 -8
  146. package/es/timeline/typing.d.ts +0 -1
  147. package/es/utils/message.d.ts +2 -2
  148. package/es/utils/message.js +5 -0
  149. package/lib/actions/base.js +24 -8
  150. package/lib/actions/confirm.js +5 -0
  151. package/lib/actions/danger-confirm.js +5 -0
  152. package/lib/actions/danger-pop-confirm.js +4 -0
  153. package/lib/actions/dialog-component.js +15 -2
  154. package/lib/actions/dialog-form.js +89 -36
  155. package/lib/actions/dialog-info.js +10 -1
  156. package/lib/actions/dialog-table.js +5 -0
  157. package/lib/actions/dialog.js +112 -55
  158. package/lib/actions/drawer-form.js +3 -0
  159. package/lib/actions/drawer-info.js +3 -0
  160. package/lib/actions/drawer-table.js +3 -0
  161. package/lib/actions/drawer.js +4 -0
  162. package/lib/actions/error.js +5 -0
  163. package/lib/actions/index.d.ts +0 -7
  164. package/lib/actions/index.js +184 -115
  165. package/lib/actions/index.scss +1 -6
  166. package/lib/actions/link.js +10 -1
  167. package/lib/actions/notice.js +5 -0
  168. package/lib/actions/pop-confirm.js +5 -0
  169. package/lib/actions/request.js +32 -8
  170. package/lib/actions/utils.js +9 -1
  171. package/lib/card/card-container.js +9 -0
  172. package/lib/card/divider.js +7 -0
  173. package/lib/card/index.js +127 -61
  174. package/lib/card/index.scss +0 -15
  175. package/lib/card/selectable.js +20 -4
  176. package/lib/card/tab.js +14 -1
  177. package/lib/card/utils.js +6 -0
  178. package/lib/field/index.js +6 -0
  179. package/lib/form/Components/Editable/index.js +65 -15
  180. package/lib/form/Components/FormGroup/index.d.ts +0 -1
  181. package/lib/form/Components/FormGroup/index.js +28 -7
  182. package/lib/form/Components/LightFilter/index.js +47 -15
  183. package/lib/form/Components/ProField/index.js +21 -2
  184. package/lib/form/Components/ProField/mapDateFormat.js +32 -2
  185. package/lib/form/Components/Text/index.d.ts +0 -1
  186. package/lib/form/Components/Text/index.js +16 -2
  187. package/lib/form/Filter/AdvancedFilter.js +34 -11
  188. package/lib/form/Filter/Layout.js +33 -11
  189. package/lib/form/Filter/LightFilter.js +32 -13
  190. package/lib/form/Filter/SimpleFilter.js +27 -5
  191. package/lib/form/Filter/index.js +191 -116
  192. package/lib/form/Filter/index2.js +38 -11
  193. package/lib/form/Filter/layout.scss +1 -1
  194. package/lib/form/Filter/useBindUrl.js +50 -18
  195. package/lib/form/Filter/useSpecialProps.js +13 -6
  196. package/lib/form/ProForm/customComponent.js +8 -0
  197. package/lib/form/ProForm/index.js +60 -30
  198. package/lib/form/ProForm/useAutoLayout.js +45 -21
  199. package/lib/form/ProForm/useAutoSubmit.js +10 -1
  200. package/lib/form/ProForm/useFieldRequest.js +8 -0
  201. package/lib/form/ProForm/useFormDisplayValues.js +34 -12
  202. package/lib/form/ProForm/useInitialRequest.js +6 -0
  203. package/lib/form/SchemaForm/adapterComponent.js +6 -0
  204. package/lib/form/SchemaForm/adapterDecorator.d.ts +1 -1
  205. package/lib/form/SchemaForm/adapterDecorator.js +12 -0
  206. package/lib/form/SchemaForm/adapterType.js +5 -0
  207. package/lib/form/SchemaForm/index.js +144 -78
  208. package/lib/form/SchemaForm/initializeArrayCards.js +7 -0
  209. package/lib/form/SchemaForm/initializeArrayCollapse.js +7 -0
  210. package/lib/form/SchemaForm/initializeArrayItems.js +10 -2
  211. package/lib/form/SchemaForm/initializeArrayTable.js +34 -21
  212. package/lib/form/SchemaForm/initializeDataSource.js +8 -2
  213. package/lib/form/SchemaForm/initializeFormButton.js +32 -14
  214. package/lib/form/SchemaForm/initializeFormCollapse.js +18 -8
  215. package/lib/form/SchemaForm/initializeFormGroup.js +20 -10
  216. package/lib/form/SchemaForm/initializeFormStep.js +23 -11
  217. package/lib/form/SchemaForm/initializeFormTab.js +20 -10
  218. package/lib/form/SchemaForm/initializeReactions.js +37 -9
  219. package/lib/form/SchemaForm/initializeRequest.js +18 -2
  220. package/lib/form/SchemaForm/initializeRules.js +24 -4
  221. package/lib/form/SchemaForm/initializeSelectTable.js +36 -7
  222. package/lib/form/SchemaForm/reactions.js +37 -17
  223. package/lib/form/docs/ActionResponse.d.ts +0 -1
  224. package/lib/form/docs/ActionResponse.js +5 -0
  225. package/lib/form/index.d.ts +9 -9
  226. package/lib/form/index.js +25 -0
  227. package/lib/form/typing.d.ts +4 -26
  228. package/lib/form/utils.d.ts +1 -1
  229. package/lib/form/utils.js +61 -4
  230. package/lib/form/warning.js +8 -2
  231. package/lib/global.scss +1 -3
  232. package/lib/hooks/index.js +5 -0
  233. package/lib/index-without-icon.js +36 -2
  234. package/lib/index.d.ts +1 -1
  235. package/lib/index.js +40 -13
  236. package/lib/info/components/InfoGroup/index.js +42 -21
  237. package/lib/info/components/InfoValueItem/index.js +134 -66
  238. package/lib/info/components/ProInfoItem/index.js +29 -13
  239. package/lib/info/components/baseInfo/index.js +39 -17
  240. package/lib/info/components/headerInfo/index.js +31 -8
  241. package/lib/info/components/tableInfo/index.js +62 -20
  242. package/lib/info/index.js +101 -61
  243. package/lib/info/typing.d.ts +0 -2
  244. package/lib/info/utils/index.js +19 -0
  245. package/lib/info/utils/utils.js +1 -0
  246. package/lib/nocode/configurators/PageHeader.js +2 -0
  247. package/lib/nocode/configurators/ProTable.js +24 -1
  248. package/lib/nocode/configurators/common.js +10 -5
  249. package/lib/nocode/configurators/index.js +10 -2
  250. package/lib/nocode/configurators/map.js +5 -0
  251. package/lib/nocode/index.js +11 -0
  252. package/lib/nocode/pages/editor.js +19 -5
  253. package/lib/nocode/pages/index.js +35 -3
  254. package/lib/nocode/pages/playground.js +52 -18
  255. package/lib/nocode/pages/renderer.js +53 -9
  256. package/lib/nocode/playground.js +35 -10
  257. package/lib/page-container/index.js +6 -0
  258. package/lib/page-header/index.d.ts +2 -2
  259. package/lib/page-header/index.js +90 -39
  260. package/lib/page-header/index.scss +1 -2
  261. package/lib/sidebar/components/sidebar-container/index.js +81 -54
  262. package/lib/sidebar/components/sidebar-container/index.scss +14 -21
  263. package/lib/sidebar/components/tree/index.js +152 -100
  264. package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +34 -11
  265. package/lib/sidebar/components/tree-node/components/IconAction/index.js +46 -9
  266. package/lib/sidebar/components/tree-node/components/IconSwitch/index.d.ts +2 -2
  267. package/lib/sidebar/components/tree-node/components/IconSwitch/index.js +35 -12
  268. package/lib/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
  269. package/lib/sidebar/components/tree-node/index.js +100 -42
  270. package/lib/sidebar/components/tree-node/index.scss +0 -6
  271. package/lib/sidebar/index.d.ts +0 -2
  272. package/lib/sidebar/index.js +111 -79
  273. package/lib/sidebar/typing.d.ts +0 -4
  274. package/lib/sidebar/utils/action-ref.js +8 -2
  275. package/lib/sidebar/utils/index.d.ts +2 -5
  276. package/lib/sidebar/utils/index.js +106 -41
  277. package/lib/skeleton/index.js +6 -0
  278. package/lib/table/components/EmptyContent/index.js +6 -0
  279. package/lib/table/components/Filter/index.d.ts +3 -6
  280. package/lib/table/components/Filter/index.js +137 -114
  281. package/lib/table/components/Layout/index.js +60 -32
  282. package/lib/table/components/Layout/index.scss +1 -2
  283. package/lib/table/components/Pagination/index.js +68 -25
  284. package/lib/table/components/QuickAction/index.d.ts +0 -1
  285. package/lib/table/components/QuickAction/index.js +15 -3
  286. package/lib/table/components/ToolBar/DensityIcon.js +42 -19
  287. package/lib/table/components/ToolBar/FilterColumnIcon.js +136 -86
  288. package/lib/table/components/ToolBar/FullScreenIcon.js +74 -10
  289. package/lib/table/components/ToolBar/Fullscreen.js +35 -25
  290. package/lib/table/components/ToolBar/RefreshIcon.js +36 -164
  291. package/lib/table/components/ToolBar/index.d.ts +1 -1
  292. package/lib/table/components/ToolBar/index.js +47 -133
  293. package/lib/table/components/ToolBar/index.scss +3 -49
  294. package/lib/table/index.js +445 -454
  295. package/lib/table/index.scss +0 -8
  296. package/lib/table/typing.d.ts +6 -125
  297. package/lib/table/utils/columnRender.d.ts +3 -3
  298. package/lib/table/utils/columnRender.js +92 -39
  299. package/lib/table/utils/genProColumnToColumn.d.ts +2 -2
  300. package/lib/table/utils/genProColumnToColumn.js +21 -13
  301. package/lib/table/utils/getTableProps.js +2 -0
  302. package/lib/table/utils/getTableSortIcons.js +5 -0
  303. package/lib/table/utils/index.js +55 -12
  304. package/lib/table/utils/pureColumnRender.js +64 -21
  305. package/lib/table/utils/pureGenProColumnToColumn.d.ts +1 -1
  306. package/lib/table/utils/pureGenProColumnToColumn.js +11 -2
  307. package/lib/table/utils/useTableSelection.js +35 -6
  308. package/lib/templates/Detail/index.js +5 -0
  309. package/lib/templates/Form/index.js +5 -0
  310. package/lib/templates/List/index.js +19 -2
  311. package/lib/templates/index.js +6 -0
  312. package/lib/timeline/ProTimeLineItem/index.js +76 -25
  313. package/lib/timeline/index.js +33 -8
  314. package/lib/timeline/typing.d.ts +0 -1
  315. package/lib/utils/index.js +6 -0
  316. package/lib/utils/message.d.ts +2 -2
  317. package/lib/utils/message.js +10 -0
  318. package/package.json +1 -1
  319. package/dist/pro.all.min.css +0 -1
  320. package/dist/pro.xconsole.min.css +0 -1
  321. package/es/actions/quick.d.ts +0 -2
  322. package/es/actions/quick.js +0 -26
  323. package/es/card/xconsole.scss +0 -3
  324. package/es/form/ProForm/addCascadeEffect.d.ts +0 -2
  325. package/es/form/ProForm/addCascadeEffect.js +0 -203
  326. package/es/next-xconsole.scss +0 -34
  327. package/es/page-header/xconsole.scss +0 -5
  328. package/es/table/components/CardView/index.d.ts +0 -5
  329. package/es/table/components/CardView/index.js +0 -392
  330. package/es/table/components/CardView/index.scss +0 -46
  331. package/es/table/components/LoadMore/index.d.ts +0 -20
  332. package/es/table/components/LoadMore/index.js +0 -88
  333. package/es/table/components/LoadMore/index.scss +0 -19
  334. package/es/table/components/ToolBar/CardSwitch.d.ts +0 -8
  335. package/es/table/components/ToolBar/CardSwitch.js +0 -52
  336. package/es/table/utils/util.d.ts +0 -5
  337. package/es/table/utils/util.js +0 -19
  338. package/es/xconsole.scss +0 -503
  339. package/lib/actions/quick.d.ts +0 -2
  340. package/lib/actions/quick.js +0 -33
  341. package/lib/card/xconsole.scss +0 -3
  342. package/lib/form/ProForm/addCascadeEffect.d.ts +0 -2
  343. package/lib/form/ProForm/addCascadeEffect.js +0 -210
  344. package/lib/next-xconsole.scss +0 -34
  345. package/lib/page-header/xconsole.scss +0 -5
  346. package/lib/table/components/CardView/index.d.ts +0 -5
  347. package/lib/table/components/CardView/index.js +0 -402
  348. package/lib/table/components/CardView/index.scss +0 -46
  349. package/lib/table/components/LoadMore/index.d.ts +0 -20
  350. package/lib/table/components/LoadMore/index.js +0 -99
  351. package/lib/table/components/LoadMore/index.scss +0 -19
  352. package/lib/table/components/ToolBar/CardSwitch.d.ts +0 -8
  353. package/lib/table/components/ToolBar/CardSwitch.js +0 -60
  354. package/lib/table/utils/util.d.ts +0 -5
  355. package/lib/table/utils/util.js +0 -25
  356. package/lib/xconsole.scss +0 -503
@@ -13,32 +13,52 @@ exports.getTreeNodeLevel = getTreeNodeLevel;
13
13
  exports.getTreeNodeProps = getTreeNodeProps;
14
14
  exports.loop = loop;
15
15
  var _excluded = ["selectable", "checkable", "editable", "draggable", "disabled", "checkboxDisabled", "isLeaf", "treeNodeProps"];
16
+
16
17
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
18
+
17
19
  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."); }
20
+
18
21
  function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
22
+
19
23
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
24
+
20
25
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
26
+
21
27
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
22
- function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
23
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
28
+
29
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
30
+
24
31
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
32
+
25
33
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
34
+
26
35
  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; }
36
+
27
37
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
38
+
28
39
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
40
+
29
41
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
42
+
30
43
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
44
+
31
45
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
46
+
32
47
  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); }
48
+
33
49
  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; }
50
+
34
51
  function loop(data, func, aliasMap) {
35
52
  var level = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
53
+
36
54
  var _ref = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
37
- _ref$children = _ref.children,
38
- children = _ref$children === void 0 ? 'children' : _ref$children;
55
+ _ref$children = _ref.children,
56
+ children = _ref$children === void 0 ? 'children' : _ref$children;
57
+
39
58
  if (data && data.length > 0) {
40
59
  data.forEach(function (item) {
41
60
  func(item, level, data);
61
+
42
62
  if (Array.isArray(item[children])) {
43
63
  loop(item[children], func, {
44
64
  children: children
@@ -54,27 +74,36 @@ function loop(data, func, aliasMap) {
54
74
  * @param aliasMap 标识
55
75
  * @returns
56
76
  */
77
+
78
+
57
79
  function findNodeWithoutPath(data, predicate, aliasMap) {
58
80
  var _ref2 = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
59
- _ref2$children = _ref2.children,
60
- children = _ref2$children === void 0 ? 'children' : _ref2$children;
61
- // 如果已经没有节点了,结束递归
81
+ _ref2$children = _ref2.children,
82
+ children = _ref2$children === void 0 ? 'children' : _ref2$children; // 如果已经没有节点了,结束递归
83
+
84
+
62
85
  if (!(data && data.length)) {
63
86
  return [];
64
87
  }
88
+
65
89
  var newChildren = [];
90
+
66
91
  var _iterator = _createForOfIteratorHelper(data),
67
- _step;
92
+ _step;
93
+
68
94
  try {
69
95
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
70
96
  var node = _step.value;
97
+
71
98
  if (predicate(node)) {
72
99
  var _node$children;
100
+
73
101
  // 如果节点符合条件,直接加入新的节点集
74
102
  newChildren.push(node);
75
103
  node.children = findNodeWithoutPath((_node$children = node[children]) !== null && _node$children !== void 0 ? _node$children : [], predicate);
76
104
  } else {
77
105
  var _node$children2;
106
+
78
107
  // 如果当前节点不符合条件,递归过滤子节点,
79
108
  // 把符合条件的子节点提升上来,并入新节点集
80
109
  newChildren.push.apply(newChildren, _toConsumableArray(findNodeWithoutPath((_node$children2 = node[children]) !== null && _node$children2 !== void 0 ? _node$children2 : [], predicate)));
@@ -85,6 +114,7 @@ function findNodeWithoutPath(data, predicate, aliasMap) {
85
114
  } finally {
86
115
  _iterator.f();
87
116
  }
117
+
88
118
  return newChildren;
89
119
  }
90
120
  /**
@@ -94,25 +124,32 @@ function findNodeWithoutPath(data, predicate, aliasMap) {
94
124
  * @param aliasMap 标识
95
125
  * @returns
96
126
  */
127
+
128
+
97
129
  function findNodeWithPath(data, predicate, aliasMap) {
98
130
  var _ref3 = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
99
- _ref3$children = _ref3.children,
100
- children = _ref3$children === void 0 ? 'children' : _ref3$children;
131
+ _ref3$children = _ref3.children,
132
+ children = _ref3$children === void 0 ? 'children' : _ref3$children;
133
+
101
134
  var getNodes = function getNodes(result, node) {
102
135
  if (predicate(node)) {
103
136
  result.push(node);
104
137
  return result;
105
138
  }
139
+
106
140
  if (Array.isArray(node[children])) {
107
141
  var nodes = node[children].reduce(getNodes, []);
142
+
108
143
  if (nodes.length) {
109
144
  result.push(_objectSpread(_objectSpread({}, node), {}, {
110
145
  nodes: nodes
111
146
  }));
112
147
  }
113
148
  }
149
+
114
150
  return result;
115
151
  };
152
+
116
153
  return data.reduce(getNodes, []);
117
154
  }
118
155
  /**
@@ -121,12 +158,15 @@ function findNodeWithPath(data, predicate, aliasMap) {
121
158
  * @param aliasMap 标识
122
159
  * @returns
123
160
  */
161
+
162
+
124
163
  function getAllNodeKey(data, aliasMap) {
125
164
  var _ref4 = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
126
- _ref4$key = _ref4.key,
127
- key = _ref4$key === void 0 ? 'value' : _ref4$key,
128
- _ref4$children = _ref4.children,
129
- children = _ref4$children === void 0 ? 'children' : _ref4$children;
165
+ _ref4$key = _ref4.key,
166
+ key = _ref4$key === void 0 ? 'value' : _ref4$key,
167
+ _ref4$children = _ref4.children,
168
+ children = _ref4$children === void 0 ? 'children' : _ref4$children;
169
+
130
170
  var keyList = [];
131
171
  loop(data, function (node) {
132
172
  keyList.push(node[key]);
@@ -142,12 +182,15 @@ function getAllNodeKey(data, aliasMap) {
142
182
  * @param aliasMap 标识
143
183
  * @returns
144
184
  */
185
+
186
+
145
187
  function getTreeNodeLevel(data, value, aliasMap) {
146
188
  var _ref5 = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
147
- _ref5$key = _ref5.key,
148
- key = _ref5$key === void 0 ? 'value' : _ref5$key,
149
- _ref5$children = _ref5.children,
150
- children = _ref5$children === void 0 ? 'children' : _ref5$children;
189
+ _ref5$key = _ref5.key,
190
+ key = _ref5$key === void 0 ? 'value' : _ref5$key,
191
+ _ref5$children = _ref5.children,
192
+ children = _ref5$children === void 0 ? 'children' : _ref5$children;
193
+
151
194
  var result = 0;
152
195
  loop(data, function (item, level) {
153
196
  if (item[key] === value) {
@@ -164,10 +207,13 @@ function getTreeNodeLevel(data, value, aliasMap) {
164
207
  * @param aliasMap 标识
165
208
  * @returns
166
209
  */
210
+
211
+
167
212
  function getTreeLevel(data, aliasMap) {
168
213
  var _ref6 = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
169
- _ref6$children = _ref6.children,
170
- children = _ref6$children === void 0 ? 'children' : _ref6$children;
214
+ _ref6$children = _ref6.children,
215
+ children = _ref6$children === void 0 ? 'children' : _ref6$children;
216
+
171
217
  var result = 0;
172
218
  loop(data, function (item, level) {
173
219
  if (result < level) {
@@ -185,14 +231,17 @@ function getTreeLevel(data, aliasMap) {
185
231
  * @param aliasMap
186
232
  * @returns
187
233
  */
234
+
235
+
188
236
  function getTreeLevelKey(data, level, aliasMap) {
189
237
  var _ref7 = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
190
- _ref7$key = _ref7.key,
191
- key = _ref7$key === void 0 ? 'value' : _ref7$key,
192
- _ref7$children = _ref7.children,
193
- children = _ref7$children === void 0 ? 'children' : _ref7$children;
194
- var result = [];
195
- // TODO 此处可做性能优化
238
+ _ref7$key = _ref7.key,
239
+ key = _ref7$key === void 0 ? 'value' : _ref7$key,
240
+ _ref7$children = _ref7.children,
241
+ children = _ref7$children === void 0 ? 'children' : _ref7$children;
242
+
243
+ var result = []; // TODO 此处可做性能优化
244
+
196
245
  loop(data, function (item, currentLevel) {
197
246
  if (currentLevel + 1 <= level) {
198
247
  result.push(item === null || item === void 0 ? void 0 : item[key]);
@@ -209,29 +258,39 @@ function getTreeLevelKey(data, level, aliasMap) {
209
258
  * @param aliasMap 标识
210
259
  * @returns
211
260
  */
261
+
262
+
212
263
  function filterTreeData(nodes, predicate, aliasMap) {
213
264
  if (!(nodes && nodes.length)) {
214
265
  return {
215
266
  filterTreeValue: []
216
267
  };
217
268
  }
269
+
218
270
  var _ref8 = aliasMap !== null && aliasMap !== void 0 ? aliasMap : {},
219
- _ref8$children = _ref8.children,
220
- children = _ref8$children === void 0 ? 'children' : _ref8$children;
271
+ _ref8$children = _ref8.children,
272
+ children = _ref8$children === void 0 ? 'children' : _ref8$children;
273
+
221
274
  var filterTreeValue = [];
275
+
222
276
  var _iterator2 = _createForOfIteratorHelper(nodes),
223
- _step2;
277
+ _step2;
278
+
224
279
  try {
225
280
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
226
281
  var node = _step2.value;
227
- var others = _extends({}, (_objectDestructuringEmpty(node), node));
282
+
283
+ var others = _extends({}, node);
284
+
228
285
  if (predicate(node)) {
229
286
  var _node$children3;
287
+
230
288
  filterTreeValue.push(_objectSpread(_objectSpread({}, others), {}, {
231
289
  children: filterTreeData((_node$children3 = node[children]) !== null && _node$children3 !== void 0 ? _node$children3 : [], predicate, aliasMap).filterTreeValue
232
290
  }));
233
291
  } else {
234
292
  var subs = filterTreeData(node[children], predicate, aliasMap);
293
+
235
294
  if (subs && subs.filterTreeValue.length) {
236
295
  filterTreeValue.push(_objectSpread(_objectSpread({}, others), {}, {
237
296
  children: subs.filterTreeValue
@@ -244,6 +303,7 @@ function filterTreeData(nodes, predicate, aliasMap) {
244
303
  } finally {
245
304
  _iterator2.f();
246
305
  }
306
+
247
307
  return {
248
308
  filterTreeValue: filterTreeValue
249
309
  };
@@ -252,17 +312,20 @@ function filterTreeData(nodes, predicate, aliasMap) {
252
312
  * 获取TreeNodeProps
253
313
  * @param item
254
314
  */
315
+
316
+
255
317
  function getTreeNodeProps(item) {
256
318
  var selectable = item.selectable,
257
- checkable = item.checkable,
258
- editable = item.editable,
259
- draggable = item.draggable,
260
- disabled = item.disabled,
261
- checkboxDisabled = item.checkboxDisabled,
262
- isLeaf = item.isLeaf,
263
- _item$treeNodeProps = item.treeNodeProps,
264
- treeNodeProps = _item$treeNodeProps === void 0 ? {} : _item$treeNodeProps,
265
- others = _objectWithoutProperties(item, _excluded);
319
+ checkable = item.checkable,
320
+ editable = item.editable,
321
+ draggable = item.draggable,
322
+ disabled = item.disabled,
323
+ checkboxDisabled = item.checkboxDisabled,
324
+ isLeaf = item.isLeaf,
325
+ _item$treeNodeProps = item.treeNodeProps,
326
+ treeNodeProps = _item$treeNodeProps === void 0 ? {} : _item$treeNodeProps,
327
+ others = _objectWithoutProperties(item, _excluded);
328
+
266
329
  var nodeProps = _objectSpread({
267
330
  selectable: selectable,
268
331
  checkable: checkable,
@@ -272,11 +335,13 @@ function getTreeNodeProps(item) {
272
335
  checkboxDisabled: checkboxDisabled,
273
336
  isLeaf: isLeaf
274
337
  }, treeNodeProps);
338
+
275
339
  return {
276
340
  nodeProps: Object.fromEntries(Object.entries(nodeProps).filter(function (_ref9) {
277
341
  var _ref10 = _slicedToArray(_ref9, 2),
278
- _ = _ref10[0],
279
- v = _ref10[1];
342
+ _ = _ref10[0],
343
+ v = _ref10[1];
344
+
280
345
  return v !== undefined;
281
346
  })),
282
347
  labelProps: others
@@ -1,12 +1,15 @@
1
1
  "use strict";
2
2
 
3
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
+
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  var _exportNames = {};
8
9
  exports.default = void 0;
10
+
9
11
  var _proSkeleton = _interopRequireWildcard(require("@teamix/pro-skeleton"));
12
+
10
13
  Object.keys(_proSkeleton).forEach(function (key) {
11
14
  if (key === "default" || key === "__esModule") return;
12
15
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -18,7 +21,10 @@ Object.keys(_proSkeleton).forEach(function (key) {
18
21
  }
19
22
  });
20
23
  });
24
+
21
25
  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); }
26
+
22
27
  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; }
28
+
23
29
  var _default = _proSkeleton.default;
24
30
  exports.default = _default;
@@ -4,10 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
+
7
8
  var _react = _interopRequireDefault(require("react"));
9
+
8
10
  var _result = _interopRequireDefault(require("@teamix/result"));
11
+
9
12
  var _utils = require("@teamix/utils");
13
+
10
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+
11
16
  /** ProTable 空状态 */
12
17
  var _default = function _default() {
13
18
  return /*#__PURE__*/_react.default.createElement(_result.default, {
@@ -16,4 +21,5 @@ var _default = function _default() {
16
21
  title: (0, _utils.getMessage)('noData')
17
22
  });
18
23
  };
24
+
19
25
  exports.default = _default;
@@ -1,12 +1,9 @@
1
1
  import React from 'react';
2
2
  import './index.scss';
3
- import { ProTableColumnProps, ProTableActionType, ProTableProps } from '../../typing';
3
+ import { ProTableColumnProps, ProTableActionType } from '../../typing';
4
4
  declare type ProTableFilterProps = {
5
5
  column: ProTableColumnProps;
6
6
  actionRef: React.MutableRefObject<ProTableActionType | undefined>;
7
- switchCardView?: 'table' | 'card';
8
- bindUrl?: ProTableProps['bindUrl'];
9
- bindUrlProps?: ProTableProps['bindUrlProps'];
10
7
  };
11
- declare const _default: React.NamedExoticComponent<ProTableFilterProps>;
12
- export default _default;
8
+ declare const Filter: React.FC<ProTableFilterProps>;
9
+ export default Filter;