@equinor/mad-core 0.9.8 → 0.9.10

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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @equinor/mad-core
2
2
 
3
+ ## 0.9.10
4
+
5
+ ### Patch Changes
6
+
7
+ - 716e0af: Prevent `Device` and `Device brand` from showing on web in the `CreateIncidentScreen`.
8
+
9
+ ## 0.9.9
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [569dc2d]
14
+ - @equinor/mad-toast@0.1.6
15
+
3
16
  ## 0.9.8
4
17
 
5
18
  ### Patch Changes
@@ -1,6 +1,3 @@
1
- import {
2
- SelectLanguageScreen
3
- } from "./chunk-OG52JYYV.js";
4
1
  import {
5
2
  ReleaseNotesScreen
6
3
  } from "./chunk-6T6NE74H.js";
@@ -9,16 +6,19 @@ import {
9
6
  } from "./chunk-KL32BPEW.js";
10
7
  import {
11
8
  CreateIncidentScreen
12
- } from "./chunk-WPDXNSOV.js";
9
+ } from "./chunk-GPTLCPZG.js";
10
+ import {
11
+ SelectLanguageScreen
12
+ } from "./chunk-OG52JYYV.js";
13
+ import {
14
+ AboutScreen
15
+ } from "./chunk-JNNCA3V2.js";
13
16
  import {
14
17
  LoginScreen
15
18
  } from "./chunk-AQXI6FKQ.js";
16
19
  import {
17
20
  ServiceMessageProvider
18
21
  } from "./chunk-WRQWW7QV.js";
19
- import {
20
- AboutScreen
21
- } from "./chunk-JNNCA3V2.js";
22
22
  import {
23
23
  getDefaultScreenOptionsForLoginScreen
24
24
  } from "./chunk-RGJ4RWVB.js";
@@ -23,19 +23,22 @@ import {
23
23
  Typography,
24
24
  useStyles
25
25
  } from "@equinor/mad-components";
26
- import { View, LayoutAnimation, ScrollView, KeyboardAvoidingView } from "react-native";
26
+ import { View, LayoutAnimation, ScrollView, KeyboardAvoidingView, Platform } from "react-native";
27
27
  import * as Device from "expo-device";
28
28
  import * as Localization from "expo-localization";
29
29
  var CreateIncidentScreen = () => {
30
- const styles = useStyles(createIncidentStyles);
31
- const account = useAccountOrDemoAccount();
32
- const serviceNowConfigurationItem = useServiceNow();
33
- const environment = useEnvironment();
30
+ var _a, _b, _c, _d;
34
31
  const [error, setError] = useState(null);
35
32
  const [ticketNumber, setTicketNumber] = useState(void 0);
36
33
  const [ticketTitle, setTicketTitle] = useState(void 0);
37
34
  const [ticketDescription, setTicketDescription] = useState(void 0);
38
35
  const [isSending, setIsSending] = useState(false);
36
+ const account = useAccountOrDemoAccount();
37
+ const serviceNowConfigurationItem = useServiceNow();
38
+ const environment = useEnvironment();
39
+ const styles = useStyles(createIncidentStyles);
40
+ const timeZone = (_b = (_a = Localization.getCalendars()[0]) == null ? void 0 : _a.timeZone) != null ? _b : "Unknown TimeZone";
41
+ const locale = (_d = (_c = Localization.getLocales()[0]) == null ? void 0 : _c.languageTag) != null ? _d : "Unknown Locale";
39
42
  const onSubmit = () => {
40
43
  setIsSending(true);
41
44
  const data = {
@@ -74,9 +77,9 @@ var CreateIncidentScreen = () => {
74
77
  `;
75
78
  description += `Operating System: ${Device.osVersion}
76
79
  `;
77
- description += `Time Zone: ${Localization.timezone}
80
+ description += `Time Zone: ${timeZone}
78
81
  `;
79
- description += `Locale: ${Localization.locale}
82
+ description += `Locale: ${locale}
80
83
  `;
81
84
  return `${description}
82
85
  ${ticketDescription}`;
@@ -88,7 +91,7 @@ ${ticketDescription}`;
88
91
  keyboardVerticalOffset: 115,
89
92
  style: styles.container
90
93
  },
91
- /* @__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(
94
+ /* @__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 }), Platform.OS !== "web" && /* @__PURE__ */ React.createElement(UserInfo, { infoType: "Device Brand", infoValue: Device.brand }), Platform.OS !== "web" && /* @__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: timeZone }), /* @__PURE__ */ React.createElement(UserInfo, { infoType: "Locale", infoValue: 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(
92
95
  TextField,
93
96
  {
94
97
  onChange: setTicketTitle,
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-ZLW2PMDL.js";
7
7
  import {
8
8
  createMadCoreNavigator
9
- } from "./chunk-VLHDQUQA.js";
9
+ } from "./chunk-CUCKZKO6.js";
10
10
  import {
11
11
  setConfig
12
12
  } from "./chunk-5Q7ZXDFE.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createCoreStackNavigator
3
- } from "../chunk-SYIWB6JH.js";
3
+ } from "../chunk-OJSZ4IAP.js";
4
4
  import "../chunk-WUCGJV35.js";
5
5
  import "../chunk-2GCLIPZP.js";
6
6
  import "../chunk-ZLW2PMDL.js";
@@ -9,19 +9,19 @@ import "../chunk-VRSHTEZL.js";
9
9
  import "../chunk-WLYQWDPT.js";
10
10
  import "../chunk-YWPELSTX.js";
11
11
  import "../chunk-SHKOH7MA.js";
12
- import "../chunk-VLHDQUQA.js";
13
- import "../chunk-OG52JYYV.js";
14
- import "../chunk-L434TQRF.js";
12
+ import "../chunk-CUCKZKO6.js";
15
13
  import "../chunk-6T6NE74H.js";
16
14
  import "../chunk-KL32BPEW.js";
17
- import "../chunk-ZPXPIE5I.js";
18
- import "../chunk-WPDXNSOV.js";
15
+ import "../chunk-GPTLCPZG.js";
19
16
  import "../chunk-3WUJAVUO.js";
20
17
  import "../chunk-SNG5ADEI.js";
18
+ import "../chunk-OG52JYYV.js";
19
+ import "../chunk-L434TQRF.js";
20
+ import "../chunk-ZPXPIE5I.js";
21
+ import "../chunk-JNNCA3V2.js";
21
22
  import "../chunk-AQXI6FKQ.js";
22
23
  import "../chunk-WRQWW7QV.js";
23
24
  import "../chunk-B6LK3MOD.js";
24
- import "../chunk-JNNCA3V2.js";
25
25
  import "../chunk-OCWASWDK.js";
26
26
  import "../chunk-RGJ4RWVB.js";
27
27
  import "../chunk-CZAFV2L7.js";
@@ -1,12 +1,12 @@
1
1
  import "../chunk-JYWP44JR.js";
2
2
  import "../chunk-AK7PA4BE.js";
3
- import "../chunk-5GBNULIT.js";
4
3
  import {
5
4
  SettingsScreen
6
5
  } from "../chunk-QVU6TANN.js";
7
6
  import "../chunk-73DTZ72P.js";
8
7
  import "../chunk-YKLMUKP4.js";
9
8
  import "../chunk-3OKLIPZ5.js";
9
+ import "../chunk-5GBNULIT.js";
10
10
  import "../chunk-7SJM4NDH.js";
11
11
  import {
12
12
  ErrorBoundary
@@ -16,7 +16,7 @@ import {
16
16
  } from "../chunk-ZWBWZKYN.js";
17
17
  import {
18
18
  createCoreStackNavigator
19
- } from "../chunk-SYIWB6JH.js";
19
+ } from "../chunk-OJSZ4IAP.js";
20
20
  import "../chunk-WUCGJV35.js";
21
21
  import "../chunk-2GCLIPZP.js";
22
22
  import {
@@ -28,21 +28,21 @@ import "../chunk-VRSHTEZL.js";
28
28
  import "../chunk-WLYQWDPT.js";
29
29
  import "../chunk-YWPELSTX.js";
30
30
  import "../chunk-SHKOH7MA.js";
31
- import "../chunk-VLHDQUQA.js";
32
- import "../chunk-OG52JYYV.js";
33
- import "../chunk-L434TQRF.js";
31
+ import "../chunk-CUCKZKO6.js";
34
32
  import "../chunk-6T6NE74H.js";
35
33
  import "../chunk-KL32BPEW.js";
36
- import "../chunk-ZPXPIE5I.js";
37
- import "../chunk-WPDXNSOV.js";
34
+ import "../chunk-GPTLCPZG.js";
38
35
  import "../chunk-3WUJAVUO.js";
39
36
  import "../chunk-SNG5ADEI.js";
37
+ import "../chunk-OG52JYYV.js";
38
+ import "../chunk-L434TQRF.js";
39
+ import "../chunk-ZPXPIE5I.js";
40
+ import "../chunk-JNNCA3V2.js";
40
41
  import {
41
42
  LoginScreen
42
43
  } from "../chunk-AQXI6FKQ.js";
43
44
  import "../chunk-WRQWW7QV.js";
44
45
  import "../chunk-B6LK3MOD.js";
45
- import "../chunk-JNNCA3V2.js";
46
46
  import "../chunk-OCWASWDK.js";
47
47
  import "../chunk-RGJ4RWVB.js";
48
48
  import "../chunk-CZAFV2L7.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CreateIncidentScreen
3
- } from "../../../chunk-WPDXNSOV.js";
3
+ } from "../../../chunk-GPTLCPZG.js";
4
4
  import "../../../chunk-3WUJAVUO.js";
5
5
  import "../../../chunk-SNG5ADEI.js";
6
6
  import "../../../chunk-ZB37EIZB.js";
@@ -1,11 +1,11 @@
1
1
  import "../../../chunk-AK7PA4BE.js";
2
- import "../../../chunk-5GBNULIT.js";
3
2
  import {
4
3
  SettingsScreen
5
4
  } from "../../../chunk-QVU6TANN.js";
6
5
  import "../../../chunk-73DTZ72P.js";
7
6
  import "../../../chunk-YKLMUKP4.js";
8
7
  import "../../../chunk-3OKLIPZ5.js";
8
+ import "../../../chunk-5GBNULIT.js";
9
9
  import "../../../chunk-7SJM4NDH.js";
10
10
  import "../../../chunk-CZAFV2L7.js";
11
11
  import "../../../chunk-GUKC6UGZ.js";
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import "./chunk-JYWP44JR.js";
2
2
  import "./chunk-AK7PA4BE.js";
3
- import "./chunk-5GBNULIT.js";
4
3
  import {
5
4
  SettingsScreen
6
5
  } from "./chunk-QVU6TANN.js";
7
6
  import "./chunk-73DTZ72P.js";
8
7
  import "./chunk-YKLMUKP4.js";
9
8
  import "./chunk-3OKLIPZ5.js";
9
+ import "./chunk-5GBNULIT.js";
10
10
  import "./chunk-7SJM4NDH.js";
11
11
  import "./chunk-6F4PWJZI.js";
12
12
  import {
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-ZWBWZKYN.js";
18
18
  import {
19
19
  createCoreStackNavigator
20
- } from "./chunk-SYIWB6JH.js";
20
+ } from "./chunk-OJSZ4IAP.js";
21
21
  import "./chunk-WUCGJV35.js";
22
22
  import "./chunk-2GCLIPZP.js";
23
23
  import {
@@ -29,21 +29,21 @@ import "./chunk-VRSHTEZL.js";
29
29
  import "./chunk-WLYQWDPT.js";
30
30
  import "./chunk-YWPELSTX.js";
31
31
  import "./chunk-SHKOH7MA.js";
32
- import "./chunk-VLHDQUQA.js";
33
- import "./chunk-OG52JYYV.js";
34
- import "./chunk-L434TQRF.js";
32
+ import "./chunk-CUCKZKO6.js";
35
33
  import "./chunk-6T6NE74H.js";
36
34
  import "./chunk-KL32BPEW.js";
37
- import "./chunk-ZPXPIE5I.js";
38
- import "./chunk-WPDXNSOV.js";
35
+ import "./chunk-GPTLCPZG.js";
39
36
  import "./chunk-3WUJAVUO.js";
40
37
  import "./chunk-SNG5ADEI.js";
38
+ import "./chunk-OG52JYYV.js";
39
+ import "./chunk-L434TQRF.js";
40
+ import "./chunk-ZPXPIE5I.js";
41
+ import "./chunk-JNNCA3V2.js";
41
42
  import {
42
43
  LoginScreen
43
44
  } from "./chunk-AQXI6FKQ.js";
44
45
  import "./chunk-WRQWW7QV.js";
45
46
  import "./chunk-B6LK3MOD.js";
46
- import "./chunk-JNNCA3V2.js";
47
47
  import "./chunk-OCWASWDK.js";
48
48
  import {
49
49
  getDefaultScreenOptionsForLoginScreen
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  createMadCoreNavigator
3
- } from "../chunk-VLHDQUQA.js";
4
- import "../chunk-OG52JYYV.js";
5
- import "../chunk-L434TQRF.js";
3
+ } from "../chunk-CUCKZKO6.js";
6
4
  import "../chunk-6T6NE74H.js";
7
5
  import "../chunk-KL32BPEW.js";
8
- import "../chunk-ZPXPIE5I.js";
9
- import "../chunk-WPDXNSOV.js";
6
+ import "../chunk-GPTLCPZG.js";
10
7
  import "../chunk-3WUJAVUO.js";
11
8
  import "../chunk-SNG5ADEI.js";
9
+ import "../chunk-OG52JYYV.js";
10
+ import "../chunk-L434TQRF.js";
11
+ import "../chunk-ZPXPIE5I.js";
12
+ import "../chunk-JNNCA3V2.js";
12
13
  import "../chunk-AQXI6FKQ.js";
13
14
  import "../chunk-WRQWW7QV.js";
14
15
  import "../chunk-B6LK3MOD.js";
15
- import "../chunk-JNNCA3V2.js";
16
16
  import "../chunk-OCWASWDK.js";
17
17
  import "../chunk-RGJ4RWVB.js";
18
18
  import "../chunk-CZAFV2L7.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/mad-core",
3
- "version": "0.9.8",
3
+ "version": "0.9.10",
4
4
  "description": "Core library for the Mobile App Delivery team",
5
5
  "type": "module",
6
6
  "scripts": {