@teamix/pro 1.5.8 → 1.5.10

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.
@@ -1,45 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = require("react");
8
- var _reactRouterDom = require("react-router-dom");
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; }
15
- var path = require('path-browserify');
16
- var useRealHistory = function useRealHistory() {
17
- var history;
18
- if (_reactRouterDom.useHistory) {
19
- history = (0, _reactRouterDom.useHistory)();
20
- }
21
- var _useState = (0, _react.useState)(history),
22
- _useState2 = _slicedToArray(_useState, 2),
23
- realHistory = _useState2[0],
24
- setRealHistory = _useState2[1];
25
- (0, _react.useEffect)(function () {
26
- if (window.HistoryLibrary) {
27
- history = window.HistoryLibrary.createBrowserHistory();
28
- var oldPush = history.push;
29
- history.push = function (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
- }
38
- };
39
- setRealHistory(history);
40
- }
41
- }, []);
42
- return realHistory;
43
- };
44
- var _default = useRealHistory;
45
- exports.default = _default;