@frontegg/react-hooks 7.85.0-alpha.0 → 7.86.0
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,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["authenticatedUrl", "signUpSuccessUrl"];
|
|
3
|
+
const _excluded = ["authenticatedUrl", "signUpSuccessUrl", "openAppUrl"];
|
|
4
4
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
5
5
|
import { createStore } from '@frontegg/redux-store';
|
|
6
6
|
import { ContextHolder } from '@frontegg/rest-api';
|
|
@@ -50,10 +50,20 @@ const HideChildrenIfFronteggRoutes = ({
|
|
|
50
50
|
};
|
|
51
51
|
}, [checker, setUri]);
|
|
52
52
|
const calculatedBasename = basename ? basename.endsWith('/') ? basename.substring(0, basename.length - 1) : '' : '';
|
|
53
|
-
const
|
|
53
|
+
const {
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
55
|
+
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
57
|
+
|
|
58
|
+
openAppUrl
|
|
59
|
+
} = routes,
|
|
60
|
+
checkRoutes = _objectWithoutPropertiesLoose(routes, _excluded);
|
|
54
61
|
if (Object.values(checkRoutes).map(url => `${calculatedBasename}${url}`).indexOf(uri) !== -1) {
|
|
55
62
|
return null;
|
|
56
63
|
}
|
|
64
|
+
if (uri.startsWith(`${calculatedBasename}${openAppUrl}`)) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
57
67
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
58
68
|
children: children
|
|
59
69
|
});
|
package/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var _restApi = require("@frontegg/rest-api");
|
|
|
13
13
|
var _FronteggStoreContext = require("../FronteggStoreContext");
|
|
14
14
|
var _auth = require("../auth");
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
const _excluded = ["authenticatedUrl", "signUpSuccessUrl"];
|
|
16
|
+
const _excluded = ["authenticatedUrl", "signUpSuccessUrl", "openAppUrl"];
|
|
17
17
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
19
|
const defaultSetLoading = loading => {
|
|
@@ -57,10 +57,20 @@ const HideChildrenIfFronteggRoutes = ({
|
|
|
57
57
|
};
|
|
58
58
|
}, [checker, setUri]);
|
|
59
59
|
const calculatedBasename = basename ? basename.endsWith('/') ? basename.substring(0, basename.length - 1) : '' : '';
|
|
60
|
-
const
|
|
60
|
+
const {
|
|
61
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
62
|
+
|
|
63
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
64
|
+
|
|
65
|
+
openAppUrl
|
|
66
|
+
} = routes,
|
|
67
|
+
checkRoutes = (0, _objectWithoutPropertiesLoose2.default)(routes, _excluded);
|
|
61
68
|
if (Object.values(checkRoutes).map(url => `${calculatedBasename}${url}`).indexOf(uri) !== -1) {
|
|
62
69
|
return null;
|
|
63
70
|
}
|
|
71
|
+
if (uri.startsWith(`${calculatedBasename}${openAppUrl}`)) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
64
74
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
65
75
|
children: children
|
|
66
76
|
});
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/react-hooks",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.86.0",
|
|
4
4
|
"main": "./node/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Frontegg LTD",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@babel/runtime": "^7.18.6",
|
|
9
|
-
"@frontegg/redux-store": "7.
|
|
10
|
-
"@frontegg/types": "7.
|
|
9
|
+
"@frontegg/redux-store": "7.86.0",
|
|
10
|
+
"@frontegg/types": "7.86.0",
|
|
11
11
|
"@types/react": "*",
|
|
12
12
|
"@types/react-is": "^17.0.7",
|
|
13
13
|
"get-value": "^3.0.1",
|