@fto-consult/expo-ui 6.24.2 → 6.25.1
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/app.config.json +1 -1
- package/babel.config.alias.js +2 -1
- package/babel.config.js +1 -1
- package/electron/utils/env.js +80 -0
- package/expo-ui-path.js +2 -2
- package/index.js +14 -13
- package/is-local-dev.js +5 -0
- package/metro.config.js +3 -2
- package/package.json +7 -4
- package/readChart.txt +4 -1
- package/src/App.js +3 -3
- package/src/components/Datagrid/Accordion/Row.js +74 -100
- package/src/components/Datagrid/Accordion/ToogleRow.js +9 -0
- package/src/components/Datagrid/Accordion/index.js +30 -35
- package/src/components/Datagrid/Actions/index.js +12 -44
- package/src/components/Datagrid/Checkbox.js +4 -7
- package/src/components/Datagrid/Common/Common.js +121 -152
- package/src/components/Datagrid/Dashboard/index.js +2 -2
- package/src/components/Datagrid/IndexComponent.js +8 -13
- package/src/components/Datagrid/Table/index.js +53 -51
- package/src/components/Datagrid/Test/index.js +10 -3
- package/src/components/Datagrid/events/evx.js +7 -0
- package/src/components/Datagrid/events/index.js +11 -0
- package/src/components/Datagrid/hooks/Provider.js +6 -0
- package/src/components/Datagrid/hooks/context.js +5 -0
- package/src/components/Datagrid/hooks/index.js +104 -0
- package/src/components/Datagrid/utils.js +8 -5
- package/src/components/Dialog/Dialog.js +13 -12
- package/src/components/Dialog/DialogContent.js +11 -0
- package/src/components/KeyboardAvoidingView/index.js +7 -3
- package/src/components/Label/index.js +8 -4
- package/src/components/List/Common.js +5 -3
- package/src/components/List/FlashList.js +13 -13
- package/src/components/List/Virtuoso/index.js +68 -10
- package/src/components/List/Virtuoso/index.native.js +6 -1
- package/src/components/Table/Header/Cell/index.js +10 -0
- package/src/components/Table/Header/Cell/index.native.js +7 -0
- package/src/components/Table/Header/index.js +34 -0
- package/src/components/Table/List/index.js +3 -1
- package/src/components/Table/List/index.native.js +2 -1
- package/src/components/Table/Row/Cell/Content.js +16 -0
- package/src/components/Table/Row/Cell/Content.native.js +15 -0
- package/src/components/Table/Row/Cell/index.js +30 -0
- package/src/components/Table/Row/RowWrapper.js +7 -0
- package/src/components/Table/Row/RowWrapper.native.js +11 -0
- package/src/components/Table/Row/index.js +38 -0
- package/src/components/Table/RowTemplate/index.js +10 -0
- package/src/components/Table/RowTemplate/index.web.js +9 -0
- package/src/components/Table/ScrollNative/index.js +7 -0
- package/src/components/Table/ScrollNative/index.native.js +8 -0
- package/src/components/Table/VirtuosoTable/index.js +5 -0
- package/src/components/Table/VirtuosoTable/index.native.js +3 -0
- package/src/components/Table/hooks.js +84 -0
- package/src/components/Table/index.js +92 -250
- package/src/components/Table/styles.js +104 -0
- package/src/components/Table/utils.js +1 -0
- package/src/context/Provider.js +16 -2
- package/src/layouts/AppBar/index.js +11 -10
- package/src/layouts/Screen/ScreenWithoutAuthContainer.js +14 -6
- package/src/navigation/Drawer/items/index.js +2 -1
- package/src/navigation/index.js +11 -3
- package/src/screens/Help/About.js +1 -1
- package/src/screens/Help/openLibraries.js +1 -1
- package/src/test-screens/Home.js +4 -1
- package/webpack.config.js +4 -2
- package/src/components/Table/Cell.js +0 -24
- package/src/components/Table/FiltersOrFooters.js +0 -18
- package/src/components/Table/Header.js +0 -25
- package/src/components/Table/Row.js +0 -21
|
@@ -51,9 +51,11 @@ export default function MainScreenScreenWithoutAuthContainer(props) {
|
|
|
51
51
|
containerProps,
|
|
52
52
|
testID,
|
|
53
53
|
right,
|
|
54
|
+
keyboardAvoidingViewProps,
|
|
54
55
|
...rest
|
|
55
56
|
} = props;
|
|
56
57
|
const insets = useSafeAreaInsets();
|
|
58
|
+
keyboardAvoidingViewProps = defaultObj(keyboardAvoidingViewProps);
|
|
57
59
|
testID = defaultStr(testID,"RN_MainScreenScreenWithoutAuthContainer")
|
|
58
60
|
containerProps = defaultObj(containerProps);
|
|
59
61
|
const backgroundColor = theme.colors.background;
|
|
@@ -106,7 +108,8 @@ export default function MainScreenScreenWithoutAuthContainer(props) {
|
|
|
106
108
|
const WrapperProps = modal? {screenName} : {};
|
|
107
109
|
const portalId = uniqid("screeen-container-"+screenName);
|
|
108
110
|
return <Wrapper {...WrapperProps}>
|
|
109
|
-
|
|
111
|
+
<View testID={testID+"_ScreenContentContainer"} id={portalId} style={[containerStyle,{backgroundColor},modal && styles.modal,containerProps.style]} {...containerProps}>
|
|
112
|
+
<KeyboardAvoidingView testID={testID} {...keyboardAvoidingViewProps} style={[styles.keyboardAvoidingView,keyboardAvoidingViewProps.style]}>
|
|
110
113
|
{withStatusBar !== false ? <StatusBar/> : null}
|
|
111
114
|
{appBar === false ? null : React.isValidElement(appBar)? state.AppBar : <AppBar
|
|
112
115
|
testID={testID+'_AppBar'} {...appBarProps}
|
|
@@ -121,19 +124,20 @@ export default function MainScreenScreenWithoutAuthContainer(props) {
|
|
|
121
124
|
<ScrollView
|
|
122
125
|
testID = {testID+'_ScreenContentScrollView'}
|
|
123
126
|
{...rest}
|
|
124
|
-
contentContainerStyle={[contentContainerStyle]}
|
|
125
|
-
style={[
|
|
127
|
+
contentContainerStyle={[contentContainerStyle,styles.container]}
|
|
128
|
+
style={[style]}
|
|
126
129
|
>
|
|
127
130
|
{children}
|
|
128
131
|
{fab}
|
|
129
132
|
</ScrollView>
|
|
130
133
|
) : (
|
|
131
|
-
<View testID={testID+'_ScreenContent'} {...rest} style={[
|
|
134
|
+
<View testID={testID+'_ScreenContent'} {...rest} style={[styles.container, style]}>
|
|
132
135
|
{children}
|
|
133
136
|
{fab}
|
|
134
137
|
</View>
|
|
135
138
|
)}
|
|
136
|
-
|
|
139
|
+
</KeyboardAvoidingView>
|
|
140
|
+
</View>
|
|
137
141
|
</Wrapper>
|
|
138
142
|
}
|
|
139
143
|
|
|
@@ -147,8 +151,12 @@ const styles = StyleSheet.create({
|
|
|
147
151
|
container: {
|
|
148
152
|
flex: 1,
|
|
149
153
|
},
|
|
154
|
+
keyboardAvoidingView : {
|
|
155
|
+
flex : 1,
|
|
156
|
+
backgroundColor : "transparent",
|
|
157
|
+
},
|
|
150
158
|
wrapper : {
|
|
151
|
-
|
|
159
|
+
flex : 1,
|
|
152
160
|
/*flex : 1,
|
|
153
161
|
flexGrow : 1,
|
|
154
162
|
alignItems:'center'*/
|
|
@@ -29,11 +29,12 @@ const useGetItems = (options)=>{
|
|
|
29
29
|
APP.on(APP.EVENTS.REFRESH_MAIN_DRAWER,refreshItems);
|
|
30
30
|
APP.on(APP.EVENTS.AUTH_LOGIN_USER,refreshItems);
|
|
31
31
|
APP.on(APP.EVENTS.AUTH_LOGOUT_USER,refreshItems);
|
|
32
|
+
APP.on(APP.EVENTS.UPDATE_THEME,refreshItems);
|
|
32
33
|
return ()=>{
|
|
33
34
|
APP.off(APP.EVENTS.REFRESH_MAIN_DRAWER,refreshItems);
|
|
34
35
|
APP.off(APP.EVENTS.AUTH_LOGIN_USER,refreshItems);
|
|
35
36
|
APP.off(APP.EVENTS.AUTH_LOGOUT_USER,refreshItems);
|
|
36
|
-
APP.off(APP.EVENTS.UPDATE_THEME,
|
|
37
|
+
APP.off(APP.EVENTS.UPDATE_THEME,refreshItems);
|
|
37
38
|
}
|
|
38
39
|
},[])
|
|
39
40
|
return useMemo(()=>{
|
package/src/navigation/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import React from "$react";
|
|
|
5
5
|
import DrawerNavigator from "./Drawer";
|
|
6
6
|
import useContext from "$econtext/hooks";
|
|
7
7
|
import { MainNavigationProvider } from "./hooks";
|
|
8
|
+
import {isWeb,isAndroid} from "$cplatform";
|
|
8
9
|
|
|
9
10
|
export * from "./hooks";
|
|
10
11
|
|
|
@@ -29,13 +30,19 @@ export default function NavigationComponent (props){
|
|
|
29
30
|
const opts = {
|
|
30
31
|
headerShown : false,
|
|
31
32
|
header : ()=> null,
|
|
33
|
+
presentation : isAndroid()? "card":"default",
|
|
34
|
+
animationEnabled : true,
|
|
35
|
+
}
|
|
36
|
+
const cardStyle = { backgroundColor: 'transparent' };
|
|
37
|
+
if(isWeb()){
|
|
38
|
+
cardStyle.flex = 1;
|
|
32
39
|
}
|
|
33
40
|
return <MainNavigationProvider {...rest} onGetStart={onGetStart} state={state} initialRouteName={initialRouteName}>
|
|
34
41
|
<DrawerNavigator {...props}>
|
|
35
42
|
{<Stack.Navigator
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
43
|
+
initialRouteName={initialRouteName}
|
|
44
|
+
screenOptions={opts}
|
|
45
|
+
>
|
|
39
46
|
{<Stack.Group screenOptions={{...opts}}>
|
|
40
47
|
{drawerScreens}
|
|
41
48
|
</Stack.Group>}
|
|
@@ -44,6 +51,7 @@ export default function NavigationComponent (props){
|
|
|
44
51
|
screenOptions={{
|
|
45
52
|
...opts,
|
|
46
53
|
presentation: 'transparentModal',
|
|
54
|
+
cardStyle
|
|
47
55
|
}}
|
|
48
56
|
>
|
|
49
57
|
{stackScreens}
|
|
@@ -63,7 +63,7 @@ export default function HelpScreen(props){
|
|
|
63
63
|
const borderStyle = {borderColor:theme.colors.divider,borderWidth:1,justifyContent:'space-between'};
|
|
64
64
|
const testID = defaultStr(props.testID,"RN_HelpAboutScreenComponent")
|
|
65
65
|
return <Screen withScrollView title={title} {...props} testID={testID+"_Screen"} contentContainerStyle={[{flex:1},theme.styles.alignItemsCenter,theme.styles.justifyContentCenter]}>
|
|
66
|
-
<View testID={testID+"_Container"} style={[theme.styles.alignItemsCenter,theme.styles.justifyContentCenter,theme.styles.
|
|
66
|
+
<View testID={testID+"_Container"} style={[theme.styles.alignItemsCenter,theme.styles.justifyContentCenter,theme.styles.w100,theme.styles.p1]}>
|
|
67
67
|
<Logo testID={testID+"_Logo"} style={{marginRight:10}}/>
|
|
68
68
|
{getReleaseText()}
|
|
69
69
|
<Divider testID={testID+"_Divider1"} style={[theme.styles.mv1]}/>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = {"@
|
|
1
|
+
module.exports = {"@fto-consult/expo-ui":{"name":"@fto-consult/expo-ui","version":"6.24.2","repository":{"type":"git","url":"git+https://github.com/borispipo/expo-ui.git"},"homepage":"https://github.com/borispipo/expo-ui#readme"}};
|
package/src/test-screens/Home.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import Screen from "$eScreen";
|
|
2
2
|
import Test from "$ecomponents/Datagrid/Test";
|
|
3
|
+
import React from "$react";
|
|
3
4
|
|
|
4
5
|
export default function HomeScreen(props){
|
|
5
|
-
|
|
6
|
+
React.useEffect(()=>{
|
|
7
|
+
},[])
|
|
8
|
+
return <Screen{...props} contentContainerStyle={[{flex:1}]}>
|
|
6
9
|
<Test/>
|
|
7
10
|
</Screen>
|
|
8
11
|
};
|
package/webpack.config.js
CHANGED
|
@@ -8,8 +8,10 @@ const path = require("path");
|
|
|
8
8
|
|
|
9
9
|
// Expo CLI will await this method so you can optionally return a promise.
|
|
10
10
|
module.exports = async function(env, argv,opts) {
|
|
11
|
-
const
|
|
12
|
-
const
|
|
11
|
+
const isLocalDev = require("./is-local-dev")();//si l'application est en developpement local
|
|
12
|
+
const nodeModulePath = path.resolve(`${process.cwd()}`,"node_modules");
|
|
13
|
+
const localNodeEuiP = path.resolve(nodeModulePath,"@expo/webpack-config");
|
|
14
|
+
const wConfigPath = fs.existsSync(localNodeEuiP) && localNodeEuiP || "@expo/webpack-config";
|
|
13
15
|
const createExpoWebpackConfigAsync = require(wConfigPath);
|
|
14
16
|
env = env || {};
|
|
15
17
|
opts = typeof opts =="object" && opts ? opts : {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// Copyright 2023 @fto-consult/Boris Fouomene. All rights reserved.
|
|
2
|
-
// Use of this source code is governed by a BSD-style
|
|
3
|
-
// license that can be found in the LICENSE file.
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { View } from "react-native";
|
|
6
|
-
import {defaultObj} from "$cutils";
|
|
7
|
-
import Label from "$ecomponents/Label";
|
|
8
|
-
|
|
9
|
-
function TableCellComponent({cellArgs,rowArgs,children,renderCell,rowIndex,style,...rest}){
|
|
10
|
-
const {content,containerProps} = React.useMemo(()=>{
|
|
11
|
-
const rArgs = {...cellArgs,...rowArgs,containerProps : {}};
|
|
12
|
-
const r = typeof renderCell =='function' && renderCell (rArgs) || children;
|
|
13
|
-
return {
|
|
14
|
-
content : typeof r =='string' || typeof r =='number'? <Label children={r}/> : React.isValidElement(r)? r : null,
|
|
15
|
-
containerProps : defaultObj(rArgs.containerProps)
|
|
16
|
-
}
|
|
17
|
-
},[children]);
|
|
18
|
-
return (<View {...containerProps} {...rest} style={[style,containerProps.style]} >
|
|
19
|
-
{content}
|
|
20
|
-
</View>);
|
|
21
|
-
}
|
|
22
|
-
//const TableCellComponent = React.memo(TableCellComponent);;
|
|
23
|
-
export default TableCellComponent;
|
|
24
|
-
TableCellComponent.displayName = "TableCellComponent";
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// Copyright 2023 @fto-consult/Boris Fouomene. All rights reserved.
|
|
2
|
-
// Use of this source code is governed by a BSD-style
|
|
3
|
-
// license that can be found in the LICENSE file.
|
|
4
|
-
import React from "$react";
|
|
5
|
-
import { View } from "react-native";
|
|
6
|
-
import PropTypes from "prop-types";
|
|
7
|
-
export default function TableFiltersComponent({visible,children:cChildren,...rest}){
|
|
8
|
-
const children = React.useMemo(()=>{
|
|
9
|
-
return cChildren;
|
|
10
|
-
},[cChildren]);
|
|
11
|
-
return <View {...rest} style={[rest.style,!visible && {height:0,opacity:0,display:'none'}]}>
|
|
12
|
-
{children}
|
|
13
|
-
</View>
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
TableFiltersComponent.propTypes = {
|
|
17
|
-
visible : PropTypes.bool,
|
|
18
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// Copyright 2023 @fto-consult/Boris Fouomene. All rights reserved.
|
|
2
|
-
// Use of this source code is governed by a BSD-style
|
|
3
|
-
// license that can be found in the LICENSE file.
|
|
4
|
-
|
|
5
|
-
// Copyright 2023 @fto-consult/Boris Fouomene. All rights reserved.
|
|
6
|
-
// Use of this source code is governed by a BSD-style
|
|
7
|
-
// license that can be found in the LICENSE file.
|
|
8
|
-
import React from "$react";
|
|
9
|
-
import { View } from "react-native";
|
|
10
|
-
import PropTypes from "prop-types";
|
|
11
|
-
export default function TableHeaderComponent({cells,columns,...rest}){
|
|
12
|
-
const children = React.useMemo(()=>{
|
|
13
|
-
if(Array.isArray(cells)){
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
return cells;
|
|
17
|
-
},[cells,columns]);
|
|
18
|
-
return <View {...rest}>
|
|
19
|
-
{children}
|
|
20
|
-
</View>
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
TableHeaderComponent.propTypes = {
|
|
24
|
-
columns : PropTypes.arrayOf(PropTypes.bool)
|
|
25
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// Copyright 2023 @fto-consult/Boris Fouomene. All rights reserved.
|
|
2
|
-
// Use of this source code is governed by a BSD-style
|
|
3
|
-
// license that can be found in the LICENSE file.
|
|
4
|
-
import React from "$react";
|
|
5
|
-
import { View } from "react-native";
|
|
6
|
-
import PropTypes from "prop-types";
|
|
7
|
-
export default function TableRowComponent({cells,columns,...rest}){
|
|
8
|
-
const children = React.useMemo(()=>{
|
|
9
|
-
if(Array.isArray(cells)){
|
|
10
|
-
return cells.map((cell,index)=>columns[index]? <React.Fragment key={index}>{cell}</React.Fragment> : null )
|
|
11
|
-
}
|
|
12
|
-
return cells;
|
|
13
|
-
},[cells,columns]);
|
|
14
|
-
return <View {...rest}>
|
|
15
|
-
{children}
|
|
16
|
-
</View>
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
TableRowComponent.propTypes = {
|
|
20
|
-
columns : PropTypes.arrayOf(PropTypes.bool)
|
|
21
|
-
}
|