@fto-consult/expo-ui 6.92.0 → 6.94.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/bin/create-app/App.js +10 -1
- package/bin/create-app/src/components/Notifications.js +4 -0
- package/bin/create-app/src/screens/Home.js +4 -3
- package/bin/create-app/src/screens/{TableDataListScreen.js → TableData/TableDataListScreen.js} +2 -1
- package/package.json +2 -2
- package/src/components/AppBar/index.js +9 -2
- package/src/context/TableData.js +2 -0
- package/src/layouts/AppBar/index.js +4 -1
- package/src/layouts/Screen/ScreenWithoutAuthContainer.js +36 -30
- package/src/navigation/utils.js +5 -2
- package/src/screens/Help/openLibraries.js +1 -1
- package/src/screens/ScreenWrapper.js +2 -0
- package/src/screens/index.js +4 -0
package/bin/create-app/App.js
CHANGED
@@ -3,8 +3,9 @@ import screens from "$screens";
|
|
3
3
|
import drawerItems from "$navigation/drawerItems";
|
4
4
|
import Logo from "$components/Logo";
|
5
5
|
import drawerSections from "$navigation/drawerSections";
|
6
|
-
import TableDataListScreen from "$screens/TableDataListScreen";
|
6
|
+
import TableDataListScreen from "$screens/TableData/TableDataListScreen";
|
7
7
|
import TableDataScreen from "$screens/TableData/TableDataScreen";
|
8
|
+
import Notifications from "$components/Notifications";
|
8
9
|
|
9
10
|
export default function AppMainEntry(){
|
10
11
|
return <ExpoUIProvider
|
@@ -34,8 +35,15 @@ export default function AppMainEntry(){
|
|
34
35
|
profilePropsMutator : ({fields,...props})=>({fields,...props}),//la fonction permettant de muter les champs liés à l'écran de mise à jour d'un profil utilisateur
|
35
36
|
}}
|
36
37
|
components = {{
|
38
|
+
/*** utilisé pour le renu du contenu des écran de type liste sur les tables de données */
|
37
39
|
TableDataListScreen,
|
40
|
+
/**** ce composant est utile pour le rendu du contenu des écrans de type formulaire d'enregistrement des tables de données*/
|
38
41
|
TableDataScreen,
|
42
|
+
/***
|
43
|
+
le composant à utliser pour le rendu des notifications de l'application.
|
44
|
+
pour qu'une notification soit affichée à un écran, il suffit de défiir la propriété withNotifications de l'écran à true. Ceci à l'image de l'écran Home
|
45
|
+
*/
|
46
|
+
Notifications,
|
39
47
|
datagrid : {
|
40
48
|
///les props par défaut à passer au composant SWRDatagrid
|
41
49
|
},
|
@@ -53,6 +61,7 @@ export default function AppMainEntry(){
|
|
53
61
|
image{ReactComponent} :,text {ReactComponent}
|
54
62
|
},*/
|
55
63
|
logo : Logo,//logo component's properties
|
64
|
+
/**** les form fields personnalisés doivent être définis ici */
|
56
65
|
customFormFields : {},//custom form fields
|
57
66
|
/*** la fonction permettant de muter les props du composant TableLink, permetant de lier les tables entre elles */
|
58
67
|
tableLinkPropsMutator : (props)=>{
|
@@ -9,9 +9,10 @@ export default function HomeScreen(props){
|
|
9
9
|
</Screen>
|
10
10
|
}
|
11
11
|
|
12
|
-
HomeScreen.screenName = "Home";
|
13
|
-
HomeScreen.Modal = false;
|
14
|
-
HomeScreen.authRequired = false;
|
12
|
+
HomeScreen.screenName = "Home"; //le nom de l'écran, utile pour la navigation
|
13
|
+
HomeScreen.Modal = false; //l'écran n'est pas modale, c'est à dire qu'il s'affiche à côté du drawer
|
14
|
+
HomeScreen.authRequired = false; //l'utilisateur doit être connecté pour accéder à l'application
|
15
|
+
HomeScreen.withNotifications = true; //pour le rendu des notificatios
|
15
16
|
|
16
17
|
const styles = StyleSheet.create({
|
17
18
|
container : {
|
package/bin/create-app/src/screens/{TableDataListScreen.js → TableData/TableDataListScreen.js}
RENAMED
@@ -7,4 +7,5 @@ export default function TableDataListScreen (props){
|
|
7
7
|
</Screen>
|
8
8
|
}
|
9
9
|
|
10
|
-
TableDataListScreen.withFab = false;//if you want to display main FAB layout on this screen toggle this value to true
|
10
|
+
TableDataListScreen.withFab = false;//if you want to display main FAB layout on this screen toggle this value to true
|
11
|
+
TableDataListScreen.withNotifications = true; //pour afficher les notifications dans les écrans de type liste
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fto-consult/expo-ui",
|
3
|
-
"version": "6.
|
3
|
+
"version": "6.94.0",
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
5
5
|
"main": "main",
|
6
6
|
"scripts": {
|
@@ -71,7 +71,7 @@
|
|
71
71
|
"@expo/html-elements": "^0.5.1",
|
72
72
|
"@expo/vector-icons": "^13.0.0",
|
73
73
|
"@faker-js/faker": "^8.0.2",
|
74
|
-
"@fto-consult/common": "^3.
|
74
|
+
"@fto-consult/common": "^3.68.0",
|
75
75
|
"@pchmn/expo-material3-theme": "^1.3.1",
|
76
76
|
"@react-native-async-storage/async-storage": "1.18.2",
|
77
77
|
"@react-native-community/datetimepicker": "7.2.0",
|
@@ -35,6 +35,7 @@ const AppBarComponent = React.forwardRef((props,ref)=> {
|
|
35
35
|
drawerRef,beforeGoBack,title,subtitle,titleProps,backAction,backActionProps,
|
36
36
|
subtitleProps,testID,
|
37
37
|
right,
|
38
|
+
Notifications,
|
38
39
|
onBackActionPress : customOnBackActionPress,actions,backActionRef,route,
|
39
40
|
...appBarProps} = props;
|
40
41
|
testID = defaultStr(testID)+"_RN_AppBarComponent";
|
@@ -111,8 +112,8 @@ const AppBarComponent = React.forwardRef((props,ref)=> {
|
|
111
112
|
elevation = typeof elevation === 'number'? elevation : undefined;
|
112
113
|
const elevStyle = elevation && Elevations[elevation];
|
113
114
|
titleProps = defaultObj(titleProps);
|
114
|
-
React.setRef(ref,context)
|
115
|
-
;
|
115
|
+
React.setRef(ref,context);;
|
116
|
+
const notif = React.isComponent(Notifications)? <Notifications/> : React.isValidElement(Notifications)? Notifications : null;
|
116
117
|
return (
|
117
118
|
<Appbar.Header elevation={elevation} {...appBarProps} testID={testID} style={[styles.header,{backgroundColor},elevStyle,appBarProps.style]} onLayout={onPageResize}>
|
118
119
|
{backAction}
|
@@ -131,6 +132,7 @@ const AppBarComponent = React.forwardRef((props,ref)=> {
|
|
131
132
|
}
|
132
133
|
})}
|
133
134
|
{React.isValidElement(rightContent) && rightContent || React.isValidElement(right) && right || null}
|
135
|
+
{notif}
|
134
136
|
</Appbar.Header>
|
135
137
|
);
|
136
138
|
});
|
@@ -169,6 +171,11 @@ AppBarComponent.GO_BACK_EVENT = GO_BACK_EVENT;
|
|
169
171
|
AppBarComponent.propTypes = {
|
170
172
|
...defaultObj(Appbar.propTypes),
|
171
173
|
title : PropTypes.string,
|
174
|
+
/**** le composant pour le rendu des notifications de l'appBar*/
|
175
|
+
Notifications : PropTypes.oneOfType([
|
176
|
+
PropTypes.element,
|
177
|
+
PropTypes.node,
|
178
|
+
]),
|
172
179
|
subtitle : PropTypes.oneOfType([
|
173
180
|
PropTypes.string,
|
174
181
|
PropTypes.bool,
|
package/src/context/TableData.js
CHANGED
@@ -63,6 +63,7 @@ export function prepareScreens ({tables,screens:screensProps,TableDataScreen,Tab
|
|
63
63
|
TableDataScreenComponentRef.List = React.isComponent(TableDataScreenList)? TableDataScreenList : TableDataScreenComponentRef.List;
|
64
64
|
const Modal = defaultBool(TableDataScreenComponentRef.current?.Modal,TableDataScreenComponentRef.current?.modal,true)
|
65
65
|
const ModalList = defaultBool(TableDataScreenComponentRef.List?.Modal,TableDataScreenComponentRef.List?.modal)
|
66
|
+
const withNotifications = typeof TableDataScreenComponentRef.List?.withNotifications =="boolean"? TableDataScreenComponentRef.List?.withNotifications: undefined;
|
66
67
|
const withFab = typeof TableDataScreenComponentRef.List?.withFab =="boolean"? TableDataScreenComponentRef.List?.withFab: undefined;
|
67
68
|
loopForScreen(screensProps,screens,foundTables);
|
68
69
|
Object.map(tables,(table,i)=>{
|
@@ -85,6 +86,7 @@ export function prepareScreens ({tables,screens:screensProps,TableDataScreen,Tab
|
|
85
86
|
screenName : listScreenName,
|
86
87
|
Modal : ModalList,
|
87
88
|
withFab,
|
89
|
+
withNotifications,
|
88
90
|
});
|
89
91
|
foundTables[listScreenName] = TableDataListScreen;
|
90
92
|
}
|
@@ -5,16 +5,19 @@ import {MENU_ICON} from "$ecomponents/Icon";
|
|
5
5
|
import {defaultObj} from "$cutils";
|
6
6
|
import {useDrawer} from "$ecomponents/Drawer";
|
7
7
|
import Icon from "$ecomponents/Icon";
|
8
|
+
import {useGetComponent} from "$econtext/hooks";
|
8
9
|
|
9
10
|
export * from "./utils";
|
10
11
|
|
11
|
-
const AppBarLayout = React.forwardRef(({backActionProps,withDrawer,backAction,backActionRef,options,...props},ref)=>{
|
12
|
+
const AppBarLayout = React.forwardRef(({backActionProps,withDrawer,withNotifications,backAction,backActionRef,options,...props},ref)=>{
|
12
13
|
const innerRef = React.useRef(null);
|
13
14
|
const {drawerRef} = useDrawer();
|
14
15
|
options = defaultObj(options);
|
15
16
|
const mergedRef = React.useMergeRefs(innerRef,ref);
|
17
|
+
const Notifications = useGetComponent('Notifications');
|
16
18
|
return <AppBar
|
17
19
|
backAction = {getBackActionComponent({backAction,backActionProps,withDrawer})}
|
20
|
+
Notifications = {withNotifications? Notifications:null}
|
18
21
|
{...props}
|
19
22
|
onBackActionPress = {(args)=>{
|
20
23
|
const {canGoBack,goBack} = args;
|
@@ -12,6 +12,7 @@ import theme,{StyleProp} from "$theme";
|
|
12
12
|
import StatusBar from "$ecomponents/StatusBar";
|
13
13
|
import ScrollView from "$ecomponents/ScrollView";
|
14
14
|
import KeyboardAvoidingView from "$ecomponents/KeyboardAvoidingView";
|
15
|
+
import {ScreenContext,useScreen} from "$econtext/hooks";
|
15
16
|
|
16
17
|
const getDefaultTitle = (nTitle,returnStr)=>{
|
17
18
|
let titleStr = React.getTextContent(nTitle);
|
@@ -38,6 +39,7 @@ export default function MainScreenScreenWithoutAuthContainer(props) {
|
|
38
39
|
appBarProps,
|
39
40
|
elevation,
|
40
41
|
withFab,
|
42
|
+
withNotifications,
|
41
43
|
appBar,
|
42
44
|
authRequired,
|
43
45
|
withDrawer,
|
@@ -97,37 +99,41 @@ export default function MainScreenScreenWithoutAuthContainer(props) {
|
|
97
99
|
const Wrapper = React.useMemo(()=>modal ? PortalCP : React.Fragment,[modal]);
|
98
100
|
const WrapperProps = modal? {screenName} : {};
|
99
101
|
const portalId = uniqid("screeen-container-"+screenName);
|
102
|
+
const screenValues = useScreen();
|
100
103
|
return <Wrapper {...WrapperProps} key={screenName}>
|
101
|
-
<
|
102
|
-
<
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
{
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
104
|
+
<ScreenContext.Provider value={screenValues}>
|
105
|
+
<View testID={testID+"_ScreenContentContainer"} id={portalId} {...containerProps} style={[styles.container,{backgroundColor},modal && styles.modal,containerProps.style]} >
|
106
|
+
<KeyboardAvoidingView testID={testID} {...keyboardAvoidingViewProps} style={[styles.keyboardAvoidingView,keyboardAvoidingViewProps.style]}>
|
107
|
+
{withStatusBar !== false ? <StatusBar/> : null}
|
108
|
+
{appBar === false ? null : React.isValidElement(appBar)? state.AppBar : <AppBar
|
109
|
+
testID={testID+'_AppBar'}
|
110
|
+
{...appBarProps}
|
111
|
+
backAction = {defaultVal(appBarProps.backAction,backAction)}
|
112
|
+
elevation={defaultNumber(appBarProps.elevation,elevation)}
|
113
|
+
withDrawer={withDrawer} options={options}
|
114
|
+
ref={appBarRef} title={title}
|
115
|
+
subtitle={subtitle}
|
116
|
+
withNotifications = {withNotifications}
|
117
|
+
/>}
|
118
|
+
{withScrollView !== false ? (
|
119
|
+
<ScrollView
|
120
|
+
testID = {testID+'_ScreenContentScrollView'}
|
121
|
+
{...rest}
|
122
|
+
contentContainerStyle={[contentContainerStyle,styles.container]}
|
123
|
+
style={[style]}
|
124
|
+
>
|
125
|
+
{children}
|
126
|
+
{fab}
|
127
|
+
</ScrollView>
|
128
|
+
) : (
|
129
|
+
<View testID={testID+'_ScreenContent'} {...rest} style={[styles.container,contentContainerStyle, style]}>
|
130
|
+
{children}
|
131
|
+
{fab}
|
132
|
+
</View>
|
133
|
+
)}
|
134
|
+
</KeyboardAvoidingView>
|
135
|
+
</View>
|
136
|
+
</ScreenContext.Provider>
|
131
137
|
</Wrapper>
|
132
138
|
}
|
133
139
|
|
package/src/navigation/utils.js
CHANGED
@@ -10,6 +10,9 @@ export const tableDataRouteName = 'table-data';
|
|
10
10
|
export const structDataRouteName = 'struct-data';
|
11
11
|
|
12
12
|
export const tableDataLinkRouteName = "table-data-link";
|
13
|
+
export const structDataListRouteName = "struct-data-list";
|
14
|
+
|
15
|
+
export const tableDataListRouteName = "table-data-list";
|
13
16
|
|
14
17
|
export const tableDataLinkScreenName = tableDataLinkRouteName;
|
15
18
|
|
@@ -87,11 +90,11 @@ export const getTableDataScreenName = getTableDataRouteName;
|
|
87
90
|
|
88
91
|
/*** permet d'obtenir le lien vers l'écran table data permettant de lister les données de la table data */
|
89
92
|
export const getTableDataListRouteName = function(tableName){
|
90
|
-
return buildScreenRoute(tableName,
|
93
|
+
return buildScreenRoute(tableName,tableDataListRouteName);
|
91
94
|
}
|
92
95
|
|
93
96
|
export const getStructDataListRouteName = function(tableName){
|
94
|
-
return buildScreenRoute(tableName,
|
97
|
+
return buildScreenRoute(tableName,structDataListRouteName);
|
95
98
|
}
|
96
99
|
|
97
100
|
export const getTableDataListScreenName = getTableDataListRouteName;
|
@@ -1 +1 @@
|
|
1
|
-
module.exports = {"@fto-consult/expo-ui":{"name":"@fto-consult/expo-ui","version":"6.
|
1
|
+
module.exports = {"@fto-consult/expo-ui":{"name":"@fto-consult/expo-ui","version":"6.93.0","repository":{"type":"git","url":"git+https://github.com/borispipo/expo-ui.git"},"homepage":"https://github.com/borispipo/expo-ui#readme"},"@babel/plugin-proposal-export-namespace-from":{"version":"7.18.9","url":"https://babel.dev/docs/en/next/babel-plugin-proposal-export-namespace-from","license":"MIT"},"@emotion/native":{"version":"11.11.0","url":"https://emotion.sh","license":"MIT"},"@emotion/react":{"version":"11.11.1","url":"https://github.com/emotion-js/emotion/tree/main/packages/react","license":"MIT"},"@expo/html-elements":{"version":"0.5.1","url":"https://github.com/expo/expo/tree/main/packages/html-elements","license":"MIT"},"@expo/metro-config":{"version":"0.10.7","url":"https://github.com/expo/expo.git","license":"MIT"},"@expo/vector-icons":{"version":"13.0.0","url":"https://expo.github.io/vector-icons","license":"MIT"},"@expo/webpack-config":{"version":"19.0.0","url":"https://github.com/expo/expo-cli.git","license":"MIT"},"@faker-js/faker":{"version":"8.0.2","url":"https://github.com/faker-js/faker.git","license":"MIT"},"@fto-consult/common":{"version":"3.68.0","url":"https://github.com/borispipo/common#readme","license":"ISC"},"@pchmn/expo-material3-theme":{"version":"1.3.1","url":"https://github.com/pchmn/expo-material3-theme#readme","license":"MIT"},"@react-native-async-storage/async-storage":{"version":"1.18.2","url":"https://github.com/react-native-async-storage/async-storage#readme","license":"MIT"},"@react-native-community/datetimepicker":{"version":"7.2.0","url":"https://github.com/react-native-community/datetimepicker#readme","license":"MIT"},"@react-native-community/netinfo":{"version":"9.3.10","url":"https://github.com/react-native-netinfo/react-native-netinfo#readme","license":"MIT"},"@react-native/assets-registry":{"version":"0.72.0","url":"git@github.com:facebook/react-native.git","license":"MIT"},"@react-navigation/native":{"version":"6.1.9","url":"https://reactnavigation.org","license":"MIT"},"@react-navigation/native-stack":{"version":"6.9.17","url":"https://github.com/software-mansion/react-native-screens#readme","license":"MIT"},"@react-navigation/stack":{"version":"6.3.20","url":"https://reactnavigation.org/docs/stack-navigator/","license":"MIT"},"@shopify/flash-list":{"version":"1.4.3","url":"https://shopify.github.io/flash-list/","license":"MIT"},"apexcharts":{"version":"3.44.0","url":"https://apexcharts.com","license":"MIT"},"babel-plugin-inline-dotenv":{"version":"1.7.0","url":"https://github.com/brysgo/babel-plugin-inline-dotenv#readme","license":"ISC"},"babel-plugin-module-resolver":{"version":"5.0.0","url":"https://github.com/tleunen/babel-plugin-module-resolver.git","license":"MIT"},"expo":{"version":"49.0.21","url":"https://github.com/expo/expo/tree/main/packages/expo","license":"MIT"},"expo-camera":{"version":"13.4.4","url":"https://docs.expo.dev/versions/latest/sdk/camera/","license":"MIT"},"expo-clipboard":{"version":"4.3.1","url":"https://docs.expo.dev/versions/latest/sdk/clipboard","license":"MIT"},"expo-font":{"version":"11.4.0","url":"https://docs.expo.dev/versions/latest/sdk/font/","license":"MIT"},"expo-image-picker":{"version":"14.3.2","url":"https://docs.expo.dev/versions/latest/sdk/imagepicker/","license":"MIT"},"expo-linking":{"version":"5.0.2","url":"https://docs.expo.dev/versions/latest/sdk/linking","license":"MIT"},"expo-sharing":{"version":"11.5.0","url":"https://docs.expo.dev/versions/latest/sdk/sharing/","license":"MIT"},"expo-sqlite":{"version":"11.3.3","url":"https://docs.expo.dev/versions/latest/sdk/sqlite/","license":"MIT"},"expo-status-bar":{"version":"1.6.0","url":"https://docs.expo.dev/versions/latest/sdk/status-bar/","license":"MIT"},"expo-system-ui":{"version":"2.4.0","url":"https://docs.expo.dev/versions/latest/sdk/system-ui","license":"MIT"},"expo-web-browser":{"version":"12.3.2","url":"https://docs.expo.dev/versions/latest/sdk/webbrowser/","license":"MIT"},"file-saver":{"version":"2.0.5","url":"https://github.com/eligrey/FileSaver.js#readme","license":"MIT"},"fs-extra":{"version":"11.2.0","url":"https://github.com/jprichardson/node-fs-extra","license":"MIT"},"google-libphonenumber":{"version":"3.2.33","url":"https://ruimarinho.github.io/google-libphonenumber/","license":"(MIT AND Apache-2.0)"},"htmlparser2-without-node-native":{"version":"3.9.2","url":"git://github.com/fb55/htmlparser2.git","license":"MIT"},"is-plain-obj":{"version":"4.1.0","license":"MIT"},"js-base64":{"version":"3.7.5","license":"BSD-3-Clause"},"pdfmake":{"version":"0.2.8","url":"http://pdfmake.org","license":"MIT"},"process":{"version":"0.11.10","url":"git://github.com/shtylman/node-process.git","license":"MIT"},"prop-types":{"version":"15.8.1","url":"https://facebook.github.io/react/","license":"MIT"},"react":{"version":"18.2.0","url":"https://reactjs.org/","license":"MIT"},"react-content-loader":{"version":"6.2.1","url":"https://github.com/danilowoz/react-content-loader","license":"MIT"},"react-dom":{"version":"18.2.0","url":"https://reactjs.org/","license":"MIT"},"react-native":{"version":"0.72.6","license":"MIT"},"react-native-big-list":{"version":"1.6.1","url":"https://marcocesarato.github.io/react-native-big-list-docs/","license":"GPL-3.0-or-later"},"react-native-blob-util":{"version":"0.18.6","url":"https://github.com/RonRadtke/react-native-blob-util","license":"MIT"},"react-native-get-random-values":{"version":"1.9.0","license":"MIT"},"react-native-iphone-x-helper":{"version":"1.3.1","url":"https://github.com/ptelad/react-native-iphone-x-helper#readme","license":"MIT"},"react-native-mime-types":{"version":"2.4.0","license":"MIT"},"react-native-paper":{"version":"5.11.3","url":"https://callstack.github.io/react-native-paper","license":"MIT"},"react-native-paper-dates":{"version":"0.20.4","url":"https://github.com/web-ridge/react-native-paper-dates#readme","license":"MIT"},"react-native-reanimated":{"version":"3.3.0","url":"https://github.com/software-mansion/react-native-reanimated#readme","license":"MIT"},"react-native-safe-area-context":{"version":"4.6.3","url":"https://github.com/th3rdwave/react-native-safe-area-context#readme","license":"MIT"},"react-native-screens":{"version":"3.22.1","url":"https://github.com/software-mansion/react-native-screens#readme","license":"MIT"},"react-native-svg":{"version":"13.9.0","url":"https://github.com/react-native-community/react-native-svg","license":"MIT"},"react-native-web":{"version":"0.19.9","url":"git://github.com/necolas/react-native-web.git","license":"MIT"},"react-native-webview":{"version":"13.2.2","url":"https://github.com/react-native-webview/react-native-webview#readme","license":"MIT"},"react-virtuoso":{"version":"4.6.2","url":"https://virtuoso.dev/","license":"MIT"},"sharp-cli":{"version":"2.1.0","url":"https://github.com/vseventer/sharp-cli","license":"MIT"},"tippy.js":{"version":"6.3.7","url":"https://atomiks.github.io/tippyjs/","license":"MIT"},"websql":{"version":"2.0.3","url":"git://github.com/nolanlawson/node-websql.git","license":"Apache-2.0"},"xlsx":{"version":"0.18.5","url":"https://sheetjs.com/","license":"Apache-2.0"}};
|
@@ -65,6 +65,7 @@ export default function ScreenWrapperNavComponent(_props){
|
|
65
65
|
setScreenOptions(options);
|
66
66
|
const allowDrawer = typeof options.allowDrawer ==='boolean'? options.allowDrawer : typeof options.withDrawer =='boolean'? options.withDrawer : typeof Screen.allowDrawer =='boolean'? Screen.allowDrawer : typeof Screen.withDrawer =='boolean' ? Screen.withDrawer : Screen.isModalScreen == true ? false : true;
|
67
67
|
const withFab = typeof options.withFab ==='boolean' ? options.withFab : typeof Screen.withFab =='boolean'? Screen.withFab : false;
|
68
|
+
const withNotifications = typeof options.withNotifications =='boolean'? options.withNotifications : typeof Screen.withNotifications =='boolean'? Screen.withNotifications : false;
|
68
69
|
const titleText = defaultVal(props.title,options.title,rest.title);
|
69
70
|
const authRequiredS = authRequired === false || Screen.authRequired ===false ? false : authRequired || allowDrawer;
|
70
71
|
const backActionS = options.backAction === false || Screen.backAction ===false ? false : isModal;
|
@@ -73,6 +74,7 @@ export default function ScreenWrapperNavComponent(_props){
|
|
73
74
|
children={<Screen
|
74
75
|
withFab = {withFab}
|
75
76
|
groupName = {groupName}
|
77
|
+
withNotifications = {withNotifications}
|
76
78
|
{...rest}
|
77
79
|
key = {sanitizedName}
|
78
80
|
authRequired={authRequiredS}
|
package/src/screens/index.js
CHANGED
@@ -25,10 +25,14 @@ export const handleScreen = ({Screen,Factory,ModalFactory,result,index})=>{
|
|
25
25
|
screenOptions = Screen.options;
|
26
26
|
const Modal = typeof Screen.Modal =='boolean'? Screen.Modal : typeof Screen.modal =='boolean'? Screen.modal : undefined;
|
27
27
|
const withFab = typeof Screen.withFab =='boolean'? Screen.withFab : undefined;
|
28
|
+
const withNotifications = typeof Screen.withNotifications =='boolean'? Screen.withNotifications : undefined;
|
28
29
|
Screen = Screen.Component;
|
29
30
|
if(typeof withFab =='boolean'){
|
30
31
|
Screen.withFab = withFab;
|
31
32
|
}
|
33
|
+
if(typeof withNotifications =='boolean'){
|
34
|
+
Screen.withNotifications = withNotifications;
|
35
|
+
}
|
32
36
|
if(Modal !== undefined){
|
33
37
|
Screen.Modal = Modal;
|
34
38
|
}
|