@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
package/es/form/utils.js CHANGED
@@ -24,6 +24,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
24
24
 
25
25
  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; }
26
26
 
27
+ import { isVoidField } from '@formily/core';
27
28
  import { useFormLayout, useFormShallowLayout } from '@teamix/formily';
28
29
  import { isArr, isObj, getValueByValue } from '@teamix/utils';
29
30
  import schemaNameMap from './schemaNameMap';
@@ -76,6 +77,42 @@ var mapStatus = function mapStatus(props, field) {
76
77
  });
77
78
  };
78
79
 
80
+ var patchDataSource = function patchDataSource() {
81
+ var dataSource = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
82
+
83
+ var removeEmptyChildren = function removeEmptyChildren(data) {
84
+ var result = _objectSpread({}, data);
85
+
86
+ if (!result.children || result.children.length === 0) {
87
+ delete result.children;
88
+ } else {
89
+ result.children = result.children.map(removeEmptyChildren);
90
+ }
91
+
92
+ return result;
93
+ };
94
+
95
+ return dataSource.map(removeEmptyChildren);
96
+ };
97
+
98
+ var mapDataSource = function mapDataSource(props, field) {
99
+ var _props$dataSource;
100
+
101
+ if (isVoidField(field)) {
102
+ return props;
103
+ }
104
+
105
+ return _objectSpread(_objectSpread({}, props), {}, {
106
+ dataSource: patchDataSource((_props$dataSource = props.dataSource) !== null && _props$dataSource !== void 0 ? _props$dataSource : field === null || field === void 0 ? void 0 : field.dataSource)
107
+ });
108
+ };
109
+
110
+ var mapMode = function mapMode(props, field) {
111
+ return _objectSpread(_objectSpread({}, props), {}, {
112
+ mode: (field === null || field === void 0 ? void 0 : field.readPretty) ? 'read' : 'edit'
113
+ });
114
+ };
115
+
79
116
  var getRandomName = function getRandomName() {
80
117
  var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'name';
81
118
  return "".concat(prefix, "_").concat(Math.floor(Math.random() * Math.pow(10, 18)));
@@ -131,4 +168,4 @@ var mergeArrayValue = function mergeArrayValue(arr, v) {
131
168
  return [].concat(_toConsumableArray(arr), [v]);
132
169
  };
133
170
 
134
- export { getRandomName, mapSize, mapStatus, mergeArrayValue, mapSchemaName };
171
+ export { mapSize, mapStatus, mapDataSource, mapMode, mergeArrayValue, getRandomName, mapSchemaName };
@@ -1,3 +1,3 @@
1
- import type { IInitializeItem } from './typing';
2
- declare const warning: IInitializeItem;
1
+ import type { ProFormInitializeItem } from './typing';
2
+ declare const warning: ProFormInitializeItem;
3
3
  export default warning;
package/es/index.d.ts CHANGED
@@ -21,5 +21,5 @@ export * from './page-container';
21
21
  export * from './page-header';
22
22
  export * from './skeleton';
23
23
  export * from './table';
24
- declare const version = "1.1.35";
24
+ declare const version = "1.1.39";
25
25
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, hooks, nocode, templates, utils, };
package/es/index.js CHANGED
@@ -25,6 +25,6 @@ export * from './page-container';
25
25
  export * from './page-header';
26
26
  export * from './skeleton';
27
27
  export * from './table';
28
- var version = '1.1.35';
28
+ var version = '1.1.39';
29
29
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, // ProLayout,
30
30
  ProPageContainer, ProPageHeader, ProSkeleton, ProTable, hooks, nocode, templates, utils };
@@ -1,35 +1,93 @@
1
- import React, { useRef } from 'react';
1
+ var _excluded = ["children", "url", "method", "params", "formatResult", "onSuccess", "onError", "formatParams", "beforeRequest", "extendParams", "className", "compacted", "divider", "style", "backgroundColor"];
2
+
3
+ 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; }
4
+
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
6
+
7
+ 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; }
8
+
9
+ 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; }
10
+
11
+ 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; }
12
+
13
+ import React, { isValidElement, useRef } from 'react';
2
14
  import { ProInfoGroupContext } from '../../utils';
3
15
  import { useSize } from '@teamix/hooks';
4
16
  import './index.scss';
17
+ import cls from 'classnames';
18
+ import ProInfo from '../..';
5
19
 
6
20
  var ProInfoGroup = function ProInfoGroup(props) {
7
21
  var children = props.children,
8
22
  url = props.url,
9
23
  method = props.method,
10
24
  params = props.params,
11
- formatResult = props.formatResult;
25
+ formatResult = props.formatResult,
26
+ onSuccess = props.onSuccess,
27
+ onError = props.onError,
28
+ formatParams = props.formatParams,
29
+ beforeRequest = props.beforeRequest,
30
+ extendParams = props.extendParams,
31
+ _props$className = props.className,
32
+ className = _props$className === void 0 ? '' : _props$className,
33
+ _props$compacted = props.compacted,
34
+ compacted = _props$compacted === void 0 ? true : _props$compacted,
35
+ _props$divider = props.divider,
36
+ divider = _props$divider === void 0 ? true : _props$divider,
37
+ style = props.style,
38
+ _props$backgroundColo = props.backgroundColor,
39
+ backgroundColor = _props$backgroundColo === void 0 ? '' : _props$backgroundColo,
40
+ others = _objectWithoutProperties(props, _excluded);
41
+
12
42
  var ref = useRef();
13
43
  var size = useSize(ref);
14
- return /*#__PURE__*/React.createElement(ProInfoGroupContext.Provider, {
15
- value: {
16
- visible: true,
17
- size: size,
18
- url: url,
19
- method: method,
20
- params: params,
21
- formatResult: formatResult
44
+ var infoType = 'infoDom';
45
+
46
+ if (Array.isArray(children)) {
47
+ if ( /*#__PURE__*/isValidElement(children === null || children === void 0 ? void 0 : children[0])) {
48
+ infoType = 'infoDomGroup';
49
+ } else {
50
+ infoType = 'infoPropsGroup';
22
51
  }
52
+ }
53
+
54
+ var providerValue = {
55
+ visible: true,
56
+ size: size,
57
+ url: url,
58
+ method: method,
59
+ params: params,
60
+ formatResult: formatResult,
61
+ onSuccess: onSuccess,
62
+ onError: onError,
63
+ formatParams: formatParams,
64
+ beforeRequest: beforeRequest,
65
+ extendParams: extendParams
66
+ };
67
+ var proInfoClassName = cls({
68
+ 'teamix-pro-info-group-item': true,
69
+ 'teamix-pro-info-group-item-divider': divider
70
+ });
71
+ return /*#__PURE__*/React.createElement(ProInfoGroupContext.Provider, {
72
+ value: providerValue
23
73
  }, /*#__PURE__*/React.createElement("div", {
24
- className: "teamix-pro-info-group",
74
+ className: "teamix-pro-info-group ".concat(backgroundColor, " ").concat(className),
75
+ style: style,
25
76
  ref: ref
26
- }, Array.isArray(children) && (children === null || children === void 0 ? void 0 : children.map(function (item, index) {
77
+ }, infoType === 'infoDomGroup' && (children === null || children === void 0 ? void 0 : children.map(function (item, index) {
27
78
  return /*#__PURE__*/React.createElement("div", {
28
- className: "teamix-pro-info-group-item",
79
+ className: proInfoClassName,
29
80
  key: index
30
81
  }, item);
31
- })), !Array.isArray(children) && /*#__PURE__*/React.createElement("div", {
32
- className: "teamix-pro-info-group-item"
82
+ })), infoType === 'infoPropsGroup' && (children === null || children === void 0 ? void 0 : children.map(function (item, index) {
83
+ return /*#__PURE__*/React.createElement("div", {
84
+ className: proInfoClassName,
85
+ key: index
86
+ }, /*#__PURE__*/React.createElement(ProInfo, _objectSpread({
87
+ compacted: compacted
88
+ }, item)));
89
+ })), infoType === 'infoDom' && /*#__PURE__*/React.createElement("div", {
90
+ className: proInfoClassName
33
91
  }, children)));
34
92
  };
35
93
 
@@ -1,14 +1,32 @@
1
1
  .teamix-pro-info-group {
2
2
  &-item {
3
+
3
4
  margin-top: 16px;
4
- border-bottom: 1px solid var(--color-line1-1, #eaeaea);
5
- margin-bottom: 16px;
5
+ margin-bottom: 0;
6
6
 
7
7
  .teamix-pro-info {
8
- padding-bottom: 8px;
8
+ padding-bottom: 0;
9
+
10
+ .teamix-pro-card-content {
11
+ padding-bottom: calc(var(--card-body-padding-bottom, 16px) - 8px)
12
+ }
13
+
14
+ .compacted {
15
+ margin-bottom: -8px;
16
+ }
17
+ }
18
+
19
+ &-divider {
20
+ border-bottom: 1px solid var(--color-line1-1, #eaeaea);
21
+ margin-bottom: 16px;
22
+ .teamix-pro-info {
23
+ padding-bottom: 16px;
24
+ }
9
25
  }
10
26
 
11
27
  }
28
+
29
+
12
30
  .teamix-pro-info-group-item:last-child {
13
31
  border-bottom: 0;
14
32
  margin-bottom: 0;
@@ -19,4 +37,28 @@
19
37
  .teamix-pro-info-group-item:first-child {
20
38
  margin-top: 0;
21
39
  }
40
+
41
+ &.blue {
42
+ background-color: var(--color-notice-1);
43
+ }
44
+
45
+ &.orange {
46
+ background-color: var(--color-warning-1);
47
+ }
48
+
49
+ &.yellow {
50
+ background-color: var(--color-help-1);
51
+ }
52
+
53
+ &.red {
54
+ background-color: var(--color-error-1);
55
+ }
56
+
57
+ &.green {
58
+ background-color: var(--color-success-1);
59
+ }
60
+
61
+ &.grey {
62
+ background-color: var(--color-fill1-2);
63
+ }
22
64
  }
@@ -38,7 +38,7 @@ import React, { useMemo, useState } from 'react';
38
38
  import './index.scss';
39
39
  import ProForm, { createForm, formilyReactive } from '../../../form';
40
40
  import { Message } from '@alicloudfe/components';
41
- import { ActionGroup } from '../../../actions';
41
+ import { ProActionGroup } from '../../../actions';
42
42
  var cls = baseClass('teamix-pro-info');
43
43
  var toJS = formilyReactive.toJS;
44
44
 
@@ -70,7 +70,9 @@ var InfoValueItem = function InfoValueItem(props) {
70
70
  var _processRenderFunctio;
71
71
 
72
72
  if (typeof render === 'function') {
73
- return render;
73
+ return function () {
74
+ render(value, record);
75
+ };
74
76
  }
75
77
 
76
78
  var newRender = processBuriedPoint((_processRenderFunctio = processRenderFunction(render !== null && render !== void 0 ? render : {}, value, record)) !== null && _processRenderFunctio !== void 0 ? _processRenderFunctio : {}, value, record);
@@ -126,11 +128,14 @@ var InfoValueItem = function InfoValueItem(props) {
126
128
 
127
129
  var renderAction = function renderAction() {
128
130
  if (actions) {
129
- return /*#__PURE__*/React.createElement(ActionGroup, {
131
+ return /*#__PURE__*/React.createElement(ProActionGroup, {
130
132
  actions: actions,
131
133
  type: "text",
132
134
  style: {
133
135
  marginLeft: '8px'
136
+ },
137
+ context: {
138
+ record: record
134
139
  }
135
140
  });
136
141
  }
@@ -303,7 +308,7 @@ var InfoValueItem = function InfoValueItem(props) {
303
308
  }
304
309
 
305
310
  return /*#__PURE__*/React.createElement("div", {
306
- className: cls()
311
+ className: cls('item-value')
307
312
  }, /*#__PURE__*/React.createElement(ProField, _objectSpread({
308
313
  type: type,
309
314
  value: value,
@@ -17,5 +17,9 @@
17
17
  }
18
18
  }
19
19
  .teamix-pro-info {
20
- display: flex;
20
+ &-item-value {
21
+ display: flex;
22
+ align-items: center;
23
+ }
24
+
21
25
  }
@@ -1,5 +1,5 @@
1
1
  import { Grid } from '@alicloudfe/components';
2
- import { BaseSkeleton } from '../../..';
2
+ import { ProSkeletonRaw } from '../../..';
3
3
  import { baseClass, Ellipsis, LabelIconTip } from '@teamix/utils';
4
4
  import React from 'react';
5
5
  import './index.scss';
@@ -35,7 +35,7 @@ var ProInfoItem = function ProInfoItem(prop) {
35
35
  className: cls('value')
36
36
  }, loading && /*#__PURE__*/React.createElement("div", {
37
37
  className: cls('base-skeleton-box')
38
- }, /*#__PURE__*/React.createElement(BaseSkeleton.Info, null)), !loading && /*#__PURE__*/React.createElement("div", null, value))));
38
+ }, /*#__PURE__*/React.createElement(ProSkeletonRaw.Info.Item, null)), !loading && /*#__PURE__*/React.createElement("div", null, value))));
39
39
  }
40
40
 
41
41
  if (headerInfoLayout) {
@@ -56,7 +56,7 @@ var ProInfoItem = function ProInfoItem(prop) {
56
56
  }
57
57
  }, loading && /*#__PURE__*/React.createElement("div", {
58
58
  className: cls('base-skeleton-box')
59
- }, /*#__PURE__*/React.createElement(BaseSkeleton.Info, null)), !loading && /*#__PURE__*/React.createElement(React.Fragment, null, value))));
59
+ }, /*#__PURE__*/React.createElement(ProSkeletonRaw.Info.Item, null)), !loading && /*#__PURE__*/React.createElement(React.Fragment, null, value))));
60
60
  }
61
61
 
62
62
  return /*#__PURE__*/React.createElement(React.Fragment, null);
@@ -47,6 +47,7 @@ $item-padding-bottom: 8px;
47
47
  font-size: $header-text-size;
48
48
  display: inline-block;
49
49
  width: 100%;
50
+ padding-right: 20px;
50
51
  }
51
52
 
52
53
  .teamix-pro-field-info-form-item-base-skeleton-box {
@@ -1,8 +1,7 @@
1
1
  import React from 'react';
2
- import { ProInfoBaseProps, ProInfoTransparentBase } from '../../typing';
2
+ import { ProInfoBaseProps, ProInfoTransparentBase, ProInfoTransRequestResult } from '../../typing';
3
3
  import './index.scss';
4
- import { IUseInfoRequestResult } from '../../utils/useInfoRequest';
5
- declare type ProBaseInfoProps = ProInfoBaseProps & IUseInfoRequestResult & ProInfoTransparentBase & {
4
+ declare type ProBaseInfoProps = ProInfoBaseProps & ProInfoTransRequestResult & ProInfoTransparentBase & {
6
5
  size?: any;
7
6
  };
8
7
  declare const ProBaseInfo: React.FC<ProBaseInfoProps>;
@@ -19,28 +19,47 @@ var ProBaseInfo = function ProBaseInfo(props) {
19
19
  actionRef = props.actionRef,
20
20
  layout = props.layout,
21
21
  size = props.size;
22
- var defaultLayout = defaultLayoutMap[getLayout((_size$width = size === null || size === void 0 ? void 0 : size.width) !== null && _size$width !== void 0 ? _size$width : 0)]; // 获取列的布局参数
22
+ var defaultLayout = defaultLayoutMap[getLayout((_size$width = size === null || size === void 0 ? void 0 : size.width) !== null && _size$width !== void 0 ? _size$width : 0)]; // 获取列内的布局参数
23
+
24
+ var getFormItemLayout = function getFormItemLayout(colspan) {
25
+ var formItemLayout = JSON.parse(JSON.stringify(defaultLayout.formItemLayout)); // 自定义布局
23
26
 
24
- var getFormItemLayout = function getFormItemLayout() {
25
27
  if (layout) {
26
28
  var _layout$labelCol, _layout$wrapperCol;
27
29
 
28
- return {
29
- labelCol: (_layout$labelCol = layout === null || layout === void 0 ? void 0 : layout.labelCol) !== null && _layout$labelCol !== void 0 ? _layout$labelCol : defaultLayout.formItemLayout.labelCol,
30
- wrapperCol: (_layout$wrapperCol = layout === null || layout === void 0 ? void 0 : layout.wrapperCol) !== null && _layout$wrapperCol !== void 0 ? _layout$wrapperCol : defaultLayout.formItemLayout.wrapperCol
31
- };
30
+ var labelCol = (_layout$labelCol = layout === null || layout === void 0 ? void 0 : layout.labelCol) !== null && _layout$labelCol !== void 0 ? _layout$labelCol : defaultLayout.formItemLayout.labelCol;
31
+ var wrapperCol = (_layout$wrapperCol = layout === null || layout === void 0 ? void 0 : layout.wrapperCol) !== null && _layout$wrapperCol !== void 0 ? _layout$wrapperCol : defaultLayout.formItemLayout.wrapperCol;
32
+ formItemLayout.labelCol = labelCol;
33
+ formItemLayout.wrapperCol = wrapperCol;
34
+ }
35
+
36
+ var newLabelSpan = formItemLayout.labelCol.span;
37
+ var newWrapperSpan = formItemLayout.wrapperCol.span; // 计算合并列情况。label与wrapper需要重新计算
38
+
39
+ if (colspan) {
40
+ newLabelSpan = newLabelSpan / colspan;
41
+ newWrapperSpan = newWrapperSpan + (formItemLayout.labelCol.span - newLabelSpan);
32
42
  }
33
43
 
34
- return defaultLayout.formItemLayout;
44
+ var newFormItemLayout = {
45
+ labelCol: {
46
+ span: newLabelSpan
47
+ },
48
+ wrapperCol: {
49
+ span: newWrapperSpan
50
+ }
51
+ };
52
+ return Object.assign(formItemLayout, newFormItemLayout);
35
53
  };
36
54
 
37
55
  var renderContent = function renderContent() {
38
56
  return columns.map(function (item, index) {
39
- var _layout$span, _item$title, _item$valueType, _ref;
57
+ var _layout$span, _layout$span2, _item$title, _item$valueType, _ref, _item$colSpan;
40
58
 
41
59
  var span = item.colSpan ? defaultLayout.span * item.colSpan : defaultLayout.span;
60
+ var layoutSpan = item.colSpan ? ((_layout$span = layout === null || layout === void 0 ? void 0 : layout.span) !== null && _layout$span !== void 0 ? _layout$span : span) * item.colSpan : (_layout$span2 = layout === null || layout === void 0 ? void 0 : layout.span) !== null && _layout$span2 !== void 0 ? _layout$span2 : span;
42
61
  return /*#__PURE__*/React.createElement(Col, {
43
- span: (_layout$span = layout === null || layout === void 0 ? void 0 : layout.span) !== null && _layout$span !== void 0 ? _layout$span : span,
62
+ span: layoutSpan,
44
63
  key: index
45
64
  }, /*#__PURE__*/React.createElement(ProInfoItem, {
46
65
  label: (_item$title = item === null || item === void 0 ? void 0 : item.title) !== null && _item$title !== void 0 ? _item$title : '',
@@ -54,7 +73,7 @@ var ProBaseInfo = function ProBaseInfo(props) {
54
73
  record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
55
74
  actionRef: actionRef
56
75
  }),
57
- baseInfoLayout: getFormItemLayout(),
76
+ baseInfoLayout: getFormItemLayout((_item$colSpan = item === null || item === void 0 ? void 0 : item.colSpan) !== null && _item$colSpan !== void 0 ? _item$colSpan : 0),
58
77
  tooltip: item.tooltip,
59
78
  tooltipIcon: item.tooltipIcon
60
79
  }));
@@ -1,8 +1,7 @@
1
1
  import React from 'react';
2
- import { IProHeaderInfo, ProInfoTransparentBase } from '../../typing';
3
- import { IUseInfoRequestResult } from '../../utils/useInfoRequest';
2
+ import { IProHeaderInfo, ProInfoTransparentBase, ProInfoTransRequestResult } from '../../typing';
4
3
  import './index.scss';
5
- declare type ProHeaderInfoProps = IProHeaderInfo & IUseInfoRequestResult & ProInfoTransparentBase & {
4
+ declare type ProHeaderInfoProps = IProHeaderInfo & ProInfoTransRequestResult & ProInfoTransparentBase & {
6
5
  size?: any;
7
6
  };
8
7
  declare const ProHeaderInfo: React.FC<ProHeaderInfoProps>;
@@ -1,8 +1,7 @@
1
1
  import React from 'react';
2
2
  import './index.scss';
3
- import { IProTableInfo, ProInfoTransparentBase } from '../../typing';
3
+ import { IProTableInfo, ProInfoTransparentBase, ProInfoTransRequestResult } from '../../typing';
4
4
  import './index.scss';
5
- import { IUseInfoRequestResult } from '../../utils/useInfoRequest';
6
- declare type ProTableInfoProps = IProTableInfo & IUseInfoRequestResult & ProInfoTransparentBase;
5
+ declare type ProTableInfoProps = IProTableInfo & ProInfoTransRequestResult & ProInfoTransparentBase;
7
6
  declare const ProTableInfo: React.FC<ProTableInfoProps>;
8
7
  export default ProTableInfo;
@@ -22,7 +22,7 @@ import { Table } from '@alicloudfe/components';
22
22
  import './index.scss';
23
23
  import { LabelIconTip } from '@teamix/utils';
24
24
  import InfoValueItem from '../InfoValueItem';
25
- import { BaseSkeleton } from '../../..';
25
+ import { ProSkeletonRaw } from '../../..';
26
26
  import { getDataIndexValue } from '../../utils';
27
27
 
28
28
  var ProTableInfo = function ProTableInfo(props) {
@@ -108,7 +108,7 @@ var ProTableInfo = function ProTableInfo(props) {
108
108
  label: (_item$title = item === null || item === void 0 ? void 0 : item.title) !== null && _item$title !== void 0 ? _item$title : '',
109
109
  tooltip: item.tooltip,
110
110
  icon: item.tooltipIcon
111
- })), _defineProperty(_data, "value_".concat(index), /*#__PURE__*/React.createElement(React.Fragment, null, loading && /*#__PURE__*/React.createElement(BaseSkeleton.Info, null), !loading && getInfoValueItem(item))), _data);
111
+ })), _defineProperty(_data, "value_".concat(index), /*#__PURE__*/React.createElement(React.Fragment, null, loading && /*#__PURE__*/React.createElement(ProSkeletonRaw.Info.Item, null), !loading && getInfoValueItem(item))), _data);
112
112
 
113
113
  if (item.colSpan) {
114
114
  data['formatter'] = {