@equinor/mad-core 0.10.2 → 0.11.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 +27 -0
- package/dist/chunk-4DFNW2IQ.js +98 -0
- package/dist/{chunk-LDHADSAI.js → chunk-5GNZJDSE.js} +2 -2
- package/dist/chunk-6LMMRQYQ.js +25 -0
- package/dist/{chunk-WP22W6IZ.js → chunk-7FO6SNUK.js} +1 -1
- package/dist/{chunk-4ZZKAQ7C.js → chunk-7HGZLLNX.js} +1 -1
- package/dist/chunk-BDKB5ELS.js +37 -0
- package/dist/{chunk-HN6FG72A.js → chunk-DIITQCRW.js} +1 -1
- package/dist/{chunk-UV3M2SNJ.js → chunk-DJMBVNB6.js} +2 -2
- package/dist/{chunk-6JEPMDC4.js → chunk-EOM477VC.js} +1 -1
- package/dist/{chunk-C5PTOP7U.js → chunk-F2IUXOBD.js} +6 -6
- package/dist/{chunk-SDKRNZRS.js → chunk-GARGEDTG.js} +1 -1
- package/dist/{chunk-2EBLJCZH.js → chunk-GEEFQMRN.js} +1 -1
- package/dist/{chunk-OZJ2PBO6.js → chunk-HH5WS6OQ.js} +4 -4
- package/dist/{chunk-ADBVMDRF.js → chunk-IHCNAGT7.js} +1 -1
- package/dist/{chunk-5TKF6KQO.js → chunk-JGQUMXF3.js} +8 -6
- package/dist/{chunk-CXXCHRHS.js → chunk-KEH6NBFE.js} +1 -1
- package/dist/{chunk-PWORULZD.js → chunk-PB3TI2RT.js} +1 -1
- package/dist/chunk-PP74MP4O.js +16 -0
- package/dist/{chunk-IWTCXKE2.js → chunk-SMWK2VYY.js} +2 -2
- package/dist/{chunk-4J43OC2B.js → chunk-STKI44UB.js} +4 -4
- package/dist/{chunk-Q4SX3UP3.js → chunk-SVBUWW4H.js} +1 -1
- package/dist/{chunk-6A7XY5VK.js → chunk-TWUGCMPQ.js} +2 -2
- package/dist/{chunk-5BWKCV3H.js → chunk-U5IJVQDO.js} +1 -1
- package/dist/chunk-W5OWK2YM.js +41 -0
- package/dist/{chunk-46UQWICK.js → chunk-WDZF2C5R.js} +1 -1
- package/dist/{chunk-3DWMQWGO.js → chunk-WQTC5TXE.js} +1 -1
- package/dist/{chunk-VWR2AFO7.js → chunk-WWF7QKDX.js} +1 -1
- package/dist/{chunk-7JHIDQQ7.js → chunk-YB3XJPRA.js} +6 -3
- package/dist/{chunk-7FBCK6I4.js → chunk-ZAJCJP22.js} +6 -2
- package/dist/{chunk-DC5ASEDD.js → chunk-ZIV7DVBA.js} +2 -2
- package/dist/components/CoreNavigatorTypeProvider.d.ts +8 -0
- package/dist/components/CoreNavigatorTypeProvider.js +9 -0
- package/dist/components/EnvironmentBanner.js +3 -3
- package/dist/components/EnvironmentProvider.js +3 -3
- package/dist/components/ToastEmitter.js +12 -3
- package/dist/components/createCoreStackNavigator.d.ts +153 -5
- package/dist/components/createCoreStackNavigator.js +36 -31
- package/dist/components/index.js +48 -41
- package/dist/components/navigation/MadCoreSubHeader.js +9 -8
- package/dist/components/navigation/index.js +14 -11
- package/dist/components/navigation/navigation-creators.d.ts +1 -0
- package/dist/components/navigation/navigation-creators.js +14 -11
- package/dist/components/screens/AboutScreen.js +4 -3
- package/dist/components/screens/LoginScreen.js +4 -4
- package/dist/components/screens/create-incident/CreateIncidentScreen.js +4 -4
- package/dist/components/screens/language/SelectLanguageScreen.js +6 -6
- package/dist/components/screens/language/components/SelectLanguageCellGroup.js +3 -3
- package/dist/components/screens/release-notes/ReleaseNotesScreen.js +6 -6
- package/dist/components/screens/release-notes/WhatsNewScreen.js +6 -6
- package/dist/components/screens/release-notes/fetchReleaseNotes.js +3 -3
- package/dist/components/screens/settings/Section.js +3 -3
- package/dist/components/screens/settings/SettingsScreen.js +6 -6
- package/dist/components/screens/settings/index.js +7 -7
- package/dist/components/screens/settings/useSignOut.js +4 -4
- package/dist/components/service-message/ServiceMessageBanner.js +7 -6
- package/dist/components/service-message/ServiceMessageProvider.js +4 -4
- package/dist/components/service-message/components/SwipeItem.d.ts +10 -0
- package/dist/components/service-message/components/SwipeItem.js +7 -0
- package/dist/components/service-message/hooks/useFetchServiceMessage.js +3 -3
- package/dist/hooks/UseReleaseNotes.js +4 -4
- package/dist/hooks/index.js +3 -3
- package/dist/hooks/useAccountOrDemoAccount.js +3 -3
- package/dist/hooks/useNavigateFromLanguageSelectScreen.js +3 -3
- package/dist/hooks/useNavigateFromLoginScreen.js +3 -3
- package/dist/hooks/useNavigateFromWhatsNewScreen.js +3 -3
- package/dist/hooks/useScreenTitleFromDictionary.js +3 -3
- package/dist/index.js +48 -41
- package/dist/language/useDictionary.js +2 -2
- package/dist/store/index.js +2 -2
- package/dist/store/language/index.js +2 -2
- package/dist/store/language/language.js +2 -2
- package/dist/store/mad-config/hooks.js +2 -2
- package/dist/store/mad-config/index.js +2 -2
- package/dist/store/mad-config/mad-config.js +2 -2
- package/dist/utils/MadCoreProviders.d.ts +9 -0
- package/dist/utils/MadCoreProviders.js +17 -0
- package/dist/utils/createEnvironmentProxy.js +2 -2
- package/dist/utils/createMadCoreNavigator.d.ts +119 -8
- package/dist/utils/createMadCoreNavigator.js +26 -24
- package/dist/utils/getDefaultScreenOptionsForLoginScreen.d.ts +4 -2
- package/dist/utils/initiateAuthenticationClient.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-DEVBLCRV.js +0 -17
- package/dist/chunk-LRACCJE4.js +0 -29
- package/dist/chunk-NE7MJB3C.js +0 -88
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @equinor/mad-core
|
|
2
2
|
|
|
3
|
+
## 0.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- e340f08: BREAKING: replace `createCoreStackNavigator` with
|
|
8
|
+
`createStackCoreNavigator`/`createNativeStackCoreNavigator`. Under the hood they use
|
|
9
|
+
`createStackNavigator`/`createNativeStackNavigator` respectively. If you don't want any breaking
|
|
10
|
+
changes in your app, migrate `createCoreStackNavigator` to `createNativeStackCoreNavigator`. The
|
|
11
|
+
stack-type you use is displayed in the about-screen.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [e340f08]
|
|
16
|
+
- @equinor/mad-navigation@0.5.0
|
|
17
|
+
|
|
18
|
+
## 0.10.3
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- e643db4: the "Remove" button on the service message now works again
|
|
23
|
+
- Updated dependencies [ac10e64]
|
|
24
|
+
- Updated dependencies [e643db4]
|
|
25
|
+
- @equinor/mad-navigation@0.4.1
|
|
26
|
+
- @equinor/mad-components@0.19.0
|
|
27
|
+
- @equinor/mad-auth@0.2.12
|
|
28
|
+
- @equinor/mad-toast@0.2.3
|
|
29
|
+
|
|
3
30
|
## 0.10.2
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SelectLanguageScreen
|
|
3
|
+
} from "./chunk-STKI44UB.js";
|
|
4
|
+
import {
|
|
5
|
+
ReleaseNotesScreen
|
|
6
|
+
} from "./chunk-TWUGCMPQ.js";
|
|
7
|
+
import {
|
|
8
|
+
WhatsNewScreen
|
|
9
|
+
} from "./chunk-F2IUXOBD.js";
|
|
10
|
+
import {
|
|
11
|
+
CreateIncidentScreen
|
|
12
|
+
} from "./chunk-ZIV7DVBA.js";
|
|
13
|
+
import {
|
|
14
|
+
AboutScreen
|
|
15
|
+
} from "./chunk-ZAJCJP22.js";
|
|
16
|
+
import {
|
|
17
|
+
LoginScreen
|
|
18
|
+
} from "./chunk-5GNZJDSE.js";
|
|
19
|
+
import {
|
|
20
|
+
getDefaultScreenOptionsForLoginScreen
|
|
21
|
+
} from "./chunk-RGJ4RWVB.js";
|
|
22
|
+
import {
|
|
23
|
+
MadCoreProviders
|
|
24
|
+
} from "./chunk-6LMMRQYQ.js";
|
|
25
|
+
import {
|
|
26
|
+
useMadConfig
|
|
27
|
+
} from "./chunk-GEEFQMRN.js";
|
|
28
|
+
import {
|
|
29
|
+
CoreRoutes
|
|
30
|
+
} from "./chunk-UKAZW3CQ.js";
|
|
31
|
+
import {
|
|
32
|
+
__spreadProps,
|
|
33
|
+
__spreadValues
|
|
34
|
+
} from "./chunk-CWMXXUWU.js";
|
|
35
|
+
|
|
36
|
+
// src/utils/createMadCoreNavigator.tsx
|
|
37
|
+
import React from "react";
|
|
38
|
+
var createMadCoreNativeStackNavigator = (Stack) => {
|
|
39
|
+
function MadCoreNavigator(props) {
|
|
40
|
+
const config = useMadConfig();
|
|
41
|
+
if (!config) return null;
|
|
42
|
+
return /* @__PURE__ */ React.createElement(MadCoreProviders, { config, type: "native-stack" }, /* @__PURE__ */ React.createElement(Stack.Navigator, __spreadProps(__spreadValues({}, props), { initialRouteName: CoreRoutes.LOGIN }), config.login.addScreenManually !== true && /* @__PURE__ */ React.createElement(
|
|
43
|
+
Stack.Screen,
|
|
44
|
+
{
|
|
45
|
+
name: CoreRoutes.LOGIN,
|
|
46
|
+
component: LoginScreen,
|
|
47
|
+
options: getDefaultScreenOptionsForLoginScreen()
|
|
48
|
+
}
|
|
49
|
+
), /* @__PURE__ */ React.createElement(Stack.Screen, { name: CoreRoutes.RELEASE_NOTES, component: ReleaseNotesScreen }), /* @__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(Stack.Screen, { name: CoreRoutes.FEEDBACK, component: CreateIncidentScreen }), config.language.supportedLanguages.length > 1 && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
50
|
+
Stack.Screen,
|
|
51
|
+
{
|
|
52
|
+
name: CoreRoutes.SELECT_LANGUAGE,
|
|
53
|
+
component: SelectLanguageScreen
|
|
54
|
+
}
|
|
55
|
+
), /* @__PURE__ */ React.createElement(
|
|
56
|
+
Stack.Screen,
|
|
57
|
+
{
|
|
58
|
+
name: CoreRoutes.SELECT_LANGUAGE_ONBOARDING,
|
|
59
|
+
component: SelectLanguageScreen,
|
|
60
|
+
options: { headerBackVisible: false }
|
|
61
|
+
}
|
|
62
|
+
)), props.children));
|
|
63
|
+
}
|
|
64
|
+
return MadCoreNavigator;
|
|
65
|
+
};
|
|
66
|
+
var createMadCoreStackNavigator = (Stack) => {
|
|
67
|
+
function MadCoreNavigator(props) {
|
|
68
|
+
const config = useMadConfig();
|
|
69
|
+
if (!config) return null;
|
|
70
|
+
return /* @__PURE__ */ React.createElement(MadCoreProviders, { config, type: "stack" }, /* @__PURE__ */ React.createElement(Stack.Navigator, __spreadProps(__spreadValues({}, props), { initialRouteName: CoreRoutes.LOGIN }), config.login.addScreenManually !== true && /* @__PURE__ */ React.createElement(
|
|
71
|
+
Stack.Screen,
|
|
72
|
+
{
|
|
73
|
+
name: CoreRoutes.LOGIN,
|
|
74
|
+
component: LoginScreen,
|
|
75
|
+
options: getDefaultScreenOptionsForLoginScreen()
|
|
76
|
+
}
|
|
77
|
+
), /* @__PURE__ */ React.createElement(Stack.Screen, { name: CoreRoutes.RELEASE_NOTES, component: ReleaseNotesScreen }), /* @__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(Stack.Screen, { name: CoreRoutes.FEEDBACK, component: CreateIncidentScreen }), config.language.supportedLanguages.length > 1 && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
78
|
+
Stack.Screen,
|
|
79
|
+
{
|
|
80
|
+
name: CoreRoutes.SELECT_LANGUAGE,
|
|
81
|
+
component: SelectLanguageScreen
|
|
82
|
+
}
|
|
83
|
+
), /* @__PURE__ */ React.createElement(
|
|
84
|
+
Stack.Screen,
|
|
85
|
+
{
|
|
86
|
+
name: CoreRoutes.SELECT_LANGUAGE_ONBOARDING,
|
|
87
|
+
component: SelectLanguageScreen,
|
|
88
|
+
options: { headerLeft: () => null }
|
|
89
|
+
}
|
|
90
|
+
)), props.children));
|
|
91
|
+
}
|
|
92
|
+
return MadCoreNavigator;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export {
|
|
96
|
+
createMadCoreNativeStackNavigator,
|
|
97
|
+
createMadCoreStackNavigator
|
|
98
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useNavigateFromLoginScreen
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GARGEDTG.js";
|
|
4
4
|
import {
|
|
5
5
|
getConfig,
|
|
6
6
|
useAuthConfig,
|
|
7
7
|
useDictionary,
|
|
8
8
|
useLoginScreenConfig
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GEEFQMRN.js";
|
|
10
10
|
import {
|
|
11
11
|
__spreadProps,
|
|
12
12
|
__spreadValues
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ServiceMessageProvider
|
|
3
|
+
} from "./chunk-DIITQCRW.js";
|
|
4
|
+
import {
|
|
5
|
+
CoreNavigatorTypeProvider
|
|
6
|
+
} from "./chunk-PP74MP4O.js";
|
|
7
|
+
import {
|
|
8
|
+
EnvironmentProvider
|
|
9
|
+
} from "./chunk-7HGZLLNX.js";
|
|
10
|
+
|
|
11
|
+
// src/utils/MadCoreProviders.tsx
|
|
12
|
+
import React from "react";
|
|
13
|
+
import { AppInsightsInitializer } from "@equinor/mad-insights";
|
|
14
|
+
import { ToastEmitter } from "@equinor/mad-toast";
|
|
15
|
+
var MadCoreProviders = ({
|
|
16
|
+
config,
|
|
17
|
+
type,
|
|
18
|
+
children
|
|
19
|
+
}) => {
|
|
20
|
+
return /* @__PURE__ */ React.createElement(AppInsightsInitializer, { config: config.applicationInsights }, /* @__PURE__ */ React.createElement(CoreNavigatorTypeProvider, { type }, /* @__PURE__ */ React.createElement(EnvironmentProvider, null, /* @__PURE__ */ React.createElement(ServiceMessageProvider, null, children, /* @__PURE__ */ React.createElement(ToastEmitter, null)))));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export {
|
|
24
|
+
MadCoreProviders
|
|
25
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// src/components/service-message/components/SwipeItem.tsx
|
|
2
|
+
import { EDSStyleSheet, Icon, PressableHighlight, Typography, useStyles } from "@equinor/mad-components";
|
|
3
|
+
import React from "react";
|
|
4
|
+
var SwipeItem = ({
|
|
5
|
+
title,
|
|
6
|
+
iconName,
|
|
7
|
+
color,
|
|
8
|
+
onPress
|
|
9
|
+
}) => {
|
|
10
|
+
const styles = useStyles(themeStyles, { color });
|
|
11
|
+
return /* @__PURE__ */ React.createElement(
|
|
12
|
+
PressableHighlight,
|
|
13
|
+
{
|
|
14
|
+
style: styles.container,
|
|
15
|
+
onPress
|
|
16
|
+
},
|
|
17
|
+
iconName && /* @__PURE__ */ React.createElement(Icon, { name: iconName, style: styles.textStyle, size: title ? void 0 : 28 }),
|
|
18
|
+
title && /* @__PURE__ */ React.createElement(Typography, { group: "interactive", variant: "button", style: styles.textStyle }, title)
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
var themeStyles = EDSStyleSheet.create((theme, props) => ({
|
|
22
|
+
container: {
|
|
23
|
+
flexDirection: "row",
|
|
24
|
+
alignItems: "center",
|
|
25
|
+
gap: theme.spacing.button.iconGap,
|
|
26
|
+
backgroundColor: props.color ? theme.colors.interactive[props.color] : theme.colors.interactive.primary,
|
|
27
|
+
paddingHorizontal: theme.spacing.element.paddingHorizontal,
|
|
28
|
+
paddingVertical: theme.spacing.element.paddingVertical
|
|
29
|
+
},
|
|
30
|
+
textStyle: {
|
|
31
|
+
color: theme.colors.text.primaryInverted
|
|
32
|
+
}
|
|
33
|
+
}));
|
|
34
|
+
|
|
35
|
+
export {
|
|
36
|
+
SwipeItem
|
|
37
|
+
};
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-4DXH3SPN.js";
|
|
4
4
|
import {
|
|
5
5
|
fetchAllReleaseNotes
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7FO6SNUK.js";
|
|
7
7
|
import {
|
|
8
8
|
useDemoMode
|
|
9
9
|
} from "./chunk-UZ6YMQV2.js";
|
|
10
10
|
import {
|
|
11
11
|
useEnvironment,
|
|
12
12
|
useServicePortalName
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GEEFQMRN.js";
|
|
14
14
|
|
|
15
15
|
// src/hooks/UseReleaseNotes.tsx
|
|
16
16
|
import { useEffect, useMemo, useState } from "react";
|
|
@@ -4,21 +4,21 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
getShortDate
|
|
6
6
|
} from "./chunk-OCWASWDK.js";
|
|
7
|
+
import {
|
|
8
|
+
useNavigateFromWhatsNewScreen
|
|
9
|
+
} from "./chunk-EOM477VC.js";
|
|
7
10
|
import {
|
|
8
11
|
useScreenTitleFromDictionary
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-U5IJVQDO.js";
|
|
10
13
|
import {
|
|
11
14
|
whats_new_exports
|
|
12
15
|
} from "./chunk-4DXH3SPN.js";
|
|
13
16
|
import {
|
|
14
17
|
fetchReleaseNotes
|
|
15
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-7FO6SNUK.js";
|
|
16
19
|
import {
|
|
17
20
|
useReleaseNotesVersion
|
|
18
21
|
} from "./chunk-5BVQKJQB.js";
|
|
19
|
-
import {
|
|
20
|
-
useNavigateFromWhatsNewScreen
|
|
21
|
-
} from "./chunk-6JEPMDC4.js";
|
|
22
22
|
import {
|
|
23
23
|
useDemoMode
|
|
24
24
|
} from "./chunk-UZ6YMQV2.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
useAppVersion,
|
|
27
27
|
useEnvironment,
|
|
28
28
|
useServicePortalName
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-GEEFQMRN.js";
|
|
30
30
|
import {
|
|
31
31
|
__spreadProps,
|
|
32
32
|
__spreadValues
|
|
@@ -30,7 +30,7 @@ var useMadConfigStore = create()(
|
|
|
30
30
|
{ name: "core/config" }
|
|
31
31
|
)
|
|
32
32
|
);
|
|
33
|
-
var MAD_CONFIG_NOT_FOUND_ERROR = "Mad config has not been provided! Make sure you use '
|
|
33
|
+
var MAD_CONFIG_NOT_FOUND_ERROR = "Mad config has not been provided! Make sure you use 'createNativeStackCoreNavigator'/'createStackCoreNavigator' to provide your config";
|
|
34
34
|
var useMadConfig = () => {
|
|
35
35
|
const config = useMadConfigStore().config;
|
|
36
36
|
if (!config) throw new Error(MAD_CONFIG_NOT_FOUND_ERROR);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useSignOut
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WQTC5TXE.js";
|
|
4
4
|
import {
|
|
5
5
|
SettingsSection
|
|
6
6
|
} from "./chunk-YKLMUKP4.js";
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
} from "./chunk-QLL6LKDN.js";
|
|
10
10
|
import {
|
|
11
11
|
useScreenTitleFromDictionary
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-U5IJVQDO.js";
|
|
13
13
|
import {
|
|
14
14
|
useAccountOrDemoAccount
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WWF7QKDX.js";
|
|
16
16
|
import {
|
|
17
17
|
useDictionary,
|
|
18
18
|
useSettingsScreenPremadeConfig
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GEEFQMRN.js";
|
|
20
20
|
import {
|
|
21
21
|
__spreadValues
|
|
22
22
|
} from "./chunk-CWMXXUWU.js";
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveMessageFromServiceMessage
|
|
3
|
+
} from "./chunk-SHKOH7MA.js";
|
|
1
4
|
import {
|
|
2
5
|
DisableableSwipeable
|
|
3
6
|
} from "./chunk-XJX4HQF2.js";
|
|
@@ -5,11 +8,11 @@ import {
|
|
|
5
8
|
ExpansionToggle
|
|
6
9
|
} from "./chunk-YWPELSTX.js";
|
|
7
10
|
import {
|
|
8
|
-
|
|
9
|
-
} from "./chunk-
|
|
11
|
+
SwipeItem
|
|
12
|
+
} from "./chunk-BDKB5ELS.js";
|
|
10
13
|
import {
|
|
11
14
|
useServiceMessageState
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-DIITQCRW.js";
|
|
13
16
|
import {
|
|
14
17
|
__spreadProps,
|
|
15
18
|
__spreadValues
|
|
@@ -22,8 +25,7 @@ import {
|
|
|
22
25
|
EDSStyleSheet,
|
|
23
26
|
PressableHighlight,
|
|
24
27
|
Typography,
|
|
25
|
-
useStyles
|
|
26
|
-
CellSwipeItem
|
|
28
|
+
useStyles
|
|
27
29
|
} from "@equinor/mad-components";
|
|
28
30
|
var ServiceMessageBanner = () => {
|
|
29
31
|
const styles = useStyles(theme);
|
|
@@ -50,7 +52,7 @@ var ServiceMessageBanner = () => {
|
|
|
50
52
|
{
|
|
51
53
|
disabled: !dismissAndURLIsVisible,
|
|
52
54
|
renderRightActions: () => /* @__PURE__ */ React.createElement(
|
|
53
|
-
|
|
55
|
+
SwipeItem,
|
|
54
56
|
{
|
|
55
57
|
title: "Remove",
|
|
56
58
|
iconName: "close",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/components/CoreNavigatorTypeProvider.tsx
|
|
2
|
+
import React, { createContext, useContext } from "react";
|
|
3
|
+
var CoreNavigatorTypeContext = createContext(null);
|
|
4
|
+
var CoreNavigatorTypeProvider = ({ type, children }) => {
|
|
5
|
+
return /* @__PURE__ */ React.createElement(CoreNavigatorTypeContext.Provider, { value: type }, children);
|
|
6
|
+
};
|
|
7
|
+
var useCoreNavigatorType = () => {
|
|
8
|
+
const coreNavigatorType = useContext(CoreNavigatorTypeContext);
|
|
9
|
+
if (!coreNavigatorType) throw new Error("Could not find core navigator type. You have most likely not added a core navigator to your application");
|
|
10
|
+
return coreNavigatorType;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
CoreNavigatorTypeProvider,
|
|
15
|
+
useCoreNavigatorType
|
|
16
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ServiceMessageBanner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JGQUMXF3.js";
|
|
4
4
|
import {
|
|
5
5
|
EnvironmentBanner
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PB3TI2RT.js";
|
|
7
7
|
|
|
8
8
|
// src/components/navigation/MadCoreSubHeader.tsx
|
|
9
9
|
import React from "react";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SelectLanguageCellGroup
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KEH6NBFE.js";
|
|
4
4
|
import {
|
|
5
5
|
useScreenTitleFromDictionary
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-U5IJVQDO.js";
|
|
7
7
|
import {
|
|
8
8
|
useNavigateFromLanguageSelectScreen
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IHCNAGT7.js";
|
|
10
10
|
import {
|
|
11
11
|
useDictionary,
|
|
12
12
|
useLanguage
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GEEFQMRN.js";
|
|
14
14
|
|
|
15
15
|
// src/components/screens/language/SelectLanguageScreen.tsx
|
|
16
16
|
import React, { useState } from "react";
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
} from "./chunk-OCWASWDK.js";
|
|
7
7
|
import {
|
|
8
8
|
useScreenTitleFromDictionary
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-U5IJVQDO.js";
|
|
10
10
|
import {
|
|
11
11
|
useReleaseNotes
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DJMBVNB6.js";
|
|
13
13
|
|
|
14
14
|
// src/components/screens/release-notes/ReleaseNotesScreen.tsx
|
|
15
15
|
import React from "react";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {
|
|
2
|
+
initiateAuthenticationClient
|
|
3
|
+
} from "./chunk-WDZF2C5R.js";
|
|
4
|
+
import {
|
|
5
|
+
createNativeStackNavigator,
|
|
6
|
+
createStackNavigator
|
|
7
|
+
} from "./chunk-YB3XJPRA.js";
|
|
8
|
+
import {
|
|
9
|
+
createMadCoreNativeStackNavigator,
|
|
10
|
+
createMadCoreStackNavigator
|
|
11
|
+
} from "./chunk-4DFNW2IQ.js";
|
|
12
|
+
import {
|
|
13
|
+
setConfig
|
|
14
|
+
} from "./chunk-GEEFQMRN.js";
|
|
15
|
+
import {
|
|
16
|
+
__spreadProps,
|
|
17
|
+
__spreadValues
|
|
18
|
+
} from "./chunk-CWMXXUWU.js";
|
|
19
|
+
|
|
20
|
+
// src/components/createCoreStackNavigator.tsx
|
|
21
|
+
var createStackCoreNavigator = (config) => {
|
|
22
|
+
setConfig(config);
|
|
23
|
+
initiateAuthenticationClient();
|
|
24
|
+
const Stack = createStackNavigator();
|
|
25
|
+
const Navigator = createMadCoreStackNavigator(Stack);
|
|
26
|
+
return __spreadProps(__spreadValues({}, Stack), { Navigator });
|
|
27
|
+
};
|
|
28
|
+
var createNativeStackCoreNavigator = (config) => {
|
|
29
|
+
setConfig(config);
|
|
30
|
+
initiateAuthenticationClient();
|
|
31
|
+
const Stack = createNativeStackNavigator();
|
|
32
|
+
const Navigator = createMadCoreNativeStackNavigator(Stack);
|
|
33
|
+
return __spreadProps(__spreadValues({}, Stack), { Navigator });
|
|
34
|
+
};
|
|
35
|
+
var createCoreStackNavigator = (config) => createNativeStackCoreNavigator(config);
|
|
36
|
+
|
|
37
|
+
export {
|
|
38
|
+
createStackCoreNavigator,
|
|
39
|
+
createNativeStackCoreNavigator,
|
|
40
|
+
createCoreStackNavigator
|
|
41
|
+
};
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MadCoreSubHeader
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SMWK2VYY.js";
|
|
4
4
|
|
|
5
5
|
// src/components/navigation/navigation-creators.ts
|
|
6
6
|
import {
|
|
7
7
|
createBottomTabNavigatorFactory,
|
|
8
|
-
createNativeStackNavigatorFactory
|
|
8
|
+
createNativeStackNavigatorFactory,
|
|
9
|
+
createStackNavigatorFactory
|
|
9
10
|
} from "@equinor/mad-navigation";
|
|
10
11
|
var createBottomTabNavigator = createBottomTabNavigatorFactory(MadCoreSubHeader);
|
|
11
12
|
var createNativeStackNavigator = createNativeStackNavigatorFactory(MadCoreSubHeader);
|
|
13
|
+
var createStackNavigator = createStackNavigatorFactory(MadCoreSubHeader);
|
|
12
14
|
|
|
13
15
|
export {
|
|
14
16
|
createBottomTabNavigator,
|
|
15
|
-
createNativeStackNavigator
|
|
17
|
+
createNativeStackNavigator,
|
|
18
|
+
createStackNavigator
|
|
16
19
|
};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getMadCommonBaseUrl
|
|
3
3
|
} from "./chunk-ZB37EIZB.js";
|
|
4
|
+
import {
|
|
5
|
+
useCoreNavigatorType
|
|
6
|
+
} from "./chunk-PP74MP4O.js";
|
|
4
7
|
import {
|
|
5
8
|
useAbout,
|
|
6
9
|
useAppVersion,
|
|
7
10
|
useEnvironment,
|
|
8
11
|
useExperimentalFeatures
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-GEEFQMRN.js";
|
|
10
13
|
|
|
11
14
|
// src/components/screens/AboutScreen.tsx
|
|
12
15
|
import React from "react";
|
|
@@ -19,6 +22,7 @@ var AboutScreen = () => {
|
|
|
19
22
|
const environmentName = environment.charAt(0).toUpperCase() + environment.slice(1);
|
|
20
23
|
const appVersion = useAppVersion();
|
|
21
24
|
const about = useAbout();
|
|
25
|
+
const coreNavigatorType = useCoreNavigatorType();
|
|
22
26
|
const experimentalFeatures = useExperimentalFeatures();
|
|
23
27
|
const authenticationMethod = (experimentalFeatures == null ? void 0 : experimentalFeatures.useExpoAuthSession) ? "Expo" : "MSAL";
|
|
24
28
|
const endpoints = [getMadCommonBaseUrl(environment)].concat((_a = about == null ? void 0 : about.endpoints) != null ? _a : []);
|
|
@@ -28,7 +32,7 @@ var AboutScreen = () => {
|
|
|
28
32
|
contentInsetAdjustmentBehavior: "automatic",
|
|
29
33
|
contentContainerStyle: styles.contentContainer
|
|
30
34
|
},
|
|
31
|
-
/* @__PURE__ */ React.createElement(Cell, null, /* @__PURE__ */ React.createElement(View, { style: styles.cellContainer }, /* @__PURE__ */ React.createElement(Typography, { variant: "h2" }, "Client"), /* @__PURE__ */ React.createElement(View, { style: styles.rowContainer }, /* @__PURE__ */ React.createElement(View, { style: styles.columnContainer }, /* @__PURE__ */ React.createElement(Typography, null, "Configuration"), /* @__PURE__ */ React.createElement(Typography, null, "BuildNr"), /* @__PURE__ */ React.createElement(Typography, null, "App version"), /* @__PURE__ */ React.createElement(Typography, null, "Authentication")), /* @__PURE__ */ React.createElement(View, { style: styles.columnContainer }, /* @__PURE__ */ React.createElement(Typography, null, environmentName), /* @__PURE__ */ React.createElement(Typography, null, about == null ? void 0 : about.buildNumber), /* @__PURE__ */ React.createElement(Typography, null, appVersion), /* @__PURE__ */ React.createElement(Typography, null, authenticationMethod))))),
|
|
35
|
+
/* @__PURE__ */ React.createElement(Cell, null, /* @__PURE__ */ React.createElement(View, { style: styles.cellContainer }, /* @__PURE__ */ React.createElement(Typography, { variant: "h2" }, "Client"), /* @__PURE__ */ React.createElement(View, { style: styles.rowContainer }, /* @__PURE__ */ React.createElement(View, { style: styles.columnContainer }, /* @__PURE__ */ React.createElement(Typography, null, "Configuration"), /* @__PURE__ */ React.createElement(Typography, null, "BuildNr"), /* @__PURE__ */ React.createElement(Typography, null, "App version"), /* @__PURE__ */ React.createElement(Typography, null, "Authentication"), /* @__PURE__ */ React.createElement(Typography, null, "Core navigator type")), /* @__PURE__ */ React.createElement(View, { style: styles.columnContainer }, /* @__PURE__ */ React.createElement(Typography, null, environmentName), /* @__PURE__ */ React.createElement(Typography, null, about == null ? void 0 : about.buildNumber), /* @__PURE__ */ React.createElement(Typography, null, appVersion), /* @__PURE__ */ React.createElement(Typography, null, authenticationMethod), /* @__PURE__ */ React.createElement(Typography, null, coreNavigatorType))))),
|
|
32
36
|
/* @__PURE__ */ React.createElement(Cell, null, /* @__PURE__ */ React.createElement(View, { style: styles.cellContainer }, /* @__PURE__ */ React.createElement(Typography, { variant: "h2" }, "Api"), /* @__PURE__ */ React.createElement(View, { style: styles.columnContainer }, /* @__PURE__ */ React.createElement(Typography, null, "Endpoints"), /* @__PURE__ */ React.createElement(View, null, endpoints.map((endpoint) => /* @__PURE__ */ React.createElement(Typography, { key: endpoint }, endpoint))))))
|
|
33
37
|
);
|
|
34
38
|
};
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
} from "./chunk-NJ5W3O5I.js";
|
|
7
7
|
import {
|
|
8
8
|
useAccountOrDemoAccount
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WWF7QKDX.js";
|
|
10
10
|
import {
|
|
11
11
|
useEnvironment,
|
|
12
12
|
useServiceNow
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GEEFQMRN.js";
|
|
14
14
|
|
|
15
15
|
// src/components/screens/create-incident/CreateIncidentScreen.tsx
|
|
16
16
|
import {
|