@equinor/mad-core 0.0.2
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 +14 -0
- package/CODE_OF_CONDUCT.md +49 -0
- package/LICENSE +21 -0
- package/README.md +3 -0
- package/dist/chunk-2OMVVDBU.js +8 -0
- package/dist/chunk-3DI7YERU.js +80 -0
- package/dist/chunk-5BVQKJQB.js +31 -0
- package/dist/chunk-6F4PWJZI.js +0 -0
- package/dist/chunk-AGAXO3NW.js +18 -0
- package/dist/chunk-CCVKLLIO.js +0 -0
- package/dist/chunk-FIFUL4JE.js +29 -0
- package/dist/chunk-FQWPBBPB.js +21 -0
- package/dist/chunk-HAB34YS7.js +0 -0
- package/dist/chunk-ICIPJG6P.js +34 -0
- package/dist/chunk-J53YLHKZ.js +15 -0
- package/dist/chunk-JPVO5SH5.js +33 -0
- package/dist/chunk-JRIQBUIT.js +95 -0
- package/dist/chunk-K2H37TUR.js +7 -0
- package/dist/chunk-OCWASWDK.js +11 -0
- package/dist/chunk-QU6EUUQS.js +79 -0
- package/dist/chunk-RFYZGBU4.js +14 -0
- package/dist/chunk-SDIKBCFE.js +23 -0
- package/dist/chunk-USETLDR7.js +0 -0
- package/dist/chunk-UTXWRAEE.js +50 -0
- package/dist/chunk-UZ6YMQV2.js +25 -0
- package/dist/chunk-XYNA7G2L.js +62 -0
- package/dist/chunk-ZSTTHIEF.js +34 -0
- package/dist/components/AnnouncementsProvider.d.ts +2 -0
- package/dist/components/AnnouncementsProvider.js +7 -0
- package/dist/components/createCoreStackNavigator.d.ts +57 -0
- package/dist/components/createCoreStackNavigator.js +24 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +25 -0
- package/dist/components/screens/LoginScreen.d.ts +2 -0
- package/dist/components/screens/LoginScreen.js +16 -0
- package/dist/components/screens/release-notes/ChangeLog.d.ts +14 -0
- package/dist/components/screens/release-notes/ChangeLog.js +8 -0
- package/dist/components/screens/release-notes/WhatsNewScreen.d.ts +5 -0
- package/dist/components/screens/release-notes/WhatsNewScreen.js +19 -0
- package/dist/components/screens/release-notes/fetchReleaseNotes.d.ts +3 -0
- package/dist/components/screens/release-notes/fetchReleaseNotes.js +8 -0
- package/dist/hooks/useCoreStackNavigation.d.ts +3 -0
- package/dist/hooks/useCoreStackNavigation.js +7 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +26 -0
- package/dist/store/demo-mode/demo-mode.d.ts +9 -0
- package/dist/store/demo-mode/demo-mode.js +13 -0
- package/dist/store/demo-mode/index.d.ts +1 -0
- package/dist/store/demo-mode/index.js +14 -0
- package/dist/store/language/index.d.ts +2 -0
- package/dist/store/language/index.js +19 -0
- package/dist/store/language/language.d.ts +39 -0
- package/dist/store/language/language.js +15 -0
- package/dist/store/language/supported-languages.d.ts +11 -0
- package/dist/store/language/supported-languages.js +7 -0
- package/dist/store/mad-config/hooks.d.ts +12 -0
- package/dist/store/mad-config/hooks.js +16 -0
- package/dist/store/mad-config/index.d.ts +2 -0
- package/dist/store/mad-config/index.js +24 -0
- package/dist/store/mad-config/mad-config.d.ts +4 -0
- package/dist/store/mad-config/mad-config.js +11 -0
- package/dist/store/release-notes/index.d.ts +1 -0
- package/dist/store/release-notes/index.js +8 -0
- package/dist/store/release-notes/release-notes.d.ts +8 -0
- package/dist/store/release-notes/release-notes.js +12 -0
- package/dist/store/storage.d.ts +1 -0
- package/dist/store/storage.js +7 -0
- package/dist/store/types.d.ts +10 -0
- package/dist/store/types.js +0 -0
- package/dist/types.d.ts +72 -0
- package/dist/types.js +1 -0
- package/dist/utils/createMadCoreNavigator.d.ts +10 -0
- package/dist/utils/createMadCoreNavigator.js +23 -0
- package/dist/utils/dateUtils.d.ts +1 -0
- package/dist/utils/dateUtils.js +7 -0
- package/dist/utils/getNavigationRouteForLoginScreen.d.ts +8 -0
- package/dist/utils/getNavigationRouteForLoginScreen.js +9 -0
- package/dist/utils/madCommonUtils.d.ts +3 -0
- package/dist/utils/madCommonUtils.js +9 -0
- package/package.json +61 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// src/store/demo-mode/demo-mode.ts
|
|
2
|
+
import { create } from "zustand";
|
|
3
|
+
import { devtools } from "zustand/middleware";
|
|
4
|
+
var useDemoModeStore = create()(
|
|
5
|
+
devtools(
|
|
6
|
+
(set) => ({
|
|
7
|
+
isEnabled: false,
|
|
8
|
+
enableDemoMode: () => set(() => ({ isEnabled: true })),
|
|
9
|
+
disableDemoMode: () => set(() => ({ isEnabled: false }))
|
|
10
|
+
}),
|
|
11
|
+
{ name: "core/demo-mode" }
|
|
12
|
+
)
|
|
13
|
+
);
|
|
14
|
+
var useDemoMode = () => {
|
|
15
|
+
return useDemoModeStore();
|
|
16
|
+
};
|
|
17
|
+
var getIsDemoModeEnabled = () => useDemoModeStore.getState().isEnabled;
|
|
18
|
+
var { enableDemoMode, disableDemoMode } = useDemoModeStore.getState();
|
|
19
|
+
|
|
20
|
+
export {
|
|
21
|
+
useDemoMode,
|
|
22
|
+
getIsDemoModeEnabled,
|
|
23
|
+
enableDemoMode,
|
|
24
|
+
disableDemoMode
|
|
25
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// src/store/mad-config/mad-config.ts
|
|
2
|
+
import { create } from "zustand";
|
|
3
|
+
import { devtools } from "zustand/middleware";
|
|
4
|
+
var useMadConfigStore = create()(
|
|
5
|
+
devtools(
|
|
6
|
+
(set) => ({
|
|
7
|
+
config: null,
|
|
8
|
+
setConfig: (config) => set(() => ({ config }))
|
|
9
|
+
}),
|
|
10
|
+
{ name: "core/config" }
|
|
11
|
+
)
|
|
12
|
+
);
|
|
13
|
+
var MAD_CONFIG_NOT_FOUND_ERROR = "Mad config has not been provided! Make sure you use 'createCoreStackNavigator' to provide your config";
|
|
14
|
+
var useMadConfig = () => {
|
|
15
|
+
const config = useMadConfigStore().config;
|
|
16
|
+
if (!config)
|
|
17
|
+
throw new Error(MAD_CONFIG_NOT_FOUND_ERROR);
|
|
18
|
+
return config;
|
|
19
|
+
};
|
|
20
|
+
var getConfig = () => {
|
|
21
|
+
const config = useMadConfigStore.getState().config;
|
|
22
|
+
if (!config)
|
|
23
|
+
throw new Error(MAD_CONFIG_NOT_FOUND_ERROR);
|
|
24
|
+
return config;
|
|
25
|
+
};
|
|
26
|
+
var setConfig = (config) => {
|
|
27
|
+
useMadConfigStore.getState().setConfig(config);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
useMadConfig,
|
|
32
|
+
getConfig,
|
|
33
|
+
setConfig
|
|
34
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CoreStackParamListBase, MadConfig } from "../types";
|
|
3
|
+
export declare const createCoreStackNavigator: (config: MadConfig) => {
|
|
4
|
+
Navigator: (props: Omit<Omit<import("@react-navigation/routers").DefaultRouterOptions<string> & {
|
|
5
|
+
id?: string;
|
|
6
|
+
children: import("react").ReactNode;
|
|
7
|
+
screenListeners?: Partial<{
|
|
8
|
+
transitionStart: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "transitionStart">;
|
|
9
|
+
transitionEnd: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "transitionEnd">;
|
|
10
|
+
focus: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "focus">;
|
|
11
|
+
blur: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "blur">;
|
|
12
|
+
state: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "state">;
|
|
13
|
+
beforeRemove: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "beforeRemove">;
|
|
14
|
+
}> | ((props: {
|
|
15
|
+
route: import("@react-navigation/core").RouteProp<import("@react-navigation/routers").ParamListBase, string>;
|
|
16
|
+
navigation: any;
|
|
17
|
+
}) => Partial<{
|
|
18
|
+
transitionStart: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "transitionStart">;
|
|
19
|
+
transitionEnd: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "transitionEnd">;
|
|
20
|
+
focus: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "focus">;
|
|
21
|
+
blur: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "blur">;
|
|
22
|
+
state: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "state">;
|
|
23
|
+
beforeRemove: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "beforeRemove">;
|
|
24
|
+
}>);
|
|
25
|
+
screenOptions?: import("@equinor/mad-navigation").MadNativeStackNavigationOptions | ((props: {
|
|
26
|
+
route: import("@react-navigation/core").RouteProp<import("@react-navigation/routers").ParamListBase, string>;
|
|
27
|
+
navigation: any;
|
|
28
|
+
}) => import("@equinor/mad-navigation").MadNativeStackNavigationOptions);
|
|
29
|
+
} & import("@react-navigation/routers").StackRouterOptions, "children" | "id" | "initialRouteName" | "screenListeners" | "screenOptions"> & import("@react-navigation/routers").DefaultRouterOptions<string> & {
|
|
30
|
+
id?: string;
|
|
31
|
+
children: import("react").ReactNode;
|
|
32
|
+
screenListeners?: Partial<{
|
|
33
|
+
transitionStart: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "transitionStart">;
|
|
34
|
+
transitionEnd: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "transitionEnd">;
|
|
35
|
+
focus: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "focus">;
|
|
36
|
+
blur: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "blur">;
|
|
37
|
+
state: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "state">;
|
|
38
|
+
beforeRemove: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "beforeRemove">;
|
|
39
|
+
}> | ((props: {
|
|
40
|
+
route: import("@react-navigation/core").RouteProp<import("@react-navigation/routers").ParamListBase, string>;
|
|
41
|
+
navigation: any;
|
|
42
|
+
}) => Partial<{
|
|
43
|
+
transitionStart: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "transitionStart">;
|
|
44
|
+
transitionEnd: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "transitionEnd">;
|
|
45
|
+
focus: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "focus">;
|
|
46
|
+
blur: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "blur">;
|
|
47
|
+
state: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "state">;
|
|
48
|
+
beforeRemove: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap, "beforeRemove">;
|
|
49
|
+
}>);
|
|
50
|
+
screenOptions?: import("@equinor/mad-navigation").MadNativeStackNavigationOptions | ((props: {
|
|
51
|
+
route: import("@react-navigation/core").RouteProp<import("@react-navigation/routers").ParamListBase, string>;
|
|
52
|
+
navigation: any;
|
|
53
|
+
}) => import("@equinor/mad-navigation").MadNativeStackNavigationOptions);
|
|
54
|
+
}, "initialRouteName">) => import("react").JSX.Element;
|
|
55
|
+
Group: import("react").ComponentType<import("@react-navigation/core").RouteGroupConfig<CoreStackParamListBase, import("@equinor/mad-navigation").MadNativeStackNavigationOptions>>;
|
|
56
|
+
Screen: <RouteName extends keyof CoreStackParamListBase>(_: import("@react-navigation/core").RouteConfig<CoreStackParamListBase, RouteName, import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>, import("@equinor/mad-navigation").MadNativeStackNavigationOptions, import("@react-navigation/native-stack").NativeStackNavigationEventMap>) => null;
|
|
57
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createCoreStackNavigator
|
|
3
|
+
} from "../chunk-SDIKBCFE.js";
|
|
4
|
+
import "../chunk-ICIPJG6P.js";
|
|
5
|
+
import "../chunk-JRIQBUIT.js";
|
|
6
|
+
import "../chunk-FIFUL4JE.js";
|
|
7
|
+
import "../chunk-3DI7YERU.js";
|
|
8
|
+
import "../chunk-OCWASWDK.js";
|
|
9
|
+
import "../chunk-RFYZGBU4.js";
|
|
10
|
+
import "../chunk-QU6EUUQS.js";
|
|
11
|
+
import "../chunk-5BVQKJQB.js";
|
|
12
|
+
import "../chunk-AGAXO3NW.js";
|
|
13
|
+
import "../chunk-CCVKLLIO.js";
|
|
14
|
+
import "../chunk-UZ6YMQV2.js";
|
|
15
|
+
import "../chunk-USETLDR7.js";
|
|
16
|
+
import "../chunk-JPVO5SH5.js";
|
|
17
|
+
import "../chunk-ZSTTHIEF.js";
|
|
18
|
+
import "../chunk-FQWPBBPB.js";
|
|
19
|
+
import "../chunk-K2H37TUR.js";
|
|
20
|
+
import "../chunk-2OMVVDBU.js";
|
|
21
|
+
import "../chunk-UTXWRAEE.js";
|
|
22
|
+
export {
|
|
23
|
+
createCoreStackNavigator
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./createCoreStackNavigator";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import "../chunk-HAB34YS7.js";
|
|
2
|
+
import {
|
|
3
|
+
createCoreStackNavigator
|
|
4
|
+
} from "../chunk-SDIKBCFE.js";
|
|
5
|
+
import "../chunk-ICIPJG6P.js";
|
|
6
|
+
import "../chunk-JRIQBUIT.js";
|
|
7
|
+
import "../chunk-FIFUL4JE.js";
|
|
8
|
+
import "../chunk-3DI7YERU.js";
|
|
9
|
+
import "../chunk-OCWASWDK.js";
|
|
10
|
+
import "../chunk-RFYZGBU4.js";
|
|
11
|
+
import "../chunk-QU6EUUQS.js";
|
|
12
|
+
import "../chunk-5BVQKJQB.js";
|
|
13
|
+
import "../chunk-AGAXO3NW.js";
|
|
14
|
+
import "../chunk-CCVKLLIO.js";
|
|
15
|
+
import "../chunk-UZ6YMQV2.js";
|
|
16
|
+
import "../chunk-USETLDR7.js";
|
|
17
|
+
import "../chunk-JPVO5SH5.js";
|
|
18
|
+
import "../chunk-ZSTTHIEF.js";
|
|
19
|
+
import "../chunk-FQWPBBPB.js";
|
|
20
|
+
import "../chunk-K2H37TUR.js";
|
|
21
|
+
import "../chunk-2OMVVDBU.js";
|
|
22
|
+
import "../chunk-UTXWRAEE.js";
|
|
23
|
+
export {
|
|
24
|
+
createCoreStackNavigator
|
|
25
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
LoginScreen
|
|
3
|
+
} from "../../chunk-QU6EUUQS.js";
|
|
4
|
+
import "../../chunk-5BVQKJQB.js";
|
|
5
|
+
import "../../chunk-AGAXO3NW.js";
|
|
6
|
+
import "../../chunk-CCVKLLIO.js";
|
|
7
|
+
import "../../chunk-UZ6YMQV2.js";
|
|
8
|
+
import "../../chunk-USETLDR7.js";
|
|
9
|
+
import "../../chunk-JPVO5SH5.js";
|
|
10
|
+
import "../../chunk-ZSTTHIEF.js";
|
|
11
|
+
import "../../chunk-K2H37TUR.js";
|
|
12
|
+
import "../../chunk-2OMVVDBU.js";
|
|
13
|
+
import "../../chunk-UTXWRAEE.js";
|
|
14
|
+
export {
|
|
15
|
+
LoginScreen
|
|
16
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type Release = {
|
|
3
|
+
app: string;
|
|
4
|
+
version: string;
|
|
5
|
+
modified: string;
|
|
6
|
+
releaseNote: string;
|
|
7
|
+
releaseDate: string;
|
|
8
|
+
};
|
|
9
|
+
type ChangelogProps = {
|
|
10
|
+
release: Release;
|
|
11
|
+
onPressAffirm: () => void;
|
|
12
|
+
};
|
|
13
|
+
export declare const ChangeLog: ({ release, onPressAffirm }: ChangelogProps) => React.JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
WhatsNewScreen
|
|
3
|
+
} from "../../../chunk-JRIQBUIT.js";
|
|
4
|
+
import "../../../chunk-FIFUL4JE.js";
|
|
5
|
+
import "../../../chunk-3DI7YERU.js";
|
|
6
|
+
import "../../../chunk-OCWASWDK.js";
|
|
7
|
+
import "../../../chunk-RFYZGBU4.js";
|
|
8
|
+
import "../../../chunk-5BVQKJQB.js";
|
|
9
|
+
import "../../../chunk-CCVKLLIO.js";
|
|
10
|
+
import "../../../chunk-UZ6YMQV2.js";
|
|
11
|
+
import "../../../chunk-USETLDR7.js";
|
|
12
|
+
import "../../../chunk-JPVO5SH5.js";
|
|
13
|
+
import "../../../chunk-ZSTTHIEF.js";
|
|
14
|
+
import "../../../chunk-K2H37TUR.js";
|
|
15
|
+
import "../../../chunk-2OMVVDBU.js";
|
|
16
|
+
import "../../../chunk-UTXWRAEE.js";
|
|
17
|
+
export {
|
|
18
|
+
WhatsNewScreen
|
|
19
|
+
};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import "./chunk-6F4PWJZI.js";
|
|
2
|
+
import "./chunk-HAB34YS7.js";
|
|
3
|
+
import {
|
|
4
|
+
createCoreStackNavigator
|
|
5
|
+
} from "./chunk-SDIKBCFE.js";
|
|
6
|
+
import "./chunk-ICIPJG6P.js";
|
|
7
|
+
import "./chunk-JRIQBUIT.js";
|
|
8
|
+
import "./chunk-FIFUL4JE.js";
|
|
9
|
+
import "./chunk-3DI7YERU.js";
|
|
10
|
+
import "./chunk-OCWASWDK.js";
|
|
11
|
+
import "./chunk-RFYZGBU4.js";
|
|
12
|
+
import "./chunk-QU6EUUQS.js";
|
|
13
|
+
import "./chunk-5BVQKJQB.js";
|
|
14
|
+
import "./chunk-AGAXO3NW.js";
|
|
15
|
+
import "./chunk-CCVKLLIO.js";
|
|
16
|
+
import "./chunk-UZ6YMQV2.js";
|
|
17
|
+
import "./chunk-USETLDR7.js";
|
|
18
|
+
import "./chunk-JPVO5SH5.js";
|
|
19
|
+
import "./chunk-ZSTTHIEF.js";
|
|
20
|
+
import "./chunk-FQWPBBPB.js";
|
|
21
|
+
import "./chunk-K2H37TUR.js";
|
|
22
|
+
import "./chunk-2OMVVDBU.js";
|
|
23
|
+
import "./chunk-UTXWRAEE.js";
|
|
24
|
+
export {
|
|
25
|
+
createCoreStackNavigator
|
|
26
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type DemoModeState = {
|
|
2
|
+
isEnabled: boolean;
|
|
3
|
+
enableDemoMode: () => void;
|
|
4
|
+
disableDemoMode: () => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const useDemoMode: () => DemoModeState;
|
|
7
|
+
export declare const getIsDemoModeEnabled: () => boolean;
|
|
8
|
+
export declare const enableDemoMode: () => void, disableDemoMode: () => void;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./demo-mode";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "../../chunk-CCVKLLIO.js";
|
|
2
|
+
import {
|
|
3
|
+
disableDemoMode,
|
|
4
|
+
enableDemoMode,
|
|
5
|
+
getIsDemoModeEnabled,
|
|
6
|
+
useDemoMode
|
|
7
|
+
} from "../../chunk-UZ6YMQV2.js";
|
|
8
|
+
import "../../chunk-UTXWRAEE.js";
|
|
9
|
+
export {
|
|
10
|
+
disableDemoMode,
|
|
11
|
+
enableDemoMode,
|
|
12
|
+
getIsDemoModeEnabled,
|
|
13
|
+
useDemoMode
|
|
14
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getLanguage,
|
|
3
|
+
setSelectedLanguage,
|
|
4
|
+
useLanguage
|
|
5
|
+
} from "../../chunk-XYNA7G2L.js";
|
|
6
|
+
import {
|
|
7
|
+
CORE_SUPPORTED_LANGUAGES
|
|
8
|
+
} from "../../chunk-J53YLHKZ.js";
|
|
9
|
+
import "../../chunk-USETLDR7.js";
|
|
10
|
+
import "../../chunk-JPVO5SH5.js";
|
|
11
|
+
import "../../chunk-ZSTTHIEF.js";
|
|
12
|
+
import "../../chunk-2OMVVDBU.js";
|
|
13
|
+
import "../../chunk-UTXWRAEE.js";
|
|
14
|
+
export {
|
|
15
|
+
CORE_SUPPORTED_LANGUAGES,
|
|
16
|
+
getLanguage,
|
|
17
|
+
setSelectedLanguage,
|
|
18
|
+
useLanguage
|
|
19
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Language } from "../types";
|
|
2
|
+
type LanguageState = {
|
|
3
|
+
/**
|
|
4
|
+
* User selected language
|
|
5
|
+
*/
|
|
6
|
+
selectedLanguage: Language | null;
|
|
7
|
+
/**
|
|
8
|
+
* Set the user selected language of the app
|
|
9
|
+
* @param {string} code - language code
|
|
10
|
+
*/
|
|
11
|
+
setSelectedLanguage: (code: string) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Get the selected language. If no language is selected, returns the default language
|
|
14
|
+
* @returns {Language} selected language or default language
|
|
15
|
+
*/
|
|
16
|
+
getLanguage: () => Language;
|
|
17
|
+
};
|
|
18
|
+
export type UseLanguageReturnType = {
|
|
19
|
+
/**
|
|
20
|
+
* Selected language, or default language if no language is selected
|
|
21
|
+
*/
|
|
22
|
+
language: Language;
|
|
23
|
+
/**
|
|
24
|
+
* Get supported languages for the app
|
|
25
|
+
*/
|
|
26
|
+
getSupportedLanguages: () => Language[];
|
|
27
|
+
/**
|
|
28
|
+
* Get the default language of the app
|
|
29
|
+
*/
|
|
30
|
+
getDefaultLanguage: () => Language;
|
|
31
|
+
/**
|
|
32
|
+
* Set the user selected language of the app
|
|
33
|
+
* @param {SupportedLanguageCode} code - language code
|
|
34
|
+
*/
|
|
35
|
+
setSelectedLanguage: LanguageState["setSelectedLanguage"];
|
|
36
|
+
};
|
|
37
|
+
export declare const useLanguage: () => UseLanguageReturnType;
|
|
38
|
+
export declare const getLanguage: () => Language, setSelectedLanguage: (code: string) => void;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getLanguage,
|
|
3
|
+
setSelectedLanguage,
|
|
4
|
+
useLanguage
|
|
5
|
+
} from "../../chunk-XYNA7G2L.js";
|
|
6
|
+
import "../../chunk-USETLDR7.js";
|
|
7
|
+
import "../../chunk-JPVO5SH5.js";
|
|
8
|
+
import "../../chunk-ZSTTHIEF.js";
|
|
9
|
+
import "../../chunk-2OMVVDBU.js";
|
|
10
|
+
import "../../chunk-UTXWRAEE.js";
|
|
11
|
+
export {
|
|
12
|
+
getLanguage,
|
|
13
|
+
setSelectedLanguage,
|
|
14
|
+
useLanguage
|
|
15
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
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"];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const useAuthConfig: () => {
|
|
2
|
+
clientId: string;
|
|
3
|
+
redirectUri: string;
|
|
4
|
+
scopes?: string[];
|
|
5
|
+
};
|
|
6
|
+
export declare const useLoginScreenConfig: () => {
|
|
7
|
+
title: string;
|
|
8
|
+
logo: import("react-native").ImageSourcePropType;
|
|
9
|
+
};
|
|
10
|
+
export declare const useAppVersion: () => string;
|
|
11
|
+
export declare const useEnvironment: () => import("@equinor/mad-components/dist/components/Environment/types").EnvironmentName;
|
|
12
|
+
export declare const useServicePortalName: () => string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useAppVersion,
|
|
3
|
+
useAuthConfig,
|
|
4
|
+
useEnvironment,
|
|
5
|
+
useLoginScreenConfig,
|
|
6
|
+
useServicePortalName
|
|
7
|
+
} from "../../chunk-JPVO5SH5.js";
|
|
8
|
+
import "../../chunk-ZSTTHIEF.js";
|
|
9
|
+
import "../../chunk-UTXWRAEE.js";
|
|
10
|
+
export {
|
|
11
|
+
useAppVersion,
|
|
12
|
+
useAuthConfig,
|
|
13
|
+
useEnvironment,
|
|
14
|
+
useLoginScreenConfig,
|
|
15
|
+
useServicePortalName
|
|
16
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import "../../chunk-USETLDR7.js";
|
|
2
|
+
import {
|
|
3
|
+
useAppVersion,
|
|
4
|
+
useAuthConfig,
|
|
5
|
+
useEnvironment,
|
|
6
|
+
useLoginScreenConfig,
|
|
7
|
+
useServicePortalName
|
|
8
|
+
} from "../../chunk-JPVO5SH5.js";
|
|
9
|
+
import {
|
|
10
|
+
getConfig,
|
|
11
|
+
setConfig,
|
|
12
|
+
useMadConfig
|
|
13
|
+
} from "../../chunk-ZSTTHIEF.js";
|
|
14
|
+
import "../../chunk-UTXWRAEE.js";
|
|
15
|
+
export {
|
|
16
|
+
getConfig,
|
|
17
|
+
setConfig,
|
|
18
|
+
useAppVersion,
|
|
19
|
+
useAuthConfig,
|
|
20
|
+
useEnvironment,
|
|
21
|
+
useLoginScreenConfig,
|
|
22
|
+
useMadConfig,
|
|
23
|
+
useServicePortalName
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useReleaseNotesVersion } from "./release-notes";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type ReleaseNotesState = {
|
|
2
|
+
lastDisplayedReleaseNotesVersion: string | null;
|
|
3
|
+
setLastDisplayedReleaseNotesVersion: (ver: string) => void;
|
|
4
|
+
};
|
|
5
|
+
export declare const useReleaseNotesVersion: () => ReleaseNotesState;
|
|
6
|
+
export declare const getLastDisplayedReleaseNotesVersion: () => string | null;
|
|
7
|
+
export declare const setLastDisplayedReleaseNotesVersion: (ver: string) => void;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getLastDisplayedReleaseNotesVersion,
|
|
3
|
+
setLastDisplayedReleaseNotesVersion,
|
|
4
|
+
useReleaseNotesVersion
|
|
5
|
+
} from "../../chunk-5BVQKJQB.js";
|
|
6
|
+
import "../../chunk-2OMVVDBU.js";
|
|
7
|
+
import "../../chunk-UTXWRAEE.js";
|
|
8
|
+
export {
|
|
9
|
+
getLastDisplayedReleaseNotesVersion,
|
|
10
|
+
setLastDisplayedReleaseNotesVersion,
|
|
11
|
+
useReleaseNotesVersion
|
|
12
|
+
};
|