@fto-consult/expo-ui 7.1.0 → 7.1.3
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/package.json +2 -2
- package/src/components/Chart/appexChart/appexChart.html +2 -2
- package/src/components/Datagrid/Accordion/Row.js +3 -3
- package/src/components/ErrorBoundary/ErrorMessage.js +26 -28
- package/src/components/Form/FormData/FormData.js +3 -0
- package/src/context/TableData.js +6 -3
- package/src/layouts/Screen/TableData.js +3 -3
- package/src/screens/Help/openLibraries.js +1 -1
@@ -8,6 +8,7 @@ import React from "$react";
|
|
8
8
|
import theme from "$theme"
|
9
9
|
import {styles as rStyles,getRowStyle} from "../utils";
|
10
10
|
import { useIsRowSelected,useDatagrid} from "../hooks";
|
11
|
+
import {HStack} from "$ecomponents/Stack";
|
11
12
|
|
12
13
|
const DatagridAccordionRow = React.forwardRef((props,ref)=>{
|
13
14
|
const {
|
@@ -135,7 +136,7 @@ const DatagridAccordionRow = React.forwardRef((props,ref)=>{
|
|
135
136
|
React.setRef(innerRef,el);
|
136
137
|
}}
|
137
138
|
>
|
138
|
-
<
|
139
|
+
<HStack
|
139
140
|
style={[styles.renderedContent,viewWrapperStyle,!hasAvatar && styles.contentContainerNotAvatar]}
|
140
141
|
testID={testID+'_ContentContainer'}
|
141
142
|
>
|
@@ -149,7 +150,7 @@ const DatagridAccordionRow = React.forwardRef((props,ref)=>{
|
|
149
150
|
{right && React.isValidElement(right,true) ? <Label testID={testID+"_Right"} primary {...rightProps} style={[{userSelect:selectable?"all":"none"},styles.right,styles.label,rStyles.lineHeight,rightProps.style]}>
|
150
151
|
{right}
|
151
152
|
</Label> : null}
|
152
|
-
</
|
153
|
+
</HStack>
|
153
154
|
</Pressable>
|
154
155
|
})
|
155
156
|
|
@@ -198,7 +199,6 @@ const styles = StyleSheet.create({
|
|
198
199
|
width : "98%"
|
199
200
|
},
|
200
201
|
renderedContent : {
|
201
|
-
flexDirection : 'row',
|
202
202
|
alignItems : 'center',
|
203
203
|
justifyContent : 'center',
|
204
204
|
paddingVertical : 2,
|
@@ -4,48 +4,46 @@ import {StyleSheet,ScrollView,View,useWindowDimensions} from "react-native";
|
|
4
4
|
import {Paragraph,Button,List } from "react-native-paper";
|
5
5
|
import {Portal} from "react-native-paper";
|
6
6
|
import theme from "$theme";
|
7
|
-
import {navigationRef,sanitizeName} from "$cnavigation";
|
7
|
+
import {navigationRef,navigate,sanitizeName} from "$cnavigation";
|
8
8
|
import Expandable from "$ecomponents/Expandable";
|
9
9
|
import Label from "$ecomponents/Label";
|
10
|
+
import Screen from "$eScreen/ScreenWithoutAuthContainer";
|
10
11
|
|
11
12
|
const homeRoute = sanitizeName("Home");
|
12
|
-
import {isWeb} from "$cplatform";
|
13
13
|
|
14
14
|
const ErrorMessage = React.forwardRef(function(props,ref){
|
15
15
|
const { error,resetError,onGoBack, info } = props
|
16
16
|
const testID = defaultStr(props.testID,"RN_ErrorBoundaryMessage");
|
17
17
|
const goToHome = ()=> {
|
18
|
-
if(navigationRef){
|
19
|
-
navigationRef.navigate(homeRoute);
|
20
|
-
if(typeof onGoBack =='function'){
|
21
|
-
onGoBack();
|
22
|
-
}
|
23
|
-
return;
|
18
|
+
if(navigationRef && navigationRef?.navigate){
|
19
|
+
return navigationRef.navigate(homeRoute);
|
24
20
|
}
|
21
|
+
return navigate(homeRoute)
|
25
22
|
}
|
26
23
|
if(!error || !info || !error.toString) return null;
|
27
24
|
const pointerEvents = 'auto';
|
28
|
-
const {width,height} = useWindowDimensions();
|
29
25
|
return <Portal>
|
30
|
-
<
|
31
|
-
<View
|
32
|
-
<
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
<
|
41
|
-
<
|
42
|
-
{
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
26
|
+
<Screen {...props} modal={false}>
|
27
|
+
<View ref={ref} testID={`${testID}_ErrorMessageContainer`} style={[{pointerEvents},styles.container]}>
|
28
|
+
<View style={[styles.content,{pointerEvents}]} testID={`${testID}_ErrorMessageContentContainer`}>
|
29
|
+
<Label style={styles.title}>Oops!</Label>
|
30
|
+
<Label style={styles.subtitle}>{'Une erreur est survenue'}</Label>
|
31
|
+
<Label style={styles.error}>{error.toString()}</Label>
|
32
|
+
<Button mode="contained" iconProps={{marginVertical:0,pointerEvents,paddingVertical:0}} icon='home-variant' style={{backgroundColor:theme.colors.primary,marginHorizontal:10}} labelStyle={{color:theme.colors.primaryLabel}} onPress={goToHome}>
|
33
|
+
Retour à l'accueil
|
34
|
+
</Button>
|
35
|
+
<Expandable title="Plus de détail sur l'erreur">
|
36
|
+
<View>
|
37
|
+
<ScrollView style={{flex:1}} contentContainerStyle={{flex:1,flexGrow:1,paddingBottom:30}} testID='RN_ErrorBoundary_ScrollView'>
|
38
|
+
<Paragraph testID='RN_ErrorBoundary_StackDetails' style={[styles.componentStack,{color:theme.colors.text}]}>
|
39
|
+
{info.componentStack}
|
40
|
+
</Paragraph>
|
41
|
+
</ScrollView>
|
42
|
+
</View>
|
43
|
+
</Expandable>
|
44
|
+
</View>
|
45
|
+
</View>
|
46
|
+
</Screen>
|
49
47
|
</Portal>
|
50
48
|
});
|
51
49
|
|
@@ -37,6 +37,9 @@ export default class FormDataComponent extends AppComponent{
|
|
37
37
|
getFormField (fieldName){
|
38
38
|
return getFormField(formName,fieldName);
|
39
39
|
}
|
40
|
+
getFields(){
|
41
|
+
return this.getForm()?.getFields() || {};
|
42
|
+
}
|
40
43
|
getField(fieldName){
|
41
44
|
return getFormField(this.getFormName(),fieldName)
|
42
45
|
}
|
package/src/context/TableData.js
CHANGED
@@ -29,7 +29,9 @@ export function TableDataListScreen({tableName,table,screenName,...props}){
|
|
29
29
|
tableName = defaultStr(tableName,table).toUpperCase();
|
30
30
|
let tableObj = getTable(tableName);
|
31
31
|
if(!tableObj){
|
32
|
-
|
32
|
+
return <ScreenError tableName={tableName} {...props}>
|
33
|
+
{`Objet table invalide, pour le rendu de la liste des éléments liés à la table ${tableName}.`}
|
34
|
+
</ScreenError>
|
33
35
|
}
|
34
36
|
const title = defaultStr(tableObj?.text,tableObj?.label);
|
35
37
|
return <List testID={"RN_TableDataScreenList_"+tableName.toUpperCase()} table={table} screenName={screenName} tableObj={tableObj} {...props} key={tableName} tableName={tableName} title={title}/>;
|
@@ -209,13 +211,14 @@ function NotAllowed(){
|
|
209
211
|
</View>
|
210
212
|
}
|
211
213
|
|
212
|
-
export function ScreenError({tableName,...props}){
|
214
|
+
export function ScreenError({tableName,children,...props}){
|
213
215
|
console.log("table data link with tableName ",tableName," has error for props ",props);
|
214
216
|
return <Screen {...props}>
|
215
217
|
<View style={[theme.styles.w100,theme.styles.p2,theme.styles.h100,theme.styles.justifyContentCenter,theme.styles.textAlignCenter]}>
|
216
218
|
<Label textBold error fontSize={18}>
|
217
|
-
{`Objet table invalide, impossible de rendre le contenu de la tableDataScreen liée à la table [${tableName?.toString()}]`}
|
219
|
+
{React.isValidElement(children,true) && children || `Objet table invalide, impossible de rendre le contenu de la tableDataScreen liée à la table [${tableName?.toString()}]`}
|
218
220
|
</Label>
|
221
|
+
<Label textBold fontSize={15}>Impossible d'afficher la requête demandée!!</Label>
|
219
222
|
</View>
|
220
223
|
</Screen>
|
221
224
|
}
|
@@ -404,12 +404,12 @@ export default class TableDataScreenComponent extends FormDataScreen{
|
|
404
404
|
handleCustomRender(){
|
405
405
|
return true;
|
406
406
|
}
|
407
|
-
canRenderActions(){
|
408
|
-
return (this.props.renderActions !== false);
|
407
|
+
canRenderActions(props){
|
408
|
+
return (this.props.renderActions !== false && this.currentRenderingProps?.renderActions !== false && props?.renderActions !== false);
|
409
409
|
}
|
410
410
|
componentWillRender({...rActionsArg}){
|
411
411
|
rActionsArg.context = this;
|
412
|
-
const rActions = this.canRenderActions()? renderActions.call(this,rActionsArg) : {};
|
412
|
+
const rActions = this.canRenderActions(rActionsArg)? renderActions.call(this,rActionsArg) : {};
|
413
413
|
const renderedActs = this.renderActions(rActionsArg);
|
414
414
|
if(!rActionsArg.archived){
|
415
415
|
const customActionKeyPrefix = this.getRenderedActionPrefix();
|
@@ -1 +1 @@
|
|
1
|
-
module.exports = {"@fto-consult/expo-ui":{"name":"@fto-consult/expo-ui","version":"7.
|
1
|
+
module.exports = {"@fto-consult/expo-ui":{"name":"@fto-consult/expo-ui","version":"7.1.2","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.70.28","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.2","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"}};
|