@teamix/pro 1.2.26 → 1.2.30
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.
- package/dist/212.js +129 -129
- package/dist/pro.css +1 -1
- package/dist/pro.js +18415 -16897
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/dist/pro.min.js.LICENSE.txt +2 -0
- package/es/actions/index.d.ts +2 -3
- package/es/actions/index.js +15 -19
- package/es/form/Filter/AdvancedFilter.js +1 -1
- package/es/form/Filter/Layout.d.ts +5 -0
- package/es/form/Filter/Layout.js +82 -0
- package/es/form/Filter/SimpleFilter.js +30 -6
- package/es/form/Filter/index2.d.ts +2 -1
- package/es/form/Filter/index2.js +97 -116
- package/es/form/Filter/index2.scss +16 -45
- package/es/form/Filter/layout.scss +36 -0
- package/es/form/Filter/useSpecialProps.d.ts +6 -0
- package/es/form/Filter/useSpecialProps.js +37 -0
- package/es/form/ProForm/customComponent.d.ts +3 -0
- package/es/form/ProForm/customComponent.js +20 -0
- package/es/form/ProForm/index.scss +5 -6
- package/es/form/ProForm/useFormDisplayValues.js +14 -24
- package/es/form/SchemaForm/adapterType.js +1 -0
- package/es/form/fieldTypeMap.js +2 -1
- package/es/form/index.d.ts +4 -2
- package/es/form/index.js +4 -2
- package/es/form/typing.d.ts +25 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/info/index.scss +1 -1
- package/es/nocode/pages/renderer.js +1 -1
- package/es/table/components/Layout/index.js +74 -163
- package/es/table/components/Layout/index.scss +4 -3
- package/es/table/components/Pagination/index.js +1 -0
- package/es/table/components/ToolBar/FullScreenIcon.js +4 -9
- package/es/table/components/ToolBar/Fullscreen.js +21 -11
- package/es/table/index.js +84 -102
- package/es/table/index.scss +4 -0
- package/es/table/typing.d.ts +12 -10
- package/es/table/utils/columnRender.js +21 -3
- package/lib/actions/index.d.ts +2 -3
- package/lib/actions/index.js +15 -19
- package/lib/form/Filter/AdvancedFilter.js +1 -1
- package/lib/form/Filter/Layout.d.ts +5 -0
- package/lib/form/Filter/Layout.js +102 -0
- package/lib/form/Filter/SimpleFilter.js +29 -4
- package/lib/form/Filter/index2.d.ts +2 -1
- package/lib/form/Filter/index2.js +101 -114
- package/lib/form/Filter/index2.scss +16 -45
- package/lib/form/Filter/layout.scss +36 -0
- package/lib/form/Filter/useSpecialProps.d.ts +6 -0
- package/lib/form/Filter/useSpecialProps.js +46 -0
- package/lib/form/ProForm/customComponent.d.ts +3 -0
- package/lib/form/ProForm/customComponent.js +28 -0
- package/lib/form/ProForm/index.scss +5 -6
- package/lib/form/ProForm/useFormDisplayValues.js +17 -24
- package/lib/form/SchemaForm/adapterType.js +1 -0
- package/lib/form/fieldTypeMap.js +2 -1
- package/lib/form/index.d.ts +4 -2
- package/lib/form/index.js +19 -1
- package/lib/form/typing.d.ts +25 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/info/index.scss +1 -1
- package/lib/nocode/pages/renderer.js +1 -1
- package/lib/table/components/Layout/index.js +72 -163
- package/lib/table/components/Layout/index.scss +4 -3
- package/lib/table/components/Pagination/index.js +1 -0
- package/lib/table/components/ToolBar/FullScreenIcon.js +4 -9
- package/lib/table/components/ToolBar/Fullscreen.js +22 -11
- package/lib/table/index.js +81 -100
- package/lib/table/index.scss +4 -0
- package/lib/table/typing.d.ts +12 -10
- package/lib/table/utils/columnRender.js +21 -3
- package/package.json +4 -4
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["header", "mainAction", "extra", "actionRef", "dataFilter", "
|
1
|
+
var _excluded = ["header", "mainAction", "extra", "actionRef", "dataFilter", "dataFilterFormRef", "rowSelection"];
|
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
|
|
@@ -8,35 +8,18 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
8
8
|
|
9
9
|
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); }
|
10
10
|
|
11
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
12
|
-
|
13
|
-
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."); }
|
14
|
-
|
15
|
-
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); }
|
16
|
-
|
17
|
-
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; }
|
18
|
-
|
19
|
-
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; }
|
20
|
-
|
21
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
22
|
-
|
23
11
|
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; }
|
24
12
|
|
25
13
|
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; }
|
26
14
|
|
27
|
-
import React, {
|
15
|
+
import React, { isValidElement } from 'react';
|
28
16
|
import { Header, baseClass } from '@teamix/utils';
|
29
|
-
import { Button, Badge } from '@alicloudfe/components';
|
30
|
-
import TeamixIcon from '@teamix/icon';
|
31
17
|
import { ProActionGroup } from '../../../actions';
|
32
|
-
import {
|
33
|
-
import { getMessage } from '@teamix/utils';
|
18
|
+
import { QueryFilter, QueryFilterLayout } from '../../../form';
|
34
19
|
import ToolBar from '../ToolBar';
|
35
20
|
import QuickAction from '../QuickAction';
|
36
|
-
import isEmpty from 'lodash.isempty';
|
37
21
|
import './index.scss';
|
38
22
|
var cls = baseClass('teamix-pro-table-layout');
|
39
|
-
var toJS = formilyReactive.toJS;
|
40
23
|
|
41
24
|
var Layout = function Layout(props) {
|
42
25
|
var header = props.header,
|
@@ -44,27 +27,10 @@ var Layout = function Layout(props) {
|
|
44
27
|
extra = props.extra,
|
45
28
|
actionRef = props.actionRef,
|
46
29
|
dataFilter = props.dataFilter,
|
47
|
-
|
30
|
+
dataFilterFormRef = props.dataFilterFormRef,
|
48
31
|
rowSelection = props.rowSelection,
|
49
|
-
otherProps = _objectWithoutProperties(props, _excluded);
|
50
|
-
|
51
|
-
var mode = dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.mode;
|
32
|
+
otherProps = _objectWithoutProperties(props, _excluded); // 渲染主操作区
|
52
33
|
|
53
|
-
var _useState = useState((dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.expand) || false),
|
54
|
-
_useState2 = _slicedToArray(_useState, 2),
|
55
|
-
expand = _useState2[0],
|
56
|
-
setExpand = _useState2[1];
|
57
|
-
|
58
|
-
var _useState3 = useState(false),
|
59
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
60
|
-
hasDot = _useState4[0],
|
61
|
-
setHasDot = _useState4[1];
|
62
|
-
|
63
|
-
useEffect(function () {
|
64
|
-
if (dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.expand) {
|
65
|
-
setExpand(dataFilter.expand);
|
66
|
-
}
|
67
|
-
}, [dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.expand]); // 渲染主操作区
|
68
34
|
|
69
35
|
var renderMainAction = function renderMainAction() {
|
70
36
|
var _mainAction$actions;
|
@@ -90,95 +56,80 @@ var Layout = function Layout(props) {
|
|
90
56
|
context: _objectSpread(_objectSpread({}, defaultContext), mainAction.context)
|
91
57
|
})));
|
92
58
|
} else return mainAction;
|
93
|
-
}; //
|
59
|
+
}; // 渲染新版 QueryFilter
|
94
60
|
|
95
61
|
|
96
|
-
var
|
62
|
+
var renderQueryFilter = function renderQueryFilter() {
|
97
63
|
var _dataFilter$schema;
|
98
64
|
|
99
|
-
if (dataFilter
|
100
|
-
return /*#__PURE__*/React.createElement("div", {
|
101
|
-
className: cls('inline-filter')
|
102
|
-
}, /*#__PURE__*/React.createElement(SimpleFilter, _objectSpread({
|
103
|
-
form: dataFilterForm
|
104
|
-
}, dataFilter)));
|
105
|
-
}
|
106
|
-
}; // 渲染 mode='panel' 数据过滤区
|
107
|
-
|
108
|
-
|
109
|
-
var renderPanelFilter = function renderPanelFilter() {
|
110
|
-
if (dataFilter) {
|
65
|
+
if (dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema = dataFilter.schema) === null || _dataFilter$schema === void 0 ? void 0 : _dataFilter$schema.length) {
|
111
66
|
var _dataFilter$schema2;
|
112
67
|
|
113
68
|
if ( /*#__PURE__*/isValidElement(dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.content)) {
|
114
|
-
//
|
115
|
-
return /*#__PURE__*/React.createElement(
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
69
|
+
// 自定义渲染内容
|
70
|
+
return /*#__PURE__*/React.createElement(QueryFilterLayout, _objectSpread({
|
71
|
+
onExpand: function onExpand(expand) {
|
72
|
+
// 全屏模式下展开收起过滤器需要重新计算tableMaxHeight
|
73
|
+
setTimeout(function () {
|
74
|
+
var _actionRef$current, _actionRef$current$ge;
|
75
|
+
|
76
|
+
if ((_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$ge = _actionRef$current.getState) === null || _actionRef$current$ge === void 0 ? void 0 : _actionRef$current$ge.call(_actionRef$current).fullScreenState) {
|
77
|
+
var _actionRef$current2, _actionRef$current2$r;
|
78
|
+
|
79
|
+
(_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$r = _actionRef$current2.resetTableMaxBodyHeight) === null || _actionRef$current2$r === void 0 ? void 0 : _actionRef$current2$r.call(_actionRef$current2);
|
80
|
+
}
|
81
|
+
});
|
82
|
+
(dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand) && (dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand(expand));
|
83
|
+
},
|
84
|
+
panelContent: dataFilter.content,
|
85
|
+
addonBefore: renderMainAction(),
|
86
|
+
addonAfter: /*#__PURE__*/React.createElement(React.Fragment, null, extra && !header && /*#__PURE__*/React.createElement(QuickAction, {
|
87
|
+
actionRef: actionRef,
|
88
|
+
quickAction: extra,
|
89
|
+
rowSelection: rowSelection
|
90
|
+
}), /*#__PURE__*/React.createElement(ToolBar, _objectSpread({
|
91
|
+
actionRef: actionRef
|
92
|
+
}, otherProps)))
|
93
|
+
}, dataFilter));
|
121
94
|
} else if ((dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema2 = dataFilter.schema) === null || _dataFilter$schema2 === void 0 ? void 0 : _dataFilter$schema2.length) >= 0) {
|
122
|
-
return /*#__PURE__*/React.createElement(
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
95
|
+
return /*#__PURE__*/React.createElement(QueryFilter, _objectSpread({
|
96
|
+
formRef: dataFilterFormRef,
|
97
|
+
onExpand: function onExpand(expand) {
|
98
|
+
// 全屏模式下展开收起过滤器需要重新计算tableMaxHeight
|
99
|
+
setTimeout(function () {
|
100
|
+
var _actionRef$current3, _actionRef$current3$g;
|
101
|
+
|
102
|
+
if ((_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$g.call(_actionRef$current3).fullScreenState) {
|
103
|
+
var _actionRef$current4, _actionRef$current4$r;
|
104
|
+
|
105
|
+
(_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : (_actionRef$current4$r = _actionRef$current4.resetTableMaxBodyHeight) === null || _actionRef$current4$r === void 0 ? void 0 : _actionRef$current4$r.call(_actionRef$current4);
|
106
|
+
}
|
107
|
+
});
|
108
|
+
(dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand) && (dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand(expand));
|
109
|
+
},
|
110
|
+
addonBefore: renderMainAction(),
|
111
|
+
addonAfter: /*#__PURE__*/React.createElement(React.Fragment, null, extra && !header && /*#__PURE__*/React.createElement(QuickAction, {
|
112
|
+
actionRef: actionRef,
|
113
|
+
quickAction: extra,
|
114
|
+
rowSelection: rowSelection
|
115
|
+
}), /*#__PURE__*/React.createElement(ToolBar, _objectSpread({
|
116
|
+
actionRef: actionRef
|
117
|
+
}, otherProps)))
|
118
|
+
}, dataFilter));
|
130
119
|
}
|
131
|
-
}
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
setHasDot(true);
|
144
|
-
} else {
|
145
|
-
setHasDot(false);
|
146
|
-
} // 全屏模式下展开收起过滤器需要重新计算tableMaxHeight
|
147
|
-
|
148
|
-
|
149
|
-
setTimeout(function () {
|
150
|
-
var _actionRef$current, _actionRef$current$ge;
|
151
|
-
|
152
|
-
if ((_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$ge = _actionRef$current.getState) === null || _actionRef$current$ge === void 0 ? void 0 : _actionRef$current$ge.call(_actionRef$current).fullScreenState) {
|
153
|
-
var _actionRef$current2, _actionRef$current2$r;
|
154
|
-
|
155
|
-
(_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$r = _actionRef$current2.resetTableMaxBodyHeight) === null || _actionRef$current2$r === void 0 ? void 0 : _actionRef$current2$r.call(_actionRef$current2);
|
156
|
-
}
|
120
|
+
} else if (mainAction) {
|
121
|
+
// 没传 dataFilter 但是传了 mainAction
|
122
|
+
return /*#__PURE__*/React.createElement(QueryFilterLayout, {
|
123
|
+
className: "mb8",
|
124
|
+
addonBefore: renderMainAction(),
|
125
|
+
addonAfter: /*#__PURE__*/React.createElement(React.Fragment, null, extra && !header && /*#__PURE__*/React.createElement(QuickAction, {
|
126
|
+
actionRef: actionRef,
|
127
|
+
quickAction: extra,
|
128
|
+
rowSelection: rowSelection
|
129
|
+
}), /*#__PURE__*/React.createElement(ToolBar, _objectSpread({
|
130
|
+
actionRef: actionRef
|
131
|
+
}, otherProps)))
|
157
132
|
});
|
158
|
-
};
|
159
|
-
|
160
|
-
if (mode === 'panel') {
|
161
|
-
if (expand === false && hasDot) {
|
162
|
-
return /*#__PURE__*/React.createElement(Badge, {
|
163
|
-
dot: true,
|
164
|
-
className: cls('filter-btn')
|
165
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
166
|
-
onClick: handleBtnClick,
|
167
|
-
style: {
|
168
|
-
minWidth: 'unset'
|
169
|
-
}
|
170
|
-
}, /*#__PURE__*/React.createElement(TeamixIcon, {
|
171
|
-
type: expand ? 'up-line' : 'filter-line'
|
172
|
-
}), getMessage('filter')));
|
173
|
-
} else return /*#__PURE__*/React.createElement(Button, {
|
174
|
-
onClick: handleBtnClick,
|
175
|
-
className: cls('filter-btn'),
|
176
|
-
style: {
|
177
|
-
minWidth: 'unset'
|
178
|
-
}
|
179
|
-
}, /*#__PURE__*/React.createElement(TeamixIcon, {
|
180
|
-
type: expand ? 'up-line' : 'filter-line'
|
181
|
-
}), getMessage('filter'));
|
182
133
|
}
|
183
134
|
}; // 区域组合渲染
|
184
135
|
|
@@ -195,61 +146,21 @@ var Layout = function Layout(props) {
|
|
195
146
|
actionRef: actionRef,
|
196
147
|
quickAction: extra,
|
197
148
|
rowSelection: rowSelection
|
198
|
-
}))),
|
199
|
-
className: cls('wrapper')
|
200
|
-
}, /*#__PURE__*/React.createElement("div", {
|
201
|
-
className: cls('left')
|
202
|
-
}, mainAction && renderMainAction(), mode === 'panel' && renderFilterBtn(), mode === 'inline' && renderInlineFilter()), /*#__PURE__*/React.createElement("div", {
|
203
|
-
className: cls('right')
|
204
|
-
}, /*#__PURE__*/React.createElement(ToolBar, _objectSpread({
|
205
|
-
actionRef: actionRef
|
206
|
-
}, otherProps)))), mode === 'panel' && renderPanelFilter());
|
149
|
+
}))), renderQueryFilter());
|
207
150
|
} else if (header && !mainAction) {
|
208
151
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
209
152
|
className: cls('wrapper')
|
210
153
|
}, /*#__PURE__*/React.createElement("div", {
|
211
154
|
className: cls('left')
|
212
|
-
}, header && /*#__PURE__*/React.createElement(Header, _objectSpread({}, header)),
|
213
|
-
className: cls('right')
|
214
|
-
}, extra && /*#__PURE__*/React.createElement(QuickAction, {
|
215
|
-
actionRef: actionRef,
|
216
|
-
quickAction: extra,
|
217
|
-
rowSelection: rowSelection
|
218
|
-
}), /*#__PURE__*/React.createElement(ToolBar, _objectSpread({
|
219
|
-
actionRef: actionRef
|
220
|
-
}, otherProps)))), mode === 'panel' && renderPanelFilter());
|
155
|
+
}, header && /*#__PURE__*/React.createElement(Header, _objectSpread({}, header)), renderQueryFilter())));
|
221
156
|
} else if (!header && mainAction) {
|
222
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
223
|
-
className: cls('wrapper')
|
224
|
-
}, /*#__PURE__*/React.createElement("div", {
|
225
|
-
className: cls('left')
|
226
|
-
}, mainAction && renderMainAction(), mode === 'panel' && renderFilterBtn(), mode === 'inline' && renderInlineFilter()), /*#__PURE__*/React.createElement("div", {
|
227
|
-
className: cls('right')
|
228
|
-
}, extra && /*#__PURE__*/React.createElement(QuickAction, {
|
229
|
-
actionRef: actionRef,
|
230
|
-
quickAction: extra,
|
231
|
-
rowSelection: rowSelection
|
232
|
-
}), /*#__PURE__*/React.createElement(ToolBar, _objectSpread({
|
233
|
-
actionRef: actionRef
|
234
|
-
}, otherProps)))), mode === 'panel' && renderPanelFilter());
|
157
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, renderQueryFilter());
|
235
158
|
} else if (!header && !mainAction) {
|
236
|
-
if (!
|
159
|
+
if (!dataFilterFormRef && !extra) {
|
237
160
|
return null;
|
238
161
|
}
|
239
162
|
|
240
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
241
|
-
className: cls('wrapper')
|
242
|
-
}, /*#__PURE__*/React.createElement("div", {
|
243
|
-
className: cls('left')
|
244
|
-
}, mode === 'panel' && renderFilterBtn(), mode === 'inline' && renderInlineFilter()), /*#__PURE__*/React.createElement("div", {
|
245
|
-
className: cls('right')
|
246
|
-
}, extra && /*#__PURE__*/React.createElement(QuickAction, {
|
247
|
-
actionRef: actionRef,
|
248
|
-
quickAction: extra,
|
249
|
-
rowSelection: rowSelection
|
250
|
-
}), /*#__PURE__*/React.createElement(ToolBar, _objectSpread({
|
251
|
-
actionRef: actionRef
|
252
|
-
}, otherProps)))), mode === 'panel' && renderPanelFilter());
|
163
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, renderQueryFilter());
|
253
164
|
}
|
254
165
|
};
|
255
166
|
|
@@ -9,9 +9,10 @@ $prefix: 'teamix-pro-table-layout';
|
|
9
9
|
display: flex;
|
10
10
|
justify-content: space-between;
|
11
11
|
margin-bottom: 8px;
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
// margin-bottom: 8px;
|
13
|
+
// &:not(:first-child) {
|
14
|
+
// margin-top: 8px;
|
15
|
+
// }
|
15
16
|
}
|
16
17
|
&-left {
|
17
18
|
display: flex;
|
@@ -27,17 +27,11 @@ var FullScreenIcon = function FullScreenIcon(props) {
|
|
27
27
|
|
28
28
|
var _useState = useState(false),
|
29
29
|
_useState2 = _slicedToArray(_useState, 2),
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
var _useState3 = useState(false),
|
34
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
35
|
-
fullscreen = _useState4[0],
|
36
|
-
setFullscreen = _useState4[1]; // 点击全屏
|
30
|
+
fullscreen = _useState2[0],
|
31
|
+
setFullscreen = _useState2[1]; // 点击全屏
|
37
32
|
|
38
33
|
|
39
34
|
var allScreenHandle = function allScreenHandle() {
|
40
|
-
setVisible(false);
|
41
35
|
setTimeout(function () {
|
42
36
|
var _actionRef$current, _actionRef$current$fu;
|
43
37
|
|
@@ -55,7 +49,8 @@ var FullScreenIcon = function FullScreenIcon(props) {
|
|
55
49
|
}, []); // 监听全屏变化
|
56
50
|
|
57
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) {
|
58
|
-
|
52
|
+
// console.log('dataFilterForm', actionRef.current?.dataFilterForm);
|
53
|
+
setFullscreen(state); // actionRef.current?.dataFilterForm?.setValues(formValues);
|
59
54
|
}, 'fullScreenState', 'fullscreenIcon');
|
60
55
|
return /*#__PURE__*/React.createElement(Button, {
|
61
56
|
iconSize: "small",
|
@@ -7,28 +7,37 @@ var FullScreen = function FullScreen(props) {
|
|
7
7
|
var children = props.children,
|
8
8
|
visible = props.visible,
|
9
9
|
actionRef = props.actionRef;
|
10
|
+
var _actionRef$current = actionRef.current,
|
11
|
+
normalDataFilterForm = _actionRef$current.normalDataFilterForm,
|
12
|
+
fullscreenDataFilterForm = _actionRef$current.fullscreenDataFilterForm;
|
10
13
|
|
11
14
|
function closeByESC(e) {
|
12
15
|
if (visible && e.code === 'Escape') {
|
13
|
-
var _actionRef$
|
16
|
+
var _actionRef$current2, _actionRef$current2$s, _actionRef$current3, _actionRef$current3$f;
|
14
17
|
|
15
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
16
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
18
|
+
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);
|
19
|
+
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);
|
17
20
|
}
|
18
21
|
} // 监听esc按钮
|
19
22
|
|
20
23
|
|
21
24
|
useEffect(function () {
|
22
|
-
var _actionRef$
|
25
|
+
var _actionRef$current4, _actionRef$current4$s;
|
23
26
|
|
24
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
27
|
+
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);
|
25
28
|
window.addEventListener('keydown', closeByESC);
|
26
29
|
return function () {
|
27
30
|
window.removeEventListener('keydown', closeByESC);
|
28
31
|
};
|
29
|
-
}, [visible]);
|
32
|
+
}, [visible]);
|
33
|
+
|
34
|
+
var afterClose = function afterClose() {
|
35
|
+
normalDataFilterForm === null || normalDataFilterForm === void 0 ? void 0 : normalDataFilterForm.setValues(fullscreenDataFilterForm.values);
|
36
|
+
}; // 全屏开启之后
|
37
|
+
|
30
38
|
|
31
39
|
var afterOpen = function afterOpen() {
|
40
|
+
fullscreenDataFilterForm.setValues(normalDataFilterForm.values);
|
32
41
|
Message.show({
|
33
42
|
type: 'notice',
|
34
43
|
content: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, getMessage('press')), /*#__PURE__*/React.createElement("span", {
|
@@ -40,13 +49,15 @@ var FullScreen = function FullScreen(props) {
|
|
40
49
|
});
|
41
50
|
};
|
42
51
|
|
43
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, children, /*#__PURE__*/React.createElement(Overlay, {
|
52
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, children(false), /*#__PURE__*/React.createElement(Overlay, {
|
44
53
|
canCloseByOutSideClick: false,
|
45
54
|
align: "cc cc",
|
46
55
|
cache: true,
|
47
56
|
v2: false,
|
48
57
|
disableScroll: true,
|
49
58
|
shouldUpdatePosition: true,
|
59
|
+
afterClose: afterClose,
|
60
|
+
afterOpen: afterOpen,
|
50
61
|
animation: {
|
51
62
|
in: 'fadeIn',
|
52
63
|
out: 'fadeOut'
|
@@ -55,15 +66,14 @@ var FullScreen = function FullScreen(props) {
|
|
55
66
|
wrapperStyle: {
|
56
67
|
zIndex: 999
|
57
68
|
},
|
58
|
-
afterOpen: afterOpen,
|
59
69
|
onRequestClose: function onRequestClose() {
|
60
|
-
var _actionRef$
|
70
|
+
var _actionRef$current5, _actionRef$current5$f;
|
61
71
|
|
62
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
72
|
+
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);
|
63
73
|
}
|
64
74
|
}, /*#__PURE__*/React.createElement("div", {
|
65
75
|
className: "teamix-pro-table-full-screen"
|
66
|
-
}, children)));
|
76
|
+
}, children(true))));
|
67
77
|
};
|
68
78
|
|
69
79
|
export default FullScreen;
|