@teamix/pro 1.5.38 → 1.5.39
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/pro.js +435 -397
- package/dist/pro.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/table/components/Layout/index.js +1 -2
- package/es/table/index.js +10 -10
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/table/components/Layout/index.js +1 -2
- package/lib/table/index.js +10 -10
- package/package.json +1 -1
package/es/index.d.ts
CHANGED
@@ -30,5 +30,5 @@ export * from './sidebar';
|
|
30
30
|
export * from './utils';
|
31
31
|
export * from './timeline';
|
32
32
|
export * from './image';
|
33
|
-
declare const version = "1.5.
|
33
|
+
declare const version = "1.5.39";
|
34
34
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, ProImage, hooks, nocode, templates, utils, };
|
package/es/index.js
CHANGED
@@ -130,7 +130,7 @@ var Layout = function Layout(props) {
|
|
130
130
|
}
|
131
131
|
}, [
|
132
132
|
//todo: 重复render 问题都在这里
|
133
|
-
dataFilter, mainAction, dataFilterFormRef, afterDataFilter, rowSelection
|
133
|
+
dataFilter, mainAction, dataFilterFormRef, afterDataFilter, rowSelection]);
|
134
134
|
// 区域组合渲染
|
135
135
|
var renderLayout = function renderLayout() {
|
136
136
|
if (header && mainAction) {
|
@@ -174,5 +174,4 @@ var Layout = function Layout(props) {
|
|
174
174
|
}
|
175
175
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
176
176
|
};
|
177
|
-
// export default Layout
|
178
177
|
export default /*#__PURE__*/React.memo(Layout);
|
package/es/table/index.js
CHANGED
@@ -815,7 +815,7 @@ var ProTable = function ProTable(props) {
|
|
815
815
|
});
|
816
816
|
// 请求函数
|
817
817
|
var _request = useCallback(function (params, noLoading, filterParams, isReset) {
|
818
|
-
var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current6, _actionRef$current6$g, _objectSpread3;
|
818
|
+
var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current6, _actionRef$current6$g, _actionRef$current7, _actionRef$current7$p, _actionRef$current8, _actionRef$current8$p, _objectSpread3;
|
819
819
|
// 首次渲染表格,获取 urlState 上的 表头 filter 数据
|
820
820
|
if (bindUrl && (bindUrlProps === null || bindUrlProps === void 0 ? void 0 : bindUrlProps.headerFilters) !== false && dataRef.current.flag) {
|
821
821
|
getUrlStateFilter(urlState !== null && urlState !== void 0 ? urlState : {}, actionRef);
|
@@ -836,7 +836,7 @@ var ProTable = function ProTable(props) {
|
|
836
836
|
var columnsFilterParams = (_actionRef$current$ge = (_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : (_actionRef$current6$g = _actionRef$current6.getFilterRules) === null || _actionRef$current6$g === void 0 ? void 0 : _actionRef$current6$g.call(_actionRef$current6)) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : {};
|
837
837
|
// 格式化后的请求参数
|
838
838
|
var requestData = {};
|
839
|
-
var preParams = _objectSpread(_objectSpread({}, !showPagination ? _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, dataFilterParams), propsParams), sortParams), columnsFilterParams) : _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, dataFilterParams), propsParams), sortParams), columnsFilterParams), {}, (_objectSpread3 = {}, _defineProperty(_objectSpread3, targetPageKey, currentPage), _defineProperty(_objectSpread3, targetPageSizeKey, pageSize), _objectSpread3))), params);
|
839
|
+
var preParams = _objectSpread(_objectSpread({}, !showPagination ? _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, dataFilterParams), propsParams), sortParams), columnsFilterParams) : _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, dataFilterParams), propsParams), sortParams), columnsFilterParams), {}, (_objectSpread3 = {}, _defineProperty(_objectSpread3, targetPageKey, (actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : (_actionRef$current7$p = _actionRef$current7.pageInfo) === null || _actionRef$current7$p === void 0 ? void 0 : _actionRef$current7$p.current) || currentPage), _defineProperty(_objectSpread3, targetPageSizeKey, (actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current8 = actionRef.current) === null || _actionRef$current8 === void 0 ? void 0 : (_actionRef$current8$p = _actionRef$current8.pageInfo) === null || _actionRef$current8$p === void 0 ? void 0 : _actionRef$current8$p.pageSize) || pageSize), _objectSpread3))), params);
|
840
840
|
if (typeof formatParams === 'string') {
|
841
841
|
requestData = getTargetValue(formatParams, {
|
842
842
|
params: preParams
|
@@ -929,7 +929,7 @@ var ProTable = function ProTable(props) {
|
|
929
929
|
getData.run(requestData);
|
930
930
|
}
|
931
931
|
}
|
932
|
-
}, [bindUrl, bindUrlProps, dataRef, url, customRequest, currentPage, pageSize, propsParams]);
|
932
|
+
}, [bindUrl, bindUrlProps, dataRef, url, customRequest, currentPage, pageSize, propsParams, actionRef.current]);
|
933
933
|
var onSort = useCallback(function (dataIndex, order) {
|
934
934
|
var nextSort = _defineProperty({}, dataIndex, order);
|
935
935
|
setSort(nextSort);
|
@@ -949,7 +949,7 @@ var ProTable = function ProTable(props) {
|
|
949
949
|
return true;
|
950
950
|
} : undefined,
|
951
951
|
onFilter: function onFilter(values) {
|
952
|
-
var _actionRef$
|
952
|
+
var _actionRef$current9, _actionRef$current9$c, _request8;
|
953
953
|
// 全屏状态,判断全屏表单onFilter是否禁用
|
954
954
|
if (fullscreenState && !filterEnableRef.current.fullscreen) {
|
955
955
|
filterEnableRef.current.fullscreen = true;
|
@@ -968,7 +968,7 @@ var ProTable = function ProTable(props) {
|
|
968
968
|
}
|
969
969
|
}
|
970
970
|
// 搜索变化时,暂时先清空选择
|
971
|
-
(_actionRef$
|
971
|
+
(_actionRef$current9 = actionRef.current) === null || _actionRef$current9 === void 0 ? void 0 : (_actionRef$current9$c = _actionRef$current9.clearRowSelection) === null || _actionRef$current9$c === void 0 ? void 0 : _actionRef$current9$c.call(_actionRef$current9);
|
972
972
|
setCurrentPage(1);
|
973
973
|
_request((_request8 = {}, _defineProperty(_request8, targetPageKey, 1), _defineProperty(_request8, targetPageSizeKey, pageSize), _request8), false, values);
|
974
974
|
},
|
@@ -1096,8 +1096,8 @@ var ProTable = function ProTable(props) {
|
|
1096
1096
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
1097
1097
|
// 翻页默认清空选择
|
1098
1098
|
if (!reserveSelectedRecords) {
|
1099
|
-
var _actionRef$
|
1100
|
-
(_actionRef$
|
1099
|
+
var _actionRef$current10, _actionRef$current10$;
|
1100
|
+
(_actionRef$current10 = actionRef.current) === null || _actionRef$current10 === void 0 ? void 0 : (_actionRef$current10$ = _actionRef$current10.clearRowSelection) === null || _actionRef$current10$ === void 0 ? void 0 : _actionRef$current10$.call(_actionRef$current10);
|
1101
1101
|
}
|
1102
1102
|
setCurrentPage(currentPage);
|
1103
1103
|
_request(_objectSpread((_objectSpread4 = {}, _defineProperty(_objectSpread4, targetPageKey, currentPage), _defineProperty(_objectSpread4, "pageSize", pageSize), _objectSpread4), params));
|
@@ -1106,13 +1106,13 @@ var ProTable = function ProTable(props) {
|
|
1106
1106
|
var _request10;
|
1107
1107
|
// 翻页默认清空选择
|
1108
1108
|
if (!reserveSelectedRecords) {
|
1109
|
-
var _actionRef$
|
1110
|
-
(_actionRef$
|
1109
|
+
var _actionRef$current11, _actionRef$current11$;
|
1110
|
+
(_actionRef$current11 = actionRef.current) === null || _actionRef$current11 === void 0 ? void 0 : (_actionRef$current11$ = _actionRef$current11.clearRowSelection) === null || _actionRef$current11$ === void 0 ? void 0 : _actionRef$current11$.call(_actionRef$current11);
|
1111
1111
|
}
|
1112
1112
|
setPageSize(currentPageSize);
|
1113
1113
|
setCurrentPage(1);
|
1114
1114
|
_request((_request10 = {}, _defineProperty(_request10, targetPageSizeKey, currentPageSize), _defineProperty(_request10, targetPageKey, 1), _request10));
|
1115
|
-
}, [reserveSelectedRecords, actionRef, targetPageSizeKey, targetPageKey, currentPage]);
|
1115
|
+
}, [reserveSelectedRecords, actionRef.current, targetPageSizeKey, targetPageKey, currentPage]);
|
1116
1116
|
var renderFooter = function renderFooter() {
|
1117
1117
|
function renderRowSelection() {
|
1118
1118
|
if (rowSelection) {
|
package/lib/index.d.ts
CHANGED
@@ -30,5 +30,5 @@ export * from './sidebar';
|
|
30
30
|
export * from './utils';
|
31
31
|
export * from './timeline';
|
32
32
|
export * from './image';
|
33
|
-
declare const version = "1.5.
|
33
|
+
declare const version = "1.5.39";
|
34
34
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, ProImage, hooks, nocode, templates, utils, };
|
package/lib/index.js
CHANGED
@@ -299,7 +299,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
299
299
|
if (!((_window = window) === null || _window === void 0 ? void 0 : _window.TEAMIXPRO_WITHOUT_ICON)) {
|
300
300
|
_icon.default.setConfig(_utils.default.getTeamixIconConfig());
|
301
301
|
}
|
302
|
-
var version = '1.5.
|
302
|
+
var version = '1.5.39';
|
303
303
|
// By TeamixTest
|
304
304
|
exports.version = version;
|
305
305
|
window.postMessage({
|
@@ -139,7 +139,7 @@ var Layout = function Layout(props) {
|
|
139
139
|
}
|
140
140
|
}, [
|
141
141
|
//todo: 重复render 问题都在这里
|
142
|
-
dataFilter, mainAction, dataFilterFormRef, afterDataFilter, rowSelection
|
142
|
+
dataFilter, mainAction, dataFilterFormRef, afterDataFilter, rowSelection]);
|
143
143
|
// 区域组合渲染
|
144
144
|
var renderLayout = function renderLayout() {
|
145
145
|
if (header && mainAction) {
|
@@ -183,6 +183,5 @@ var Layout = function Layout(props) {
|
|
183
183
|
}
|
184
184
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
185
185
|
};
|
186
|
-
// export default Layout
|
187
186
|
var _default = /*#__PURE__*/_react.default.memo(Layout);
|
188
187
|
exports.default = _default;
|
package/lib/table/index.js
CHANGED
@@ -836,7 +836,7 @@ var ProTable = function ProTable(props) {
|
|
836
836
|
});
|
837
837
|
// 请求函数
|
838
838
|
var _request = (0, _react.useCallback)(function (params, noLoading, filterParams, isReset) {
|
839
|
-
var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current6, _actionRef$current6$g, _objectSpread3;
|
839
|
+
var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current6, _actionRef$current6$g, _actionRef$current7, _actionRef$current7$p, _actionRef$current8, _actionRef$current8$p, _objectSpread3;
|
840
840
|
// 首次渲染表格,获取 urlState 上的 表头 filter 数据
|
841
841
|
if (bindUrl && (bindUrlProps === null || bindUrlProps === void 0 ? void 0 : bindUrlProps.headerFilters) !== false && dataRef.current.flag) {
|
842
842
|
(0, _util.getUrlStateFilter)(urlState !== null && urlState !== void 0 ? urlState : {}, actionRef);
|
@@ -857,7 +857,7 @@ var ProTable = function ProTable(props) {
|
|
857
857
|
var columnsFilterParams = (_actionRef$current$ge = (_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : (_actionRef$current6$g = _actionRef$current6.getFilterRules) === null || _actionRef$current6$g === void 0 ? void 0 : _actionRef$current6$g.call(_actionRef$current6)) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : {};
|
858
858
|
// 格式化后的请求参数
|
859
859
|
var requestData = {};
|
860
|
-
var preParams = _objectSpread(_objectSpread({}, !showPagination ? _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, dataFilterParams), propsParams), sortParams), columnsFilterParams) : _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, dataFilterParams), propsParams), sortParams), columnsFilterParams), {}, (_objectSpread3 = {}, _defineProperty(_objectSpread3, targetPageKey, currentPage), _defineProperty(_objectSpread3, targetPageSizeKey, pageSize), _objectSpread3))), params);
|
860
|
+
var preParams = _objectSpread(_objectSpread({}, !showPagination ? _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, dataFilterParams), propsParams), sortParams), columnsFilterParams) : _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, dataFilterParams), propsParams), sortParams), columnsFilterParams), {}, (_objectSpread3 = {}, _defineProperty(_objectSpread3, targetPageKey, (actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : (_actionRef$current7$p = _actionRef$current7.pageInfo) === null || _actionRef$current7$p === void 0 ? void 0 : _actionRef$current7$p.current) || currentPage), _defineProperty(_objectSpread3, targetPageSizeKey, (actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current8 = actionRef.current) === null || _actionRef$current8 === void 0 ? void 0 : (_actionRef$current8$p = _actionRef$current8.pageInfo) === null || _actionRef$current8$p === void 0 ? void 0 : _actionRef$current8$p.pageSize) || pageSize), _objectSpread3))), params);
|
861
861
|
if (typeof formatParams === 'string') {
|
862
862
|
requestData = (0, _utils.getTargetValue)(formatParams, {
|
863
863
|
params: preParams
|
@@ -950,7 +950,7 @@ var ProTable = function ProTable(props) {
|
|
950
950
|
getData.run(requestData);
|
951
951
|
}
|
952
952
|
}
|
953
|
-
}, [bindUrl, bindUrlProps, dataRef, url, customRequest, currentPage, pageSize, propsParams]);
|
953
|
+
}, [bindUrl, bindUrlProps, dataRef, url, customRequest, currentPage, pageSize, propsParams, actionRef.current]);
|
954
954
|
var onSort = (0, _react.useCallback)(function (dataIndex, order) {
|
955
955
|
var nextSort = _defineProperty({}, dataIndex, order);
|
956
956
|
setSort(nextSort);
|
@@ -970,7 +970,7 @@ var ProTable = function ProTable(props) {
|
|
970
970
|
return true;
|
971
971
|
} : undefined,
|
972
972
|
onFilter: function onFilter(values) {
|
973
|
-
var _actionRef$
|
973
|
+
var _actionRef$current9, _actionRef$current9$c, _request8;
|
974
974
|
// 全屏状态,判断全屏表单onFilter是否禁用
|
975
975
|
if (fullscreenState && !filterEnableRef.current.fullscreen) {
|
976
976
|
filterEnableRef.current.fullscreen = true;
|
@@ -989,7 +989,7 @@ var ProTable = function ProTable(props) {
|
|
989
989
|
}
|
990
990
|
}
|
991
991
|
// 搜索变化时,暂时先清空选择
|
992
|
-
(_actionRef$
|
992
|
+
(_actionRef$current9 = actionRef.current) === null || _actionRef$current9 === void 0 ? void 0 : (_actionRef$current9$c = _actionRef$current9.clearRowSelection) === null || _actionRef$current9$c === void 0 ? void 0 : _actionRef$current9$c.call(_actionRef$current9);
|
993
993
|
setCurrentPage(1);
|
994
994
|
_request((_request8 = {}, _defineProperty(_request8, targetPageKey, 1), _defineProperty(_request8, targetPageSizeKey, pageSize), _request8), false, values);
|
995
995
|
},
|
@@ -1117,8 +1117,8 @@ var ProTable = function ProTable(props) {
|
|
1117
1117
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
1118
1118
|
// 翻页默认清空选择
|
1119
1119
|
if (!reserveSelectedRecords) {
|
1120
|
-
var _actionRef$
|
1121
|
-
(_actionRef$
|
1120
|
+
var _actionRef$current10, _actionRef$current10$;
|
1121
|
+
(_actionRef$current10 = actionRef.current) === null || _actionRef$current10 === void 0 ? void 0 : (_actionRef$current10$ = _actionRef$current10.clearRowSelection) === null || _actionRef$current10$ === void 0 ? void 0 : _actionRef$current10$.call(_actionRef$current10);
|
1122
1122
|
}
|
1123
1123
|
setCurrentPage(currentPage);
|
1124
1124
|
_request(_objectSpread((_objectSpread4 = {}, _defineProperty(_objectSpread4, targetPageKey, currentPage), _defineProperty(_objectSpread4, "pageSize", pageSize), _objectSpread4), params));
|
@@ -1127,13 +1127,13 @@ var ProTable = function ProTable(props) {
|
|
1127
1127
|
var _request10;
|
1128
1128
|
// 翻页默认清空选择
|
1129
1129
|
if (!reserveSelectedRecords) {
|
1130
|
-
var _actionRef$
|
1131
|
-
(_actionRef$
|
1130
|
+
var _actionRef$current11, _actionRef$current11$;
|
1131
|
+
(_actionRef$current11 = actionRef.current) === null || _actionRef$current11 === void 0 ? void 0 : (_actionRef$current11$ = _actionRef$current11.clearRowSelection) === null || _actionRef$current11$ === void 0 ? void 0 : _actionRef$current11$.call(_actionRef$current11);
|
1132
1132
|
}
|
1133
1133
|
setPageSize(currentPageSize);
|
1134
1134
|
setCurrentPage(1);
|
1135
1135
|
_request((_request10 = {}, _defineProperty(_request10, targetPageSizeKey, currentPageSize), _defineProperty(_request10, targetPageKey, 1), _request10));
|
1136
|
-
}, [reserveSelectedRecords, actionRef, targetPageSizeKey, targetPageKey, currentPage]);
|
1136
|
+
}, [reserveSelectedRecords, actionRef.current, targetPageSizeKey, targetPageKey, currentPage]);
|
1137
1137
|
var renderFooter = function renderFooter() {
|
1138
1138
|
function renderRowSelection() {
|
1139
1139
|
if (rowSelection) {
|