@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
@@ -9,10 +9,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
10
10
|
var _utils = require("@teamix/utils");
|
11
11
|
|
12
|
-
var _components = require("@alicloudfe/components");
|
13
|
-
|
14
|
-
var _icon = _interopRequireDefault(require("@teamix/icon"));
|
15
|
-
|
16
12
|
var _actions = require("../../../actions");
|
17
13
|
|
18
14
|
var _form = require("../../../form");
|
@@ -21,11 +17,9 @@ var _ToolBar = _interopRequireDefault(require("../ToolBar"));
|
|
21
17
|
|
22
18
|
var _QuickAction = _interopRequireDefault(require("../QuickAction"));
|
23
19
|
|
24
|
-
var _lodash = _interopRequireDefault(require("lodash.isempty"));
|
25
|
-
|
26
20
|
require("./index.scss");
|
27
21
|
|
28
|
-
var _excluded = ["header", "mainAction", "extra", "actionRef", "dataFilter", "
|
22
|
+
var _excluded = ["header", "mainAction", "extra", "actionRef", "dataFilter", "dataFilterFormRef", "rowSelection"];
|
29
23
|
|
30
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
31
25
|
|
@@ -41,24 +35,11 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
41
35
|
|
42
36
|
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); }
|
43
37
|
|
44
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
45
|
-
|
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."); }
|
47
|
-
|
48
|
-
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); }
|
49
|
-
|
50
|
-
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; }
|
51
|
-
|
52
|
-
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; }
|
53
|
-
|
54
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
55
|
-
|
56
38
|
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; }
|
57
39
|
|
58
40
|
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; }
|
59
41
|
|
60
42
|
var cls = (0, _utils.baseClass)('teamix-pro-table-layout');
|
61
|
-
var toJS = _form.formilyReactive.toJS;
|
62
43
|
|
63
44
|
var Layout = function Layout(props) {
|
64
45
|
var header = props.header,
|
@@ -66,27 +47,10 @@ var Layout = function Layout(props) {
|
|
66
47
|
extra = props.extra,
|
67
48
|
actionRef = props.actionRef,
|
68
49
|
dataFilter = props.dataFilter,
|
69
|
-
|
50
|
+
dataFilterFormRef = props.dataFilterFormRef,
|
70
51
|
rowSelection = props.rowSelection,
|
71
|
-
otherProps = _objectWithoutProperties(props, _excluded);
|
72
|
-
|
73
|
-
var mode = dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.mode;
|
52
|
+
otherProps = _objectWithoutProperties(props, _excluded); // 渲染主操作区
|
74
53
|
|
75
|
-
var _useState = (0, _react.useState)((dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.expand) || false),
|
76
|
-
_useState2 = _slicedToArray(_useState, 2),
|
77
|
-
expand = _useState2[0],
|
78
|
-
setExpand = _useState2[1];
|
79
|
-
|
80
|
-
var _useState3 = (0, _react.useState)(false),
|
81
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
82
|
-
hasDot = _useState4[0],
|
83
|
-
setHasDot = _useState4[1];
|
84
|
-
|
85
|
-
(0, _react.useEffect)(function () {
|
86
|
-
if (dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.expand) {
|
87
|
-
setExpand(dataFilter.expand);
|
88
|
-
}
|
89
|
-
}, [dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.expand]); // 渲染主操作区
|
90
54
|
|
91
55
|
var renderMainAction = function renderMainAction() {
|
92
56
|
var _mainAction$actions;
|
@@ -112,95 +76,80 @@ var Layout = function Layout(props) {
|
|
112
76
|
context: _objectSpread(_objectSpread({}, defaultContext), mainAction.context)
|
113
77
|
})));
|
114
78
|
} else return mainAction;
|
115
|
-
}; //
|
79
|
+
}; // 渲染新版 QueryFilter
|
116
80
|
|
117
81
|
|
118
|
-
var
|
82
|
+
var renderQueryFilter = function renderQueryFilter() {
|
119
83
|
var _dataFilter$schema;
|
120
84
|
|
121
|
-
if (dataFilter
|
122
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
123
|
-
className: cls('inline-filter')
|
124
|
-
}, /*#__PURE__*/_react.default.createElement(_form.SimpleFilter, _objectSpread({
|
125
|
-
form: dataFilterForm
|
126
|
-
}, dataFilter)));
|
127
|
-
}
|
128
|
-
}; // 渲染 mode='panel' 数据过滤区
|
129
|
-
|
130
|
-
|
131
|
-
var renderPanelFilter = function renderPanelFilter() {
|
132
|
-
if (dataFilter) {
|
85
|
+
if (dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema = dataFilter.schema) === null || _dataFilter$schema === void 0 ? void 0 : _dataFilter$schema.length) {
|
133
86
|
var _dataFilter$schema2;
|
134
87
|
|
135
88
|
if ( /*#__PURE__*/(0, _react.isValidElement)(dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.content)) {
|
136
|
-
//
|
137
|
-
return /*#__PURE__*/_react.default.createElement(
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
89
|
+
// 自定义渲染内容
|
90
|
+
return /*#__PURE__*/_react.default.createElement(_form.QueryFilterLayout, _objectSpread({
|
91
|
+
onExpand: function onExpand(expand) {
|
92
|
+
// 全屏模式下展开收起过滤器需要重新计算tableMaxHeight
|
93
|
+
setTimeout(function () {
|
94
|
+
var _actionRef$current, _actionRef$current$ge;
|
95
|
+
|
96
|
+
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) {
|
97
|
+
var _actionRef$current2, _actionRef$current2$r;
|
98
|
+
|
99
|
+
(_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);
|
100
|
+
}
|
101
|
+
});
|
102
|
+
(dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand) && (dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand(expand));
|
103
|
+
},
|
104
|
+
panelContent: dataFilter.content,
|
105
|
+
addonBefore: renderMainAction(),
|
106
|
+
addonAfter: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, extra && !header && /*#__PURE__*/_react.default.createElement(_QuickAction.default, {
|
107
|
+
actionRef: actionRef,
|
108
|
+
quickAction: extra,
|
109
|
+
rowSelection: rowSelection
|
110
|
+
}), /*#__PURE__*/_react.default.createElement(_ToolBar.default, _objectSpread({
|
111
|
+
actionRef: actionRef
|
112
|
+
}, otherProps)))
|
113
|
+
}, dataFilter));
|
143
114
|
} else if ((dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema2 = dataFilter.schema) === null || _dataFilter$schema2 === void 0 ? void 0 : _dataFilter$schema2.length) >= 0) {
|
144
|
-
return /*#__PURE__*/_react.default.createElement(
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
115
|
+
return /*#__PURE__*/_react.default.createElement(_form.QueryFilter, _objectSpread({
|
116
|
+
formRef: dataFilterFormRef,
|
117
|
+
onExpand: function onExpand(expand) {
|
118
|
+
// 全屏模式下展开收起过滤器需要重新计算tableMaxHeight
|
119
|
+
setTimeout(function () {
|
120
|
+
var _actionRef$current3, _actionRef$current3$g;
|
121
|
+
|
122
|
+
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) {
|
123
|
+
var _actionRef$current4, _actionRef$current4$r;
|
124
|
+
|
125
|
+
(_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);
|
126
|
+
}
|
127
|
+
});
|
128
|
+
(dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand) && (dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand(expand));
|
129
|
+
},
|
130
|
+
addonBefore: renderMainAction(),
|
131
|
+
addonAfter: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, extra && !header && /*#__PURE__*/_react.default.createElement(_QuickAction.default, {
|
132
|
+
actionRef: actionRef,
|
133
|
+
quickAction: extra,
|
134
|
+
rowSelection: rowSelection
|
135
|
+
}), /*#__PURE__*/_react.default.createElement(_ToolBar.default, _objectSpread({
|
136
|
+
actionRef: actionRef
|
137
|
+
}, otherProps)))
|
138
|
+
}, dataFilter));
|
152
139
|
}
|
153
|
-
}
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
setHasDot(true);
|
166
|
-
} else {
|
167
|
-
setHasDot(false);
|
168
|
-
} // 全屏模式下展开收起过滤器需要重新计算tableMaxHeight
|
169
|
-
|
170
|
-
|
171
|
-
setTimeout(function () {
|
172
|
-
var _actionRef$current, _actionRef$current$ge;
|
173
|
-
|
174
|
-
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) {
|
175
|
-
var _actionRef$current2, _actionRef$current2$r;
|
176
|
-
|
177
|
-
(_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);
|
178
|
-
}
|
140
|
+
} else if (mainAction) {
|
141
|
+
// 没传 dataFilter 但是传了 mainAction
|
142
|
+
return /*#__PURE__*/_react.default.createElement(_form.QueryFilterLayout, {
|
143
|
+
className: "mb8",
|
144
|
+
addonBefore: renderMainAction(),
|
145
|
+
addonAfter: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, extra && !header && /*#__PURE__*/_react.default.createElement(_QuickAction.default, {
|
146
|
+
actionRef: actionRef,
|
147
|
+
quickAction: extra,
|
148
|
+
rowSelection: rowSelection
|
149
|
+
}), /*#__PURE__*/_react.default.createElement(_ToolBar.default, _objectSpread({
|
150
|
+
actionRef: actionRef
|
151
|
+
}, otherProps)))
|
179
152
|
});
|
180
|
-
};
|
181
|
-
|
182
|
-
if (mode === 'panel') {
|
183
|
-
if (expand === false && hasDot) {
|
184
|
-
return /*#__PURE__*/_react.default.createElement(_components.Badge, {
|
185
|
-
dot: true,
|
186
|
-
className: cls('filter-btn')
|
187
|
-
}, /*#__PURE__*/_react.default.createElement(_components.Button, {
|
188
|
-
onClick: handleBtnClick,
|
189
|
-
style: {
|
190
|
-
minWidth: 'unset'
|
191
|
-
}
|
192
|
-
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
193
|
-
type: expand ? 'up-line' : 'filter-line'
|
194
|
-
}), (0, _utils.getMessage)('filter')));
|
195
|
-
} else return /*#__PURE__*/_react.default.createElement(_components.Button, {
|
196
|
-
onClick: handleBtnClick,
|
197
|
-
className: cls('filter-btn'),
|
198
|
-
style: {
|
199
|
-
minWidth: 'unset'
|
200
|
-
}
|
201
|
-
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
202
|
-
type: expand ? 'up-line' : 'filter-line'
|
203
|
-
}), (0, _utils.getMessage)('filter'));
|
204
153
|
}
|
205
154
|
}; // 区域组合渲染
|
206
155
|
|
@@ -217,61 +166,21 @@ var Layout = function Layout(props) {
|
|
217
166
|
actionRef: actionRef,
|
218
167
|
quickAction: extra,
|
219
168
|
rowSelection: rowSelection
|
220
|
-
}))),
|
221
|
-
className: cls('wrapper')
|
222
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
223
|
-
className: cls('left')
|
224
|
-
}, mainAction && renderMainAction(), mode === 'panel' && renderFilterBtn(), mode === 'inline' && renderInlineFilter()), /*#__PURE__*/_react.default.createElement("div", {
|
225
|
-
className: cls('right')
|
226
|
-
}, /*#__PURE__*/_react.default.createElement(_ToolBar.default, _objectSpread({
|
227
|
-
actionRef: actionRef
|
228
|
-
}, otherProps)))), mode === 'panel' && renderPanelFilter());
|
169
|
+
}))), renderQueryFilter());
|
229
170
|
} else if (header && !mainAction) {
|
230
171
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
231
172
|
className: cls('wrapper')
|
232
173
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
233
174
|
className: cls('left')
|
234
|
-
}, header && /*#__PURE__*/_react.default.createElement(_utils.Header, _objectSpread({}, header)),
|
235
|
-
className: cls('right')
|
236
|
-
}, extra && /*#__PURE__*/_react.default.createElement(_QuickAction.default, {
|
237
|
-
actionRef: actionRef,
|
238
|
-
quickAction: extra,
|
239
|
-
rowSelection: rowSelection
|
240
|
-
}), /*#__PURE__*/_react.default.createElement(_ToolBar.default, _objectSpread({
|
241
|
-
actionRef: actionRef
|
242
|
-
}, otherProps)))), mode === 'panel' && renderPanelFilter());
|
175
|
+
}, header && /*#__PURE__*/_react.default.createElement(_utils.Header, _objectSpread({}, header)), renderQueryFilter())));
|
243
176
|
} else if (!header && mainAction) {
|
244
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null,
|
245
|
-
className: cls('wrapper')
|
246
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
247
|
-
className: cls('left')
|
248
|
-
}, mainAction && renderMainAction(), mode === 'panel' && renderFilterBtn(), mode === 'inline' && renderInlineFilter()), /*#__PURE__*/_react.default.createElement("div", {
|
249
|
-
className: cls('right')
|
250
|
-
}, extra && /*#__PURE__*/_react.default.createElement(_QuickAction.default, {
|
251
|
-
actionRef: actionRef,
|
252
|
-
quickAction: extra,
|
253
|
-
rowSelection: rowSelection
|
254
|
-
}), /*#__PURE__*/_react.default.createElement(_ToolBar.default, _objectSpread({
|
255
|
-
actionRef: actionRef
|
256
|
-
}, otherProps)))), mode === 'panel' && renderPanelFilter());
|
177
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, renderQueryFilter());
|
257
178
|
} else if (!header && !mainAction) {
|
258
|
-
if (!
|
179
|
+
if (!dataFilterFormRef && !extra) {
|
259
180
|
return null;
|
260
181
|
}
|
261
182
|
|
262
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null,
|
263
|
-
className: cls('wrapper')
|
264
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
265
|
-
className: cls('left')
|
266
|
-
}, mode === 'panel' && renderFilterBtn(), mode === 'inline' && renderInlineFilter()), /*#__PURE__*/_react.default.createElement("div", {
|
267
|
-
className: cls('right')
|
268
|
-
}, extra && /*#__PURE__*/_react.default.createElement(_QuickAction.default, {
|
269
|
-
actionRef: actionRef,
|
270
|
-
quickAction: extra,
|
271
|
-
rowSelection: rowSelection
|
272
|
-
}), /*#__PURE__*/_react.default.createElement(_ToolBar.default, _objectSpread({
|
273
|
-
actionRef: actionRef
|
274
|
-
}, otherProps)))), mode === 'panel' && renderPanelFilter());
|
183
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, renderQueryFilter());
|
275
184
|
}
|
276
185
|
};
|
277
186
|
|
@@ -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;
|
@@ -44,17 +44,11 @@ var FullScreenIcon = function FullScreenIcon(props) {
|
|
44
44
|
|
45
45
|
var _useState = (0, _react.useState)(false),
|
46
46
|
_useState2 = _slicedToArray(_useState, 2),
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
var _useState3 = (0, _react.useState)(false),
|
51
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
52
|
-
fullscreen = _useState4[0],
|
53
|
-
setFullscreen = _useState4[1]; // 点击全屏
|
47
|
+
fullscreen = _useState2[0],
|
48
|
+
setFullscreen = _useState2[1]; // 点击全屏
|
54
49
|
|
55
50
|
|
56
51
|
var allScreenHandle = function allScreenHandle() {
|
57
|
-
setVisible(false);
|
58
52
|
setTimeout(function () {
|
59
53
|
var _actionRef$current, _actionRef$current$fu;
|
60
54
|
|
@@ -72,7 +66,8 @@ var FullScreenIcon = function FullScreenIcon(props) {
|
|
72
66
|
}, []); // 监听全屏变化
|
73
67
|
|
74
68
|
(_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) {
|
75
|
-
|
69
|
+
// console.log('dataFilterForm', actionRef.current?.dataFilterForm);
|
70
|
+
setFullscreen(state); // actionRef.current?.dataFilterForm?.setValues(formValues);
|
76
71
|
}, 'fullScreenState', 'fullscreenIcon');
|
77
72
|
return /*#__PURE__*/_react.default.createElement(_components.Button, {
|
78
73
|
iconSize: "small",
|
@@ -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$
|
32
|
+
var _actionRef$current2, _actionRef$current2$s, _actionRef$current3, _actionRef$current3$f;
|
30
33
|
|
31
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
32
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
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$
|
41
|
+
var _actionRef$current4, _actionRef$current4$s;
|
39
42
|
|
40
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
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$
|
87
|
+
var _actionRef$current5, _actionRef$current5$f;
|
77
88
|
|
78
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
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;
|