@teamix/pro 1.5.48 → 1.5.53
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 +1375 -56
- package/dist/pro.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/page-header/index.js +2 -2
- package/es/table/index.js +8 -3
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/page-header/index.js +1 -1
- package/lib/table/index.js +7 -2
- 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.52";
|
|
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
package/es/page-header/index.js
CHANGED
|
@@ -8,7 +8,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
8
8
|
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; }
|
|
9
9
|
import React from 'react';
|
|
10
10
|
// import { useHistory } from 'react-router-dom';
|
|
11
|
-
import {
|
|
11
|
+
import { useRouterHistory } from '@teamix/utils';
|
|
12
12
|
import classnames from 'classnames';
|
|
13
13
|
import TeamixIcon from '@teamix/icon';
|
|
14
14
|
import { Breadcrumb, Balloon } from '@alicloudfe/components';
|
|
@@ -132,7 +132,7 @@ var ProPageHeader = function ProPageHeader(props) {
|
|
|
132
132
|
style = props.style,
|
|
133
133
|
tabs = props.tabs,
|
|
134
134
|
others = _objectWithoutProperties(props, _excluded3);
|
|
135
|
-
var history =
|
|
135
|
+
var history = useRouterHistory();
|
|
136
136
|
var backgroundImage = image ? "url('".concat(image, "')") : undefined;
|
|
137
137
|
var showList = function showList(list) {
|
|
138
138
|
var _list$actions;
|
package/es/table/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["header", "className", "tableClassName", "mainAction", "extra", "dataFilter", "afterDataFilter", "toolBar", "columns", "useRowSelection", "rowSelection", "onChangeRowSelection", "getRowSelection", "primaryKey", "footerAction", "footer", "url", "pageKey", "pageSizeKey", "method", "params", "formatSort", "formatParams", "formatResult", "requestConfig", "requestWhenMount", "showPagination", "pageSizeList", "responsivePaginationType", "showSkeleton", "skeletonSize", "actionRef", "dataSource", "filterDebounce", "footerSuction", "autoRefresh", "autoRefreshProps", "customRequest", "filterColumnType", "defaultFilterParams", "reserveSelectedRecords", "size", "disableSelectAll", "context", "autoWidth", "fixedTableBody", "isTree", "toolBarAutoWidth", "data-teamix-spm", "switchCardView", "cardViewProps", "defaultView", "emptyProps", "bindUrlProps", "
|
|
1
|
+
var _excluded = ["header", "className", "tableClassName", "mainAction", "extra", "dataFilter", "afterDataFilter", "toolBar", "columns", "useRowSelection", "rowSelection", "onChangeRowSelection", "getRowSelection", "primaryKey", "footerAction", "footer", "url", "pageKey", "pageSizeKey", "method", "params", "formatSort", "formatParams", "formatResult", "requestConfig", "requestWhenMount", "showPagination", "pageSizeList", "responsivePaginationType", "showSkeleton", "skeletonSize", "actionRef", "dataSource", "filterDebounce", "footerSuction", "autoRefresh", "autoRefreshProps", "customRequest", "filterColumnType", "defaultFilterParams", "reserveSelectedRecords", "size", "disableSelectAll", "context", "autoWidth", "fixedTableBody", "isTree", "toolBarAutoWidth", "data-teamix-spm", "switchCardView", "cardViewProps", "defaultView", "emptyProps", "bindUrlProps", "autoRedirect", "useMaxData"],
|
|
2
2
|
_excluded2 = ["onChange", "onPageSizeChange"];
|
|
3
3
|
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); }
|
|
4
4
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
@@ -34,7 +34,7 @@ import ProPageContainer from '../page-container';
|
|
|
34
34
|
import { genAutoWidthColumns, shadowContainer, shadowActionColumnContainer } from './utils/genAutoWidthColumns';
|
|
35
35
|
import debounce from 'lodash.debounce';
|
|
36
36
|
import CardView from './components/CardView';
|
|
37
|
-
import { useUrlState } from '@teamix/hooks';
|
|
37
|
+
import { useUrlState, useInRouter } from '@teamix/hooks';
|
|
38
38
|
import { getUrlStateFilter } from './utils/util';
|
|
39
39
|
import processColumns from './utils/processColumns';
|
|
40
40
|
export * from './typing';
|
|
@@ -127,11 +127,16 @@ var ProTable = function ProTable(props) {
|
|
|
127
127
|
defaultView = _props$defaultView === void 0 ? 'table' : _props$defaultView,
|
|
128
128
|
emptyProps = props.emptyProps,
|
|
129
129
|
bindUrlProps = props.bindUrlProps,
|
|
130
|
-
bindUrl = props.bindUrl,
|
|
131
130
|
_props$autoRedirect = props.autoRedirect,
|
|
132
131
|
autoRedirect = _props$autoRedirect === void 0 ? true : _props$autoRedirect,
|
|
133
132
|
useMaxData = props.useMaxData,
|
|
134
133
|
otherProps = _objectWithoutProperties(props, _excluded);
|
|
134
|
+
var bindUrl = props.bindUrl;
|
|
135
|
+
var inRouter = useInRouter();
|
|
136
|
+
if (bindUrl && !inRouter) {
|
|
137
|
+
console.warn('bindUrl 功能必须在正确的 Router 组件环境内使用。已自动关闭');
|
|
138
|
+
bindUrl = false;
|
|
139
|
+
}
|
|
135
140
|
var targetPageKey = pageKey || globalPageKey;
|
|
136
141
|
var targetPageSizeKey = pageSizeKey || globalPageSizeKey;
|
|
137
142
|
var targetFormatSort = formatSort || globalFormatSort;
|
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.52";
|
|
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.52';
|
|
303
303
|
// By TeamixTest
|
|
304
304
|
exports.version = version;
|
|
305
305
|
window.postMessage({
|
package/lib/page-header/index.js
CHANGED
|
@@ -137,7 +137,7 @@ var ProPageHeader = function ProPageHeader(props) {
|
|
|
137
137
|
style = props.style,
|
|
138
138
|
tabs = props.tabs,
|
|
139
139
|
others = _objectWithoutProperties(props, _excluded3);
|
|
140
|
-
var history = (0, _utils.
|
|
140
|
+
var history = (0, _utils.useRouterHistory)();
|
|
141
141
|
var backgroundImage = image ? "url('".concat(image, "')") : undefined;
|
|
142
142
|
var showList = function showList(list) {
|
|
143
143
|
var _list$actions;
|
package/lib/table/index.js
CHANGED
|
@@ -38,7 +38,7 @@ Object.keys(_typing).forEach(function (key) {
|
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
|
-
var _excluded = ["header", "className", "tableClassName", "mainAction", "extra", "dataFilter", "afterDataFilter", "toolBar", "columns", "useRowSelection", "rowSelection", "onChangeRowSelection", "getRowSelection", "primaryKey", "footerAction", "footer", "url", "pageKey", "pageSizeKey", "method", "params", "formatSort", "formatParams", "formatResult", "requestConfig", "requestWhenMount", "showPagination", "pageSizeList", "responsivePaginationType", "showSkeleton", "skeletonSize", "actionRef", "dataSource", "filterDebounce", "footerSuction", "autoRefresh", "autoRefreshProps", "customRequest", "filterColumnType", "defaultFilterParams", "reserveSelectedRecords", "size", "disableSelectAll", "context", "autoWidth", "fixedTableBody", "isTree", "toolBarAutoWidth", "data-teamix-spm", "switchCardView", "cardViewProps", "defaultView", "emptyProps", "bindUrlProps", "
|
|
41
|
+
var _excluded = ["header", "className", "tableClassName", "mainAction", "extra", "dataFilter", "afterDataFilter", "toolBar", "columns", "useRowSelection", "rowSelection", "onChangeRowSelection", "getRowSelection", "primaryKey", "footerAction", "footer", "url", "pageKey", "pageSizeKey", "method", "params", "formatSort", "formatParams", "formatResult", "requestConfig", "requestWhenMount", "showPagination", "pageSizeList", "responsivePaginationType", "showSkeleton", "skeletonSize", "actionRef", "dataSource", "filterDebounce", "footerSuction", "autoRefresh", "autoRefreshProps", "customRequest", "filterColumnType", "defaultFilterParams", "reserveSelectedRecords", "size", "disableSelectAll", "context", "autoWidth", "fixedTableBody", "isTree", "toolBarAutoWidth", "data-teamix-spm", "switchCardView", "cardViewProps", "defaultView", "emptyProps", "bindUrlProps", "autoRedirect", "useMaxData"],
|
|
42
42
|
_excluded2 = ["onChange", "onPageSizeChange"];
|
|
43
43
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
44
44
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -148,11 +148,16 @@ var ProTable = function ProTable(props) {
|
|
|
148
148
|
defaultView = _props$defaultView === void 0 ? 'table' : _props$defaultView,
|
|
149
149
|
emptyProps = props.emptyProps,
|
|
150
150
|
bindUrlProps = props.bindUrlProps,
|
|
151
|
-
bindUrl = props.bindUrl,
|
|
152
151
|
_props$autoRedirect = props.autoRedirect,
|
|
153
152
|
autoRedirect = _props$autoRedirect === void 0 ? true : _props$autoRedirect,
|
|
154
153
|
useMaxData = props.useMaxData,
|
|
155
154
|
otherProps = _objectWithoutProperties(props, _excluded);
|
|
155
|
+
var bindUrl = props.bindUrl;
|
|
156
|
+
var inRouter = (0, _hooks.useInRouter)();
|
|
157
|
+
if (bindUrl && !inRouter) {
|
|
158
|
+
console.warn('bindUrl 功能必须在正确的 Router 组件环境内使用。已自动关闭');
|
|
159
|
+
bindUrl = false;
|
|
160
|
+
}
|
|
156
161
|
var targetPageKey = pageKey || globalPageKey;
|
|
157
162
|
var targetPageSizeKey = pageSizeKey || globalPageSizeKey;
|
|
158
163
|
var targetFormatSort = formatSort || globalFormatSort;
|