@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
@@ -3,172 +3,212 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- var _exportNames = {
7
- registerActionHandler: true,
8
- useAction: true,
9
- ProActionButton: true,
10
- ProActionMenuButton: true,
11
- ProActionGroup: true,
12
- ActionGroup: true,
13
- ActionButton: true,
14
- ActionMenuButton: true
15
- };
16
6
  exports.ProActionButton = exports.ActionMenuButton = exports.ActionGroup = exports.ActionButton = void 0;
17
7
  exports.ProActionGroup = ProActionGroup;
18
8
  exports.default = exports.ProActionMenuButton = void 0;
19
9
  exports.registerActionHandler = registerActionHandler;
20
10
  exports.useAction = useAction;
11
+
21
12
  var _react = _interopRequireDefault(require("react"));
13
+
22
14
  var _classnames = _interopRequireDefault(require("classnames"));
15
+
23
16
  var _components = require("@alicloudfe/components");
17
+
24
18
  var _icon = _interopRequireDefault(require("@teamix/icon"));
19
+
25
20
  var _utils = require("@teamix/utils");
21
+
26
22
  var _link = require("./link");
23
+
27
24
  var _request = require("./request");
25
+
28
26
  var _dialog = require("./dialog");
27
+
29
28
  var _confirm = require("./confirm");
29
+
30
30
  var _dangerConfirm = require("./danger-confirm");
31
+
31
32
  var _notice = require("./notice");
33
+
32
34
  var _error = require("./error");
35
+
33
36
  var _dialogForm = require("./dialog-form");
37
+
34
38
  var _dialogTable = require("./dialog-table");
39
+
35
40
  var _dialogInfo = require("./dialog-info");
41
+
36
42
  var _drawer = require("./drawer");
43
+
37
44
  var _drawerForm = require("./drawer-form");
45
+
38
46
  var _drawerTable = require("./drawer-table");
47
+
39
48
  var _drawerInfo = require("./drawer-info");
49
+
40
50
  var _popConfirm = require("./pop-confirm");
51
+
41
52
  var _dangerPopConfirm = require("./danger-pop-confirm");
53
+
42
54
  require("./index.scss");
43
- var _quick = require("./quick");
44
- Object.keys(_quick).forEach(function (key) {
45
- if (key === "default" || key === "__esModule") return;
46
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
47
- if (key in exports && exports[key] === _quick[key]) return;
48
- Object.defineProperty(exports, key, {
49
- enumerable: true,
50
- get: function get() {
51
- return _quick[key];
52
- }
53
- });
54
- });
55
+
55
56
  var _excluded = ["type"],
56
- _excluded2 = ["config", "icon", "iconSize", "type", "context", "children", "visible", "disabled", "onClick", "tooltip", "disabledTooltip", "tooltipProps", "data-teamix-spm"],
57
- _excluded3 = ["loading"],
58
- _excluded4 = ["icon", "iconSize", "label", "actions", "children", "context", "type", "className", "noArrow"],
59
- _excluded5 = ["context", "text"],
60
- _excluded6 = ["key", "actions"],
61
- _excluded7 = ["key", "config"],
62
- _excluded8 = ["type", "divider", "max", "moreText", "more", "context", "actions", "className", "data-teamix-spm"];
57
+ _excluded2 = ["config", "icon", "iconSize", "type", "context", "children", "visible", "disabled", "onClick", "tooltip", "disabledTooltip", "tooltipProps"],
58
+ _excluded3 = ["loading"],
59
+ _excluded4 = ["icon", "iconSize", "label", "actions", "children", "context", "type", "className", "noArrow"],
60
+ _excluded5 = ["context", "text"],
61
+ _excluded6 = ["key", "actions"],
62
+ _excluded7 = ["key", "config"],
63
+ _excluded8 = ["type", "divider", "max", "moreText", "more", "context", "actions", "className"];
64
+
63
65
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
66
+
64
67
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
68
+
65
69
  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."); }
70
+
66
71
  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); }
72
+
67
73
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
74
+
68
75
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
76
+
69
77
  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; }
78
+
70
79
  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; }
80
+
71
81
  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; }
82
+
72
83
  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; }
84
+
73
85
  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; }
86
+
74
87
  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; }
88
+
75
89
  var RegistedActions = new Map();
90
+
76
91
  function registerActionHandler(id, extendActionId, defaultConfig) {
77
92
  RegistedActions.set(id, {
78
93
  extendActionId: extendActionId,
79
94
  defaultConfig: defaultConfig
80
95
  });
81
96
  }
97
+
82
98
  function useAction(config, context) {
83
99
  if (!config) {
84
100
  return {};
85
101
  }
102
+
86
103
  var type = config.type,
87
- others = _objectWithoutProperties(config, _excluded);
104
+ others = _objectWithoutProperties(config, _excluded);
105
+
88
106
  if (type === 'request') {
89
107
  return (0, _request.useRequestAction)(others, context);
90
108
  }
109
+
91
110
  if (type === 'link') {
92
111
  return (0, _link.useLinkAction)(others, context);
93
112
  }
113
+
94
114
  if (type === 'dialog') {
95
115
  return (0, _dialog.useDialogAction)(others, context);
96
116
  }
117
+
97
118
  if (type === 'confirm') {
98
119
  return (0, _confirm.useConfirmAction)(others, context);
99
120
  }
121
+
100
122
  if (type === 'danger-confirm') {
101
123
  return (0, _dangerConfirm.useDangerConfirmAction)(others, context);
102
124
  }
125
+
103
126
  if (type === 'notice') {
104
127
  return (0, _notice.useNoticeAction)(others, context);
105
128
  }
129
+
106
130
  if (type === 'error') {
107
131
  return (0, _error.useErrorAction)(others, context);
108
132
  }
133
+
109
134
  if (type === 'dialog-form') {
110
135
  return (0, _dialogForm.useDialogFormAction)(others, context);
111
136
  }
137
+
112
138
  if (type === 'dialog-table') {
113
139
  return (0, _dialogTable.useDialogTableAction)(others, context);
114
140
  }
141
+
115
142
  if (type === 'dialog-info') {
116
143
  return (0, _dialogInfo.useDialogInfoAction)(others, context);
117
144
  }
145
+
118
146
  if (type === 'drawer') {
119
147
  return (0, _drawer.useDrawerAction)(others, context);
120
148
  }
149
+
121
150
  if (type === 'drawer-form') {
122
151
  return (0, _drawerForm.useDrawerFormAction)(others, context);
123
152
  }
153
+
124
154
  if (type === 'drawer-table') {
125
155
  return (0, _drawerTable.useDrawerTableAction)(others, context);
126
156
  }
157
+
127
158
  if (type === 'drawer-info') {
128
159
  return (0, _drawerInfo.useDrawerInfoAction)(others, context);
129
160
  }
161
+
130
162
  if (type === 'pop-confirm') {
131
163
  return (0, _popConfirm.usePopConfirmAction)(others, context);
132
164
  }
165
+
133
166
  if (type === 'danger-pop-confirm') {
134
167
  return (0, _dangerPopConfirm.useDangerPopConfirmAction)(others, context);
135
168
  }
169
+
136
170
  var registedAction = RegistedActions.get(type);
171
+
137
172
  if (!registedAction) {
138
173
  return {};
139
174
  }
175
+
140
176
  return useAction(_objectSpread(_objectSpread({
141
177
  type: registedAction.extendActionId
142
178
  }, registedAction.defaultConfig), others), context);
143
179
  }
180
+
144
181
  var buttonContent = function buttonContent(content, iconType, iconSize, context) {
145
182
  var renderedContent = typeof content === 'function' ? content(context) : content;
183
+
146
184
  if (!iconType) {
147
185
  return renderedContent;
148
186
  }
187
+
149
188
  return [/*#__PURE__*/_react.default.createElement(_icon.default, {
150
189
  type: iconType,
151
190
  size: iconSize,
152
191
  key: "teamix-button-icon"
153
192
  }), renderedContent];
154
193
  };
194
+
155
195
  var ProActionButton = function ProActionButton(props) {
156
196
  var config = props.config,
157
- icon = props.icon,
158
- _props$iconSize = props.iconSize,
159
- iconSize = _props$iconSize === void 0 ? 'medium' : _props$iconSize,
160
- _props$type = props.type,
161
- type = _props$type === void 0 ? 'primary' : _props$type,
162
- context = props.context,
163
- children = props.children,
164
- visible = props.visible,
165
- disabled = props.disabled,
166
- _onClick = props.onClick,
167
- tooltip = props.tooltip,
168
- disabledTooltip = props.disabledTooltip,
169
- tooltipProps = props.tooltipProps,
170
- dataTeamixSpm = props['data-teamix-spm'],
171
- others = _objectWithoutProperties(props, _excluded2);
197
+ icon = props.icon,
198
+ _props$iconSize = props.iconSize,
199
+ iconSize = _props$iconSize === void 0 ? 'medium' : _props$iconSize,
200
+ _props$type = props.type,
201
+ type = _props$type === void 0 ? 'primary' : _props$type,
202
+ context = props.context,
203
+ children = props.children,
204
+ visible = props.visible,
205
+ disabled = props.disabled,
206
+ _onClick = props.onClick,
207
+ tooltip = props.tooltip,
208
+ disabledTooltip = props.disabledTooltip,
209
+ tooltipProps = props.tooltipProps,
210
+ others = _objectWithoutProperties(props, _excluded2);
211
+
172
212
  var actionProps = useAction(config, context);
173
213
  var buttonProps = _onClick ? _objectSpread(_objectSpread(_objectSpread({
174
214
  disabled: disabled
@@ -179,17 +219,17 @@ var ProActionButton = function ProActionButton(props) {
179
219
  }) : _objectSpread(_objectSpread({
180
220
  disabled: disabled
181
221
  }, actionProps), others);
182
- if (dataTeamixSpm) {
183
- buttonProps['data-teamix-spm'] = dataTeamixSpm;
184
- }
222
+
185
223
  var content = /*#__PURE__*/_react.default.createElement(_components.Button, _objectSpread({
186
224
  type: type
187
225
  }, buttonProps), buttonContent(children, icon, iconSize, context));
226
+
188
227
  var baseToolTipProps = _objectSpread({
189
228
  triggerType: 'hover',
190
229
  align: 't',
191
230
  trigger: content
192
231
  }, tooltipProps);
232
+
193
233
  if (tooltip || disabledTooltip) {
194
234
  if (tooltip && !disabledTooltip) {
195
235
  if (!disabled) {
@@ -204,22 +244,24 @@ var ProActionButton = function ProActionButton(props) {
204
244
  content = /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, _objectSpread({}, baseToolTipProps), showToolTip);
205
245
  }
206
246
  }
247
+
207
248
  return content;
208
249
  };
250
+
209
251
  exports.ProActionButton = ProActionButton;
252
+
210
253
  var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
211
254
  var action = props.action,
212
- context = props.context,
213
- dataTeamixSpm = props['data-teamix-spm'];
255
+ context = props.context;
214
256
  var config = action.config,
215
- btnContext = action.context,
216
- _onClick2 = action.onClick,
217
- children = action.children,
218
- icon = action.icon,
219
- disabled = action.disabled,
220
- tooltip = action.tooltip,
221
- disabledTooltip = action.disabledTooltip,
222
- tooltipProps = action.tooltipProps;
257
+ btnContext = action.context,
258
+ _onClick2 = action.onClick,
259
+ children = action.children,
260
+ icon = action.icon,
261
+ disabled = action.disabled,
262
+ tooltip = action.tooltip,
263
+ disabledTooltip = action.disabledTooltip,
264
+ tooltipProps = action.tooltipProps;
223
265
  var basePrefix = (0, _utils.usePrefixCls)('', {
224
266
  base: true
225
267
  });
@@ -227,23 +269,24 @@ var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
227
269
  var menuItemActionConfig = Object.assign({}, config, {
228
270
  trigger: 'onClick'
229
271
  });
272
+
230
273
  var _useAction = useAction(menuItemActionConfig, btnContext || context),
231
- loading = _useAction.loading,
232
- menuItemProps = _objectWithoutProperties(_useAction, _excluded3);
274
+ loading = _useAction.loading,
275
+ menuItemProps = _objectWithoutProperties(_useAction, _excluded3);
276
+
233
277
  var buttonProps = disabled ? {} : _onClick2 ? _objectSpread(_objectSpread({}, menuItemProps), {}, {
234
278
  onClick: function onClick(e) {
235
279
  return _onClick2(e, context);
236
280
  }
237
281
  }) : _objectSpread({}, menuItemProps);
238
- if (dataTeamixSpm) {
239
- buttonProps['data-teamix-spm'] = dataTeamixSpm;
240
- }
241
282
  var content = buttonContent(children, icon, undefined, context);
283
+
242
284
  var baseToolTipProps = _objectSpread({
243
285
  triggerType: 'hover',
244
286
  align: 't',
245
287
  trigger: content
246
288
  }, tooltipProps);
289
+
247
290
  if (tooltip || disabledTooltip) {
248
291
  if (tooltip && !disabledTooltip) {
249
292
  if (!disabled) {
@@ -258,44 +301,50 @@ var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
258
301
  content = /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, _objectSpread({}, baseToolTipProps), showToolTip);
259
302
  }
260
303
  }
304
+
261
305
  return /*#__PURE__*/_react.default.createElement("div", _objectSpread({
262
306
  className: (0, _classnames.default)(_defineProperty({}, basePrefix('disabled'), disabled), basePrefix('menu-item'), prefixCls('menu-item'))
263
307
  }, buttonProps), content);
264
308
  };
265
- function renderCommonActionButtonMenuItem(action, key, context, dataTeamixSpm) {
309
+
310
+ function renderCommonActionButtonMenuItem(action, key, context) {
266
311
  if (action.type === 'divider') {
267
312
  return /*#__PURE__*/_react.default.createElement(_components.Menu.Divider, {
268
313
  key: key
269
314
  });
270
315
  }
316
+
271
317
  var menuBtn = action;
318
+
272
319
  if (menuBtn.actions && menuBtn.actions.length && menuBtn.disabled !== true) {
273
320
  return /*#__PURE__*/_react.default.createElement(_components.Menu.SubMenu, {
274
321
  key: key,
275
322
  label: menuBtn.label || menuBtn.children
276
323
  }, menuBtn.actions.map(function (a) {
277
- return renderCommonActionButtonMenuItem(a, a.key, context, a['data-teamix-spm']);
324
+ return renderCommonActionButtonMenuItem(a, a.key, context);
278
325
  }));
279
326
  }
327
+
280
328
  return /*#__PURE__*/_react.default.createElement(ProActionMenuButtonItem, {
281
329
  key: key,
282
330
  action: action,
283
- context: context,
284
- "data-teamix-spm": "".concat(dataTeamixSpm, "-").concat(key)
331
+ context: context
285
332
  });
286
333
  }
334
+
287
335
  var ProActionMenuButton = function ProActionMenuButton(props) {
288
336
  var icon = props.icon,
289
- iconSize = props.iconSize,
290
- label = props.label,
291
- actions = props.actions,
292
- children = props.children,
293
- context = props.context,
294
- _props$type2 = props.type,
295
- type = _props$type2 === void 0 ? 'primary' : _props$type2,
296
- className = props.className,
297
- noArrow = props.noArrow,
298
- others = _objectWithoutProperties(props, _excluded4);
337
+ iconSize = props.iconSize,
338
+ label = props.label,
339
+ actions = props.actions,
340
+ children = props.children,
341
+ context = props.context,
342
+ _props$type2 = props.type,
343
+ type = _props$type2 === void 0 ? 'primary' : _props$type2,
344
+ className = props.className,
345
+ noArrow = props.noArrow,
346
+ others = _objectWithoutProperties(props, _excluded4);
347
+
299
348
  return /*#__PURE__*/_react.default.createElement(_components.MenuButton, _objectSpread({
300
349
  popupTriggerType: "hover",
301
350
  autoWidth: false,
@@ -312,57 +361,66 @@ var ProActionMenuButton = function ProActionMenuButton(props) {
312
361
  'teamix-pro-actions-text-menu-btn-no-arrow': noArrow
313
362
  })
314
363
  }, others), actions.map(function (action, i) {
315
- return renderCommonActionButtonMenuItem(action, action.key || i, context, others === null || others === void 0 ? void 0 : others['data-teamix-spm']);
364
+ return renderCommonActionButtonMenuItem(action, action.key || i, context);
316
365
  }));
317
- };
318
- // 超出 max,则折叠起来
366
+ }; // 超出 max,则折叠起来
367
+
368
+
319
369
  exports.ProActionMenuButton = ProActionMenuButton;
370
+
320
371
  function foldExtraActions(actions, max, moreConfig) {
321
372
  if (actions.length <= max) {
322
373
  return actions;
323
374
  }
375
+
324
376
  return [].concat(_toConsumableArray(actions.slice(0, max - 1)), [_objectSpread(_objectSpread({
325
377
  key: '__teamix_pro_action_group_more_btn'
326
378
  }, moreConfig), {}, {
327
379
  actions: actions.slice(max - 1)
328
380
  })]);
329
- }
330
- // 如果 actions 数量超过了 max,则把第 max 个和剩余超出部分折叠起来成为一个 menu
381
+ } // 如果 actions 数量超过了 max,则把第 max 个和剩余超出部分折叠起来成为一个 menu
331
382
  // divider 不计数
383
+
384
+
332
385
  function formatGroupActions(actions, max, moreConfig) {
333
386
  var MAX = max < 1 ? MAX_ACTTIONS : max;
334
387
  var count = 0;
335
388
  var index = 0;
389
+
336
390
  for (; index < actions.length && count < MAX; index++) {
337
391
  if (actions[index].type !== 'divider') {
338
392
  count += 1;
339
393
  }
340
394
  }
395
+
341
396
  return foldExtraActions(actions, Math.max(index, MAX), moreConfig);
342
- }
343
- // 渲染一个 button 或者 menu button
344
- function renderCommonActionButton(button, context, isTypeText, dataTeamixSpm) {
397
+ } // 渲染一个 button 或者 menu button
398
+
399
+
400
+ function renderCommonActionButton(button, context, isTypeText) {
345
401
  if (button.type === 'divider') {
346
402
  return /*#__PURE__*/_react.default.createElement(_components.Divider, {
347
403
  key: button.key,
348
404
  direction: "ver"
349
405
  });
350
406
  }
407
+
351
408
  var buttonContext = button.context,
352
- text = button.text,
353
- others = _objectWithoutProperties(button, _excluded5);
409
+ text = button.text,
410
+ others = _objectWithoutProperties(button, _excluded5);
411
+
354
412
  var buttonProps = _objectSpread({
355
413
  context: Object.assign({}, context, buttonContext),
356
414
  text: text || isTypeText
357
415
  }, others);
358
- if (dataTeamixSpm) {
359
- buttonProps['data-teamix-spm'] = dataTeamixSpm;
360
- }
416
+
361
417
  if (!button.actions) {
362
418
  return /*#__PURE__*/_react.default.createElement(ProActionButton, _objectSpread({}, buttonProps));
363
419
  }
420
+
364
421
  return /*#__PURE__*/_react.default.createElement(ProActionMenuButton, _objectSpread({}, buttonProps));
365
422
  }
423
+
366
424
  function getDefaultMoreButton(type, more) {
367
425
  var defaultConfig = type === 'button' ? {
368
426
  children: (0, _utils.getMessage)('more')
@@ -371,29 +429,38 @@ function getDefaultMoreButton(type, more) {
371
429
  autoWidth: false,
372
430
  noArrow: true
373
431
  };
432
+
374
433
  if (!more) {
375
434
  return defaultConfig;
376
435
  }
436
+
377
437
  var moreConfig = typeof more === 'string' ? {
378
438
  children: more
379
439
  } : more;
440
+
380
441
  if (type === 'button') {
381
442
  return Object.assign(defaultConfig, moreConfig);
382
443
  }
444
+
383
445
  return moreConfig;
384
446
  }
447
+
385
448
  var MAX_ACTTIONS = 4;
449
+
386
450
  function getKey(index, key) {
387
451
  if (key !== undefined) {
388
452
  return key;
389
453
  }
454
+
390
455
  return "__teamix_pro_action_key_".concat(index);
391
456
  }
457
+
392
458
  function getActionConfig(action, index, context) {
393
459
  if (action.actions) {
394
460
  var _key = action.key,
395
- actions = action.actions,
396
- _others = _objectWithoutProperties(action, _excluded6);
461
+ actions = action.actions,
462
+ _others = _objectWithoutProperties(action, _excluded6);
463
+
397
464
  return _objectSpread({
398
465
  key: getKey(index, _key),
399
466
  actions: actions.map(function (a, j) {
@@ -403,29 +470,32 @@ function getActionConfig(action, index, context) {
403
470
  })
404
471
  }, (0, _utils.getTargetValue)(_others, context));
405
472
  }
473
+
406
474
  var key = action.key,
407
- config = action.config,
408
- others = _objectWithoutProperties(action, _excluded7);
475
+ config = action.config,
476
+ others = _objectWithoutProperties(action, _excluded7);
477
+
409
478
  return _objectSpread({
410
479
  key: getKey(index, key),
411
480
  config: config
412
481
  }, (0, _utils.getTargetValue)(others, context));
413
482
  }
483
+
414
484
  function ProActionGroup(props) {
415
485
  var _props$type3 = props.type,
416
- type = _props$type3 === void 0 ? 'button' : _props$type3,
417
- _props$divider = props.divider,
418
- divider = _props$divider === void 0 ? true : _props$divider,
419
- _props$max = props.max,
420
- max = _props$max === void 0 ? MAX_ACTTIONS : _props$max,
421
- moreText = props.moreText,
422
- more = props.more,
423
- context = props.context,
424
- _props$actions = props.actions,
425
- actions = _props$actions === void 0 ? [] : _props$actions,
426
- className = props.className,
427
- dataTeamixSpm = props['data-teamix-spm'],
428
- containerProps = _objectWithoutProperties(props, _excluded8);
486
+ type = _props$type3 === void 0 ? 'button' : _props$type3,
487
+ _props$divider = props.divider,
488
+ divider = _props$divider === void 0 ? true : _props$divider,
489
+ _props$max = props.max,
490
+ max = _props$max === void 0 ? MAX_ACTTIONS : _props$max,
491
+ moreText = props.moreText,
492
+ more = props.more,
493
+ context = props.context,
494
+ _props$actions = props.actions,
495
+ actions = _props$actions === void 0 ? [] : _props$actions,
496
+ className = props.className,
497
+ containerProps = _objectWithoutProperties(props, _excluded8);
498
+
429
499
  var isTypeText = type === 'text';
430
500
  var filteredActions = actions.map(function (action, index) {
431
501
  return getActionConfig(action, index, context);
@@ -439,36 +509,35 @@ function ProActionGroup(props) {
439
509
  })
440
510
  }, containerProps), formatedActions.map(function (actionBtn, i) {
441
511
  var isLastOne = i === formatedActions.length - 1;
442
- if (dataTeamixSpm) {
443
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
444
- key: actionBtn.key
445
- }, renderCommonActionButton(actionBtn, context, isTypeText, "".concat(dataTeamixSpm, "-").concat(actionBtn.key || i)), isTypeText && divider && !isLastOne && /*#__PURE__*/_react.default.createElement(_components.Divider, {
446
- direction: "ver"
447
- }));
448
- } else return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
512
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
449
513
  key: actionBtn.key
450
514
  }, renderCommonActionButton(actionBtn, context, isTypeText), isTypeText && divider && !isLastOne && /*#__PURE__*/_react.default.createElement(_components.Divider, {
451
515
  direction: "ver"
452
516
  }));
453
517
  }));
454
518
  }
519
+
455
520
  var ProAction = function ProAction(props) {
456
521
  return renderCommonActionButton(props);
457
522
  };
523
+
458
524
  var _default = ProAction;
459
- exports.default = _default;
460
525
  /**
461
526
  * @deprecated 建议使用 ProActionGroup 代替
462
527
  */
528
+
529
+ exports.default = _default;
463
530
  var ActionGroup = ProActionGroup;
464
531
  /**
465
532
  * @deprecated 建议使用 ProActionButton 代替
466
533
  */
534
+
467
535
  exports.ActionGroup = ActionGroup;
468
536
  var ActionButton = ProActionButton;
469
537
  /**
470
538
  * @deprecated 建议使用 ProActionMenuButton 代替
471
539
  */
540
+
472
541
  exports.ActionButton = ActionButton;
473
542
  var ActionMenuButton = ProActionMenuButton;
474
543
  exports.ActionMenuButton = ActionMenuButton;
@@ -10,7 +10,7 @@
10
10
  }
11
11
 
12
12
  &.teamix-pro-actions-type-button {
13
- & > button,& > span {
13
+ & > button {
14
14
  &:not(:last-child) {
15
15
  margin-right: var(--s-2);
16
16
  }
@@ -110,20 +110,15 @@
110
110
 
111
111
  .next-dialog-body {
112
112
  .teamix-pro-info {
113
- padding-right: 16px;
114
113
  .next-card-content-container {
115
114
  margin-top: 10px;
116
115
  padding-bottom: 10px;
117
- padding-right: 0;
118
116
  .next-col.next-col-24:last-child {
119
117
  .teamix-pro-info-item:last-child {
120
118
  padding-bottom: 0px;
121
119
  }
122
120
  }
123
121
  }
124
- .teamix-pro-info-item-value {
125
- padding-right: 0px;
126
- }
127
122
  }
128
123
  }
129
124
 
@@ -5,17 +5,26 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  exports.useLinkAction = useLinkAction;
8
+
8
9
  var _utils = require("@teamix/utils");
10
+
11
+ var _reactRouterDom = require("react-router-dom");
12
+
9
13
  var _base = require("./base");
14
+
10
15
  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; }
16
+
11
17
  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; }
18
+
12
19
  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; }
20
+
13
21
  function useLinkAction(action, actionContext) {
14
- var history = (0, _utils.useRealHistory)();
22
+ var history = (0, _reactRouterDom.useHistory)();
15
23
  return _objectSpread({}, (0, _base.eventHandler)(action, actionContext, function (context) {
16
24
  var linkAction = (0, _utils.getTargetValue)(action, context);
17
25
  (0, _utils.goToLink)(linkAction, history);
18
26
  }));
19
27
  }
28
+
20
29
  var _default = useLinkAction;
21
30
  exports.default = _default;