@teamix/pro 1.2.29 → 1.2.33

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 (89) hide show
  1. package/dist/pro.css +1 -1
  2. package/dist/pro.js +737 -1579
  3. package/dist/pro.min.css +1 -1
  4. package/dist/pro.min.js +1 -1
  5. package/es/actions/dialog-form.js +58 -9
  6. package/es/common.scss +22 -0
  7. package/es/form/Filter/SimpleFilter.js +10 -3
  8. package/es/form/Filter/index.d.ts +5 -9
  9. package/es/form/Filter/index.js +371 -154
  10. package/es/form/Filter/index.scss +33 -11
  11. package/es/form/Filter/index2.d.ts +9 -5
  12. package/es/form/Filter/index2.js +154 -370
  13. package/es/form/Filter/index2.scss +11 -33
  14. package/es/form/ProForm/index.scss +5 -0
  15. package/es/form/SchemaForm/index.js +4 -4
  16. package/es/form/index.d.ts +3 -3
  17. package/es/form/index.js +3 -3
  18. package/es/form/typing.d.ts +6 -1
  19. package/es/index.d.ts +1 -1
  20. package/es/index.js +1 -1
  21. package/es/info/components/InfoValueItem/index.js +38 -12
  22. package/es/info/components/InfoValueItem/index.scss +1 -0
  23. package/es/info/components/ProInfoItem/index.js +6 -3
  24. package/es/info/components/ProInfoItem/index.scss +9 -0
  25. package/es/info/components/baseInfo/index.js +4 -2
  26. package/es/info/components/headerInfo/index.js +2 -1
  27. package/es/info/components/tableInfo/index.js +2 -1
  28. package/es/info/index.scss +2 -0
  29. package/es/info/typing.d.ts +3 -0
  30. package/es/table/components/Filter/index.js +6 -6
  31. package/es/table/components/Layout/index.js +39 -18
  32. package/es/table/components/Layout/index.scss +7 -0
  33. package/es/table/components/ToolBar/Fullscreen.js +7 -11
  34. package/es/table/components/ToolBar/index.scss +1 -0
  35. package/es/table/index.js +82 -29
  36. package/es/table/index.scss +4 -0
  37. package/es/table/typing.d.ts +2 -2
  38. package/es/table/utils/columnRender.js +1 -1
  39. package/es/table/utils/index.d.ts +2 -1
  40. package/es/table/utils/index.js +62 -113
  41. package/lib/actions/dialog-form.js +57 -10
  42. package/lib/common.scss +22 -0
  43. package/lib/form/Filter/SimpleFilter.js +8 -1
  44. package/lib/form/Filter/index.d.ts +5 -9
  45. package/lib/form/Filter/index.js +384 -154
  46. package/lib/form/Filter/index.scss +33 -11
  47. package/lib/form/Filter/index2.d.ts +9 -5
  48. package/lib/form/Filter/index2.js +154 -383
  49. package/lib/form/Filter/index2.scss +11 -33
  50. package/lib/form/ProForm/index.scss +5 -0
  51. package/lib/form/SchemaForm/index.js +4 -4
  52. package/lib/form/index.d.ts +3 -3
  53. package/lib/form/index.js +8 -8
  54. package/lib/form/typing.d.ts +6 -1
  55. package/lib/index.d.ts +1 -1
  56. package/lib/index.js +1 -1
  57. package/lib/info/components/InfoValueItem/index.js +38 -12
  58. package/lib/info/components/InfoValueItem/index.scss +1 -0
  59. package/lib/info/components/ProInfoItem/index.js +6 -3
  60. package/lib/info/components/ProInfoItem/index.scss +9 -0
  61. package/lib/info/components/baseInfo/index.js +4 -2
  62. package/lib/info/components/headerInfo/index.js +2 -1
  63. package/lib/info/components/tableInfo/index.js +2 -1
  64. package/lib/info/index.scss +2 -0
  65. package/lib/info/typing.d.ts +3 -0
  66. package/lib/table/components/Filter/index.js +6 -6
  67. package/lib/table/components/Layout/index.js +39 -18
  68. package/lib/table/components/Layout/index.scss +7 -0
  69. package/lib/table/components/ToolBar/Fullscreen.js +7 -11
  70. package/lib/table/components/ToolBar/index.scss +1 -0
  71. package/lib/table/index.js +81 -28
  72. package/lib/table/index.scss +4 -0
  73. package/lib/table/typing.d.ts +2 -2
  74. package/lib/table/utils/columnRender.js +1 -1
  75. package/lib/table/utils/index.d.ts +2 -1
  76. package/lib/table/utils/index.js +63 -112
  77. package/package.json +1 -1
  78. package/dist/212.js +0 -155705
  79. package/dist/fonts/codicon.ttf +0 -0
  80. package/es/form/Components/SelectTable/index.d.ts +0 -24
  81. package/es/form/Components/SelectTable/index.js +0 -135
  82. package/es/form/Components/SelectTable/index.scss +0 -28
  83. package/es/form/Components/SelectTable/table.d.ts +0 -6
  84. package/es/form/Components/SelectTable/table.js +0 -64
  85. package/lib/form/Components/SelectTable/index.d.ts +0 -24
  86. package/lib/form/Components/SelectTable/index.js +0 -157
  87. package/lib/form/Components/SelectTable/index.scss +0 -28
  88. package/lib/form/Components/SelectTable/table.d.ts +0 -6
  89. package/lib/form/Components/SelectTable/table.js +0 -76
@@ -242,18 +242,18 @@ var _default = /*#__PURE__*/(0, _react.memo)(function (_ref) {
242
242
  var defaultDecoratorProps = _objectSpread(_objectSpread({}, tooltipProps), decoratorProps); // 初始化request
243
243
 
244
244
 
245
- var _initializeRequest = (0, _initializeRequest2.default)(request, suffix),
245
+ var _initializeRequest = (0, _initializeRequest2.default)(request, "".concat(suffix, "r")),
246
246
  requestReactions = _initializeRequest.reactions,
247
247
  requestScope = _initializeRequest.scope; // 初始化dataSource
248
248
 
249
249
 
250
- var _initializeDataSource = (0, _initializeDataSource2.default)(dataSource, suffix),
250
+ var _initializeDataSource = (0, _initializeDataSource2.default)(dataSource, "".concat(suffix, "d")),
251
251
  defaultDataSource = _initializeDataSource.dataSource,
252
252
  dataSourceReactions = _initializeDataSource.reactions,
253
- dataSourceScope = _initializeDataSource.scope; // 初始化rules
253
+ dataSourceScope = _initializeDataSource.scope; // 初始化rules validator
254
254
 
255
255
 
256
- var _initializeRules = (0, _initializeRules2.default)(rules, suffix),
256
+ var _initializeRules = (0, _initializeRules2.default)(rules, "".concat(suffix, "v")),
257
257
  defaultRules = _initializeRules.rules,
258
258
  rulesScope = _initializeRules.scope; // 合并reactions,初始化reactions
259
259
 
@@ -109,10 +109,10 @@ export { createForm, FormConsumer, FormDialog, FormDrawer, FormStep, FormTab, Fo
109
109
  /**
110
110
  * 导出 Filter 组件
111
111
  */
112
- import { AdvancedFilter, SimpleFilter } from './Filter';
113
- import { QueryFilter } from './Filter/index2';
112
+ import { QueryFilter } from './Filter';
114
113
  import { QueryFilterLayout } from './Filter/Layout';
115
- export { AdvancedFilter, SimpleFilter, QueryFilter, QueryFilterLayout };
114
+ import { AdvancedFilter, SimpleFilter } from './Filter/index2';
115
+ export { QueryFilter, QueryFilterLayout, AdvancedFilter, SimpleFilter };
116
116
  /**
117
117
  * 导出 ProForm 组件,支持快速搭建表单
118
118
  */
package/lib/form/index.js CHANGED
@@ -23,15 +23,15 @@ var _exportNames = {
23
23
  FormConsumer: true,
24
24
  useForm: true,
25
25
  customComponent: true,
26
- AdvancedFilter: true,
27
- SimpleFilter: true,
28
26
  QueryFilter: true,
29
- QueryFilterLayout: true
27
+ QueryFilterLayout: true,
28
+ AdvancedFilter: true,
29
+ SimpleFilter: true
30
30
  };
31
31
  Object.defineProperty(exports, "AdvancedFilter", {
32
32
  enumerable: true,
33
33
  get: function get() {
34
- return _Filter.AdvancedFilter;
34
+ return _index.AdvancedFilter;
35
35
  }
36
36
  });
37
37
  Object.defineProperty(exports, "FormCollapse", {
@@ -73,7 +73,7 @@ Object.defineProperty(exports, "FormTab", {
73
73
  Object.defineProperty(exports, "QueryFilter", {
74
74
  enumerable: true,
75
75
  get: function get() {
76
- return _index.QueryFilter;
76
+ return _Filter.QueryFilter;
77
77
  }
78
78
  });
79
79
  Object.defineProperty(exports, "QueryFilterLayout", {
@@ -85,7 +85,7 @@ Object.defineProperty(exports, "QueryFilterLayout", {
85
85
  Object.defineProperty(exports, "SimpleFilter", {
86
86
  enumerable: true,
87
87
  get: function get() {
88
- return _Filter.SimpleFilter;
88
+ return _index.SimpleFilter;
89
89
  }
90
90
  });
91
91
  Object.defineProperty(exports, "createForm", {
@@ -168,10 +168,10 @@ var _customComponent = require("./ProForm/customComponent");
168
168
 
169
169
  var _Filter = require("./Filter");
170
170
 
171
- var _index = require("./Filter/index2");
172
-
173
171
  var _Layout = require("./Filter/Layout");
174
172
 
173
+ var _index = require("./Filter/index2");
174
+
175
175
  var _ProForm = _interopRequireDefault(require("./ProForm"));
176
176
 
177
177
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -24,7 +24,7 @@ export interface ProFormSchemaItem {
24
24
  name?: string;
25
25
  description?: React.ReactNode;
26
26
  title?: string;
27
- component?: IBaseComponent | IButtonComponent | IComboComponent | ILayoutComponent | 'ProField' | any;
27
+ component?: IBaseComponent | IButtonComponent | IComboComponent | ILayoutComponent | any;
28
28
  props?: AnyObject | any;
29
29
  decorator?: string | null;
30
30
  decoratorProps?: AnyObject;
@@ -88,6 +88,8 @@ export interface QueryFilterProps extends ProFormProps {
88
88
  triggerType?: 'keydown' | 'change' | 'submit';
89
89
  /** 表单展示形式 */
90
90
  mode?: 'inline' | 'panel';
91
+ /** 面板模式下是否仅展示面板 */
92
+ purePanel?: boolean;
91
93
  /** 面板是否默认展开,仅在 mode='panel' 时生效 */
92
94
  expand?: boolean;
93
95
  /** 顶部筛选区前缀 */
@@ -112,6 +114,9 @@ export interface QueryFilterProps extends ProFormProps {
112
114
  /**
113
115
  * 兼容性导出
114
116
  */
117
+ /**
118
+ * @deprecated 将在未来移除该组件,建议使用 QueryFilter 代替
119
+ */
115
120
  export interface IFilterProps extends ProFormProps {
116
121
  triggerType?: 'keydown' | 'change' | 'submit';
117
122
  onFilter?: (values: any) => void;
package/lib/index.d.ts CHANGED
@@ -24,5 +24,5 @@ export * from './skeleton';
24
24
  export * from './table';
25
25
  export * from './utils';
26
26
  export * from './step';
27
- declare const version = "1.2.29";
27
+ declare const version = "1.2.33";
28
28
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProStep, hooks, nocode, templates, utils, };
package/lib/index.js CHANGED
@@ -285,5 +285,5 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
285
285
  // 设置图标源
286
286
  _icon.default.setConfig(_utils.default.getTeamixIconConfig());
287
287
 
288
- var version = '1.2.29';
288
+ var version = '1.2.33';
289
289
  exports.version = version;
@@ -25,7 +25,7 @@ var _components = require("@alicloudfe/components");
25
25
 
26
26
  var _actions = require("../../../actions");
27
27
 
28
- var _excluded = ["type", "value", "render", "infoItem", "record", "actionRef", "dataSource", "context"];
28
+ var _excluded = ["type", "value", "render", "infoItem", "record", "actionRef", "dataSource", "context", "props"];
29
29
 
30
30
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
31
31
 
@@ -41,12 +41,6 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
41
41
 
42
42
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
43
43
 
44
- 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; }
45
-
46
- 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; }
47
-
48
- 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; }
49
-
50
44
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
51
45
 
52
46
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -59,6 +53,12 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
59
53
 
60
54
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
61
55
 
56
+ 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; }
57
+
58
+ 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; }
59
+
60
+ 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; }
61
+
62
62
  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; }
63
63
 
64
64
  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; }
@@ -76,6 +76,7 @@ var InfoValueItem = function InfoValueItem(props) {
76
76
  actionRef = props.actionRef,
77
77
  dataSource = props.dataSource,
78
78
  context = props.context,
79
+ fieldProps = props.props,
79
80
  others = _objectWithoutProperties(props, _excluded);
80
81
 
81
82
  var dataIndex = infoItem.dataIndex,
@@ -89,7 +90,8 @@ var InfoValueItem = function InfoValueItem(props) {
89
90
  _infoItem$successMess = infoItem.successMessage,
90
91
  successMessage = _infoItem$successMess === void 0 ? 'success' : _infoItem$successMess,
91
92
  actions = infoItem.actions,
92
- extra = infoItem.extra; // 获取处理过的 render
93
+ extra = infoItem.extra,
94
+ valueType = infoItem.valueType; // 获取处理过的 render
93
95
 
94
96
  var getRender = function getRender() {
95
97
  var _processRenderFunctio;
@@ -101,7 +103,31 @@ var InfoValueItem = function InfoValueItem(props) {
101
103
  }
102
104
 
103
105
  var newRender = processBuriedPoint((_processRenderFunctio = processRenderFunction(render !== null && render !== void 0 ? render : {}, value, record)) !== null && _processRenderFunctio !== void 0 ? _processRenderFunctio : {}, value, record);
106
+
107
+ if (valueType === 'selectGroup') {
108
+ newRender = _objectSpread(_objectSpread({
109
+ maxShowNumber: 'auto',
110
+ foldText: 'more'
111
+ }, newRender), {}, {
112
+ ellipsis: false
113
+ });
114
+ }
115
+
104
116
  return newRender;
117
+ };
118
+
119
+ var getFieldProps = function getFieldProps() {
120
+ if (valueType === 'selectGroup') {
121
+ return _objectSpread({
122
+ valueAlias: {
123
+ value: 'TagValue',
124
+ key: 'TagKey'
125
+ },
126
+ layout: 'compact'
127
+ }, fieldProps);
128
+ }
129
+
130
+ return fieldProps;
105
131
  }; // 获取处理过的 dataSource
106
132
 
107
133
 
@@ -300,12 +326,12 @@ var InfoValueItem = function InfoValueItem(props) {
300
326
  onMouseLeave: function onMouseLeave() {
301
327
  setEditVisible(false);
302
328
  }
303
- }, /*#__PURE__*/_react.default.createElement(_field.default, _objectSpread({
329
+ }, /*#__PURE__*/_react.default.createElement(_field.default, _objectSpread(_objectSpread({
304
330
  type: type,
305
331
  value: value,
306
332
  render: getRender(),
307
333
  dataSource: getDataSource()
308
- }, others)), /*#__PURE__*/_react.default.createElement(_popConfirm.default, {
334
+ }, others), getFieldProps())), /*#__PURE__*/_react.default.createElement(_popConfirm.default, {
309
335
  visible: popConfirmVisible,
310
336
  content: renderContent(),
311
337
  triggerType: "click",
@@ -332,12 +358,12 @@ var InfoValueItem = function InfoValueItem(props) {
332
358
 
333
359
  return /*#__PURE__*/_react.default.createElement("div", {
334
360
  className: cls('item-value')
335
- }, /*#__PURE__*/_react.default.createElement(_field.default, _objectSpread({
361
+ }, /*#__PURE__*/_react.default.createElement(_field.default, _objectSpread(_objectSpread({
336
362
  type: type,
337
363
  value: value,
338
364
  render: getRender(),
339
365
  dataSource: getDataSource()
340
- }, others)), renderAction(), extra && extra);
366
+ }, others), getFieldProps())), renderAction(), extra && extra);
341
367
  };
342
368
 
343
369
  var _default = InfoValueItem;
@@ -20,6 +20,7 @@
20
20
  &-item-value {
21
21
  display: flex;
22
22
  align-items: center;
23
+ width: 100%;
23
24
  }
24
25
 
25
26
  }
@@ -36,7 +36,8 @@ var ProInfoItem = function ProInfoItem(prop) {
36
36
  return /*#__PURE__*/_react.default.createElement("div", {
37
37
  className: cls()
38
38
  }, /*#__PURE__*/_react.default.createElement(Row, {
39
- gutter: 10
39
+ gutter: 10,
40
+ className: cls('base-row')
40
41
  }, /*#__PURE__*/_react.default.createElement(Col, {
41
42
  span: labelCol === null || labelCol === void 0 ? void 0 : labelCol.span,
42
43
  className: cls('label')
@@ -51,7 +52,7 @@ var ProInfoItem = function ProInfoItem(prop) {
51
52
  className: cls('value')
52
53
  }, loading && /*#__PURE__*/_react.default.createElement("div", {
53
54
  className: cls('base-skeleton-box')
54
- }, /*#__PURE__*/_react.default.createElement(_.ProSkeletonRaw.Info.Item, null)), !loading && /*#__PURE__*/_react.default.createElement("div", null, value))));
55
+ }, /*#__PURE__*/_react.default.createElement(_.ProSkeletonRaw.Info.Item, null)), !loading && value)));
55
56
  }
56
57
 
57
58
  if (headerInfoLayout) {
@@ -59,7 +60,9 @@ var ProInfoItem = function ProInfoItem(prop) {
59
60
  labelGutter = _headerInfoLayout$lab === void 0 ? '16px' : _headerInfoLayout$lab;
60
61
  return /*#__PURE__*/_react.default.createElement("div", {
61
62
  className: cls()
62
- }, /*#__PURE__*/_react.default.createElement(Row, null, /*#__PURE__*/_react.default.createElement("div", {
63
+ }, /*#__PURE__*/_react.default.createElement(Row, {
64
+ className: cls('header-row')
65
+ }, /*#__PURE__*/_react.default.createElement("div", {
63
66
  className: cls('header-label')
64
67
  }, /*#__PURE__*/_react.default.createElement(_utils.LabelIconTip, {
65
68
  label: label,
@@ -17,6 +17,15 @@ $item-padding-bottom: 8px;
17
17
  .teamix-pro-field-info-form-item {
18
18
  width: 100%;
19
19
  padding-bottom: $item-padding-bottom;
20
+
21
+ &-header-row {
22
+ display: flex;
23
+ align-items: center;
24
+ }
25
+ &-base-row {
26
+ display: flex;
27
+ align-items: center;
28
+ }
20
29
  }
21
30
 
22
31
  .teamix-pro-field-info-form-item-label {
@@ -92,7 +92,8 @@ var ProBaseInfo = function ProBaseInfo(props) {
92
92
  infoItem: item,
93
93
  record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
94
94
  actionRef: actionRef,
95
- context: context
95
+ context: context,
96
+ props: item.props
96
97
  }),
97
98
  baseInfoLayout: getFormItemLayout((_item$colSpan = item === null || item === void 0 ? void 0 : item.colSpan) !== null && _item$colSpan !== void 0 ? _item$colSpan : 0),
98
99
  tooltip: item.tooltip,
@@ -103,7 +104,8 @@ var ProBaseInfo = function ProBaseInfo(props) {
103
104
 
104
105
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (size === null || size === void 0 ? void 0 : size.width) && /*#__PURE__*/_react.default.createElement(Row, {
105
106
  wrap: true,
106
- className: "teamix-pro-info-content-row"
107
+ className: "teamix-pro-info-content-row",
108
+ gutter: 20
107
109
  }, renderContent()));
108
110
  };
109
111
 
@@ -68,7 +68,8 @@ var ProHeaderInfo = function ProHeaderInfo(props) {
68
68
  dataSource: item.dataSource,
69
69
  infoItem: item,
70
70
  record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
71
- actionRef: actionRef
71
+ actionRef: actionRef,
72
+ props: item.props
72
73
  }),
73
74
  headerInfoLayout: layout !== null && layout !== void 0 ? layout : defaultLayout,
74
75
  tooltip: item.tooltip,
@@ -85,7 +85,8 @@ var ProTableInfo = function ProTableInfo(props) {
85
85
  dataSource: item.dataSource,
86
86
  infoItem: item,
87
87
  record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
88
- actionRef: actionRef
88
+ actionRef: actionRef,
89
+ props: item.props
89
90
  });
90
91
  };
91
92
 
@@ -1,4 +1,6 @@
1
+ @import '../common.scss';
1
2
  .teamix-pro-info {
3
+ @include hybridcloud-scrollbar;
2
4
  color: var(--color-brand1-6);
3
5
 
4
6
  .teamix-pro-info-content-row {
@@ -94,6 +94,8 @@ export interface ProInfoColumnsProps {
94
94
  actions?: ProActionButtonProps[];
95
95
  /** 追加在列后 */
96
96
  extra?: React.ReactNode;
97
+ /** 其他 ProField 配置 */
98
+ props?: any;
97
99
  }
98
100
  export declare type ProInfoActionType = {
99
101
  /** 刷新Info */
@@ -168,6 +170,7 @@ export declare type InfoValueItemProps = {
168
170
  render?: ProInfoCellRender;
169
171
  dataSource?: ProFieldDataSourceItem[] | ProInfoCellFunProp;
170
172
  context?: object;
173
+ props?: any;
171
174
  } & Omit<ProFieldProps, 'render' | 'dataSource'>;
172
175
  export declare type ProInfoHeaderProps = Omit<ProCardProps, 'loading'>;
173
176
  /** ProInfoGroupContextProps */
@@ -70,10 +70,10 @@ var Filter = function Filter(props) {
70
70
  setVisible = _useState4[1];
71
71
 
72
72
  (0, _react.useEffect)(function () {
73
- var _actionRef$current$ge, _actionRef$current, _actionRef$current$ge2, _actionRef$current$ge3, _actionRef$current$ge4;
73
+ var _actionRef$current$ge, _actionRef$current, _actionRef$current$ge2, _actionRef$current$ge3, _actionRef$current$ge4, _actionRef$current$ge5;
74
74
 
75
75
  // 从全局状态中读取上次存储的条件
76
- var rules = (_actionRef$current$ge = (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$ge2 = _actionRef$current.getState) === null || _actionRef$current$ge2 === void 0 ? void 0 : (_actionRef$current$ge3 = _actionRef$current$ge2.call(_actionRef$current).filterRules) === null || _actionRef$current$ge3 === void 0 ? void 0 : (_actionRef$current$ge4 = _actionRef$current$ge3[column.dataIndex]) === null || _actionRef$current$ge4 === void 0 ? void 0 : _actionRef$current$ge4.rules) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : [];
76
+ var rules = (_actionRef$current$ge = (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$ge2 = _actionRef$current.getState) === null || _actionRef$current$ge2 === void 0 ? void 0 : (_actionRef$current$ge3 = _actionRef$current$ge2.call(_actionRef$current)) === null || _actionRef$current$ge3 === void 0 ? void 0 : (_actionRef$current$ge4 = _actionRef$current$ge3.filterRules) === null || _actionRef$current$ge4 === void 0 ? void 0 : (_actionRef$current$ge5 = _actionRef$current$ge4[column.dataIndex]) === null || _actionRef$current$ge5 === void 0 ? void 0 : _actionRef$current$ge5.rules) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : [];
77
77
  setSelected(rules);
78
78
  }, []); // 获取过滤项
79
79
 
@@ -191,7 +191,7 @@ var Filter = function Filter(props) {
191
191
  btn: true
192
192
  }),
193
193
  onClick: function onClick() {
194
- var _actionRef$current2, _actionRef$current2$f, _actionRef$current$ge5, _actionRef$current3, _actionRef$current3$g, _actionRef$current3$g2, _actionRef$current4, _actionRef$current4$s;
194
+ var _actionRef$current2, _actionRef$current2$f, _actionRef$current$ge6, _actionRef$current3, _actionRef$current3$g, _actionRef$current3$g2, _actionRef$current4, _actionRef$current4$s;
195
195
 
196
196
  (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$f = _actionRef$current2.filterDataSource) === null || _actionRef$current2$f === void 0 ? void 0 : _actionRef$current2$f.call(_actionRef$current2, column.dataIndex); // 先获取此列的param
197
197
 
@@ -206,7 +206,7 @@ var Filter = function Filter(props) {
206
206
  } // 需要带上其他所有的信息
207
207
 
208
208
 
209
- var rules = (_actionRef$current$ge5 = (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$g = _actionRef$current3.getState) === null || _actionRef$current3$g === void 0 ? void 0 : (_actionRef$current3$g2 = _actionRef$current3$g.call(_actionRef$current3)) === null || _actionRef$current3$g2 === void 0 ? void 0 : _actionRef$current3$g2.filterRules) !== null && _actionRef$current$ge5 !== void 0 ? _actionRef$current$ge5 : {}; // 再设置所有的列筛选状态
209
+ var rules = (_actionRef$current$ge6 = (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$g = _actionRef$current3.getState) === null || _actionRef$current3$g === void 0 ? void 0 : (_actionRef$current3$g2 = _actionRef$current3$g.call(_actionRef$current3)) === null || _actionRef$current3$g2 === void 0 ? void 0 : _actionRef$current3$g2.filterRules) !== null && _actionRef$current$ge6 !== void 0 ? _actionRef$current$ge6 : {}; // 再设置所有的列筛选状态
210
210
 
211
211
  (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : (_actionRef$current4$s = _actionRef$current4.setFilterRules) === null || _actionRef$current4$s === void 0 ? void 0 : _actionRef$current4$s.call(_actionRef$current4, _objectSpread(_objectSpread({}, rules), {}, _defineProperty({}, column.dataIndex, {
212
212
  rules: selected,
@@ -239,10 +239,10 @@ var Filter = function Filter(props) {
239
239
  btn: true
240
240
  }),
241
241
  onClick: function onClick() {
242
- var _actionRef$current$ge6, _actionRef$current9, _actionRef$current9$g, _actionRef$current9$g2, _actionRef$current10, _actionRef$current10$, _actionRef$current11, _actionRef$current11$;
242
+ var _actionRef$current$ge7, _actionRef$current9, _actionRef$current9$g, _actionRef$current9$g2, _actionRef$current10, _actionRef$current10$, _actionRef$current11, _actionRef$current11$;
243
243
 
244
244
  setSelected([]);
245
- var rules = (_actionRef$current$ge6 = (_actionRef$current9 = actionRef.current) === null || _actionRef$current9 === void 0 ? void 0 : (_actionRef$current9$g = _actionRef$current9.getState) === null || _actionRef$current9$g === void 0 ? void 0 : (_actionRef$current9$g2 = _actionRef$current9$g.call(_actionRef$current9)) === null || _actionRef$current9$g2 === void 0 ? void 0 : _actionRef$current9$g2.filterRules) !== null && _actionRef$current$ge6 !== void 0 ? _actionRef$current$ge6 : {};
245
+ var rules = (_actionRef$current$ge7 = (_actionRef$current9 = actionRef.current) === null || _actionRef$current9 === void 0 ? void 0 : (_actionRef$current9$g = _actionRef$current9.getState) === null || _actionRef$current9$g === void 0 ? void 0 : (_actionRef$current9$g2 = _actionRef$current9$g.call(_actionRef$current9)) === null || _actionRef$current9$g2 === void 0 ? void 0 : _actionRef$current9$g2.filterRules) !== null && _actionRef$current$ge7 !== void 0 ? _actionRef$current$ge7 : {};
246
246
  (_actionRef$current10 = actionRef.current) === null || _actionRef$current10 === void 0 ? void 0 : (_actionRef$current10$ = _actionRef$current10.setFilterRules) === null || _actionRef$current10$ === void 0 ? void 0 : _actionRef$current10$.call(_actionRef$current10, _objectSpread(_objectSpread({}, rules), {}, _defineProperty({}, column.dataIndex, {
247
247
  rules: [],
248
248
  params: ''
@@ -76,12 +76,27 @@ var Layout = function Layout(props) {
76
76
  context: _objectSpread(_objectSpread({}, defaultContext), mainAction.context)
77
77
  })));
78
78
  } else return mainAction;
79
+ }; // 渲染 addonAfter
80
+
81
+
82
+ var renderAddonAfter = function renderAddonAfter() {
83
+ return /*#__PURE__*/_react.default.createElement("div", {
84
+ className: cls('addon-after-wrapper')
85
+ }, extra && !header && /*#__PURE__*/_react.default.createElement(_QuickAction.default, {
86
+ actionRef: actionRef,
87
+ quickAction: extra,
88
+ rowSelection: rowSelection
89
+ }), /*#__PURE__*/_react.default.createElement(_ToolBar.default, _objectSpread({
90
+ actionRef: actionRef
91
+ }, otherProps)));
79
92
  }; // 渲染新版 QueryFilter
80
93
 
81
94
 
82
95
  var renderQueryFilter = function renderQueryFilter() {
83
- if (dataFilter) {
84
- var _dataFilter$schema;
96
+ var _dataFilter$schema;
97
+
98
+ if (dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema = dataFilter.schema) === null || _dataFilter$schema === void 0 ? void 0 : _dataFilter$schema.length) {
99
+ var _dataFilter$schema2;
85
100
 
86
101
  if ( /*#__PURE__*/(0, _react.isValidElement)(dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.content)) {
87
102
  // 自定义渲染内容
@@ -101,15 +116,9 @@ var Layout = function Layout(props) {
101
116
  },
102
117
  panelContent: dataFilter.content,
103
118
  addonBefore: renderMainAction(),
104
- addonAfter: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, extra && !header && /*#__PURE__*/_react.default.createElement(_QuickAction.default, {
105
- actionRef: actionRef,
106
- quickAction: extra,
107
- rowSelection: rowSelection
108
- }), /*#__PURE__*/_react.default.createElement(_ToolBar.default, _objectSpread({
109
- actionRef: actionRef
110
- }, otherProps)))
119
+ addonAfter: renderAddonAfter()
111
120
  }, dataFilter));
112
- } else if ((dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema = dataFilter.schema) === null || _dataFilter$schema === void 0 ? void 0 : _dataFilter$schema.length) >= 0) {
121
+ } else if ((dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema2 = dataFilter.schema) === null || _dataFilter$schema2 === void 0 ? void 0 : _dataFilter$schema2.length) >= 0) {
113
122
  return /*#__PURE__*/_react.default.createElement(_form.QueryFilter, _objectSpread({
114
123
  formRef: dataFilterFormRef,
115
124
  onExpand: function onExpand(expand) {
@@ -126,15 +135,19 @@ var Layout = function Layout(props) {
126
135
  (dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand) && (dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand(expand));
127
136
  },
128
137
  addonBefore: renderMainAction(),
129
- addonAfter: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, extra && !header && /*#__PURE__*/_react.default.createElement(_QuickAction.default, {
130
- actionRef: actionRef,
131
- quickAction: extra,
132
- rowSelection: rowSelection
133
- }), /*#__PURE__*/_react.default.createElement(_ToolBar.default, _objectSpread({
134
- actionRef: actionRef
135
- }, otherProps)))
138
+ addonAfter: renderAddonAfter()
136
139
  }, dataFilter));
137
140
  }
141
+ } else if (mainAction) {
142
+ // 没传 dataFilter 但是传了 mainAction
143
+ return /*#__PURE__*/_react.default.createElement(_form.QueryFilterLayout, {
144
+ addonBefore: renderMainAction(),
145
+ addonAfter: renderAddonAfter()
146
+ });
147
+ } else {
148
+ return /*#__PURE__*/_react.default.createElement(_form.QueryFilterLayout, {
149
+ addonAfter: renderAddonAfter()
150
+ });
138
151
  }
139
152
  }; // 区域组合渲染
140
153
 
@@ -153,11 +166,19 @@ var Layout = function Layout(props) {
153
166
  rowSelection: rowSelection
154
167
  }))), renderQueryFilter());
155
168
  } else if (header && !mainAction) {
169
+ var _dataFilter$schema3, _dataFilter$schema4;
170
+
156
171
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
157
172
  className: cls('wrapper')
158
173
  }, /*#__PURE__*/_react.default.createElement("div", {
159
174
  className: cls('left')
160
- }, header && /*#__PURE__*/_react.default.createElement(_utils.Header, _objectSpread({}, header)), renderQueryFilter())));
175
+ }, header && /*#__PURE__*/_react.default.createElement(_utils.Header, _objectSpread({}, header)), (dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema3 = dataFilter.schema) === null || _dataFilter$schema3 === void 0 ? void 0 : _dataFilter$schema3.length) && renderQueryFilter()), /*#__PURE__*/_react.default.createElement("div", {
176
+ className: cls('right')
177
+ }, extra && /*#__PURE__*/_react.default.createElement(_QuickAction.default, {
178
+ actionRef: actionRef,
179
+ quickAction: extra,
180
+ rowSelection: rowSelection
181
+ }), !(dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema4 = dataFilter.schema) === null || _dataFilter$schema4 === void 0 ? void 0 : _dataFilter$schema4.length) && renderQueryFilter())));
161
182
  } else if (!header && mainAction) {
162
183
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, renderQueryFilter());
163
184
  } else if (!header && !mainAction) {
@@ -37,4 +37,11 @@ $prefix: 'teamix-pro-table-layout';
37
37
  padding: 16px;
38
38
  background: var(--panel-filter-bg, var(--color-fill1-2));
39
39
  }
40
+ &-main-action {
41
+ margin-bottom: 8px;
42
+ }
43
+ &-addon-after-wrapper {
44
+ display: flex;
45
+ align-items: center;
46
+ }
40
47
  }
@@ -27,25 +27,21 @@ var FullScreen = function FullScreen(props) {
27
27
  normalDataFilterForm = _actionRef$current.normalDataFilterForm,
28
28
  fullscreenDataFilterForm = _actionRef$current.fullscreenDataFilterForm;
29
29
 
30
- function closeByESC(e) {
30
+ var closeByESC = function closeByESC(e) {
31
31
  if (visible && e.code === 'Escape') {
32
- var _actionRef$current2, _actionRef$current2$s, _actionRef$current3, _actionRef$current3$f;
32
+ var _actionRef$current2, _actionRef$current2$f;
33
33
 
34
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$s = _actionRef$current2.setFullScreenState) === null || _actionRef$current2$s === void 0 ? void 0 : _actionRef$current2$s.call(_actionRef$current2, false);
35
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$f = _actionRef$current3.fullScreen) === null || _actionRef$current3$f === void 0 ? void 0 : _actionRef$current3$f.call(_actionRef$current3);
34
+ actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$f = _actionRef$current2.fullScreen) === null || _actionRef$current2$f === void 0 ? void 0 : _actionRef$current2$f.call(_actionRef$current2);
36
35
  }
37
- } // 监听esc按钮
36
+ }; // 监听esc按钮
38
37
 
39
38
 
40
39
  (0, _react.useEffect)(function () {
41
- var _actionRef$current4, _actionRef$current4$s;
42
-
43
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : (_actionRef$current4$s = _actionRef$current4.setFullScreenState) === null || _actionRef$current4$s === void 0 ? void 0 : _actionRef$current4$s.call(_actionRef$current4, visible);
44
40
  window.addEventListener('keydown', closeByESC);
45
41
  return function () {
46
42
  window.removeEventListener('keydown', closeByESC);
47
43
  };
48
- }, [visible]);
44
+ }, [visible, actionRef]);
49
45
 
50
46
  var afterClose = function afterClose() {
51
47
  normalDataFilterForm === null || normalDataFilterForm === void 0 ? void 0 : normalDataFilterForm.setValues(fullscreenDataFilterForm.values);
@@ -84,9 +80,9 @@ var FullScreen = function FullScreen(props) {
84
80
  zIndex: 999
85
81
  },
86
82
  onRequestClose: function onRequestClose() {
87
- var _actionRef$current5, _actionRef$current5$f;
83
+ var _actionRef$current3, _actionRef$current3$f;
88
84
 
89
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : (_actionRef$current5$f = _actionRef$current5.fullScreen) === null || _actionRef$current5$f === void 0 ? void 0 : _actionRef$current5$f.call(_actionRef$current5);
85
+ actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$f = _actionRef$current3.fullScreen) === null || _actionRef$current3$f === void 0 ? void 0 : _actionRef$current3$f.call(_actionRef$current3);
90
86
  }
91
87
  }, /*#__PURE__*/_react.default.createElement("div", {
92
88
  className: "teamix-pro-table-full-screen"
@@ -1,6 +1,7 @@
1
1
  .teamix-pro-table-toolbar {
2
2
  width: 100%;
3
3
  text-align: right;
4
+ margin-bottom: 8px;
4
5
  }
5
6
  .teamix-pro-table-toolbar-custom {
6
7
  display: inline-block;