@teamix/pro 1.2.26 → 1.2.27

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 (69) hide show
  1. package/dist/212.js +129 -129
  2. package/dist/pro.css +1 -1
  3. package/dist/pro.js +18371 -16873
  4. package/dist/pro.min.css +1 -1
  5. package/dist/pro.min.js +1 -1
  6. package/dist/pro.min.js.LICENSE.txt +2 -0
  7. package/es/form/Filter/AdvancedFilter.js +1 -1
  8. package/es/form/Filter/Layout.d.ts +5 -0
  9. package/es/form/Filter/Layout.js +82 -0
  10. package/es/form/Filter/SimpleFilter.js +30 -6
  11. package/es/form/Filter/index2.d.ts +2 -1
  12. package/es/form/Filter/index2.js +97 -116
  13. package/es/form/Filter/index2.scss +16 -45
  14. package/es/form/Filter/layout.scss +36 -0
  15. package/es/form/Filter/useSpecialProps.d.ts +6 -0
  16. package/es/form/Filter/useSpecialProps.js +37 -0
  17. package/es/form/ProForm/customComponent.d.ts +3 -0
  18. package/es/form/ProForm/customComponent.js +20 -0
  19. package/es/form/ProForm/index.scss +5 -6
  20. package/es/form/ProForm/useFormDisplayValues.js +14 -24
  21. package/es/form/SchemaForm/adapterType.js +1 -0
  22. package/es/form/fieldTypeMap.js +2 -1
  23. package/es/form/index.d.ts +4 -2
  24. package/es/form/index.js +4 -2
  25. package/es/form/typing.d.ts +25 -1
  26. package/es/index.d.ts +1 -1
  27. package/es/index.js +1 -1
  28. package/es/info/index.scss +1 -1
  29. package/es/nocode/pages/renderer.js +1 -1
  30. package/es/table/components/Layout/index.js +63 -167
  31. package/es/table/components/Layout/index.scss +4 -3
  32. package/es/table/components/Pagination/index.js +1 -0
  33. package/es/table/components/ToolBar/FullScreenIcon.js +4 -9
  34. package/es/table/components/ToolBar/Fullscreen.js +21 -11
  35. package/es/table/index.js +64 -95
  36. package/es/table/typing.d.ts +12 -10
  37. package/es/table/utils/columnRender.js +21 -3
  38. package/lib/form/Filter/AdvancedFilter.js +1 -1
  39. package/lib/form/Filter/Layout.d.ts +5 -0
  40. package/lib/form/Filter/Layout.js +102 -0
  41. package/lib/form/Filter/SimpleFilter.js +29 -4
  42. package/lib/form/Filter/index2.d.ts +2 -1
  43. package/lib/form/Filter/index2.js +101 -114
  44. package/lib/form/Filter/index2.scss +16 -45
  45. package/lib/form/Filter/layout.scss +36 -0
  46. package/lib/form/Filter/useSpecialProps.d.ts +6 -0
  47. package/lib/form/Filter/useSpecialProps.js +46 -0
  48. package/lib/form/ProForm/customComponent.d.ts +3 -0
  49. package/lib/form/ProForm/customComponent.js +28 -0
  50. package/lib/form/ProForm/index.scss +5 -6
  51. package/lib/form/ProForm/useFormDisplayValues.js +17 -24
  52. package/lib/form/SchemaForm/adapterType.js +1 -0
  53. package/lib/form/fieldTypeMap.js +2 -1
  54. package/lib/form/index.d.ts +4 -2
  55. package/lib/form/index.js +19 -1
  56. package/lib/form/typing.d.ts +25 -1
  57. package/lib/index.d.ts +1 -1
  58. package/lib/index.js +1 -1
  59. package/lib/info/index.scss +1 -1
  60. package/lib/nocode/pages/renderer.js +1 -1
  61. package/lib/table/components/Layout/index.js +61 -167
  62. package/lib/table/components/Layout/index.scss +4 -3
  63. package/lib/table/components/Pagination/index.js +1 -0
  64. package/lib/table/components/ToolBar/FullScreenIcon.js +4 -9
  65. package/lib/table/components/ToolBar/Fullscreen.js +22 -11
  66. package/lib/table/index.js +61 -93
  67. package/lib/table/typing.d.ts +12 -10
  68. package/lib/table/utils/columnRender.js +21 -3
  69. package/package.json +4 -4
@@ -23,28 +23,38 @@ var FullScreen = function FullScreen(props) {
23
23
  var children = props.children,
24
24
  visible = props.visible,
25
25
  actionRef = props.actionRef;
26
+ var _actionRef$current = actionRef.current,
27
+ normalDataFilterForm = _actionRef$current.normalDataFilterForm,
28
+ fullscreenDataFilterForm = _actionRef$current.fullscreenDataFilterForm;
26
29
 
27
30
  function closeByESC(e) {
28
31
  if (visible && e.code === 'Escape') {
29
- var _actionRef$current, _actionRef$current$se, _actionRef$current2, _actionRef$current2$f;
32
+ var _actionRef$current2, _actionRef$current2$s, _actionRef$current3, _actionRef$current3$f;
30
33
 
31
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$se = _actionRef$current.setFullScreenState) === null || _actionRef$current$se === void 0 ? void 0 : _actionRef$current$se.call(_actionRef$current, false);
32
- 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);
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);
33
36
  }
34
37
  } // 监听esc按钮
35
38
 
36
39
 
37
40
  (0, _react.useEffect)(function () {
38
- var _actionRef$current3, _actionRef$current3$s;
41
+ var _actionRef$current4, _actionRef$current4$s;
39
42
 
40
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$s = _actionRef$current3.setFullScreenState) === null || _actionRef$current3$s === void 0 ? void 0 : _actionRef$current3$s.call(_actionRef$current3, visible);
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);
41
44
  window.addEventListener('keydown', closeByESC);
42
45
  return function () {
43
46
  window.removeEventListener('keydown', closeByESC);
44
47
  };
45
- }, [visible]); // 全屏开启之后
48
+ }, [visible]);
49
+
50
+ var afterClose = function afterClose() {
51
+ normalDataFilterForm === null || normalDataFilterForm === void 0 ? void 0 : normalDataFilterForm.setValues(fullscreenDataFilterForm.values);
52
+ }; // 全屏开启之后
53
+
46
54
 
47
55
  var afterOpen = function afterOpen() {
56
+ fullscreenDataFilterForm.setValues(normalDataFilterForm.values);
57
+
48
58
  _components.Message.show({
49
59
  type: 'notice',
50
60
  content: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", null, (0, _utils.getMessage)('press')), /*#__PURE__*/_react.default.createElement("span", {
@@ -56,13 +66,15 @@ var FullScreen = function FullScreen(props) {
56
66
  });
57
67
  };
58
68
 
59
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children, /*#__PURE__*/_react.default.createElement(_components.Overlay, {
69
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children(false), /*#__PURE__*/_react.default.createElement(_components.Overlay, {
60
70
  canCloseByOutSideClick: false,
61
71
  align: "cc cc",
62
72
  cache: true,
63
73
  v2: false,
64
74
  disableScroll: true,
65
75
  shouldUpdatePosition: true,
76
+ afterClose: afterClose,
77
+ afterOpen: afterOpen,
66
78
  animation: {
67
79
  in: 'fadeIn',
68
80
  out: 'fadeOut'
@@ -71,15 +83,14 @@ var FullScreen = function FullScreen(props) {
71
83
  wrapperStyle: {
72
84
  zIndex: 999
73
85
  },
74
- afterOpen: afterOpen,
75
86
  onRequestClose: function onRequestClose() {
76
- var _actionRef$current4, _actionRef$current4$f;
87
+ var _actionRef$current5, _actionRef$current5$f;
77
88
 
78
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : (_actionRef$current4$f = _actionRef$current4.fullScreen) === null || _actionRef$current4$f === void 0 ? void 0 : _actionRef$current4$f.call(_actionRef$current4);
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);
79
90
  }
80
91
  }, /*#__PURE__*/_react.default.createElement("div", {
81
92
  className: "teamix-pro-table-full-screen"
82
- }, children)));
93
+ }, children(true))));
83
94
  };
84
95
 
85
96
  var _default = FullScreen;
@@ -38,8 +38,6 @@ var _form = require("../form");
38
38
 
39
39
  var _actions = require("../actions");
40
40
 
41
- var _lodash = _interopRequireDefault(require("lodash.debounce"));
42
-
43
41
  var _classnames = _interopRequireDefault(require("classnames"));
44
42
 
45
43
  var _pageContainer = _interopRequireDefault(require("../page-container"));
@@ -98,7 +96,9 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
98
96
  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; }
99
97
 
100
98
  var cls = (0, _utils.baseClass)('teamix-pro-table');
101
- var toJS = _form.formilyReactive.toJS;
99
+ var toJS = _form.formilyReactive.toJS; // 判断是否是 root 组织
100
+
101
+ var isRoot = (0, _utils.getCookie)('organizationId') === '1';
102
102
  /**
103
103
  * 处理原生传入的 columns 以便于 选择列 方便处理
104
104
  * @param columns 原生传入的 columns
@@ -106,14 +106,24 @@ var toJS = _form.formilyReactive.toJS;
106
106
  */
107
107
 
108
108
  var processColumns = function processColumns(columns, initialColumns) {
109
+ var _filterColumns;
110
+
109
111
  var filterColumns = columns.filter(function (item) {
110
112
  return item.columnFilters !== false;
111
- }); // 处理只剩一列批量选择的情况下宽度错乱问题
113
+ });
114
+
115
+ if (isRoot) {
116
+ // root 组织下不显示标签管理
117
+ filterColumns = filterColumns.filter(function (item) {
118
+ return item.valueType !== 'selectGroup';
119
+ });
120
+ } // 处理只剩一列批量选择的情况下宽度错乱问题
121
+
112
122
 
113
- if (filterColumns === null || filterColumns === void 0 ? void 0 : filterColumns.length) {
114
- var _initialColumns$;
123
+ if ((_filterColumns = filterColumns) === null || _filterColumns === void 0 ? void 0 : _filterColumns.length) {
124
+ var _filterColumns2, _initialColumns$;
115
125
 
116
- if ((filterColumns === null || filterColumns === void 0 ? void 0 : filterColumns.length) === 1) {
126
+ if (((_filterColumns2 = filterColumns) === null || _filterColumns2 === void 0 ? void 0 : _filterColumns2.length) === 1) {
117
127
  var _filterColumns$, _filterColumns$2;
118
128
 
119
129
  if ((_filterColumns$ = filterColumns[0]) === null || _filterColumns$ === void 0 ? void 0 : _filterColumns$.width) {
@@ -253,10 +263,8 @@ var ProTable = function ProTable(props) {
253
263
  var _useState13 = (0, _react.useState)(true),
254
264
  _useState14 = _slicedToArray(_useState13, 2),
255
265
  customTableLoading = _useState14[0],
256
- setCustomTableLoading = _useState14[1]; // 用于存放 Search 组件之前值的 ref
257
-
266
+ setCustomTableLoading = _useState14[1];
258
267
 
259
- var searchValueRef = (0, _react.useRef)('');
260
268
  var tableRef = (0, _react.useRef)(null);
261
269
  var actionRef = (0, _react.useRef)(); // 传给 table 的过滤后的 columns
262
270
 
@@ -306,20 +314,23 @@ var ProTable = function ProTable(props) {
306
314
  var _useState23 = (0, _react.useState)(false),
307
315
  _useState24 = _slicedToArray(_useState23, 2),
308
316
  fullscreenState = _useState24[0],
309
- setFullscreenState = _useState24[1]; // 整个内容区是否超过一屏。用于表格在非全屏模式下的吸底
317
+ setFullscreenState = _useState24[1]; // 非全屏状态下的
318
+
319
+
320
+ var normalDataFilterFormRef = (0, _react.useRef)();
321
+ var fullscreenDataFilterFormRef = (0, _react.useRef)();
322
+ var normalDataFilterForm = normalDataFilterFormRef.current;
323
+ var fullscreenDataFilterForm = fullscreenDataFilterFormRef.current; // 传给 QueryFilter 的 formRef
310
324
 
325
+ var dataFilterFormRef = fullscreenState ? normalDataFilterFormRef : fullscreenDataFilterFormRef;
326
+ var dataFilterForm = dataFilterFormRef.current; // 整个内容区是否超过一屏。用于表格在非全屏模式下的吸底
311
327
 
312
328
  var _useState25 = (0, _react.useState)(false),
313
329
  _useState26 = _slicedToArray(_useState25, 2),
314
330
  footerSuctionState = _useState26[0],
315
- setFooterSuctionState = _useState26[1];
316
- /** 筛选区域 form */
331
+ setFooterSuctionState = _useState26[1]; // TODO 获取内容区是否超出一屏(暂时仅支持全家桶)
317
332
 
318
333
 
319
- var dataFilterForm = (0, _react.useMemo)(function () {
320
- return (0, _form.createForm)();
321
- }, []); // TODO 获取内容区是否超出一屏(暂时仅支持全家桶)
322
-
323
334
  var getFooterSuctionState = function getFooterSuctionState() {
324
335
  var containerDom = document.querySelector('.teamix-pro-page-container-scroll-container');
325
336
 
@@ -471,18 +482,16 @@ var ProTable = function ProTable(props) {
471
482
  return _request(params);
472
483
  },
473
484
  request: function request(params) {
474
- if (dataFilterForm.validate()) {
475
- // 如果请求中还有翻页相关信息,需要自动设置到指定页
476
- if (params === null || params === void 0 ? void 0 : params[targetPageKey]) {
477
- setCurrentPage(params[targetPageKey]);
478
- }
479
-
480
- if (params === null || params === void 0 ? void 0 : params[targetPageSizeKey]) {
481
- setPageSize(params[targetPageSizeKey]);
482
- }
485
+ // 如果请求中还有翻页相关信息,需要自动设置到指定页
486
+ if (params === null || params === void 0 ? void 0 : params[targetPageKey]) {
487
+ setCurrentPage(params[targetPageKey]);
488
+ }
483
489
 
484
- _request(params);
490
+ if (params === null || params === void 0 ? void 0 : params[targetPageSizeKey]) {
491
+ setPageSize(params[targetPageSizeKey]);
485
492
  }
493
+
494
+ _request(params);
486
495
  },
487
496
  reset: function reset() {
488
497
  var _actionRef$current3, _actionRef$current3$s;
@@ -490,7 +499,7 @@ var ProTable = function ProTable(props) {
490
499
  (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset()); // 清空列过滤参数
491
500
 
492
501
  (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$s = _actionRef$current3.setFilterRules) === null || _actionRef$current3$s === void 0 ? void 0 : _actionRef$current3$s.call(_actionRef$current3, {});
493
- dataFilterForm.reset();
502
+ dataFilterForm === null || dataFilterForm === void 0 ? void 0 : dataFilterForm.reset();
494
503
  setCurrentPage(1);
495
504
 
496
505
  _request(_defineProperty({}, targetPageKey, 1));
@@ -513,6 +522,8 @@ var ProTable = function ProTable(props) {
513
522
  },
514
523
  data: data,
515
524
  dataFilterForm: dataFilterForm,
525
+ normalDataFilterForm: normalDataFilterForm,
526
+ fullscreenDataFilterForm: fullscreenDataFilterForm,
516
527
  resetTableMaxBodyHeight: function resetTableMaxBodyHeight() {
517
528
  getHeaderHeight().then(function (height) {
518
529
  setHeaderHeight(height);
@@ -615,7 +626,7 @@ var ProTable = function ProTable(props) {
615
626
 
616
627
  var sortParams = targetFormatSort(sort); // 筛选区请求参数
617
628
 
618
- var dataFilterParams = toJS(dataFilterForm.values); // 列过滤请求参数
629
+ var dataFilterParams = toJS(dataFilterForm === null || dataFilterForm === void 0 ? void 0 : dataFilterForm.values); // 列过滤请求参数
619
630
 
620
631
  var columnsFilterParams = (_actionRef$current$ge = (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : (_actionRef$current4$g = _actionRef$current4.getFilterRules) === null || _actionRef$current4$g === void 0 ? void 0 : _actionRef$current4$g.call(_actionRef$current4)) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : {}; // 格式化后的请求参数
621
632
 
@@ -684,14 +695,6 @@ var ProTable = function ProTable(props) {
684
695
  _request();
685
696
  }
686
697
 
687
- var searchName = getSearchName();
688
-
689
- if (searchName) {
690
- // 如果有初始值,需要赋值
691
- var initialValues = toJS(dataFilterForm.initialValues);
692
- searchValueRef.current = initialValues[searchName][1];
693
- }
694
-
695
698
  return function () {
696
699
  if (autoRefreshTimerRef.current) {
697
700
  clearTimeout(autoRefreshTimerRef.current);
@@ -711,62 +714,25 @@ var ProTable = function ProTable(props) {
711
714
  setSort(nextSort);
712
715
 
713
716
  _request(targetFormatSort(nextSort));
714
- } // 找到 Search 组件对应的 name
715
-
716
-
717
- var getSearchName = function getSearchName() {
718
- var _dataFilter$schema;
719
-
720
- if ((dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.schema) && ((_dataFilter$schema = dataFilter.schema) === null || _dataFilter$schema === void 0 ? void 0 : _dataFilter$schema.length) > 0) {
721
- var searchSchema = dataFilter.schema.find(function (item) {
722
- return item.component === 'Search';
723
- });
724
-
725
- if (searchSchema) {
726
- var searchName = searchSchema.name;
727
- return searchName;
728
- }
729
- }
730
- }; // 处理 dataFilter 中的 onFilter、onReset
717
+ } // 处理 dataFilter 中的 onFilter、onReset
731
718
 
732
719
 
733
720
  var dataFilter = _objectSpread(_objectSpread({
734
721
  mode: 'inline'
735
722
  }, propsDataFilter), {}, {
736
- onFilter: (0, _lodash.default)(function (values) {
737
- (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter(values));
738
-
739
- if (dataFilterForm.validate()) {
740
- var _actionRef$current5, _actionRef$current5$c;
741
-
742
- /**
743
- * 针对 inline 模式下的 Search 组件做特殊处理
744
- * 当切换条件且输入内容为空的时候,类似[a, ''] => [b, ''] 不触发请求
745
- */
746
- if (dataFilter.mode === 'inline') {
747
- var searchName = getSearchName();
723
+ onFilter: function onFilter(values) {
724
+ var _actionRef$current5, _actionRef$current5$c;
748
725
 
749
- if (searchName) {
750
- var searchValue = values[searchName][1];
726
+ (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter(values)); // 搜索变化时,暂时先清空选择
751
727
 
752
- if (searchValue === (searchValueRef === null || searchValueRef === void 0 ? void 0 : searchValueRef.current)) {
753
- return;
754
- }
755
-
756
- searchValueRef.current = searchValue;
757
- }
758
- } // 搜索变化时,暂时先清空选择
759
-
760
-
761
- (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : (_actionRef$current5$c = _actionRef$current5.clearRowSelection) === null || _actionRef$current5$c === void 0 ? void 0 : _actionRef$current5$c.call(_actionRef$current5);
762
- setCurrentPage(1);
728
+ (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : (_actionRef$current5$c = _actionRef$current5.clearRowSelection) === null || _actionRef$current5$c === void 0 ? void 0 : _actionRef$current5$c.call(_actionRef$current5);
729
+ setCurrentPage(1);
763
730
 
764
- _request(_defineProperty({}, targetPageKey, 1));
765
- }
766
- }, filterDebounce),
731
+ _request(_defineProperty({}, targetPageKey, 1));
732
+ },
767
733
  onReset: function onReset() {
768
734
  (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset());
769
- dataFilterForm.reset();
735
+ dataFilterForm === null || dataFilterForm === void 0 ? void 0 : dataFilterForm.reset();
770
736
  setCurrentPage(1);
771
737
 
772
738
  _request(_defineProperty({}, targetPageKey, 1));
@@ -781,7 +747,7 @@ var ProTable = function ProTable(props) {
781
747
  }
782
748
  };
783
749
 
784
- var renderTable = function renderTable() {
750
+ var renderTable = function renderTable(isFullScreen) {
785
751
  if (propsColumns) {
786
752
  return /*#__PURE__*/_react.default.createElement("div", {
787
753
  className: (0, _classnames.default)('teamix-pro-table-container', className)
@@ -793,7 +759,7 @@ var ProTable = function ProTable(props) {
793
759
  actionRef: actionRef,
794
760
  columns: propsColumns,
795
761
  dataFilter: dataFilter,
796
- dataFilterForm: dataFilterForm,
762
+ dataFilterFormRef: isFullScreen ? fullscreenDataFilterFormRef : normalDataFilterFormRef,
797
763
  rowSelection: rowSelection,
798
764
  filterColumnType: filterColumnType
799
765
  }), /*#__PURE__*/_react.default.createElement(_components.Table.StickyLock, _objectSpread({
@@ -938,14 +904,16 @@ var ProTable = function ProTable(props) {
938
904
  return /*#__PURE__*/_react.default.createElement(_Fullscreen.default, {
939
905
  visible: fullscreenState,
940
906
  actionRef: actionRef
941
- }, /*#__PURE__*/_react.default.createElement("div", {
942
- className: cls({
943
- '': true,
944
- fullscreen: fullscreenState // 'footer-suction': footerSuctionState && footerSuction,
945
-
946
- }),
947
- ref: tableRef
948
- }, renderTable(), footerSuctionState && footerSuction && !fullscreenState && /*#__PURE__*/_react.default.createElement(_pageContainer.default.FixedFooter, null, renderFooter()), !(footerSuctionState && footerSuction) && !fullscreenState && renderFooter(), fullscreenState && renderFooter()));
907
+ }, function (isFullScreen) {
908
+ return /*#__PURE__*/_react.default.createElement("div", {
909
+ className: cls({
910
+ '': true,
911
+ fullscreen: fullscreenState // 'footer-suction': footerSuctionState && footerSuction,
912
+
913
+ }),
914
+ ref: tableRef
915
+ }, renderTable(isFullScreen), footerSuctionState && footerSuction && !fullscreenState && /*#__PURE__*/_react.default.createElement(_pageContainer.default.FixedFooter, null, renderFooter()), !(footerSuctionState && footerSuction) && !fullscreenState && renderFooter(), fullscreenState && renderFooter());
916
+ });
949
917
  };
950
918
 
951
919
  var _default = ProTable;
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { ColumnProps, TableProps } from '@alicloudfe/components/types/table';
5
5
  import { ProFieldType, ProFieldRenderProps, ProFieldDataSourceItem } from '../field';
6
- import { IFilterProps } from '../form';
6
+ import { QueryFilterProps } from '../form';
7
7
  import { ProActionGroupProps, ProActionButtonProps } from '../actions';
8
8
  import { PaginationProps } from '@alicloudfe/components/types/pagination';
9
9
  import { HeaderProps as ProTableHeaderProps } from '@teamix/utils';
@@ -56,6 +56,8 @@ export declare type ProTableColumnProps = {
56
56
  dataIndex?: string | string[];
57
57
  /** 指定 valueType 为日期时间格式时,可以格式化日期时间 */
58
58
  format?: string;
59
+ /** ProField 其他配置项 */
60
+ props?: any;
59
61
  } & Omit<ColumnProps, 'filters' | 'dataIndex' | 'filtersMode'>;
60
62
  export declare type ProColumnProps = ProTableColumnProps;
61
63
  export declare type ProTableProps = {
@@ -105,7 +107,10 @@ export declare type ProTableProps = {
105
107
  footerAction?: ProActionGroupProps | React.ReactNode;
106
108
  /** 表格底部(右层)配置 */
107
109
  footer?: React.ReactNode;
108
- /** 筛选区自动搜索的防抖时间(毫秒) */
110
+ /**
111
+ * @deprecated 已废弃 建议用 dataFilter 中的 filterDebounce 代替
112
+ * 筛选区自动搜索的防抖时间(毫秒)
113
+ */
109
114
  filterDebounce?: number;
110
115
  /** ProTable action 的引用,便于手动触发一些方法 */
111
116
  actionRef?: React.MutableRefObject<ProTableActionType | undefined>;
@@ -185,6 +190,8 @@ export declare type ProTableActionType = {
185
190
  resetPage?: () => void;
186
191
  /** 获取数据过滤区表单实例 */
187
192
  dataFilterForm?: FormType;
193
+ normalDataFilterForm?: FormType;
194
+ fullscreenDataFilterForm?: FormType;
188
195
  /** 表格当前的数据 */
189
196
  data?: any[];
190
197
  } & ProTableActionTypeMutations;
@@ -219,17 +226,12 @@ export declare type ProTableActionTypeState = {
219
226
  [key: string]: any;
220
227
  };
221
228
  export declare type ProTableDataFilterProps = {
222
- /** 展示形式 */
223
- mode?: 'inline' | 'panel';
224
- /** mode='panel' 时是否默认展开 */
225
- expand?: boolean;
226
- /** 搜索时是否传入值为undefined的参数,默认不传 */
227
229
  searchUndefined?: boolean;
228
230
  /** 搜索时是否传入值为空字符串的参数,默认不传 */
229
231
  searchEmptyString?: boolean;
230
232
  /** 自定义内容 */
231
233
  content?: React.ReactNode;
232
- } & IFilterProps;
234
+ } & QueryFilterProps;
233
235
  export declare type dataFilterProps = ProTableDataFilterProps;
234
236
  export declare type ProTableTopAreaProps = {
235
237
  /** 标题区 */
@@ -242,8 +244,8 @@ export declare type ProTableTopAreaProps = {
242
244
  extra?: ProActionButtonProps | React.ReactNode | React.ReactNode[];
243
245
  /** 数据过滤区 */
244
246
  dataFilter?: ProTableDataFilterProps;
245
- /** 数据过滤区 form 表单模型 */
246
- dataFilterForm?: FormType;
247
+ /** 传给 QueryFilter formRef */
248
+ dataFilterFormRef?: any;
247
249
  /** 排序、筛选列展示状态 */
248
250
  filterColumnType?: 'dialog' | 'dropdown' | 'auto';
249
251
  };
@@ -145,7 +145,8 @@ var renderCell = function renderCell(value, item, index, record, actionRef) {
145
145
  }
146
146
 
147
147
  var newRender = null;
148
- var newDataSource = null; // 如果 render 直接传函数
148
+ var newDataSource = null;
149
+ var props = item.props; // 如果 render 直接传函数
149
150
 
150
151
  if (typeof render === 'function') {
151
152
  newRender = function newRender() {
@@ -153,6 +154,23 @@ var renderCell = function renderCell(value, item, index, record, actionRef) {
153
154
  };
154
155
  } else {
155
156
  newRender = processBuriedPoint(processRenderFunction(render, value, index, record), record, value, index);
157
+
158
+ if (valueType === 'selectGroup') {
159
+ newRender = _objectSpread(_objectSpread({
160
+ maxShowNumber: 1,
161
+ foldText: 'more',
162
+ editOnClick: function editOnClick() {},
163
+ edit: true
164
+ }, newRender), {}, {
165
+ ellipsis: false
166
+ });
167
+ props = _objectSpread({
168
+ valueAlias: {
169
+ value: 'TagValue',
170
+ key: 'TagKey'
171
+ }
172
+ }, props);
173
+ }
156
174
  } // 渲染操作组
157
175
 
158
176
 
@@ -195,13 +213,13 @@ var renderCell = function renderCell(value, item, index, record, actionRef) {
195
213
  } // 渲染 ProField
196
214
 
197
215
 
198
- return /*#__PURE__*/_react.default.createElement(_field.default, {
216
+ return /*#__PURE__*/_react.default.createElement(_field.default, _objectSpread({
199
217
  type: valueType || 'text',
200
218
  value: value,
201
219
  render: newRender,
202
220
  dataSource: newDataSource,
203
221
  format: format
204
- });
222
+ }, props));
205
223
  };
206
224
  /**
207
225
  * 处理 render 配置项是函数的情况
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamix/pro",
3
- "version": "1.2.26",
3
+ "version": "1.2.27",
4
4
  "description": "TeamixPro大包",
5
5
  "repository": "http://gitlab.alibaba-inc.com/teamix/pro",
6
6
  "author": "Velociraptor(迅猛龙)",
@@ -22,9 +22,9 @@
22
22
  ],
23
23
  "private": false,
24
24
  "dependencies": {
25
- "@formily/core": "2.0.5",
26
- "@formily/react": "2.0.5",
27
- "@teamix/formily": "2.0.5-2",
25
+ "@formily/core": "2.0.8",
26
+ "@formily/react": "2.0.8",
27
+ "@teamix/formily": "2.0.8",
28
28
  "@teamix/hooks": "^0.1.0",
29
29
  "@teamix/pop-confirm": "^1.2.4",
30
30
  "@teamix/pro-field": "^1.0.0",