oidc-spa 7.1.4 → 7.1.6
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/core/createOidc.js +1 -1
- package/package.json +1 -6
- package/react/tools/NoSsr.d.ts +0 -14
- package/react/tools/NoSsr.js +0 -43
- package/react/tools/NoSsr.js.map +0 -1
- package/src/react/tools/NoSsr.tsx +0 -26
package/core/createOidc.js
CHANGED
|
@@ -125,7 +125,7 @@ var trustedFetch_1 = require("./trustedFetch");
|
|
|
125
125
|
var getIsOnline_1 = require("../tools/getIsOnline");
|
|
126
126
|
(0, handleOidcCallback_1.handleOidcCallback)();
|
|
127
127
|
// NOTE: Replaced at build time
|
|
128
|
-
var VERSION = "7.1.
|
|
128
|
+
var VERSION = "7.1.6";
|
|
129
129
|
var globalContext = {
|
|
130
130
|
prOidcByConfigId: new Map(),
|
|
131
131
|
hasLogoutBeenCalled: (0, tsafe_1.id)(false),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oidc-spa",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.6",
|
|
4
4
|
"description": "Openidconnect client for Single Page Applications",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
".": "./index.js",
|
|
13
13
|
"./mock": "./mock/index.js",
|
|
14
14
|
"./react": "./react/index.js",
|
|
15
|
-
"./react/tools/NoSsr": "./react/tools/NoSsr.js",
|
|
16
15
|
"./mock/react": "./mock/react.js",
|
|
17
16
|
"./entrypoint": "./entrypoint.js",
|
|
18
17
|
"./backend": "./backend.js",
|
|
@@ -60,7 +59,6 @@
|
|
|
60
59
|
"./src/mock/react.tsx",
|
|
61
60
|
"./src/react/index.ts",
|
|
62
61
|
"./src/react/react.tsx",
|
|
63
|
-
"./src/react/tools/NoSsr.tsx",
|
|
64
62
|
"./src/tools/Deferred.ts",
|
|
65
63
|
"./src/tools/EphemeralSessionStorage.ts",
|
|
66
64
|
"./src/tools/Evt.ts",
|
|
@@ -178,9 +176,6 @@
|
|
|
178
176
|
"./react/react.d.ts",
|
|
179
177
|
"./react/react.js",
|
|
180
178
|
"./react/react.js.map",
|
|
181
|
-
"./react/tools/NoSsr.d.ts",
|
|
182
|
-
"./react/tools/NoSsr.js",
|
|
183
|
-
"./react/tools/NoSsr.js.map",
|
|
184
179
|
"./tools/Deferred.d.ts",
|
|
185
180
|
"./tools/Deferred.js",
|
|
186
181
|
"./tools/Deferred.js.map",
|
package/react/tools/NoSsr.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* There is nothing specific to OIDC with this component.
|
|
3
|
-
* This is provided purely for convenance, feel free to use your own
|
|
4
|
-
* tooling.
|
|
5
|
-
*
|
|
6
|
-
* This is a trivial implementation of a No Server Side Rendering
|
|
7
|
-
* boundary.
|
|
8
|
-
* The children will only be rendered in the client side.
|
|
9
|
-
* You can optionally provide a fallback that will be rendered by the server.
|
|
10
|
-
*/
|
|
11
|
-
export declare function NoSsr(props: {
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
fallback?: React.ReactNode;
|
|
14
|
-
}): import("react/jsx-runtime").JSX.Element;
|
package/react/tools/NoSsr.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
3
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
4
|
-
if (!m) return o;
|
|
5
|
-
var i = m.call(o), r, ar = [], e;
|
|
6
|
-
try {
|
|
7
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
8
|
-
}
|
|
9
|
-
catch (error) { e = { error: error }; }
|
|
10
|
-
finally {
|
|
11
|
-
try {
|
|
12
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
13
|
-
}
|
|
14
|
-
finally { if (e) throw e.error; }
|
|
15
|
-
}
|
|
16
|
-
return ar;
|
|
17
|
-
};
|
|
18
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.NoSsr = NoSsr;
|
|
20
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
21
|
-
var react_1 = require("react");
|
|
22
|
-
/**
|
|
23
|
-
* There is nothing specific to OIDC with this component.
|
|
24
|
-
* This is provided purely for convenance, feel free to use your own
|
|
25
|
-
* tooling.
|
|
26
|
-
*
|
|
27
|
-
* This is a trivial implementation of a No Server Side Rendering
|
|
28
|
-
* boundary.
|
|
29
|
-
* The children will only be rendered in the client side.
|
|
30
|
-
* You can optionally provide a fallback that will be rendered by the server.
|
|
31
|
-
*/
|
|
32
|
-
function NoSsr(props) {
|
|
33
|
-
var children = props.children, fallback = props.fallback;
|
|
34
|
-
var _a = __read((0, react_1.useState)(false), 2), isHydrated = _a[0], setIsHydrated = _a[1];
|
|
35
|
-
(0, react_1.useEffect)(function () {
|
|
36
|
-
setIsHydrated(true);
|
|
37
|
-
}, []);
|
|
38
|
-
if (!isHydrated) {
|
|
39
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: fallback !== null && fallback !== void 0 ? fallback : null });
|
|
40
|
-
}
|
|
41
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=NoSsr.js.map
|
package/react/tools/NoSsr.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NoSsr.js","sourceRoot":"","sources":["../../src/react/tools/NoSsr.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAYA,sBAaC;;AAzBD,+BAA4C;AAE5C;;;;;;;;;GASG;AACH,SAAgB,KAAK,CAAC,KAAgE;IAC1E,IAAA,QAAQ,GAAe,KAAK,SAApB,EAAE,QAAQ,GAAK,KAAK,SAAV,CAAW;IAE/B,IAAA,KAAA,OAA8B,IAAA,gBAAQ,EAAC,KAAK,CAAC,IAAA,EAA5C,UAAU,QAAA,EAAE,aAAa,QAAmB,CAAC;IACpD,IAAA,iBAAS,EAAC;QACN,aAAa,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAI,CAAC,UAAU,EAAE,CAAC;QACd,OAAO,2DAAG,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,IAAI,GAAI,CAAC;IACnC,CAAC;IAED,OAAO,2DAAG,QAAQ,GAAI,CAAC;AAC3B,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect } from "react";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* There is nothing specific to OIDC with this component.
|
|
5
|
-
* This is provided purely for convenance, feel free to use your own
|
|
6
|
-
* tooling.
|
|
7
|
-
*
|
|
8
|
-
* This is a trivial implementation of a No Server Side Rendering
|
|
9
|
-
* boundary.
|
|
10
|
-
* The children will only be rendered in the client side.
|
|
11
|
-
* You can optionally provide a fallback that will be rendered by the server.
|
|
12
|
-
*/
|
|
13
|
-
export function NoSsr(props: { children: React.ReactNode; fallback?: React.ReactNode }) {
|
|
14
|
-
const { children, fallback } = props;
|
|
15
|
-
|
|
16
|
-
const [isHydrated, setIsHydrated] = useState(false);
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
setIsHydrated(true);
|
|
19
|
-
}, []);
|
|
20
|
-
|
|
21
|
-
if (!isHydrated) {
|
|
22
|
-
return <>{fallback ?? null}</>;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return <>{children}</>;
|
|
26
|
-
}
|