@equinor/mad-core 0.4.4 → 0.5.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 (30) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +8 -14
  3. package/dist/{chunk-QLHWFCL7.js → chunk-7OEKHABR.js} +32 -10
  4. package/dist/chunk-JVWGVT35.js +14 -0
  5. package/dist/{chunk-EKNEHZIQ.js → chunk-K4I6DYU6.js} +10 -15
  6. package/dist/chunk-PFVXASJV.js +18 -0
  7. package/dist/{chunk-OTQW4CT3.js → chunk-QHCU7RLF.js} +3 -3
  8. package/dist/{chunk-77PTFBIE.js → chunk-SAN5LMEQ.js} +2 -2
  9. package/dist/{chunk-MUSZK2ZB.js → chunk-SKYDZALS.js} +4 -4
  10. package/dist/{chunk-ZQTKZDN2.js → chunk-TF36L3FR.js} +1 -1
  11. package/dist/components/EnvironmentBanner.d.ts +2 -0
  12. package/dist/components/EnvironmentBanner.js +12 -0
  13. package/dist/components/createCoreStackNavigator.d.ts +1 -1
  14. package/dist/components/createCoreStackNavigator.js +8 -8
  15. package/dist/components/index.js +8 -8
  16. package/dist/components/navigation/MadCoreSubHeader.js +3 -2
  17. package/dist/components/navigation/index.js +4 -3
  18. package/dist/components/navigation/navigation-creators.js +4 -3
  19. package/dist/components/screens/LoginScreen.js +1 -1
  20. package/dist/components/screens/create-incident/CreateIncidentScreen.js +1 -1
  21. package/dist/components/service-message/ServiceMessageBanner.js +1 -1
  22. package/dist/index.js +8 -8
  23. package/dist/store/mad-config/hooks.d.ts +1 -2
  24. package/dist/types.d.ts +3 -7
  25. package/dist/utils/createMadCoreNavigator.js +3 -4
  26. package/package.json +3 -3
  27. package/dist/chunk-GSOAYETS.js +0 -21
  28. package/dist/chunk-R36BNAFA.js +0 -13
  29. package/dist/components/AnnouncementsProvider.d.ts +0 -2
  30. package/dist/components/AnnouncementsProvider.js +0 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @equinor/mad-core
2
2
 
3
+ ## 0.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 04713bc: `CreateIncidentScreen`: Now has a scrollview surrounding the content, making the
8
+ content available on smaller devices
9
+
10
+ ## 0.5.0
11
+
12
+ ### Minor Changes
13
+
14
+ - b024e0f: login screen has been redesigned. Now requires you to provide a splash screen instead
15
+ of a title and logo
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [b024e0f]
20
+ - @equinor/mad-navigation@0.3.0
21
+
3
22
  ## 0.4.4
4
23
 
5
24
  ### Patch Changes
package/README.md CHANGED
@@ -64,8 +64,7 @@ safety:
64
64
 
65
65
  ```ts
66
66
  import { MadConfig } from "@equinor/mad-core";
67
- import Logo from "./assets/images/icon.png";
68
- import { ImageSourcePropType } from "react-native";
67
+ import Splash from "./assets/images/splash.png";
69
68
  import { getBuildNumber, getAppSpecificEndpoints } from "./settings";
70
69
  import { RootStackParamList } from "./types/navigation";
71
70
 
@@ -89,8 +88,7 @@ export const config: MadConfig<RootStackParamList> = {
89
88
  scopes: ["0a429637-3fe1-4452-bd95-c87923ba340b/user_impersonation"],
90
89
  },
91
90
  login: {
92
- title: "Chronicles",
93
- logo: Logo as ImageSourcePropType,
91
+ splash: Splash,
94
92
  },
95
93
  applicationInsights: {
96
94
  instrumentationKey: "f1859360-4aa2-425f-b494-2d7320de6832",
@@ -110,8 +108,7 @@ You can also set environment specific values for each field. The config supports
110
108
 
111
109
  ```ts
112
110
  import { MadConfig } from "@equinor/mad-core";
113
- import Logo from "./assets/images/icon.png";
114
- import { ImageSourcePropType } from "react-native";
111
+ import Splash from "./assets/images/splash.png";
115
112
  import { getBuildNumber } from "./settings";
116
113
  import { RootStackParamList } from "./types/navigation";
117
114
 
@@ -144,8 +141,7 @@ export const config: MadConfig<RootStackParamList> = {
144
141
  },
145
142
  },
146
143
  login: {
147
- title: "Chronicles",
148
- logo: Logo as ImageSourcePropType,
144
+ splash: Splash,
149
145
  },
150
146
  applicationInsights: {
151
147
  instrumentationKey: "f1859360-4aa2-425f-b494-2d7320de6832",
@@ -190,10 +186,9 @@ export const config: MadConfig<RootStackParamList> = {
190
186
 
191
187
  ###### Login config
192
188
 
193
- | key | required? | explanation |
194
- | ------- | --------- | -------------------------------------------------------------------------------- |
195
- | `title` | true | The title of the application. Will be displayed on the login screen |
196
- | `logo` | true | The logo of the application. Will be displayed in the middle of the login screen |
189
+ | key | required? | explanation |
190
+ | -------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
191
+ | `splash` | true | The splash screen of the application. Will be used as a background for the login screen. For best results, set `resizeMode` to `"cover"`, and `backgroundColor` to your splash screen's background color in `app.json`. `@equinor/mad-core` will use resize mode `cover` on iOS, and `contain` on web. |
197
192
 
198
193
  ###### Application Insights config
199
194
 
@@ -377,10 +372,9 @@ javascript-related crashes, though._
377
372
  ```tsx
378
373
  export default function App() {
379
374
  const isLoadingComplete = useCachedResources();
380
- const [hasLoadedEds] = useEDS();
381
375
  const colorScheme = useColorScheme();
382
376
 
383
- if (!isLoadingComplete || !hasLoadedEds) {
377
+ if (!isLoadingComplete) {
384
378
  return null;
385
379
  }
386
380
  return (
@@ -15,9 +15,9 @@ import {
15
15
  } from "./chunk-WEAGW6MQ.js";
16
16
 
17
17
  // src/components/screens/LoginScreen.tsx
18
- import { Button, EDSStyleSheet, Typography, useStyles } from "@equinor/mad-components";
18
+ import { Button, EDSProvider, EDSStyleSheet, useStyles } from "@equinor/mad-components";
19
19
  import React, { useState } from "react";
20
- import { Image, Pressable, View } from "react-native";
20
+ import { Image, Platform, Pressable, View } from "react-native";
21
21
  import { LoginButton } from "@equinor/mad-auth";
22
22
  import { metricKeys, metricStatus, track } from "@equinor/mad-insights";
23
23
  var LoginScreen = () => {
@@ -26,10 +26,17 @@ var LoginScreen = () => {
26
26
  const dictionary = useDictionary();
27
27
  const authConfig = useAuthConfig();
28
28
  const navigate = useNavigateFromLoginScreen();
29
- const { title, logo } = useLoginScreenConfig();
29
+ const { splash } = useLoginScreenConfig();
30
30
  const [demoPressCount, setDemoPressCount] = useState(0);
31
31
  const shouldDisplayDemoButton = demoPressCount >= 5;
32
- return /* @__PURE__ */ React.createElement(View, { style: styles.container }, /* @__PURE__ */ React.createElement(Typography, { variant: "h1" }, title), /* @__PURE__ */ React.createElement(Pressable, { onPress: () => setDemoPressCount((state) => state + 1) }, /* @__PURE__ */ React.createElement(Image, { source: logo, resizeMode: "contain", style: { height: 200, width: 200 } })), /* @__PURE__ */ React.createElement(View, { style: { gap: 8 } }, /* @__PURE__ */ React.createElement(
32
+ const resizeMode = Platform.OS === "web" ? "contain" : "cover";
33
+ return /* @__PURE__ */ React.createElement(EDSProvider, { colorScheme: "light", density: "tablet" }, /* @__PURE__ */ React.createElement(View, { style: styles.container }, /* @__PURE__ */ React.createElement(Image, { source: splash, resizeMode, style: styles.fill }), /* @__PURE__ */ React.createElement(View, { style: styles.secretHitboxContainer }, /* @__PURE__ */ React.createElement(
34
+ Pressable,
35
+ {
36
+ style: styles.fill,
37
+ onPress: () => setDemoPressCount((count) => count + 1)
38
+ }
39
+ )), /* @__PURE__ */ React.createElement(View, { style: styles.buttonContainer }, /* @__PURE__ */ React.createElement(
33
40
  LoginButton,
34
41
  __spreadProps(__spreadValues({}, authConfig), {
35
42
  onAuthenticationSuccessful: (_, type) => {
@@ -58,15 +65,30 @@ var LoginScreen = () => {
58
65
  navigate();
59
66
  }
60
67
  }
61
- )));
68
+ ))));
62
69
  };
63
- var theme = EDSStyleSheet.create((theme2) => ({
70
+ var theme = EDSStyleSheet.create(() => ({
64
71
  container: {
65
- paddingVertical: theme2.spacing.container.paddingVertical,
66
- paddingHorizontal: theme2.spacing.container.paddingHorizontal,
67
- height: "100%",
72
+ flex: 1,
73
+ backgroundColor: "#E6FAEC"
74
+ },
75
+ secretHitboxContainer: {
76
+ position: "absolute",
77
+ top: 0,
78
+ height: "55%",
79
+ width: "100%",
80
+ alignItems: "center"
81
+ },
82
+ buttonContainer: {
83
+ position: "absolute",
84
+ top: "60%",
85
+ width: "100%",
68
86
  alignItems: "center",
69
- justifyContent: "space-evenly"
87
+ gap: 8
88
+ },
89
+ fill: {
90
+ width: "100%",
91
+ height: "100%"
70
92
  }
71
93
  }));
72
94
 
@@ -0,0 +1,14 @@
1
+ import {
2
+ ServiceMessageBanner
3
+ } from "./chunk-QHCU7RLF.js";
4
+ import {
5
+ EnvironmentBanner
6
+ } from "./chunk-PFVXASJV.js";
7
+
8
+ // src/components/navigation/MadCoreSubHeader.tsx
9
+ import React from "react";
10
+ var MadCoreSubHeader = () => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(ServiceMessageBanner, null), /* @__PURE__ */ React.createElement(EnvironmentBanner, null));
11
+
12
+ export {
13
+ MadCoreSubHeader
14
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CreateIncidentScreen
3
- } from "./chunk-MUSZK2ZB.js";
3
+ } from "./chunk-SKYDZALS.js";
4
4
  import {
5
5
  SelectLanguageScreen
6
6
  } from "./chunk-WR2XIM3H.js";
@@ -15,13 +15,10 @@ import {
15
15
  } from "./chunk-Z5L7N2J2.js";
16
16
  import {
17
17
  LoginScreen
18
- } from "./chunk-QLHWFCL7.js";
18
+ } from "./chunk-7OEKHABR.js";
19
19
  import {
20
20
  ServiceMessageProvider
21
21
  } from "./chunk-MGYUDNB3.js";
22
- import {
23
- AnnouncementsProvider
24
- } from "./chunk-GSOAYETS.js";
25
22
  import {
26
23
  EnvironmentProvider
27
24
  } from "./chunk-JBWTRJUX.js";
@@ -44,12 +41,16 @@ var createMadCoreNavigator = (Stack) => {
44
41
  const config = useMadConfig();
45
42
  if (!config)
46
43
  return null;
47
- return /* @__PURE__ */ React.createElement(AppInsightsInitializer, { config: config.applicationInsights }, /* @__PURE__ */ React.createElement(EnvironmentProvider, null, /* @__PURE__ */ React.createElement(ServiceMessageProvider, null, /* @__PURE__ */ React.createElement(AnnouncementsProvider, null, /* @__PURE__ */ React.createElement(Stack.Navigator, __spreadProps(__spreadValues({}, props), { initialRouteName: CoreRoutes.LOGIN }), /* @__PURE__ */ React.createElement(
44
+ return /* @__PURE__ */ React.createElement(AppInsightsInitializer, { config: config.applicationInsights }, /* @__PURE__ */ React.createElement(EnvironmentProvider, null, /* @__PURE__ */ React.createElement(ServiceMessageProvider, null, /* @__PURE__ */ React.createElement(Stack.Navigator, __spreadProps(__spreadValues({}, props), { initialRouteName: CoreRoutes.LOGIN }), /* @__PURE__ */ React.createElement(
48
45
  Stack.Screen,
49
46
  {
50
47
  name: CoreRoutes.LOGIN,
51
48
  component: LoginScreen,
52
- options: { headerShown: false, customSubHeaderShown: true }
49
+ options: {
50
+ headerShown: false,
51
+ customSubHeaderShown: true,
52
+ customSubHeaderFloat: true
53
+ }
53
54
  }
54
55
  ), /* @__PURE__ */ React.createElement(
55
56
  Stack.Screen,
@@ -57,13 +58,7 @@ var createMadCoreNavigator = (Stack) => {
57
58
  name: CoreRoutes.RELEASE_NOTES,
58
59
  component: ReleaseNotesScreen
59
60
  }
60
- ), /* @__PURE__ */ React.createElement(
61
- Stack.Screen,
62
- {
63
- name: CoreRoutes.WHATS_NEW,
64
- component: WhatsNewScreen
65
- }
66
- ), config.about && /* @__PURE__ */ React.createElement(Stack.Screen, { name: CoreRoutes.ABOUT, component: AboutScreen }), config.serviceNow && /* @__PURE__ */ React.createElement(
61
+ ), /* @__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(
67
62
  Stack.Screen,
68
63
  {
69
64
  name: CoreRoutes.FEEDBACK,
@@ -82,7 +77,7 @@ var createMadCoreNavigator = (Stack) => {
82
77
  component: SelectLanguageScreen,
83
78
  options: { headerBackVisible: false }
84
79
  }
85
- )), props.children)))));
80
+ )), props.children))));
86
81
  }
87
82
  return MadCoreNavigator;
88
83
  };
@@ -0,0 +1,18 @@
1
+ import {
2
+ useEnvironment
3
+ } from "./chunk-QPOHC55P.js";
4
+
5
+ // src/components/EnvironmentBanner.tsx
6
+ import React from "react";
7
+ import { EnvironmentBanner as ImportedEnvironmentBanner } from "@equinor/mad-components";
8
+ import { SafeAreaView } from "react-native";
9
+ var EnvironmentBanner = () => {
10
+ const environment = useEnvironment();
11
+ if (environment === "prod")
12
+ return null;
13
+ return /* @__PURE__ */ React.createElement(SafeAreaView, null, /* @__PURE__ */ React.createElement(ImportedEnvironmentBanner, null));
14
+ };
15
+
16
+ export {
17
+ EnvironmentBanner
18
+ };
@@ -17,7 +17,7 @@ import {
17
17
 
18
18
  // src/components/service-message/ServiceMessageBanner.tsx
19
19
  import React from "react";
20
- import { LayoutAnimation, Linking, View } from "react-native";
20
+ import { LayoutAnimation, Linking, SafeAreaView, View } from "react-native";
21
21
  import {
22
22
  EDSStyleSheet,
23
23
  PressableHighlight,
@@ -47,7 +47,7 @@ var ServiceMessageBanner = () => {
47
47
  if (!serviceMessage)
48
48
  return null;
49
49
  const { message, url } = resolveMessageFromServiceMessage(serviceMessage, isError);
50
- return /* @__PURE__ */ React.createElement(
50
+ return /* @__PURE__ */ React.createElement(SafeAreaView, null, /* @__PURE__ */ React.createElement(
51
51
  DisableableSwipeable,
52
52
  {
53
53
  disabled: !dismissAndURLIsVisible,
@@ -101,7 +101,7 @@ var ServiceMessageBanner = () => {
101
101
  ))),
102
102
  expansionEnabled && /* @__PURE__ */ React.createElement(ExpansionToggle, { isExpanded })
103
103
  )
104
- );
104
+ ));
105
105
  };
106
106
  var theme = EDSStyleSheet.create((themeStyles) => ({
107
107
  container: {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createNativeStackNavigator
3
- } from "./chunk-ZQTKZDN2.js";
3
+ } from "./chunk-TF36L3FR.js";
4
4
  import {
5
5
  createMadCoreNavigator
6
- } from "./chunk-EKNEHZIQ.js";
6
+ } from "./chunk-K4I6DYU6.js";
7
7
  import {
8
8
  setConfig
9
9
  } from "./chunk-QPOHC55P.js";
@@ -18,11 +18,12 @@ import {
18
18
  Button,
19
19
  Cell,
20
20
  EDSStyleSheet,
21
+ Spacer,
21
22
  TextField,
22
23
  Typography,
23
24
  useStyles
24
25
  } from "@equinor/mad-components";
25
- import { View, LayoutAnimation } from "react-native";
26
+ import { View, LayoutAnimation, ScrollView } from "react-native";
26
27
  import * as Device from "expo-device";
27
28
  import * as Localization from "expo-localization";
28
29
  var CreateIncidentScreen = () => {
@@ -80,7 +81,7 @@ var CreateIncidentScreen = () => {
80
81
  return `${description}
81
82
  ${ticketDescription}`;
82
83
  };
83
- return /* @__PURE__ */ React.createElement(View, { style: styles.container }, /* @__PURE__ */ React.createElement(Cell, null, /* @__PURE__ */ React.createElement(View, { style: styles.topTextContainer }, /* @__PURE__ */ React.createElement(Typography, { variant: "h1" }, "Create ticket in ServiceNow"), /* @__PURE__ */ React.createElement(Typography, { group: "paragraph", variant: "body_short" }, "We collect information about your device as part of our feedback process. By submitting, you agree to share the following information:")), /* @__PURE__ */ React.createElement(UserInfo, { infoType: "User", infoValue: account == null ? void 0 : account.username }), /* @__PURE__ */ React.createElement(UserInfo, { infoType: "Device Brand", infoValue: Device.brand }), /* @__PURE__ */ React.createElement(UserInfo, { infoType: "Device", infoValue: Device.deviceName }), /* @__PURE__ */ React.createElement(UserInfo, { infoType: "Operating System", infoValue: Device.osVersion }), /* @__PURE__ */ React.createElement(UserInfo, { infoType: "Time Zone", infoValue: Localization.timezone }), /* @__PURE__ */ React.createElement(UserInfo, { infoType: "Area", infoValue: Localization.locale }), ticketNumber && /* @__PURE__ */ React.createElement(View, { style: [styles.popupBox, styles.popupSuccess] }, /* @__PURE__ */ React.createElement(Typography, null, `Ticket number: ${ticketNumber}`)), error && /* @__PURE__ */ React.createElement(View, { style: [styles.popupBox, styles.popupDanger] }, /* @__PURE__ */ React.createElement(Typography, null, `An error occurred creating your ticket: ${error}`)), /* @__PURE__ */ React.createElement(View, { style: styles.titleField }, /* @__PURE__ */ React.createElement(
84
+ return /* @__PURE__ */ React.createElement(ScrollView, { contentInsetAdjustmentBehavior: "automatic" }, /* @__PURE__ */ React.createElement(Spacer, null), /* @__PURE__ */ React.createElement(Cell, null, /* @__PURE__ */ React.createElement(View, { style: styles.topTextContainer }, /* @__PURE__ */ React.createElement(Typography, { variant: "h1" }, "Create ticket in ServiceNow"), /* @__PURE__ */ React.createElement(Typography, { group: "paragraph", variant: "body_short" }, "We collect information about your device as part of our feedback process. By submitting, you agree to share the following information:")), /* @__PURE__ */ React.createElement(UserInfo, { infoType: "User", infoValue: account == null ? void 0 : account.username }), /* @__PURE__ */ React.createElement(UserInfo, { infoType: "Device Brand", infoValue: Device.brand }), /* @__PURE__ */ React.createElement(UserInfo, { infoType: "Device", infoValue: Device.deviceName }), /* @__PURE__ */ React.createElement(UserInfo, { infoType: "Operating System", infoValue: Device.osVersion }), /* @__PURE__ */ React.createElement(UserInfo, { infoType: "Time Zone", infoValue: Localization.timezone }), /* @__PURE__ */ React.createElement(UserInfo, { infoType: "Area", infoValue: Localization.locale }), ticketNumber && /* @__PURE__ */ React.createElement(View, { style: [styles.popupBox, styles.popupSuccess] }, /* @__PURE__ */ React.createElement(Typography, null, `Ticket number: ${ticketNumber}`)), error && /* @__PURE__ */ React.createElement(View, { style: [styles.popupBox, styles.popupDanger] }, /* @__PURE__ */ React.createElement(Typography, null, `An error occurred creating your ticket: ${error}`)), /* @__PURE__ */ React.createElement(View, { style: styles.titleField }, /* @__PURE__ */ React.createElement(
84
85
  TextField,
85
86
  {
86
87
  onChange: setTicketTitle,
@@ -109,8 +110,7 @@ ${ticketDescription}`;
109
110
  };
110
111
  var createIncidentStyles = EDSStyleSheet.create((theme) => ({
111
112
  container: {
112
- display: "flex",
113
- paddingVertical: theme.geometry.dimension.cell.minHeight
113
+ paddingVertical: theme.spacing.container.paddingVertical
114
114
  },
115
115
  topTextContainer: {
116
116
  paddingBottom: theme.geometry.dimension.cell.minHeight
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MadCoreSubHeader
3
- } from "./chunk-R36BNAFA.js";
3
+ } from "./chunk-JVWGVT35.js";
4
4
 
5
5
  // src/components/navigation/navigation-creators.ts
6
6
  import {
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const EnvironmentBanner: () => React.JSX.Element | null;
@@ -0,0 +1,12 @@
1
+ import {
2
+ EnvironmentBanner
3
+ } from "../chunk-PFVXASJV.js";
4
+ import "../chunk-QPOHC55P.js";
5
+ import "../chunk-E6ZYHW72.js";
6
+ import "../chunk-UKAZW3CQ.js";
7
+ import "../chunk-VJD2P6SF.js";
8
+ import "../chunk-2OMVVDBU.js";
9
+ import "../chunk-WEAGW6MQ.js";
10
+ export {
11
+ EnvironmentBanner
12
+ };
@@ -27,7 +27,7 @@ export declare const createCoreStackNavigator: <T extends ParamListBase>(config:
27
27
  route: import("@react-navigation/native").RouteProp<ParamListBase, string>;
28
28
  navigation: any;
29
29
  }) => import("@equinor/mad-navigation").MadNativeStackNavigationOptions) | undefined;
30
- } & import("@react-navigation/native").StackRouterOptions & import("@equinor/mad-navigation/dist/_internal/types").MadCustomFactoryProps, "id" | "children" | "initialRouteName" | "screenListeners" | "screenOptions"> & import("@react-navigation/native").DefaultRouterOptions<string> & {
30
+ } & import("@react-navigation/native").StackRouterOptions & import("@equinor/mad-navigation/dist/_internal/types").MadCustomFactoryProps, "children" | "id" | "initialRouteName" | "screenListeners" | "screenOptions"> & import("@react-navigation/native").DefaultRouterOptions<string> & {
31
31
  id?: string | undefined;
32
32
  children: import("react").ReactNode;
33
33
  screenListeners?: Partial<{
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  createCoreStackNavigator
3
- } from "../chunk-77PTFBIE.js";
3
+ } from "../chunk-SAN5LMEQ.js";
4
4
  import "../chunk-2GCLIPZP.js";
5
- import "../chunk-ZQTKZDN2.js";
6
- import "../chunk-R36BNAFA.js";
7
- import "../chunk-OTQW4CT3.js";
5
+ import "../chunk-TF36L3FR.js";
6
+ import "../chunk-JVWGVT35.js";
7
+ import "../chunk-QHCU7RLF.js";
8
8
  import "../chunk-YWPELSTX.js";
9
9
  import "../chunk-SHKOH7MA.js";
10
10
  import "../chunk-ZSUFR7LK.js";
11
- import "../chunk-EKNEHZIQ.js";
12
- import "../chunk-MUSZK2ZB.js";
11
+ import "../chunk-K4I6DYU6.js";
12
+ import "../chunk-SKYDZALS.js";
13
13
  import "../chunk-5IS2WJYY.js";
14
14
  import "../chunk-CAOQCE6W.js";
15
15
  import "../chunk-WR2XIM3H.js";
@@ -18,7 +18,7 @@ import "../chunk-EIUO72M7.js";
18
18
  import "../chunk-SALPRFHN.js";
19
19
  import "../chunk-CIMA2GQQ.js";
20
20
  import "../chunk-Z5L7N2J2.js";
21
- import "../chunk-QLHWFCL7.js";
21
+ import "../chunk-7OEKHABR.js";
22
22
  import "../chunk-MGYUDNB3.js";
23
23
  import "../chunk-FA4G2VZ5.js";
24
24
  import "../chunk-OCWASWDK.js";
@@ -41,7 +41,7 @@ import "../chunk-CCVKLLIO.js";
41
41
  import "../chunk-UZ6YMQV2.js";
42
42
  import "../chunk-NPW57FJW.js";
43
43
  import "../chunk-BIMOM43W.js";
44
- import "../chunk-GSOAYETS.js";
44
+ import "../chunk-PFVXASJV.js";
45
45
  import "../chunk-JBWTRJUX.js";
46
46
  import "../chunk-QPOHC55P.js";
47
47
  import "../chunk-E6ZYHW72.js";
@@ -16,19 +16,19 @@ import {
16
16
  } from "../chunk-W3LMT7N4.js";
17
17
  import {
18
18
  createCoreStackNavigator
19
- } from "../chunk-77PTFBIE.js";
19
+ } from "../chunk-SAN5LMEQ.js";
20
20
  import "../chunk-2GCLIPZP.js";
21
21
  import {
22
22
  createBottomTabNavigator,
23
23
  createNativeStackNavigator
24
- } from "../chunk-ZQTKZDN2.js";
25
- import "../chunk-R36BNAFA.js";
26
- import "../chunk-OTQW4CT3.js";
24
+ } from "../chunk-TF36L3FR.js";
25
+ import "../chunk-JVWGVT35.js";
26
+ import "../chunk-QHCU7RLF.js";
27
27
  import "../chunk-YWPELSTX.js";
28
28
  import "../chunk-SHKOH7MA.js";
29
29
  import "../chunk-ZSUFR7LK.js";
30
- import "../chunk-EKNEHZIQ.js";
31
- import "../chunk-MUSZK2ZB.js";
30
+ import "../chunk-K4I6DYU6.js";
31
+ import "../chunk-SKYDZALS.js";
32
32
  import "../chunk-5IS2WJYY.js";
33
33
  import "../chunk-CAOQCE6W.js";
34
34
  import "../chunk-WR2XIM3H.js";
@@ -37,7 +37,7 @@ import "../chunk-EIUO72M7.js";
37
37
  import "../chunk-SALPRFHN.js";
38
38
  import "../chunk-CIMA2GQQ.js";
39
39
  import "../chunk-Z5L7N2J2.js";
40
- import "../chunk-QLHWFCL7.js";
40
+ import "../chunk-7OEKHABR.js";
41
41
  import "../chunk-MGYUDNB3.js";
42
42
  import "../chunk-FA4G2VZ5.js";
43
43
  import "../chunk-OCWASWDK.js";
@@ -60,7 +60,7 @@ import "../chunk-CCVKLLIO.js";
60
60
  import "../chunk-UZ6YMQV2.js";
61
61
  import "../chunk-NPW57FJW.js";
62
62
  import "../chunk-BIMOM43W.js";
63
- import "../chunk-GSOAYETS.js";
63
+ import "../chunk-PFVXASJV.js";
64
64
  import "../chunk-JBWTRJUX.js";
65
65
  import "../chunk-QPOHC55P.js";
66
66
  import "../chunk-E6ZYHW72.js";
@@ -1,13 +1,14 @@
1
1
  import {
2
2
  MadCoreSubHeader
3
- } from "../../chunk-R36BNAFA.js";
4
- import "../../chunk-OTQW4CT3.js";
3
+ } from "../../chunk-JVWGVT35.js";
4
+ import "../../chunk-QHCU7RLF.js";
5
5
  import "../../chunk-YWPELSTX.js";
6
6
  import "../../chunk-SHKOH7MA.js";
7
7
  import "../../chunk-ZSUFR7LK.js";
8
8
  import "../../chunk-MGYUDNB3.js";
9
9
  import "../../chunk-FA4G2VZ5.js";
10
10
  import "../../chunk-RFYZGBU4.js";
11
+ import "../../chunk-PFVXASJV.js";
11
12
  import "../../chunk-QPOHC55P.js";
12
13
  import "../../chunk-E6ZYHW72.js";
13
14
  import "../../chunk-UKAZW3CQ.js";
@@ -2,15 +2,16 @@ import "../../chunk-2GCLIPZP.js";
2
2
  import {
3
3
  createBottomTabNavigator,
4
4
  createNativeStackNavigator
5
- } from "../../chunk-ZQTKZDN2.js";
6
- import "../../chunk-R36BNAFA.js";
7
- import "../../chunk-OTQW4CT3.js";
5
+ } from "../../chunk-TF36L3FR.js";
6
+ import "../../chunk-JVWGVT35.js";
7
+ import "../../chunk-QHCU7RLF.js";
8
8
  import "../../chunk-YWPELSTX.js";
9
9
  import "../../chunk-SHKOH7MA.js";
10
10
  import "../../chunk-ZSUFR7LK.js";
11
11
  import "../../chunk-MGYUDNB3.js";
12
12
  import "../../chunk-FA4G2VZ5.js";
13
13
  import "../../chunk-RFYZGBU4.js";
14
+ import "../../chunk-PFVXASJV.js";
14
15
  import "../../chunk-QPOHC55P.js";
15
16
  import "../../chunk-E6ZYHW72.js";
16
17
  import "../../chunk-UKAZW3CQ.js";
@@ -1,15 +1,16 @@
1
1
  import {
2
2
  createBottomTabNavigator,
3
3
  createNativeStackNavigator
4
- } from "../../chunk-ZQTKZDN2.js";
5
- import "../../chunk-R36BNAFA.js";
6
- import "../../chunk-OTQW4CT3.js";
4
+ } from "../../chunk-TF36L3FR.js";
5
+ import "../../chunk-JVWGVT35.js";
6
+ import "../../chunk-QHCU7RLF.js";
7
7
  import "../../chunk-YWPELSTX.js";
8
8
  import "../../chunk-SHKOH7MA.js";
9
9
  import "../../chunk-ZSUFR7LK.js";
10
10
  import "../../chunk-MGYUDNB3.js";
11
11
  import "../../chunk-FA4G2VZ5.js";
12
12
  import "../../chunk-RFYZGBU4.js";
13
+ import "../../chunk-PFVXASJV.js";
13
14
  import "../../chunk-QPOHC55P.js";
14
15
  import "../../chunk-E6ZYHW72.js";
15
16
  import "../../chunk-UKAZW3CQ.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  LoginScreen
3
- } from "../../chunk-QLHWFCL7.js";
3
+ } from "../../chunk-7OEKHABR.js";
4
4
  import "../../chunk-ZHWM5E7I.js";
5
5
  import "../../chunk-UVQ3Z5PG.js";
6
6
  import "../../chunk-5BVQKJQB.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CreateIncidentScreen
3
- } from "../../../chunk-MUSZK2ZB.js";
3
+ } from "../../../chunk-SKYDZALS.js";
4
4
  import "../../../chunk-5IS2WJYY.js";
5
5
  import "../../../chunk-CAOQCE6W.js";
6
6
  import "../../../chunk-RFYZGBU4.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ServiceMessageBanner
3
- } from "../../chunk-OTQW4CT3.js";
3
+ } from "../../chunk-QHCU7RLF.js";
4
4
  import "../../chunk-YWPELSTX.js";
5
5
  import "../../chunk-SHKOH7MA.js";
6
6
  import "../../chunk-ZSUFR7LK.js";
package/dist/index.js CHANGED
@@ -17,19 +17,19 @@ import {
17
17
  } from "./chunk-W3LMT7N4.js";
18
18
  import {
19
19
  createCoreStackNavigator
20
- } from "./chunk-77PTFBIE.js";
20
+ } from "./chunk-SAN5LMEQ.js";
21
21
  import "./chunk-2GCLIPZP.js";
22
22
  import {
23
23
  createBottomTabNavigator,
24
24
  createNativeStackNavigator
25
- } from "./chunk-ZQTKZDN2.js";
26
- import "./chunk-R36BNAFA.js";
27
- import "./chunk-OTQW4CT3.js";
25
+ } from "./chunk-TF36L3FR.js";
26
+ import "./chunk-JVWGVT35.js";
27
+ import "./chunk-QHCU7RLF.js";
28
28
  import "./chunk-YWPELSTX.js";
29
29
  import "./chunk-SHKOH7MA.js";
30
30
  import "./chunk-ZSUFR7LK.js";
31
- import "./chunk-EKNEHZIQ.js";
32
- import "./chunk-MUSZK2ZB.js";
31
+ import "./chunk-K4I6DYU6.js";
32
+ import "./chunk-SKYDZALS.js";
33
33
  import "./chunk-5IS2WJYY.js";
34
34
  import "./chunk-CAOQCE6W.js";
35
35
  import "./chunk-WR2XIM3H.js";
@@ -38,7 +38,7 @@ import "./chunk-EIUO72M7.js";
38
38
  import "./chunk-SALPRFHN.js";
39
39
  import "./chunk-CIMA2GQQ.js";
40
40
  import "./chunk-Z5L7N2J2.js";
41
- import "./chunk-QLHWFCL7.js";
41
+ import "./chunk-7OEKHABR.js";
42
42
  import "./chunk-MGYUDNB3.js";
43
43
  import "./chunk-FA4G2VZ5.js";
44
44
  import "./chunk-OCWASWDK.js";
@@ -71,7 +71,7 @@ import {
71
71
  useCoreStackNavigation,
72
72
  useCoreStackRoute
73
73
  } from "./chunk-BIMOM43W.js";
74
- import "./chunk-GSOAYETS.js";
74
+ import "./chunk-PFVXASJV.js";
75
75
  import "./chunk-JBWTRJUX.js";
76
76
  import {
77
77
  getConfig,
@@ -9,8 +9,7 @@ export type AuthConfig = {
9
9
  };
10
10
  export declare const useAuthConfig: () => AuthConfig;
11
11
  export declare const useLoginScreenConfig: () => {
12
- title: string;
13
- logo: import("react-native").ImageSourcePropType;
12
+ splash: import("react-native").ImageSourcePropType;
14
13
  };
15
14
  export declare const useAppVersion: () => string;
16
15
  export declare const useEnvironment: () => "dev" | "test" | "qa" | "prod";
package/dist/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { ImageSourcePropType } from "react-native";
2
1
  import { Language } from "./store/types";
3
2
  import { AppInsightsInitConfig } from "@equinor/mad-insights";
4
3
  import { NavigationProp, ParamListBase } from "@react-navigation/native";
4
+ import { ImageSourcePropType } from "react-native";
5
5
  export type MadConfig<ParamList extends ParamListBase | void = void> = {
6
6
  /**
7
7
  * Version of the app. Will be displayed in the about screen, and will be used for release notes
@@ -63,13 +63,9 @@ export type MadConfig<ParamList extends ParamListBase | void = void> = {
63
63
  }>;
64
64
  login: EnvironmentValues<{
65
65
  /**
66
- * Title of the app. Used in login screen
67
- */
68
- title: string;
69
- /**
70
- * App logo. Used in login screen
66
+ * Splash screen of the application.
71
67
  */
72
- logo: ImageSourcePropType;
68
+ splash: ImageSourcePropType;
73
69
  }>;
74
70
  /**
75
71
  * App insights config used for initializing application insights service(s)
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createMadCoreNavigator
3
- } from "../chunk-EKNEHZIQ.js";
4
- import "../chunk-MUSZK2ZB.js";
3
+ } from "../chunk-K4I6DYU6.js";
4
+ import "../chunk-SKYDZALS.js";
5
5
  import "../chunk-5IS2WJYY.js";
6
6
  import "../chunk-CAOQCE6W.js";
7
7
  import "../chunk-WR2XIM3H.js";
@@ -10,7 +10,7 @@ import "../chunk-EIUO72M7.js";
10
10
  import "../chunk-SALPRFHN.js";
11
11
  import "../chunk-CIMA2GQQ.js";
12
12
  import "../chunk-Z5L7N2J2.js";
13
- import "../chunk-QLHWFCL7.js";
13
+ import "../chunk-7OEKHABR.js";
14
14
  import "../chunk-MGYUDNB3.js";
15
15
  import "../chunk-FA4G2VZ5.js";
16
16
  import "../chunk-OCWASWDK.js";
@@ -33,7 +33,6 @@ import "../chunk-CCVKLLIO.js";
33
33
  import "../chunk-UZ6YMQV2.js";
34
34
  import "../chunk-NPW57FJW.js";
35
35
  import "../chunk-BIMOM43W.js";
36
- import "../chunk-GSOAYETS.js";
37
36
  import "../chunk-JBWTRJUX.js";
38
37
  import "../chunk-QPOHC55P.js";
39
38
  import "../chunk-E6ZYHW72.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/mad-core",
3
- "version": "0.4.4",
3
+ "version": "0.5.1",
4
4
  "description": "Core library for the Mobile App Delivery team",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -37,8 +37,8 @@
37
37
  "zustand": "^4.4.1",
38
38
  "@equinor/mad-auth": "0.1.13",
39
39
  "@equinor/mad-components": "0.12.2",
40
- "@equinor/mad-insights": "0.1.1",
41
- "@equinor/mad-navigation": "0.2.1"
40
+ "@equinor/mad-navigation": "0.3.0",
41
+ "@equinor/mad-insights": "0.1.1"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@babel/core": "^7.21.4",
@@ -1,21 +0,0 @@
1
- import {
2
- __spreadProps,
3
- __spreadValues
4
- } from "./chunk-WEAGW6MQ.js";
5
-
6
- // src/components/AnnouncementsProvider.tsx
7
- import React from "react";
8
- import { LayoutAnimation, SafeAreaView, View } from "react-native";
9
- import { HeaderHeightProvider, useHeaderHeight } from "@equinor/mad-navigation";
10
- var AnnouncementsProvider = ({ children }) => {
11
- return /* @__PURE__ */ React.createElement(HeaderHeightProvider, null, children, /* @__PURE__ */ React.createElement(Announcements, null));
12
- };
13
- var Announcements = () => {
14
- const headerHeight = useHeaderHeight();
15
- LayoutAnimation.configureNext(__spreadProps(__spreadValues({}, LayoutAnimation.Presets.linear), { duration: 200 }));
16
- return /* @__PURE__ */ React.createElement(View, { style: { position: "absolute", top: headerHeight, left: 0, right: 0 } }, /* @__PURE__ */ React.createElement(SafeAreaView, null));
17
- };
18
-
19
- export {
20
- AnnouncementsProvider
21
- };
@@ -1,13 +0,0 @@
1
- import {
2
- ServiceMessageBanner
3
- } from "./chunk-OTQW4CT3.js";
4
-
5
- // src/components/navigation/MadCoreSubHeader.tsx
6
- import React from "react";
7
- import { EnvironmentBanner } from "@equinor/mad-components";
8
- import { SafeAreaView } from "react-native";
9
- var MadCoreSubHeader = () => /* @__PURE__ */ React.createElement(SafeAreaView, null, /* @__PURE__ */ React.createElement(ServiceMessageBanner, null), /* @__PURE__ */ React.createElement(EnvironmentBanner, null));
10
-
11
- export {
12
- MadCoreSubHeader
13
- };
@@ -1,2 +0,0 @@
1
- import React, { PropsWithChildren } from "react";
2
- export declare const AnnouncementsProvider: ({ children }: PropsWithChildren) => React.JSX.Element;
@@ -1,7 +0,0 @@
1
- import {
2
- AnnouncementsProvider
3
- } from "../chunk-GSOAYETS.js";
4
- import "../chunk-WEAGW6MQ.js";
5
- export {
6
- AnnouncementsProvider
7
- };