@teamix/pro 1.4.24 → 1.4.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 (70) hide show
  1. package/dist/pro.css +1 -1
  2. package/dist/pro.js +46014 -34835
  3. package/dist/pro.min.css +1 -1
  4. package/dist/pro.min.js +1 -1
  5. package/dist/pro.min.js.LICENSE.txt +11 -0
  6. package/es/actions/dialog.d.ts +2 -0
  7. package/es/actions/dialog.js +3 -2
  8. package/es/card/index.js +2 -2
  9. package/es/form/Filter/AdvancedFilter.js +8 -2
  10. package/es/form/Filter/layout.scss +1 -1
  11. package/es/form/ProForm/addCascadeEffect.d.ts +2 -0
  12. package/es/form/ProForm/addCascadeEffect.js +225 -0
  13. package/es/form/ProForm/index.js +8 -5
  14. package/es/form/ProForm/index.scss +33 -0
  15. package/es/form/index.d.ts +3 -0
  16. package/es/form/typing.d.ts +20 -0
  17. package/es/index.d.ts +1 -1
  18. package/es/index.js +2 -1
  19. package/es/info/components/InfoValueItem/index.js +15 -4
  20. package/es/info/typing.d.ts +4 -1
  21. package/es/sidebar/components/sidebar-container/index.js +18 -2
  22. package/es/sidebar/components/sidebar-container/index.scss +21 -14
  23. package/es/sidebar/components/tree/index.js +24 -6
  24. package/es/sidebar/components/tree-node/index.js +1 -1
  25. package/es/sidebar/components/tree-node/index.scss +6 -0
  26. package/es/sidebar/typing.d.ts +4 -0
  27. package/es/table/components/Layout/index.scss +1 -1
  28. package/es/table/components/Pagination/index.js +1 -2
  29. package/es/table/components/ToolBar/DensityIcon.js +1 -0
  30. package/es/table/components/ToolBar/FilterColumnIcon.js +2 -0
  31. package/es/table/components/ToolBar/FullScreenIcon.js +6 -57
  32. package/es/table/components/ToolBar/index.d.ts +1 -1
  33. package/es/table/components/ToolBar/index.js +99 -16
  34. package/es/table/components/ToolBar/index.scss +22 -2
  35. package/es/table/index.js +20 -4
  36. package/es/table/index.scss +1 -1
  37. package/es/table/typing.d.ts +4 -1
  38. package/lib/actions/dialog.d.ts +2 -0
  39. package/lib/actions/dialog.js +3 -2
  40. package/lib/card/index.js +2 -2
  41. package/lib/form/Filter/AdvancedFilter.js +7 -1
  42. package/lib/form/Filter/layout.scss +1 -1
  43. package/lib/form/ProForm/addCascadeEffect.d.ts +2 -0
  44. package/lib/form/ProForm/addCascadeEffect.js +235 -0
  45. package/lib/form/ProForm/index.js +9 -5
  46. package/lib/form/ProForm/index.scss +33 -0
  47. package/lib/form/index.d.ts +3 -0
  48. package/lib/form/typing.d.ts +20 -0
  49. package/lib/index.d.ts +1 -1
  50. package/lib/index.js +2 -1
  51. package/lib/info/components/InfoValueItem/index.js +15 -4
  52. package/lib/info/typing.d.ts +4 -1
  53. package/lib/sidebar/components/sidebar-container/index.js +18 -2
  54. package/lib/sidebar/components/sidebar-container/index.scss +21 -14
  55. package/lib/sidebar/components/tree/index.js +24 -6
  56. package/lib/sidebar/components/tree-node/index.js +1 -1
  57. package/lib/sidebar/components/tree-node/index.scss +6 -0
  58. package/lib/sidebar/typing.d.ts +4 -0
  59. package/lib/table/components/Layout/index.scss +1 -1
  60. package/lib/table/components/Pagination/index.js +1 -2
  61. package/lib/table/components/ToolBar/DensityIcon.js +1 -0
  62. package/lib/table/components/ToolBar/FilterColumnIcon.js +2 -0
  63. package/lib/table/components/ToolBar/FullScreenIcon.js +9 -63
  64. package/lib/table/components/ToolBar/index.d.ts +1 -1
  65. package/lib/table/components/ToolBar/index.js +109 -16
  66. package/lib/table/components/ToolBar/index.scss +22 -2
  67. package/lib/table/index.js +20 -4
  68. package/lib/table/index.scss +1 -1
  69. package/lib/table/typing.d.ts +4 -1
  70. package/package.json +2 -2
@@ -131,21 +131,39 @@ var ProSidebarTree = function ProSidebarTree(props) {
131
131
  }, [dataSourceProp]); // 监听展开全部事件
132
132
 
133
133
  useUpdateEffect(function () {
134
+ onChangeExpandAll();
135
+ }, [expandAll]); // 监听展开层级事件
136
+
137
+ useUpdateEffect(function () {
138
+ onChangeExpandLevel();
139
+ }, [expandLevel]); // 监听 DataSource 变化事件
140
+
141
+ useEffect(function () {
142
+ onDataSourceChange === null || onDataSourceChange === void 0 ? void 0 : onDataSourceChange(dataSource); // 更新层级状态
143
+
144
+ if (expandAll) {
145
+ onChangeExpandAll();
146
+ }
147
+
148
+ if (expandLevel > 1) {
149
+ onChangeExpandLevel();
150
+ }
151
+ }, [dataSource]); // 展开全部事件
152
+
153
+ var onChangeExpandAll = function onChangeExpandAll() {
134
154
  if (expandAll) {
135
155
  setExpandedKeys(getAllNodeKey(dataSource));
136
156
  } else {
137
157
  setExpandedKeys([]);
138
158
  }
139
- }, [expandAll]); // 监听展开层级事件
159
+ }; // 展开层级事件
140
160
 
141
- useUpdateEffect(function () {
161
+
162
+ var onChangeExpandLevel = function onChangeExpandLevel() {
142
163
  var keys = getTreeLevelKey(dataSource, expandLevel - 1);
143
164
  setExpandedKeys(keys);
144
- }, [expandLevel]); // 监听 DataSource 变化事件
165
+ }; // 绑定actionRef
145
166
 
146
- useEffect(function () {
147
- onDataSourceChange === null || onDataSourceChange === void 0 ? void 0 : onDataSourceChange(dataSource);
148
- }, [dataSource]); // 绑定actionRef
149
167
 
150
168
  useActionType(actionRef, {
151
169
  setTreeNode: function setTreeNode(treeNode) {
@@ -221,7 +221,7 @@ export function renderTreeNodeDependenceValue(data, onBeforeRenderNodeEvent, che
221
221
  newProps = onBeforeRenderNodeEvent(item, checkedKeys, selectedKeys, allData !== null && allData !== void 0 ? allData : data);
222
222
  }
223
223
 
224
- var _getTreeNodeProps2 = getTreeNodeProps(item),
224
+ var _getTreeNodeProps2 = getTreeNodeProps(newProps),
225
225
  nodeProps = _getTreeNodeProps2.nodeProps,
226
226
  labelProps = _getTreeNodeProps2.labelProps;
227
227
 
@@ -50,6 +50,12 @@
50
50
  font-weight: unset;
51
51
  }
52
52
  }
53
+ // 选中图标变色
54
+ .next-tree-node-inner.next-selected {
55
+ .teamix-icon.teamix-pro-filed-output-prefix-icon {
56
+ color: var(--color-brand1-6) !important;
57
+ }
58
+ }
53
59
  }
54
60
  .teamix-pro-sidebar-deep-1 {
55
61
  .teamix-pro-sidebar-tree {
@@ -88,6 +88,8 @@ export declare type ProSidebarContainerProps = {
88
88
  scrollArea?: 'all' | 'tree';
89
89
  /** 是否显示展开全部 */
90
90
  showExpandAll?: boolean;
91
+ /** 展开全部 状态 */
92
+ expandAllState?: boolean;
91
93
  /** 是否显示展开层级 */
92
94
  showExpandLevel?: boolean;
93
95
  /** 展开全部变化回调 */
@@ -96,6 +98,8 @@ export declare type ProSidebarContainerProps = {
96
98
  onExpandLevelChange?: (state: number) => void;
97
99
  /** 展开层级 层级 */
98
100
  expandLevel?: number;
101
+ /** 展开层级 当前所展示层级 */
102
+ expandLevelState?: number;
99
103
  /** 列表 or tree */
100
104
  isTree?: boolean;
101
105
  } & ProCardProps;
@@ -1,7 +1,7 @@
1
1
  $prefix: 'teamix-pro-table-layout';
2
2
 
3
3
  .theme-hybridcloud-dark {
4
- --panel-filter-bg: #1f1f1f;
4
+ --panel-filter-bg: #141414;
5
5
  }
6
6
 
7
7
  .#{$prefix} {
@@ -1,4 +1,4 @@
1
- var _excluded = ["className", "onChange", "total", "totalRender", "pageSize", "current", "pageSizeList", "pageSizeSelector", "onPageSizeChange", "responsivePaginationType"];
1
+ var _excluded = ["className", "onChange", "total", "pageSize", "current", "pageSizeList", "pageSizeSelector", "onPageSizeChange", "responsivePaginationType"];
2
2
 
3
3
  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; }
4
4
 
@@ -32,7 +32,6 @@ export default (function (props) {
32
32
  var className = props.className,
33
33
  propsOnChange = props.onChange,
34
34
  total = props.total,
35
- totalRender = props.totalRender,
36
35
  pageSize = props.pageSize,
37
36
  current = props.current,
38
37
  pageSizeList = props.pageSizeList,
@@ -77,6 +77,7 @@ var DensityIcon = function DensityIcon(props) {
77
77
  size: "small",
78
78
  type: "space-line"
79
79
  })),
80
+ followTrigger: true,
80
81
  visible: dropdownVisible,
81
82
  onVisibleChange: function onVisibleChange(state) {
82
83
  setTooltipVisible(false);
@@ -265,6 +265,8 @@ var FilterColumnIcon = function FilterColumnIcon(props) {
265
265
  setTooltipVisible(false);
266
266
  setDropdownVisible(state);
267
267
  },
268
+ followTrigger: true,
269
+ cache: true,
268
270
  triggerType: ['click'],
269
271
  align: "tr br"
270
272
  }, /*#__PURE__*/React.createElement("div", {
@@ -1,35 +1,16 @@
1
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
-
3
- 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."); }
4
-
5
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
-
7
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8
-
9
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
10
-
11
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
-
13
1
  /**
14
2
  * 全屏展示 Icon
15
3
  */
16
4
  import { Button } from '@alicloudfe/components';
17
5
  import TeamixIcon from '@teamix/icon';
18
6
  import { usePrefixCls } from '@teamix/utils';
19
- import React, { useEffect, useState } from 'react';
7
+ import React from 'react';
20
8
  import './index.scss';
21
9
  var cls = usePrefixCls('teamix-pro-table-toolbar-icon');
22
10
 
23
11
  var FullScreenIcon = function FullScreenIcon(props) {
24
- var _actionRef$current3, _actionRef$current3$o;
25
-
26
- var actionRef = props.actionRef;
27
-
28
- var _useState = useState(false),
29
- _useState2 = _slicedToArray(_useState, 2),
30
- fullscreen = _useState2[0],
31
- setFullscreen = _useState2[1]; // 点击全屏
32
-
12
+ var actionRef = props.actionRef,
13
+ fullScreenState = props.fullScreenState; // 点击全屏
33
14
 
34
15
  var allScreenHandle = function allScreenHandle() {
35
16
  setTimeout(function () {
@@ -37,48 +18,16 @@ var FullScreenIcon = function FullScreenIcon(props) {
37
18
 
38
19
  (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$fu = _actionRef$current.fullScreen) === null || _actionRef$current$fu === void 0 ? void 0 : _actionRef$current$fu.call(_actionRef$current);
39
20
  }, 0);
40
- }; // 销毁监听函数
41
-
42
-
43
- useEffect(function () {
44
- return function () {
45
- var _actionRef$current2, _actionRef$current2$o;
46
-
47
- (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$o = _actionRef$current2.off) === null || _actionRef$current2$o === void 0 ? void 0 : _actionRef$current2$o.call(_actionRef$current2, 'fullscreenIcon');
48
- };
49
- }, []); // 监听全屏变化
21
+ };
50
22
 
51
- (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$o = _actionRef$current3.on) === null || _actionRef$current3$o === void 0 ? void 0 : _actionRef$current3$o.call(_actionRef$current3, function (state) {
52
- // console.log('dataFilterForm', actionRef.current?.dataFilterForm);
53
- setFullscreen(state); // actionRef.current?.dataFilterForm?.setValues(formValues);
54
- }, 'fullScreenState', 'fullscreenIcon');
55
23
  return /*#__PURE__*/React.createElement(Button, {
56
24
  iconSize: "small",
57
25
  className: cls(),
58
26
  onClick: allScreenHandle
59
27
  }, /*#__PURE__*/React.createElement(TeamixIcon, {
60
28
  size: "small",
61
- type: fullscreen ? 'close-line' : 'full-screen-line'
62
- })) // <Balloon.Tooltip
63
- // trigger={
64
- // <Button iconSize="small" className={cls()} onClick={allScreenHandle}>
65
- // <TeamixIcon
66
- // size="small"
67
- // type={fullscreen ? 'close-line' : 'full-screen-line'}
68
- // />
69
- // </Button>
70
- // }
71
- // align={fullscreen ? 'b' : 't'}
72
- // popupProps={{
73
- // visible: visible,
74
- // onVisibleChange: (state) => {
75
- // setVisible(state);
76
- // },
77
- // }}
78
- // >
79
- // {getMessage('fullScreen')}
80
- // </Balloon.Tooltip>
81
- ;
29
+ type: fullScreenState ? 'close-line' : 'full-screen-line'
30
+ }));
82
31
  };
83
32
 
84
33
  export default FullScreenIcon;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import './index.scss';
3
2
  import { ProTableLayoutProps } from '../../typing';
3
+ import './index.scss';
4
4
  declare const ToolBar: React.FC<ProTableLayoutProps>;
5
5
  export default ToolBar;
@@ -4,12 +4,28 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
4
4
 
5
5
  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; }
6
6
 
7
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+
9
+ 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."); }
10
+
11
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
12
+
13
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
14
+
15
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
16
+
17
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
+
7
19
  import { usePrefixCls } from '@teamix/utils';
8
- import React from 'react';
20
+ import React, { useEffect, useRef } from 'react';
21
+ import { Button, Balloon } from '@alicloudfe/components';
22
+ import TeamixIcon from '@teamix/icon';
9
23
  import FullScreenIcon from './FullScreenIcon';
10
24
  import FilterColumnIcon from './FilterColumnIcon';
11
25
  import DensityIcon from './DensityIcon';
12
26
  import RefreshIcon from './RefreshIcon';
27
+ import { useSize, useSafeState } from '@teamix/hooks';
28
+ import debounce from 'lodash.debounce';
13
29
  import './index.scss';
14
30
  var cls = usePrefixCls('teamix-pro-table-toolbar');
15
31
  var presetToolBarMap = {
@@ -38,7 +54,46 @@ var presetToolBar = [{
38
54
  }];
39
55
 
40
56
  var ToolBar = function ToolBar(props) {
41
- var toolBar = props.toolBar;
57
+ var _toolBarRef$current, _toolBarRef$current$p, _toolBarRef$current$p2;
58
+
59
+ var toolBar = props.toolBar,
60
+ fullScreenState = props.fullScreenState;
61
+ var toolBarRef = useRef(null); // const toolBarSize = useSize(toolBarRef);
62
+ // 用于获取内容宽度
63
+
64
+ var toolBarContentRef = useRef(null); // '.teamix-pro-form-query-filter-layout-inline' 元素
65
+
66
+ var layoutInlineDom = (_toolBarRef$current = toolBarRef.current) === null || _toolBarRef$current === void 0 ? void 0 : (_toolBarRef$current$p = _toolBarRef$current.parentElement) === null || _toolBarRef$current$p === void 0 ? void 0 : (_toolBarRef$current$p2 = _toolBarRef$current$p.parentElement) === null || _toolBarRef$current$p2 === void 0 ? void 0 : _toolBarRef$current$p2.parentElement; // 监听它的尺寸变化
67
+
68
+ var layoutInlineSize = useSize(layoutInlineDom); // '.teamix-pro-form-query-filter-layout-left' 元素
69
+
70
+ var layoutLeftDom = layoutInlineDom === null || layoutInlineDom === void 0 ? void 0 : layoutInlineDom.firstElementChild;
71
+ var leftWidth = layoutLeftDom === null || layoutLeftDom === void 0 ? void 0 : layoutLeftDom.clientWidth; // 展示形式,是否平铺
72
+
73
+ var _useSafeState = useSafeState(),
74
+ _useSafeState2 = _slicedToArray(_useSafeState, 2),
75
+ flat = _useSafeState2[0],
76
+ setFlat = _useSafeState2[1]; // 监听高度,> 32px则切换形态
77
+
78
+
79
+ useEffect(debounce(function () {
80
+ // console.log(
81
+ // layoutInlineSize?.width,
82
+ // leftWidth,
83
+ // toolBarContentRef.current?.clientWidth,
84
+ // );
85
+ if ((layoutInlineSize === null || layoutInlineSize === void 0 ? void 0 : layoutInlineSize.width) && leftWidth && toolBarContentRef.current) {
86
+ var _toolBarContentRef$cu;
87
+
88
+ var width = layoutInlineSize.width; // console.log('layoutInlineSize-width', width);
89
+
90
+ if (width - leftWidth <= ((_toolBarContentRef$cu = toolBarContentRef.current) === null || _toolBarContentRef$cu === void 0 ? void 0 : _toolBarContentRef$cu.clientWidth) + 8) {
91
+ setFlat(false);
92
+ } else {
93
+ setFlat(true);
94
+ }
95
+ }
96
+ }, 300));
42
97
  var toolBarList = toolBar !== false ? presetToolBar : [];
43
98
 
44
99
  if (Array.isArray(toolBar)) {
@@ -59,21 +114,49 @@ var ToolBar = function ToolBar(props) {
59
114
  });
60
115
  }
61
116
 
117
+ var renderFlatShape = function renderFlatShape() {
118
+ return /*#__PURE__*/React.createElement("div", {
119
+ className: cls('content')
120
+ }, toolBarList.map(function (_ref) {
121
+ var type = _ref.type,
122
+ name = _ref.name,
123
+ Component = _ref.component;
124
+ return /*#__PURE__*/React.createElement("span", {
125
+ className: cls('item', _defineProperty({}, name, true)),
126
+ key: name
127
+ }, type === 'preset' && /*#__PURE__*/React.createElement(Component, _objectSpread({}, props)), type === 'custom' && /*#__PURE__*/React.createElement("div", {
128
+ className: cls({
129
+ custom: true
130
+ })
131
+ }, Component));
132
+ }));
133
+ };
134
+
135
+ var renderUnFlatShape = function renderUnFlatShape() {
136
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Balloon.Tooltip, {
137
+ triggerType: ['click'],
138
+ popupProps: {
139
+ cache: true
140
+ },
141
+ style: {
142
+ padding: 8
143
+ },
144
+ trigger: /*#__PURE__*/React.createElement(Button, null, /*#__PURE__*/React.createElement(TeamixIcon, {
145
+ type: "more-line"
146
+ })),
147
+ align: "tr"
148
+ }, renderFlatShape()));
149
+ };
150
+
62
151
  return /*#__PURE__*/React.createElement("div", {
63
- className: cls()
64
- }, toolBarList.map(function (_ref) {
65
- var type = _ref.type,
66
- name = _ref.name,
67
- Component = _ref.component;
68
- return /*#__PURE__*/React.createElement("span", {
69
- className: cls(_defineProperty({}, name, true)),
70
- key: name
71
- }, type === 'preset' && /*#__PURE__*/React.createElement(Component, _objectSpread({}, props)), type === 'custom' && /*#__PURE__*/React.createElement("div", {
72
- className: cls({
73
- custom: true
74
- })
75
- }, Component));
76
- }));
152
+ className: cls('', {
153
+ flat: flat
154
+ }),
155
+ ref: toolBarRef
156
+ }, !flat && !fullScreenState ? renderUnFlatShape() : renderFlatShape(), /*#__PURE__*/React.createElement("div", {
157
+ className: cls('shadow'),
158
+ ref: toolBarContentRef
159
+ }, renderFlatShape()));
77
160
  };
78
161
 
79
162
  export default ToolBar;
@@ -2,20 +2,40 @@
2
2
  width: 100%;
3
3
  text-align: right;
4
4
  margin-bottom: 8px;
5
+ &-flat {
6
+ margin-left: 8px;
7
+ }
8
+ &-item {
9
+ display: inline-block;
10
+ &:not(:first-child) {
11
+ margin-left: 8px;
12
+ }
13
+ }
14
+ &-content {
15
+ display: flex;
16
+ }
17
+ &-shadow {
18
+ visibility: hidden;
19
+ pointer-events: none;
20
+ opacity: 0;
21
+ height: 0px;
22
+ position: absolute;
23
+ z-index: -1;
24
+ overflow: hidden;
25
+ }
5
26
  }
6
27
  .teamix-pro-table-toolbar-custom {
7
28
  display: inline-block;
8
- margin-left: 8px;
9
29
  }
10
30
 
11
31
  // FullScreen
12
32
  .teamix-pro-table-toolbar-icon {
13
- margin-left: 8px;
14
33
  i {
15
34
  color: var(--color-fill1-6, #848484);
16
35
  }
17
36
  }
18
37
 
38
+
19
39
  // FilterColumn
20
40
  .teamix-pro-table-toolbar-filter-column {
21
41
  min-width: 180px;
package/es/table/index.js CHANGED
@@ -1,4 +1,4 @@
1
- var _excluded = ["header", "className", "tableClassName", "mainAction", "extra", "dataFilter", "afterDataFilter", "toolBar", "columns", "useRowSelection", "rowSelection", "onChangeRowSelection", "getRowSelection", "primaryKey", "footerAction", "footer", "url", "pageKey", "pageSizeKey", "method", "params", "formatSort", "formatParams", "formatResult", "requestWhenMount", "showPagination", "pageSizeList", "responsivePaginationType", "showSkeleton", "skeletonSize", "actionRef", "dataSource", "filterDebounce", "footerSuction", "autoRefresh", "customRequest", "filterColumnType", "defaultFilterParams", "reserveSelectedRecords", "size", "disableSelectAll", "context", "fixedTableBody", "isTree"];
1
+ var _excluded = ["header", "className", "tableClassName", "mainAction", "extra", "dataFilter", "afterDataFilter", "toolBar", "columns", "useRowSelection", "rowSelection", "onChangeRowSelection", "getRowSelection", "primaryKey", "footerAction", "footer", "url", "pageKey", "pageSizeKey", "method", "params", "formatSort", "formatParams", "formatResult", "requestConfig", "requestWhenMount", "showPagination", "pageSizeList", "responsivePaginationType", "showSkeleton", "skeletonSize", "actionRef", "dataSource", "filterDebounce", "footerSuction", "autoRefresh", "customRequest", "filterColumnType", "defaultFilterParams", "reserveSelectedRecords", "size", "disableSelectAll", "context", "fixedTableBody", "isTree"];
2
2
 
3
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
4
 
@@ -142,6 +142,7 @@ var ProTable = function ProTable(props) {
142
142
  return params;
143
143
  } : _props$formatParams,
144
144
  formatResult = props.formatResult,
145
+ requestConfig = props.requestConfig,
145
146
  _props$requestWhenMou = props.requestWhenMount,
146
147
  requestWhenMount = _props$requestWhenMou === void 0 ? true : _props$requestWhenMou,
147
148
  _props$showPagination = props.showPagination,
@@ -682,7 +683,8 @@ var ProTable = function ProTable(props) {
682
683
  }, {
683
684
  // 使用 request 方法代替 fetch
684
685
  requestMethod: function requestMethod(params) {
685
- return utilResquest(params);
686
+ // 支持使用 requestConfig 自定义请求配置
687
+ return utilResquest(_objectSpread(_objectSpread({}, params), requestConfig));
686
688
  },
687
689
  manual: true,
688
690
  onSuccess: function onSuccess(result) {
@@ -862,6 +864,7 @@ var ProTable = function ProTable(props) {
862
864
 
863
865
  (_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : (_actionRef$current6$c = _actionRef$current6.clearRowSelection) === null || _actionRef$current6$c === void 0 ? void 0 : _actionRef$current6$c.call(_actionRef$current6);
864
866
  setCurrentPage(1);
867
+ console.log('currentPageSize1', pageSize);
865
868
 
866
869
  _request(_defineProperty({}, targetPageKey, 1), false, values);
867
870
  },
@@ -871,6 +874,7 @@ var ProTable = function ProTable(props) {
871
874
  (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset());
872
875
  (_dataFilterFormRef$cu3 = dataFilterFormRef.current) === null || _dataFilterFormRef$cu3 === void 0 ? void 0 : _dataFilterFormRef$cu3.reset();
873
876
  setCurrentPage(1);
877
+ console.log('currentPageSize2', pageSize);
874
878
 
875
879
  _request(_defineProperty({}, targetPageKey, 1), false, values);
876
880
  }
@@ -902,7 +906,8 @@ var ProTable = function ProTable(props) {
902
906
  afterDataFilter: afterDataFilter,
903
907
  dataFilterFormRef: isFullScreen ? fullscreenDataFilterFormRef : normalDataFilterFormRef,
904
908
  rowSelection: rowSelection,
905
- filterColumnType: filterColumnType
909
+ filterColumnType: filterColumnType,
910
+ fullScreenState: isFullScreen
906
911
  }), /*#__PURE__*/React.createElement(Table.StickyLock, _objectSpread({
907
912
  hasBorder: false,
908
913
  dataSource: showSkeleton ? skeletonDataSource : data || props.dataSource,
@@ -1008,13 +1013,24 @@ var ProTable = function ProTable(props) {
1008
1013
  count: selectedCount
1009
1014
  })));
1010
1015
  }
1016
+ } else if (footerAction) {
1017
+ if (showSkeleton) {
1018
+ return /*#__PURE__*/React.createElement("div", {
1019
+ className: cls('footer-left-wrapper')
1020
+ }, /*#__PURE__*/React.createElement(Skeleton.Footer.Operation, null));
1021
+ } else {
1022
+ return /*#__PURE__*/React.createElement("div", {
1023
+ className: cls('footer-left-wrapper')
1024
+ }, footerAction && renderFooterAction());
1025
+ }
1011
1026
  }
1012
1027
  }
1013
1028
 
1014
1029
  if (showPagination) {
1015
1030
  return /*#__PURE__*/React.createElement("div", {
1016
1031
  className: cls('footer', {
1017
- 'footer-has-rowSelection': rowSelection
1032
+ 'footer-has-rowSelection': rowSelection,
1033
+ 'footer-has-action': footerAction
1018
1034
  })
1019
1035
  }, renderRowSelection(), /*#__PURE__*/React.createElement("div", {
1020
1036
  className: cls('footer-right-wrapper')
@@ -16,7 +16,7 @@ $fullscreenPadding: 24px;
16
16
  box-shadow: var(--shadow-1-up);
17
17
  background: var(--color-fill1-1);
18
18
  }
19
- &-footer-has-rowSelection {
19
+ &-footer-has-rowSelection, &-footer-has-action {
20
20
  display: flex;
21
21
  align-items: center;
22
22
  padding: 8px 0;
@@ -7,7 +7,7 @@ import { QueryFilterProps, ProFormType } 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 '../field';
10
- import { Method } from 'axios';
10
+ import { Method, AxiosRequestConfig } from 'axios';
11
11
  import React from 'react';
12
12
  declare type IFieldRenderProps = keyof ProFieldRenderProps;
13
13
  /** 列record函数 */
@@ -86,6 +86,8 @@ export declare type ProTableProps = {
86
86
  onSuccess?: (res: any) => void;
87
87
  /** 内部请求失败时的回调 */
88
88
  onError?: (error: Error) => void;
89
+ /** 自定义的请求配置 */
90
+ requestConfig?: AxiosRequestConfig;
89
91
  /** 翻页页数的请求参数名 */
90
92
  pageKey?: string;
91
93
  /** 翻页器页数对应字段 */
@@ -274,6 +276,7 @@ export declare type ProTableLayoutProps = {
274
276
  actionRef: React.MutableRefObject<ProTableActionType | undefined>;
275
277
  columns?: ProTableColumnProps[];
276
278
  rowSelection?: innerRowSelectionType | rowSelectionType;
279
+ fullScreenState?: boolean;
277
280
  } & ProTableTopAreaProps;
278
281
  /** columns 列过滤 */
279
282
  export declare type ProTableColumnsFilterItemProps = {
@@ -31,6 +31,8 @@ export interface DialogAction extends Omit<RequestAction, 'url'>, Omit<QuickShow
31
31
  onCancel?: any;
32
32
  /** 隐藏footer区域 */
33
33
  hideFooter?: boolean;
34
+ /** 支持通过传函数自定义底部按钮 */
35
+ footer?: any;
34
36
  }
35
37
  export declare function useDialogAction(action: DialogAction, actionContext?: any, hasForm?: boolean): {
36
38
  [x: string]: (e: React.MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
@@ -31,7 +31,7 @@ var _request = require("./request");
31
31
  var _utils2 = require("./utils");
32
32
 
33
33
  var _excluded = ["trigger", "url", "customRequest", "method", "params", "data", "extendParams", "successMsg", "errorMsg", "formatParams", "formatResult", "onSuccess", "onError", "onOk", "onCancel", "hideFooter"],
34
- _excluded2 = ["title", "content", "component", "schema", "onFinish", "dialogType", "dialogQuickShowType", "messageType", "popType", "beforeRequest", "onTrigger", "link", "beforeContent", "afterContent", "message", "footerDescription", "footerAlign", "className"];
34
+ _excluded2 = ["title", "content", "component", "schema", "onFinish", "dialogType", "dialogQuickShowType", "messageType", "popType", "beforeRequest", "onTrigger", "link", "beforeContent", "afterContent", "message", "footerDescription", "footerAlign", "footer", "className"];
35
35
 
36
36
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
37
37
 
@@ -147,6 +147,7 @@ function useDialogAction(action, actionContext, hasForm) {
147
147
  message = _getTargetValue.message,
148
148
  footerDescription = _getTargetValue.footerDescription,
149
149
  footerAlign = _getTargetValue.footerAlign,
150
+ footer = _getTargetValue.footer,
150
151
  className = _getTargetValue.className,
151
152
  containerOtherProps = _objectWithoutProperties(_getTargetValue, _excluded2);
152
153
 
@@ -270,7 +271,7 @@ function useDialogAction(action, actionContext, hasForm) {
270
271
  className: (0, _classnames.default)('teamix-pro-dialog-footer-description', getFooterAlignClass(isDrawer, footerAlign))
271
272
  }, renderDialogFooterDescription(footerDescription)))), _defineProperty(_objectSpread2, "footerAlign", footerAlign), _defineProperty(_objectSpread2, "className", (0, _classnames.default)('teamix-pro-action-dialog', {
272
273
  'has-footer-description': !!footerDescription
273
- })), _objectSpread2), containerProps), containerOtherProps); // TODO Drawer 基础组件未支持此配置,日后支持,并修改onOk、onCancel写法
274
+ })), _defineProperty(_objectSpread2, "footer", addContextForReactNode(footer, dialogContext)), _objectSpread2), containerProps), containerOtherProps); // TODO Drawer 基础组件未支持此配置,日后支持,并修改onOk、onCancel写法
274
275
 
275
276
 
276
277
  if ((!dialogType || dialogType === 'dialog') && hideFooter) {
package/lib/card/index.js CHANGED
@@ -271,9 +271,9 @@ var ProCard = function ProCard(props) {
271
271
  });
272
272
  var width = widthList.reduce(function (acc, cur) {
273
273
  return acc + cur;
274
- }, 0) + widthList.length * 8; // 无法取出精准宽度,减去1作为阈值
274
+ }, 0) + widthList.length * 8; // 无法取出精准宽度,减去1作为阈值 10为右padding
275
275
 
276
- setHeaderWithoutTitleWidth(width - 1);
276
+ setHeaderWithoutTitleWidth(width - 1 + 10);
277
277
  }
278
278
  };
279
279
 
@@ -65,7 +65,7 @@ var AdvancedFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
65
65
  var prefixCls = (0, _utils.usePrefixCls)('teamix-pro-form-query-filter-advanced');
66
66
  var gridSchema = (0, _react.useMemo)(function () {
67
67
  return [{
68
- name: 'FormGrid',
68
+ name: 'AdvancedFilterFormGrid',
69
69
  component: 'FormGrid',
70
70
  props: _objectSpread({
71
71
  breakpoints: [480, 720, 990, 1200, Infinity],
@@ -85,6 +85,7 @@ var AdvancedFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
85
85
  align: 'right'
86
86
  },
87
87
  children: [{
88
+ name: 'AdvancedFilterReset',
88
89
  component: 'Reset',
89
90
  props: {
90
91
  onResetValidateSuccess: onReset,
@@ -104,6 +105,11 @@ var AdvancedFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
104
105
  }])
105
106
  }];
106
107
  }, [schema, onReset]);
108
+ (0, _react.useEffect)(function () {
109
+ var _otherProps$form;
110
+
111
+ otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$form = otherProps.form) === null || _otherProps$form === void 0 ? void 0 : _otherProps$form.clearFormGraph('AdvancedFilterReset');
112
+ }, [onReset]);
107
113
  var getTeamixLayout = (0, _react.useMemo)(function () {
108
114
  return breakpoints === true ? {
109
115
  breakpoints: [990],
@@ -26,7 +26,7 @@ $query-filter-layout: #{$teamix-pro-form}-query-filter-layout;
26
26
  margin-bottom: 8px;
27
27
  }
28
28
  .#{$query-filter-layout}-addonAfter {
29
- flex: 0 1 auto;
29
+ flex: 0 0 auto;
30
30
  margin-left: 8px;
31
31
  }
32
32
  .#{$query-filter-layout}-panel {
@@ -0,0 +1,2 @@
1
+ declare const _default: (form: any, schema: any, scope: any) => void;
2
+ export default _default;