@teamix/pro 1.5.2 → 1.5.4-beta.0

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 (293) hide show
  1. package/dist/pro.css +1 -1
  2. package/dist/pro.js +20285 -19928
  3. package/dist/pro.min.css +1 -1
  4. package/dist/pro.min.js +1 -1
  5. package/dist/pro.min.js.LICENSE.txt +2 -6
  6. package/es/actions/base.js +8 -21
  7. package/es/actions/dialog-component.js +2 -9
  8. package/es/actions/dialog-form.js +37 -75
  9. package/es/actions/dialog-info.js +1 -5
  10. package/es/actions/dialog.js +57 -95
  11. package/es/actions/index.d.ts +3 -0
  12. package/es/actions/index.js +71 -156
  13. package/es/actions/link.js +3 -5
  14. package/es/actions/quick.d.ts +2 -0
  15. package/es/actions/quick.js +26 -0
  16. package/es/actions/request.js +12 -27
  17. package/es/actions/utils.js +1 -9
  18. package/es/card/card-container.js +0 -5
  19. package/es/card/divider.js +0 -5
  20. package/es/card/index.js +56 -95
  21. package/es/card/selectable.js +4 -13
  22. package/es/card/tab.js +1 -10
  23. package/es/card/utils.js +0 -2
  24. package/es/form/Components/Editable/index.js +16 -55
  25. package/es/form/Components/FormGroup/index.d.ts +1 -0
  26. package/es/form/Components/FormGroup/index.js +7 -22
  27. package/es/form/Components/LightFilter/index.js +15 -35
  28. package/es/form/Components/ProField/index.js +2 -14
  29. package/es/form/Components/ProField/mapDateFormat.js +2 -28
  30. package/es/form/Components/Text/index.d.ts +1 -0
  31. package/es/form/Components/Text/index.js +2 -11
  32. package/es/form/Filter/AdvancedFilter.js +11 -26
  33. package/es/form/Filter/Layout.js +11 -24
  34. package/es/form/Filter/LightFilter.js +13 -24
  35. package/es/form/Filter/SimpleFilter.js +7 -21
  36. package/es/form/Filter/index.js +106 -171
  37. package/es/form/Filter/index2.js +11 -28
  38. package/es/form/Filter/useBindUrl.js +18 -46
  39. package/es/form/Filter/useSpecialProps.js +8 -13
  40. package/es/form/ProForm/addCascadeEffect.js +10 -32
  41. package/es/form/ProForm/customComponent.js +0 -5
  42. package/es/form/ProForm/index.js +23 -34
  43. package/es/form/ProForm/useAutoLayout.js +21 -42
  44. package/es/form/ProForm/useAutoSubmit.js +3 -8
  45. package/es/form/ProForm/useFieldRequest.js +0 -5
  46. package/es/form/ProForm/useFormDisplayValues.js +12 -28
  47. package/es/form/ProForm/useInitialRequest.js +0 -5
  48. package/es/form/SchemaForm/adapterComponent.js +0 -3
  49. package/es/form/SchemaForm/adapterDecorator.d.ts +1 -1
  50. package/es/form/SchemaForm/adapterDecorator.js +0 -8
  51. package/es/form/SchemaForm/adapterType.js +0 -2
  52. package/es/form/SchemaForm/index.js +78 -114
  53. package/es/form/SchemaForm/initializeArrayCards.js +0 -6
  54. package/es/form/SchemaForm/initializeArrayCollapse.js +0 -6
  55. package/es/form/SchemaForm/initializeArrayItems.js +2 -9
  56. package/es/form/SchemaForm/initializeArrayTable.js +21 -34
  57. package/es/form/SchemaForm/initializeDataSource.js +2 -6
  58. package/es/form/SchemaForm/initializeFormButton.js +14 -31
  59. package/es/form/SchemaForm/initializeFormCollapse.js +8 -18
  60. package/es/form/SchemaForm/initializeFormGroup.js +10 -20
  61. package/es/form/SchemaForm/initializeFormStep.js +11 -23
  62. package/es/form/SchemaForm/initializeFormTab.js +10 -20
  63. package/es/form/SchemaForm/initializeReactions.js +9 -33
  64. package/es/form/SchemaForm/initializeRequest.js +2 -16
  65. package/es/form/SchemaForm/initializeRules.js +4 -22
  66. package/es/form/SchemaForm/initializeSelectTable.js +7 -33
  67. package/es/form/SchemaForm/reactions.js +19 -34
  68. package/es/form/docs/ActionResponse.d.ts +1 -0
  69. package/es/form/index.d.ts +9 -9
  70. package/es/form/index.js +0 -9
  71. package/es/form/typing.d.ts +6 -4
  72. package/es/form/utils.d.ts +1 -1
  73. package/es/form/utils.js +4 -49
  74. package/es/form/warning.js +2 -7
  75. package/es/index-without-icon.js +4 -3
  76. package/es/index.d.ts +1 -1
  77. package/es/index.js +7 -8
  78. package/es/info/components/InfoGroup/index.js +21 -32
  79. package/es/info/components/InfoValueItem/index.js +66 -119
  80. package/es/info/components/ProInfoItem/index.js +13 -21
  81. package/es/info/components/baseInfo/index.js +14 -26
  82. package/es/info/components/headerInfo/index.js +8 -20
  83. package/es/info/components/tableInfo/index.js +20 -50
  84. package/es/info/index.js +53 -82
  85. package/es/info/utils/index.js +0 -11
  86. package/es/nocode/configurators/common.js +5 -6
  87. package/es/nocode/configurators/index.js +2 -3
  88. package/es/nocode/index.js +6 -6
  89. package/es/nocode/pages/editor.js +5 -9
  90. package/es/nocode/pages/index.js +4 -4
  91. package/es/nocode/pages/playground.js +18 -35
  92. package/es/nocode/pages/renderer.js +9 -42
  93. package/es/nocode/playground.js +10 -23
  94. package/es/page-header/index.d.ts +2 -2
  95. package/es/page-header/index.js +39 -75
  96. package/es/sidebar/components/sidebar-container/index.js +41 -72
  97. package/es/sidebar/components/tree/index.js +88 -144
  98. package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +11 -26
  99. package/es/sidebar/components/tree-node/components/IconAction/index.js +9 -35
  100. package/es/sidebar/components/tree-node/components/IconSwitch/index.js +12 -25
  101. package/es/sidebar/components/tree-node/index.js +41 -83
  102. package/es/sidebar/index.js +69 -94
  103. package/es/sidebar/utils/action-ref.js +2 -7
  104. package/es/sidebar/utils/index.d.ts +5 -2
  105. package/es/sidebar/utils/index.js +41 -98
  106. package/es/table/components/CardView/index.js +62 -149
  107. package/es/table/components/Filter/index.js +42 -83
  108. package/es/table/components/Layout/index.js +25 -45
  109. package/es/table/components/LoadMore/index.js +15 -34
  110. package/es/table/components/Pagination/index.js +25 -58
  111. package/es/table/components/QuickAction/index.js +3 -11
  112. package/es/table/components/ToolBar/CardSwitch.js +6 -17
  113. package/es/table/components/ToolBar/DensityIcon.js +18 -31
  114. package/es/table/components/ToolBar/FilterColumnIcon.js +50 -106
  115. package/es/table/components/ToolBar/FullScreenIcon.js +2 -6
  116. package/es/table/components/ToolBar/Fullscreen.js +19 -35
  117. package/es/table/components/ToolBar/RefreshIcon.js +2 -5
  118. package/es/table/components/ToolBar/index.js +23 -45
  119. package/es/table/index.js +227 -401
  120. package/es/table/utils/columnRender.d.ts +1 -1
  121. package/es/table/utils/columnRender.js +32 -76
  122. package/es/table/utils/genProColumnToColumn.js +5 -14
  123. package/es/table/utils/index.js +14 -47
  124. package/es/table/utils/pureColumnRender.js +21 -53
  125. package/es/table/utils/pureGenProColumnToColumn.d.ts +1 -1
  126. package/es/table/utils/pureGenProColumnToColumn.js +2 -10
  127. package/es/table/utils/useTableSelection.js +6 -33
  128. package/es/templates/List/index.js +2 -9
  129. package/es/timeline/ProTimeLineItem/index.js +24 -64
  130. package/es/timeline/index.js +8 -22
  131. package/es/timeline/typing.d.ts +1 -0
  132. package/es/utils/message.d.ts +2 -2
  133. package/es/utils/message.js +0 -5
  134. package/es/utils/useRealHistory.d.ts +8 -0
  135. package/es/utils/useRealHistory.js +23 -0
  136. package/lib/actions/base.js +8 -24
  137. package/lib/actions/confirm.js +0 -5
  138. package/lib/actions/danger-confirm.js +0 -5
  139. package/lib/actions/danger-pop-confirm.js +0 -4
  140. package/lib/actions/dialog-component.js +2 -15
  141. package/lib/actions/dialog-form.js +36 -88
  142. package/lib/actions/dialog-info.js +1 -10
  143. package/lib/actions/dialog-table.js +0 -5
  144. package/lib/actions/dialog.js +55 -111
  145. package/lib/actions/drawer-form.js +0 -3
  146. package/lib/actions/drawer-info.js +0 -3
  147. package/lib/actions/drawer-table.js +0 -3
  148. package/lib/actions/drawer.js +0 -4
  149. package/lib/actions/error.js +0 -5
  150. package/lib/actions/index.d.ts +3 -0
  151. package/lib/actions/index.js +93 -186
  152. package/lib/actions/link.js +3 -10
  153. package/lib/actions/notice.js +0 -5
  154. package/lib/actions/pop-confirm.js +0 -5
  155. package/lib/actions/quick.d.ts +2 -0
  156. package/lib/actions/quick.js +33 -0
  157. package/lib/actions/request.js +10 -32
  158. package/lib/actions/utils.js +1 -9
  159. package/lib/card/card-container.js +0 -9
  160. package/lib/card/divider.js +0 -7
  161. package/lib/card/index.js +56 -122
  162. package/lib/card/selectable.js +4 -20
  163. package/lib/card/tab.js +1 -14
  164. package/lib/card/utils.js +0 -6
  165. package/lib/field/index.js +0 -6
  166. package/lib/form/Components/Editable/index.js +15 -65
  167. package/lib/form/Components/FormGroup/index.d.ts +1 -0
  168. package/lib/form/Components/FormGroup/index.js +7 -28
  169. package/lib/form/Components/LightFilter/index.js +15 -47
  170. package/lib/form/Components/ProField/index.js +2 -21
  171. package/lib/form/Components/ProField/mapDateFormat.js +2 -32
  172. package/lib/form/Components/Text/index.d.ts +1 -0
  173. package/lib/form/Components/Text/index.js +2 -16
  174. package/lib/form/Filter/AdvancedFilter.js +11 -34
  175. package/lib/form/Filter/Layout.js +11 -33
  176. package/lib/form/Filter/LightFilter.js +13 -32
  177. package/lib/form/Filter/SimpleFilter.js +5 -27
  178. package/lib/form/Filter/index.js +105 -191
  179. package/lib/form/Filter/index2.js +11 -38
  180. package/lib/form/Filter/useBindUrl.js +18 -50
  181. package/lib/form/Filter/useSpecialProps.js +6 -13
  182. package/lib/form/ProForm/addCascadeEffect.js +10 -35
  183. package/lib/form/ProForm/customComponent.js +0 -8
  184. package/lib/form/ProForm/index.js +23 -57
  185. package/lib/form/ProForm/useAutoLayout.js +21 -45
  186. package/lib/form/ProForm/useAutoSubmit.js +3 -10
  187. package/lib/form/ProForm/useFieldRequest.js +0 -8
  188. package/lib/form/ProForm/useFormDisplayValues.js +12 -34
  189. package/lib/form/ProForm/useInitialRequest.js +0 -6
  190. package/lib/form/SchemaForm/adapterComponent.js +0 -6
  191. package/lib/form/SchemaForm/adapterDecorator.d.ts +1 -1
  192. package/lib/form/SchemaForm/adapterDecorator.js +0 -12
  193. package/lib/form/SchemaForm/adapterType.js +0 -5
  194. package/lib/form/SchemaForm/index.js +78 -144
  195. package/lib/form/SchemaForm/initializeArrayCards.js +0 -7
  196. package/lib/form/SchemaForm/initializeArrayCollapse.js +0 -7
  197. package/lib/form/SchemaForm/initializeArrayItems.js +2 -10
  198. package/lib/form/SchemaForm/initializeArrayTable.js +21 -34
  199. package/lib/form/SchemaForm/initializeDataSource.js +2 -8
  200. package/lib/form/SchemaForm/initializeFormButton.js +14 -32
  201. package/lib/form/SchemaForm/initializeFormCollapse.js +8 -18
  202. package/lib/form/SchemaForm/initializeFormGroup.js +10 -20
  203. package/lib/form/SchemaForm/initializeFormStep.js +11 -23
  204. package/lib/form/SchemaForm/initializeFormTab.js +10 -20
  205. package/lib/form/SchemaForm/initializeReactions.js +9 -37
  206. package/lib/form/SchemaForm/initializeRequest.js +2 -18
  207. package/lib/form/SchemaForm/initializeRules.js +4 -24
  208. package/lib/form/SchemaForm/initializeSelectTable.js +7 -36
  209. package/lib/form/SchemaForm/reactions.js +17 -37
  210. package/lib/form/docs/ActionResponse.d.ts +1 -0
  211. package/lib/form/docs/ActionResponse.js +0 -5
  212. package/lib/form/index.d.ts +9 -9
  213. package/lib/form/index.js +0 -25
  214. package/lib/form/typing.d.ts +6 -4
  215. package/lib/form/utils.d.ts +1 -1
  216. package/lib/form/utils.js +4 -61
  217. package/lib/form/warning.js +2 -8
  218. package/lib/hooks/index.js +0 -5
  219. package/lib/index-without-icon.js +2 -36
  220. package/lib/index.d.ts +1 -1
  221. package/lib/index.js +1 -39
  222. package/lib/info/components/InfoGroup/index.js +21 -42
  223. package/lib/info/components/InfoValueItem/index.js +66 -134
  224. package/lib/info/components/ProInfoItem/index.js +13 -29
  225. package/lib/info/components/baseInfo/index.js +14 -38
  226. package/lib/info/components/headerInfo/index.js +8 -31
  227. package/lib/info/components/tableInfo/index.js +20 -62
  228. package/lib/info/index.js +53 -97
  229. package/lib/info/utils/index.js +0 -19
  230. package/lib/info/utils/utils.js +0 -1
  231. package/lib/nocode/configurators/PageHeader.js +0 -2
  232. package/lib/nocode/configurators/ProTable.js +0 -2
  233. package/lib/nocode/configurators/common.js +5 -10
  234. package/lib/nocode/configurators/index.js +2 -10
  235. package/lib/nocode/configurators/map.js +0 -5
  236. package/lib/nocode/index.js +0 -11
  237. package/lib/nocode/pages/editor.js +5 -19
  238. package/lib/nocode/pages/index.js +2 -9
  239. package/lib/nocode/pages/playground.js +18 -52
  240. package/lib/nocode/pages/renderer.js +9 -53
  241. package/lib/nocode/playground.js +10 -35
  242. package/lib/page-container/index.js +0 -6
  243. package/lib/page-header/index.d.ts +2 -2
  244. package/lib/page-header/index.js +38 -88
  245. package/lib/sidebar/components/sidebar-container/index.js +41 -84
  246. package/lib/sidebar/components/tree/index.js +88 -158
  247. package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +11 -34
  248. package/lib/sidebar/components/tree-node/components/IconAction/index.js +9 -46
  249. package/lib/sidebar/components/tree-node/components/IconSwitch/index.js +12 -35
  250. package/lib/sidebar/components/tree-node/index.js +41 -99
  251. package/lib/sidebar/index.js +69 -112
  252. package/lib/sidebar/utils/action-ref.js +2 -8
  253. package/lib/sidebar/utils/index.d.ts +5 -2
  254. package/lib/sidebar/utils/index.js +41 -106
  255. package/lib/skeleton/index.js +0 -6
  256. package/lib/table/components/CardView/index.js +62 -161
  257. package/lib/table/components/EmptyContent/index.js +0 -6
  258. package/lib/table/components/Filter/index.js +42 -93
  259. package/lib/table/components/Layout/index.js +25 -58
  260. package/lib/table/components/LoadMore/index.js +15 -44
  261. package/lib/table/components/Pagination/index.js +25 -68
  262. package/lib/table/components/QuickAction/index.js +3 -15
  263. package/lib/table/components/ToolBar/CardSwitch.js +6 -28
  264. package/lib/table/components/ToolBar/DensityIcon.js +18 -42
  265. package/lib/table/components/ToolBar/FilterColumnIcon.js +50 -118
  266. package/lib/table/components/ToolBar/FullScreenIcon.js +3 -13
  267. package/lib/table/components/ToolBar/Fullscreen.js +19 -42
  268. package/lib/table/components/ToolBar/RefreshIcon.js +3 -12
  269. package/lib/table/components/ToolBar/index.js +23 -63
  270. package/lib/table/index.js +227 -426
  271. package/lib/table/utils/columnRender.d.ts +1 -1
  272. package/lib/table/utils/columnRender.js +32 -89
  273. package/lib/table/utils/genProColumnToColumn.js +5 -19
  274. package/lib/table/utils/getTableProps.js +0 -2
  275. package/lib/table/utils/getTableSortIcons.js +0 -5
  276. package/lib/table/utils/index.js +12 -55
  277. package/lib/table/utils/pureColumnRender.js +21 -64
  278. package/lib/table/utils/pureGenProColumnToColumn.d.ts +1 -1
  279. package/lib/table/utils/pureGenProColumnToColumn.js +2 -11
  280. package/lib/table/utils/useTableSelection.js +6 -35
  281. package/lib/templates/Detail/index.js +0 -5
  282. package/lib/templates/Form/index.js +0 -5
  283. package/lib/templates/List/index.js +2 -19
  284. package/lib/templates/index.js +0 -6
  285. package/lib/timeline/ProTimeLineItem/index.js +24 -75
  286. package/lib/timeline/index.js +8 -33
  287. package/lib/timeline/typing.d.ts +1 -0
  288. package/lib/utils/index.js +0 -6
  289. package/lib/utils/message.d.ts +2 -2
  290. package/lib/utils/message.js +0 -10
  291. package/lib/utils/useRealHistory.d.ts +8 -0
  292. package/lib/utils/useRealHistory.js +32 -0
  293. package/package.json +1 -1
@@ -3,213 +3,172 @@
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
+ };
6
16
  exports.ProActionButton = exports.ActionMenuButton = exports.ActionGroup = exports.ActionButton = void 0;
7
17
  exports.ProActionGroup = ProActionGroup;
8
18
  exports.default = exports.ProActionMenuButton = void 0;
9
19
  exports.registerActionHandler = registerActionHandler;
10
20
  exports.useAction = useAction;
11
-
12
21
  var _react = _interopRequireDefault(require("react"));
13
-
14
22
  var _classnames = _interopRequireDefault(require("classnames"));
15
-
16
23
  var _components = require("@alicloudfe/components");
17
-
18
24
  var _icon = _interopRequireDefault(require("@teamix/icon"));
19
-
20
25
  var _utils = require("@teamix/utils");
21
-
22
26
  var _link = require("./link");
23
-
24
27
  var _request = require("./request");
25
-
26
28
  var _dialog = require("./dialog");
27
-
28
29
  var _confirm = require("./confirm");
29
-
30
30
  var _dangerConfirm = require("./danger-confirm");
31
-
32
31
  var _notice = require("./notice");
33
-
34
32
  var _error = require("./error");
35
-
36
33
  var _dialogForm = require("./dialog-form");
37
-
38
34
  var _dialogTable = require("./dialog-table");
39
-
40
35
  var _dialogInfo = require("./dialog-info");
41
-
42
36
  var _drawer = require("./drawer");
43
-
44
37
  var _drawerForm = require("./drawer-form");
45
-
46
38
  var _drawerTable = require("./drawer-table");
47
-
48
39
  var _drawerInfo = require("./drawer-info");
49
-
50
40
  var _popConfirm = require("./pop-confirm");
51
-
52
41
  var _dangerPopConfirm = require("./danger-pop-confirm");
53
-
54
42
  require("./index.scss");
55
-
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
+ });
56
55
  var _excluded = ["type"],
57
- _excluded2 = ["config", "icon", "iconSize", "type", "context", "children", "visible", "disabled", "onClick", "tooltip", "disabledTooltip", "tooltipProps", "data-teamix-spm"],
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", "data-teamix-spm"];
64
-
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"];
65
63
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
66
-
67
64
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
68
-
69
65
  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
-
71
66
  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
-
73
67
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
74
-
75
68
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
76
-
77
69
  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
-
79
70
  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
-
81
71
  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
-
83
72
  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
-
85
73
  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
-
87
74
  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
-
89
75
  var RegistedActions = new Map();
90
-
91
76
  function registerActionHandler(id, extendActionId, defaultConfig) {
92
77
  RegistedActions.set(id, {
93
78
  extendActionId: extendActionId,
94
79
  defaultConfig: defaultConfig
95
80
  });
96
81
  }
97
-
98
82
  function useAction(config, context) {
99
83
  if (!config) {
100
84
  return {};
101
85
  }
102
-
103
86
  var type = config.type,
104
- others = _objectWithoutProperties(config, _excluded);
105
-
87
+ others = _objectWithoutProperties(config, _excluded);
106
88
  if (type === 'request') {
107
89
  return (0, _request.useRequestAction)(others, context);
108
90
  }
109
-
110
91
  if (type === 'link') {
111
92
  return (0, _link.useLinkAction)(others, context);
112
93
  }
113
-
114
94
  if (type === 'dialog') {
115
95
  return (0, _dialog.useDialogAction)(others, context);
116
96
  }
117
-
118
97
  if (type === 'confirm') {
119
98
  return (0, _confirm.useConfirmAction)(others, context);
120
99
  }
121
-
122
100
  if (type === 'danger-confirm') {
123
101
  return (0, _dangerConfirm.useDangerConfirmAction)(others, context);
124
102
  }
125
-
126
103
  if (type === 'notice') {
127
104
  return (0, _notice.useNoticeAction)(others, context);
128
105
  }
129
-
130
106
  if (type === 'error') {
131
107
  return (0, _error.useErrorAction)(others, context);
132
108
  }
133
-
134
109
  if (type === 'dialog-form') {
135
110
  return (0, _dialogForm.useDialogFormAction)(others, context);
136
111
  }
137
-
138
112
  if (type === 'dialog-table') {
139
113
  return (0, _dialogTable.useDialogTableAction)(others, context);
140
114
  }
141
-
142
115
  if (type === 'dialog-info') {
143
116
  return (0, _dialogInfo.useDialogInfoAction)(others, context);
144
117
  }
145
-
146
118
  if (type === 'drawer') {
147
119
  return (0, _drawer.useDrawerAction)(others, context);
148
120
  }
149
-
150
121
  if (type === 'drawer-form') {
151
122
  return (0, _drawerForm.useDrawerFormAction)(others, context);
152
123
  }
153
-
154
124
  if (type === 'drawer-table') {
155
125
  return (0, _drawerTable.useDrawerTableAction)(others, context);
156
126
  }
157
-
158
127
  if (type === 'drawer-info') {
159
128
  return (0, _drawerInfo.useDrawerInfoAction)(others, context);
160
129
  }
161
-
162
130
  if (type === 'pop-confirm') {
163
131
  return (0, _popConfirm.usePopConfirmAction)(others, context);
164
132
  }
165
-
166
133
  if (type === 'danger-pop-confirm') {
167
134
  return (0, _dangerPopConfirm.useDangerPopConfirmAction)(others, context);
168
135
  }
169
-
170
136
  var registedAction = RegistedActions.get(type);
171
-
172
137
  if (!registedAction) {
173
138
  return {};
174
139
  }
175
-
176
140
  return useAction(_objectSpread(_objectSpread({
177
141
  type: registedAction.extendActionId
178
142
  }, registedAction.defaultConfig), others), context);
179
143
  }
180
-
181
144
  var buttonContent = function buttonContent(content, iconType, iconSize, context) {
182
145
  var renderedContent = typeof content === 'function' ? content(context) : content;
183
-
184
146
  if (!iconType) {
185
147
  return renderedContent;
186
148
  }
187
-
188
149
  return [/*#__PURE__*/_react.default.createElement(_icon.default, {
189
150
  type: iconType,
190
151
  size: iconSize,
191
152
  key: "teamix-button-icon"
192
153
  }), renderedContent];
193
154
  };
194
-
195
155
  var ProActionButton = function ProActionButton(props) {
196
156
  var config = props.config,
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
- dataTeamixSpm = props['data-teamix-spm'],
211
- others = _objectWithoutProperties(props, _excluded2);
212
-
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);
213
172
  var actionProps = useAction(config, context);
214
173
  var buttonProps = _onClick ? _objectSpread(_objectSpread(_objectSpread({
215
174
  disabled: disabled
@@ -220,21 +179,17 @@ var ProActionButton = function ProActionButton(props) {
220
179
  }) : _objectSpread(_objectSpread({
221
180
  disabled: disabled
222
181
  }, actionProps), others);
223
-
224
182
  if (dataTeamixSpm) {
225
183
  buttonProps['data-teamix-spm'] = dataTeamixSpm;
226
184
  }
227
-
228
185
  var content = /*#__PURE__*/_react.default.createElement(_components.Button, _objectSpread({
229
186
  type: type
230
187
  }, buttonProps), buttonContent(children, icon, iconSize, context));
231
-
232
188
  var baseToolTipProps = _objectSpread({
233
189
  triggerType: 'hover',
234
190
  align: 't',
235
191
  trigger: content
236
192
  }, tooltipProps);
237
-
238
193
  if (tooltip || disabledTooltip) {
239
194
  if (tooltip && !disabledTooltip) {
240
195
  if (!disabled) {
@@ -249,25 +204,22 @@ var ProActionButton = function ProActionButton(props) {
249
204
  content = /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, _objectSpread({}, baseToolTipProps), showToolTip);
250
205
  }
251
206
  }
252
-
253
207
  return content;
254
208
  };
255
-
256
209
  exports.ProActionButton = ProActionButton;
257
-
258
210
  var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
259
211
  var action = props.action,
260
- context = props.context,
261
- dataTeamixSpm = props['data-teamix-spm'];
212
+ context = props.context,
213
+ dataTeamixSpm = props['data-teamix-spm'];
262
214
  var config = action.config,
263
- btnContext = action.context,
264
- _onClick2 = action.onClick,
265
- children = action.children,
266
- icon = action.icon,
267
- disabled = action.disabled,
268
- tooltip = action.tooltip,
269
- disabledTooltip = action.disabledTooltip,
270
- tooltipProps = action.tooltipProps;
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;
271
223
  var basePrefix = (0, _utils.usePrefixCls)('', {
272
224
  base: true
273
225
  });
@@ -275,29 +227,23 @@ var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
275
227
  var menuItemActionConfig = Object.assign({}, config, {
276
228
  trigger: 'onClick'
277
229
  });
278
-
279
230
  var _useAction = useAction(menuItemActionConfig, btnContext || context),
280
- loading = _useAction.loading,
281
- menuItemProps = _objectWithoutProperties(_useAction, _excluded3);
282
-
231
+ loading = _useAction.loading,
232
+ menuItemProps = _objectWithoutProperties(_useAction, _excluded3);
283
233
  var buttonProps = disabled ? {} : _onClick2 ? _objectSpread(_objectSpread({}, menuItemProps), {}, {
284
234
  onClick: function onClick(e) {
285
235
  return _onClick2(e, context);
286
236
  }
287
237
  }) : _objectSpread({}, menuItemProps);
288
-
289
238
  if (dataTeamixSpm) {
290
239
  buttonProps['data-teamix-spm'] = dataTeamixSpm;
291
240
  }
292
-
293
241
  var content = buttonContent(children, icon, undefined, context);
294
-
295
242
  var baseToolTipProps = _objectSpread({
296
243
  triggerType: 'hover',
297
244
  align: 't',
298
245
  trigger: content
299
246
  }, tooltipProps);
300
-
301
247
  if (tooltip || disabledTooltip) {
302
248
  if (tooltip && !disabledTooltip) {
303
249
  if (!disabled) {
@@ -312,21 +258,17 @@ var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
312
258
  content = /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, _objectSpread({}, baseToolTipProps), showToolTip);
313
259
  }
314
260
  }
315
-
316
261
  return /*#__PURE__*/_react.default.createElement("div", _objectSpread({
317
262
  className: (0, _classnames.default)(_defineProperty({}, basePrefix('disabled'), disabled), basePrefix('menu-item'), prefixCls('menu-item'))
318
263
  }, buttonProps), content);
319
264
  };
320
-
321
265
  function renderCommonActionButtonMenuItem(action, key, context, dataTeamixSpm) {
322
266
  if (action.type === 'divider') {
323
267
  return /*#__PURE__*/_react.default.createElement(_components.Menu.Divider, {
324
268
  key: key
325
269
  });
326
270
  }
327
-
328
271
  var menuBtn = action;
329
-
330
272
  if (menuBtn.actions && menuBtn.actions.length && menuBtn.disabled !== true) {
331
273
  return /*#__PURE__*/_react.default.createElement(_components.Menu.SubMenu, {
332
274
  key: key,
@@ -335,7 +277,6 @@ function renderCommonActionButtonMenuItem(action, key, context, dataTeamixSpm) {
335
277
  return renderCommonActionButtonMenuItem(a, a.key, context, a['data-teamix-spm']);
336
278
  }));
337
279
  }
338
-
339
280
  return /*#__PURE__*/_react.default.createElement(ProActionMenuButtonItem, {
340
281
  key: key,
341
282
  action: action,
@@ -343,20 +284,18 @@ function renderCommonActionButtonMenuItem(action, key, context, dataTeamixSpm) {
343
284
  "data-teamix-spm": "".concat(dataTeamixSpm, "-").concat(key)
344
285
  });
345
286
  }
346
-
347
287
  var ProActionMenuButton = function ProActionMenuButton(props) {
348
288
  var icon = props.icon,
349
- iconSize = props.iconSize,
350
- label = props.label,
351
- actions = props.actions,
352
- children = props.children,
353
- context = props.context,
354
- _props$type2 = props.type,
355
- type = _props$type2 === void 0 ? 'primary' : _props$type2,
356
- className = props.className,
357
- noArrow = props.noArrow,
358
- others = _objectWithoutProperties(props, _excluded4);
359
-
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);
360
299
  return /*#__PURE__*/_react.default.createElement(_components.MenuButton, _objectSpread({
361
300
  popupTriggerType: "hover",
362
301
  autoWidth: false,
@@ -375,40 +314,33 @@ var ProActionMenuButton = function ProActionMenuButton(props) {
375
314
  }, others), actions.map(function (action, i) {
376
315
  return renderCommonActionButtonMenuItem(action, action.key || i, context, others === null || others === void 0 ? void 0 : others['data-teamix-spm']);
377
316
  }));
378
- }; // 超出 max,则折叠起来
379
-
380
-
317
+ };
318
+ // 超出 max,则折叠起来
381
319
  exports.ProActionMenuButton = ProActionMenuButton;
382
-
383
320
  function foldExtraActions(actions, max, moreConfig) {
384
321
  if (actions.length <= max) {
385
322
  return actions;
386
323
  }
387
-
388
324
  return [].concat(_toConsumableArray(actions.slice(0, max - 1)), [_objectSpread(_objectSpread({
389
325
  key: '__teamix_pro_action_group_more_btn'
390
326
  }, moreConfig), {}, {
391
327
  actions: actions.slice(max - 1)
392
328
  })]);
393
- } // 如果 actions 数量超过了 max,则把第 max 个和剩余超出部分折叠起来成为一个 menu
329
+ }
330
+ // 如果 actions 数量超过了 max,则把第 max 个和剩余超出部分折叠起来成为一个 menu
394
331
  // divider 不计数
395
-
396
-
397
332
  function formatGroupActions(actions, max, moreConfig) {
398
333
  var MAX = max < 1 ? MAX_ACTTIONS : max;
399
334
  var count = 0;
400
335
  var index = 0;
401
-
402
336
  for (; index < actions.length && count < MAX; index++) {
403
337
  if (actions[index].type !== 'divider') {
404
338
  count += 1;
405
339
  }
406
340
  }
407
-
408
341
  return foldExtraActions(actions, Math.max(index, MAX), moreConfig);
409
- } // 渲染一个 button 或者 menu button
410
-
411
-
342
+ }
343
+ // 渲染一个 button 或者 menu button
412
344
  function renderCommonActionButton(button, context, isTypeText, dataTeamixSpm) {
413
345
  if (button.type === 'divider') {
414
346
  return /*#__PURE__*/_react.default.createElement(_components.Divider, {
@@ -416,27 +348,21 @@ function renderCommonActionButton(button, context, isTypeText, dataTeamixSpm) {
416
348
  direction: "ver"
417
349
  });
418
350
  }
419
-
420
351
  var buttonContext = button.context,
421
- text = button.text,
422
- others = _objectWithoutProperties(button, _excluded5);
423
-
352
+ text = button.text,
353
+ others = _objectWithoutProperties(button, _excluded5);
424
354
  var buttonProps = _objectSpread({
425
355
  context: Object.assign({}, context, buttonContext),
426
356
  text: text || isTypeText
427
357
  }, others);
428
-
429
358
  if (dataTeamixSpm) {
430
359
  buttonProps['data-teamix-spm'] = dataTeamixSpm;
431
360
  }
432
-
433
361
  if (!button.actions) {
434
362
  return /*#__PURE__*/_react.default.createElement(ProActionButton, _objectSpread({}, buttonProps));
435
363
  }
436
-
437
364
  return /*#__PURE__*/_react.default.createElement(ProActionMenuButton, _objectSpread({}, buttonProps));
438
365
  }
439
-
440
366
  function getDefaultMoreButton(type, more) {
441
367
  var defaultConfig = type === 'button' ? {
442
368
  children: (0, _utils.getMessage)('more')
@@ -445,38 +371,29 @@ function getDefaultMoreButton(type, more) {
445
371
  autoWidth: false,
446
372
  noArrow: true
447
373
  };
448
-
449
374
  if (!more) {
450
375
  return defaultConfig;
451
376
  }
452
-
453
377
  var moreConfig = typeof more === 'string' ? {
454
378
  children: more
455
379
  } : more;
456
-
457
380
  if (type === 'button') {
458
381
  return Object.assign(defaultConfig, moreConfig);
459
382
  }
460
-
461
383
  return moreConfig;
462
384
  }
463
-
464
385
  var MAX_ACTTIONS = 4;
465
-
466
386
  function getKey(index, key) {
467
387
  if (key !== undefined) {
468
388
  return key;
469
389
  }
470
-
471
390
  return "__teamix_pro_action_key_".concat(index);
472
391
  }
473
-
474
392
  function getActionConfig(action, index, context) {
475
393
  if (action.actions) {
476
394
  var _key = action.key,
477
- actions = action.actions,
478
- _others = _objectWithoutProperties(action, _excluded6);
479
-
395
+ actions = action.actions,
396
+ _others = _objectWithoutProperties(action, _excluded6);
480
397
  return _objectSpread({
481
398
  key: getKey(index, _key),
482
399
  actions: actions.map(function (a, j) {
@@ -486,33 +403,29 @@ function getActionConfig(action, index, context) {
486
403
  })
487
404
  }, (0, _utils.getTargetValue)(_others, context));
488
405
  }
489
-
490
406
  var key = action.key,
491
- config = action.config,
492
- others = _objectWithoutProperties(action, _excluded7);
493
-
407
+ config = action.config,
408
+ others = _objectWithoutProperties(action, _excluded7);
494
409
  return _objectSpread({
495
410
  key: getKey(index, key),
496
411
  config: config
497
412
  }, (0, _utils.getTargetValue)(others, context));
498
413
  }
499
-
500
414
  function ProActionGroup(props) {
501
415
  var _props$type3 = props.type,
502
- type = _props$type3 === void 0 ? 'button' : _props$type3,
503
- _props$divider = props.divider,
504
- divider = _props$divider === void 0 ? true : _props$divider,
505
- _props$max = props.max,
506
- max = _props$max === void 0 ? MAX_ACTTIONS : _props$max,
507
- moreText = props.moreText,
508
- more = props.more,
509
- context = props.context,
510
- _props$actions = props.actions,
511
- actions = _props$actions === void 0 ? [] : _props$actions,
512
- className = props.className,
513
- dataTeamixSpm = props['data-teamix-spm'],
514
- containerProps = _objectWithoutProperties(props, _excluded8);
515
-
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);
516
429
  var isTypeText = type === 'text';
517
430
  var filteredActions = actions.map(function (action, index) {
518
431
  return getActionConfig(action, index, context);
@@ -526,7 +439,6 @@ function ProActionGroup(props) {
526
439
  })
527
440
  }, containerProps), formatedActions.map(function (actionBtn, i) {
528
441
  var isLastOne = i === formatedActions.length - 1;
529
-
530
442
  if (dataTeamixSpm) {
531
443
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
532
444
  key: actionBtn.key
@@ -540,28 +452,23 @@ function ProActionGroup(props) {
540
452
  }));
541
453
  }));
542
454
  }
543
-
544
455
  var ProAction = function ProAction(props) {
545
456
  return renderCommonActionButton(props);
546
457
  };
547
-
548
458
  var _default = ProAction;
459
+ exports.default = _default;
549
460
  /**
550
461
  * @deprecated 建议使用 ProActionGroup 代替
551
462
  */
552
-
553
- exports.default = _default;
554
463
  var ActionGroup = ProActionGroup;
555
464
  /**
556
465
  * @deprecated 建议使用 ProActionButton 代替
557
466
  */
558
-
559
467
  exports.ActionGroup = ActionGroup;
560
468
  var ActionButton = ProActionButton;
561
469
  /**
562
470
  * @deprecated 建议使用 ProActionMenuButton 代替
563
471
  */
564
-
565
472
  exports.ActionButton = ActionButton;
566
473
  var ActionMenuButton = ProActionMenuButton;
567
474
  exports.ActionMenuButton = ActionMenuButton;
@@ -5,26 +5,19 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  exports.useLinkAction = useLinkAction;
8
-
9
8
  var _utils = require("@teamix/utils");
10
-
11
- var _reactRouterDom = require("react-router-dom");
12
-
9
+ var _useRealHistory = _interopRequireDefault(require("../utils/useRealHistory"));
13
10
  var _base = require("./base");
14
-
11
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
12
  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
-
17
13
  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
-
19
14
  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
-
21
15
  function useLinkAction(action, actionContext) {
22
- var history = (0, _reactRouterDom.useHistory)();
16
+ var history = (0, _useRealHistory.default)();
23
17
  return _objectSpread({}, (0, _base.eventHandler)(action, actionContext, function (context) {
24
18
  var linkAction = (0, _utils.getTargetValue)(action, context);
25
19
  (0, _utils.goToLink)(linkAction, history);
26
20
  }));
27
21
  }
28
-
29
22
  var _default = useLinkAction;
30
23
  exports.default = _default;
@@ -5,13 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  exports.useNoticeAction = useNoticeAction;
8
-
9
8
  var _utils = require("@teamix/utils");
10
-
11
9
  var _dialog = _interopRequireDefault(require("./dialog"));
12
-
13
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
-
15
11
  function useNoticeAction(action, context) {
16
12
  return (0, _dialog.default)((0, _utils.deepMerge)({
17
13
  dialogQuickShowType: 'confirm',
@@ -20,6 +16,5 @@ function useNoticeAction(action, context) {
20
16
  }
21
17
  }, action), context);
22
18
  }
23
-
24
19
  var _default = useNoticeAction;
25
20
  exports.default = _default;
@@ -5,19 +5,14 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  exports.usePopConfirmAction = usePopConfirmAction;
8
-
9
8
  var _utils = require("@teamix/utils");
10
-
11
9
  var _dialog = _interopRequireDefault(require("./dialog"));
12
-
13
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
-
15
11
  function usePopConfirmAction(action, context) {
16
12
  return (0, _dialog.default)((0, _utils.deepMerge)({
17
13
  dialogType: 'pop',
18
14
  align: 'br'
19
15
  }, action), context);
20
16
  }
21
-
22
17
  var _default = usePopConfirmAction;
23
18
  exports.default = _default;