@teamix/pro 1.2.23 → 1.2.28
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 +18109 -15665
- 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/dialog.js +4 -3
- package/es/actions/index.d.ts +12 -9
- package/es/actions/index.js +56 -15
- package/es/actions/index.scss +12 -1
- 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/SchemaForm/index.js +8 -6
- package/es/form/SchemaForm/initializeDataSource.d.ts +1 -1
- package/es/form/SchemaForm/initializeDataSource.js +2 -2
- package/es/form/SchemaForm/initializeRequest.d.ts +1 -1
- package/es/form/SchemaForm/initializeRequest.js +2 -2
- package/es/form/SchemaForm/initializeRules.d.ts +1 -1
- package/es/form/SchemaForm/initializeRules.js +3 -3
- 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/form/utils.d.ts +2 -2
- package/es/form/utils.js +2 -2
- package/es/index.d.ts +5 -2
- package/es/index.js +6 -3
- package/es/info/index.scss +1 -1
- package/es/nocode/pages/renderer.js +1 -1
- package/es/step/ProStepItem/components/HozStepItem/index.d.ts +5 -0
- package/es/step/ProStepItem/components/HozStepItem/index.js +235 -0
- package/es/step/ProStepItem/components/HozStepItem/index.scss +279 -0
- package/es/step/ProStepItem/components/VerStepItem/index.d.ts +5 -0
- package/es/step/ProStepItem/components/VerStepItem/index.js +295 -0
- package/es/step/ProStepItem/components/VerStepItem/index.scss +287 -0
- package/es/step/ProStepItem/index.d.ts +4 -0
- package/es/step/ProStepItem/index.js +57 -0
- package/es/step/index.d.ts +9 -0
- package/es/step/index.js +101 -0
- package/es/step/typing.d.ts +96 -0
- package/es/step/typing.js +1 -0
- package/es/table/components/Filter/index.js +2 -17
- package/es/table/components/Layout/index.js +63 -167
- package/es/table/components/Layout/index.scss +4 -3
- package/es/table/components/Pagination/index.js +2 -2
- package/es/table/components/Pagination/index.scss +5 -0
- package/es/table/components/ToolBar/FullScreenIcon.js +4 -9
- package/es/table/components/ToolBar/Fullscreen.js +21 -11
- package/es/table/index.js +82 -104
- package/es/table/index.scss +5 -5
- package/es/table/typing.d.ts +16 -10
- package/es/table/utils/columnRender.js +21 -3
- package/es/table/utils/index.d.ts +7 -0
- package/es/table/utils/index.js +36 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +1 -0
- package/lib/actions/dialog.js +4 -3
- package/lib/actions/index.d.ts +12 -9
- package/lib/actions/index.js +56 -15
- package/lib/actions/index.scss +12 -1
- 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/SchemaForm/index.js +8 -6
- package/lib/form/SchemaForm/initializeDataSource.d.ts +1 -1
- package/lib/form/SchemaForm/initializeDataSource.js +2 -2
- package/lib/form/SchemaForm/initializeRequest.d.ts +1 -1
- package/lib/form/SchemaForm/initializeRequest.js +2 -2
- package/lib/form/SchemaForm/initializeRules.d.ts +1 -1
- package/lib/form/SchemaForm/initializeRules.js +3 -3
- 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/form/utils.d.ts +2 -2
- package/lib/form/utils.js +2 -2
- package/lib/index.d.ts +5 -2
- package/lib/index.js +35 -3
- package/lib/info/index.scss +1 -1
- package/lib/nocode/pages/renderer.js +1 -1
- package/lib/step/ProStepItem/components/HozStepItem/index.d.ts +5 -0
- package/lib/step/ProStepItem/components/HozStepItem/index.js +258 -0
- package/lib/step/ProStepItem/components/HozStepItem/index.scss +279 -0
- package/lib/step/ProStepItem/components/VerStepItem/index.d.ts +5 -0
- package/lib/step/ProStepItem/components/VerStepItem/index.js +315 -0
- package/lib/step/ProStepItem/components/VerStepItem/index.scss +287 -0
- package/lib/step/ProStepItem/index.d.ts +4 -0
- package/lib/step/ProStepItem/index.js +69 -0
- package/lib/step/index.d.ts +9 -0
- package/lib/step/index.js +124 -0
- package/lib/step/typing.d.ts +96 -0
- package/lib/step/typing.js +5 -0
- package/lib/table/components/Filter/index.js +2 -17
- package/lib/table/components/Layout/index.js +61 -167
- package/lib/table/components/Layout/index.scss +4 -3
- package/lib/table/components/Pagination/index.js +2 -2
- package/lib/table/components/Pagination/index.scss +5 -0
- package/lib/table/components/ToolBar/FullScreenIcon.js +4 -9
- package/lib/table/components/ToolBar/Fullscreen.js +22 -11
- package/lib/table/index.js +78 -101
- package/lib/table/index.scss +5 -5
- package/lib/table/typing.d.ts +16 -10
- package/lib/table/utils/columnRender.js +21 -3
- package/lib/table/utils/index.d.ts +7 -0
- package/lib/table/utils/index.js +38 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +13 -0
- 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,96 +56,66 @@ var Layout = function Layout(props) {
|
|
|
90
56
|
context: _objectSpread(_objectSpread({}, defaultContext), mainAction.context)
|
|
91
57
|
})));
|
|
92
58
|
} else return mainAction;
|
|
93
|
-
}; //
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
var renderInlineFilter = function renderInlineFilter() {
|
|
97
|
-
var _dataFilter$schema;
|
|
98
|
-
|
|
99
|
-
if (dataFilter && (dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema = dataFilter.schema) === null || _dataFilter$schema === void 0 ? void 0 : _dataFilter$schema.length) > 0) {
|
|
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' 数据过滤区
|
|
59
|
+
}; // 渲染新版 QueryFilter
|
|
107
60
|
|
|
108
61
|
|
|
109
|
-
var
|
|
62
|
+
var renderQueryFilter = function renderQueryFilter() {
|
|
110
63
|
if (dataFilter) {
|
|
111
|
-
var _dataFilter$
|
|
64
|
+
var _dataFilter$schema;
|
|
112
65
|
|
|
113
66
|
if ( /*#__PURE__*/isValidElement(dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.content)) {
|
|
114
|
-
//
|
|
115
|
-
return /*#__PURE__*/React.createElement(
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
67
|
+
// 自定义渲染内容
|
|
68
|
+
return /*#__PURE__*/React.createElement(QueryFilterLayout, _objectSpread({
|
|
69
|
+
onExpand: function onExpand(expand) {
|
|
70
|
+
// 全屏模式下展开收起过滤器需要重新计算tableMaxHeight
|
|
71
|
+
setTimeout(function () {
|
|
72
|
+
var _actionRef$current, _actionRef$current$ge;
|
|
73
|
+
|
|
74
|
+
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) {
|
|
75
|
+
var _actionRef$current2, _actionRef$current2$r;
|
|
76
|
+
|
|
77
|
+
(_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);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
(dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand) && (dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand(expand));
|
|
81
|
+
},
|
|
82
|
+
panelContent: dataFilter.content,
|
|
83
|
+
addonBefore: renderMainAction(),
|
|
84
|
+
addonAfter: /*#__PURE__*/React.createElement(React.Fragment, null, extra && !header && /*#__PURE__*/React.createElement(QuickAction, {
|
|
85
|
+
actionRef: actionRef,
|
|
86
|
+
quickAction: extra,
|
|
87
|
+
rowSelection: rowSelection
|
|
88
|
+
}), /*#__PURE__*/React.createElement(ToolBar, _objectSpread({
|
|
89
|
+
actionRef: actionRef
|
|
90
|
+
}, otherProps)))
|
|
91
|
+
}, dataFilter));
|
|
92
|
+
} else if ((dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema = dataFilter.schema) === null || _dataFilter$schema === void 0 ? void 0 : _dataFilter$schema.length) >= 0) {
|
|
93
|
+
return /*#__PURE__*/React.createElement(QueryFilter, _objectSpread({
|
|
94
|
+
formRef: dataFilterFormRef,
|
|
95
|
+
onExpand: function onExpand(expand) {
|
|
96
|
+
// 全屏模式下展开收起过滤器需要重新计算tableMaxHeight
|
|
97
|
+
setTimeout(function () {
|
|
98
|
+
var _actionRef$current3, _actionRef$current3$g;
|
|
99
|
+
|
|
100
|
+
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) {
|
|
101
|
+
var _actionRef$current4, _actionRef$current4$r;
|
|
102
|
+
|
|
103
|
+
(_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);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
(dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand) && (dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand(expand));
|
|
107
|
+
},
|
|
108
|
+
addonBefore: renderMainAction(),
|
|
109
|
+
addonAfter: /*#__PURE__*/React.createElement(React.Fragment, null, extra && !header && /*#__PURE__*/React.createElement(QuickAction, {
|
|
110
|
+
actionRef: actionRef,
|
|
111
|
+
quickAction: extra,
|
|
112
|
+
rowSelection: rowSelection
|
|
113
|
+
}), /*#__PURE__*/React.createElement(ToolBar, _objectSpread({
|
|
114
|
+
actionRef: actionRef
|
|
115
|
+
}, otherProps)))
|
|
116
|
+
}, dataFilter));
|
|
130
117
|
}
|
|
131
118
|
}
|
|
132
|
-
}; // 渲染过滤器按钮
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
var renderFilterBtn = function renderFilterBtn() {
|
|
136
|
-
var handleBtnClick = function handleBtnClick() {
|
|
137
|
-
setExpand(!expand);
|
|
138
|
-
var filterValues = Object.values(toJS(dataFilterForm === null || dataFilterForm === void 0 ? void 0 : dataFilterForm.values)).filter(function (v) {
|
|
139
|
-
return !isEmpty(v);
|
|
140
|
-
}); // console.log('filterValues', filterValues);
|
|
141
|
-
|
|
142
|
-
if (filterValues && (filterValues === null || filterValues === void 0 ? void 0 : filterValues.length) > 0) {
|
|
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
|
-
}
|
|
157
|
-
});
|
|
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
|
-
}
|
|
183
119
|
}; // 区域组合渲染
|
|
184
120
|
|
|
185
121
|
|
|
@@ -195,61 +131,21 @@ var Layout = function Layout(props) {
|
|
|
195
131
|
actionRef: actionRef,
|
|
196
132
|
quickAction: extra,
|
|
197
133
|
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());
|
|
134
|
+
}))), renderQueryFilter());
|
|
207
135
|
} else if (header && !mainAction) {
|
|
208
136
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
209
137
|
className: cls('wrapper')
|
|
210
138
|
}, /*#__PURE__*/React.createElement("div", {
|
|
211
139
|
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());
|
|
140
|
+
}, header && /*#__PURE__*/React.createElement(Header, _objectSpread({}, header)), renderQueryFilter())));
|
|
221
141
|
} 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());
|
|
142
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, renderQueryFilter());
|
|
235
143
|
} else if (!header && !mainAction) {
|
|
236
|
-
if (!
|
|
144
|
+
if (!dataFilterFormRef && !extra) {
|
|
237
145
|
return null;
|
|
238
146
|
}
|
|
239
147
|
|
|
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());
|
|
148
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, renderQueryFilter());
|
|
253
149
|
}
|
|
254
150
|
};
|
|
255
151
|
|
|
@@ -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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["className", "onChange", "total", "totalRender", "pageSize", "current", "pageSizeList", "pageSizeSelector", "
|
|
1
|
+
var _excluded = ["className", "onChange", "total", "totalRender", "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
|
|
|
@@ -38,7 +38,6 @@ export default (function (props) {
|
|
|
38
38
|
current = props.current,
|
|
39
39
|
pageSizeList = props.pageSizeList,
|
|
40
40
|
pageSizeSelector = props.pageSizeSelector,
|
|
41
|
-
type = props.type,
|
|
42
41
|
onPageSizeChange = props.onPageSizeChange,
|
|
43
42
|
responsivePaginationType = props.responsivePaginationType,
|
|
44
43
|
otherProps = _objectWithoutProperties(props, _excluded);
|
|
@@ -62,6 +61,7 @@ export default (function (props) {
|
|
|
62
61
|
onChange: propsOnChange,
|
|
63
62
|
total: total,
|
|
64
63
|
pageSize: pageSize,
|
|
64
|
+
current: current,
|
|
65
65
|
shape: 'arrow-only',
|
|
66
66
|
pageSizeList: pageSizeList,
|
|
67
67
|
pageSizeSelector: pageSizeSelector,
|
|
@@ -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;
|