@teamix/pro 1.2.24 → 1.2.29
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 +18112 -15660
- 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 +1 -1
- 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 +16 -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 +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 +89 -103
- package/es/table/typing.d.ts +14 -3
- 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 +1 -1
- 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 +16 -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 +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 +85 -100
- package/lib/table/typing.d.ts +14 -3
- 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
@@ -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;
|
74
|
-
|
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];
|
52
|
+
otherProps = _objectWithoutProperties(props, _excluded); // 渲染主操作区
|
79
53
|
|
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,96 +76,66 @@ var Layout = function Layout(props) {
|
|
112
76
|
context: _objectSpread(_objectSpread({}, defaultContext), mainAction.context)
|
113
77
|
})));
|
114
78
|
} else return mainAction;
|
115
|
-
}; //
|
116
|
-
|
79
|
+
}; // 渲染新版 QueryFilter
|
117
80
|
|
118
|
-
var renderInlineFilter = function renderInlineFilter() {
|
119
|
-
var _dataFilter$schema;
|
120
81
|
|
121
|
-
|
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() {
|
82
|
+
var renderQueryFilter = function renderQueryFilter() {
|
132
83
|
if (dataFilter) {
|
133
|
-
var _dataFilter$
|
84
|
+
var _dataFilter$schema;
|
134
85
|
|
135
86
|
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
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
87
|
+
// 自定义渲染内容
|
88
|
+
return /*#__PURE__*/_react.default.createElement(_form.QueryFilterLayout, _objectSpread({
|
89
|
+
onExpand: function onExpand(expand) {
|
90
|
+
// 全屏模式下展开收起过滤器需要重新计算tableMaxHeight
|
91
|
+
setTimeout(function () {
|
92
|
+
var _actionRef$current, _actionRef$current$ge;
|
93
|
+
|
94
|
+
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) {
|
95
|
+
var _actionRef$current2, _actionRef$current2$r;
|
96
|
+
|
97
|
+
(_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);
|
98
|
+
}
|
99
|
+
});
|
100
|
+
(dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand) && (dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand(expand));
|
101
|
+
},
|
102
|
+
panelContent: dataFilter.content,
|
103
|
+
addonBefore: renderMainAction(),
|
104
|
+
addonAfter: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, extra && !header && /*#__PURE__*/_react.default.createElement(_QuickAction.default, {
|
105
|
+
actionRef: actionRef,
|
106
|
+
quickAction: extra,
|
107
|
+
rowSelection: rowSelection
|
108
|
+
}), /*#__PURE__*/_react.default.createElement(_ToolBar.default, _objectSpread({
|
109
|
+
actionRef: actionRef
|
110
|
+
}, otherProps)))
|
111
|
+
}, dataFilter));
|
112
|
+
} else if ((dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema = dataFilter.schema) === null || _dataFilter$schema === void 0 ? void 0 : _dataFilter$schema.length) >= 0) {
|
113
|
+
return /*#__PURE__*/_react.default.createElement(_form.QueryFilter, _objectSpread({
|
114
|
+
formRef: dataFilterFormRef,
|
115
|
+
onExpand: function onExpand(expand) {
|
116
|
+
// 全屏模式下展开收起过滤器需要重新计算tableMaxHeight
|
117
|
+
setTimeout(function () {
|
118
|
+
var _actionRef$current3, _actionRef$current3$g;
|
119
|
+
|
120
|
+
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) {
|
121
|
+
var _actionRef$current4, _actionRef$current4$r;
|
122
|
+
|
123
|
+
(_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);
|
124
|
+
}
|
125
|
+
});
|
126
|
+
(dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand) && (dataFilter === null || dataFilter === void 0 ? void 0 : dataFilter.onExpand(expand));
|
127
|
+
},
|
128
|
+
addonBefore: renderMainAction(),
|
129
|
+
addonAfter: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, extra && !header && /*#__PURE__*/_react.default.createElement(_QuickAction.default, {
|
130
|
+
actionRef: actionRef,
|
131
|
+
quickAction: extra,
|
132
|
+
rowSelection: rowSelection
|
133
|
+
}), /*#__PURE__*/_react.default.createElement(_ToolBar.default, _objectSpread({
|
134
|
+
actionRef: actionRef
|
135
|
+
}, otherProps)))
|
136
|
+
}, dataFilter));
|
152
137
|
}
|
153
138
|
}
|
154
|
-
}; // 渲染过滤器按钮
|
155
|
-
|
156
|
-
|
157
|
-
var renderFilterBtn = function renderFilterBtn() {
|
158
|
-
var handleBtnClick = function handleBtnClick() {
|
159
|
-
setExpand(!expand);
|
160
|
-
var filterValues = Object.values(toJS(dataFilterForm === null || dataFilterForm === void 0 ? void 0 : dataFilterForm.values)).filter(function (v) {
|
161
|
-
return !(0, _lodash.default)(v);
|
162
|
-
}); // console.log('filterValues', filterValues);
|
163
|
-
|
164
|
-
if (filterValues && (filterValues === null || filterValues === void 0 ? void 0 : filterValues.length) > 0) {
|
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
|
-
}
|
179
|
-
});
|
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
|
-
}
|
205
139
|
}; // 区域组合渲染
|
206
140
|
|
207
141
|
|
@@ -217,61 +151,21 @@ var Layout = function Layout(props) {
|
|
217
151
|
actionRef: actionRef,
|
218
152
|
quickAction: extra,
|
219
153
|
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());
|
154
|
+
}))), renderQueryFilter());
|
229
155
|
} else if (header && !mainAction) {
|
230
156
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
231
157
|
className: cls('wrapper')
|
232
158
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
233
159
|
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());
|
160
|
+
}, header && /*#__PURE__*/_react.default.createElement(_utils.Header, _objectSpread({}, header)), renderQueryFilter())));
|
243
161
|
} 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());
|
162
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, renderQueryFilter());
|
257
163
|
} else if (!header && !mainAction) {
|
258
|
-
if (!
|
164
|
+
if (!dataFilterFormRef && !extra) {
|
259
165
|
return null;
|
260
166
|
}
|
261
167
|
|
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());
|
168
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, renderQueryFilter());
|
275
169
|
}
|
276
170
|
};
|
277
171
|
|
@@ -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;
|