@equinor/mad-core 0.8.0 → 0.8.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @equinor/mad-core
2
2
 
3
+ ## 0.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 771e14d: Fixed keyboard covering the input fields in the feedback screen
8
+
3
9
  ## 0.8.0
4
10
 
5
11
  ### Minor Changes
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-G5FM7D6M.js";
10
10
  import {
11
11
  CreateIncidentScreen
12
- } from "./chunk-TR4KTTGP.js";
12
+ } from "./chunk-TYNIAOOW.js";
13
13
  import {
14
14
  LoginScreen
15
15
  } from "./chunk-CRICOQIB.js";
@@ -23,7 +23,7 @@ import {
23
23
  Typography,
24
24
  useStyles
25
25
  } from "@equinor/mad-components";
26
- import { View, LayoutAnimation, ScrollView } from "react-native";
26
+ import { View, LayoutAnimation, ScrollView, KeyboardAvoidingView } from "react-native";
27
27
  import * as Device from "expo-device";
28
28
  import * as Localization from "expo-localization";
29
29
  var CreateIncidentScreen = () => {
@@ -81,36 +81,44 @@ var CreateIncidentScreen = () => {
81
81
  return `${description}
82
82
  ${ticketDescription}`;
83
83
  };
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(
85
- TextField,
84
+ return /* @__PURE__ */ React.createElement(
85
+ KeyboardAvoidingView,
86
86
  {
87
- onChange: setTicketTitle,
88
- value: ticketTitle,
89
- placeholder: "Write a title for the Service Now ticket",
90
- readOnly: isSending
91
- }
92
- )), /* @__PURE__ */ React.createElement(View, { style: styles.titleField }, /* @__PURE__ */ React.createElement(
93
- TextField,
94
- {
95
- multiline: true,
96
- onChange: setTicketDescription,
97
- placeholder: "Write a complete description of your issue. You do not need to provide information about your device.",
98
- value: ticketDescription,
99
- readOnly: isSending
100
- }
101
- )), /* @__PURE__ */ React.createElement(View, { style: styles.buttonContainer }, /* @__PURE__ */ React.createElement(
102
- Button,
103
- {
104
- disabled: !ticketTitle || !ticketDescription || isSending,
105
- onPress: onSubmit,
106
- style: { width: 81 },
107
- title: "Send"
108
- }
109
- ))));
87
+ behavior: "padding",
88
+ keyboardVerticalOffset: 115,
89
+ style: styles.container
90
+ },
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(
92
+ TextField,
93
+ {
94
+ onChange: setTicketTitle,
95
+ value: ticketTitle,
96
+ placeholder: "Write a title for the Service Now ticket",
97
+ readOnly: isSending
98
+ }
99
+ )), /* @__PURE__ */ React.createElement(View, { style: styles.titleField }, /* @__PURE__ */ React.createElement(
100
+ TextField,
101
+ {
102
+ multiline: true,
103
+ onChange: setTicketDescription,
104
+ placeholder: "Write a complete description of your issue. You do not need to provide information about your device.",
105
+ value: ticketDescription,
106
+ readOnly: isSending
107
+ }
108
+ )), /* @__PURE__ */ React.createElement(View, { style: styles.buttonContainer }, /* @__PURE__ */ React.createElement(
109
+ Button,
110
+ {
111
+ disabled: !ticketTitle || !ticketDescription || isSending,
112
+ onPress: onSubmit,
113
+ style: { width: 81 },
114
+ title: "Send"
115
+ }
116
+ ))))
117
+ );
110
118
  };
111
119
  var createIncidentStyles = EDSStyleSheet.create((theme) => ({
112
120
  container: {
113
- paddingVertical: theme.spacing.container.paddingVertical
121
+ flex: 1
114
122
  },
115
123
  topTextContainer: {
116
124
  paddingBottom: theme.geometry.dimension.cell.minHeight
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-JD2JILBG.js";
7
7
  import {
8
8
  createMadCoreNavigator
9
- } from "./chunk-4B6Z33WD.js";
9
+ } from "./chunk-NOB4NMLU.js";
10
10
  import {
11
11
  setConfig
12
12
  } from "./chunk-XHIBLTJB.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createCoreStackNavigator
3
- } from "../chunk-7TSQIIGU.js";
3
+ } from "../chunk-UQTIV3PZ.js";
4
4
  import "../chunk-3BM4S2GG.js";
5
5
  import "../chunk-2GCLIPZP.js";
6
6
  import "../chunk-JD2JILBG.js";
@@ -9,13 +9,13 @@ import "../chunk-LOV6KYOY.js";
9
9
  import "../chunk-ZSUFR7LK.js";
10
10
  import "../chunk-YWPELSTX.js";
11
11
  import "../chunk-SHKOH7MA.js";
12
- import "../chunk-4B6Z33WD.js";
12
+ import "../chunk-NOB4NMLU.js";
13
13
  import "../chunk-OACYJHTV.js";
14
14
  import "../chunk-SSSTWTHP.js";
15
15
  import "../chunk-QKUSNQOJ.js";
16
16
  import "../chunk-G5FM7D6M.js";
17
17
  import "../chunk-YZEMCMKV.js";
18
- import "../chunk-TR4KTTGP.js";
18
+ import "../chunk-TYNIAOOW.js";
19
19
  import "../chunk-3WUJAVUO.js";
20
20
  import "../chunk-CAOQCE6W.js";
21
21
  import "../chunk-CRICOQIB.js";
@@ -16,7 +16,7 @@ import {
16
16
  } from "../chunk-FW4GVJC7.js";
17
17
  import {
18
18
  createCoreStackNavigator
19
- } from "../chunk-7TSQIIGU.js";
19
+ } from "../chunk-UQTIV3PZ.js";
20
20
  import "../chunk-3BM4S2GG.js";
21
21
  import "../chunk-2GCLIPZP.js";
22
22
  import {
@@ -28,13 +28,13 @@ import "../chunk-LOV6KYOY.js";
28
28
  import "../chunk-ZSUFR7LK.js";
29
29
  import "../chunk-YWPELSTX.js";
30
30
  import "../chunk-SHKOH7MA.js";
31
- import "../chunk-4B6Z33WD.js";
31
+ import "../chunk-NOB4NMLU.js";
32
32
  import "../chunk-OACYJHTV.js";
33
33
  import "../chunk-SSSTWTHP.js";
34
34
  import "../chunk-QKUSNQOJ.js";
35
35
  import "../chunk-G5FM7D6M.js";
36
36
  import "../chunk-YZEMCMKV.js";
37
- import "../chunk-TR4KTTGP.js";
37
+ import "../chunk-TYNIAOOW.js";
38
38
  import "../chunk-3WUJAVUO.js";
39
39
  import "../chunk-CAOQCE6W.js";
40
40
  import {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CreateIncidentScreen
3
- } from "../../../chunk-TR4KTTGP.js";
3
+ } from "../../../chunk-TYNIAOOW.js";
4
4
  import "../../../chunk-3WUJAVUO.js";
5
5
  import "../../../chunk-CAOQCE6W.js";
6
6
  import "../../../chunk-RFYZGBU4.js";
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-FW4GVJC7.js";
18
18
  import {
19
19
  createCoreStackNavigator
20
- } from "./chunk-7TSQIIGU.js";
20
+ } from "./chunk-UQTIV3PZ.js";
21
21
  import "./chunk-3BM4S2GG.js";
22
22
  import "./chunk-2GCLIPZP.js";
23
23
  import {
@@ -29,13 +29,13 @@ import "./chunk-LOV6KYOY.js";
29
29
  import "./chunk-ZSUFR7LK.js";
30
30
  import "./chunk-YWPELSTX.js";
31
31
  import "./chunk-SHKOH7MA.js";
32
- import "./chunk-4B6Z33WD.js";
32
+ import "./chunk-NOB4NMLU.js";
33
33
  import "./chunk-OACYJHTV.js";
34
34
  import "./chunk-SSSTWTHP.js";
35
35
  import "./chunk-QKUSNQOJ.js";
36
36
  import "./chunk-G5FM7D6M.js";
37
37
  import "./chunk-YZEMCMKV.js";
38
- import "./chunk-TR4KTTGP.js";
38
+ import "./chunk-TYNIAOOW.js";
39
39
  import "./chunk-3WUJAVUO.js";
40
40
  import "./chunk-CAOQCE6W.js";
41
41
  import {
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createMadCoreNavigator
3
- } from "../chunk-4B6Z33WD.js";
3
+ } from "../chunk-NOB4NMLU.js";
4
4
  import "../chunk-OACYJHTV.js";
5
5
  import "../chunk-SSSTWTHP.js";
6
6
  import "../chunk-QKUSNQOJ.js";
7
7
  import "../chunk-G5FM7D6M.js";
8
8
  import "../chunk-YZEMCMKV.js";
9
- import "../chunk-TR4KTTGP.js";
9
+ import "../chunk-TYNIAOOW.js";
10
10
  import "../chunk-3WUJAVUO.js";
11
11
  import "../chunk-CAOQCE6W.js";
12
12
  import "../chunk-CRICOQIB.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/mad-core",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Core library for the Mobile App Delivery team",
5
5
  "type": "module",
6
6
  "scripts": {