@equinor/mad-core 0.13.0 → 0.14.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.
- package/CHANGELOG.md +15 -0
- package/dist/{chunk-DJMBVNB6.js → chunk-4MZFJLIZ.js} +2 -2
- package/dist/{chunk-U5IJVQDO.js → chunk-5JFNRREO.js} +1 -1
- package/dist/chunk-5O4PAUNU.js +13 -0
- package/dist/{chunk-7HGZLLNX.js → chunk-6HDRI6TU.js} +1 -1
- package/dist/{chunk-6RPJUHBL.js → chunk-BFY7M5I2.js} +1 -1
- package/dist/{chunk-STKI44UB.js → chunk-COSM7WGR.js} +4 -4
- package/dist/{chunk-TWUGCMPQ.js → chunk-D4SVYUGC.js} +2 -2
- package/dist/{chunk-KEH6NBFE.js → chunk-G4GPSIHD.js} +1 -1
- package/dist/{chunk-HVZWOPNE.js → chunk-HPDK6AZ3.js} +4 -11
- package/dist/{chunk-EOM477VC.js → chunk-IPJ2CVM4.js} +1 -1
- package/dist/{chunk-ETY3HZNI.js → chunk-IXKJM7VZ.js} +1 -1
- package/dist/{chunk-WWF7QKDX.js → chunk-LEWQGDM7.js} +2 -7
- package/dist/{chunk-SVBUWW4H.js → chunk-N7YMTR7Q.js} +2 -2
- package/dist/{chunk-O2GHT2UV.js → chunk-NVAF6GOY.js} +2 -2
- package/dist/{chunk-CKOB6JKU.js → chunk-OAVRCDCP.js} +4 -4
- package/dist/{chunk-HUG4RNGS.js → chunk-PYTNVR7M.js} +3 -5
- package/dist/{chunk-7FO6SNUK.js → chunk-QGFTS65Y.js} +5 -10
- package/dist/{chunk-GEEFQMRN.js → chunk-RBFR3YMY.js} +5 -5
- package/dist/{chunk-PB3TI2RT.js → chunk-RPD2KUSY.js} +1 -1
- package/dist/{chunk-IHCNAGT7.js → chunk-SRQFW6D5.js} +1 -1
- package/dist/chunk-TJBYNCID.js +353 -0
- package/dist/{chunk-DIITQCRW.js → chunk-TO775HMH.js} +1 -1
- package/dist/{chunk-6LMMRQYQ.js → chunk-UOOFD7CI.js} +2 -2
- package/dist/{chunk-RJDKNHBE.js → chunk-XMQYRBUW.js} +1 -1
- package/dist/{chunk-4JWXJOGM.js → chunk-YTQLIYLS.js} +4 -4
- package/dist/{chunk-GNJZV3PL.js → chunk-ZAEB6ZS3.js} +5 -9
- package/dist/components/EnvironmentBanner.js +2 -2
- package/dist/components/EnvironmentProvider.js +2 -2
- package/dist/components/NavigationContainer.d.ts +2 -15
- package/dist/components/OfflineBanner.js +2 -2
- package/dist/components/createCoreStackNavigator.d.ts +18 -37
- package/dist/components/createCoreStackNavigator.js +37 -30
- package/dist/components/index.js +35 -38
- package/dist/components/navigation/MadCoreSubHeader.js +7 -7
- package/dist/components/navigation/index.js +8 -8
- package/dist/components/navigation/navigation-creators.d.ts +6 -7
- package/dist/components/navigation/navigation-creators.js +8 -8
- package/dist/components/screens/AboutScreen.js +2 -2
- package/dist/components/screens/LoginScreen.d.ts +2 -2
- package/dist/components/screens/LoginScreen.js +4 -4
- package/dist/components/screens/create-incident/CreateIncidentScreen.js +51 -5
- package/dist/components/screens/create-incident/createIncident.js +62 -1
- package/dist/components/screens/language/SelectLanguageScreen.js +5 -5
- package/dist/components/screens/language/components/SelectLanguageCellGroup.js +2 -2
- package/dist/components/screens/release-notes/ReleaseNotesScreen.js +5 -8
- package/dist/components/screens/release-notes/WhatsNewScreen.js +6 -6
- package/dist/components/screens/release-notes/fetchReleaseNotes.js +1 -11
- package/dist/components/screens/settings/Section.js +1 -9
- package/dist/components/screens/settings/SettingsScreen.js +6 -6
- package/dist/components/screens/settings/index.js +6 -6
- package/dist/components/screens/settings/useSignOut.d.ts +1 -1
- package/dist/components/screens/settings/useSignOut.js +4 -4
- package/dist/components/service-message/ServiceMessageBanner.js +4 -4
- package/dist/components/service-message/ServiceMessageProvider.js +3 -3
- package/dist/components/service-message/hooks/useFetchServiceMessage.d.ts +0 -1
- package/dist/components/service-message/hooks/useFetchServiceMessage.js +2 -2
- package/dist/hooks/UseReleaseNotes.js +3 -6
- package/dist/hooks/index.js +1 -9
- package/dist/hooks/useAccountOrDemoAccount.js +1 -9
- package/dist/hooks/useNavigateFromLanguageSelectScreen.js +2 -2
- package/dist/hooks/useNavigateFromLoginScreen.js +3 -3
- package/dist/hooks/useNavigateFromWhatsNewScreen.js +3 -3
- package/dist/hooks/useScreenTitleFromDictionary.js +2 -2
- package/dist/index.js +53 -75
- package/dist/language/useDictionary.js +1 -1
- package/dist/store/index.js +2 -2
- package/dist/store/language/index.js +1 -1
- package/dist/store/language/language.js +1 -1
- package/dist/store/mad-config/hooks.d.ts +3 -3
- package/dist/store/mad-config/hooks.js +1 -1
- package/dist/store/mad-config/index.js +1 -1
- package/dist/store/mad-config/mad-config.js +1 -1
- package/dist/utils/MadCoreProviders.d.ts +1 -1
- package/dist/utils/MadCoreProviders.js +5 -5
- package/dist/utils/createEnvironmentProxy.d.ts +2 -2
- package/dist/utils/createEnvironmentProxy.js +1 -1
- package/dist/utils/createMadCoreNavigator.d.ts +6 -6
- package/dist/utils/createMadCoreNavigator.js +41 -22
- package/dist/utils/initiateAuthenticationClient.js +1 -11
- package/package.json +10 -11
- package/dist/chunk-3YVGPC4G.js +0 -41
- package/dist/chunk-GE4JC2VP.js +0 -98
- package/dist/chunk-JYWP44JR.js +0 -0
- package/dist/chunk-NJ5W3O5I.js +0 -30
- package/dist/chunk-WDZF2C5R.js +0 -20
- package/dist/chunk-ZIV7DVBA.js +0 -158
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
import {
|
|
2
|
+
WhatsNewScreen
|
|
3
|
+
} from "./chunk-OAVRCDCP.js";
|
|
4
|
+
import {
|
|
5
|
+
UserInfo
|
|
6
|
+
} from "./chunk-3WUJAVUO.js";
|
|
7
|
+
import {
|
|
8
|
+
SelectLanguageScreen
|
|
9
|
+
} from "./chunk-COSM7WGR.js";
|
|
10
|
+
import {
|
|
11
|
+
ReleaseNotesScreen
|
|
12
|
+
} from "./chunk-D4SVYUGC.js";
|
|
13
|
+
import {
|
|
14
|
+
createNativeStackNavigator,
|
|
15
|
+
createStackNavigator
|
|
16
|
+
} from "./chunk-XMQYRBUW.js";
|
|
17
|
+
import {
|
|
18
|
+
initiateAuthenticationClient
|
|
19
|
+
} from "./chunk-5O4PAUNU.js";
|
|
20
|
+
import {
|
|
21
|
+
AboutScreen
|
|
22
|
+
} from "./chunk-PYTNVR7M.js";
|
|
23
|
+
import {
|
|
24
|
+
LoginScreen
|
|
25
|
+
} from "./chunk-ZAEB6ZS3.js";
|
|
26
|
+
import {
|
|
27
|
+
MadCoreProviders
|
|
28
|
+
} from "./chunk-UOOFD7CI.js";
|
|
29
|
+
import {
|
|
30
|
+
getDefaultScreenOptionsForLoginScreen
|
|
31
|
+
} from "./chunk-RGJ4RWVB.js";
|
|
32
|
+
import {
|
|
33
|
+
getMadCommonBaseUrl,
|
|
34
|
+
getMadCommonScopes
|
|
35
|
+
} from "./chunk-ZB37EIZB.js";
|
|
36
|
+
import {
|
|
37
|
+
useAccountOrDemoAccount
|
|
38
|
+
} from "./chunk-LEWQGDM7.js";
|
|
39
|
+
import {
|
|
40
|
+
setConfig,
|
|
41
|
+
useEnvironment,
|
|
42
|
+
useMadConfig,
|
|
43
|
+
useServiceNow
|
|
44
|
+
} from "./chunk-RBFR3YMY.js";
|
|
45
|
+
import {
|
|
46
|
+
CoreRoutes
|
|
47
|
+
} from "./chunk-UKAZW3CQ.js";
|
|
48
|
+
import {
|
|
49
|
+
__async,
|
|
50
|
+
__spreadProps,
|
|
51
|
+
__spreadValues
|
|
52
|
+
} from "./chunk-CWMXXUWU.js";
|
|
53
|
+
|
|
54
|
+
// src/utils/createMadCoreNavigator.tsx
|
|
55
|
+
import React2 from "react";
|
|
56
|
+
|
|
57
|
+
// src/components/screens/create-incident/CreateIncidentScreen.tsx
|
|
58
|
+
import {
|
|
59
|
+
Button,
|
|
60
|
+
Cell,
|
|
61
|
+
EDSStyleSheet,
|
|
62
|
+
Spacer,
|
|
63
|
+
TextField,
|
|
64
|
+
Typography,
|
|
65
|
+
useStyles
|
|
66
|
+
} from "@equinor/mad-components";
|
|
67
|
+
import * as Device from "expo-device";
|
|
68
|
+
import * as Localization from "expo-localization";
|
|
69
|
+
import React, { useState } from "react";
|
|
70
|
+
import { KeyboardAvoidingView, LayoutAnimation, Platform, ScrollView, View } from "react-native";
|
|
71
|
+
var CreateIncidentScreen = () => {
|
|
72
|
+
var _a, _b, _c, _d;
|
|
73
|
+
const [error, setError] = useState(null);
|
|
74
|
+
const [ticketNumber, setTicketNumber] = useState(void 0);
|
|
75
|
+
const [ticketTitle, setTicketTitle] = useState(void 0);
|
|
76
|
+
const [ticketDescription, setTicketDescription] = useState(void 0);
|
|
77
|
+
const [isSending, setIsSending] = useState(false);
|
|
78
|
+
const account = useAccountOrDemoAccount();
|
|
79
|
+
const serviceNowConfigurationItem = useServiceNow();
|
|
80
|
+
const environment = useEnvironment();
|
|
81
|
+
const styles = useStyles(createIncidentStyles);
|
|
82
|
+
const timeZone = (_b = (_a = Localization.getCalendars()[0]) == null ? void 0 : _a.timeZone) != null ? _b : "Unknown TimeZone";
|
|
83
|
+
const locale = (_d = (_c = Localization.getLocales()[0]) == null ? void 0 : _c.languageTag) != null ? _d : "Unknown Locale";
|
|
84
|
+
const onSubmit = () => {
|
|
85
|
+
setIsSending(true);
|
|
86
|
+
const data = {
|
|
87
|
+
callerEmail: account == null ? void 0 : account.username,
|
|
88
|
+
title: ticketTitle,
|
|
89
|
+
description: createDescription()
|
|
90
|
+
};
|
|
91
|
+
createIncident(data, environment, serviceNowConfigurationItem).then((response) => {
|
|
92
|
+
LayoutAnimation.configureNext({
|
|
93
|
+
duration: 500,
|
|
94
|
+
update: {
|
|
95
|
+
type: LayoutAnimation.Types.easeInEaseOut
|
|
96
|
+
},
|
|
97
|
+
create: {
|
|
98
|
+
type: LayoutAnimation.Types.easeInEaseOut,
|
|
99
|
+
property: LayoutAnimation.Properties.opacity
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
if (response.result.details.number) {
|
|
103
|
+
setTicketNumber(response.result.details.number);
|
|
104
|
+
} else {
|
|
105
|
+
setError(response);
|
|
106
|
+
}
|
|
107
|
+
setTicketDescription(void 0);
|
|
108
|
+
setTicketTitle(void 0);
|
|
109
|
+
setIsSending(false);
|
|
110
|
+
}).catch(setError).finally(() => setIsSending(false));
|
|
111
|
+
};
|
|
112
|
+
const createDescription = () => {
|
|
113
|
+
let description = "";
|
|
114
|
+
description += `User: ${account == null ? void 0 : account.username}
|
|
115
|
+
`;
|
|
116
|
+
description += `Device Brand: ${Device.brand}
|
|
117
|
+
`;
|
|
118
|
+
description += `Device: ${Device.deviceName}
|
|
119
|
+
`;
|
|
120
|
+
description += `Operating System: ${Device.osVersion}
|
|
121
|
+
`;
|
|
122
|
+
description += `Time Zone: ${timeZone}
|
|
123
|
+
`;
|
|
124
|
+
description += `Locale: ${locale}
|
|
125
|
+
`;
|
|
126
|
+
return `${description}
|
|
127
|
+
${ticketDescription}`;
|
|
128
|
+
};
|
|
129
|
+
return /* @__PURE__ */ React.createElement(
|
|
130
|
+
KeyboardAvoidingView,
|
|
131
|
+
{
|
|
132
|
+
behavior: "padding",
|
|
133
|
+
keyboardVerticalOffset: 115,
|
|
134
|
+
style: styles.container
|
|
135
|
+
},
|
|
136
|
+
/* @__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(
|
|
137
|
+
TextField,
|
|
138
|
+
{
|
|
139
|
+
onChange: setTicketTitle,
|
|
140
|
+
value: ticketTitle,
|
|
141
|
+
placeholder: "Write a title for the Service Now ticket",
|
|
142
|
+
readOnly: isSending
|
|
143
|
+
}
|
|
144
|
+
)), /* @__PURE__ */ React.createElement(View, { style: styles.titleField }, /* @__PURE__ */ React.createElement(
|
|
145
|
+
TextField,
|
|
146
|
+
{
|
|
147
|
+
multiline: true,
|
|
148
|
+
onChange: setTicketDescription,
|
|
149
|
+
placeholder: "Write a complete description of your issue. You do not need to provide information about your device.",
|
|
150
|
+
value: ticketDescription,
|
|
151
|
+
readOnly: isSending
|
|
152
|
+
}
|
|
153
|
+
)), /* @__PURE__ */ React.createElement(View, { style: styles.buttonContainer }, /* @__PURE__ */ React.createElement(
|
|
154
|
+
Button,
|
|
155
|
+
{
|
|
156
|
+
disabled: !ticketTitle || !ticketDescription || isSending,
|
|
157
|
+
onPress: onSubmit,
|
|
158
|
+
style: { width: 81 },
|
|
159
|
+
title: "Send"
|
|
160
|
+
}
|
|
161
|
+
))))
|
|
162
|
+
);
|
|
163
|
+
};
|
|
164
|
+
var createIncidentStyles = EDSStyleSheet.create((theme) => ({
|
|
165
|
+
container: {
|
|
166
|
+
flex: 1
|
|
167
|
+
},
|
|
168
|
+
topTextContainer: {
|
|
169
|
+
paddingBottom: theme.geometry.dimension.cell.minHeight
|
|
170
|
+
},
|
|
171
|
+
titleField: {
|
|
172
|
+
marginVertical: theme.spacing.textField.paddingVertical * 3
|
|
173
|
+
},
|
|
174
|
+
multiTextField: {
|
|
175
|
+
height: theme.geometry.dimension.dialog.minHeight
|
|
176
|
+
},
|
|
177
|
+
buttonContainer: {
|
|
178
|
+
flexDirection: "row",
|
|
179
|
+
justifyContent: "flex-end"
|
|
180
|
+
},
|
|
181
|
+
popupBox: {
|
|
182
|
+
padding: 24,
|
|
183
|
+
marginTop: 16,
|
|
184
|
+
borderWidth: 2,
|
|
185
|
+
borderRadius: 4,
|
|
186
|
+
flexDirection: "row",
|
|
187
|
+
gap: 8,
|
|
188
|
+
flexWrap: "wrap"
|
|
189
|
+
},
|
|
190
|
+
popupDanger: {
|
|
191
|
+
borderColor: theme.colors.feedback.danger
|
|
192
|
+
},
|
|
193
|
+
popupSuccess: {
|
|
194
|
+
borderColor: theme.colors.feedback.success
|
|
195
|
+
}
|
|
196
|
+
}));
|
|
197
|
+
|
|
198
|
+
// src/utils/createMadCoreNavigator.tsx
|
|
199
|
+
var createMadCoreNativeStackNavigator = (Stack) => {
|
|
200
|
+
function MadCoreNavigator(props) {
|
|
201
|
+
const config = useMadConfig();
|
|
202
|
+
if (!config) return null;
|
|
203
|
+
return /* @__PURE__ */ React2.createElement(MadCoreProviders, { config, type: "native-stack" }, /* @__PURE__ */ React2.createElement(Stack.Navigator, __spreadProps(__spreadValues({}, props), { initialRouteName: CoreRoutes.LOGIN }), config.login.addScreenManually !== true && /* @__PURE__ */ React2.createElement(
|
|
204
|
+
Stack.Screen,
|
|
205
|
+
{
|
|
206
|
+
name: CoreRoutes.LOGIN,
|
|
207
|
+
component: LoginScreen,
|
|
208
|
+
options: getDefaultScreenOptionsForLoginScreen()
|
|
209
|
+
}
|
|
210
|
+
), /* @__PURE__ */ React2.createElement(Stack.Screen, { name: CoreRoutes.RELEASE_NOTES, component: ReleaseNotesScreen }), /* @__PURE__ */ React2.createElement(Stack.Screen, { name: CoreRoutes.WHATS_NEW, component: WhatsNewScreen }), config.about && /* @__PURE__ */ React2.createElement(Stack.Screen, { name: CoreRoutes.ABOUT, component: AboutScreen }), config.serviceNow && /* @__PURE__ */ React2.createElement(Stack.Screen, { name: CoreRoutes.FEEDBACK, component: CreateIncidentScreen }), config.language.supportedLanguages.length > 1 && /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(
|
|
211
|
+
Stack.Screen,
|
|
212
|
+
{
|
|
213
|
+
name: CoreRoutes.SELECT_LANGUAGE,
|
|
214
|
+
component: SelectLanguageScreen
|
|
215
|
+
}
|
|
216
|
+
), /* @__PURE__ */ React2.createElement(
|
|
217
|
+
Stack.Screen,
|
|
218
|
+
{
|
|
219
|
+
name: CoreRoutes.SELECT_LANGUAGE_ONBOARDING,
|
|
220
|
+
component: SelectLanguageScreen,
|
|
221
|
+
options: { headerBackVisible: false }
|
|
222
|
+
}
|
|
223
|
+
)), props.children));
|
|
224
|
+
}
|
|
225
|
+
return MadCoreNavigator;
|
|
226
|
+
};
|
|
227
|
+
var createMadCoreStackNavigator = (Stack) => {
|
|
228
|
+
function MadCoreNavigator(props) {
|
|
229
|
+
const config = useMadConfig();
|
|
230
|
+
if (!config) return null;
|
|
231
|
+
return /* @__PURE__ */ React2.createElement(MadCoreProviders, { config, type: "stack" }, /* @__PURE__ */ React2.createElement(Stack.Navigator, __spreadProps(__spreadValues({}, props), { initialRouteName: CoreRoutes.LOGIN }), config.login.addScreenManually !== true && /* @__PURE__ */ React2.createElement(
|
|
232
|
+
Stack.Screen,
|
|
233
|
+
{
|
|
234
|
+
name: CoreRoutes.LOGIN,
|
|
235
|
+
component: LoginScreen,
|
|
236
|
+
options: getDefaultScreenOptionsForLoginScreen()
|
|
237
|
+
}
|
|
238
|
+
), /* @__PURE__ */ React2.createElement(Stack.Screen, { name: CoreRoutes.RELEASE_NOTES, component: ReleaseNotesScreen }), /* @__PURE__ */ React2.createElement(Stack.Screen, { name: CoreRoutes.WHATS_NEW, component: WhatsNewScreen }), config.about && /* @__PURE__ */ React2.createElement(Stack.Screen, { name: CoreRoutes.ABOUT, component: AboutScreen }), config.serviceNow && /* @__PURE__ */ React2.createElement(Stack.Screen, { name: CoreRoutes.FEEDBACK, component: CreateIncidentScreen }), config.language.supportedLanguages.length > 1 && /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(
|
|
239
|
+
Stack.Screen,
|
|
240
|
+
{
|
|
241
|
+
name: CoreRoutes.SELECT_LANGUAGE,
|
|
242
|
+
component: SelectLanguageScreen
|
|
243
|
+
}
|
|
244
|
+
), /* @__PURE__ */ React2.createElement(
|
|
245
|
+
Stack.Screen,
|
|
246
|
+
{
|
|
247
|
+
name: CoreRoutes.SELECT_LANGUAGE_ONBOARDING,
|
|
248
|
+
component: SelectLanguageScreen,
|
|
249
|
+
options: { headerLeft: () => null }
|
|
250
|
+
}
|
|
251
|
+
)), props.children));
|
|
252
|
+
}
|
|
253
|
+
return MadCoreNavigator;
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
// src/components/createCoreStackNavigator.tsx
|
|
257
|
+
var createStackCoreNavigator = (config) => {
|
|
258
|
+
setConfig(config);
|
|
259
|
+
initiateAuthenticationClient();
|
|
260
|
+
const Stack = createStackNavigator();
|
|
261
|
+
const Navigator = createMadCoreStackNavigator(Stack);
|
|
262
|
+
return __spreadProps(__spreadValues({}, Stack), { Navigator });
|
|
263
|
+
};
|
|
264
|
+
var createNativeStackCoreNavigator = (config) => {
|
|
265
|
+
setConfig(config);
|
|
266
|
+
initiateAuthenticationClient();
|
|
267
|
+
const Stack = createNativeStackNavigator();
|
|
268
|
+
const Navigator = createMadCoreNativeStackNavigator(Stack);
|
|
269
|
+
return __spreadProps(__spreadValues({}, Stack), { Navigator });
|
|
270
|
+
};
|
|
271
|
+
var createCoreStackNavigator = (config) => createNativeStackCoreNavigator(config);
|
|
272
|
+
|
|
273
|
+
// src/index.ts
|
|
274
|
+
import {
|
|
275
|
+
appInsightsHasBeenInitialized,
|
|
276
|
+
addTelemetryInitializer,
|
|
277
|
+
Envelope,
|
|
278
|
+
metricKeys,
|
|
279
|
+
metricStatus,
|
|
280
|
+
track,
|
|
281
|
+
trackCustom,
|
|
282
|
+
trackLongTerm,
|
|
283
|
+
trackShortTerm
|
|
284
|
+
} from "@equinor/mad-insights";
|
|
285
|
+
import { addToast, ToastTypes, ToastType } from "@equinor/mad-toast";
|
|
286
|
+
import { MadAccount, MadAuthenticationResult } from "@equinor/mad-auth";
|
|
287
|
+
import { ExpoAuthSession } from "@equinor/mad-auth";
|
|
288
|
+
var authenticateSilently = (scopes) => (
|
|
289
|
+
// hasExpoAuthSession()
|
|
290
|
+
ExpoAuthSession.authenticateSilently(scopes)
|
|
291
|
+
);
|
|
292
|
+
var getAccount = () => __async(null, null, function* () {
|
|
293
|
+
return (
|
|
294
|
+
// hasExpoAuthSession() ?
|
|
295
|
+
Promise.resolve(ExpoAuthSession.getAccount())
|
|
296
|
+
);
|
|
297
|
+
});
|
|
298
|
+
var signOut = () => __async(null, null, function* () {
|
|
299
|
+
return (
|
|
300
|
+
// hasExpoAuthSession() ?
|
|
301
|
+
ExpoAuthSession.signOut()
|
|
302
|
+
);
|
|
303
|
+
});
|
|
304
|
+
var authenticateInteractively = (scopes) => (
|
|
305
|
+
// hasExpoAuthSession()
|
|
306
|
+
ExpoAuthSession.authenticateInteractively(scopes)
|
|
307
|
+
);
|
|
308
|
+
|
|
309
|
+
// src/components/screens/create-incident/createIncident.ts
|
|
310
|
+
var createIncident = (data, env, serviceNow) => __async(null, null, function* () {
|
|
311
|
+
const baseUrl = getMadCommonBaseUrl(env);
|
|
312
|
+
const scopes = getMadCommonScopes(env);
|
|
313
|
+
const authenticationResponse = yield authenticateSilently(scopes);
|
|
314
|
+
if (!authenticationResponse) throw new Error("Unable to authenticate silently");
|
|
315
|
+
const fetchResponse = yield fetch(`${baseUrl}/ServiceNow/apps/${serviceNow}/incidents`, {
|
|
316
|
+
method: "POST",
|
|
317
|
+
body: JSON.stringify(data),
|
|
318
|
+
headers: new Headers({
|
|
319
|
+
Accept: "application/json",
|
|
320
|
+
"Content-Type": "application/json",
|
|
321
|
+
Authorization: `Bearer ${authenticationResponse.accessToken}`
|
|
322
|
+
})
|
|
323
|
+
});
|
|
324
|
+
return yield fetchResponse.json().then((result) => JSON.parse(result));
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
export {
|
|
328
|
+
createIncident,
|
|
329
|
+
CreateIncidentScreen,
|
|
330
|
+
createMadCoreNativeStackNavigator,
|
|
331
|
+
createMadCoreStackNavigator,
|
|
332
|
+
createStackCoreNavigator,
|
|
333
|
+
createNativeStackCoreNavigator,
|
|
334
|
+
createCoreStackNavigator,
|
|
335
|
+
authenticateSilently,
|
|
336
|
+
getAccount,
|
|
337
|
+
signOut,
|
|
338
|
+
authenticateInteractively,
|
|
339
|
+
appInsightsHasBeenInitialized,
|
|
340
|
+
addTelemetryInitializer,
|
|
341
|
+
Envelope,
|
|
342
|
+
metricKeys,
|
|
343
|
+
metricStatus,
|
|
344
|
+
track,
|
|
345
|
+
trackCustom,
|
|
346
|
+
trackLongTerm,
|
|
347
|
+
trackShortTerm,
|
|
348
|
+
addToast,
|
|
349
|
+
ToastTypes,
|
|
350
|
+
ToastType,
|
|
351
|
+
MadAccount,
|
|
352
|
+
MadAuthenticationResult
|
|
353
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ServiceMessageProvider
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TO775HMH.js";
|
|
4
4
|
import {
|
|
5
5
|
CoreNavigatorTypeProvider
|
|
6
6
|
} from "./chunk-PP74MP4O.js";
|
|
7
7
|
import {
|
|
8
8
|
EnvironmentProvider
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6HDRI6TU.js";
|
|
10
10
|
|
|
11
11
|
// src/utils/MadCoreProviders.tsx
|
|
12
12
|
import React from "react";
|
|
@@ -3,20 +3,20 @@ import {
|
|
|
3
3
|
} from "./chunk-YKLMUKP4.js";
|
|
4
4
|
import {
|
|
5
5
|
useSignOut
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HPDK6AZ3.js";
|
|
7
7
|
import {
|
|
8
8
|
getFinalSettingsConfig
|
|
9
9
|
} from "./chunk-QLL6LKDN.js";
|
|
10
10
|
import {
|
|
11
11
|
useScreenTitleFromDictionary
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5JFNRREO.js";
|
|
13
13
|
import {
|
|
14
14
|
useAccountOrDemoAccount
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-LEWQGDM7.js";
|
|
16
16
|
import {
|
|
17
17
|
useDictionary,
|
|
18
18
|
useSettingsScreenPremadeConfig
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-RBFR3YMY.js";
|
|
20
20
|
import {
|
|
21
21
|
__spreadValues
|
|
22
22
|
} from "./chunk-CWMXXUWU.js";
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useNavigateFromLoginScreen
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BFY7M5I2.js";
|
|
4
4
|
import {
|
|
5
|
-
getConfig,
|
|
6
5
|
useAuthConfig,
|
|
7
6
|
useDictionary,
|
|
8
7
|
useLoginScreenConfig
|
|
9
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RBFR3YMY.js";
|
|
10
9
|
import {
|
|
11
10
|
__spreadProps,
|
|
12
11
|
__spreadValues
|
|
@@ -16,16 +15,13 @@ import {
|
|
|
16
15
|
import { Button, EDSProvider, EDSStyleSheet, useStyles } from "@equinor/mad-components";
|
|
17
16
|
import React, { useState } from "react";
|
|
18
17
|
import { Image, Platform, Pressable, View } from "react-native";
|
|
19
|
-
import {
|
|
20
|
-
ExpoAuthSession,
|
|
21
|
-
LoginButton
|
|
22
|
-
} from "@equinor/mad-auth";
|
|
18
|
+
import { ExpoAuthSession } from "@equinor/mad-auth";
|
|
23
19
|
import { metricKeys, metricStatus, setUsername, track } from "@equinor/mad-insights";
|
|
24
20
|
var LoginScreen = ({
|
|
25
21
|
onAuthenticationSuccessful,
|
|
26
22
|
onAuthenticationFailed
|
|
27
23
|
}) => {
|
|
28
|
-
var _a
|
|
24
|
+
var _a;
|
|
29
25
|
const dictionary = useDictionary();
|
|
30
26
|
const authConfig = useAuthConfig();
|
|
31
27
|
const navigate = useNavigateFromLoginScreen();
|
|
@@ -62,7 +58,7 @@ var LoginScreen = ({
|
|
|
62
58
|
style: styles.fill,
|
|
63
59
|
onPress: () => setDemoPressCount((count) => count + 1)
|
|
64
60
|
}
|
|
65
|
-
)), /* @__PURE__ */ React.createElement(View, { style: styles.buttonContainer },
|
|
61
|
+
)), /* @__PURE__ */ React.createElement(View, { style: styles.buttonContainer }, /* @__PURE__ */ React.createElement(ExpoAuthSession.LoginButton, __spreadValues({}, loginButtonProps)), shouldDisplayDemoButton && /* @__PURE__ */ React.createElement(
|
|
66
62
|
Button,
|
|
67
63
|
{
|
|
68
64
|
testID: "demo-button",
|
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export declare const NavigationContainer: <T extends object>(props: import("@react-navigation/native").NavigationContainerProps & {
|
|
4
|
-
theme?: import("@react-navigation/native").Theme | undefined;
|
|
5
|
-
linking?: import("@react-navigation/native").LinkingOptions<T> | undefined;
|
|
6
|
-
fallback?: React.ReactNode;
|
|
7
|
-
documentTitle?: import("@react-navigation/native").DocumentTitleOptions | undefined;
|
|
8
|
-
onReady?: (() => void) | undefined;
|
|
9
|
-
} & {
|
|
10
|
-
ref?: React.Ref<NavigationContainerRef<T>> | undefined;
|
|
11
|
-
} & {
|
|
12
|
-
onRouteChange?: ((currentRoute: string, prevRoute: string | undefined) => void) | undefined;
|
|
13
|
-
} & {
|
|
14
|
-
ref?: React.ForwardedRef<NavigationContainerRef<T>> | undefined;
|
|
15
|
-
}) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
1
|
+
import { NavigationContainer as MadNavigationContainer } from "@equinor/mad-navigation";
|
|
2
|
+
export declare const NavigationContainer: typeof MadNavigationContainer;
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
OfflineBanner
|
|
3
3
|
} from "../chunk-SQL63BYO.js";
|
|
4
4
|
import "../chunk-HZWBAKKL.js";
|
|
5
|
-
import "../chunk-CCVKLLIO.js";
|
|
6
5
|
import "../chunk-HI7H4ACL.js";
|
|
7
6
|
import "../chunk-H73RAAWS.js";
|
|
7
|
+
import "../chunk-CCVKLLIO.js";
|
|
8
8
|
import "../chunk-UZ6YMQV2.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-RBFR3YMY.js";
|
|
10
10
|
import "../chunk-45SUJ4GS.js";
|
|
11
11
|
import "../chunk-MODG2KVN.js";
|
|
12
12
|
import "../chunk-UKAZW3CQ.js";
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ParamListBase } from "@react-navigation/native";
|
|
3
2
|
import { CoreStackParamListBase, MadConfig } from "../types";
|
|
4
3
|
export declare const createStackCoreNavigator: <T extends ParamListBase>(config: MadConfig<T>) => {
|
|
5
4
|
Navigator: (props: Omit<Omit<import("@react-navigation/native").DefaultRouterOptions<string> & {
|
|
6
|
-
id?: string
|
|
7
|
-
children:
|
|
5
|
+
id?: string;
|
|
6
|
+
children: React.ReactNode;
|
|
8
7
|
screenListeners?: Partial<{
|
|
9
8
|
transitionStart: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "transitionStart">;
|
|
10
9
|
transitionEnd: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "transitionEnd">;
|
|
@@ -28,17 +27,14 @@ export declare const createStackCoreNavigator: <T extends ParamListBase>(config:
|
|
|
28
27
|
blur: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "blur">;
|
|
29
28
|
state: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "state">;
|
|
30
29
|
beforeRemove: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "beforeRemove">;
|
|
31
|
-
}>) | undefined;
|
|
32
|
-
*
|
|
33
|
-
* @deprecated This functions is replaced by `createStackCoreNavigator` and `createNativeStackCoreNavigator`. USE `createNativeStackCoreNavigator` IF YOU DON'T WANT BREAKING CHANGES IN YOUR APP
|
|
34
|
-
*/
|
|
30
|
+
}>) | undefined;
|
|
35
31
|
screenOptions?: import("@equinor/mad-navigation/dist/_internal/types").MadNavigationOptions | ((props: {
|
|
36
32
|
route: import("@react-navigation/native").RouteProp<ParamListBase, string>;
|
|
37
33
|
navigation: any;
|
|
38
34
|
}) => import("@equinor/mad-navigation/dist/_internal/types").MadNavigationOptions) | undefined;
|
|
39
35
|
} & import("@react-navigation/native").StackRouterOptions & import("@equinor/mad-navigation").StackNavigationConfig & import("@equinor/mad-navigation/dist/_internal/types").MadCustomFactoryProps, "children" | "id" | "initialRouteName" | "screenListeners" | "screenOptions"> & import("@react-navigation/native").DefaultRouterOptions<keyof CoreStackParamListBase | Extract<keyof T, string>> & {
|
|
40
|
-
id?: string
|
|
41
|
-
children:
|
|
36
|
+
id?: string;
|
|
37
|
+
children: React.ReactNode;
|
|
42
38
|
screenListeners?: Partial<{
|
|
43
39
|
transitionStart: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "transitionStart">;
|
|
44
40
|
transitionEnd: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "transitionEnd">;
|
|
@@ -62,10 +58,7 @@ export declare const createStackCoreNavigator: <T extends ParamListBase>(config:
|
|
|
62
58
|
blur: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "blur">;
|
|
63
59
|
state: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "state">;
|
|
64
60
|
beforeRemove: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/stack").StackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "beforeRemove">;
|
|
65
|
-
}>) | undefined;
|
|
66
|
-
*
|
|
67
|
-
* @deprecated This functions is replaced by `createStackCoreNavigator` and `createNativeStackCoreNavigator`. USE `createNativeStackCoreNavigator` IF YOU DON'T WANT BREAKING CHANGES IN YOUR APP
|
|
68
|
-
*/
|
|
61
|
+
}>) | undefined;
|
|
69
62
|
screenOptions?: import("@equinor/mad-navigation").MadStackNavigationOptions | ((props: {
|
|
70
63
|
route: import("@react-navigation/native").RouteProp<CoreStackParamListBase & T, keyof CoreStackParamListBase | Extract<keyof T, string>>;
|
|
71
64
|
navigation: any;
|
|
@@ -76,8 +69,8 @@ export declare const createStackCoreNavigator: <T extends ParamListBase>(config:
|
|
|
76
69
|
};
|
|
77
70
|
export declare const createNativeStackCoreNavigator: <T extends ParamListBase>(config: MadConfig<T>) => {
|
|
78
71
|
Navigator: (props: Omit<Omit<import("@react-navigation/native").DefaultRouterOptions<string> & {
|
|
79
|
-
id?: string
|
|
80
|
-
children:
|
|
72
|
+
id?: string;
|
|
73
|
+
children: React.ReactNode;
|
|
81
74
|
screenListeners?: Partial<{
|
|
82
75
|
transitionStart: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "transitionStart">;
|
|
83
76
|
transitionEnd: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "transitionEnd">;
|
|
@@ -97,17 +90,14 @@ export declare const createNativeStackCoreNavigator: <T extends ParamListBase>(c
|
|
|
97
90
|
blur: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "blur">;
|
|
98
91
|
state: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "state">;
|
|
99
92
|
beforeRemove: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "beforeRemove">;
|
|
100
|
-
}>) | undefined;
|
|
101
|
-
*
|
|
102
|
-
* @deprecated This functions is replaced by `createStackCoreNavigator` and `createNativeStackCoreNavigator`. USE `createNativeStackCoreNavigator` IF YOU DON'T WANT BREAKING CHANGES IN YOUR APP
|
|
103
|
-
*/
|
|
93
|
+
}>) | undefined;
|
|
104
94
|
screenOptions?: import("@equinor/mad-navigation").MadNativeStackNavigationOptions | ((props: {
|
|
105
95
|
route: import("@react-navigation/native").RouteProp<ParamListBase, string>;
|
|
106
96
|
navigation: any;
|
|
107
97
|
}) => import("@equinor/mad-navigation").MadNativeStackNavigationOptions) | undefined;
|
|
108
98
|
} & import("@react-navigation/native").StackRouterOptions & import("@equinor/mad-navigation/dist/_internal/types").MadCustomFactoryProps, "children" | "id" | "initialRouteName" | "screenListeners" | "screenOptions"> & import("@react-navigation/native").DefaultRouterOptions<keyof CoreStackParamListBase | Extract<keyof T, string>> & {
|
|
109
|
-
id?: string
|
|
110
|
-
children:
|
|
99
|
+
id?: string;
|
|
100
|
+
children: React.ReactNode;
|
|
111
101
|
screenListeners?: Partial<{
|
|
112
102
|
transitionStart: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "transitionStart">;
|
|
113
103
|
transitionEnd: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "transitionEnd">;
|
|
@@ -127,10 +117,7 @@ export declare const createNativeStackCoreNavigator: <T extends ParamListBase>(c
|
|
|
127
117
|
blur: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "blur">;
|
|
128
118
|
state: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "state">;
|
|
129
119
|
beforeRemove: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "beforeRemove">;
|
|
130
|
-
}>) | undefined;
|
|
131
|
-
*
|
|
132
|
-
* @deprecated This functions is replaced by `createStackCoreNavigator` and `createNativeStackCoreNavigator`. USE `createNativeStackCoreNavigator` IF YOU DON'T WANT BREAKING CHANGES IN YOUR APP
|
|
133
|
-
*/
|
|
120
|
+
}>) | undefined;
|
|
134
121
|
screenOptions?: import("@equinor/mad-navigation").MadNativeStackNavigationOptions | ((props: {
|
|
135
122
|
route: import("@react-navigation/native").RouteProp<CoreStackParamListBase & T, keyof CoreStackParamListBase | Extract<keyof T, string>>;
|
|
136
123
|
navigation: any;
|
|
@@ -145,8 +132,8 @@ export declare const createNativeStackCoreNavigator: <T extends ParamListBase>(c
|
|
|
145
132
|
*/
|
|
146
133
|
export declare const createCoreStackNavigator: <T extends ParamListBase>(config: MadConfig<T>) => {
|
|
147
134
|
Navigator: (props: Omit<Omit<import("@react-navigation/native").DefaultRouterOptions<string> & {
|
|
148
|
-
id?: string
|
|
149
|
-
children:
|
|
135
|
+
id?: string;
|
|
136
|
+
children: React.ReactNode;
|
|
150
137
|
screenListeners?: Partial<{
|
|
151
138
|
transitionStart: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "transitionStart">;
|
|
152
139
|
transitionEnd: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "transitionEnd">;
|
|
@@ -166,17 +153,14 @@ export declare const createCoreStackNavigator: <T extends ParamListBase>(config:
|
|
|
166
153
|
blur: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "blur">;
|
|
167
154
|
state: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "state">;
|
|
168
155
|
beforeRemove: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "beforeRemove">;
|
|
169
|
-
}>) | undefined;
|
|
170
|
-
*
|
|
171
|
-
* @deprecated This functions is replaced by `createStackCoreNavigator` and `createNativeStackCoreNavigator`. USE `createNativeStackCoreNavigator` IF YOU DON'T WANT BREAKING CHANGES IN YOUR APP
|
|
172
|
-
*/
|
|
156
|
+
}>) | undefined;
|
|
173
157
|
screenOptions?: import("@equinor/mad-navigation").MadNativeStackNavigationOptions | ((props: {
|
|
174
158
|
route: import("@react-navigation/native").RouteProp<ParamListBase, string>;
|
|
175
159
|
navigation: any;
|
|
176
160
|
}) => import("@equinor/mad-navigation").MadNativeStackNavigationOptions) | undefined;
|
|
177
161
|
} & import("@react-navigation/native").StackRouterOptions & import("@equinor/mad-navigation/dist/_internal/types").MadCustomFactoryProps, "children" | "id" | "initialRouteName" | "screenListeners" | "screenOptions"> & import("@react-navigation/native").DefaultRouterOptions<keyof CoreStackParamListBase | Extract<keyof T, string>> & {
|
|
178
|
-
id?: string
|
|
179
|
-
children:
|
|
162
|
+
id?: string;
|
|
163
|
+
children: React.ReactNode;
|
|
180
164
|
screenListeners?: Partial<{
|
|
181
165
|
transitionStart: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "transitionStart">;
|
|
182
166
|
transitionEnd: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "transitionEnd">;
|
|
@@ -196,10 +180,7 @@ export declare const createCoreStackNavigator: <T extends ParamListBase>(config:
|
|
|
196
180
|
blur: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "blur">;
|
|
197
181
|
state: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "state">;
|
|
198
182
|
beforeRemove: import("@react-navigation/native").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/native").EventMapCore<import("@react-navigation/native").StackNavigationState<ParamListBase>>, "beforeRemove">;
|
|
199
|
-
}>) | undefined;
|
|
200
|
-
*
|
|
201
|
-
* @deprecated This functions is replaced by `createStackCoreNavigator` and `createNativeStackCoreNavigator`. USE `createNativeStackCoreNavigator` IF YOU DON'T WANT BREAKING CHANGES IN YOUR APP
|
|
202
|
-
*/
|
|
183
|
+
}>) | undefined;
|
|
203
184
|
screenOptions?: import("@equinor/mad-navigation").MadNativeStackNavigationOptions | ((props: {
|
|
204
185
|
route: import("@react-navigation/native").RouteProp<CoreStackParamListBase & T, keyof CoreStackParamListBase | Extract<keyof T, string>>;
|
|
205
186
|
navigation: any;
|