@teamix/pro 1.1.36 → 1.1.40

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 (200) hide show
  1. package/README.md +14 -10
  2. package/dist/pro.css +1 -1
  3. package/dist/pro.js +2555 -3791
  4. package/dist/pro.min.css +1 -1
  5. package/dist/pro.min.js +1 -1
  6. package/es/actions/dialog-form.d.ts +5 -5
  7. package/es/actions/dialog-form.js +1 -5
  8. package/es/actions/dialog.d.ts +12 -0
  9. package/es/actions/dialog.js +104 -27
  10. package/es/actions/index.d.ts +54 -47
  11. package/es/actions/index.js +28 -22
  12. package/es/actions/index.scss +48 -2
  13. package/es/actions/link.js +4 -2
  14. package/es/actions/request.d.ts +1 -1
  15. package/es/actions/request.js +2 -2
  16. package/es/card/index.d.ts +17 -5
  17. package/es/card/index.js +16 -11
  18. package/es/form/Components/ProField/index.d.ts +1 -161
  19. package/es/form/Components/ProField/index.js +34 -40
  20. package/es/form/Filter/index.js +2 -2
  21. package/es/form/ProForm/index.d.ts +2 -2
  22. package/es/form/ProForm/index.js +1 -6
  23. package/es/form/ProForm/index.scss +19 -1
  24. package/es/form/ProForm/useFieldRequest.d.ts +5 -0
  25. package/es/form/ProForm/useFieldRequest.js +26 -0
  26. package/es/form/SchemaForm/adapterDecorator.js +2 -2
  27. package/es/form/SchemaForm/index.d.ts +2 -2
  28. package/es/form/SchemaForm/index.js +12 -21
  29. package/es/form/SchemaForm/initializeArrayCards.d.ts +2 -2
  30. package/es/form/SchemaForm/initializeArrayCollapse.d.ts +2 -2
  31. package/es/form/SchemaForm/initializeArrayItems.d.ts +2 -2
  32. package/es/form/SchemaForm/initializeArrayTable.d.ts +2 -2
  33. package/es/form/SchemaForm/initializeDataSource.d.ts +2 -2
  34. package/es/form/SchemaForm/initializeDataSource.js +2 -2
  35. package/es/form/SchemaForm/initializeFormButton.d.ts +2 -2
  36. package/es/form/SchemaForm/initializeFormCollapse.d.ts +2 -2
  37. package/es/form/SchemaForm/initializeFormGroup.d.ts +2 -2
  38. package/es/form/SchemaForm/initializeFormStep.d.ts +3 -3
  39. package/es/form/SchemaForm/initializeFormTab.d.ts +2 -2
  40. package/es/form/SchemaForm/initializeRequest.d.ts +2 -2
  41. package/es/form/SchemaForm/initializeRequest.js +2 -2
  42. package/es/form/SchemaForm/initializeRules.js +44 -16
  43. package/es/form/SchemaForm/reactions.d.ts +5 -5
  44. package/es/form/SchemaForm/reactions.js +20 -18
  45. package/es/form/fieldTypeMap.d.ts +4 -0
  46. package/es/form/fieldTypeMap.js +41 -0
  47. package/es/form/index.d.ts +92 -4
  48. package/es/form/index.js +18 -5
  49. package/es/form/schemaNameMap.js +3 -0
  50. package/es/form/typing.d.ts +49 -26
  51. package/es/form/utils.d.ts +3 -1
  52. package/es/form/utils.js +38 -1
  53. package/es/form/warning.d.ts +2 -2
  54. package/es/index.d.ts +1 -1
  55. package/es/index.js +1 -1
  56. package/es/info/components/InfoGroup/index.js +73 -15
  57. package/es/info/components/InfoGroup/index.scss +45 -3
  58. package/es/info/components/InfoValueItem/index.js +9 -4
  59. package/es/info/components/InfoValueItem/index.scss +5 -1
  60. package/es/info/components/ProInfoItem/index.js +3 -3
  61. package/es/info/components/ProInfoItem/index.scss +1 -0
  62. package/es/info/components/baseInfo/index.d.ts +2 -3
  63. package/es/info/components/baseInfo/index.js +29 -10
  64. package/es/info/components/headerInfo/index.d.ts +2 -3
  65. package/es/info/components/tableInfo/index.d.ts +2 -3
  66. package/es/info/components/tableInfo/index.js +2 -2
  67. package/es/info/index.js +75 -51
  68. package/es/info/typing.d.ts +54 -36
  69. package/es/info/utils/index.d.ts +2 -2
  70. package/es/info/utils/utils.d.ts +1 -1
  71. package/es/nocode/pages/renderer.js +2 -2
  72. package/es/page-header/index.d.ts +42 -25
  73. package/es/page-header/index.js +56 -32
  74. package/es/page-header/index.scss +2 -1
  75. package/es/table/components/EmptyContent/index.d.ts +2 -0
  76. package/es/table/components/EmptyContent/index.js +11 -0
  77. package/es/table/components/Filter/index.d.ts +2 -2
  78. package/es/table/components/Filter/index.js +23 -10
  79. package/es/table/components/Filter/index.scss +1 -1
  80. package/es/table/components/Layout/index.js +2 -2
  81. package/es/table/components/QuickAction/index.d.ts +2 -2
  82. package/es/table/components/QuickAction/index.js +3 -3
  83. package/es/table/components/ToolBar/Fullscreen.js +1 -0
  84. package/es/table/index.js +76 -14
  85. package/es/table/index.scss +4 -0
  86. package/es/table/typing.d.ts +29 -14
  87. package/es/table/utils/columnRender.d.ts +3 -3
  88. package/es/table/utils/columnRender.js +2 -2
  89. package/es/table/utils/genProColumnToColumn.d.ts +2 -2
  90. package/es/table/utils/genProColumnToColumn.js +1 -1
  91. package/es/table/utils/index.js +33 -11
  92. package/es/templates/List/index.d.ts +2 -2
  93. package/es/utils/message.d.ts +3 -0
  94. package/es/utils/message.js +19 -0
  95. package/lib/actions/dialog-form.d.ts +5 -5
  96. package/lib/actions/dialog-form.js +1 -5
  97. package/lib/actions/dialog.d.ts +12 -0
  98. package/lib/actions/dialog.js +108 -26
  99. package/lib/actions/index.d.ts +54 -47
  100. package/lib/actions/index.js +37 -30
  101. package/lib/actions/index.scss +48 -2
  102. package/lib/actions/link.js +5 -2
  103. package/lib/actions/request.d.ts +1 -1
  104. package/lib/actions/request.js +2 -2
  105. package/lib/card/index.d.ts +17 -5
  106. package/lib/card/index.js +18 -12
  107. package/lib/form/Components/ProField/index.d.ts +1 -161
  108. package/lib/form/Components/ProField/index.js +32 -38
  109. package/lib/form/Filter/index.js +2 -2
  110. package/lib/form/ProForm/index.d.ts +2 -2
  111. package/lib/form/ProForm/index.js +1 -7
  112. package/lib/form/ProForm/index.scss +19 -1
  113. package/lib/form/ProForm/useFieldRequest.d.ts +5 -0
  114. package/lib/form/ProForm/useFieldRequest.js +37 -0
  115. package/lib/form/SchemaForm/adapterDecorator.js +4 -2
  116. package/lib/form/SchemaForm/index.d.ts +2 -2
  117. package/lib/form/SchemaForm/index.js +11 -22
  118. package/lib/form/SchemaForm/initializeArrayCards.d.ts +2 -2
  119. package/lib/form/SchemaForm/initializeArrayCollapse.d.ts +2 -2
  120. package/lib/form/SchemaForm/initializeArrayItems.d.ts +2 -2
  121. package/lib/form/SchemaForm/initializeArrayTable.d.ts +2 -2
  122. package/lib/form/SchemaForm/initializeDataSource.d.ts +2 -2
  123. package/lib/form/SchemaForm/initializeDataSource.js +2 -2
  124. package/lib/form/SchemaForm/initializeFormButton.d.ts +2 -2
  125. package/lib/form/SchemaForm/initializeFormCollapse.d.ts +2 -2
  126. package/lib/form/SchemaForm/initializeFormGroup.d.ts +2 -2
  127. package/lib/form/SchemaForm/initializeFormStep.d.ts +3 -3
  128. package/lib/form/SchemaForm/initializeFormTab.d.ts +2 -2
  129. package/lib/form/SchemaForm/initializeRequest.d.ts +2 -2
  130. package/lib/form/SchemaForm/initializeRequest.js +1 -1
  131. package/lib/form/SchemaForm/initializeRules.js +41 -13
  132. package/lib/form/SchemaForm/reactions.d.ts +5 -5
  133. package/lib/form/SchemaForm/reactions.js +22 -20
  134. package/lib/form/fieldTypeMap.d.ts +4 -0
  135. package/lib/form/fieldTypeMap.js +48 -0
  136. package/lib/form/index.d.ts +92 -4
  137. package/lib/form/index.js +17 -31
  138. package/lib/form/schemaNameMap.js +3 -0
  139. package/lib/form/typing.d.ts +49 -26
  140. package/lib/form/utils.d.ts +3 -1
  141. package/lib/form/utils.js +43 -1
  142. package/lib/form/warning.d.ts +2 -2
  143. package/lib/index.d.ts +1 -1
  144. package/lib/index.js +1 -1
  145. package/lib/info/components/InfoGroup/index.js +76 -14
  146. package/lib/info/components/InfoGroup/index.scss +45 -3
  147. package/lib/info/components/InfoValueItem/index.js +8 -3
  148. package/lib/info/components/InfoValueItem/index.scss +5 -1
  149. package/lib/info/components/ProInfoItem/index.js +2 -2
  150. package/lib/info/components/ProInfoItem/index.scss +1 -0
  151. package/lib/info/components/baseInfo/index.d.ts +2 -3
  152. package/lib/info/components/baseInfo/index.js +29 -10
  153. package/lib/info/components/headerInfo/index.d.ts +2 -3
  154. package/lib/info/components/tableInfo/index.d.ts +2 -3
  155. package/lib/info/components/tableInfo/index.js +1 -1
  156. package/lib/info/index.js +73 -49
  157. package/lib/info/typing.d.ts +54 -36
  158. package/lib/info/utils/index.d.ts +2 -2
  159. package/lib/info/utils/utils.d.ts +1 -1
  160. package/lib/nocode/pages/renderer.js +1 -1
  161. package/lib/page-header/index.d.ts +42 -25
  162. package/lib/page-header/index.js +54 -30
  163. package/lib/page-header/index.scss +2 -1
  164. package/lib/table/components/EmptyContent/index.d.ts +2 -0
  165. package/lib/table/components/EmptyContent/index.js +25 -0
  166. package/lib/table/components/Filter/index.d.ts +2 -2
  167. package/lib/table/components/Filter/index.js +23 -10
  168. package/lib/table/components/Filter/index.scss +1 -1
  169. package/lib/table/components/Layout/index.js +1 -1
  170. package/lib/table/components/QuickAction/index.d.ts +2 -2
  171. package/lib/table/components/QuickAction/index.js +1 -1
  172. package/lib/table/components/ToolBar/Fullscreen.js +1 -0
  173. package/lib/table/index.js +77 -14
  174. package/lib/table/index.scss +4 -0
  175. package/lib/table/typing.d.ts +29 -14
  176. package/lib/table/utils/columnRender.d.ts +3 -3
  177. package/lib/table/utils/columnRender.js +1 -1
  178. package/lib/table/utils/genProColumnToColumn.d.ts +2 -2
  179. package/lib/table/utils/genProColumnToColumn.js +2 -2
  180. package/lib/table/utils/index.js +33 -11
  181. package/lib/templates/List/index.d.ts +2 -2
  182. package/lib/utils/message.d.ts +3 -0
  183. package/lib/utils/message.js +32 -0
  184. package/package.json +4 -4
  185. package/es/form/Components/Search/index.d.ts +0 -11
  186. package/es/form/Components/Search/index.js +0 -89
  187. package/es/form/SchemaForm/initializeArrayIcon.d.ts +0 -3
  188. package/es/form/SchemaForm/initializeArrayIcon.js +0 -62
  189. package/es/form/SchemaForm/initializeProField.d.ts +0 -5
  190. package/es/form/SchemaForm/initializeProField.js +0 -70
  191. package/es/info/utils/useInfoRequest.d.ts +0 -14
  192. package/es/info/utils/useInfoRequest.js +0 -76
  193. package/lib/form/Components/Search/index.d.ts +0 -11
  194. package/lib/form/Components/Search/index.js +0 -103
  195. package/lib/form/SchemaForm/initializeArrayIcon.d.ts +0 -3
  196. package/lib/form/SchemaForm/initializeArrayIcon.js +0 -73
  197. package/lib/form/SchemaForm/initializeProField.d.ts +0 -5
  198. package/lib/form/SchemaForm/initializeProField.js +0 -77
  199. package/lib/info/utils/useInfoRequest.d.ts +0 -14
  200. package/lib/info/utils/useInfoRequest.js +0 -85
@@ -4,75 +4,82 @@ import { MenuButtonProps } from '@alicloudfe/components/types/menu-button';
4
4
  import { LinkAction } from './link';
5
5
  import { RequestAction } from './request';
6
6
  import { DialogAction } from './dialog';
7
- import { ConfirmAction } from './confirm';
8
- import { DangerConfirmAction } from './danger-confirm';
9
- import { NoticeAction } from './notice';
10
- import { ErrorAction } from './error';
11
7
  import { DialogFormAction } from './dialog-form';
12
8
  import { DialogTableAction } from './dialog-table';
13
9
  import { DialogInfoAction } from './dialog-info';
14
- import { DrawerAction } from './drawer';
15
- import { DrawerFormAction } from './drawer-form';
16
- import { DrawerTableAction } from './drawer-table';
17
- import { DrawerInfoAction } from './drawer-info';
18
10
  import './index.scss';
19
- export declare type ActionConfig = ({
20
- type: 'link';
21
- } & LinkAction) | ({
22
- type: 'request';
23
- } & RequestAction) | ({
24
- type: 'confirm';
25
- } & ConfirmAction) | ({
26
- type: 'danger-confirm';
27
- } & DangerConfirmAction) | ({
28
- type: 'notice';
29
- } & NoticeAction) | ({
30
- type: 'error';
31
- } & ErrorAction) | ({
32
- type: 'dialog';
33
- } & DialogAction) | ({
34
- type: 'dialog-form';
11
+ export declare type ProActionConfig = ({
12
+ type: 'dialog-form' | 'drawer-form';
35
13
  } & DialogFormAction) | ({
36
- type: 'dialog-table';
14
+ type: 'dialog-table' | 'drawer-table';
37
15
  } & DialogTableAction) | ({
38
- type: 'dialog-info';
16
+ type: 'dialog-info' | 'drawer-info';
39
17
  } & DialogInfoAction) | ({
40
- type: 'drawer';
41
- } & DrawerAction) | ({
42
- type: 'drawer-form';
43
- } & DrawerFormAction) | ({
44
- type: 'drawer-table';
45
- } & DrawerTableAction) | ({
46
- type: 'drawer-info';
47
- } & DrawerInfoAction);
18
+ type: 'dialog' | 'drawer' | 'confirm' | 'danger-confirm' | 'notice' | 'error';
19
+ } & DialogAction) | ({
20
+ type: 'request';
21
+ } & RequestAction) | ({
22
+ type: 'link';
23
+ } & LinkAction);
48
24
  export declare function registerActionHandler(id: string, extendActionId: string, defaultConfig: any): void;
49
- export declare const useAction: any;
50
- export interface IActionButton extends ButtonProps {
51
- config?: ActionConfig;
25
+ export declare function useAction(config?: ProActionConfig, context?: any): any;
26
+ export interface ProActionButtonProps extends ButtonProps {
27
+ config?: ProActionConfig;
52
28
  visible?: any;
53
29
  disabled?: any;
54
30
  icon?: string;
55
31
  context?: any;
56
32
  onClick?: (event: React.MouseEvent<Element, MouseEvent>, context?: any) => void;
57
33
  }
58
- export declare const ActionButton: (props: IActionButton) => JSX.Element;
59
- export interface IActionMenuButton extends MenuButtonProps {
60
- actions: ICommonActionButton[];
34
+ export declare const ProActionButton: (props: ProActionButtonProps) => JSX.Element;
35
+ export interface ProActionMenuButtonProps extends MenuButtonProps {
36
+ actions: ProActionProps[];
61
37
  visible?: any;
62
38
  icon?: string;
63
39
  context?: any;
64
40
  }
65
- export declare const ActionMenuButton: (props: IActionMenuButton) => JSX.Element;
66
- export declare type ICommonActionButton = IActionButton | IActionMenuButton;
67
- export declare type ActionGroupProps = {
41
+ export declare const ProActionMenuButton: (props: ProActionMenuButtonProps) => JSX.Element;
42
+ export declare type ProActionProps = ProActionButtonProps | ProActionMenuButtonProps;
43
+ export declare type ProActionGroupProps = {
68
44
  type?: 'button' | 'text';
69
45
  context?: any;
70
- actions: ICommonActionButton[];
46
+ actions: ProActionProps[];
71
47
  max?: number;
72
48
  moreText?: string;
73
49
  divider?: boolean;
74
50
  } & React.HTMLAttributes<HTMLElement>;
75
- export declare function ActionGroup(props: ActionGroupProps): JSX.Element;
76
- export declare type IProAction = ICommonActionButton;
77
- declare const ProAction: (props: IProAction) => JSX.Element;
51
+ export declare function ProActionGroup(props: ProActionGroupProps): JSX.Element;
52
+ declare const ProAction: (props: ProActionProps) => JSX.Element;
78
53
  export default ProAction;
54
+ /**
55
+ * @deprecated 建议使用 ProActionGroup 代替
56
+ */
57
+ export declare const ActionGroup: typeof ProActionGroup;
58
+ /**
59
+ * @deprecated 建议使用 ProActionButton 代替
60
+ */
61
+ export declare const ActionButton: (props: ProActionButtonProps) => JSX.Element;
62
+ /**
63
+ * @deprecated 建议使用 ProActionMenuButton 代替
64
+ */
65
+ export declare const ActionMenuButton: (props: ProActionMenuButtonProps) => JSX.Element;
66
+ /**
67
+ * @deprecated 建议使用 ProActionConfig 代替
68
+ */
69
+ export declare type ActionConfig = ProActionConfig;
70
+ /**
71
+ * @deprecated 建议使用 ProActionButtonProps 代替
72
+ */
73
+ export declare type IActionButton = ProActionButtonProps;
74
+ /**
75
+ * @deprecated 建议使用 ProActionMenuButtonProps 代替
76
+ */
77
+ export declare type IActionMenuButton = ProActionMenuButtonProps;
78
+ /**
79
+ * @deprecated 建议使用 ProActionGroupProps 代替
80
+ */
81
+ export declare type ActionGroupProps = ProActionGroupProps;
82
+ /**
83
+ * @deprecated 建议使用 ProActionProps 代替
84
+ */
85
+ export declare type ICommonActionButton = ProActionProps;
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ActionButton = void 0;
7
- exports.ActionGroup = ActionGroup;
8
- exports.default = exports.ActionMenuButton = void 0;
6
+ exports.ProActionButton = exports.ActionMenuButton = exports.ActionGroup = exports.ActionButton = void 0;
7
+ exports.ProActionGroup = ProActionGroup;
8
+ exports.default = exports.ProActionMenuButton = void 0;
9
9
  exports.registerActionHandler = registerActionHandler;
10
- exports.useAction = void 0;
10
+ exports.useAction = useAction;
11
11
 
12
12
  var _react = _interopRequireDefault(require("react"));
13
13
 
@@ -91,7 +91,7 @@ function registerActionHandler(id, extendActionId, defaultConfig) {
91
91
  });
92
92
  }
93
93
 
94
- var useAction = function useAction(config, context) {
94
+ function useAction(config, context) {
95
95
  if (!config) {
96
96
  return {};
97
97
  }
@@ -164,9 +164,7 @@ var useAction = function useAction(config, context) {
164
164
  return useAction(_objectSpread(_objectSpread({
165
165
  type: registedAction.extendActionId
166
166
  }, registedAction.defaultConfig), others), context);
167
- };
168
-
169
- exports.useAction = useAction;
167
+ }
170
168
 
171
169
  var buttonContent = function buttonContent(content, iconType, iconSize, context) {
172
170
  var renderedContent = typeof content === 'function' ? content(context) : content;
@@ -182,7 +180,7 @@ var buttonContent = function buttonContent(content, iconType, iconSize, context)
182
180
  }), renderedContent];
183
181
  };
184
182
 
185
- var ActionButton = function ActionButton(props) {
183
+ var ProActionButton = function ProActionButton(props) {
186
184
  var config = props.config,
187
185
  icon = props.icon,
188
186
  _props$iconSize = props.iconSize,
@@ -206,7 +204,7 @@ var ActionButton = function ActionButton(props) {
206
204
  }, buttonProps), buttonContent(children, icon, iconSize, context));
207
205
  };
208
206
 
209
- exports.ActionButton = ActionButton;
207
+ exports.ProActionButton = ProActionButton;
210
208
 
211
209
  function renderMenuButtonItem(item, key, context) {
212
210
  var config = item.config,
@@ -249,7 +247,7 @@ function renderCommonActionButtonMenuItem(action, key, context) {
249
247
  return renderMenuButtonItem(action, key, context);
250
248
  }
251
249
 
252
- var ActionMenuButton = function ActionMenuButton(props) {
250
+ var ProActionMenuButton = function ProActionMenuButton(props) {
253
251
  var icon = props.icon,
254
252
  iconSize = props.iconSize,
255
253
  label = props.label,
@@ -277,7 +275,7 @@ var ActionMenuButton = function ActionMenuButton(props) {
277
275
  }; // 如果 actions 数量超过了 max,则把第 max 个和剩余超出部分折叠起来成为一个 menu
278
276
 
279
277
 
280
- exports.ActionMenuButton = ActionMenuButton;
278
+ exports.ProActionMenuButton = ProActionMenuButton;
281
279
 
282
280
  function formatGroupActions(actions, max, moreConfig) {
283
281
  var MAX = max < 1 ? MAX_ACTTIONS : max;
@@ -300,19 +298,13 @@ function renderCommonActionButton(button, context, isTypeText) {
300
298
  var buttonProps = _objectSpread({
301
299
  context: Object.assign({}, context, buttonContext),
302
300
  text: text || isTypeText
303
- }, others); // @ts-ignore
304
-
301
+ }, others);
305
302
 
306
303
  if (!button.actions) {
307
- return (
308
- /*#__PURE__*/
309
- // @ts-ignore
310
- _react.default.createElement(ActionButton, _objectSpread({}, buttonProps))
311
- );
312
- } // @ts-ignore
313
-
304
+ return /*#__PURE__*/_react.default.createElement(ProActionButton, _objectSpread({}, buttonProps));
305
+ }
314
306
 
315
- return /*#__PURE__*/_react.default.createElement(ActionMenuButton, _objectSpread({}, buttonProps));
307
+ return /*#__PURE__*/_react.default.createElement(ProActionMenuButton, _objectSpread({}, buttonProps));
316
308
  }
317
309
 
318
310
  function getDefaultMoreButton(type, moreText) {
@@ -339,9 +331,7 @@ function getDefaultMoreButton(type, moreText) {
339
331
  var MAX_ACTTIONS = 4;
340
332
 
341
333
  function getActionConfig(action, context) {
342
- // @ts-ignore
343
334
  if (action.actions) {
344
- // @ts-ignore
345
335
  var actions = action.actions,
346
336
  _others = _objectWithoutProperties(action, _excluded6);
347
337
 
@@ -350,8 +340,7 @@ function getActionConfig(action, context) {
350
340
  return getActionConfig(a, context);
351
341
  })
352
342
  }, (0, _utils.getTargetValue)(_others, context));
353
- } // @ts-ignore
354
-
343
+ }
355
344
 
356
345
  var config = action.config,
357
346
  others = _objectWithoutProperties(action, _excluded7);
@@ -361,7 +350,7 @@ function getActionConfig(action, context) {
361
350
  }, (0, _utils.getTargetValue)(others, context));
362
351
  }
363
352
 
364
- function ActionGroup(props) {
353
+ function ProActionGroup(props) {
365
354
  var _props$type3 = props.type,
366
355
  type = _props$type3 === void 0 ? 'button' : _props$type3,
367
356
  _props$divider = props.divider,
@@ -383,8 +372,8 @@ function ActionGroup(props) {
383
372
  });
384
373
  var formatedActions = formatGroupActions(filteredActions, max, getDefaultMoreButton(type, moreText));
385
374
  return /*#__PURE__*/_react.default.createElement("div", _objectSpread({
386
- className: (0, _classnames.default)('teamix-pro-actions', type, className, {
387
- divider: divider
375
+ className: (0, _classnames.default)('teamix-pro-actions', "teamix-pro-actions-type-".concat(type), className, {
376
+ 'teamix-pro-actions-divider': type === 'button' ? false : divider
388
377
  })
389
378
  }, containerProps), formatedActions.map(function (actionBtn, i) {
390
379
  var isLastOne = i === formatedActions.length - 1;
@@ -401,4 +390,22 @@ var ProAction = function ProAction(props) {
401
390
  };
402
391
 
403
392
  var _default = ProAction;
404
- exports.default = _default;
393
+ /**
394
+ * @deprecated 建议使用 ProActionGroup 代替
395
+ */
396
+
397
+ exports.default = _default;
398
+ var ActionGroup = ProActionGroup;
399
+ /**
400
+ * @deprecated 建议使用 ProActionButton 代替
401
+ */
402
+
403
+ exports.ActionGroup = ActionGroup;
404
+ var ActionButton = ProActionButton;
405
+ /**
406
+ * @deprecated 建议使用 ProActionMenuButton 代替
407
+ */
408
+
409
+ exports.ActionButton = ActionButton;
410
+ var ActionMenuButton = ProActionMenuButton;
411
+ exports.ActionMenuButton = ActionMenuButton;
@@ -2,7 +2,7 @@
2
2
  display: flex;
3
3
  align-items: center;
4
4
  flex-wrap: wrap;
5
- &.button {
5
+ &.teamix-pro-actions-type-button {
6
6
  & > button {
7
7
  &:not(:last-child) {
8
8
  margin-right: var(--s-2);
@@ -10,7 +10,7 @@
10
10
  }
11
11
  }
12
12
 
13
- &.text:not(.divider) {
13
+ &.teamix-pro-actions-type-text:not(.teamix-pro-actions-divider) {
14
14
  & > button {
15
15
  &:not(:last-child) {
16
16
  margin-right: var(--s-4);
@@ -29,10 +29,45 @@
29
29
  }
30
30
  }
31
31
 
32
+ .teamix-pro-dialog-footer-description {
33
+ position: absolute;
34
+ z-index: 5;
35
+ display: flex;
36
+ align-items: center;
37
+ bottom: var(--dialog-footer-padding-top, 16px);
38
+ height: var(--btn-size-m-height, 32px);
39
+
40
+ &.footer-align-right {
41
+ left: var(--dialog-footer-padding-left-right, 20px);
42
+ }
43
+ &.footer-align-center {
44
+ left: var(--dialog-footer-padding-left-right, 20px);
45
+ }
46
+ &.footer-align-left {
47
+ right: var(--dialog-footer-padding-left-right, 20px);
48
+ }
49
+ }
50
+
51
+ .teamix-pro-action-dialog.has-footer-description {
52
+ .next-message {
53
+ position: static;
54
+ }
55
+ }
56
+
32
57
  .teamix-pro-dialog-before-content {
33
58
  margin-bottom: var(--s-2);
34
59
  }
35
60
 
61
+ .teamix-pro-dialog-message {
62
+ margin-bottom: var(--s-2);
63
+
64
+ &+.next-loading {
65
+ .teamix-pro-form {
66
+ margin-top: 20px;
67
+ }
68
+ }
69
+ }
70
+
36
71
  .teamix-pro-dialog-after-content {
37
72
  margin-top: var(--s-2);
38
73
  }
@@ -40,3 +75,14 @@
40
75
  .next-menu-divider + .next-menu-divider {
41
76
  display: none;
42
77
  }
78
+
79
+ .next-dialog-body {
80
+ .teamix-pro-dialog-footer-description {
81
+ .teamix-pro-form {
82
+ margin-bottom: 0;
83
+ }
84
+ }
85
+ .teamix-pro-form {
86
+ margin-bottom: -20px;
87
+ }
88
+ }
@@ -8,6 +8,8 @@ exports.useLinkAction = useLinkAction;
8
8
 
9
9
  var _utils = require("@teamix/utils");
10
10
 
11
+ var _reactRouterDom = require("react-router-dom");
12
+
11
13
  var _base = require("./base");
12
14
 
13
15
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
@@ -17,9 +19,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
17
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; }
18
20
 
19
21
  function useLinkAction(action, context) {
20
- var linkAction = (0, _utils.getTargetValue)(action, context);
22
+ var history = (0, _reactRouterDom.useHistory)();
21
23
  return _objectSpread({}, (0, _base.eventHandler)(action, function () {
22
- (0, _utils.goToLink)(linkAction);
24
+ var linkAction = (0, _utils.getTargetValue)(action, context);
25
+ (0, _utils.goToLink)(linkAction, history);
23
26
  }));
24
27
  }
25
28
 
@@ -2,7 +2,7 @@ import { CommonRequestConfig } from '@teamix/utils';
2
2
  import { BaseAction } from './base';
3
3
  export interface RequestAction extends CommonRequestConfig, BaseAction {
4
4
  }
5
- export declare function doRequest(action: RequestAction, context?: any, history?: any): Promise<unknown>;
5
+ export declare function doRequest(action: RequestAction, context?: any, history?: any, extraParams?: any): Promise<unknown>;
6
6
  export declare function useRequestAction(action: RequestAction, context?: any): {
7
7
  loading: boolean;
8
8
  };
@@ -41,14 +41,14 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
41
41
  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; }
42
42
 
43
43
  // action 里的数据请求都默认是 post 类型
44
- function doRequest(action, context, history) {
44
+ function doRequest(action, context, history, extraParams) {
45
45
  var _action$method = action.method,
46
46
  method = _action$method === void 0 ? 'post' : _action$method,
47
47
  others = _objectWithoutProperties(action, _excluded);
48
48
 
49
49
  return (0, _utils.doCommonRequest)(_objectSpread({
50
50
  method: method
51
- }, others), context, history);
51
+ }, others), context, history, extraParams);
52
52
  }
53
53
 
54
54
  function useRequestAction(action, context) {
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
2
  import { ActionGroupProps } from '../actions';
3
3
  import './index.scss';
4
- export declare type CardContainerProps = {
4
+ export declare type ProCardContainerProps = {
5
5
  direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
6
6
  spacing?: [number, number] | number;
7
7
  wrap?: boolean;
8
8
  } & React.HTMLAttributes<HTMLElement>;
9
- export declare const CardContainer: React.FC<CardContainerProps>;
10
- export interface CardProps {
9
+ export declare const ProCardContainer: React.FC<ProCardContainerProps>;
10
+ export interface ProCardProps {
11
11
  /** 内容部分 */
12
12
  children?: React.ReactNode;
13
13
  /**卡片标题 */
@@ -43,5 +43,17 @@ export interface CardProps {
43
43
  /**卡片内容样式 */
44
44
  contentStyle?: React.CSSProperties;
45
45
  }
46
- declare const Card: React.FC<CardProps>;
47
- export default Card;
46
+ declare const ProCard: React.FC<ProCardProps>;
47
+ export default ProCard;
48
+ /**
49
+ * @deprecated 建议使用 ProCardContainer 代替
50
+ */
51
+ export declare const CardContainer: React.FC<ProCardContainerProps>;
52
+ /**
53
+ * @deprecated 建议使用 ProCardProps 代替
54
+ */
55
+ export declare type CardProps = ProCardProps;
56
+ /**
57
+ * @deprecated 建议使用 ProCardContainerProps 代替
58
+ */
59
+ export declare type CardContainerProps = ProCardContainerProps;
package/lib/card/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.CardContainer = void 0;
6
+ exports.default = exports.ProCardContainer = exports.CardContainer = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
@@ -59,7 +59,7 @@ function getColClassAndStyle(col) {
59
59
  };
60
60
  }
61
61
 
62
- var CardContainer = function CardContainer(props) {
62
+ var ProCardContainer = function ProCardContainer(props) {
63
63
  var children = props.children,
64
64
  style = props.style,
65
65
  className = props.className,
@@ -108,8 +108,8 @@ var CardContainer = function CardContainer(props) {
108
108
  }, childrenModified);
109
109
  };
110
110
 
111
- exports.CardContainer = CardContainer;
112
- CardContainer.defaultProps = {
111
+ exports.ProCardContainer = ProCardContainer;
112
+ ProCardContainer.defaultProps = {
113
113
  spacing: 16,
114
114
  direction: 'column'
115
115
  };
@@ -120,7 +120,7 @@ var renderExtra = function renderExtra(extra) {
120
120
  }
121
121
 
122
122
  if (extra.actions instanceof Array) {
123
- return /*#__PURE__*/_react.default.createElement(_actions.ActionGroup, _objectSpread(_objectSpread({}, extra), {}, {
123
+ return /*#__PURE__*/_react.default.createElement(_actions.ProActionGroup, _objectSpread(_objectSpread({}, extra), {}, {
124
124
  type: "text"
125
125
  }));
126
126
  }
@@ -128,7 +128,7 @@ var renderExtra = function renderExtra(extra) {
128
128
  return extra;
129
129
  };
130
130
 
131
- var Card = function Card(props) {
131
+ var ProCard = function ProCard(props) {
132
132
  var children = props.children,
133
133
  title = props.title,
134
134
  subTitle = props.subTitle,
@@ -157,7 +157,7 @@ var Card = function Card(props) {
157
157
  component: "img",
158
158
  src: image
159
159
  }), (title || extra) && /*#__PURE__*/_react.default.createElement(_components.Card.Header, {
160
- title: loading ? /*#__PURE__*/_react.default.createElement(_skeleton.BaseSkeleton.Card.Title, null) : title,
160
+ title: loading ? /*#__PURE__*/_react.default.createElement(_skeleton.ProSkeletonRaw.Card.Title, null) : title,
161
161
  subTitle: !loading && subTitle,
162
162
  extra: !loading && renderExtra(extra)
163
163
  }), divider && /*#__PURE__*/_react.default.createElement(_components.Card.Divider, null), /*#__PURE__*/_react.default.createElement(_components.Card.Content, {
@@ -165,14 +165,20 @@ var Card = function Card(props) {
165
165
  centered: centered
166
166
  }),
167
167
  style: contentStyle
168
- }, loading && /*#__PURE__*/_react.default.createElement(_skeleton.BaseSkeleton.Card.Content, null), !loading && children));
168
+ }, loading && /*#__PURE__*/_react.default.createElement(_skeleton.ProSkeletonRaw.Card.Content, null), !loading && children));
169
169
  };
170
170
 
171
- Card.defaultProps = {
171
+ ProCard.defaultProps = {
172
172
  bordered: true,
173
173
  hoveredShadow: false
174
174
  }; // @ts-ignore
175
175
 
176
- Card.isProCard = true;
177
- var _default = Card;
178
- exports.default = _default;
176
+ ProCard.isProCard = true;
177
+ var _default = ProCard;
178
+ /**
179
+ * @deprecated 建议使用 ProCardContainer 代替
180
+ */
181
+
182
+ exports.default = _default;
183
+ var CardContainer = ProCardContainer;
184
+ exports.CardContainer = CardContainer;