@equinor/mad-core 0.5.15 → 0.5.17
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/README.md +1 -0
- package/dist/{chunk-WDLL5LF7.js → chunk-3KVW6DEX.js} +4 -4
- package/dist/{chunk-Q5Q7QYM6.js → chunk-BZXMMVCP.js} +1 -1
- package/dist/{chunk-BWLIIIR7.js → chunk-CTKF2XI6.js} +1 -1
- package/dist/components/createCoreStackNavigator.js +3 -3
- package/dist/components/index.js +3 -3
- package/dist/components/screens/LoginScreen.js +1 -1
- package/dist/index.js +3 -3
- package/dist/store/mad-config/hooks.d.ts +1 -0
- package/dist/types.d.ts +4 -0
- package/dist/utils/createMadCoreNavigator.js +2 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @equinor/mad-core
|
|
2
2
|
|
|
3
|
+
## 0.5.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7cf3344: You can now change the background color of the login screen
|
|
8
|
+
|
|
9
|
+
## 0.5.16
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [49e643c]
|
|
14
|
+
- @equinor/mad-components@0.13.0
|
|
15
|
+
- @equinor/mad-auth@0.1.24
|
|
16
|
+
|
|
3
17
|
## 0.5.15
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -189,6 +189,7 @@ export const config: MadConfig<RootStackParamList> = {
|
|
|
189
189
|
| key | required? | explanation |
|
|
190
190
|
| ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
191
191
|
| `splash` | true | The splash screen of the application. Will be used as a background for the login screen. For best results, set `resizeMode` to `"cover"`, and `backgroundColor` to your splash screen's background color in `app.json`. `@equinor/mad-core` will use resize mode `cover` on iOS, and `contain` on web. |
|
|
192
|
+
| `backgroundColor` | false | Background color for the login screen. Should be identical to the splash screen's background color. We have a common design for login screens across our apps, with a default background color. If your login screen for some reason uses different colors, use this property to change the background color. |
|
|
192
193
|
| `addScreenManually` | false | Set this to true if you want to add the login screen manually to the stack, just like you do with SettingsScreen. This way you can access LoginScreen's props: `onAuthenticationSuccessful` and `onAuthenticationFailed`. When adding `LoginScreen` to the stack, use `getDefaultScreenOptionsForLoginScreen` to use the same options as we do when adding the screen automatically. |
|
|
193
194
|
|
|
194
195
|
###### Application Insights config
|
|
@@ -22,11 +22,11 @@ var LoginScreen = ({
|
|
|
22
22
|
onAuthenticationFailed
|
|
23
23
|
}) => {
|
|
24
24
|
var _a;
|
|
25
|
-
const styles = useStyles(theme);
|
|
26
25
|
const dictionary = useDictionary();
|
|
27
26
|
const authConfig = useAuthConfig();
|
|
28
27
|
const navigate = useNavigateFromLoginScreen();
|
|
29
|
-
const { splash } = useLoginScreenConfig();
|
|
28
|
+
const { splash, backgroundColor } = useLoginScreenConfig();
|
|
29
|
+
const styles = useStyles(theme, backgroundColor);
|
|
30
30
|
const [demoPressCount, setDemoPressCount] = useState(0);
|
|
31
31
|
const shouldDisplayDemoButton = demoPressCount >= 5;
|
|
32
32
|
const resizeMode = Platform.OS === "web" ? "contain" : "cover";
|
|
@@ -71,10 +71,10 @@ var LoginScreen = ({
|
|
|
71
71
|
}
|
|
72
72
|
))));
|
|
73
73
|
};
|
|
74
|
-
var theme = EDSStyleSheet.create(() => ({
|
|
74
|
+
var theme = EDSStyleSheet.create((_, backgroundColor) => ({
|
|
75
75
|
container: {
|
|
76
76
|
flex: 1,
|
|
77
|
-
backgroundColor: "#E6FAEC"
|
|
77
|
+
backgroundColor: backgroundColor != null ? backgroundColor : "#E6FAEC"
|
|
78
78
|
},
|
|
79
79
|
secretHitboxContainer: {
|
|
80
80
|
position: "absolute",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCoreStackNavigator
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-CTKF2XI6.js";
|
|
4
4
|
import "../chunk-2GCLIPZP.js";
|
|
5
5
|
import "../chunk-TOCPQ2JB.js";
|
|
6
6
|
import "../chunk-Y4F6JPUK.js";
|
|
@@ -9,7 +9,7 @@ import "../chunk-ZSUFR7LK.js";
|
|
|
9
9
|
import "../chunk-YWPELSTX.js";
|
|
10
10
|
import "../chunk-SHKOH7MA.js";
|
|
11
11
|
import "../chunk-GOYAFKM3.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-BZXMMVCP.js";
|
|
13
13
|
import "../chunk-N3LFRIS6.js";
|
|
14
14
|
import "../chunk-Q7W5QIMF.js";
|
|
15
15
|
import "../chunk-BVFOO2RO.js";
|
|
@@ -19,7 +19,7 @@ import "../chunk-ZADB3VIP.js";
|
|
|
19
19
|
import "../chunk-OXXEF5WL.js";
|
|
20
20
|
import "../chunk-CIMA2GQQ.js";
|
|
21
21
|
import "../chunk-UD3DA4FR.js";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-3KVW6DEX.js";
|
|
23
23
|
import "../chunk-LTQGTI3K.js";
|
|
24
24
|
import "../chunk-7NTWLQ7J.js";
|
|
25
25
|
import "../chunk-RGJ4RWVB.js";
|
package/dist/components/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "../chunk-W3LMT7N4.js";
|
|
17
17
|
import {
|
|
18
18
|
createCoreStackNavigator
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-CTKF2XI6.js";
|
|
20
20
|
import "../chunk-2GCLIPZP.js";
|
|
21
21
|
import {
|
|
22
22
|
createBottomTabNavigator,
|
|
@@ -28,7 +28,7 @@ import "../chunk-ZSUFR7LK.js";
|
|
|
28
28
|
import "../chunk-YWPELSTX.js";
|
|
29
29
|
import "../chunk-SHKOH7MA.js";
|
|
30
30
|
import "../chunk-GOYAFKM3.js";
|
|
31
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-BZXMMVCP.js";
|
|
32
32
|
import "../chunk-N3LFRIS6.js";
|
|
33
33
|
import "../chunk-Q7W5QIMF.js";
|
|
34
34
|
import "../chunk-BVFOO2RO.js";
|
|
@@ -40,7 +40,7 @@ import "../chunk-CIMA2GQQ.js";
|
|
|
40
40
|
import "../chunk-UD3DA4FR.js";
|
|
41
41
|
import {
|
|
42
42
|
LoginScreen
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-3KVW6DEX.js";
|
|
44
44
|
import "../chunk-LTQGTI3K.js";
|
|
45
45
|
import "../chunk-7NTWLQ7J.js";
|
|
46
46
|
import "../chunk-RGJ4RWVB.js";
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-W3LMT7N4.js";
|
|
18
18
|
import {
|
|
19
19
|
createCoreStackNavigator
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-CTKF2XI6.js";
|
|
21
21
|
import "./chunk-2GCLIPZP.js";
|
|
22
22
|
import {
|
|
23
23
|
createBottomTabNavigator,
|
|
@@ -29,7 +29,7 @@ import "./chunk-ZSUFR7LK.js";
|
|
|
29
29
|
import "./chunk-YWPELSTX.js";
|
|
30
30
|
import "./chunk-SHKOH7MA.js";
|
|
31
31
|
import "./chunk-GOYAFKM3.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-BZXMMVCP.js";
|
|
33
33
|
import "./chunk-N3LFRIS6.js";
|
|
34
34
|
import "./chunk-Q7W5QIMF.js";
|
|
35
35
|
import "./chunk-BVFOO2RO.js";
|
|
@@ -41,7 +41,7 @@ import "./chunk-CIMA2GQQ.js";
|
|
|
41
41
|
import "./chunk-UD3DA4FR.js";
|
|
42
42
|
import {
|
|
43
43
|
LoginScreen
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-3KVW6DEX.js";
|
|
45
45
|
import "./chunk-LTQGTI3K.js";
|
|
46
46
|
import "./chunk-7NTWLQ7J.js";
|
|
47
47
|
import {
|
|
@@ -10,6 +10,7 @@ export type AuthConfig = {
|
|
|
10
10
|
export declare const useAuthConfig: () => AuthConfig;
|
|
11
11
|
export declare const useLoginScreenConfig: () => {
|
|
12
12
|
splash: import("react-native").ImageSourcePropType;
|
|
13
|
+
backgroundColor?: string | undefined;
|
|
13
14
|
addScreenManually?: boolean | undefined;
|
|
14
15
|
};
|
|
15
16
|
export declare const useAppVersion: () => string;
|
package/dist/types.d.ts
CHANGED
|
@@ -66,6 +66,10 @@ export type MadConfig<ParamList extends ParamListBase | void = void> = {
|
|
|
66
66
|
* Splash screen of the application.
|
|
67
67
|
*/
|
|
68
68
|
splash: ImageSourcePropType;
|
|
69
|
+
/**
|
|
70
|
+
* background color for the login screen. Should be identical to the splash screen's background color.
|
|
71
|
+
*/
|
|
72
|
+
backgroundColor?: string;
|
|
69
73
|
/**
|
|
70
74
|
* If you want to add the login screen manually to the stack, set this to true. This gives you access to additional props
|
|
71
75
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createMadCoreNavigator
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-BZXMMVCP.js";
|
|
4
4
|
import "../chunk-N3LFRIS6.js";
|
|
5
5
|
import "../chunk-Q7W5QIMF.js";
|
|
6
6
|
import "../chunk-BVFOO2RO.js";
|
|
@@ -10,7 +10,7 @@ import "../chunk-ZADB3VIP.js";
|
|
|
10
10
|
import "../chunk-OXXEF5WL.js";
|
|
11
11
|
import "../chunk-CIMA2GQQ.js";
|
|
12
12
|
import "../chunk-UD3DA4FR.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-3KVW6DEX.js";
|
|
14
14
|
import "../chunk-LTQGTI3K.js";
|
|
15
15
|
import "../chunk-7NTWLQ7J.js";
|
|
16
16
|
import "../chunk-RGJ4RWVB.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/mad-core",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.17",
|
|
4
4
|
"description": "Core library for the Mobile App Delivery team",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"react-native-render-html": "6.3.4",
|
|
36
36
|
"showdown": "2.1.0",
|
|
37
37
|
"zustand": "^4.4.1",
|
|
38
|
-
"@equinor/mad-
|
|
39
|
-
"@equinor/mad-
|
|
38
|
+
"@equinor/mad-components": "0.13.0",
|
|
39
|
+
"@equinor/mad-navigation": "0.3.0",
|
|
40
40
|
"@equinor/mad-insights": "0.1.2",
|
|
41
|
-
"@equinor/mad-
|
|
41
|
+
"@equinor/mad-auth": "0.1.24"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@babel/core": "^7.21.4",
|