@equinor/mad-core 0.0.3 → 0.1.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.
Files changed (139) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/chunk-3XUVY5MJ.js +16 -0
  3. package/dist/chunk-4RNGXNYB.js +61 -0
  4. package/dist/chunk-5IIGFQQJ.js +44 -0
  5. package/dist/chunk-5LTGZQUP.js +0 -0
  6. package/dist/chunk-6GFARWDK.js +30 -0
  7. package/dist/chunk-6SBQOSWK.js +355 -0
  8. package/dist/chunk-7SJM4NDH.js +12 -0
  9. package/dist/chunk-AEGDSD6N.js +10 -0
  10. package/dist/chunk-AK7PA4BE.js +0 -0
  11. package/dist/chunk-AM5E5CYS.js +58 -0
  12. package/dist/chunk-BIMOM43W.js +9 -0
  13. package/dist/chunk-DCUF7ZWX.js +15 -0
  14. package/dist/chunk-DOHQX5XC.js +50 -0
  15. package/dist/chunk-DQ6CWJSW.js +53 -0
  16. package/dist/{chunk-SDIKBCFE.js → chunk-DTXV5LS2.js} +5 -3
  17. package/dist/chunk-DWAJZVKH.js +19 -0
  18. package/dist/chunk-EQYL7INQ.js +22 -0
  19. package/dist/chunk-GCBWBANV.js +10 -0
  20. package/dist/{chunk-FQWPBBPB.js → chunk-GSC3O7TW.js} +1 -1
  21. package/dist/chunk-GUKC6UGZ.js +0 -0
  22. package/dist/chunk-HGT5ZUYL.js +25 -0
  23. package/dist/chunk-JPK5SCA5.js +19 -0
  24. package/dist/chunk-LSEPBTCQ.js +50 -0
  25. package/dist/chunk-MDOJ2W2G.js +23 -0
  26. package/dist/chunk-N4V52CSH.js +43 -0
  27. package/dist/chunk-NLLLEXHT.js +118 -0
  28. package/dist/chunk-P636GRYJ.js +41 -0
  29. package/dist/chunk-PBCPR4ZO.js +8 -0
  30. package/dist/{chunk-AGAXO3NW.js → chunk-QXK5OE27.js} +5 -1
  31. package/dist/chunk-T3WC3PE2.js +23 -0
  32. package/dist/chunk-UVQ3Z5PG.js +0 -0
  33. package/dist/{chunk-FIFUL4JE.js → chunk-V4QL2TIA.js} +20 -4
  34. package/dist/chunk-VBEIVB4R.js +10 -0
  35. package/dist/chunk-VXUERD3Z.js +36 -0
  36. package/dist/{chunk-QU6EUUQS.js → chunk-XR6K2TU2.js} +28 -14
  37. package/dist/chunk-YY3XXUD6.js +23 -0
  38. package/dist/components/AnnouncementsProvider.js +2 -2
  39. package/dist/components/ErrorBoundary.d.ts +3 -0
  40. package/dist/components/ErrorBoundary.js +7 -0
  41. package/dist/components/NavigationContainer.d.ts +3 -0
  42. package/dist/components/NavigationContainer.js +7 -0
  43. package/dist/components/createCoreStackNavigator.d.ts +7 -7
  44. package/dist/components/createCoreStackNavigator.js +30 -13
  45. package/dist/components/index.d.ts +4 -0
  46. package/dist/components/index.js +55 -15
  47. package/dist/components/navigation/MadCoreSubHeader.d.ts +2 -0
  48. package/dist/components/navigation/MadCoreSubHeader.js +7 -0
  49. package/dist/components/navigation/index.d.ts +1 -0
  50. package/dist/components/navigation/index.js +11 -0
  51. package/dist/components/navigation/navigation-creators.d.ts +30 -0
  52. package/dist/components/navigation/navigation-creators.js +10 -0
  53. package/dist/components/screens/AboutScreen.d.ts +2 -0
  54. package/dist/components/screens/AboutScreen.js +7 -0
  55. package/dist/components/screens/CreateIncidentScreen.d.ts +2 -0
  56. package/dist/components/screens/CreateIncidentScreen.js +7 -0
  57. package/dist/components/screens/LoginScreen.js +8 -6
  58. package/dist/components/screens/language/SelectLanguageScreen.d.ts +2 -0
  59. package/dist/components/screens/language/SelectLanguageScreen.js +20 -0
  60. package/dist/components/screens/language/components/SelectLanguageCellGroup.d.ts +7 -0
  61. package/dist/components/screens/language/components/SelectLanguageCellGroup.js +12 -0
  62. package/dist/components/screens/release-notes/ChangeLog.d.ts +2 -3
  63. package/dist/components/screens/release-notes/ChangeLog.js +2 -3
  64. package/dist/components/screens/release-notes/ReleaseNotesScreen.d.ts +2 -0
  65. package/dist/components/screens/release-notes/ReleaseNotesScreen.js +22 -0
  66. package/dist/components/screens/release-notes/WhatsNewScreen.js +14 -8
  67. package/dist/components/screens/release-notes/fetchReleaseNotes.d.ts +1 -0
  68. package/dist/components/screens/release-notes/fetchReleaseNotes.js +4 -2
  69. package/dist/components/screens/settings/Section.d.ts +3 -0
  70. package/dist/components/screens/settings/Section.js +13 -0
  71. package/dist/components/screens/settings/SettingsScreen.d.ts +15 -0
  72. package/dist/components/screens/settings/SettingsScreen.js +22 -0
  73. package/dist/components/screens/settings/index.d.ts +2 -0
  74. package/dist/components/screens/settings/index.js +24 -0
  75. package/dist/components/screens/settings/renderCell.d.ts +5 -0
  76. package/dist/components/screens/settings/renderCell.js +7 -0
  77. package/dist/components/screens/settings/types.d.ts +22 -0
  78. package/dist/components/screens/settings/types.js +1 -0
  79. package/dist/components/screens/settings/useSignOut.d.ts +1 -0
  80. package/dist/components/screens/settings/useSignOut.js +10 -0
  81. package/dist/hooks/UseReleaseNotes.d.ts +6 -0
  82. package/dist/hooks/UseReleaseNotes.js +17 -0
  83. package/dist/hooks/index.d.ts +2 -0
  84. package/dist/hooks/index.js +16 -0
  85. package/dist/hooks/useAccountOrDemoAccount.d.ts +7 -0
  86. package/dist/hooks/useAccountOrDemoAccount.js +9 -0
  87. package/dist/hooks/useCoreStackNavigation.d.ts +2 -1
  88. package/dist/hooks/useCoreStackNavigation.js +6 -4
  89. package/dist/hooks/useScreenTitleFromDictionary.d.ts +2 -0
  90. package/dist/hooks/useScreenTitleFromDictionary.js +13 -0
  91. package/dist/index.d.ts +2 -0
  92. package/dist/index.js +68 -15
  93. package/dist/language/types.d.ts +2 -0
  94. package/dist/language/types.js +0 -0
  95. package/dist/language/useDictionary.d.ts +2 -0
  96. package/dist/language/useDictionary.js +11 -0
  97. package/dist/store/demo-mode/demo-mode.js +1 -1
  98. package/dist/store/demo-mode/index.js +1 -1
  99. package/dist/store/language/index.d.ts +0 -1
  100. package/dist/store/language/index.js +6 -8
  101. package/dist/store/language/language.d.ts +3 -2
  102. package/dist/store/language/language.js +6 -4
  103. package/dist/store/mad-config/hooks.d.ts +13 -3
  104. package/dist/store/mad-config/hooks.js +9 -4
  105. package/dist/store/mad-config/index.js +9 -5
  106. package/dist/store/mad-config/mad-config.js +1 -1
  107. package/dist/store/release-notes/index.js +2 -1
  108. package/dist/store/release-notes/release-notes.js +1 -1
  109. package/dist/store/storage.js +1 -1
  110. package/dist/types.d.ts +32 -1
  111. package/dist/utils/createMadCoreNavigator.d.ts +2 -2
  112. package/dist/utils/createMadCoreNavigator.js +26 -12
  113. package/dist/utils/dateUtils.js +1 -1
  114. package/dist/utils/getFinalSettingsConfig.d.ts +3 -0
  115. package/dist/utils/getFinalSettingsConfig.js +7 -0
  116. package/dist/utils/getNavigationRouteForLoginScreen.d.ts +2 -1
  117. package/dist/utils/getNavigationRouteForLoginScreen.js +8 -2
  118. package/dist/utils/getNavigationRouteForSelectLanguageScreen.d.ts +2 -0
  119. package/dist/utils/getNavigationRouteForSelectLanguageScreen.js +7 -0
  120. package/dist/utils/getNavigationRouteForWhatsNewScreen.d.ts +2 -0
  121. package/dist/utils/getNavigationRouteForWhatsNewScreen.js +12 -0
  122. package/dist/utils/getPremadeSettings.d.ts +8 -0
  123. package/dist/utils/getPremadeSettings.js +7 -0
  124. package/dist/utils/getRedirectUriFromAuthConfig.d.ts +2 -0
  125. package/dist/utils/getRedirectUriFromAuthConfig.js +7 -0
  126. package/dist/utils/madCommonUtils.js +1 -1
  127. package/package.json +13 -12
  128. package/dist/chunk-3DI7YERU.js +0 -80
  129. package/dist/chunk-ICIPJG6P.js +0 -34
  130. package/dist/chunk-J53YLHKZ.js +0 -15
  131. package/dist/chunk-JPVO5SH5.js +0 -33
  132. package/dist/chunk-JRIQBUIT.js +0 -95
  133. package/dist/chunk-K2H37TUR.js +0 -7
  134. package/dist/chunk-XYNA7G2L.js +0 -62
  135. package/dist/store/language/supported-languages.d.ts +0 -11
  136. package/dist/store/language/supported-languages.js +0 -7
  137. /package/dist/{chunk-HAB34YS7.js → chunk-2GCLIPZP.js} +0 -0
  138. /package/dist/{chunk-USETLDR7.js → chunk-5GBNULIT.js} +0 -0
  139. /package/dist/{chunk-UTXWRAEE.js → chunk-BZK6J33D.js} +0 -0
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { SettingsScreenConfiguration } from "./types";
3
+ export type SettingsScreenProps = {
4
+ /**
5
+ * Your settings screen configuration.
6
+ */
7
+ config?: SettingsScreenConfiguration;
8
+ /**
9
+ * Set this to true if you want full autonomy of the content on the settings page.
10
+ * If this is false, we will put some default cells in the settings screen for you,
11
+ * Like Release notes, About, etc.
12
+ */
13
+ clean?: boolean;
14
+ };
15
+ export declare const SettingsScreen: ({ config, clean }: SettingsScreenProps) => React.JSX.Element;
@@ -0,0 +1,22 @@
1
+ import {
2
+ SettingsScreen
3
+ } from "../../../chunk-LSEPBTCQ.js";
4
+ import "../../../chunk-VXUERD3Z.js";
5
+ import "../../../chunk-DWAJZVKH.js";
6
+ import "../../../chunk-DOHQX5XC.js";
7
+ import "../../../chunk-7SJM4NDH.js";
8
+ import "../../../chunk-GUKC6UGZ.js";
9
+ import "../../../chunk-EQYL7INQ.js";
10
+ import "../../../chunk-MDOJ2W2G.js";
11
+ import "../../../chunk-BIMOM43W.js";
12
+ import "../../../chunk-CCVKLLIO.js";
13
+ import "../../../chunk-UZ6YMQV2.js";
14
+ import "../../../chunk-6SBQOSWK.js";
15
+ import "../../../chunk-ZSTTHIEF.js";
16
+ import "../../../chunk-P636GRYJ.js";
17
+ import "../../../chunk-DCUF7ZWX.js";
18
+ import "../../../chunk-2OMVVDBU.js";
19
+ import "../../../chunk-BZK6J33D.js";
20
+ export {
21
+ SettingsScreen
22
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./SettingsScreen";
2
+ export * from "./types";
@@ -0,0 +1,24 @@
1
+ import "../../../chunk-AK7PA4BE.js";
2
+ import "../../../chunk-5GBNULIT.js";
3
+ import {
4
+ SettingsScreen
5
+ } from "../../../chunk-LSEPBTCQ.js";
6
+ import "../../../chunk-VXUERD3Z.js";
7
+ import "../../../chunk-DWAJZVKH.js";
8
+ import "../../../chunk-DOHQX5XC.js";
9
+ import "../../../chunk-7SJM4NDH.js";
10
+ import "../../../chunk-GUKC6UGZ.js";
11
+ import "../../../chunk-EQYL7INQ.js";
12
+ import "../../../chunk-MDOJ2W2G.js";
13
+ import "../../../chunk-BIMOM43W.js";
14
+ import "../../../chunk-CCVKLLIO.js";
15
+ import "../../../chunk-UZ6YMQV2.js";
16
+ import "../../../chunk-6SBQOSWK.js";
17
+ import "../../../chunk-ZSTTHIEF.js";
18
+ import "../../../chunk-P636GRYJ.js";
19
+ import "../../../chunk-DCUF7ZWX.js";
20
+ import "../../../chunk-2OMVVDBU.js";
21
+ import "../../../chunk-BZK6J33D.js";
22
+ export {
23
+ SettingsScreen
24
+ };
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { SettingsScreenCellConfigurationItem } from "./types";
3
+ import { NavigationProp } from "@react-navigation/native";
4
+ import { CoreStackParamListBase } from "../../../types";
5
+ export declare const renderCell: (item: SettingsScreenCellConfigurationItem, navigation: NavigationProp<CoreStackParamListBase>) => React.JSX.Element;
@@ -0,0 +1,7 @@
1
+ import {
2
+ renderCell
3
+ } from "../../../chunk-DOHQX5XC.js";
4
+ import "../../../chunk-BZK6J33D.js";
5
+ export {
6
+ renderCell
7
+ };
@@ -0,0 +1,22 @@
1
+ import { IconName, NavigationCellProps, ButtonCellProps, SwitchCellProps } from "@equinor/mad-components";
2
+ import { NavigationProp } from "@react-navigation/native";
3
+ import { CoreStackParamListBase } from "../../../types";
4
+ export type SettingsScreenCellConfigurationItem = ({
5
+ name: "navigation";
6
+ } & Omit<NavigationCellProps, "onPress"> & {
7
+ onPress: (navigation: NavigationProp<CoreStackParamListBase>) => void;
8
+ }) | ({
9
+ name: "button";
10
+ } & ButtonCellProps) | ({
11
+ name: "switch";
12
+ } & SwitchCellProps) | {
13
+ name: "custom";
14
+ title: string;
15
+ iconName: IconName;
16
+ param: unknown;
17
+ };
18
+ export type SettingsScreenSectionProps = {
19
+ title?: string;
20
+ items: SettingsScreenCellConfigurationItem[];
21
+ };
22
+ export type SettingsScreenConfiguration = SettingsScreenSectionProps[];
@@ -0,0 +1 @@
1
+ import "../../../chunk-5GBNULIT.js";
@@ -0,0 +1 @@
1
+ export declare const useSignOut: () => () => Promise<void>;
@@ -0,0 +1,10 @@
1
+ import {
2
+ useSignOut
3
+ } from "../../../chunk-VXUERD3Z.js";
4
+ import "../../../chunk-BIMOM43W.js";
5
+ import "../../../chunk-CCVKLLIO.js";
6
+ import "../../../chunk-UZ6YMQV2.js";
7
+ import "../../../chunk-BZK6J33D.js";
8
+ export {
9
+ useSignOut
10
+ };
@@ -0,0 +1,6 @@
1
+ import { Release } from "../components/screens/release-notes/ChangeLog";
2
+ export declare const useReleaseNotes: () => {
3
+ releaseNotes: Release[] | undefined;
4
+ isFetching: boolean;
5
+ error: string;
6
+ };
@@ -0,0 +1,17 @@
1
+ import {
2
+ useReleaseNotes
3
+ } from "../chunk-5IIGFQQJ.js";
4
+ import "../chunk-6GFARWDK.js";
5
+ import "../chunk-V4QL2TIA.js";
6
+ import "../chunk-RFYZGBU4.js";
7
+ import "../chunk-CCVKLLIO.js";
8
+ import "../chunk-UZ6YMQV2.js";
9
+ import "../chunk-6SBQOSWK.js";
10
+ import "../chunk-ZSTTHIEF.js";
11
+ import "../chunk-P636GRYJ.js";
12
+ import "../chunk-DCUF7ZWX.js";
13
+ import "../chunk-2OMVVDBU.js";
14
+ import "../chunk-BZK6J33D.js";
15
+ export {
16
+ useReleaseNotes
17
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./useCoreStackNavigation";
2
+ export * from "./useAccountOrDemoAccount";
@@ -0,0 +1,16 @@
1
+ import "../chunk-GUKC6UGZ.js";
2
+ import {
3
+ useAccountOrDemoAccount
4
+ } from "../chunk-EQYL7INQ.js";
5
+ import {
6
+ useCoreStackNavigation,
7
+ useCoreStackRoute
8
+ } from "../chunk-BIMOM43W.js";
9
+ import "../chunk-CCVKLLIO.js";
10
+ import "../chunk-UZ6YMQV2.js";
11
+ import "../chunk-BZK6J33D.js";
12
+ export {
13
+ useAccountOrDemoAccount,
14
+ useCoreStackNavigation,
15
+ useCoreStackRoute
16
+ };
@@ -0,0 +1,7 @@
1
+ import { MadAccount } from "@equinor/mad-auth";
2
+ /**
3
+ * If demo mode is enabled, this will return a mock account.
4
+ * Otherwise returns the result from `mad-auth`'s `useAccount` hook.
5
+ * @returns account if it exists
6
+ */
7
+ export declare const useAccountOrDemoAccount: () => MadAccount | null | undefined;
@@ -0,0 +1,9 @@
1
+ import {
2
+ useAccountOrDemoAccount
3
+ } from "../chunk-EQYL7INQ.js";
4
+ import "../chunk-CCVKLLIO.js";
5
+ import "../chunk-UZ6YMQV2.js";
6
+ import "../chunk-BZK6J33D.js";
7
+ export {
8
+ useAccountOrDemoAccount
9
+ };
@@ -1,3 +1,4 @@
1
- import { NavigationProp } from "@react-navigation/native";
1
+ import { NavigationProp, RouteProp } from "@react-navigation/native";
2
2
  import { CoreStackParamListBase } from "../types";
3
3
  export declare const useCoreStackNavigation: () => NavigationProp<CoreStackParamListBase>;
4
+ export declare const useCoreStackRoute: () => RouteProp<CoreStackParamListBase>;
@@ -1,7 +1,9 @@
1
1
  import {
2
- useCoreStackNavigation
3
- } from "../chunk-K2H37TUR.js";
4
- import "../chunk-UTXWRAEE.js";
2
+ useCoreStackNavigation,
3
+ useCoreStackRoute
4
+ } from "../chunk-BIMOM43W.js";
5
+ import "../chunk-BZK6J33D.js";
5
6
  export {
6
- useCoreStackNavigation
7
+ useCoreStackNavigation,
8
+ useCoreStackRoute
7
9
  };
@@ -0,0 +1,2 @@
1
+ import { CoreDictionary } from "../language/types";
2
+ export declare const useScreenTitleFromDictionary: (pickFn: (dictionary: CoreDictionary) => string) => void;
@@ -0,0 +1,13 @@
1
+ import {
2
+ useScreenTitleFromDictionary
3
+ } from "../chunk-MDOJ2W2G.js";
4
+ import "../chunk-BIMOM43W.js";
5
+ import "../chunk-6SBQOSWK.js";
6
+ import "../chunk-ZSTTHIEF.js";
7
+ import "../chunk-P636GRYJ.js";
8
+ import "../chunk-DCUF7ZWX.js";
9
+ import "../chunk-2OMVVDBU.js";
10
+ import "../chunk-BZK6J33D.js";
11
+ export {
12
+ useScreenTitleFromDictionary
13
+ };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,4 @@
1
1
  export * from "./types";
2
2
  export * from "./components";
3
+ export { addTelemetryInitializer, Envelope } from "@equinor/mad-insights";
4
+ export * from "./hooks";
package/dist/index.js CHANGED
@@ -1,26 +1,79 @@
1
1
  import "./chunk-6F4PWJZI.js";
2
- import "./chunk-HAB34YS7.js";
2
+ import "./chunk-5LTGZQUP.js";
3
+ import "./chunk-AK7PA4BE.js";
4
+ import "./chunk-5GBNULIT.js";
5
+ import {
6
+ SettingsScreen
7
+ } from "./chunk-LSEPBTCQ.js";
8
+ import "./chunk-VXUERD3Z.js";
9
+ import "./chunk-DWAJZVKH.js";
10
+ import "./chunk-DOHQX5XC.js";
11
+ import "./chunk-7SJM4NDH.js";
12
+ import {
13
+ ErrorBoundary
14
+ } from "./chunk-YY3XXUD6.js";
15
+ import {
16
+ NavigationContainer
17
+ } from "./chunk-HGT5ZUYL.js";
3
18
  import {
4
19
  createCoreStackNavigator
5
- } from "./chunk-SDIKBCFE.js";
6
- import "./chunk-ICIPJG6P.js";
7
- import "./chunk-JRIQBUIT.js";
8
- import "./chunk-FIFUL4JE.js";
9
- import "./chunk-3DI7YERU.js";
20
+ } from "./chunk-DTXV5LS2.js";
21
+ import "./chunk-2GCLIPZP.js";
22
+ import {
23
+ createBottomTabNavigator,
24
+ createNativeStackNavigator
25
+ } from "./chunk-3XUVY5MJ.js";
26
+ import "./chunk-PBCPR4ZO.js";
27
+ import "./chunk-DQ6CWJSW.js";
28
+ import "./chunk-N4V52CSH.js";
29
+ import "./chunk-JPK5SCA5.js";
30
+ import "./chunk-4RNGXNYB.js";
31
+ import "./chunk-NLLLEXHT.js";
32
+ import "./chunk-AM5E5CYS.js";
33
+ import "./chunk-UVQ3Z5PG.js";
34
+ import "./chunk-VBEIVB4R.js";
35
+ import "./chunk-GCBWBANV.js";
36
+ import "./chunk-XR6K2TU2.js";
37
+ import "./chunk-5BVQKJQB.js";
10
38
  import "./chunk-OCWASWDK.js";
39
+ import "./chunk-QXK5OE27.js";
40
+ import "./chunk-AEGDSD6N.js";
41
+ import "./chunk-T3WC3PE2.js";
42
+ import "./chunk-GUKC6UGZ.js";
43
+ import {
44
+ useAccountOrDemoAccount
45
+ } from "./chunk-EQYL7INQ.js";
46
+ import "./chunk-MDOJ2W2G.js";
47
+ import {
48
+ useCoreStackNavigation,
49
+ useCoreStackRoute
50
+ } from "./chunk-BIMOM43W.js";
51
+ import "./chunk-GSC3O7TW.js";
52
+ import "./chunk-5IIGFQQJ.js";
53
+ import "./chunk-6GFARWDK.js";
54
+ import "./chunk-V4QL2TIA.js";
11
55
  import "./chunk-RFYZGBU4.js";
12
- import "./chunk-QU6EUUQS.js";
13
- import "./chunk-5BVQKJQB.js";
14
- import "./chunk-AGAXO3NW.js";
15
56
  import "./chunk-CCVKLLIO.js";
16
57
  import "./chunk-UZ6YMQV2.js";
17
- import "./chunk-USETLDR7.js";
18
- import "./chunk-JPVO5SH5.js";
58
+ import "./chunk-6SBQOSWK.js";
19
59
  import "./chunk-ZSTTHIEF.js";
20
- import "./chunk-FQWPBBPB.js";
21
- import "./chunk-K2H37TUR.js";
60
+ import "./chunk-P636GRYJ.js";
61
+ import "./chunk-DCUF7ZWX.js";
22
62
  import "./chunk-2OMVVDBU.js";
23
- import "./chunk-UTXWRAEE.js";
63
+ import "./chunk-BZK6J33D.js";
64
+
65
+ // src/index.ts
66
+ import { addTelemetryInitializer, Envelope } from "@equinor/mad-insights";
24
67
  export {
25
- createCoreStackNavigator
68
+ Envelope,
69
+ ErrorBoundary,
70
+ NavigationContainer,
71
+ SettingsScreen,
72
+ addTelemetryInitializer,
73
+ createBottomTabNavigator,
74
+ createCoreStackNavigator,
75
+ createNativeStackNavigator,
76
+ useAccountOrDemoAccount,
77
+ useCoreStackNavigation,
78
+ useCoreStackRoute
26
79
  };
@@ -0,0 +1,2 @@
1
+ import * as englishDictionary from "../static/language/en.json";
2
+ export type CoreDictionary = typeof englishDictionary;
File without changes
@@ -0,0 +1,2 @@
1
+ import { CoreDictionary } from "./types";
2
+ export declare const useDictionary: () => CoreDictionary;
@@ -0,0 +1,11 @@
1
+ import {
2
+ useDictionary
3
+ } from "../chunk-6SBQOSWK.js";
4
+ import "../chunk-ZSTTHIEF.js";
5
+ import "../chunk-P636GRYJ.js";
6
+ import "../chunk-DCUF7ZWX.js";
7
+ import "../chunk-2OMVVDBU.js";
8
+ import "../chunk-BZK6J33D.js";
9
+ export {
10
+ useDictionary
11
+ };
@@ -4,7 +4,7 @@ import {
4
4
  getIsDemoModeEnabled,
5
5
  useDemoMode
6
6
  } from "../../chunk-UZ6YMQV2.js";
7
- import "../../chunk-UTXWRAEE.js";
7
+ import "../../chunk-BZK6J33D.js";
8
8
  export {
9
9
  disableDemoMode,
10
10
  enableDemoMode,
@@ -5,7 +5,7 @@ import {
5
5
  getIsDemoModeEnabled,
6
6
  useDemoMode
7
7
  } from "../../chunk-UZ6YMQV2.js";
8
- import "../../chunk-UTXWRAEE.js";
8
+ import "../../chunk-BZK6J33D.js";
9
9
  export {
10
10
  disableDemoMode,
11
11
  enableDemoMode,
@@ -1,2 +1 @@
1
1
  export * from "./language";
2
- export * from "./supported-languages";
@@ -1,18 +1,16 @@
1
1
  import {
2
+ getIsLanguageSelected,
2
3
  getLanguage,
3
4
  setSelectedLanguage,
4
5
  useLanguage
5
- } from "../../chunk-XYNA7G2L.js";
6
- import {
7
- CORE_SUPPORTED_LANGUAGES
8
- } from "../../chunk-J53YLHKZ.js";
9
- import "../../chunk-USETLDR7.js";
10
- import "../../chunk-JPVO5SH5.js";
6
+ } from "../../chunk-6SBQOSWK.js";
11
7
  import "../../chunk-ZSTTHIEF.js";
8
+ import "../../chunk-P636GRYJ.js";
9
+ import "../../chunk-DCUF7ZWX.js";
12
10
  import "../../chunk-2OMVVDBU.js";
13
- import "../../chunk-UTXWRAEE.js";
11
+ import "../../chunk-BZK6J33D.js";
14
12
  export {
15
- CORE_SUPPORTED_LANGUAGES,
13
+ getIsLanguageSelected,
16
14
  getLanguage,
17
15
  setSelectedLanguage,
18
16
  useLanguage
@@ -14,6 +14,7 @@ type LanguageState = {
14
14
  * @returns {Language} selected language or default language
15
15
  */
16
16
  getLanguage: () => Language;
17
+ getIsLanguageSelected: () => boolean;
17
18
  };
18
19
  export type UseLanguageReturnType = {
19
20
  /**
@@ -30,10 +31,10 @@ export type UseLanguageReturnType = {
30
31
  getDefaultLanguage: () => Language;
31
32
  /**
32
33
  * Set the user selected language of the app
33
- * @param {SupportedLanguageCode} code - language code
34
+ * @param {string} code - language code
34
35
  */
35
36
  setSelectedLanguage: LanguageState["setSelectedLanguage"];
36
37
  };
37
38
  export declare const useLanguage: () => UseLanguageReturnType;
38
- export declare const getLanguage: () => Language, setSelectedLanguage: (code: string) => void;
39
+ export declare const getLanguage: () => Language, setSelectedLanguage: (code: string) => void, getIsLanguageSelected: () => boolean;
39
40
  export {};
@@ -1,14 +1,16 @@
1
1
  import {
2
+ getIsLanguageSelected,
2
3
  getLanguage,
3
4
  setSelectedLanguage,
4
5
  useLanguage
5
- } from "../../chunk-XYNA7G2L.js";
6
- import "../../chunk-USETLDR7.js";
7
- import "../../chunk-JPVO5SH5.js";
6
+ } from "../../chunk-6SBQOSWK.js";
8
7
  import "../../chunk-ZSTTHIEF.js";
8
+ import "../../chunk-P636GRYJ.js";
9
+ import "../../chunk-DCUF7ZWX.js";
9
10
  import "../../chunk-2OMVVDBU.js";
10
- import "../../chunk-UTXWRAEE.js";
11
+ import "../../chunk-BZK6J33D.js";
11
12
  export {
13
+ getIsLanguageSelected,
12
14
  getLanguage,
13
15
  setSelectedLanguage,
14
16
  useLanguage
@@ -1,8 +1,14 @@
1
- export declare const useAuthConfig: () => {
2
- clientId: string;
1
+ import { MadConfig } from "../../types";
2
+ export type AuthConfig = {
3
+ clientId: MadConfig["authentication"]["clientId"];
4
+ scopes: MadConfig["authentication"]["scopes"];
5
+ /**
6
+ * resolved redirectUri. This can either be `redirectUri` or `redirectUriWeb` from the mad config, depending on which platform
7
+ * you're running on.
8
+ */
3
9
  redirectUri: string;
4
- scopes?: string[];
5
10
  };
11
+ export declare const useAuthConfig: () => AuthConfig;
6
12
  export declare const useLoginScreenConfig: () => {
7
13
  title: string;
8
14
  logo: import("react-native").ImageSourcePropType;
@@ -10,3 +16,7 @@ export declare const useLoginScreenConfig: () => {
10
16
  export declare const useAppVersion: () => string;
11
17
  export declare const useEnvironment: () => import("@equinor/mad-components/dist/components/Environment/types").EnvironmentName;
12
18
  export declare const useServicePortalName: () => string;
19
+ export declare const useSettingsScreenPremadeConfig: () => {
20
+ language: import("../..").SettingsScreenSectionProps | undefined;
21
+ common: import("../..").SettingsScreenSectionProps;
22
+ };
@@ -3,14 +3,19 @@ import {
3
3
  useAuthConfig,
4
4
  useEnvironment,
5
5
  useLoginScreenConfig,
6
- useServicePortalName
7
- } from "../../chunk-JPVO5SH5.js";
6
+ useServicePortalName,
7
+ useSettingsScreenPremadeConfig
8
+ } from "../../chunk-6SBQOSWK.js";
8
9
  import "../../chunk-ZSTTHIEF.js";
9
- import "../../chunk-UTXWRAEE.js";
10
+ import "../../chunk-P636GRYJ.js";
11
+ import "../../chunk-DCUF7ZWX.js";
12
+ import "../../chunk-2OMVVDBU.js";
13
+ import "../../chunk-BZK6J33D.js";
10
14
  export {
11
15
  useAppVersion,
12
16
  useAuthConfig,
13
17
  useEnvironment,
14
18
  useLoginScreenConfig,
15
- useServicePortalName
19
+ useServicePortalName,
20
+ useSettingsScreenPremadeConfig
16
21
  };
@@ -1,17 +1,20 @@
1
- import "../../chunk-USETLDR7.js";
2
1
  import {
3
2
  useAppVersion,
4
3
  useAuthConfig,
5
4
  useEnvironment,
6
5
  useLoginScreenConfig,
7
- useServicePortalName
8
- } from "../../chunk-JPVO5SH5.js";
6
+ useServicePortalName,
7
+ useSettingsScreenPremadeConfig
8
+ } from "../../chunk-6SBQOSWK.js";
9
9
  import {
10
10
  getConfig,
11
11
  setConfig,
12
12
  useMadConfig
13
13
  } from "../../chunk-ZSTTHIEF.js";
14
- import "../../chunk-UTXWRAEE.js";
14
+ import "../../chunk-P636GRYJ.js";
15
+ import "../../chunk-DCUF7ZWX.js";
16
+ import "../../chunk-2OMVVDBU.js";
17
+ import "../../chunk-BZK6J33D.js";
15
18
  export {
16
19
  getConfig,
17
20
  setConfig,
@@ -20,5 +23,6 @@ export {
20
23
  useEnvironment,
21
24
  useLoginScreenConfig,
22
25
  useMadConfig,
23
- useServicePortalName
26
+ useServicePortalName,
27
+ useSettingsScreenPremadeConfig
24
28
  };
@@ -3,7 +3,7 @@ import {
3
3
  setConfig,
4
4
  useMadConfig
5
5
  } from "../../chunk-ZSTTHIEF.js";
6
- import "../../chunk-UTXWRAEE.js";
6
+ import "../../chunk-BZK6J33D.js";
7
7
  export {
8
8
  getConfig,
9
9
  setConfig,
@@ -1,8 +1,9 @@
1
+ import "../../chunk-UVQ3Z5PG.js";
1
2
  import {
2
3
  useReleaseNotesVersion
3
4
  } from "../../chunk-5BVQKJQB.js";
4
5
  import "../../chunk-2OMVVDBU.js";
5
- import "../../chunk-UTXWRAEE.js";
6
+ import "../../chunk-BZK6J33D.js";
6
7
  export {
7
8
  useReleaseNotesVersion
8
9
  };
@@ -4,7 +4,7 @@ import {
4
4
  useReleaseNotesVersion
5
5
  } from "../../chunk-5BVQKJQB.js";
6
6
  import "../../chunk-2OMVVDBU.js";
7
- import "../../chunk-UTXWRAEE.js";
7
+ import "../../chunk-BZK6J33D.js";
8
8
  export {
9
9
  getLastDisplayedReleaseNotesVersion,
10
10
  setLastDisplayedReleaseNotesVersion,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createStorage
3
3
  } from "../chunk-2OMVVDBU.js";
4
- import "../chunk-UTXWRAEE.js";
4
+ import "../chunk-BZK6J33D.js";
5
5
  export {
6
6
  createStorage
7
7
  };
package/dist/types.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { EnvironmentContextProps } from "@equinor/mad-components";
2
2
  import { ImageSourcePropType } from "react-native";
3
3
  import { Language } from "./store/types";
4
+ import { AppInsightsInitConfig } from "@equinor/mad-insights";
4
5
  export type MadConfig = {
5
6
  /**
6
7
  * Version of the app. Will be displayed in the about screen, and will be used for release notes
@@ -25,6 +26,10 @@ export type MadConfig = {
25
26
  * If `defaultLanguageCode` is not provided, the first language in `supportedLanguages` will be considered default.
26
27
  */
27
28
  defaultLanguageCode?: string;
29
+ /**
30
+ * Core navigates to a language selection screen by default if needed. Set this to true if you want to override this behaviour
31
+ */
32
+ skipOnboarding?: boolean;
28
33
  };
29
34
  authentication: {
30
35
  /**
@@ -36,11 +41,18 @@ export type MadConfig = {
36
41
  clientId: string;
37
42
  /**
38
43
  * Redirect uri of your application.
39
- * You can find and modify your application's client Id in your application's
44
+ * You can find and modify your application's registered redirect URIs in your application's
40
45
  * App registration in Azure.
41
46
  * @see https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade
42
47
  */
43
48
  redirectUri: string;
49
+ /**
50
+ * Redirect uri for the web wersion of your application
51
+ * You can find and modify your application's registered redirect URIs in your application's
52
+ * App registration in Azure.
53
+ * @see https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade
54
+ */
55
+ redirectUriWeb?: string;
44
56
  /**
45
57
  * Scope to use for interactive login. You can find information about your application's
46
58
  * available scopes in your application's App registration in Azure.
@@ -58,10 +70,29 @@ export type MadConfig = {
58
70
  */
59
71
  logo: ImageSourcePropType;
60
72
  };
73
+ /**
74
+ * App insights config used for initializing application insights service(s)
75
+ */
76
+ applicationInsights: AppInsightsInitConfig;
77
+ about?: {
78
+ /**
79
+ * Endpoints used by the app
80
+ */
81
+ endpoints: string[];
82
+ /**
83
+ * Build number of the app.
84
+ */
85
+ buildNumber: string;
86
+ };
87
+ serviceNow?: {
88
+ whatever: string;
89
+ };
61
90
  };
62
91
  export type CoreStackParamListBase = {
63
92
  Login: undefined;
64
93
  WhatsNew: undefined;
94
+ SelectLanguage: undefined;
95
+ SelectLanguageOnboarding: undefined;
65
96
  ReleaseNotes: undefined;
66
97
  Settings: undefined;
67
98
  About: undefined;