@teamix/pro 1.5.6 → 1.5.7-beta.1

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/es/index.d.ts CHANGED
@@ -28,5 +28,5 @@ export * from './table';
28
28
  export * from './sidebar';
29
29
  export * from './utils';
30
30
  export * from './timeline';
31
- declare const version = "1.5.6";
31
+ declare const version = "1.5.7-beta.1";
32
32
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, hooks, nocode, templates, utils, };
package/es/index.js CHANGED
@@ -35,7 +35,7 @@ export * from './table';
35
35
  export * from './sidebar';
36
36
  export * from './utils';
37
37
  export * from './timeline';
38
- var version = '1.5.6';
38
+ var version = '1.5.7-beta.1';
39
39
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo,
40
40
  // ProLayout,
41
41
  ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, hooks, nocode, templates, utils };
@@ -1,5 +1,11 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ 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."); }
3
+ 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); }
4
+ 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; }
5
+ 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; }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1
7
  // 兼容 react-router-dom v5&v6,拿到真正的 history
2
- import { useEffect } from 'react';
8
+ import { useEffect, useState } from 'react';
3
9
  // import path from 'path';
4
10
  import { useHistory } from 'react-router-dom';
5
11
  var path = require('path-browserify');
@@ -8,16 +14,27 @@ var useRealHistory = function useRealHistory() {
8
14
  if (useHistory) {
9
15
  history = useHistory();
10
16
  }
17
+ var _useState = useState(history),
18
+ _useState2 = _slicedToArray(_useState, 2),
19
+ realHistory = _useState2[0],
20
+ setRealHistory = _useState2[1];
11
21
  useEffect(function () {
12
22
  if (window.HistoryLibrary) {
13
23
  history = window.HistoryLibrary.createBrowserHistory();
14
24
  var oldPush = history.push;
15
25
  history.push = function (p) {
16
- var _window$ICESTARK;
17
- oldPush(path.join(((_window$ICESTARK = window.ICESTARK) === null || _window$ICESTARK === void 0 ? void 0 : _window$ICESTARK.basename) || '/', p));
26
+ if (typeof p === 'string') {
27
+ var _window$ICESTARK;
28
+ oldPush(path.join(((_window$ICESTARK = window.ICESTARK) === null || _window$ICESTARK === void 0 ? void 0 : _window$ICESTARK.basename) || '/', p));
29
+ } else {
30
+ var _window$ICESTARK2;
31
+ p.pathname = path.join(((_window$ICESTARK2 = window.ICESTARK) === null || _window$ICESTARK2 === void 0 ? void 0 : _window$ICESTARK2.basename) || '/', p.pathname);
32
+ oldPush(p);
33
+ }
18
34
  };
35
+ setRealHistory(history);
19
36
  }
20
37
  }, []);
21
- return history;
38
+ return realHistory;
22
39
  };
23
40
  export default useRealHistory;
package/lib/index.d.ts CHANGED
@@ -28,5 +28,5 @@ export * from './table';
28
28
  export * from './sidebar';
29
29
  export * from './utils';
30
30
  export * from './timeline';
31
- declare const version = "1.5.6";
31
+ declare const version = "1.5.7-beta.1";
32
32
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, hooks, nocode, templates, utils, };
package/lib/index.js CHANGED
@@ -280,5 +280,5 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
280
280
  if (!((_window = window) === null || _window === void 0 ? void 0 : _window.TEAMIXPRO_WITHOUT_ICON)) {
281
281
  _icon.default.setConfig(_utils.default.getTeamixIconConfig());
282
282
  }
283
- var version = '1.5.6';
283
+ var version = '1.5.7-beta.1';
284
284
  exports.version = version;
@@ -6,27 +6,40 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _react = require("react");
8
8
  var _reactRouterDom = require("react-router-dom");
9
- // 兼容 react-router-dom v5&v6,拿到真正的 history
10
-
11
- // import path from 'path';
12
-
9
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
10
+ 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."); }
11
+ 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); }
12
+ 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; }
13
+ 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; }
14
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
15
  var path = require('path-browserify');
14
16
  var useRealHistory = function useRealHistory() {
15
17
  var history;
16
18
  if (_reactRouterDom.useHistory) {
17
19
  history = (0, _reactRouterDom.useHistory)();
18
20
  }
21
+ var _useState = (0, _react.useState)(history),
22
+ _useState2 = _slicedToArray(_useState, 2),
23
+ realHistory = _useState2[0],
24
+ setRealHistory = _useState2[1];
19
25
  (0, _react.useEffect)(function () {
20
26
  if (window.HistoryLibrary) {
21
27
  history = window.HistoryLibrary.createBrowserHistory();
22
28
  var oldPush = history.push;
23
29
  history.push = function (p) {
24
- var _window$ICESTARK;
25
- oldPush(path.join(((_window$ICESTARK = window.ICESTARK) === null || _window$ICESTARK === void 0 ? void 0 : _window$ICESTARK.basename) || '/', p));
30
+ if (typeof p === 'string') {
31
+ var _window$ICESTARK;
32
+ oldPush(path.join(((_window$ICESTARK = window.ICESTARK) === null || _window$ICESTARK === void 0 ? void 0 : _window$ICESTARK.basename) || '/', p));
33
+ } else {
34
+ var _window$ICESTARK2;
35
+ p.pathname = path.join(((_window$ICESTARK2 = window.ICESTARK) === null || _window$ICESTARK2 === void 0 ? void 0 : _window$ICESTARK2.basename) || '/', p.pathname);
36
+ oldPush(p);
37
+ }
26
38
  };
39
+ setRealHistory(history);
27
40
  }
28
41
  }, []);
29
- return history;
42
+ return realHistory;
30
43
  };
31
44
  var _default = useRealHistory;
32
45
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamix/pro",
3
- "version": "1.5.6",
3
+ "version": "1.5.7-beta.1",
4
4
  "description": "TeamixPro大包",
5
5
  "keywords": [
6
6
  "aliyun",