@equinor/mad-core 0.9.9 → 0.9.11
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 +12 -0
- package/dist/{chunk-VLHDQUQA.js → chunk-BM4677Q6.js} +1 -1
- package/dist/{chunk-WPDXNSOV.js → chunk-TMC6RSMM.js} +16 -10
- package/dist/{chunk-SYIWB6JH.js → chunk-VFZCRZKN.js} +1 -1
- package/dist/components/createCoreStackNavigator.js +3 -3
- package/dist/components/index.js +3 -3
- package/dist/components/screens/create-incident/CreateIncidentScreen.js +1 -1
- package/dist/index.js +3 -3
- package/dist/utils/createMadCoreNavigator.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @equinor/mad-core
|
|
2
2
|
|
|
3
|
+
## 0.9.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 435986a: The ticket number is now copyable in the `CreateIncidentScreen`
|
|
8
|
+
|
|
9
|
+
## 0.9.10
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 716e0af: Prevent `Device` and `Device brand` from showing on web in the `CreateIncidentScreen`.
|
|
14
|
+
|
|
3
15
|
## 0.9.9
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -13,7 +13,6 @@ import {
|
|
|
13
13
|
} from "./chunk-5Q7ZXDFE.js";
|
|
14
14
|
|
|
15
15
|
// src/components/screens/create-incident/CreateIncidentScreen.tsx
|
|
16
|
-
import React, { useState } from "react";
|
|
17
16
|
import {
|
|
18
17
|
Button,
|
|
19
18
|
Cell,
|
|
@@ -23,19 +22,23 @@ import {
|
|
|
23
22
|
Typography,
|
|
24
23
|
useStyles
|
|
25
24
|
} from "@equinor/mad-components";
|
|
26
|
-
import { View, LayoutAnimation, ScrollView, KeyboardAvoidingView } from "react-native";
|
|
27
25
|
import * as Device from "expo-device";
|
|
28
26
|
import * as Localization from "expo-localization";
|
|
27
|
+
import React, { useState } from "react";
|
|
28
|
+
import { KeyboardAvoidingView, LayoutAnimation, Platform, ScrollView, View } from "react-native";
|
|
29
29
|
var CreateIncidentScreen = () => {
|
|
30
|
-
|
|
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: ${
|
|
80
|
+
description += `Time Zone: ${timeZone}
|
|
78
81
|
`;
|
|
79
|
-
description += `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:
|
|
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: "), /* @__PURE__ */ React.createElement(Typography, { selectable: true }, ticketNumber)), error && /* @__PURE__ */ React.createElement(View, { style: [styles.popupBox, styles.popupDanger] }, /* @__PURE__ */ React.createElement(Typography, null, "An error occurred creating your ticket:"), /* @__PURE__ */ React.createElement(Typography, { selectable: true }, error instanceof Error ? error.message : "")), /* @__PURE__ */ React.createElement(View, { style: styles.titleField }, /* @__PURE__ */ React.createElement(
|
|
92
95
|
TextField,
|
|
93
96
|
{
|
|
94
97
|
onChange: setTicketTitle,
|
|
@@ -137,7 +140,10 @@ var createIncidentStyles = EDSStyleSheet.create((theme) => ({
|
|
|
137
140
|
padding: 24,
|
|
138
141
|
marginTop: 16,
|
|
139
142
|
borderWidth: 2,
|
|
140
|
-
borderRadius: 4
|
|
143
|
+
borderRadius: 4,
|
|
144
|
+
flexDirection: "row",
|
|
145
|
+
gap: 8,
|
|
146
|
+
flexWrap: "wrap"
|
|
141
147
|
},
|
|
142
148
|
popupDanger: {
|
|
143
149
|
borderColor: theme.colors.feedback.danger
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCoreStackNavigator
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-VFZCRZKN.js";
|
|
4
4
|
import "../chunk-WUCGJV35.js";
|
|
5
5
|
import "../chunk-2GCLIPZP.js";
|
|
6
6
|
import "../chunk-ZLW2PMDL.js";
|
|
@@ -9,13 +9,13 @@ 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-
|
|
12
|
+
import "../chunk-BM4677Q6.js";
|
|
13
13
|
import "../chunk-OG52JYYV.js";
|
|
14
14
|
import "../chunk-L434TQRF.js";
|
|
15
15
|
import "../chunk-6T6NE74H.js";
|
|
16
16
|
import "../chunk-KL32BPEW.js";
|
|
17
17
|
import "../chunk-ZPXPIE5I.js";
|
|
18
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-TMC6RSMM.js";
|
|
19
19
|
import "../chunk-3WUJAVUO.js";
|
|
20
20
|
import "../chunk-SNG5ADEI.js";
|
|
21
21
|
import "../chunk-AQXI6FKQ.js";
|
package/dist/components/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "../chunk-ZWBWZKYN.js";
|
|
17
17
|
import {
|
|
18
18
|
createCoreStackNavigator
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-VFZCRZKN.js";
|
|
20
20
|
import "../chunk-WUCGJV35.js";
|
|
21
21
|
import "../chunk-2GCLIPZP.js";
|
|
22
22
|
import {
|
|
@@ -28,13 +28,13 @@ 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-
|
|
31
|
+
import "../chunk-BM4677Q6.js";
|
|
32
32
|
import "../chunk-OG52JYYV.js";
|
|
33
33
|
import "../chunk-L434TQRF.js";
|
|
34
34
|
import "../chunk-6T6NE74H.js";
|
|
35
35
|
import "../chunk-KL32BPEW.js";
|
|
36
36
|
import "../chunk-ZPXPIE5I.js";
|
|
37
|
-
import "../chunk-
|
|
37
|
+
import "../chunk-TMC6RSMM.js";
|
|
38
38
|
import "../chunk-3WUJAVUO.js";
|
|
39
39
|
import "../chunk-SNG5ADEI.js";
|
|
40
40
|
import {
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-ZWBWZKYN.js";
|
|
18
18
|
import {
|
|
19
19
|
createCoreStackNavigator
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VFZCRZKN.js";
|
|
21
21
|
import "./chunk-WUCGJV35.js";
|
|
22
22
|
import "./chunk-2GCLIPZP.js";
|
|
23
23
|
import {
|
|
@@ -29,13 +29,13 @@ 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-
|
|
32
|
+
import "./chunk-BM4677Q6.js";
|
|
33
33
|
import "./chunk-OG52JYYV.js";
|
|
34
34
|
import "./chunk-L434TQRF.js";
|
|
35
35
|
import "./chunk-6T6NE74H.js";
|
|
36
36
|
import "./chunk-KL32BPEW.js";
|
|
37
37
|
import "./chunk-ZPXPIE5I.js";
|
|
38
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-TMC6RSMM.js";
|
|
39
39
|
import "./chunk-3WUJAVUO.js";
|
|
40
40
|
import "./chunk-SNG5ADEI.js";
|
|
41
41
|
import {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createMadCoreNavigator
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-BM4677Q6.js";
|
|
4
4
|
import "../chunk-OG52JYYV.js";
|
|
5
5
|
import "../chunk-L434TQRF.js";
|
|
6
6
|
import "../chunk-6T6NE74H.js";
|
|
7
7
|
import "../chunk-KL32BPEW.js";
|
|
8
8
|
import "../chunk-ZPXPIE5I.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-TMC6RSMM.js";
|
|
10
10
|
import "../chunk-3WUJAVUO.js";
|
|
11
11
|
import "../chunk-SNG5ADEI.js";
|
|
12
12
|
import "../chunk-AQXI6FKQ.js";
|