@equinor/mad-core 0.0.3 → 0.1.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 +46 -0
- package/dist/chunk-3XUVY5MJ.js +16 -0
- package/dist/chunk-4RNGXNYB.js +61 -0
- package/dist/chunk-5IIGFQQJ.js +44 -0
- package/dist/chunk-5LTGZQUP.js +0 -0
- package/dist/chunk-6GFARWDK.js +30 -0
- package/dist/chunk-6SBQOSWK.js +355 -0
- package/dist/chunk-7SJM4NDH.js +12 -0
- package/dist/chunk-AEGDSD6N.js +10 -0
- package/dist/chunk-AK7PA4BE.js +0 -0
- package/dist/chunk-AM5E5CYS.js +58 -0
- package/dist/chunk-BIMOM43W.js +9 -0
- package/dist/chunk-DCUF7ZWX.js +15 -0
- package/dist/chunk-DOHQX5XC.js +50 -0
- package/dist/chunk-DQ6CWJSW.js +53 -0
- package/dist/{chunk-SDIKBCFE.js → chunk-DTXV5LS2.js} +5 -3
- package/dist/chunk-DWAJZVKH.js +19 -0
- package/dist/chunk-EQYL7INQ.js +22 -0
- package/dist/chunk-GCBWBANV.js +10 -0
- package/dist/{chunk-FQWPBBPB.js → chunk-GSC3O7TW.js} +1 -1
- package/dist/chunk-GUKC6UGZ.js +0 -0
- package/dist/chunk-HGT5ZUYL.js +25 -0
- package/dist/chunk-JPK5SCA5.js +19 -0
- package/dist/chunk-LSEPBTCQ.js +50 -0
- package/dist/chunk-MDOJ2W2G.js +23 -0
- package/dist/chunk-N4V52CSH.js +43 -0
- package/dist/chunk-NLLLEXHT.js +118 -0
- package/dist/chunk-P636GRYJ.js +41 -0
- package/dist/chunk-PBCPR4ZO.js +8 -0
- package/dist/{chunk-AGAXO3NW.js → chunk-QXK5OE27.js} +5 -1
- package/dist/chunk-T3WC3PE2.js +23 -0
- package/dist/chunk-UVQ3Z5PG.js +0 -0
- package/dist/{chunk-FIFUL4JE.js → chunk-V4QL2TIA.js} +20 -4
- package/dist/chunk-VBEIVB4R.js +10 -0
- package/dist/chunk-VXUERD3Z.js +36 -0
- package/dist/{chunk-QU6EUUQS.js → chunk-XR6K2TU2.js} +28 -14
- package/dist/chunk-YY3XXUD6.js +23 -0
- package/dist/components/AnnouncementsProvider.js +2 -2
- package/dist/components/ErrorBoundary.d.ts +3 -0
- package/dist/components/ErrorBoundary.js +7 -0
- package/dist/components/NavigationContainer.d.ts +3 -0
- package/dist/components/NavigationContainer.js +7 -0
- package/dist/components/createCoreStackNavigator.d.ts +7 -7
- package/dist/components/createCoreStackNavigator.js +30 -13
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +55 -15
- package/dist/components/navigation/MadCoreSubHeader.d.ts +2 -0
- package/dist/components/navigation/MadCoreSubHeader.js +7 -0
- package/dist/components/navigation/index.d.ts +1 -0
- package/dist/components/navigation/index.js +11 -0
- package/dist/components/navigation/navigation-creators.d.ts +30 -0
- package/dist/components/navigation/navigation-creators.js +10 -0
- package/dist/components/screens/AboutScreen.d.ts +2 -0
- package/dist/components/screens/AboutScreen.js +7 -0
- package/dist/components/screens/CreateIncidentScreen.d.ts +2 -0
- package/dist/components/screens/CreateIncidentScreen.js +7 -0
- package/dist/components/screens/LoginScreen.js +8 -6
- package/dist/components/screens/language/SelectLanguageScreen.d.ts +2 -0
- package/dist/components/screens/language/SelectLanguageScreen.js +20 -0
- package/dist/components/screens/language/components/SelectLanguageCellGroup.d.ts +7 -0
- package/dist/components/screens/language/components/SelectLanguageCellGroup.js +12 -0
- package/dist/components/screens/release-notes/ChangeLog.d.ts +2 -3
- package/dist/components/screens/release-notes/ChangeLog.js +2 -3
- package/dist/components/screens/release-notes/ReleaseNotesScreen.d.ts +2 -0
- package/dist/components/screens/release-notes/ReleaseNotesScreen.js +22 -0
- package/dist/components/screens/release-notes/WhatsNewScreen.js +14 -8
- package/dist/components/screens/release-notes/fetchReleaseNotes.d.ts +1 -0
- package/dist/components/screens/release-notes/fetchReleaseNotes.js +4 -2
- package/dist/components/screens/settings/Section.d.ts +3 -0
- package/dist/components/screens/settings/Section.js +13 -0
- package/dist/components/screens/settings/SettingsScreen.d.ts +15 -0
- package/dist/components/screens/settings/SettingsScreen.js +22 -0
- package/dist/components/screens/settings/index.d.ts +2 -0
- package/dist/components/screens/settings/index.js +24 -0
- package/dist/components/screens/settings/renderCell.d.ts +5 -0
- package/dist/components/screens/settings/renderCell.js +7 -0
- package/dist/components/screens/settings/types.d.ts +22 -0
- package/dist/components/screens/settings/types.js +1 -0
- package/dist/components/screens/settings/useSignOut.d.ts +1 -0
- package/dist/components/screens/settings/useSignOut.js +10 -0
- package/dist/hooks/UseReleaseNotes.d.ts +6 -0
- package/dist/hooks/UseReleaseNotes.js +17 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +16 -0
- package/dist/hooks/useAccountOrDemoAccount.d.ts +7 -0
- package/dist/hooks/useAccountOrDemoAccount.js +9 -0
- package/dist/hooks/useCoreStackNavigation.d.ts +2 -1
- package/dist/hooks/useCoreStackNavigation.js +6 -4
- package/dist/hooks/useScreenTitleFromDictionary.d.ts +2 -0
- package/dist/hooks/useScreenTitleFromDictionary.js +13 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +68 -15
- package/dist/language/types.d.ts +2 -0
- package/dist/language/types.js +0 -0
- package/dist/language/useDictionary.d.ts +2 -0
- package/dist/language/useDictionary.js +11 -0
- package/dist/store/demo-mode/demo-mode.js +1 -1
- package/dist/store/demo-mode/index.js +1 -1
- package/dist/store/language/index.d.ts +0 -1
- package/dist/store/language/index.js +6 -8
- package/dist/store/language/language.d.ts +3 -2
- package/dist/store/language/language.js +6 -4
- package/dist/store/mad-config/hooks.d.ts +13 -3
- package/dist/store/mad-config/hooks.js +9 -4
- package/dist/store/mad-config/index.js +9 -5
- package/dist/store/mad-config/mad-config.js +1 -1
- package/dist/store/release-notes/index.js +2 -1
- package/dist/store/release-notes/release-notes.js +1 -1
- package/dist/store/storage.js +1 -1
- package/dist/types.d.ts +32 -1
- package/dist/utils/createMadCoreNavigator.d.ts +2 -2
- package/dist/utils/createMadCoreNavigator.js +26 -12
- package/dist/utils/dateUtils.js +1 -1
- package/dist/utils/getFinalSettingsConfig.d.ts +3 -0
- package/dist/utils/getFinalSettingsConfig.js +7 -0
- package/dist/utils/getNavigationRouteForLoginScreen.d.ts +2 -1
- package/dist/utils/getNavigationRouteForLoginScreen.js +8 -2
- package/dist/utils/getNavigationRouteForSelectLanguageScreen.d.ts +2 -0
- package/dist/utils/getNavigationRouteForSelectLanguageScreen.js +7 -0
- package/dist/utils/getNavigationRouteForWhatsNewScreen.d.ts +2 -0
- package/dist/utils/getNavigationRouteForWhatsNewScreen.js +12 -0
- package/dist/utils/getPremadeSettings.d.ts +8 -0
- package/dist/utils/getPremadeSettings.js +7 -0
- package/dist/utils/getRedirectUriFromAuthConfig.d.ts +2 -0
- package/dist/utils/getRedirectUriFromAuthConfig.js +7 -0
- package/dist/utils/madCommonUtils.js +1 -1
- package/package.json +13 -12
- package/dist/chunk-3DI7YERU.js +0 -80
- package/dist/chunk-ICIPJG6P.js +0 -34
- package/dist/chunk-J53YLHKZ.js +0 -15
- package/dist/chunk-JPVO5SH5.js +0 -33
- package/dist/chunk-JRIQBUIT.js +0 -95
- package/dist/chunk-K2H37TUR.js +0 -7
- package/dist/chunk-XYNA7G2L.js +0 -62
- package/dist/store/language/supported-languages.d.ts +0 -11
- package/dist/store/language/supported-languages.js +0 -7
- /package/dist/{chunk-HAB34YS7.js → chunk-2GCLIPZP.js} +0 -0
- /package/dist/{chunk-USETLDR7.js → chunk-5GBNULIT.js} +0 -0
- /package/dist/{chunk-UTXWRAEE.js → chunk-BZK6J33D.js} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { createNativeStackNavigator } from "@equinor/mad-navigation";
|
|
3
2
|
import { ParamListBase } from "@react-navigation/native";
|
|
4
3
|
import { CoreStackParamListBase, MadConfig } from "../types";
|
|
4
|
+
import { createNativeStackNavigator } from "../components/navigation";
|
|
5
5
|
type GeneralFunction = (...args: any) => any;
|
|
6
6
|
type PropsOf<T extends GeneralFunction> = Parameters<T>[0];
|
|
7
7
|
type StackType = ReturnType<typeof createNativeStackNavigator>;
|
|
8
8
|
type NavigatorProps = PropsOf<StackType["Navigator"]>;
|
|
9
|
-
export declare const createMadCoreNavigator: <T extends ParamListBase>(Stack: import("@react-navigation/
|
|
9
|
+
export declare const createMadCoreNavigator: <T extends ParamListBase>(Stack: import("@react-navigation/native").TypedNavigator<T & CoreStackParamListBase, import("@react-navigation/native").StackNavigationState<ParamListBase>, import("@equinor/mad-navigation").MadNativeStackNavigationOptions, import("@react-navigation/native-stack").NativeStackNavigationEventMap, ({ id, initialRouteName, children, screenListeners, screenOptions, customSubHeader, ...rest }: import("@equinor/mad-navigation").NativeStackNavigatorProps) => React.JSX.Element>, config: MadConfig) => (props: Omit<NavigatorProps, "initialRouteName">) => React.JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -1,23 +1,37 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createMadCoreNavigator
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-DQ6CWJSW.js";
|
|
4
|
+
import "../chunk-N4V52CSH.js";
|
|
5
|
+
import "../chunk-JPK5SCA5.js";
|
|
6
|
+
import "../chunk-4RNGXNYB.js";
|
|
7
|
+
import "../chunk-NLLLEXHT.js";
|
|
8
|
+
import "../chunk-AM5E5CYS.js";
|
|
9
|
+
import "../chunk-UVQ3Z5PG.js";
|
|
10
|
+
import "../chunk-VBEIVB4R.js";
|
|
11
|
+
import "../chunk-GCBWBANV.js";
|
|
12
|
+
import "../chunk-XR6K2TU2.js";
|
|
13
|
+
import "../chunk-5BVQKJQB.js";
|
|
7
14
|
import "../chunk-OCWASWDK.js";
|
|
15
|
+
import "../chunk-QXK5OE27.js";
|
|
16
|
+
import "../chunk-AEGDSD6N.js";
|
|
17
|
+
import "../chunk-T3WC3PE2.js";
|
|
18
|
+
import "../chunk-GUKC6UGZ.js";
|
|
19
|
+
import "../chunk-EQYL7INQ.js";
|
|
20
|
+
import "../chunk-MDOJ2W2G.js";
|
|
21
|
+
import "../chunk-BIMOM43W.js";
|
|
22
|
+
import "../chunk-GSC3O7TW.js";
|
|
23
|
+
import "../chunk-5IIGFQQJ.js";
|
|
24
|
+
import "../chunk-6GFARWDK.js";
|
|
25
|
+
import "../chunk-V4QL2TIA.js";
|
|
8
26
|
import "../chunk-RFYZGBU4.js";
|
|
9
|
-
import "../chunk-QU6EUUQS.js";
|
|
10
|
-
import "../chunk-5BVQKJQB.js";
|
|
11
|
-
import "../chunk-AGAXO3NW.js";
|
|
12
27
|
import "../chunk-CCVKLLIO.js";
|
|
13
28
|
import "../chunk-UZ6YMQV2.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-JPVO5SH5.js";
|
|
29
|
+
import "../chunk-6SBQOSWK.js";
|
|
16
30
|
import "../chunk-ZSTTHIEF.js";
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-P636GRYJ.js";
|
|
32
|
+
import "../chunk-DCUF7ZWX.js";
|
|
19
33
|
import "../chunk-2OMVVDBU.js";
|
|
20
|
-
import "../chunk-
|
|
34
|
+
import "../chunk-BZK6J33D.js";
|
|
21
35
|
export {
|
|
22
36
|
createMadCoreNavigator
|
|
23
37
|
};
|
package/dist/utils/dateUtils.js
CHANGED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { SettingsScreenConfiguration } from "../components";
|
|
2
|
+
import { PremadeSettings } from "./getPremadeSettings";
|
|
3
|
+
export declare const getFinalSettingsConfig: (config: SettingsScreenConfiguration, premade: PremadeSettings, clean: boolean) => SettingsScreenConfiguration;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { CoreStackParamListBase } from "../types";
|
|
1
2
|
export type GetNavigationRouteForLoginScreenOptions = {
|
|
2
3
|
appVersion: string;
|
|
3
4
|
lastDisplayedReleaseNotesVersion: string | null;
|
|
4
5
|
isDemoMode?: boolean;
|
|
5
6
|
};
|
|
6
|
-
export type GetNavigationRouteForLoginScreenReturnType =
|
|
7
|
+
export type GetNavigationRouteForLoginScreenReturnType = keyof CoreStackParamListBase;
|
|
7
8
|
export declare const getNavigationRouteForLoginScreen: ({ appVersion, lastDisplayedReleaseNotesVersion, isDemoMode, }: GetNavigationRouteForLoginScreenOptions) => GetNavigationRouteForLoginScreenReturnType;
|
|
8
9
|
export declare const _getNavigationRouteForLoginScreenPure: {};
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
_getNavigationRouteForLoginScreenPure,
|
|
3
3
|
getNavigationRouteForLoginScreen
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-QXK5OE27.js";
|
|
5
|
+
import "../chunk-T3WC3PE2.js";
|
|
6
|
+
import "../chunk-6SBQOSWK.js";
|
|
7
|
+
import "../chunk-ZSTTHIEF.js";
|
|
8
|
+
import "../chunk-P636GRYJ.js";
|
|
9
|
+
import "../chunk-DCUF7ZWX.js";
|
|
10
|
+
import "../chunk-2OMVVDBU.js";
|
|
11
|
+
import "../chunk-BZK6J33D.js";
|
|
6
12
|
export {
|
|
7
13
|
_getNavigationRouteForLoginScreenPure,
|
|
8
14
|
getNavigationRouteForLoginScreen
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getNavigationRouteForWhatsNewScreen
|
|
3
|
+
} from "../chunk-T3WC3PE2.js";
|
|
4
|
+
import "../chunk-6SBQOSWK.js";
|
|
5
|
+
import "../chunk-ZSTTHIEF.js";
|
|
6
|
+
import "../chunk-P636GRYJ.js";
|
|
7
|
+
import "../chunk-DCUF7ZWX.js";
|
|
8
|
+
import "../chunk-2OMVVDBU.js";
|
|
9
|
+
import "../chunk-BZK6J33D.js";
|
|
10
|
+
export {
|
|
11
|
+
getNavigationRouteForWhatsNewScreen
|
|
12
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SettingsScreenSectionProps } from "../components/screens/settings/types";
|
|
2
|
+
import { CoreDictionary } from "../language/types";
|
|
3
|
+
import { MadConfig } from "../types";
|
|
4
|
+
export type PremadeSettings = ReturnType<typeof getPremadeSettings>;
|
|
5
|
+
export declare const getPremadeSettings: (config: MadConfig, dictionary: CoreDictionary) => {
|
|
6
|
+
language: SettingsScreenSectionProps | undefined;
|
|
7
|
+
common: SettingsScreenSectionProps;
|
|
8
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/mad-core",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Core library for the Mobile App Delivery team",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -22,20 +22,20 @@
|
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@react-native-async-storage/async-storage": "*",
|
|
24
24
|
"@react-navigation/native": "^6.1.8",
|
|
25
|
-
"react": ">=
|
|
26
|
-
"react-dom": ">=
|
|
27
|
-
"react-native": ">=0.
|
|
28
|
-
"react-native-msal": "
|
|
25
|
+
"react": ">=18.0",
|
|
26
|
+
"react-dom": ">=18.0",
|
|
27
|
+
"react-native": ">=0.70",
|
|
28
|
+
"react-native-msal": "*"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@react-navigation/elements": "1.3.
|
|
31
|
+
"@react-navigation/elements": "1.3.21",
|
|
32
32
|
"react-native-render-html": "6.3.4",
|
|
33
33
|
"showdown": "2.1.0",
|
|
34
34
|
"zustand": "^4.4.1",
|
|
35
|
-
"@equinor/mad-auth": "0.0
|
|
36
|
-
"@equinor/mad-components": "0.8.
|
|
37
|
-
"@equinor/mad-insights": "0.0
|
|
38
|
-
"@equinor/mad-navigation": "0.
|
|
35
|
+
"@equinor/mad-auth": "0.1.0",
|
|
36
|
+
"@equinor/mad-components": "0.8.2",
|
|
37
|
+
"@equinor/mad-insights": "0.1.0",
|
|
38
|
+
"@equinor/mad-navigation": "0.2.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@babel/core": "^7.21.4",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@testing-library/react-native": "^12.3.0",
|
|
45
45
|
"@types/showdown": "^2.0.0",
|
|
46
46
|
"react-test-renderer": "18.1.0",
|
|
47
|
-
"@equinor/eslint-config-mad": "0.
|
|
47
|
+
"@equinor/eslint-config-mad": "0.3.0"
|
|
48
48
|
},
|
|
49
49
|
"files": [
|
|
50
50
|
"CODE_OF_CONDUCT.md",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"build": "tsup-node && echo '\n ⚙️ Generating typescript declarations..' && tsc --project tsconfig.json --emitDeclarationOnly --declaration",
|
|
57
57
|
"test": "jest",
|
|
58
58
|
"dev": "tsup-node --watch --clean=false",
|
|
59
|
-
"lint": "eslint src/"
|
|
59
|
+
"lint": "eslint src/",
|
|
60
|
+
"clean": "rm -rf node_modules/ && rm -rf dist/"
|
|
60
61
|
}
|
|
61
62
|
}
|
package/dist/chunk-3DI7YERU.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getShortDate
|
|
3
|
-
} from "./chunk-OCWASWDK.js";
|
|
4
|
-
|
|
5
|
-
// src/components/screens/release-notes/ChangeLog.tsx
|
|
6
|
-
import React, { useState } from "react";
|
|
7
|
-
import { View, ScrollView, StyleSheet } from "react-native";
|
|
8
|
-
import RenderHtml, { defaultSystemFonts } from "react-native-render-html";
|
|
9
|
-
import * as showdown from "showdown";
|
|
10
|
-
import { Typography, Button } from "@equinor/mad-components";
|
|
11
|
-
var featureTitle = "What's new";
|
|
12
|
-
var affirmText = "OK";
|
|
13
|
-
var converter = new showdown.Converter();
|
|
14
|
-
var systemFonts = [...defaultSystemFonts, "Equinor-Regular", "Equinor-Medium"];
|
|
15
|
-
var ChangeLog = ({ release, onPressAffirm }) => {
|
|
16
|
-
const [width, setWidth] = useState(0);
|
|
17
|
-
const html = { html: converter.makeHtml(release.releaseNote) };
|
|
18
|
-
const date = new Date(release.releaseDate);
|
|
19
|
-
const shortDate = getShortDate(date);
|
|
20
|
-
return /* @__PURE__ */ React.createElement(View, { style: styles.container }, /* @__PURE__ */ React.createElement(Typography, { style: styles.titleHeader, variant: "h4" }, featureTitle), /* @__PURE__ */ React.createElement(ScrollView, { style: styles.changelogItem }, /* @__PURE__ */ React.createElement(Typography, { style: styles.versionHeader }, release.version), /* @__PURE__ */ React.createElement(Typography, { style: styles.subtitleHeader }, shortDate), /* @__PURE__ */ React.createElement(
|
|
21
|
-
View,
|
|
22
|
-
{
|
|
23
|
-
onLayout: (event) => {
|
|
24
|
-
const { width: width2 } = event.nativeEvent.layout;
|
|
25
|
-
setWidth(width2);
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
/* @__PURE__ */ React.createElement(
|
|
29
|
-
RenderHtml,
|
|
30
|
-
{
|
|
31
|
-
contentWidth: width,
|
|
32
|
-
source: html,
|
|
33
|
-
systemFonts,
|
|
34
|
-
tagsStyles: {
|
|
35
|
-
li: {
|
|
36
|
-
marginBottom: 10,
|
|
37
|
-
fontFamily: "Equinor-Medium",
|
|
38
|
-
fontSize: 18,
|
|
39
|
-
color: "#333333"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
)
|
|
44
|
-
)), /* @__PURE__ */ React.createElement(View, { style: styles.footer }, /* @__PURE__ */ React.createElement(Button, { title: affirmText, onPress: onPressAffirm })));
|
|
45
|
-
};
|
|
46
|
-
var styles = StyleSheet.create({
|
|
47
|
-
container: {
|
|
48
|
-
flex: 1,
|
|
49
|
-
paddingTop: 50,
|
|
50
|
-
justifyContent: "center"
|
|
51
|
-
},
|
|
52
|
-
titleHeader: {
|
|
53
|
-
marginVertical: 15
|
|
54
|
-
},
|
|
55
|
-
changelogItem: {
|
|
56
|
-
marginBottom: 15,
|
|
57
|
-
marginTop: 20,
|
|
58
|
-
paddingHorizontal: 20
|
|
59
|
-
},
|
|
60
|
-
versionHeader: {
|
|
61
|
-
marginVertical: 15
|
|
62
|
-
},
|
|
63
|
-
subtitleHeader: {
|
|
64
|
-
fontSize: 18,
|
|
65
|
-
marginVertical: 5,
|
|
66
|
-
color: "#333333"
|
|
67
|
-
},
|
|
68
|
-
footer: {
|
|
69
|
-
height: 80,
|
|
70
|
-
flexDirection: "row",
|
|
71
|
-
alignItems: "center",
|
|
72
|
-
justifyContent: "center",
|
|
73
|
-
borderColor: "#808080",
|
|
74
|
-
borderTopWidth: 0.5
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
export {
|
|
79
|
-
ChangeLog
|
|
80
|
-
};
|
package/dist/chunk-ICIPJG6P.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
WhatsNewScreen
|
|
3
|
-
} from "./chunk-JRIQBUIT.js";
|
|
4
|
-
import {
|
|
5
|
-
LoginScreen
|
|
6
|
-
} from "./chunk-QU6EUUQS.js";
|
|
7
|
-
import {
|
|
8
|
-
AnnouncementsProvider
|
|
9
|
-
} from "./chunk-FQWPBBPB.js";
|
|
10
|
-
import {
|
|
11
|
-
__spreadProps,
|
|
12
|
-
__spreadValues
|
|
13
|
-
} from "./chunk-UTXWRAEE.js";
|
|
14
|
-
|
|
15
|
-
// src/utils/createMadCoreNavigator.tsx
|
|
16
|
-
import React from "react";
|
|
17
|
-
import { EnvironmentProvider } from "@equinor/mad-navigation";
|
|
18
|
-
var createMadCoreNavigator = (Stack, config) => {
|
|
19
|
-
const MadCoreNavigator = (props) => {
|
|
20
|
-
return /* @__PURE__ */ React.createElement(EnvironmentProvider, { environment: config.environment }, /* @__PURE__ */ React.createElement(AnnouncementsProvider, null, /* @__PURE__ */ React.createElement(Stack.Navigator, __spreadProps(__spreadValues({}, props), { initialRouteName: "Login" }), /* @__PURE__ */ React.createElement(
|
|
21
|
-
Stack.Screen,
|
|
22
|
-
{
|
|
23
|
-
name: "Login",
|
|
24
|
-
component: LoginScreen,
|
|
25
|
-
options: { headerShown: false, environmentBannerShown: true }
|
|
26
|
-
}
|
|
27
|
-
), /* @__PURE__ */ React.createElement(Stack.Screen, { name: "WhatsNew", component: WhatsNewScreen }), props.children)));
|
|
28
|
-
};
|
|
29
|
-
return MadCoreNavigator;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export {
|
|
33
|
-
createMadCoreNavigator
|
|
34
|
-
};
|
package/dist/chunk-J53YLHKZ.js
DELETED
package/dist/chunk-JPVO5SH5.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useMadConfig
|
|
3
|
-
} from "./chunk-ZSTTHIEF.js";
|
|
4
|
-
|
|
5
|
-
// src/store/mad-config/hooks.ts
|
|
6
|
-
var useAuthConfig = () => {
|
|
7
|
-
const config = useMadConfig();
|
|
8
|
-
return config.authentication;
|
|
9
|
-
};
|
|
10
|
-
var useLoginScreenConfig = () => {
|
|
11
|
-
const config = useMadConfig();
|
|
12
|
-
return config.login;
|
|
13
|
-
};
|
|
14
|
-
var useAppVersion = () => {
|
|
15
|
-
const config = useMadConfig();
|
|
16
|
-
return config.appVersion;
|
|
17
|
-
};
|
|
18
|
-
var useEnvironment = () => {
|
|
19
|
-
const config = useMadConfig();
|
|
20
|
-
return config.environment;
|
|
21
|
-
};
|
|
22
|
-
var useServicePortalName = () => {
|
|
23
|
-
const config = useMadConfig();
|
|
24
|
-
return config.servicePortalName;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export {
|
|
28
|
-
useAuthConfig,
|
|
29
|
-
useLoginScreenConfig,
|
|
30
|
-
useAppVersion,
|
|
31
|
-
useEnvironment,
|
|
32
|
-
useServicePortalName
|
|
33
|
-
};
|
package/dist/chunk-JRIQBUIT.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
fetchReleaseNotes
|
|
3
|
-
} from "./chunk-FIFUL4JE.js";
|
|
4
|
-
import {
|
|
5
|
-
ChangeLog
|
|
6
|
-
} from "./chunk-3DI7YERU.js";
|
|
7
|
-
import {
|
|
8
|
-
useReleaseNotesVersion
|
|
9
|
-
} from "./chunk-5BVQKJQB.js";
|
|
10
|
-
import {
|
|
11
|
-
useDemoMode
|
|
12
|
-
} from "./chunk-UZ6YMQV2.js";
|
|
13
|
-
import {
|
|
14
|
-
useAppVersion,
|
|
15
|
-
useEnvironment,
|
|
16
|
-
useServicePortalName
|
|
17
|
-
} from "./chunk-JPVO5SH5.js";
|
|
18
|
-
import {
|
|
19
|
-
useCoreStackNavigation
|
|
20
|
-
} from "./chunk-K2H37TUR.js";
|
|
21
|
-
import {
|
|
22
|
-
__export
|
|
23
|
-
} from "./chunk-UTXWRAEE.js";
|
|
24
|
-
|
|
25
|
-
// src/components/screens/release-notes/WhatsNewScreen.tsx
|
|
26
|
-
import React, { useEffect, useState } from "react";
|
|
27
|
-
|
|
28
|
-
// src/static/mock-data/whats-new.json
|
|
29
|
-
var whats_new_exports = {};
|
|
30
|
-
__export(whats_new_exports, {
|
|
31
|
-
app: () => app,
|
|
32
|
-
default: () => whats_new_default,
|
|
33
|
-
modified: () => modified,
|
|
34
|
-
releaseDate: () => releaseDate,
|
|
35
|
-
releaseNote: () => releaseNote,
|
|
36
|
-
version: () => version
|
|
37
|
-
});
|
|
38
|
-
var app = "App name";
|
|
39
|
-
var version = "1.1.0";
|
|
40
|
-
var modified = "2022-12-09T07:04:55+0000";
|
|
41
|
-
var releaseNote = "- Minor bug fixes";
|
|
42
|
-
var releaseDate = "2022-12-09T07:04:55+0000";
|
|
43
|
-
var whats_new_default = {
|
|
44
|
-
app,
|
|
45
|
-
version,
|
|
46
|
-
modified,
|
|
47
|
-
releaseNote,
|
|
48
|
-
releaseDate
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
// src/components/screens/release-notes/WhatsNewScreen.tsx
|
|
52
|
-
import { CircularProgress } from "@equinor/mad-components";
|
|
53
|
-
var WhatsNewScreen = () => {
|
|
54
|
-
const environment = useEnvironment();
|
|
55
|
-
const releaseNotesVersion = useReleaseNotesVersion();
|
|
56
|
-
const servicePortalName = useServicePortalName();
|
|
57
|
-
const navigation = useCoreStackNavigation();
|
|
58
|
-
const demoMode = useDemoMode();
|
|
59
|
-
const appVersion = useAppVersion();
|
|
60
|
-
const [release, setRelease] = useState(null);
|
|
61
|
-
const [error, setError] = useState("");
|
|
62
|
-
const [isFetching, setIsFetching] = useState(true);
|
|
63
|
-
const enableIsFetching = () => setIsFetching(true);
|
|
64
|
-
const disableIsFetching = () => setIsFetching(false);
|
|
65
|
-
const navigate = () => navigation.navigate("Root");
|
|
66
|
-
useEffect(() => {
|
|
67
|
-
enableIsFetching();
|
|
68
|
-
if (demoMode.isEnabled) {
|
|
69
|
-
setRelease(whats_new_exports);
|
|
70
|
-
disableIsFetching();
|
|
71
|
-
} else {
|
|
72
|
-
fetchReleaseNotes(environment, servicePortalName, appVersion).then(setRelease).catch(setError).finally(disableIsFetching);
|
|
73
|
-
}
|
|
74
|
-
}, [demoMode.isEnabled, environment, servicePortalName, appVersion]);
|
|
75
|
-
if (error || !isFetching && !release) {
|
|
76
|
-
navigate();
|
|
77
|
-
}
|
|
78
|
-
if (!release) {
|
|
79
|
-
return /* @__PURE__ */ React.createElement(CircularProgress, null);
|
|
80
|
-
}
|
|
81
|
-
return /* @__PURE__ */ React.createElement(
|
|
82
|
-
ChangeLog,
|
|
83
|
-
{
|
|
84
|
-
release,
|
|
85
|
-
onPressAffirm: () => {
|
|
86
|
-
releaseNotesVersion.setLastDisplayedReleaseNotesVersion(appVersion);
|
|
87
|
-
navigate();
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export {
|
|
94
|
-
WhatsNewScreen
|
|
95
|
-
};
|
package/dist/chunk-K2H37TUR.js
DELETED
package/dist/chunk-XYNA7G2L.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getConfig
|
|
3
|
-
} from "./chunk-ZSTTHIEF.js";
|
|
4
|
-
import {
|
|
5
|
-
createStorage
|
|
6
|
-
} from "./chunk-2OMVVDBU.js";
|
|
7
|
-
|
|
8
|
-
// src/store/language/language.ts
|
|
9
|
-
import { create } from "zustand";
|
|
10
|
-
import { devtools, persist } from "zustand/middleware";
|
|
11
|
-
var getSupportedLanguages = () => getConfig().language.supportedLanguages;
|
|
12
|
-
var getDefaultLanguage = () => {
|
|
13
|
-
const supportedLanguages = getSupportedLanguages();
|
|
14
|
-
const defaultLanguageCode = getConfig().language.defaultLanguageCode;
|
|
15
|
-
if (supportedLanguages.length === 0)
|
|
16
|
-
throw new Error("There are no supported languages");
|
|
17
|
-
if (!defaultLanguageCode)
|
|
18
|
-
return supportedLanguages[0];
|
|
19
|
-
const defaultLanguage = supportedLanguages.find(
|
|
20
|
-
(language) => language.code === defaultLanguageCode
|
|
21
|
-
);
|
|
22
|
-
if (!defaultLanguage)
|
|
23
|
-
throw new Error("defaultLanguageCode was not found within supported languages");
|
|
24
|
-
return defaultLanguage;
|
|
25
|
-
};
|
|
26
|
-
var useLanguageStore = create()(
|
|
27
|
-
devtools(
|
|
28
|
-
persist(
|
|
29
|
-
(set, get) => ({
|
|
30
|
-
selectedLanguage: null,
|
|
31
|
-
setSelectedLanguage: (code) => {
|
|
32
|
-
const supportedLanguages = getSupportedLanguages();
|
|
33
|
-
set(() => ({
|
|
34
|
-
selectedLanguage: supportedLanguages.find((language) => language.code === code) || null
|
|
35
|
-
}));
|
|
36
|
-
},
|
|
37
|
-
getLanguage: () => {
|
|
38
|
-
const { selectedLanguage } = get();
|
|
39
|
-
return selectedLanguage || getDefaultLanguage();
|
|
40
|
-
}
|
|
41
|
-
}),
|
|
42
|
-
{
|
|
43
|
-
name: "language",
|
|
44
|
-
storage: createStorage()
|
|
45
|
-
}
|
|
46
|
-
),
|
|
47
|
-
{ name: "core/language" }
|
|
48
|
-
)
|
|
49
|
-
);
|
|
50
|
-
var useLanguage = () => {
|
|
51
|
-
const store = useLanguageStore();
|
|
52
|
-
const language = store.getLanguage();
|
|
53
|
-
const { setSelectedLanguage: setSelectedLanguage2 } = store;
|
|
54
|
-
return { language, getDefaultLanguage, setSelectedLanguage: setSelectedLanguage2, getSupportedLanguages };
|
|
55
|
-
};
|
|
56
|
-
var { getLanguage, setSelectedLanguage } = useLanguageStore.getState();
|
|
57
|
-
|
|
58
|
-
export {
|
|
59
|
-
useLanguage,
|
|
60
|
-
getLanguage,
|
|
61
|
-
setSelectedLanguage
|
|
62
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Supported languages for the core package
|
|
3
|
-
*/
|
|
4
|
-
export declare const CORE_SUPPORTED_LANGUAGES: readonly [{
|
|
5
|
-
readonly code: "en";
|
|
6
|
-
readonly name: "English";
|
|
7
|
-
}, {
|
|
8
|
-
readonly code: "nb";
|
|
9
|
-
readonly name: "Norwegian";
|
|
10
|
-
}];
|
|
11
|
-
export type SupportedLanguageCode = (typeof CORE_SUPPORTED_LANGUAGES)[number]["code"];
|
|
File without changes
|
|
File without changes
|
|
File without changes
|