@teamix/pro 1.5.39 → 1.5.40
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 +23 -18
- 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 -1
- package/es/table/components/ToolBar/FilterColumnIcon.js +1 -1
- package/es/table/components/ToolBar/index.js +2 -1
- package/es/table/index.js +15 -14
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/table/components/Layout/index.js +1 -1
- package/lib/table/components/ToolBar/FilterColumnIcon.js +1 -1
- package/lib/table/components/ToolBar/index.js +2 -1
- package/lib/table/index.js +15 -14
- 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.40";
|
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, actionRef]);
|
134
134
|
// 区域组合渲染
|
135
135
|
var renderLayout = function renderLayout() {
|
136
136
|
if (header && mainAction) {
|
@@ -108,7 +108,7 @@ var FilterColumnIcon = function FilterColumnIcon(props) {
|
|
108
108
|
});
|
109
109
|
useEffect(function () {
|
110
110
|
var _actionRef$current2;
|
111
|
-
setNewColumns(processColumns(
|
111
|
+
setNewColumns(processColumns(newColumns, (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : _actionRef$current2.filterColumns));
|
112
112
|
}, [columns, (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : _actionRef$current3.filterColumns]);
|
113
113
|
// 全选
|
114
114
|
var onChangeAllColumns = function onChangeAllColumns(check) {
|
@@ -51,6 +51,7 @@ var ToolBar = function ToolBar(props) {
|
|
51
51
|
var toolBar = props.toolBar,
|
52
52
|
fullScreenState = props.fullScreenState,
|
53
53
|
switchCardView = props.switchCardView,
|
54
|
+
actionRef = props.actionRef,
|
54
55
|
_props$toolBarAutoWid = props.toolBarAutoWidth,
|
55
56
|
toolBarAutoWidth = _props$toolBarAutoWid === void 0 ? true : _props$toolBarAutoWid;
|
56
57
|
var toolBarRef = useRef(null);
|
@@ -125,7 +126,7 @@ var ToolBar = function ToolBar(props) {
|
|
125
126
|
}
|
126
127
|
}
|
127
128
|
return result;
|
128
|
-
}, [toolBar]);
|
129
|
+
}, [toolBar, actionRef.current]);
|
129
130
|
var renderFlatShape = useMemo(function () {
|
130
131
|
return /*#__PURE__*/React.createElement("div", {
|
131
132
|
className: cls('content')
|
package/es/table/index.js
CHANGED
@@ -545,7 +545,7 @@ var ProTable = function ProTable(props) {
|
|
545
545
|
}
|
546
546
|
});
|
547
547
|
// 绑定 Actions
|
548
|
-
|
548
|
+
useActionType(actionRef, {
|
549
549
|
fullScreen: function fullScreen() {
|
550
550
|
var _actionRef$current2, _actionRef$current2$s;
|
551
551
|
var state = !fullscreenState;
|
@@ -585,7 +585,8 @@ var ProTable = function ProTable(props) {
|
|
585
585
|
_request(_objectSpread(_objectSpread({}, params), {}, _defineProperty({}, targetPageKey, 1)), undefined, undefined, true);
|
586
586
|
setShowSkeleton(true);
|
587
587
|
} else {
|
588
|
-
|
588
|
+
var _objectSpread3;
|
589
|
+
_request(_objectSpread(_objectSpread({}, params), {}, (_objectSpread3 = {}, _defineProperty(_objectSpread3, targetPageKey, currentPage), _defineProperty(_objectSpread3, targetPageSizeKey, pageSize), _objectSpread3)));
|
589
590
|
}
|
590
591
|
},
|
591
592
|
request: function request(params) {
|
@@ -815,7 +816,7 @@ var ProTable = function ProTable(props) {
|
|
815
816
|
});
|
816
817
|
// 请求函数
|
817
818
|
var _request = useCallback(function (params, noLoading, filterParams, isReset) {
|
818
|
-
var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current6, _actionRef$current6$g,
|
819
|
+
var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current6, _actionRef$current6$g, _objectSpread4;
|
819
820
|
// 首次渲染表格,获取 urlState 上的 表头 filter 数据
|
820
821
|
if (bindUrl && (bindUrlProps === null || bindUrlProps === void 0 ? void 0 : bindUrlProps.headerFilters) !== false && dataRef.current.flag) {
|
821
822
|
getUrlStateFilter(urlState !== null && urlState !== void 0 ? urlState : {}, actionRef);
|
@@ -836,7 +837,7 @@ var ProTable = function ProTable(props) {
|
|
836
837
|
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
838
|
// 格式化后的请求参数
|
838
839
|
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), {}, (
|
840
|
+
var preParams = _objectSpread(_objectSpread({}, !showPagination ? _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, dataFilterParams), propsParams), sortParams), columnsFilterParams) : _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, dataFilterParams), propsParams), sortParams), columnsFilterParams), {}, (_objectSpread4 = {}, _defineProperty(_objectSpread4, targetPageKey, currentPage), _defineProperty(_objectSpread4, targetPageSizeKey, pageSize), _objectSpread4))), params);
|
840
841
|
if (typeof formatParams === 'string') {
|
841
842
|
requestData = getTargetValue(formatParams, {
|
842
843
|
params: preParams
|
@@ -949,7 +950,7 @@ var ProTable = function ProTable(props) {
|
|
949
950
|
return true;
|
950
951
|
} : undefined,
|
951
952
|
onFilter: function onFilter(values) {
|
952
|
-
var _actionRef$
|
953
|
+
var _actionRef$current7, _actionRef$current7$c, _request8;
|
953
954
|
// 全屏状态,判断全屏表单onFilter是否禁用
|
954
955
|
if (fullscreenState && !filterEnableRef.current.fullscreen) {
|
955
956
|
filterEnableRef.current.fullscreen = true;
|
@@ -968,7 +969,7 @@ var ProTable = function ProTable(props) {
|
|
968
969
|
}
|
969
970
|
}
|
970
971
|
// 搜索变化时,暂时先清空选择
|
971
|
-
(_actionRef$
|
972
|
+
(_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : (_actionRef$current7$c = _actionRef$current7.clearRowSelection) === null || _actionRef$current7$c === void 0 ? void 0 : _actionRef$current7$c.call(_actionRef$current7);
|
972
973
|
setCurrentPage(1);
|
973
974
|
_request((_request8 = {}, _defineProperty(_request8, targetPageKey, 1), _defineProperty(_request8, targetPageSizeKey, pageSize), _request8), false, values);
|
974
975
|
},
|
@@ -1007,9 +1008,9 @@ var ProTable = function ProTable(props) {
|
|
1007
1008
|
mainAction: mainAction,
|
1008
1009
|
extra: extra,
|
1009
1010
|
toolBar: toolBar,
|
1010
|
-
actionRef: {
|
1011
|
+
actionRef: _objectSpread(_objectSpread({}, actionRef), {}, {
|
1011
1012
|
current: actionRef.current
|
1012
|
-
},
|
1013
|
+
}),
|
1013
1014
|
columns: propsColumns,
|
1014
1015
|
dataFilter: dataFilter,
|
1015
1016
|
afterDataFilter: afterDataFilter,
|
@@ -1092,22 +1093,22 @@ var ProTable = function ProTable(props) {
|
|
1092
1093
|
} else return footerAction;
|
1093
1094
|
};
|
1094
1095
|
var onChangePagination = useCallback(function (currentPage) {
|
1095
|
-
var
|
1096
|
+
var _objectSpread5;
|
1096
1097
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
1097
1098
|
// 翻页默认清空选择
|
1098
1099
|
if (!reserveSelectedRecords) {
|
1099
|
-
var _actionRef$
|
1100
|
-
(_actionRef$
|
1100
|
+
var _actionRef$current8, _actionRef$current8$c;
|
1101
|
+
(_actionRef$current8 = actionRef.current) === null || _actionRef$current8 === void 0 ? void 0 : (_actionRef$current8$c = _actionRef$current8.clearRowSelection) === null || _actionRef$current8$c === void 0 ? void 0 : _actionRef$current8$c.call(_actionRef$current8);
|
1101
1102
|
}
|
1102
1103
|
setCurrentPage(currentPage);
|
1103
|
-
_request(_objectSpread((
|
1104
|
+
_request(_objectSpread((_objectSpread5 = {}, _defineProperty(_objectSpread5, targetPageKey, currentPage), _defineProperty(_objectSpread5, "pageSize", pageSize), _objectSpread5), params));
|
1104
1105
|
}, [reserveSelectedRecords, targetPageKey, actionRef, pageSize]);
|
1105
1106
|
var onChangePaginationSize = useCallback(function (currentPageSize) {
|
1106
1107
|
var _request10;
|
1107
1108
|
// 翻页默认清空选择
|
1108
1109
|
if (!reserveSelectedRecords) {
|
1109
|
-
var _actionRef$
|
1110
|
-
(_actionRef$
|
1110
|
+
var _actionRef$current9, _actionRef$current9$c;
|
1111
|
+
(_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);
|
1111
1112
|
}
|
1112
1113
|
setPageSize(currentPageSize);
|
1113
1114
|
setCurrentPage(1);
|
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.40";
|
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.40';
|
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, actionRef]);
|
143
143
|
// 区域组合渲染
|
144
144
|
var renderLayout = function renderLayout() {
|
145
145
|
if (header && mainAction) {
|
@@ -115,7 +115,7 @@ var FilterColumnIcon = function FilterColumnIcon(props) {
|
|
115
115
|
});
|
116
116
|
(0, _react.useEffect)(function () {
|
117
117
|
var _actionRef$current2;
|
118
|
-
setNewColumns(processColumns(
|
118
|
+
setNewColumns(processColumns(newColumns, (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : _actionRef$current2.filterColumns));
|
119
119
|
}, [columns, (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : _actionRef$current3.filterColumns]);
|
120
120
|
// 全选
|
121
121
|
var onChangeAllColumns = function onChangeAllColumns(check) {
|
@@ -61,6 +61,7 @@ var ToolBar = function ToolBar(props) {
|
|
61
61
|
var toolBar = props.toolBar,
|
62
62
|
fullScreenState = props.fullScreenState,
|
63
63
|
switchCardView = props.switchCardView,
|
64
|
+
actionRef = props.actionRef,
|
64
65
|
_props$toolBarAutoWid = props.toolBarAutoWidth,
|
65
66
|
toolBarAutoWidth = _props$toolBarAutoWid === void 0 ? true : _props$toolBarAutoWid;
|
66
67
|
var toolBarRef = (0, _react.useRef)(null);
|
@@ -135,7 +136,7 @@ var ToolBar = function ToolBar(props) {
|
|
135
136
|
}
|
136
137
|
}
|
137
138
|
return result;
|
138
|
-
}, [toolBar]);
|
139
|
+
}, [toolBar, actionRef.current]);
|
139
140
|
var renderFlatShape = (0, _react.useMemo)(function () {
|
140
141
|
return /*#__PURE__*/_react.default.createElement("div", {
|
141
142
|
className: cls('content')
|
package/lib/table/index.js
CHANGED
@@ -566,7 +566,7 @@ var ProTable = function ProTable(props) {
|
|
566
566
|
}
|
567
567
|
});
|
568
568
|
// 绑定 Actions
|
569
|
-
|
569
|
+
(0, _utils2.useActionType)(actionRef, {
|
570
570
|
fullScreen: function fullScreen() {
|
571
571
|
var _actionRef$current2, _actionRef$current2$s;
|
572
572
|
var state = !fullscreenState;
|
@@ -606,7 +606,8 @@ var ProTable = function ProTable(props) {
|
|
606
606
|
_request(_objectSpread(_objectSpread({}, params), {}, _defineProperty({}, targetPageKey, 1)), undefined, undefined, true);
|
607
607
|
setShowSkeleton(true);
|
608
608
|
} else {
|
609
|
-
|
609
|
+
var _objectSpread3;
|
610
|
+
_request(_objectSpread(_objectSpread({}, params), {}, (_objectSpread3 = {}, _defineProperty(_objectSpread3, targetPageKey, currentPage), _defineProperty(_objectSpread3, targetPageSizeKey, pageSize), _objectSpread3)));
|
610
611
|
}
|
611
612
|
},
|
612
613
|
request: function request(params) {
|
@@ -836,7 +837,7 @@ var ProTable = function ProTable(props) {
|
|
836
837
|
});
|
837
838
|
// 请求函数
|
838
839
|
var _request = (0, _react.useCallback)(function (params, noLoading, filterParams, isReset) {
|
839
|
-
var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current6, _actionRef$current6$g,
|
840
|
+
var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current6, _actionRef$current6$g, _objectSpread4;
|
840
841
|
// 首次渲染表格,获取 urlState 上的 表头 filter 数据
|
841
842
|
if (bindUrl && (bindUrlProps === null || bindUrlProps === void 0 ? void 0 : bindUrlProps.headerFilters) !== false && dataRef.current.flag) {
|
842
843
|
(0, _util.getUrlStateFilter)(urlState !== null && urlState !== void 0 ? urlState : {}, actionRef);
|
@@ -857,7 +858,7 @@ var ProTable = function ProTable(props) {
|
|
857
858
|
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
859
|
// 格式化后的请求参数
|
859
860
|
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), {}, (
|
861
|
+
var preParams = _objectSpread(_objectSpread({}, !showPagination ? _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, dataFilterParams), propsParams), sortParams), columnsFilterParams) : _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, dataFilterParams), propsParams), sortParams), columnsFilterParams), {}, (_objectSpread4 = {}, _defineProperty(_objectSpread4, targetPageKey, currentPage), _defineProperty(_objectSpread4, targetPageSizeKey, pageSize), _objectSpread4))), params);
|
861
862
|
if (typeof formatParams === 'string') {
|
862
863
|
requestData = (0, _utils.getTargetValue)(formatParams, {
|
863
864
|
params: preParams
|
@@ -970,7 +971,7 @@ var ProTable = function ProTable(props) {
|
|
970
971
|
return true;
|
971
972
|
} : undefined,
|
972
973
|
onFilter: function onFilter(values) {
|
973
|
-
var _actionRef$
|
974
|
+
var _actionRef$current7, _actionRef$current7$c, _request8;
|
974
975
|
// 全屏状态,判断全屏表单onFilter是否禁用
|
975
976
|
if (fullscreenState && !filterEnableRef.current.fullscreen) {
|
976
977
|
filterEnableRef.current.fullscreen = true;
|
@@ -989,7 +990,7 @@ var ProTable = function ProTable(props) {
|
|
989
990
|
}
|
990
991
|
}
|
991
992
|
// 搜索变化时,暂时先清空选择
|
992
|
-
(_actionRef$
|
993
|
+
(_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : (_actionRef$current7$c = _actionRef$current7.clearRowSelection) === null || _actionRef$current7$c === void 0 ? void 0 : _actionRef$current7$c.call(_actionRef$current7);
|
993
994
|
setCurrentPage(1);
|
994
995
|
_request((_request8 = {}, _defineProperty(_request8, targetPageKey, 1), _defineProperty(_request8, targetPageSizeKey, pageSize), _request8), false, values);
|
995
996
|
},
|
@@ -1028,9 +1029,9 @@ var ProTable = function ProTable(props) {
|
|
1028
1029
|
mainAction: mainAction,
|
1029
1030
|
extra: extra,
|
1030
1031
|
toolBar: toolBar,
|
1031
|
-
actionRef: {
|
1032
|
+
actionRef: _objectSpread(_objectSpread({}, actionRef), {}, {
|
1032
1033
|
current: actionRef.current
|
1033
|
-
},
|
1034
|
+
}),
|
1034
1035
|
columns: propsColumns,
|
1035
1036
|
dataFilter: dataFilter,
|
1036
1037
|
afterDataFilter: afterDataFilter,
|
@@ -1113,22 +1114,22 @@ var ProTable = function ProTable(props) {
|
|
1113
1114
|
} else return footerAction;
|
1114
1115
|
};
|
1115
1116
|
var onChangePagination = (0, _react.useCallback)(function (currentPage) {
|
1116
|
-
var
|
1117
|
+
var _objectSpread5;
|
1117
1118
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
1118
1119
|
// 翻页默认清空选择
|
1119
1120
|
if (!reserveSelectedRecords) {
|
1120
|
-
var _actionRef$
|
1121
|
-
(_actionRef$
|
1121
|
+
var _actionRef$current8, _actionRef$current8$c;
|
1122
|
+
(_actionRef$current8 = actionRef.current) === null || _actionRef$current8 === void 0 ? void 0 : (_actionRef$current8$c = _actionRef$current8.clearRowSelection) === null || _actionRef$current8$c === void 0 ? void 0 : _actionRef$current8$c.call(_actionRef$current8);
|
1122
1123
|
}
|
1123
1124
|
setCurrentPage(currentPage);
|
1124
|
-
_request(_objectSpread((
|
1125
|
+
_request(_objectSpread((_objectSpread5 = {}, _defineProperty(_objectSpread5, targetPageKey, currentPage), _defineProperty(_objectSpread5, "pageSize", pageSize), _objectSpread5), params));
|
1125
1126
|
}, [reserveSelectedRecords, targetPageKey, actionRef, pageSize]);
|
1126
1127
|
var onChangePaginationSize = (0, _react.useCallback)(function (currentPageSize) {
|
1127
1128
|
var _request10;
|
1128
1129
|
// 翻页默认清空选择
|
1129
1130
|
if (!reserveSelectedRecords) {
|
1130
|
-
var _actionRef$
|
1131
|
-
(_actionRef$
|
1131
|
+
var _actionRef$current9, _actionRef$current9$c;
|
1132
|
+
(_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);
|
1132
1133
|
}
|
1133
1134
|
setPageSize(currentPageSize);
|
1134
1135
|
setCurrentPage(1);
|