@fto-consult/expo-ui 6.24.2 → 6.25.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.
Files changed (66) hide show
  1. package/app.config.json +1 -1
  2. package/babel.config.alias.js +2 -1
  3. package/babel.config.js +1 -1
  4. package/electron/utils/env.js +80 -0
  5. package/expo-ui-path.js +2 -2
  6. package/index.js +14 -13
  7. package/is-local-dev.js +5 -0
  8. package/metro.config.js +3 -2
  9. package/package.json +6 -3
  10. package/src/App.js +3 -3
  11. package/src/components/Datagrid/Accordion/Row.js +74 -100
  12. package/src/components/Datagrid/Accordion/ToogleRow.js +9 -0
  13. package/src/components/Datagrid/Accordion/index.js +30 -35
  14. package/src/components/Datagrid/Actions/index.js +12 -44
  15. package/src/components/Datagrid/Checkbox.js +4 -7
  16. package/src/components/Datagrid/Common/Common.js +112 -148
  17. package/src/components/Datagrid/Dashboard/index.js +2 -2
  18. package/src/components/Datagrid/IndexComponent.js +8 -13
  19. package/src/components/Datagrid/Table/index.js +53 -51
  20. package/src/components/Datagrid/Test/index.js +10 -3
  21. package/src/components/Datagrid/events/evx.js +7 -0
  22. package/src/components/Datagrid/events/index.js +11 -0
  23. package/src/components/Datagrid/hooks/Provider.js +6 -0
  24. package/src/components/Datagrid/hooks/context.js +5 -0
  25. package/src/components/Datagrid/hooks/index.js +104 -0
  26. package/src/components/Datagrid/utils.js +6 -4
  27. package/src/components/Dialog/Dialog.js +13 -12
  28. package/src/components/Dialog/DialogContent.js +11 -0
  29. package/src/components/KeyboardAvoidingView/index.js +7 -3
  30. package/src/components/List/Common.js +5 -3
  31. package/src/components/List/FlashList.js +13 -13
  32. package/src/components/List/Virtuoso/index.js +29 -8
  33. package/src/components/List/Virtuoso/index.native.js +6 -1
  34. package/src/components/Table/FiltersOrFooters.js +11 -3
  35. package/src/components/Table/Header/Cell/index.js +10 -0
  36. package/src/components/Table/Header/Cell/index.native.js +7 -0
  37. package/src/components/Table/{Header.js → Header/Component.js} +0 -4
  38. package/src/components/Table/{Row.js → Header/Component.native.js} +3 -3
  39. package/src/components/Table/Header/index.js +12 -0
  40. package/src/components/Table/List/index.js +3 -1
  41. package/src/components/Table/List/index.native.js +2 -1
  42. package/src/components/Table/Row/Cell/Content.js +17 -0
  43. package/src/components/Table/Row/Cell/Content.native.js +15 -0
  44. package/src/components/Table/Row/Cell/index.js +29 -0
  45. package/src/components/Table/Row/RowWrapper.js +7 -0
  46. package/src/components/Table/Row/RowWrapper.native.js +10 -0
  47. package/src/components/Table/Row/index.js +38 -0
  48. package/src/components/Table/RowTemplate/index.js +10 -0
  49. package/src/components/Table/RowTemplate/index.web.js +9 -0
  50. package/src/components/Table/ScrollNative/index.js +7 -0
  51. package/src/components/Table/ScrollNative/index.native.js +8 -0
  52. package/src/components/Table/VirtuosoTable/index.js +5 -0
  53. package/src/components/Table/VirtuosoTable/index.native.js +3 -0
  54. package/src/components/Table/hooks.js +84 -0
  55. package/src/components/Table/index.js +88 -247
  56. package/src/components/Table/styles.js +88 -0
  57. package/src/components/Table/utils.js +1 -0
  58. package/src/layouts/AppBar/index.js +11 -10
  59. package/src/layouts/Screen/ScreenWithoutAuthContainer.js +14 -6
  60. package/src/navigation/Drawer/items/index.js +2 -1
  61. package/src/navigation/index.js +11 -3
  62. package/src/screens/Help/About.js +1 -1
  63. package/src/screens/Help/openLibraries.js +1 -1
  64. package/src/test-screens/Home.js +4 -1
  65. package/webpack.config.js +4 -2
  66. package/src/components/Table/Cell.js +0 -24
@@ -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
- initialRouteName={initialRouteName}
37
- screenOptions={opts}
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.flex1,theme.styles.w100,theme.styles.p1]}>
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 = {"@FTO-CONSULT/EXPO-UI":{"name":"@FTO-CONSULT/EXPO-UI","version":"6.23.10","homepage":"https://github.com/borispipo/expo-ui#readme"}};
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"}};
@@ -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
- return <Screen{...props}>
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 nodeModulePath = `${process.cwd()}/node_modules`;
12
- const wConfigPath = fs.existsSync(`${nodeModulePath}/@expo/webpack-config`) && `${nodeModulePath}/@expo/webpack-config` || "@expo/webpack-config";
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";