@equinor/mad-core 0.10.3 → 0.11.1

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.
Files changed (83) hide show
  1. package/CHANGELOG.md +278 -252
  2. package/dist/chunk-4DFNW2IQ.js +98 -0
  3. package/dist/{chunk-LDHADSAI.js → chunk-5GNZJDSE.js} +2 -2
  4. package/dist/chunk-6LMMRQYQ.js +25 -0
  5. package/dist/{chunk-WP22W6IZ.js → chunk-7FO6SNUK.js} +1 -1
  6. package/dist/{chunk-4ZZKAQ7C.js → chunk-7HGZLLNX.js} +1 -1
  7. package/dist/{chunk-HN6FG72A.js → chunk-DIITQCRW.js} +1 -1
  8. package/dist/{chunk-UV3M2SNJ.js → chunk-DJMBVNB6.js} +2 -2
  9. package/dist/{chunk-6JEPMDC4.js → chunk-EOM477VC.js} +1 -1
  10. package/dist/{chunk-C5PTOP7U.js → chunk-F2IUXOBD.js} +6 -6
  11. package/dist/{chunk-SDKRNZRS.js → chunk-GARGEDTG.js} +1 -1
  12. package/dist/{chunk-2EBLJCZH.js → chunk-GEEFQMRN.js} +1 -1
  13. package/dist/{chunk-OZJ2PBO6.js → chunk-HH5WS6OQ.js} +4 -4
  14. package/dist/{chunk-ADBVMDRF.js → chunk-IHCNAGT7.js} +1 -1
  15. package/dist/{chunk-K2NXCEIW.js → chunk-JGQUMXF3.js} +4 -4
  16. package/dist/{chunk-CXXCHRHS.js → chunk-KEH6NBFE.js} +1 -1
  17. package/dist/{chunk-PWORULZD.js → chunk-PB3TI2RT.js} +1 -1
  18. package/dist/chunk-PP74MP4O.js +16 -0
  19. package/dist/{chunk-KLVEVBW7.js → chunk-SMWK2VYY.js} +2 -2
  20. package/dist/{chunk-4J43OC2B.js → chunk-STKI44UB.js} +4 -4
  21. package/dist/{chunk-Q4SX3UP3.js → chunk-SVBUWW4H.js} +1 -1
  22. package/dist/{chunk-6A7XY5VK.js → chunk-TWUGCMPQ.js} +2 -2
  23. package/dist/{chunk-5BWKCV3H.js → chunk-U5IJVQDO.js} +1 -1
  24. package/dist/chunk-W5OWK2YM.js +41 -0
  25. package/dist/{chunk-46UQWICK.js → chunk-WDZF2C5R.js} +1 -1
  26. package/dist/{chunk-3DWMQWGO.js → chunk-WQTC5TXE.js} +1 -1
  27. package/dist/{chunk-VWR2AFO7.js → chunk-WWF7QKDX.js} +1 -1
  28. package/dist/{chunk-3MQTX7R4.js → chunk-YB3XJPRA.js} +6 -3
  29. package/dist/{chunk-7FBCK6I4.js → chunk-ZAJCJP22.js} +6 -2
  30. package/dist/{chunk-DC5ASEDD.js → chunk-ZIV7DVBA.js} +2 -2
  31. package/dist/components/CoreNavigatorTypeProvider.d.ts +8 -0
  32. package/dist/components/CoreNavigatorTypeProvider.js +9 -0
  33. package/dist/components/EnvironmentBanner.js +3 -3
  34. package/dist/components/EnvironmentProvider.js +3 -3
  35. package/dist/components/ToastEmitter.js +12 -3
  36. package/dist/components/createCoreStackNavigator.d.ts +153 -5
  37. package/dist/components/createCoreStackNavigator.js +35 -31
  38. package/dist/components/index.js +47 -41
  39. package/dist/components/navigation/MadCoreSubHeader.js +8 -8
  40. package/dist/components/navigation/index.js +13 -11
  41. package/dist/components/navigation/navigation-creators.d.ts +1 -0
  42. package/dist/components/navigation/navigation-creators.js +13 -11
  43. package/dist/components/screens/AboutScreen.js +4 -3
  44. package/dist/components/screens/LoginScreen.js +4 -4
  45. package/dist/components/screens/create-incident/CreateIncidentScreen.js +4 -4
  46. package/dist/components/screens/language/SelectLanguageScreen.js +6 -6
  47. package/dist/components/screens/language/components/SelectLanguageCellGroup.js +3 -3
  48. package/dist/components/screens/release-notes/ReleaseNotesScreen.js +6 -6
  49. package/dist/components/screens/release-notes/WhatsNewScreen.js +6 -6
  50. package/dist/components/screens/release-notes/fetchReleaseNotes.js +3 -3
  51. package/dist/components/screens/settings/Section.js +3 -3
  52. package/dist/components/screens/settings/SettingsScreen.js +6 -6
  53. package/dist/components/screens/settings/index.js +7 -7
  54. package/dist/components/screens/settings/useSignOut.js +4 -4
  55. package/dist/components/service-message/ServiceMessageBanner.js +6 -6
  56. package/dist/components/service-message/ServiceMessageProvider.js +4 -4
  57. package/dist/components/service-message/hooks/useFetchServiceMessage.js +3 -3
  58. package/dist/hooks/UseReleaseNotes.js +4 -4
  59. package/dist/hooks/index.js +3 -3
  60. package/dist/hooks/useAccountOrDemoAccount.js +3 -3
  61. package/dist/hooks/useNavigateFromLanguageSelectScreen.js +3 -3
  62. package/dist/hooks/useNavigateFromLoginScreen.js +3 -3
  63. package/dist/hooks/useNavigateFromWhatsNewScreen.js +3 -3
  64. package/dist/hooks/useScreenTitleFromDictionary.js +3 -3
  65. package/dist/index.js +47 -41
  66. package/dist/language/useDictionary.js +2 -2
  67. package/dist/store/index.js +2 -2
  68. package/dist/store/language/index.js +2 -2
  69. package/dist/store/language/language.js +2 -2
  70. package/dist/store/mad-config/hooks.js +2 -2
  71. package/dist/store/mad-config/index.js +2 -2
  72. package/dist/store/mad-config/mad-config.js +2 -2
  73. package/dist/utils/MadCoreProviders.d.ts +9 -0
  74. package/dist/utils/MadCoreProviders.js +17 -0
  75. package/dist/utils/createEnvironmentProxy.js +2 -2
  76. package/dist/utils/createMadCoreNavigator.d.ts +119 -8
  77. package/dist/utils/createMadCoreNavigator.js +26 -24
  78. package/dist/utils/getDefaultScreenOptionsForLoginScreen.d.ts +4 -2
  79. package/dist/utils/initiateAuthenticationClient.js +3 -3
  80. package/package.json +4 -4
  81. package/dist/chunk-4HHKUYBP.js +0 -29
  82. package/dist/chunk-DEVBLCRV.js +0 -17
  83. package/dist/chunk-NE7MJB3C.js +0 -88
@@ -0,0 +1,98 @@
1
+ import {
2
+ SelectLanguageScreen
3
+ } from "./chunk-STKI44UB.js";
4
+ import {
5
+ ReleaseNotesScreen
6
+ } from "./chunk-TWUGCMPQ.js";
7
+ import {
8
+ WhatsNewScreen
9
+ } from "./chunk-F2IUXOBD.js";
10
+ import {
11
+ CreateIncidentScreen
12
+ } from "./chunk-ZIV7DVBA.js";
13
+ import {
14
+ AboutScreen
15
+ } from "./chunk-ZAJCJP22.js";
16
+ import {
17
+ LoginScreen
18
+ } from "./chunk-5GNZJDSE.js";
19
+ import {
20
+ getDefaultScreenOptionsForLoginScreen
21
+ } from "./chunk-RGJ4RWVB.js";
22
+ import {
23
+ MadCoreProviders
24
+ } from "./chunk-6LMMRQYQ.js";
25
+ import {
26
+ useMadConfig
27
+ } from "./chunk-GEEFQMRN.js";
28
+ import {
29
+ CoreRoutes
30
+ } from "./chunk-UKAZW3CQ.js";
31
+ import {
32
+ __spreadProps,
33
+ __spreadValues
34
+ } from "./chunk-CWMXXUWU.js";
35
+
36
+ // src/utils/createMadCoreNavigator.tsx
37
+ import React from "react";
38
+ var createMadCoreNativeStackNavigator = (Stack) => {
39
+ function MadCoreNavigator(props) {
40
+ const config = useMadConfig();
41
+ if (!config) return null;
42
+ return /* @__PURE__ */ React.createElement(MadCoreProviders, { config, type: "native-stack" }, /* @__PURE__ */ React.createElement(Stack.Navigator, __spreadProps(__spreadValues({}, props), { initialRouteName: CoreRoutes.LOGIN }), config.login.addScreenManually !== true && /* @__PURE__ */ React.createElement(
43
+ Stack.Screen,
44
+ {
45
+ name: CoreRoutes.LOGIN,
46
+ component: LoginScreen,
47
+ options: getDefaultScreenOptionsForLoginScreen()
48
+ }
49
+ ), /* @__PURE__ */ React.createElement(Stack.Screen, { name: CoreRoutes.RELEASE_NOTES, component: ReleaseNotesScreen }), /* @__PURE__ */ React.createElement(Stack.Screen, { name: CoreRoutes.WHATS_NEW, component: WhatsNewScreen }), config.about && /* @__PURE__ */ React.createElement(Stack.Screen, { name: CoreRoutes.ABOUT, component: AboutScreen }), config.serviceNow && /* @__PURE__ */ React.createElement(Stack.Screen, { name: CoreRoutes.FEEDBACK, component: CreateIncidentScreen }), config.language.supportedLanguages.length > 1 && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
50
+ Stack.Screen,
51
+ {
52
+ name: CoreRoutes.SELECT_LANGUAGE,
53
+ component: SelectLanguageScreen
54
+ }
55
+ ), /* @__PURE__ */ React.createElement(
56
+ Stack.Screen,
57
+ {
58
+ name: CoreRoutes.SELECT_LANGUAGE_ONBOARDING,
59
+ component: SelectLanguageScreen,
60
+ options: { headerBackVisible: false }
61
+ }
62
+ )), props.children));
63
+ }
64
+ return MadCoreNavigator;
65
+ };
66
+ var createMadCoreStackNavigator = (Stack) => {
67
+ function MadCoreNavigator(props) {
68
+ const config = useMadConfig();
69
+ if (!config) return null;
70
+ return /* @__PURE__ */ React.createElement(MadCoreProviders, { config, type: "stack" }, /* @__PURE__ */ React.createElement(Stack.Navigator, __spreadProps(__spreadValues({}, props), { initialRouteName: CoreRoutes.LOGIN }), config.login.addScreenManually !== true && /* @__PURE__ */ React.createElement(
71
+ Stack.Screen,
72
+ {
73
+ name: CoreRoutes.LOGIN,
74
+ component: LoginScreen,
75
+ options: getDefaultScreenOptionsForLoginScreen()
76
+ }
77
+ ), /* @__PURE__ */ React.createElement(Stack.Screen, { name: CoreRoutes.RELEASE_NOTES, component: ReleaseNotesScreen }), /* @__PURE__ */ React.createElement(Stack.Screen, { name: CoreRoutes.WHATS_NEW, component: WhatsNewScreen }), config.about && /* @__PURE__ */ React.createElement(Stack.Screen, { name: CoreRoutes.ABOUT, component: AboutScreen }), config.serviceNow && /* @__PURE__ */ React.createElement(Stack.Screen, { name: CoreRoutes.FEEDBACK, component: CreateIncidentScreen }), config.language.supportedLanguages.length > 1 && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
78
+ Stack.Screen,
79
+ {
80
+ name: CoreRoutes.SELECT_LANGUAGE,
81
+ component: SelectLanguageScreen
82
+ }
83
+ ), /* @__PURE__ */ React.createElement(
84
+ Stack.Screen,
85
+ {
86
+ name: CoreRoutes.SELECT_LANGUAGE_ONBOARDING,
87
+ component: SelectLanguageScreen,
88
+ options: { headerLeft: () => null }
89
+ }
90
+ )), props.children));
91
+ }
92
+ return MadCoreNavigator;
93
+ };
94
+
95
+ export {
96
+ createMadCoreNativeStackNavigator,
97
+ createMadCoreStackNavigator
98
+ };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  useNavigateFromLoginScreen
3
- } from "./chunk-SDKRNZRS.js";
3
+ } from "./chunk-GARGEDTG.js";
4
4
  import {
5
5
  getConfig,
6
6
  useAuthConfig,
7
7
  useDictionary,
8
8
  useLoginScreenConfig
9
- } from "./chunk-2EBLJCZH.js";
9
+ } from "./chunk-GEEFQMRN.js";
10
10
  import {
11
11
  __spreadProps,
12
12
  __spreadValues
@@ -0,0 +1,25 @@
1
+ import {
2
+ ServiceMessageProvider
3
+ } from "./chunk-DIITQCRW.js";
4
+ import {
5
+ CoreNavigatorTypeProvider
6
+ } from "./chunk-PP74MP4O.js";
7
+ import {
8
+ EnvironmentProvider
9
+ } from "./chunk-7HGZLLNX.js";
10
+
11
+ // src/utils/MadCoreProviders.tsx
12
+ import React from "react";
13
+ import { AppInsightsInitializer } from "@equinor/mad-insights";
14
+ import { ToastEmitter } from "@equinor/mad-toast";
15
+ var MadCoreProviders = ({
16
+ config,
17
+ type,
18
+ children
19
+ }) => {
20
+ return /* @__PURE__ */ React.createElement(AppInsightsInitializer, { config: config.applicationInsights }, /* @__PURE__ */ React.createElement(CoreNavigatorTypeProvider, { type }, /* @__PURE__ */ React.createElement(EnvironmentProvider, null, /* @__PURE__ */ React.createElement(ServiceMessageProvider, null, children, /* @__PURE__ */ React.createElement(ToastEmitter, null)))));
21
+ };
22
+
23
+ export {
24
+ MadCoreProviders
25
+ };
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-ZB37EIZB.js";
5
5
  import {
6
6
  getConfig
7
- } from "./chunk-2EBLJCZH.js";
7
+ } from "./chunk-GEEFQMRN.js";
8
8
  import {
9
9
  __async
10
10
  } from "./chunk-CWMXXUWU.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useEnvironment
3
- } from "./chunk-2EBLJCZH.js";
3
+ } from "./chunk-GEEFQMRN.js";
4
4
 
5
5
  // src/components/EnvironmentProvider.tsx
6
6
  import { EnvironmentProvider as ProvideEnvironment } from "@equinor/mad-components";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useFetchServiceMessage
3
- } from "./chunk-Q4SX3UP3.js";
3
+ } from "./chunk-SVBUWW4H.js";
4
4
 
5
5
  // src/components/service-message/ServiceMessageProvider.tsx
6
6
  import React, { useContext } from "react";
@@ -3,14 +3,14 @@ import {
3
3
  } from "./chunk-4DXH3SPN.js";
4
4
  import {
5
5
  fetchAllReleaseNotes
6
- } from "./chunk-WP22W6IZ.js";
6
+ } from "./chunk-7FO6SNUK.js";
7
7
  import {
8
8
  useDemoMode
9
9
  } from "./chunk-UZ6YMQV2.js";
10
10
  import {
11
11
  useEnvironment,
12
12
  useServicePortalName
13
- } from "./chunk-2EBLJCZH.js";
13
+ } from "./chunk-GEEFQMRN.js";
14
14
 
15
15
  // src/hooks/UseReleaseNotes.tsx
16
16
  import { useEffect, useMemo, useState } from "react";
@@ -8,7 +8,7 @@ import {
8
8
  useLanguage,
9
9
  useMadConfig,
10
10
  useNavigateToMainRoute
11
- } from "./chunk-2EBLJCZH.js";
11
+ } from "./chunk-GEEFQMRN.js";
12
12
 
13
13
  // src/hooks/useNavigateFromWhatsNewScreen.ts
14
14
  var useNavigateFromWhatsNewScreen = () => {
@@ -4,21 +4,21 @@ import {
4
4
  import {
5
5
  getShortDate
6
6
  } from "./chunk-OCWASWDK.js";
7
+ import {
8
+ useNavigateFromWhatsNewScreen
9
+ } from "./chunk-EOM477VC.js";
7
10
  import {
8
11
  useScreenTitleFromDictionary
9
- } from "./chunk-5BWKCV3H.js";
12
+ } from "./chunk-U5IJVQDO.js";
10
13
  import {
11
14
  whats_new_exports
12
15
  } from "./chunk-4DXH3SPN.js";
13
16
  import {
14
17
  fetchReleaseNotes
15
- } from "./chunk-WP22W6IZ.js";
18
+ } from "./chunk-7FO6SNUK.js";
16
19
  import {
17
20
  useReleaseNotesVersion
18
21
  } from "./chunk-5BVQKJQB.js";
19
- import {
20
- useNavigateFromWhatsNewScreen
21
- } from "./chunk-6JEPMDC4.js";
22
22
  import {
23
23
  useDemoMode
24
24
  } from "./chunk-UZ6YMQV2.js";
@@ -26,7 +26,7 @@ import {
26
26
  useAppVersion,
27
27
  useEnvironment,
28
28
  useServicePortalName
29
- } from "./chunk-2EBLJCZH.js";
29
+ } from "./chunk-GEEFQMRN.js";
30
30
  import {
31
31
  __spreadProps,
32
32
  __spreadValues
@@ -17,7 +17,7 @@ import {
17
17
  useLanguage,
18
18
  useMadConfig,
19
19
  useNavigateToMainRoute
20
- } from "./chunk-2EBLJCZH.js";
20
+ } from "./chunk-GEEFQMRN.js";
21
21
 
22
22
  // src/hooks/useNavigateFromLoginScreen.ts
23
23
  var useNavigateFromLoginScreen = () => {
@@ -30,7 +30,7 @@ var useMadConfigStore = create()(
30
30
  { name: "core/config" }
31
31
  )
32
32
  );
33
- var MAD_CONFIG_NOT_FOUND_ERROR = "Mad config has not been provided! Make sure you use 'createCoreStackNavigator' to provide your config";
33
+ var MAD_CONFIG_NOT_FOUND_ERROR = "Mad config has not been provided! Make sure you use 'createNativeStackCoreNavigator'/'createStackCoreNavigator' to provide your config";
34
34
  var useMadConfig = () => {
35
35
  const config = useMadConfigStore().config;
36
36
  if (!config) throw new Error(MAD_CONFIG_NOT_FOUND_ERROR);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useSignOut
3
- } from "./chunk-3DWMQWGO.js";
3
+ } from "./chunk-WQTC5TXE.js";
4
4
  import {
5
5
  SettingsSection
6
6
  } from "./chunk-YKLMUKP4.js";
@@ -9,14 +9,14 @@ import {
9
9
  } from "./chunk-QLL6LKDN.js";
10
10
  import {
11
11
  useScreenTitleFromDictionary
12
- } from "./chunk-5BWKCV3H.js";
12
+ } from "./chunk-U5IJVQDO.js";
13
13
  import {
14
14
  useAccountOrDemoAccount
15
- } from "./chunk-VWR2AFO7.js";
15
+ } from "./chunk-WWF7QKDX.js";
16
16
  import {
17
17
  useDictionary,
18
18
  useSettingsScreenPremadeConfig
19
- } from "./chunk-2EBLJCZH.js";
19
+ } from "./chunk-GEEFQMRN.js";
20
20
  import {
21
21
  __spreadValues
22
22
  } from "./chunk-CWMXXUWU.js";
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-BIMOM43W.js";
8
8
  import {
9
9
  useNavigateToMainRoute
10
- } from "./chunk-2EBLJCZH.js";
10
+ } from "./chunk-GEEFQMRN.js";
11
11
  import {
12
12
  CoreRoutes
13
13
  } from "./chunk-UKAZW3CQ.js";
@@ -1,3 +1,6 @@
1
+ import {
2
+ resolveMessageFromServiceMessage
3
+ } from "./chunk-SHKOH7MA.js";
1
4
  import {
2
5
  DisableableSwipeable
3
6
  } from "./chunk-XJX4HQF2.js";
@@ -7,12 +10,9 @@ import {
7
10
  import {
8
11
  SwipeItem
9
12
  } from "./chunk-BDKB5ELS.js";
10
- import {
11
- resolveMessageFromServiceMessage
12
- } from "./chunk-SHKOH7MA.js";
13
13
  import {
14
14
  useServiceMessageState
15
- } from "./chunk-HN6FG72A.js";
15
+ } from "./chunk-DIITQCRW.js";
16
16
  import {
17
17
  __spreadProps,
18
18
  __spreadValues
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useLanguage
3
- } from "./chunk-2EBLJCZH.js";
3
+ } from "./chunk-GEEFQMRN.js";
4
4
 
5
5
  // src/components/screens/language/components/SelectLanguageCellGroup.tsx
6
6
  import React from "react";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useEnvironment
3
- } from "./chunk-2EBLJCZH.js";
3
+ } from "./chunk-GEEFQMRN.js";
4
4
 
5
5
  // src/components/EnvironmentBanner.tsx
6
6
  import React from "react";
@@ -0,0 +1,16 @@
1
+ // src/components/CoreNavigatorTypeProvider.tsx
2
+ import React, { createContext, useContext } from "react";
3
+ var CoreNavigatorTypeContext = createContext(null);
4
+ var CoreNavigatorTypeProvider = ({ type, children }) => {
5
+ return /* @__PURE__ */ React.createElement(CoreNavigatorTypeContext.Provider, { value: type }, children);
6
+ };
7
+ var useCoreNavigatorType = () => {
8
+ const coreNavigatorType = useContext(CoreNavigatorTypeContext);
9
+ if (!coreNavigatorType) throw new Error("Could not find core navigator type. You have most likely not added a core navigator to your application");
10
+ return coreNavigatorType;
11
+ };
12
+
13
+ export {
14
+ CoreNavigatorTypeProvider,
15
+ useCoreNavigatorType
16
+ };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  ServiceMessageBanner
3
- } from "./chunk-K2NXCEIW.js";
3
+ } from "./chunk-JGQUMXF3.js";
4
4
  import {
5
5
  EnvironmentBanner
6
- } from "./chunk-PWORULZD.js";
6
+ } from "./chunk-PB3TI2RT.js";
7
7
 
8
8
  // src/components/navigation/MadCoreSubHeader.tsx
9
9
  import React from "react";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  SelectLanguageCellGroup
3
- } from "./chunk-CXXCHRHS.js";
3
+ } from "./chunk-KEH6NBFE.js";
4
4
  import {
5
5
  useScreenTitleFromDictionary
6
- } from "./chunk-5BWKCV3H.js";
6
+ } from "./chunk-U5IJVQDO.js";
7
7
  import {
8
8
  useNavigateFromLanguageSelectScreen
9
- } from "./chunk-ADBVMDRF.js";
9
+ } from "./chunk-IHCNAGT7.js";
10
10
  import {
11
11
  useDictionary,
12
12
  useLanguage
13
- } from "./chunk-2EBLJCZH.js";
13
+ } from "./chunk-GEEFQMRN.js";
14
14
 
15
15
  // src/components/screens/language/SelectLanguageScreen.tsx
16
16
  import React, { useState } from "react";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-ZB37EIZB.js";
4
4
  import {
5
5
  getConfig
6
- } from "./chunk-2EBLJCZH.js";
6
+ } from "./chunk-GEEFQMRN.js";
7
7
 
8
8
  // src/components/service-message/hooks/useFetchServiceMessage.ts
9
9
  import { useEffect, useRef, useState } from "react";
@@ -6,10 +6,10 @@ import {
6
6
  } from "./chunk-OCWASWDK.js";
7
7
  import {
8
8
  useScreenTitleFromDictionary
9
- } from "./chunk-5BWKCV3H.js";
9
+ } from "./chunk-U5IJVQDO.js";
10
10
  import {
11
11
  useReleaseNotes
12
- } from "./chunk-UV3M2SNJ.js";
12
+ } from "./chunk-DJMBVNB6.js";
13
13
 
14
14
  // src/components/screens/release-notes/ReleaseNotesScreen.tsx
15
15
  import React from "react";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-BIMOM43W.js";
4
4
  import {
5
5
  useDictionary
6
- } from "./chunk-2EBLJCZH.js";
6
+ } from "./chunk-GEEFQMRN.js";
7
7
 
8
8
  // src/hooks/useScreenTitleFromDictionary.ts
9
9
  import { useLayoutEffect } from "react";
@@ -0,0 +1,41 @@
1
+ import {
2
+ initiateAuthenticationClient
3
+ } from "./chunk-WDZF2C5R.js";
4
+ import {
5
+ createNativeStackNavigator,
6
+ createStackNavigator
7
+ } from "./chunk-YB3XJPRA.js";
8
+ import {
9
+ createMadCoreNativeStackNavigator,
10
+ createMadCoreStackNavigator
11
+ } from "./chunk-4DFNW2IQ.js";
12
+ import {
13
+ setConfig
14
+ } from "./chunk-GEEFQMRN.js";
15
+ import {
16
+ __spreadProps,
17
+ __spreadValues
18
+ } from "./chunk-CWMXXUWU.js";
19
+
20
+ // src/components/createCoreStackNavigator.tsx
21
+ var createStackCoreNavigator = (config) => {
22
+ setConfig(config);
23
+ initiateAuthenticationClient();
24
+ const Stack = createStackNavigator();
25
+ const Navigator = createMadCoreStackNavigator(Stack);
26
+ return __spreadProps(__spreadValues({}, Stack), { Navigator });
27
+ };
28
+ var createNativeStackCoreNavigator = (config) => {
29
+ setConfig(config);
30
+ initiateAuthenticationClient();
31
+ const Stack = createNativeStackNavigator();
32
+ const Navigator = createMadCoreNativeStackNavigator(Stack);
33
+ return __spreadProps(__spreadValues({}, Stack), { Navigator });
34
+ };
35
+ var createCoreStackNavigator = (config) => createNativeStackCoreNavigator(config);
36
+
37
+ export {
38
+ createStackCoreNavigator,
39
+ createNativeStackCoreNavigator,
40
+ createCoreStackNavigator
41
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getConfig
3
- } from "./chunk-2EBLJCZH.js";
3
+ } from "./chunk-GEEFQMRN.js";
4
4
  import {
5
5
  getRedirectUriFromAuthConfig
6
6
  } from "./chunk-MODG2KVN.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-BIMOM43W.js";
7
7
  import {
8
8
  getConfig
9
- } from "./chunk-2EBLJCZH.js";
9
+ } from "./chunk-GEEFQMRN.js";
10
10
  import {
11
11
  CoreRoutes
12
12
  } from "./chunk-UKAZW3CQ.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-UZ6YMQV2.js";
4
4
  import {
5
5
  getConfig
6
- } from "./chunk-2EBLJCZH.js";
6
+ } from "./chunk-GEEFQMRN.js";
7
7
 
8
8
  // src/hooks/useAccountOrDemoAccount.ts
9
9
  import { ExpoAuthSession, useAccount } from "@equinor/mad-auth";
@@ -1,16 +1,19 @@
1
1
  import {
2
2
  MadCoreSubHeader
3
- } from "./chunk-KLVEVBW7.js";
3
+ } from "./chunk-SMWK2VYY.js";
4
4
 
5
5
  // src/components/navigation/navigation-creators.ts
6
6
  import {
7
7
  createBottomTabNavigatorFactory,
8
- createNativeStackNavigatorFactory
8
+ createNativeStackNavigatorFactory,
9
+ createStackNavigatorFactory
9
10
  } from "@equinor/mad-navigation";
10
11
  var createBottomTabNavigator = createBottomTabNavigatorFactory(MadCoreSubHeader);
11
12
  var createNativeStackNavigator = createNativeStackNavigatorFactory(MadCoreSubHeader);
13
+ var createStackNavigator = createStackNavigatorFactory(MadCoreSubHeader);
12
14
 
13
15
  export {
14
16
  createBottomTabNavigator,
15
- createNativeStackNavigator
17
+ createNativeStackNavigator,
18
+ createStackNavigator
16
19
  };
@@ -1,12 +1,15 @@
1
1
  import {
2
2
  getMadCommonBaseUrl
3
3
  } from "./chunk-ZB37EIZB.js";
4
+ import {
5
+ useCoreNavigatorType
6
+ } from "./chunk-PP74MP4O.js";
4
7
  import {
5
8
  useAbout,
6
9
  useAppVersion,
7
10
  useEnvironment,
8
11
  useExperimentalFeatures
9
- } from "./chunk-2EBLJCZH.js";
12
+ } from "./chunk-GEEFQMRN.js";
10
13
 
11
14
  // src/components/screens/AboutScreen.tsx
12
15
  import React from "react";
@@ -19,6 +22,7 @@ var AboutScreen = () => {
19
22
  const environmentName = environment.charAt(0).toUpperCase() + environment.slice(1);
20
23
  const appVersion = useAppVersion();
21
24
  const about = useAbout();
25
+ const coreNavigatorType = useCoreNavigatorType();
22
26
  const experimentalFeatures = useExperimentalFeatures();
23
27
  const authenticationMethod = (experimentalFeatures == null ? void 0 : experimentalFeatures.useExpoAuthSession) ? "Expo" : "MSAL";
24
28
  const endpoints = [getMadCommonBaseUrl(environment)].concat((_a = about == null ? void 0 : about.endpoints) != null ? _a : []);
@@ -28,7 +32,7 @@ var AboutScreen = () => {
28
32
  contentInsetAdjustmentBehavior: "automatic",
29
33
  contentContainerStyle: styles.contentContainer
30
34
  },
31
- /* @__PURE__ */ React.createElement(Cell, null, /* @__PURE__ */ React.createElement(View, { style: styles.cellContainer }, /* @__PURE__ */ React.createElement(Typography, { variant: "h2" }, "Client"), /* @__PURE__ */ React.createElement(View, { style: styles.rowContainer }, /* @__PURE__ */ React.createElement(View, { style: styles.columnContainer }, /* @__PURE__ */ React.createElement(Typography, null, "Configuration"), /* @__PURE__ */ React.createElement(Typography, null, "BuildNr"), /* @__PURE__ */ React.createElement(Typography, null, "App version"), /* @__PURE__ */ React.createElement(Typography, null, "Authentication")), /* @__PURE__ */ React.createElement(View, { style: styles.columnContainer }, /* @__PURE__ */ React.createElement(Typography, null, environmentName), /* @__PURE__ */ React.createElement(Typography, null, about == null ? void 0 : about.buildNumber), /* @__PURE__ */ React.createElement(Typography, null, appVersion), /* @__PURE__ */ React.createElement(Typography, null, authenticationMethod))))),
35
+ /* @__PURE__ */ React.createElement(Cell, null, /* @__PURE__ */ React.createElement(View, { style: styles.cellContainer }, /* @__PURE__ */ React.createElement(Typography, { variant: "h2" }, "Client"), /* @__PURE__ */ React.createElement(View, { style: styles.rowContainer }, /* @__PURE__ */ React.createElement(View, { style: styles.columnContainer }, /* @__PURE__ */ React.createElement(Typography, null, "Configuration"), /* @__PURE__ */ React.createElement(Typography, null, "BuildNr"), /* @__PURE__ */ React.createElement(Typography, null, "App version"), /* @__PURE__ */ React.createElement(Typography, null, "Authentication"), /* @__PURE__ */ React.createElement(Typography, null, "Core navigator type")), /* @__PURE__ */ React.createElement(View, { style: styles.columnContainer }, /* @__PURE__ */ React.createElement(Typography, null, environmentName), /* @__PURE__ */ React.createElement(Typography, null, about == null ? void 0 : about.buildNumber), /* @__PURE__ */ React.createElement(Typography, null, appVersion), /* @__PURE__ */ React.createElement(Typography, null, authenticationMethod), /* @__PURE__ */ React.createElement(Typography, null, coreNavigatorType))))),
32
36
  /* @__PURE__ */ React.createElement(Cell, null, /* @__PURE__ */ React.createElement(View, { style: styles.cellContainer }, /* @__PURE__ */ React.createElement(Typography, { variant: "h2" }, "Api"), /* @__PURE__ */ React.createElement(View, { style: styles.columnContainer }, /* @__PURE__ */ React.createElement(Typography, null, "Endpoints"), /* @__PURE__ */ React.createElement(View, null, endpoints.map((endpoint) => /* @__PURE__ */ React.createElement(Typography, { key: endpoint }, endpoint))))))
33
37
  );
34
38
  };
@@ -6,11 +6,11 @@ import {
6
6
  } from "./chunk-NJ5W3O5I.js";
7
7
  import {
8
8
  useAccountOrDemoAccount
9
- } from "./chunk-VWR2AFO7.js";
9
+ } from "./chunk-WWF7QKDX.js";
10
10
  import {
11
11
  useEnvironment,
12
12
  useServiceNow
13
- } from "./chunk-2EBLJCZH.js";
13
+ } from "./chunk-GEEFQMRN.js";
14
14
 
15
15
  // src/components/screens/create-incident/CreateIncidentScreen.tsx
16
16
  import {
@@ -0,0 +1,8 @@
1
+ import React, { PropsWithChildren } from "react";
2
+ export type CoreNavigatorType = "stack" | "native-stack";
3
+ type CoreNavigatorTypeProviderProps = PropsWithChildren<{
4
+ type: CoreNavigatorType;
5
+ }>;
6
+ export declare const CoreNavigatorTypeProvider: ({ type, children }: CoreNavigatorTypeProviderProps) => React.JSX.Element;
7
+ export declare const useCoreNavigatorType: () => CoreNavigatorType;
8
+ export {};
@@ -0,0 +1,9 @@
1
+ import {
2
+ CoreNavigatorTypeProvider,
3
+ useCoreNavigatorType
4
+ } from "../chunk-PP74MP4O.js";
5
+ import "../chunk-CWMXXUWU.js";
6
+ export {
7
+ CoreNavigatorTypeProvider,
8
+ useCoreNavigatorType
9
+ };
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  EnvironmentBanner
3
- } from "../chunk-PWORULZD.js";
4
- import "../chunk-2EBLJCZH.js";
3
+ } from "../chunk-PB3TI2RT.js";
4
+ import "../chunk-GEEFQMRN.js";
5
5
  import "../chunk-45SUJ4GS.js";
6
- import "../chunk-UKAZW3CQ.js";
7
6
  import "../chunk-MODG2KVN.js";
7
+ import "../chunk-UKAZW3CQ.js";
8
8
  import "../chunk-2OMVVDBU.js";
9
9
  import "../chunk-CWMXXUWU.js";
10
10
  export {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  EnvironmentProvider
3
- } from "../chunk-4ZZKAQ7C.js";
4
- import "../chunk-2EBLJCZH.js";
3
+ } from "../chunk-7HGZLLNX.js";
4
+ import "../chunk-GEEFQMRN.js";
5
5
  import "../chunk-45SUJ4GS.js";
6
- import "../chunk-UKAZW3CQ.js";
7
6
  import "../chunk-MODG2KVN.js";
7
+ import "../chunk-UKAZW3CQ.js";
8
8
  import "../chunk-2OMVVDBU.js";
9
9
  import "../chunk-CWMXXUWU.js";
10
10
  export {
@@ -1,8 +1,17 @@
1
1
  import {
2
- ToastEmitter
3
- } from "../chunk-DEVBLCRV.js";
4
- import "../chunk-NA7ZYOXW.js";
2
+ getTopOffsetForToast
3
+ } from "../chunk-NA7ZYOXW.js";
5
4
  import "../chunk-CWMXXUWU.js";
5
+
6
+ // src/components/ToastEmitter.tsx
7
+ import React from "react";
8
+ import { ToastEmitter as MadToastEmitter } from "@equinor/mad-toast";
9
+ import { useSafeAreaInsets } from "react-native-safe-area-context";
10
+ var ToastEmitter = () => {
11
+ const safeAreaInsets = useSafeAreaInsets();
12
+ const topOffset = getTopOffsetForToast(safeAreaInsets.top);
13
+ return /* @__PURE__ */ React.createElement(MadToastEmitter, { topOffset });
14
+ };
6
15
  export {
7
16
  ToastEmitter
8
17
  };