@elliemae/pui-app-sdk 5.3.8 → 5.3.9
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.
|
@@ -34,12 +34,18 @@ const Login = ({
|
|
|
34
34
|
}) => {
|
|
35
35
|
const [userAuthorized, setUserAuthorized] = (0, import_react.useState)(false);
|
|
36
36
|
const dispatch = (0, import_react2.useAppDispatch)();
|
|
37
|
+
const ref = (0, import_react.useRef)(false);
|
|
37
38
|
(0, import_react.useEffect)(() => {
|
|
39
|
+
if (ref.current)
|
|
40
|
+
return;
|
|
41
|
+
ref.current = true;
|
|
38
42
|
(0, import_auth.login)({ clientId, scope, responseType }).then(({ authorized }) => {
|
|
39
43
|
if (authorized)
|
|
40
44
|
setUserAuthorized(true);
|
|
41
45
|
dispatch({ type: import_actions.LOGIN_SUCCESS });
|
|
42
46
|
}).catch(() => {
|
|
47
|
+
}).finally(() => {
|
|
48
|
+
ref.current = false;
|
|
43
49
|
});
|
|
44
50
|
}, [dispatch, clientId, scope, responseType]);
|
|
45
51
|
return userAuthorized ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children }) : null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from "react";
|
|
2
|
+
import { useEffect, useState, useRef } from "react";
|
|
3
3
|
import { useAppDispatch } from "../../data/react.js";
|
|
4
4
|
import { login } from "../../utils/auth/index.js";
|
|
5
5
|
import { LOGIN_SUCCESS } from "../../data/auth/actions.js";
|
|
@@ -11,12 +11,18 @@ const Login = ({
|
|
|
11
11
|
}) => {
|
|
12
12
|
const [userAuthorized, setUserAuthorized] = useState(false);
|
|
13
13
|
const dispatch = useAppDispatch();
|
|
14
|
+
const ref = useRef(false);
|
|
14
15
|
useEffect(() => {
|
|
16
|
+
if (ref.current)
|
|
17
|
+
return;
|
|
18
|
+
ref.current = true;
|
|
15
19
|
login({ clientId, scope, responseType }).then(({ authorized }) => {
|
|
16
20
|
if (authorized)
|
|
17
21
|
setUserAuthorized(true);
|
|
18
22
|
dispatch({ type: LOGIN_SUCCESS });
|
|
19
23
|
}).catch(() => {
|
|
24
|
+
}).finally(() => {
|
|
25
|
+
ref.current = false;
|
|
20
26
|
});
|
|
21
27
|
}, [dispatch, clientId, scope, responseType]);
|
|
22
28
|
return userAuthorized ? /* @__PURE__ */ jsx(Fragment, { children }) : null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-app-sdk",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.9",
|
|
4
4
|
"description": "ICE MT UI Platform Application SDK ",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"indent": 4
|
|
112
112
|
},
|
|
113
113
|
"peerDependencies": {
|
|
114
|
-
"@elliemae/app-react-dependencies": "^4.
|
|
114
|
+
"@elliemae/app-react-dependencies": "^4.11.0",
|
|
115
115
|
"@elliemae/ds-backdrop": "^3.14.16",
|
|
116
116
|
"@elliemae/ds-basic": "^3.14.16",
|
|
117
117
|
"@elliemae/ds-button": "^3.14.16",
|
|
@@ -126,16 +126,17 @@
|
|
|
126
126
|
"@elliemae/ds-modal": "^3.14.16",
|
|
127
127
|
"@elliemae/ds-popperjs": "^3.14.16",
|
|
128
128
|
"@elliemae/ds-toast": "^3.14.16",
|
|
129
|
+
"@elliemae/ds-utilities": "^3.14.16",
|
|
129
130
|
"@elliemae/em-ssf-guest": "^1.11.3",
|
|
130
|
-
"@elliemae/pui-diagnostics": "^3.
|
|
131
|
+
"@elliemae/pui-diagnostics": "^3.4.0",
|
|
131
132
|
"@elliemae/pui-micro-frontend-base": "^1.14.0",
|
|
132
|
-
"@elliemae/pui-scripting-object": "^1.
|
|
133
|
+
"@elliemae/pui-scripting-object": "^1.27.0",
|
|
133
134
|
"@elliemae/pui-theme": "^2.7.0",
|
|
134
|
-
"@elliemae/pui-user-monitoring": "^1.
|
|
135
|
+
"@elliemae/pui-user-monitoring": "^1.22.0"
|
|
135
136
|
},
|
|
136
137
|
"devDependencies": {
|
|
137
|
-
"@elliemae/app-react-dependencies": "~4.
|
|
138
|
-
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.
|
|
138
|
+
"@elliemae/app-react-dependencies": "~4.11.0",
|
|
139
|
+
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.8.0",
|
|
139
140
|
"@elliemae/ds-backdrop": "~3.14.16",
|
|
140
141
|
"@elliemae/ds-basic": "~3.14.16",
|
|
141
142
|
"@elliemae/ds-button": "~3.14.16",
|
|
@@ -150,16 +151,16 @@
|
|
|
150
151
|
"@elliemae/ds-modal": "~3.14.16",
|
|
151
152
|
"@elliemae/ds-popperjs": "~3.14.16",
|
|
152
153
|
"@elliemae/ds-toast": "~3.14.16",
|
|
154
|
+
"@elliemae/ds-utilities": "~3.14.16",
|
|
153
155
|
"@elliemae/em-ssf-guest": "~1.11.3",
|
|
154
|
-
"@elliemae/pui-cli": "~8.
|
|
155
|
-
"@elliemae/pui-diagnostics": "~3.
|
|
156
|
+
"@elliemae/pui-cli": "~8.14.1",
|
|
157
|
+
"@elliemae/pui-diagnostics": "~3.4.0",
|
|
156
158
|
"@elliemae/pui-doc-gen": "~1.7.1",
|
|
157
159
|
"@elliemae/pui-e2e-test-sdk": "~8.1.4",
|
|
158
160
|
"@elliemae/pui-micro-frontend-base": "~1.14.0",
|
|
159
|
-
"@elliemae/pui-scripting-object": "~1.
|
|
161
|
+
"@elliemae/pui-scripting-object": "~1.27.0",
|
|
160
162
|
"@elliemae/pui-theme": "~2.7.0",
|
|
161
|
-
"@elliemae/pui-user-monitoring": "~1.
|
|
162
|
-
"@types/react-aria-live": "~2.0.2"
|
|
163
|
-
"@elliemae/ds-utilities": "^3.19.0"
|
|
163
|
+
"@elliemae/pui-user-monitoring": "~1.22.0",
|
|
164
|
+
"@types/react-aria-live": "~2.0.2"
|
|
164
165
|
}
|
|
165
166
|
}
|