@equinor/mad-core 0.18.1 → 0.20.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.
- package/CHANGELOG.md +44 -0
- package/dist/authenticate.d.ts +1 -0
- package/dist/authenticate.js +11 -0
- package/dist/{chunk-WEJ4LF6M.js → chunk-23OTW4NC.js} +4 -4
- package/dist/{chunk-DGIAXVWS.js → chunk-DIZ362AR.js} +4 -4
- package/dist/{chunk-AXY3DL65.js → chunk-GBEOV7WV.js} +5 -5
- package/dist/{chunk-NYC63GQG.js → chunk-HF4AHBXJ.js} +45 -16
- package/dist/{chunk-KEFHOMOW.js → chunk-HYW645OK.js} +2 -2
- package/dist/{chunk-GQ2R7AYC.js → chunk-K2VWLSI5.js} +5 -1
- package/dist/chunk-Q6MDFVOP.js +13 -0
- package/dist/chunk-R2XOBAJJ.js +27 -0
- package/dist/{chunk-PQODWSOK.js → chunk-VKFXR4QU.js} +1 -1
- package/dist/chunk-YBNZ6RXF.js +0 -0
- package/dist/{chunk-T4TC3AQN.js → chunk-YMZLQKMK.js} +1 -1
- package/dist/chunk-Z4YHNPXU.js +25 -0
- package/dist/{chunk-V6VOTEDJ.js → chunk-ZJMIK3ZV.js} +4 -4
- package/dist/components/OfflineBanner.js +1 -1
- package/dist/components/createCoreStackNavigator.d.ts +1631 -4
- package/dist/components/createCoreStackNavigator.js +39 -35
- package/dist/components/index.js +43 -39
- package/dist/components/navigation/MadCoreSubHeader.js +6 -6
- package/dist/components/navigation/index.js +7 -7
- package/dist/components/navigation/navigation-creators.d.ts +3 -3
- package/dist/components/navigation/navigation-creators.js +7 -7
- package/dist/components/screens/AboutScreen.js +2 -2
- package/dist/components/screens/LoginScreen.js +5 -3
- package/dist/components/screens/create-incident/CreateIncidentScreen.js +39 -35
- package/dist/components/screens/create-incident/createIncident.js +39 -35
- package/dist/components/screens/language/SelectLanguageScreen.js +4 -4
- package/dist/components/screens/release-notes/ReleaseNotesScreen.js +3 -3
- package/dist/components/screens/release-notes/WhatsNewScreen.js +7 -7
- package/dist/components/screens/settings/Section.js +1 -1
- package/dist/components/screens/settings/SettingsScreen.js +6 -6
- package/dist/components/screens/settings/index.js +7 -7
- package/dist/components/screens/settings/useSignOut.js +4 -4
- package/dist/components/service-message/ServiceMessageBanner.js +2 -2
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/useNavigateFromLanguageSelectScreen.js +2 -2
- package/dist/hooks/useNavigateFromLoginScreen.js +2 -2
- package/dist/hooks/useNavigateFromWhatsNewScreen.js +2 -2
- package/dist/hooks/useScreenTitleFromDictionary.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +51 -44
- package/dist/store/auth-session/auth-session.d.ts +4 -0
- package/dist/store/auth-session/auth-session.js +13 -0
- package/dist/store/auth-session/index.d.ts +1 -0
- package/dist/store/auth-session/index.js +14 -0
- package/dist/store/auth-session/resetCancelledSession.d.ts +1 -0
- package/dist/store/auth-session/resetCancelledSession.js +10 -0
- package/dist/utils/MadCoreProviders.js +1 -1
- package/dist/utils/createMadCoreNavigator.d.ts +1062 -2
- package/dist/utils/createMadCoreNavigator.js +39 -35
- package/package.json +5 -2
- package/dist/{chunk-3DTLRMAR.js → chunk-6QNZQ6OY.js} +3 -3
- package/dist/{chunk-INA5ANZO.js → chunk-75UZ4BR5.js} +4 -4
- package/dist/{chunk-X33ICKCC.js → chunk-C7NJODNT.js} +3 -3
- package/dist/{chunk-4KSJR7E5.js → chunk-HPDK6AZ3.js} +3 -3
- package/dist/{chunk-HADLUP7M.js → chunk-JADYNBGN.js} +3 -3
- package/dist/{chunk-27KFGUGY.js → chunk-KB3M7X3Q.js} +3 -3
- package/dist/{chunk-4TVVFWGM.js → chunk-PMQPVI37.js} +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# @equinor/mad-core
|
|
2
2
|
|
|
3
|
+
## 0.20.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d060502: Add a high-level `authenticate` function that falls back from silent to interactive
|
|
8
|
+
authentication.
|
|
9
|
+
|
|
10
|
+
`authenticateSilently` now remains silent and returns `null` when stored refresh credentials are
|
|
11
|
+
expired or invalid. Consumers that may prompt the user should use `authenticate`, exported by
|
|
12
|
+
both `@equinor/mad-auth` and `@equinor/mad-core`. Interactive resource authentication preserves
|
|
13
|
+
the OIDC scopes needed to replace invalid refresh credentials, and concurrent callers share a
|
|
14
|
+
single browser prompt.
|
|
15
|
+
|
|
16
|
+
Native consumers can be notified when the interactive fallback is cancelled or dismissed,
|
|
17
|
+
including when the authorization provider returns an explicit user-cancellation response. MAD
|
|
18
|
+
Core uses this signal to clear the unusable session and reset its navigator to the login screen
|
|
19
|
+
without retaining protected route history.
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [d060502]
|
|
24
|
+
- @equinor/mad-auth@0.7.0
|
|
25
|
+
|
|
26
|
+
## 0.19.0
|
|
27
|
+
|
|
28
|
+
### Minor Changes
|
|
29
|
+
|
|
30
|
+
- 28be313: Replace `@react-native-community/netinfo` peer dependency with `expo-network`. The
|
|
31
|
+
`OfflineBanner` component now uses `expo-network`'s `useNetworkState()` hook instead of
|
|
32
|
+
`useNetInfo()`.
|
|
33
|
+
|
|
34
|
+
**Migration:** Replace `@react-native-community/netinfo` with `expo-network` in your app's
|
|
35
|
+
dependencies.
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- bb939ed: Type support added back for navigation factories
|
|
40
|
+
- Updated dependencies [bb939ed]
|
|
41
|
+
- @equinor/mad-components@0.25.5
|
|
42
|
+
- @equinor/mad-navigation@0.7.5
|
|
43
|
+
- @equinor/mad-insights@0.3.5
|
|
44
|
+
- @equinor/mad-toast@0.4.5
|
|
45
|
+
- @equinor/mad-auth@0.6.5
|
|
46
|
+
|
|
3
47
|
## 0.18.1
|
|
4
48
|
|
|
5
49
|
### Patch Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const authenticate: (scopes: string[]) => Promise<import("@equinor/mad-auth").MadAuthenticationResult | null>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useSignOut
|
|
3
|
+
} from "./chunk-HPDK6AZ3.js";
|
|
1
4
|
import {
|
|
2
5
|
SettingsSection
|
|
3
6
|
} from "./chunk-YKLMUKP4.js";
|
|
4
|
-
import {
|
|
5
|
-
useSignOut
|
|
6
|
-
} from "./chunk-4KSJR7E5.js";
|
|
7
7
|
import {
|
|
8
8
|
getFinalSettingsConfig
|
|
9
9
|
} from "./chunk-QLL6LKDN.js";
|
|
10
10
|
import {
|
|
11
11
|
useScreenTitleFromDictionary
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KB3M7X3Q.js";
|
|
13
13
|
import {
|
|
14
14
|
useAccountOrDemoAccount
|
|
15
15
|
} from "./chunk-LEWQGDM7.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SelectLanguageCellGroup
|
|
3
3
|
} from "./chunk-FF6LGZNJ.js";
|
|
4
|
-
import {
|
|
5
|
-
useScreenTitleFromDictionary
|
|
6
|
-
} from "./chunk-27KFGUGY.js";
|
|
7
4
|
import {
|
|
8
5
|
useNavigateFromLanguageSelectScreen
|
|
9
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-75UZ4BR5.js";
|
|
7
|
+
import {
|
|
8
|
+
useScreenTitleFromDictionary
|
|
9
|
+
} from "./chunk-KB3M7X3Q.js";
|
|
10
10
|
import {
|
|
11
11
|
useDictionary,
|
|
12
12
|
useLanguage
|
|
@@ -4,21 +4,21 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
getShortDate
|
|
6
6
|
} from "./chunk-OCWASWDK.js";
|
|
7
|
+
import {
|
|
8
|
+
useReleaseNotesVersion
|
|
9
|
+
} from "./chunk-5BVQKJQB.js";
|
|
7
10
|
import {
|
|
8
11
|
useNavigateFromWhatsNewScreen
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-C7NJODNT.js";
|
|
10
13
|
import {
|
|
11
14
|
useScreenTitleFromDictionary
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KB3M7X3Q.js";
|
|
13
16
|
import {
|
|
14
17
|
whats_new_exports
|
|
15
18
|
} from "./chunk-4DXH3SPN.js";
|
|
16
19
|
import {
|
|
17
20
|
fetchReleaseNotes
|
|
18
21
|
} from "./chunk-5FMD2ENO.js";
|
|
19
|
-
import {
|
|
20
|
-
useReleaseNotesVersion
|
|
21
|
-
} from "./chunk-5BVQKJQB.js";
|
|
22
22
|
import {
|
|
23
23
|
useDemoMode
|
|
24
24
|
} from "./chunk-UZ6YMQV2.js";
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SelectLanguageScreen
|
|
3
|
+
} from "./chunk-DIZ362AR.js";
|
|
4
|
+
import {
|
|
5
|
+
ReleaseNotesScreen
|
|
6
|
+
} from "./chunk-VKFXR4QU.js";
|
|
1
7
|
import {
|
|
2
8
|
WhatsNewScreen
|
|
3
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GBEOV7WV.js";
|
|
4
10
|
import {
|
|
5
11
|
UserInfo
|
|
6
12
|
} from "./chunk-3WUJAVUO.js";
|
|
7
|
-
import {
|
|
8
|
-
SelectLanguageScreen
|
|
9
|
-
} from "./chunk-DGIAXVWS.js";
|
|
10
|
-
import {
|
|
11
|
-
ReleaseNotesScreen
|
|
12
|
-
} from "./chunk-PQODWSOK.js";
|
|
13
13
|
import {
|
|
14
14
|
createNativeStackNavigator,
|
|
15
15
|
createStackNavigator
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-YMZLQKMK.js";
|
|
17
17
|
import {
|
|
18
18
|
AboutScreen
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-PMQPVI37.js";
|
|
20
20
|
import {
|
|
21
21
|
LoginScreen
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-K2VWLSI5.js";
|
|
23
23
|
import {
|
|
24
24
|
initiateAuthenticationClient
|
|
25
25
|
} from "./chunk-5O4PAUNU.js";
|
|
@@ -36,6 +36,9 @@ import {
|
|
|
36
36
|
import {
|
|
37
37
|
useAccountOrDemoAccount
|
|
38
38
|
} from "./chunk-LEWQGDM7.js";
|
|
39
|
+
import {
|
|
40
|
+
useAuthSessionGeneration
|
|
41
|
+
} from "./chunk-R2XOBAJJ.js";
|
|
39
42
|
import {
|
|
40
43
|
setConfig,
|
|
41
44
|
useEnvironment,
|
|
@@ -199,15 +202,28 @@ var createIncidentStyles = EDSStyleSheet.create((theme) => ({
|
|
|
199
202
|
var createMadCoreNativeStackNavigator = (Stack) => {
|
|
200
203
|
function MadCoreNavigator(props) {
|
|
201
204
|
const config = useMadConfig();
|
|
205
|
+
const authSessionGeneration = useAuthSessionGeneration();
|
|
202
206
|
if (!config) return null;
|
|
203
|
-
return /* @__PURE__ */ React2.createElement(MadCoreProviders, { config, type: "native-stack" }, /* @__PURE__ */ React2.createElement(Stack.Navigator, __spreadProps(__spreadValues({}, props), { initialRouteName: CoreRoutes.LOGIN }), config.login.addScreenManually !== true && /* @__PURE__ */ React2.createElement(
|
|
207
|
+
return /* @__PURE__ */ React2.createElement(MadCoreProviders, { config, type: "native-stack" }, /* @__PURE__ */ React2.createElement(Stack.Navigator, __spreadProps(__spreadValues({}, props), { initialRouteName: CoreRoutes.LOGIN }), /* @__PURE__ */ React2.createElement(Stack.Group, { navigationKey: `auth-session-${authSessionGeneration}` }, config.login.addScreenManually !== true && /* @__PURE__ */ React2.createElement(
|
|
204
208
|
Stack.Screen,
|
|
205
209
|
{
|
|
206
210
|
name: CoreRoutes.LOGIN,
|
|
207
211
|
component: LoginScreen,
|
|
208
212
|
options: getDefaultScreenOptionsForLoginScreen()
|
|
209
213
|
}
|
|
210
|
-
), /* @__PURE__ */ React2.createElement(
|
|
214
|
+
), /* @__PURE__ */ React2.createElement(
|
|
215
|
+
Stack.Screen,
|
|
216
|
+
{
|
|
217
|
+
name: CoreRoutes.RELEASE_NOTES,
|
|
218
|
+
component: ReleaseNotesScreen
|
|
219
|
+
}
|
|
220
|
+
), /* @__PURE__ */ React2.createElement(Stack.Screen, { name: CoreRoutes.WHATS_NEW, component: WhatsNewScreen }), config.about && /* @__PURE__ */ React2.createElement(Stack.Screen, { name: CoreRoutes.ABOUT, component: AboutScreen }), config.serviceNow && /* @__PURE__ */ React2.createElement(
|
|
221
|
+
Stack.Screen,
|
|
222
|
+
{
|
|
223
|
+
name: CoreRoutes.FEEDBACK,
|
|
224
|
+
component: CreateIncidentScreen
|
|
225
|
+
}
|
|
226
|
+
), config.language.supportedLanguages.length > 1 && /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(
|
|
211
227
|
Stack.Screen,
|
|
212
228
|
{
|
|
213
229
|
name: CoreRoutes.SELECT_LANGUAGE,
|
|
@@ -220,22 +236,35 @@ var createMadCoreNativeStackNavigator = (Stack) => {
|
|
|
220
236
|
component: SelectLanguageScreen,
|
|
221
237
|
options: { headerBackVisible: false }
|
|
222
238
|
}
|
|
223
|
-
)), props.children));
|
|
239
|
+
)), props.children)));
|
|
224
240
|
}
|
|
225
241
|
return MadCoreNavigator;
|
|
226
242
|
};
|
|
227
243
|
var createMadCoreStackNavigator = (Stack) => {
|
|
228
244
|
function MadCoreNavigator(props) {
|
|
229
245
|
const config = useMadConfig();
|
|
246
|
+
const authSessionGeneration = useAuthSessionGeneration();
|
|
230
247
|
if (!config) return null;
|
|
231
|
-
return /* @__PURE__ */ React2.createElement(MadCoreProviders, { config, type: "stack" }, /* @__PURE__ */ React2.createElement(Stack.Navigator, __spreadProps(__spreadValues({}, props), { initialRouteName: CoreRoutes.LOGIN }), config.login.addScreenManually !== true && /* @__PURE__ */ React2.createElement(
|
|
248
|
+
return /* @__PURE__ */ React2.createElement(MadCoreProviders, { config, type: "stack" }, /* @__PURE__ */ React2.createElement(Stack.Navigator, __spreadProps(__spreadValues({}, props), { initialRouteName: CoreRoutes.LOGIN }), /* @__PURE__ */ React2.createElement(Stack.Group, { navigationKey: `auth-session-${authSessionGeneration}` }, config.login.addScreenManually !== true && /* @__PURE__ */ React2.createElement(
|
|
232
249
|
Stack.Screen,
|
|
233
250
|
{
|
|
234
251
|
name: CoreRoutes.LOGIN,
|
|
235
252
|
component: LoginScreen,
|
|
236
253
|
options: getDefaultScreenOptionsForLoginScreen()
|
|
237
254
|
}
|
|
238
|
-
), /* @__PURE__ */ React2.createElement(
|
|
255
|
+
), /* @__PURE__ */ React2.createElement(
|
|
256
|
+
Stack.Screen,
|
|
257
|
+
{
|
|
258
|
+
name: CoreRoutes.RELEASE_NOTES,
|
|
259
|
+
component: ReleaseNotesScreen
|
|
260
|
+
}
|
|
261
|
+
), /* @__PURE__ */ React2.createElement(Stack.Screen, { name: CoreRoutes.WHATS_NEW, component: WhatsNewScreen }), config.about && /* @__PURE__ */ React2.createElement(Stack.Screen, { name: CoreRoutes.ABOUT, component: AboutScreen }), config.serviceNow && /* @__PURE__ */ React2.createElement(
|
|
262
|
+
Stack.Screen,
|
|
263
|
+
{
|
|
264
|
+
name: CoreRoutes.FEEDBACK,
|
|
265
|
+
component: CreateIncidentScreen
|
|
266
|
+
}
|
|
267
|
+
), config.language.supportedLanguages.length > 1 && /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(
|
|
239
268
|
Stack.Screen,
|
|
240
269
|
{
|
|
241
270
|
name: CoreRoutes.SELECT_LANGUAGE,
|
|
@@ -248,7 +277,7 @@ var createMadCoreStackNavigator = (Stack) => {
|
|
|
248
277
|
component: SelectLanguageScreen,
|
|
249
278
|
options: { headerLeft: () => null }
|
|
250
279
|
}
|
|
251
|
-
)), props.children));
|
|
280
|
+
)), props.children)));
|
|
252
281
|
}
|
|
253
282
|
return MadCoreNavigator;
|
|
254
283
|
};
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
// src/components/OfflineBanner.tsx
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { OfflineBanner as ImportedOfflineBanner } from "@equinor/mad-components";
|
|
8
|
-
import {
|
|
8
|
+
import { useNetworkState } from "expo-network";
|
|
9
9
|
var OfflineBanner = () => {
|
|
10
|
-
const { isConnected } =
|
|
10
|
+
const { isConnected } = useNetworkState();
|
|
11
11
|
const isOfflineBannerEnabled = getIsOfflineBannerEnabled();
|
|
12
12
|
if (!isOfflineBannerEnabled) return null;
|
|
13
13
|
return /* @__PURE__ */ React.createElement(ImportedOfflineBanner, { isConnected });
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useNavigateFromLoginScreen
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JADYNBGN.js";
|
|
4
|
+
import {
|
|
5
|
+
rearmAuthSession
|
|
6
|
+
} from "./chunk-R2XOBAJJ.js";
|
|
4
7
|
import {
|
|
5
8
|
useAuthConfig,
|
|
6
9
|
useDictionary,
|
|
@@ -32,6 +35,7 @@ var LoginScreen = ({
|
|
|
32
35
|
const resizeMode = Platform.OS === "web" ? "contain" : "cover";
|
|
33
36
|
const loginButtonProps = __spreadProps(__spreadValues({}, authConfig), {
|
|
34
37
|
onAuthenticationSuccessful: (result, type) => {
|
|
38
|
+
rearmAuthSession();
|
|
35
39
|
setUsername(result.account.username, result.account.identifier);
|
|
36
40
|
if (type === "AUTOMATIC") {
|
|
37
41
|
void track(metricKeys.AUTHENTICATION_AUTOMATIC);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resetCancelledSession
|
|
3
|
+
} from "./chunk-Z4YHNPXU.js";
|
|
4
|
+
|
|
5
|
+
// src/authenticate.ts
|
|
6
|
+
import { ExpoAuthSession } from "@equinor/mad-auth";
|
|
7
|
+
var authenticate = (scopes) => ExpoAuthSession.authenticate(scopes, {
|
|
8
|
+
onAuthenticationCancelled: resetCancelledSession
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
authenticate
|
|
13
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// src/store/auth-session/auth-session.ts
|
|
2
|
+
import { create } from "zustand";
|
|
3
|
+
import { devtools } from "zustand/middleware";
|
|
4
|
+
var useAuthSessionStore = create()(
|
|
5
|
+
devtools(
|
|
6
|
+
(set) => ({
|
|
7
|
+
generation: 0,
|
|
8
|
+
invalidated: false,
|
|
9
|
+
invalidate: () => set(
|
|
10
|
+
(state) => state.invalidated ? state : { generation: state.generation + 1, invalidated: true }
|
|
11
|
+
),
|
|
12
|
+
rearm: () => set({ invalidated: false })
|
|
13
|
+
}),
|
|
14
|
+
{ name: "core/auth-session" }
|
|
15
|
+
)
|
|
16
|
+
);
|
|
17
|
+
var useAuthSessionGeneration = () => useAuthSessionStore((state) => state.generation);
|
|
18
|
+
var getIsAuthSessionInvalidated = () => useAuthSessionStore.getState().invalidated;
|
|
19
|
+
var invalidateAuthSession = () => useAuthSessionStore.getState().invalidate();
|
|
20
|
+
var rearmAuthSession = () => useAuthSessionStore.getState().rearm();
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
useAuthSessionGeneration,
|
|
24
|
+
getIsAuthSessionInvalidated,
|
|
25
|
+
invalidateAuthSession,
|
|
26
|
+
rearmAuthSession
|
|
27
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getIsAuthSessionInvalidated,
|
|
3
|
+
invalidateAuthSession
|
|
4
|
+
} from "./chunk-R2XOBAJJ.js";
|
|
5
|
+
import {
|
|
6
|
+
disableDemoMode
|
|
7
|
+
} from "./chunk-UZ6YMQV2.js";
|
|
8
|
+
|
|
9
|
+
// src/store/auth-session/resetCancelledSession.ts
|
|
10
|
+
import { ExpoAuthSession } from "@equinor/mad-auth";
|
|
11
|
+
var cancelledSessionReset = null;
|
|
12
|
+
var resetCancelledSession = () => {
|
|
13
|
+
if (cancelledSessionReset) return cancelledSessionReset;
|
|
14
|
+
if (getIsAuthSessionInvalidated()) return Promise.resolve();
|
|
15
|
+
disableDemoMode();
|
|
16
|
+
invalidateAuthSession();
|
|
17
|
+
cancelledSessionReset = Promise.resolve().then(() => ExpoAuthSession.signOut()).then(() => void 0).catch(() => void 0).finally(() => {
|
|
18
|
+
cancelledSessionReset = null;
|
|
19
|
+
});
|
|
20
|
+
return cancelledSessionReset;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export {
|
|
24
|
+
resetCancelledSession
|
|
25
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ServiceMessageBanner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6QNZQ6OY.js";
|
|
4
|
+
import {
|
|
5
|
+
OfflineBanner
|
|
6
|
+
} from "./chunk-HYW645OK.js";
|
|
4
7
|
import {
|
|
5
8
|
EnvironmentBanner
|
|
6
9
|
} from "./chunk-URFHQEDR.js";
|
|
7
|
-
import {
|
|
8
|
-
OfflineBanner
|
|
9
|
-
} from "./chunk-KEFHOMOW.js";
|
|
10
10
|
|
|
11
11
|
// src/components/navigation/MadCoreSubHeader.tsx
|
|
12
12
|
import React from "react";
|