antd-management-fast-framework 1.12.32 → 1.12.33

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.
@@ -20,7 +20,7 @@ export function buildButton({ key: keySource, type: typeSource, size: sizeSource
20
20
  showIcon?: boolean | undefined;
21
21
  }): JSX.Element | null;
22
22
  export function buildDropdownButton({ key, tooltip, placement, type: typeSource, size, text, icon, handleData: r, arrow, disabled, hidden, confirm, handleButtonClick, handleMenuClick, menuItems, }: {
23
- key?: any;
23
+ key?: string | undefined;
24
24
  tooltip?: boolean | undefined;
25
25
  placement?: string | undefined;
26
26
  type?: string | undefined;
@@ -37,7 +37,7 @@ export function buildDropdownButton({ key, tooltip, placement, type: typeSource,
37
37
  menuItems?: any[] | undefined;
38
38
  }): JSX.Element | null;
39
39
  export function buildDropdownEllipsis({ key, tooltip, type: typeSource, size, icon, arrow, disabled, hidden, handleData: r, handleMenuClick, menuItems, }: {
40
- key?: any;
40
+ key?: string | undefined;
41
41
  tooltip?: {
42
42
  placement: string;
43
43
  title: string;
@@ -53,7 +53,7 @@ export function buildDropdownEllipsis({ key, tooltip, type: typeSource, size, ic
53
53
  menuItems?: any[] | undefined;
54
54
  }): JSX.Element | null;
55
55
  export function buildDropdown({ key, tooltip: tooltipSource, type: typeSource, placement: placementDropdown, size, text, icon, handleData: r, arrow, disabled, hidden, handleButtonClick, handleMenuClick, menuItems, confirm, processing, iconProcessing, }: {
56
- key?: any;
56
+ key?: string | undefined;
57
57
  tooltip?: boolean | undefined;
58
58
  type?: string | undefined;
59
59
  placement?: string | undefined;
@@ -7,8 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = void 0;
9
9
 
10
- var _umi = require("umi");
11
-
12
10
  var _tools = require("../../utils/tools");
13
11
 
14
12
  var _authority = require("../../utils/authority");
@@ -70,8 +68,7 @@ var AuthorizationWrapper = /*#__PURE__*/function (_SupplementWrapper) {
70
68
  (0, _tools.showRuntimeError)({
71
69
  message: text
72
70
  });
73
-
74
- _umi.history.replace('/exception/404');
71
+ (0, _tools.redirectToPath)('/exception/404');
75
72
  }
76
73
 
77
74
  if (needDoOther) {
@@ -7,8 +7,6 @@ exports.default = void 0;
7
7
 
8
8
  var _react = require("react");
9
9
 
10
- var _umi = require("umi");
11
-
12
10
  var _nprogress = _interopRequireDefault(require("nprogress"));
13
11
 
14
12
  var _tools = require("../../utils/tools");
@@ -205,7 +203,7 @@ var Base = /*#__PURE__*/function (_Component) {
205
203
  }, 400);
206
204
  }
207
205
 
208
- _umi.history.push(location);
206
+ (0, _tools.goToPath)(location);
209
207
  };
210
208
 
211
209
  _this.redirectToPath = function (path) {
@@ -221,7 +219,7 @@ var Base = /*#__PURE__*/function (_Component) {
221
219
  }, 400);
222
220
  }
223
221
 
224
- _umi.history.replace(location);
222
+ (0, _tools.redirectToPath)(location);
225
223
  };
226
224
 
227
225
  _this.checkHasMore = function (pageNo, pageSize, total) {
@@ -6,7 +6,7 @@
6
6
  */
7
7
  export function empty(): {};
8
8
  export namespace proLayoutDefaultProps {
9
- function onMenuHeaderClick(): any;
9
+ function onMenuHeaderClick(): void;
10
10
  function itemRender(route: any, params: any, routes: any, paths: any): JSX.Element;
11
11
  function menuItemRender(menuItemProps: any, defaultDom: any): any;
12
12
  }
@@ -23,7 +23,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
23
23
  */
24
24
  var proLayoutDefaultProps = {
25
25
  onMenuHeaderClick: function onMenuHeaderClick() {
26
- return history.push('/');
26
+ return (0, _tools.goToPath)('/');
27
27
  },
28
28
  itemRender: function itemRender(route, params, routes, paths) {
29
29
  var first = routes.indexOf(route) === 0;
@@ -15,8 +15,6 @@ var _notification2 = _interopRequireDefault(require("antd/es/notification"));
15
15
 
16
16
  var _umiRequest = require("umi-request");
17
17
 
18
- var _umi = require("umi");
19
-
20
18
  var _tools = require("./tools");
21
19
 
22
20
  var _globalStorageAssist = require("./globalStorageAssist");
@@ -229,9 +227,7 @@ request.interceptors.response.use(function (response) {
229
227
 
230
228
  _message2.default.info('登陆超时,请重新登录!', 0.6);
231
229
 
232
- _umi.history.replace({
233
- pathname: entrancePath
234
- });
230
+ (0, _tools.redirectToPath)(entrancePath);
235
231
  }, 200);
236
232
  }
237
233
  }).catch(function (o) {
@@ -19,8 +19,6 @@ require("antd/es/message/style");
19
19
 
20
20
  var _message2 = _interopRequireDefault(require("antd/es/message"));
21
21
 
22
- var _umi = require("umi");
23
-
24
22
  var _tools = require("./tools");
25
23
 
26
24
  var _globalStorageAssist = require("./globalStorageAssist");
@@ -108,7 +106,7 @@ function dataExceptionNotice(d) {
108
106
  }
109
107
 
110
108
  requestAnimationFrame(function () {
111
- _umi.history.replace(entrancePath);
109
+ (0, _tools.redirectToPath)(entrancePath);
112
110
  });
113
111
  }
114
112
  }
@@ -498,9 +496,7 @@ function _request() {
498
496
 
499
497
  _message2.default.info('登陆超时,请重新登录!', 0.6);
500
498
 
501
- _umi.history.replace({
502
- pathname: entrancePath
503
- });
499
+ (0, _tools.redirectToPath)(entrancePath);
504
500
  }, 400);
505
501
  _context.next = 27;
506
502
  break;
@@ -188,6 +188,8 @@ export function checkDevelopment(): boolean;
188
188
  * @returns
189
189
  */
190
190
  export function corsTarget(): string;
191
+ export function goToPath(path: any): void;
192
+ export function redirectToPath(path: any): void;
191
193
  export function showError(text: any): void;
192
194
  export function showRuntimeError({ message: messageText, showStack }: {
193
195
  message: any;
@@ -278,7 +280,7 @@ export function recordObject(record: any, level?: string): void;
278
280
  * @param {*} v
279
281
  * @returns
280
282
  */
281
- export function getGuid(): any;
283
+ export function getGuid(): string;
282
284
  /**
283
285
  * 检测目标是否在数组址之中
284
286
  */
@@ -303,7 +305,7 @@ export function formatDatetime({ data, format, defaultValue, timeZone, }: any):
303
305
  /**
304
306
  * 格式化数字
305
307
  */
306
- export function numeralFormat(v: any, formatString: any): any;
308
+ export function numeralFormat(v: any, formatString: any): string;
307
309
  /**
308
310
  * 当前Moment时间
309
311
  *
@@ -490,7 +492,7 @@ export function seededRandom({ seed, min, max }: {
490
492
  * @param {*} seed
491
493
  * @returns
492
494
  */
493
- export function getRandomColor({ seed, hue, luminosity, count, format, alpha, }: any): any;
495
+ export function getRandomColor({ seed, hue, luminosity, count, format, alpha, }: any): string[];
494
496
  /**
495
497
  * 获取浏览器信息
496
498
  *
package/es/utils/tools.js CHANGED
@@ -58,6 +58,7 @@ exports.getStringFromSessionStorage = getStringFromSessionStorage;
58
58
  exports.getTimeDistance = getTimeDistance;
59
59
  exports.getValue = getValue;
60
60
  exports.getValueByKey = getValueByKey;
61
+ exports.goToPath = goToPath;
61
62
  exports.inCollection = inCollection;
62
63
  exports.isArray = isArray;
63
64
  exports.isBoolean = isBoolean;
@@ -86,6 +87,7 @@ exports.recordLog = recordLog;
86
87
  exports.recordObject = recordObject;
87
88
  exports.recordText = recordText;
88
89
  exports.recordWarn = recordWarn;
90
+ exports.redirectToPath = redirectToPath;
89
91
  exports.refitCommonData = refitCommonData;
90
92
  exports.refitFieldDecoratorOption = refitFieldDecoratorOption;
91
93
  exports.removeEndMatch = removeEndMatch;
@@ -162,6 +164,8 @@ var _arrayMove = require("array-move");
162
164
 
163
165
  var _lodash = require("lodash");
164
166
 
167
+ var _umi = require("umi");
168
+
165
169
  var _constants = require("./constants");
166
170
 
167
171
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -397,6 +401,14 @@ function corsTarget() {
397
401
  return corsTargetDomain;
398
402
  }
399
403
 
404
+ function goToPath(path) {
405
+ _umi.history.push(path);
406
+ }
407
+
408
+ function redirectToPath(path) {
409
+ _umi.history.replace(path);
410
+ }
411
+
400
412
  function showError(text) {
401
413
  showErrorMessage({
402
414
  message: text
@@ -15,8 +15,6 @@ require("antd/es/message/style");
15
15
 
16
16
  var _message2 = _interopRequireDefault(require("antd/es/message"));
17
17
 
18
- var _umi = require("umi");
19
-
20
18
  var _tools = require("./tools");
21
19
 
22
20
  var _globalStorageAssist = require("./globalStorageAssist");
@@ -180,7 +178,7 @@ function _apiVirtualSuccessAccess() {
180
178
  throw new Error('缺少登录页面路径配置');
181
179
 
182
180
  case 9:
183
- _umi.history.push(entrancePath);
181
+ (0, _tools.goToPath)(entrancePath);
184
182
 
185
183
  case 10:
186
184
  return _context.abrupt("return", result);
@@ -240,8 +238,7 @@ function _apiVirtualFailAccess() {
240
238
  throw new Error('缺少登录页面路径配置');
241
239
 
242
240
  case 9:
243
- _umi.history.push(entrancePath);
244
-
241
+ (0, _tools.goToPath)(entrancePath);
245
242
  _context2.next = 13;
246
243
  break;
247
244
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antd-management-fast-framework",
3
- "version": "1.12.32",
3
+ "version": "1.12.33",
4
4
  "description": "antd-management-fast-framework",
5
5
  "keywords": [
6
6
  "antd-management-fast-framework"
@@ -99,7 +99,10 @@
99
99
  "@types/jest": "^27.5.1",
100
100
  "@types/node": "^17.0.33",
101
101
  "@types/nprogress": "^0.2.0",
102
+ "@types/numeral": "^2.0.2",
103
+ "@types/randomcolor": "^0.5.6",
102
104
  "@types/react-document-title": "^2.0.5",
105
+ "@types/uuid": "^8.3.4",
103
106
  "@typescript-eslint/eslint-plugin": "^5.23.0",
104
107
  "@umijs/fabric": "^2.10.2",
105
108
  "@umijs/test": "^3.5.21",
@@ -171,5 +174,5 @@
171
174
  "bugs": {
172
175
  "url": "https://github.com/kityandhero/antd-management-fast-framework/issues"
173
176
  },
174
- "gitHead": "5823b3c7b18488d7bc8625f24cb0d6072f25f85b"
177
+ "gitHead": "8cebc1752c8654c36ccd9eef0edd74e987f6c7a9"
175
178
  }