@fto-consult/expo-ui 6.31.0 → 6.31.2
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.js +0 -1
- package/electron/dependencies.js +2 -2
- package/index.js +10 -13
- package/package.json +3 -3
- package/src/components/Chart/appexChart/index.native.js +3 -3
- package/src/components/Datagrid/Accordion/Row.js +1 -1
- package/src/components/Datagrid/Accordion/index.js +1 -1
- package/src/components/Datagrid/Common/Common.js +38 -6
- package/src/components/Datagrid/SWRDatagrid.js +3 -2
- package/src/components/Datagrid/Table/index.js +2 -1
- package/src/components/Datagrid/Test/index.js +7 -1
- package/src/components/Dialog/DialogContent.js +1 -1
- package/src/components/Drawer/index.js +2 -1
- package/src/components/Dropdown/index.js +14 -7
- package/src/components/Form/Form.js +0 -1
- package/src/components/Form/FormData/FormData.js +1 -1
- package/src/components/Menu/utils.js +1 -1
- package/src/components/Table/styles.js +4 -0
- package/src/components/TextField/index.js +1 -1
- package/src/index.js +1 -1
- package/src/layouts/Screen/ScreenWithoutAuthContainer.js +1 -1
- package/src/layouts/Screen/TableData.js +1 -1
- package/src/screens/Help/openLibraries.js +1 -1
- package/src/screens/index.js +5 -1
- package/src/components/Datagrid/Test/fields.js +0 -6
- /package/src/components/Date/{utils.common.native.js → utils.common.native1.js} +0 -0
package/app.config.json
CHANGED
package/babel.config.js
CHANGED
|
@@ -3,7 +3,6 @@ module.exports = function(api,opts) {
|
|
|
3
3
|
api = api && typeof api =='object'? api : {};
|
|
4
4
|
|
|
5
5
|
const isLocalDev = require("./is-local-dev")();//si l'application est en developpement local
|
|
6
|
-
|
|
7
6
|
///les chemin vers la variable d'environnement, le chemin du fichier .env,@see : https://github.com/brysgo/babel-plugin-inline-dotenv
|
|
8
7
|
//console.log(environmentPath," is envvv ",opts);
|
|
9
8
|
const path = require("path");
|
package/electron/dependencies.js
CHANGED
package/index.js
CHANGED
|
@@ -50,17 +50,14 @@ export default function registerApp (opts){
|
|
|
50
50
|
|
|
51
51
|
registerRootComponent(MainAppEntry);
|
|
52
52
|
|
|
53
|
-
const isLocalMode = true;
|
|
54
53
|
//si après 5 secondes, l'application n'a pas été registrer, alors il s'agit d'un test en mode local
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
});
|
|
66
|
-
}
|
|
54
|
+
registerApp({
|
|
55
|
+
navigation : {
|
|
56
|
+
screens : require("./src/test-screens").default
|
|
57
|
+
},
|
|
58
|
+
init : ({appConfig})=>{
|
|
59
|
+
appConfig.set("isAuthSingleUserAllowed",true);
|
|
60
|
+
appConfig.set("authDefaultUser",{code:"root",password:"admin123",label:"Master admin"})
|
|
61
|
+
return Promise.resolve("test ted")
|
|
62
|
+
}
|
|
63
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fto-consult/expo-ui",
|
|
3
|
-
"version": "6.31.
|
|
3
|
+
"version": "6.31.2",
|
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@expo/html-elements": "^0.5.1",
|
|
69
69
|
"@expo/vector-icons": "^13.0.0",
|
|
70
70
|
"@faker-js/faker": "^8.0.2",
|
|
71
|
-
"@fto-consult/common": "^3.
|
|
71
|
+
"@fto-consult/common": "^3.30.19",
|
|
72
72
|
"@pchmn/expo-material3-theme": "^1.3.1",
|
|
73
73
|
"@react-native-async-storage/async-storage": "1.18.2",
|
|
74
74
|
"@react-native-community/datetimepicker": "7.2.0",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"react-native-iphone-x-helper": "^1.3.1",
|
|
106
106
|
"react-native-mime-types": "^2.4.0",
|
|
107
107
|
"react-native-paper": "^5.10.3",
|
|
108
|
-
"react-native-paper-dates": "^0.18.
|
|
108
|
+
"react-native-paper-dates": "^0.18.20",
|
|
109
109
|
"react-native-reanimated": "~3.3.0",
|
|
110
110
|
"react-native-safe-area-context": "4.6.3",
|
|
111
111
|
"react-native-screens": "~3.22.0",
|
|
@@ -15,7 +15,7 @@ export const ChartComponent = React.forwardRef(({chartContext,testID,chartId,id,
|
|
|
15
15
|
webViewRef.current.injectJavaScript(`
|
|
16
16
|
const method = "${method}";
|
|
17
17
|
const chartId = "${chartId}";
|
|
18
|
-
const a = ${typeof a =='string'? '"'+a.replaceAll('"','\"')+'"':typeof a =='boolean'? a : a && typeof a =='object'? JSON.stringify(a):undefined};
|
|
18
|
+
const a = ${typeof a =='string'? '"'+a.replaceAll('"','\"')+'"':typeof a =='boolean' || typeof a =="number" ? a : a && typeof a =='object'? JSON.stringify(a):undefined};
|
|
19
19
|
let element = document.getElementById(chartId);
|
|
20
20
|
if(!element){
|
|
21
21
|
element = document.createElement("div");
|
|
@@ -37,8 +37,8 @@ export const ChartComponent = React.forwardRef(({chartContext,testID,chartId,id,
|
|
|
37
37
|
//@see : https://apexcharts.com/docs/methods/
|
|
38
38
|
methodsNames.map((cb)=>{
|
|
39
39
|
if(cb !=='exec'){
|
|
40
|
-
chartContext.current[cb]=(
|
|
41
|
-
return exec(cb
|
|
40
|
+
chartContext.current[cb]=(...args)=>{
|
|
41
|
+
return exec(cb,...args);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
});
|
|
@@ -190,7 +190,7 @@ const DatagridAccordionRow = React.forwardRef((props,ref)=>{
|
|
|
190
190
|
{title}
|
|
191
191
|
{description}
|
|
192
192
|
</View>
|
|
193
|
-
{right ? <Label testID={testID+"_Right"} primary selectable {...rightProps} style={[styles.right,styles.label,rStyles.lineHeight,rightProps.style]}>
|
|
193
|
+
{right && React.isValidElement(right,true) ? <Label testID={testID+"_Right"} primary selectable {...rightProps} style={[styles.right,styles.label,rStyles.lineHeight,rightProps.style]}>
|
|
194
194
|
{right}
|
|
195
195
|
</Label> : null}
|
|
196
196
|
</View>
|
|
@@ -122,7 +122,7 @@ const DatagridFactory = (Factory)=>{
|
|
|
122
122
|
if(isObj(renderedContent.titleProps)){
|
|
123
123
|
titleProps = {...titleProps,...renderedContent.titleProps,style:[titleProps.style,renderedContent.titleProps.style]};
|
|
124
124
|
}
|
|
125
|
-
right = renderedContent.right
|
|
125
|
+
right = renderedContent.right;
|
|
126
126
|
rightProps = Object.assign({},renderedContent.rightProps);
|
|
127
127
|
description = defaultVal(renderedContent.description,renderedContent.content);
|
|
128
128
|
avatarContent = renderedContent.avatar;
|
|
@@ -174,6 +174,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
174
174
|
exportToPDFIsAllowed,
|
|
175
175
|
exportToExcelIsAllowed,
|
|
176
176
|
renderSectionListIsAllowed,
|
|
177
|
+
checkPerms : customCheckPerms,
|
|
177
178
|
...rest
|
|
178
179
|
} = props;
|
|
179
180
|
if(this.bindResizeEvents()){
|
|
@@ -204,6 +205,9 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
204
205
|
const ePDFIsAllowed = checkPerm(exportToPDFIsAllowed,pArgs);
|
|
205
206
|
const eExcelISAllowed = checkPerm(exportToExcelIsAllowed,pArgs);
|
|
206
207
|
const renderSectionListIsAllowedP = checkPerm(renderSectionListIsAllowed,pArgs);
|
|
208
|
+
if(typeof customCheckPerms =='function'){
|
|
209
|
+
customCheckPerms({context:this});
|
|
210
|
+
}
|
|
207
211
|
Object.map(this.props.displayTypes,(dType,v)=>{
|
|
208
212
|
if(isNonNullString(dType)){
|
|
209
213
|
dType = dType.toLowerCase().trim();
|
|
@@ -771,6 +775,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
771
775
|
}
|
|
772
776
|
getActionsArgs (selected){
|
|
773
777
|
const r = isObj(selected)? selected : {};
|
|
778
|
+
const isMobile = isMobileOrTabletMedia();
|
|
774
779
|
const ret = {
|
|
775
780
|
...dataSourceArgs,
|
|
776
781
|
rowsByKeys : this.rowsByKeys,
|
|
@@ -780,7 +785,8 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
780
785
|
notify,
|
|
781
786
|
selected : defaultBool(selected,false),
|
|
782
787
|
...r,
|
|
783
|
-
isMobile
|
|
788
|
+
isMobile,
|
|
789
|
+
isDesktop : !isMobile,
|
|
784
790
|
component:'datagrid',
|
|
785
791
|
data : this.state.data,
|
|
786
792
|
rows : this.state.data,
|
|
@@ -789,7 +795,8 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
789
795
|
selectedRows : this.getSelectedRows(),
|
|
790
796
|
selectedRowsCount : this.getSelectedRowsCount(),
|
|
791
797
|
context:this,
|
|
792
|
-
|
|
798
|
+
isAccordion : this.isAccordion(),
|
|
799
|
+
isTableData : this.isTableData(),
|
|
793
800
|
Auth,
|
|
794
801
|
};
|
|
795
802
|
if(this.props.getActionsArgs){
|
|
@@ -1264,6 +1271,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
1264
1271
|
DialogProvider.open({
|
|
1265
1272
|
title : 'Format de date',
|
|
1266
1273
|
subtitle : false,
|
|
1274
|
+
withScrollView : true,
|
|
1267
1275
|
fields : {
|
|
1268
1276
|
dateFormat : {
|
|
1269
1277
|
type : 'select_dateformat',
|
|
@@ -1460,6 +1468,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
1460
1468
|
DialogProvider.open({
|
|
1461
1469
|
title : "Paramètres de groupe",
|
|
1462
1470
|
data : config,
|
|
1471
|
+
withScrollView : true,
|
|
1463
1472
|
fields : {
|
|
1464
1473
|
displayGroupLabels : {
|
|
1465
1474
|
type : "switch",
|
|
@@ -1535,6 +1544,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
1535
1544
|
title : 'Configuration des graphes',
|
|
1536
1545
|
subtitle : false,
|
|
1537
1546
|
data,
|
|
1547
|
+
withScrollView : true,
|
|
1538
1548
|
fields : {
|
|
1539
1549
|
x : {
|
|
1540
1550
|
text : 'Axe des x[horizontal]',
|
|
@@ -1681,7 +1691,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
1681
1691
|
}
|
|
1682
1692
|
///reoturne les options de menus à appliquer sur le char
|
|
1683
1693
|
getChartMenus(){
|
|
1684
|
-
|
|
1694
|
+
const menus = [
|
|
1685
1695
|
{
|
|
1686
1696
|
text : "Options du graphe",
|
|
1687
1697
|
textBold : true,
|
|
@@ -1692,7 +1702,23 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
1692
1702
|
icon : "download",
|
|
1693
1703
|
onPress : this.downloadChart.bind(this),
|
|
1694
1704
|
}
|
|
1695
|
-
]
|
|
1705
|
+
];
|
|
1706
|
+
Object.map(this.props.chartActions,(menu,t)=>{
|
|
1707
|
+
if(!isObj(menu)) return;
|
|
1708
|
+
const {onPress} = menu;
|
|
1709
|
+
menus.push({
|
|
1710
|
+
...menu,
|
|
1711
|
+
onPress : (event)=>{
|
|
1712
|
+
if(!this.chartRef.current) return;
|
|
1713
|
+
const args = React.getOnPressArgs(event);
|
|
1714
|
+
args.chartContext = this.chartRef.current;
|
|
1715
|
+
if(typeof onPress =='function'){
|
|
1716
|
+
onPress(args);
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
})
|
|
1720
|
+
})
|
|
1721
|
+
return menus;
|
|
1696
1722
|
}
|
|
1697
1723
|
getExportableFields(){
|
|
1698
1724
|
return {
|
|
@@ -1736,6 +1762,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
1736
1762
|
return DialogProvider.open({
|
|
1737
1763
|
title : `Paramètre d'export ${excel?"excel":"pdf"}`,
|
|
1738
1764
|
data : sData,
|
|
1765
|
+
withScrollView : true,
|
|
1739
1766
|
fields : {
|
|
1740
1767
|
...this.getExportableFields(),
|
|
1741
1768
|
sheetName : excel && {
|
|
@@ -2907,7 +2934,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
2907
2934
|
const Cell = React.isComponent(args.Cell) ? args.Cell : View;
|
|
2908
2935
|
const isA = this.isAccordion();
|
|
2909
2936
|
const sectionListHeaderProps = defaultObj(args.sectionListHeaderProps);
|
|
2910
|
-
const headerContent = <Label testID={testID+"_Label"} splitText numberOfLines={3} textBold {...sectionListHeaderProps} style={[theme.styles.w100,{color:theme.colors.primaryOnSurface,fontSize:isA?15 :16},lStyle,theme.styles.ph1,sectionListHeaderProps.style]}>{label}</Label>;
|
|
2937
|
+
const headerContent = <Label testID={testID+"_Label"} splitText numberOfLines={3} textBold {...sectionListHeaderProps} style={[theme.styles.w100,{color:theme.colors.primaryOnSurface,fontSize:isA?15 :16},isA && tableStyles.accordionSectionListHeader,lStyle,theme.styles.ph1,sectionListHeaderProps.style]}>{label}</Label>;
|
|
2911
2938
|
let hasAlreadRenderMainHeaderOnFirstCell = false;
|
|
2912
2939
|
if(this.canShowFooters() && isObj(this.sectionListHeaderFooters[key])){
|
|
2913
2940
|
const {visibleColumnsNames,widths} = defaultObj(this.preparedColumns);
|
|
@@ -2953,7 +2980,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
2953
2980
|
return <args.Row index={rowIndex} rowData={item} rowIndex={rowIndex} isSectionListHeader cells={cells} headerContent={headerContent}/>
|
|
2954
2981
|
}
|
|
2955
2982
|
return <View testID={testID+"_ContentContainer"} style={[theme.styles.w100,isA && this.state.displayOnlySectionListHeaders && {borderTopColor:theme.colors.divider,borderTopWidth:1},isA ? [theme.styles.ph2,theme.styles.pt1] : [theme.styles.pt1,theme.styles.noPadding,theme.styles.noMargin],theme.styles.justifyContentCenter,theme.styles.alignItemsCenter,theme.styles.pb1,!cells && theme.styles.ml1,theme.styles.mr1,cStyle]}>
|
|
2956
|
-
{
|
|
2983
|
+
{headerContent}
|
|
2957
2984
|
{cells ? <View testID={testID+"_TableRow"} style = {[theme.styles.w100,theme.styles.row,isA && theme.styles.pt1,theme.styles.alignItemsFlexStart,this.isAccordion() && theme.styles.rowWrap]}
|
|
2958
2985
|
>{cells}</View> : null}
|
|
2959
2986
|
</View>
|
|
@@ -3845,6 +3872,10 @@ CommonDatagridComponent.propTypes = {
|
|
|
3845
3872
|
PropTypes.object,
|
|
3846
3873
|
PropTypes.object,
|
|
3847
3874
|
]),
|
|
3875
|
+
chartActions : PropTypes.oneOfType([
|
|
3876
|
+
PropTypes.object,
|
|
3877
|
+
PropTypes.array, //les actions supplémentaires à passer au graphe chart
|
|
3878
|
+
]),
|
|
3848
3879
|
/*** si l'opérateur or de filtre est accepté */
|
|
3849
3880
|
filterOrOperator : PropTypes.bool,
|
|
3850
3881
|
/*** si l'opérateur and de filtre est accepté */
|
|
@@ -4059,6 +4090,7 @@ CommonDatagridComponent.propTypes = {
|
|
|
4059
4090
|
canFetchOnlyVisibleColumns : PropTypes.bool,//si l'on peut modifier le type d'affichage lié à la possibilité de récupérer uniquement les données reletives aux colonnes visibles
|
|
4060
4091
|
useLinesProgressBar : PropTypes.bool,//si le progress bar lignes horizontale seront utilisés
|
|
4061
4092
|
abreviateValues : PropTypes.bool, //si les valeurs numériques seront abregées
|
|
4093
|
+
checkPerms : PropTypes.func,//la fonction utilisée pour vérifier les permissions de l'utilisateur
|
|
4062
4094
|
}
|
|
4063
4095
|
|
|
4064
4096
|
const styles = StyleSheet.create({
|
|
@@ -100,6 +100,7 @@ const SWRDatagridComponent = React.forwardRef((props,ref)=>{
|
|
|
100
100
|
sort,
|
|
101
101
|
defaultSortColumn,
|
|
102
102
|
defaultSortOrder,
|
|
103
|
+
isLoading : customIsLoading,
|
|
103
104
|
...rest
|
|
104
105
|
} = props;
|
|
105
106
|
const {swrConfig} = useContext();
|
|
@@ -204,9 +205,9 @@ const SWRDatagridComponent = React.forwardRef((props,ref)=>{
|
|
|
204
205
|
});
|
|
205
206
|
const dataRef = React.useRef(null);
|
|
206
207
|
const totalRef = React.useRef(0);
|
|
207
|
-
const loading = (isLoading || isValidating);
|
|
208
|
+
const loading = (customIsLoading === true || isLoading || isValidating);
|
|
208
209
|
const {data,total} = React.useMemo(()=>{
|
|
209
|
-
if(loading || !isObjOrArray(result)){
|
|
210
|
+
if((loading && customIsLoading !== false) || !isObjOrArray(result)){
|
|
210
211
|
return {data:dataRef.current,total:totalRef.current};
|
|
211
212
|
}
|
|
212
213
|
let {data,total} = (Array.isArray(result) ? {data:result,total:result.length} : isObj(result)? result : {data:[],total:0});
|
|
@@ -249,7 +249,8 @@ const DatagridFactory = (Factory)=>{
|
|
|
249
249
|
,icon : showFooters?'view-column':'view-module'
|
|
250
250
|
,text : (showFooters?'Masquer/Ligne des totaux':'Afficher/Ligne des totaux')
|
|
251
251
|
} : null,
|
|
252
|
-
...
|
|
252
|
+
...restItems,
|
|
253
|
+
//...(selectableMultiple ? restItems : [])
|
|
253
254
|
] : visibleColumns}
|
|
254
255
|
|
|
255
256
|
/>
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import Table from "../IndexComponent";
|
|
6
6
|
import React from "$react";
|
|
7
7
|
import { faker } from '@faker-js/faker';
|
|
8
|
+
import DateLib from "$clib/date";
|
|
8
9
|
export default function TestDatagridComponent({count,...props}){
|
|
9
10
|
const data = React.useMemo(()=>{
|
|
10
11
|
count = typeof count =='number' && count > 5 ? count : 100;
|
|
@@ -19,7 +20,7 @@ export default function TestDatagridComponent({count,...props}){
|
|
|
19
20
|
content : `${rowData.email}`,
|
|
20
21
|
title : rowData?.username,
|
|
21
22
|
//avatar : rowData.avatar,
|
|
22
|
-
right : rowData.birthdate,
|
|
23
|
+
right : DateLib.format(rowData.birthdate),
|
|
23
24
|
}
|
|
24
25
|
}}
|
|
25
26
|
columns={{
|
|
@@ -32,6 +33,10 @@ export default function TestDatagridComponent({count,...props}){
|
|
|
32
33
|
text : "Name",
|
|
33
34
|
width : 220,
|
|
34
35
|
},
|
|
36
|
+
amount : {
|
|
37
|
+
type : "number",
|
|
38
|
+
label : "Amount",
|
|
39
|
+
},
|
|
35
40
|
email : {
|
|
36
41
|
type : "email",
|
|
37
42
|
label : 'Email',
|
|
@@ -51,6 +56,7 @@ export function createRandomUser (){
|
|
|
51
56
|
return {
|
|
52
57
|
userId: faker.string.uuid(),
|
|
53
58
|
username: faker.internet.userName(),
|
|
59
|
+
amount : faker.number.int(),
|
|
54
60
|
email: faker.internet.email(),
|
|
55
61
|
avatar: faker.image.avatar(),
|
|
56
62
|
password: faker.internet.password(),
|
|
@@ -6,6 +6,6 @@ const DialogContentComponent = ({isPreloader,title,children,isFullScreen,...prop
|
|
|
6
6
|
const isFull = isFullScreen();
|
|
7
7
|
//useWindowDimensions();
|
|
8
8
|
const content = React.useMemo(()=>children,[isPreloader,title,children]);
|
|
9
|
-
return isPreloader || !isFull ? content : <KeyboardAvoidingView>{content}</KeyboardAvoidingView>
|
|
9
|
+
return isPreloader || !isFull ? content : <KeyboardAvoidingView testID="RN_DialogKeybaordAvoidingView">{content}</KeyboardAvoidingView>
|
|
10
10
|
}
|
|
11
11
|
export default DialogContentComponent;
|
|
@@ -34,8 +34,9 @@ const DrawerComponent = React.forwardRef((props,ref)=>{
|
|
|
34
34
|
minimized,drawerItems,hideStatusBar,overlayColor, onDrawerMinimize,onDrawerToggleMinimize,
|
|
35
35
|
onDrawerOpen,onDrawerClose,onDrawerToggle,header,headerProps,toggleIconProps,
|
|
36
36
|
permanentToggleIcon,minimizedToggleIcon,temporaryToggleIcon,withMinimizedIcon,
|
|
37
|
-
isItemActive,onPageResize,navigationViewRef,children,testID,drawerType} = props;
|
|
37
|
+
isItemActive,onPageResize,navigationViewRef,children:customChildren,testID,drawerType} = props;
|
|
38
38
|
|
|
39
|
+
const children = React.useMemo(()=>customChildren,[customChildren]);
|
|
39
40
|
testID = defaultStr(testID,"RN_DrawerComponent")
|
|
40
41
|
const session = useSession(sessionName);
|
|
41
42
|
sessionName = session.sessionName;
|
|
@@ -647,6 +647,9 @@ class DropdownComponent extends AppComponent {
|
|
|
647
647
|
selectedText : this.getSelectedText(newSelected,selectedValuesKeys)
|
|
648
648
|
});
|
|
649
649
|
}
|
|
650
|
+
getBackgroundColor(){
|
|
651
|
+
return theme.surfaceBackground;
|
|
652
|
+
}
|
|
650
653
|
render (){
|
|
651
654
|
let {
|
|
652
655
|
multiple:_multiple,
|
|
@@ -706,6 +709,7 @@ class DropdownComponent extends AppComponent {
|
|
|
706
709
|
bindResizeEvents,
|
|
707
710
|
left,
|
|
708
711
|
right,
|
|
712
|
+
backgroundColor : cBackgroundColor,
|
|
709
713
|
dialogProps,
|
|
710
714
|
...dropdownProps
|
|
711
715
|
} = this.props;
|
|
@@ -837,10 +841,11 @@ class DropdownComponent extends AppComponent {
|
|
|
837
841
|
helperText = <HelperText disabled = {disabled} error={error}>{helperText}</HelperText>
|
|
838
842
|
let labelTextField = defaultVal(label,text);
|
|
839
843
|
const isFlatMode = textInputProps.mode === flatMode;
|
|
840
|
-
|
|
844
|
+
const dropdownStyle = StyleSheet.flatten(dropdownProps?.style);
|
|
845
|
+
let backgroundColor = Colors.isValid(cBackgroundColor)? cBackgroundColor : Colors.isValid(dropdownStyle?.backgroundColor)? dropdownStyle?.dropdownStyle: Colors.isValid(textInputProps.style.backgroundColor)?textInputProps.style.backgroundColor : Colors.isValid(flattenStyle.backgroundColor)? flattenStyle.backgroundColor : this.getBackgroundColor();
|
|
841
846
|
const tagLabelStyle = {backgroundColor,color:Colors.setAlpha(theme.colors.text,theme.ALPHA)}
|
|
842
847
|
if(!isFlatMode && backgroundColor ==='transparent'){
|
|
843
|
-
tagLabelStyle.backgroundColor =
|
|
848
|
+
tagLabelStyle.backgroundColor = this.surfaceBackground();
|
|
844
849
|
}
|
|
845
850
|
textInputProps.style.backgroundColor = backgroundColor;
|
|
846
851
|
progressBarProps = defaultObj(progressBarProps);
|
|
@@ -886,7 +891,6 @@ class DropdownComponent extends AppComponent {
|
|
|
886
891
|
accessibilityLabel={defaultStr(accessibilityLabel,label,text)}
|
|
887
892
|
testID = {testID}
|
|
888
893
|
>
|
|
889
|
-
{<React.Fragment>{
|
|
890
894
|
<View {...dropdownProps} {...contentContainerProps} style={[contentContainerProps.style,{pointerEvents},flattenStyle]}
|
|
891
895
|
ref = {this.anchorRef}
|
|
892
896
|
collapsable = {false}
|
|
@@ -906,7 +910,7 @@ class DropdownComponent extends AppComponent {
|
|
|
906
910
|
alwaysUseLabel = {renderTag?true : false}
|
|
907
911
|
contentContainerProps = {{
|
|
908
912
|
...contentContainerProps,
|
|
909
|
-
style : [renderTag? styles.inputContainerTag:null,{pointerEvents:iconDisabled && (!enableCopy && disabled)?'none':'auto'},contentContainerProps.style],
|
|
913
|
+
style : [renderTag? styles.inputContainerTag:null,{pointerEvents:iconDisabled && (!enableCopy && disabled)?'none':'auto'},styles.anchorContentContainer,contentContainerProps.style],
|
|
910
914
|
}}
|
|
911
915
|
containerProps = {{...containerProps,style:[containerProps.style,styles.mbO]}}
|
|
912
916
|
error = {!!error}
|
|
@@ -939,8 +943,7 @@ class DropdownComponent extends AppComponent {
|
|
|
939
943
|
/>}
|
|
940
944
|
{!canHandle && isFlatMode && <ProgressBar color={theme.colors.secondary} {...defaultObj(progressBarProps)} indeterminate />}
|
|
941
945
|
{helperText}
|
|
942
|
-
|
|
943
|
-
}</React.Fragment>}
|
|
946
|
+
</View>
|
|
944
947
|
</Pressable>
|
|
945
948
|
|
|
946
949
|
let restProps = {};
|
|
@@ -1067,7 +1070,7 @@ class DropdownComponent extends AppComponent {
|
|
|
1067
1070
|
{...listProps}
|
|
1068
1071
|
ref = {this.listRef}
|
|
1069
1072
|
responsive = {false}
|
|
1070
|
-
contentContainerStyle = {[{backgroundColor
|
|
1073
|
+
contentContainerStyle = {[{backgroundColor},listProps.contentContainerStyle]}
|
|
1071
1074
|
style = {[listProps.style]}
|
|
1072
1075
|
prepareItems = {false}
|
|
1073
1076
|
items = {renderingItems}
|
|
@@ -1150,6 +1153,9 @@ const styles = StyleSheet.create({
|
|
|
1150
1153
|
marginHorizontal : 0,
|
|
1151
1154
|
paddingVertical : 0,
|
|
1152
1155
|
},
|
|
1156
|
+
anchorContentContainer : {
|
|
1157
|
+
backgroundColor : 'transparent',
|
|
1158
|
+
},
|
|
1153
1159
|
searchInput : {
|
|
1154
1160
|
paddingLeft : 8,
|
|
1155
1161
|
},
|
|
@@ -1234,6 +1240,7 @@ const styles = StyleSheet.create({
|
|
|
1234
1240
|
|
|
1235
1241
|
DropdownComponent.propTypes = {
|
|
1236
1242
|
onAddCallback : PropTypes.func,
|
|
1243
|
+
backgroundColor : PropTypes.string,//le background color du list
|
|
1237
1244
|
checkedIcon : PropTypes.oneOfType([
|
|
1238
1245
|
PropTypes.string,
|
|
1239
1246
|
PropTypes.func,
|
|
@@ -3,7 +3,6 @@ import React from "$react";
|
|
|
3
3
|
import {classExtends,isFunction,isNonNullString,defaultStr,defaultObj,defaultVal,extendObj} from "$cutils";
|
|
4
4
|
import {warning,Forms} from "./utils";
|
|
5
5
|
import Action from "./Action";
|
|
6
|
-
import KeyboardAvoidingView from "$ecomponents/KeyboardAvoidingView";
|
|
7
6
|
import { StyleSheet } from "react-native";
|
|
8
7
|
import APP from "$capp/instance";
|
|
9
8
|
import PropTypes from "prop-types";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {getAppBarActionsProps} from "./utils";
|
|
2
|
-
import React, {
|
|
2
|
+
import React, {ObservableComponent as AppComponent} from "$react";
|
|
3
3
|
import {isNonNullString,defaultStr,defaultNumber,defaultObj,extendObj,isObj,isFunction,defaultFunc,uniqid} from "$cutils";
|
|
4
4
|
import {getForm,getFormField} from "../utils";
|
|
5
5
|
import Surface from "$ecomponents/Surface";
|
|
@@ -10,7 +10,7 @@ import Item from "./Item";
|
|
|
10
10
|
export const MIN_WIDTH = 180;
|
|
11
11
|
|
|
12
12
|
export const renderItems = (props)=>{
|
|
13
|
-
|
|
13
|
+
const _items = [];
|
|
14
14
|
let {items,renderItem,testID,isBottomSheetItem,onPressItem,filter,closeOnPressItem,openMenu,closeMenu,itemProps} = props;
|
|
15
15
|
itemProps = defaultObj(itemProps);
|
|
16
16
|
testID = defaultStr(testID,"RN_MenuComponents.Items")
|
|
@@ -542,7 +542,7 @@ const TextFieldComponent = React.forwardRef((componentProps,inputRef)=>{
|
|
|
542
542
|
{label}
|
|
543
543
|
</Label> : null}
|
|
544
544
|
<>
|
|
545
|
-
<Surface testID={testID+"
|
|
545
|
+
<Surface testID={testID+"_TextFieldContentContainer"} {...contentContainerProps} elevation={0} style={[styles.contentContainer,{pointerEvents},!left? styles.paddingLeft:null,styles.row,contentContainerStyle,contentContainerProps.style]}>
|
|
546
546
|
{left ? (<View testID={testID+"_Left"} {...leftContainerProps} style={[styles.AdornmentContainer,styles.leftAdornment,leftContainerProps.style,disabledStyle]}>
|
|
547
547
|
{left}
|
|
548
548
|
</View>) : null}
|
package/src/index.js
CHANGED
|
@@ -257,7 +257,7 @@ function App({init:initApp,initialRouteName:appInitialRouteName,render,onMount})
|
|
|
257
257
|
ref={navigationRef}
|
|
258
258
|
initialState={initialState}
|
|
259
259
|
onStateChange={(state) =>{
|
|
260
|
-
|
|
260
|
+
setSession(NAVIGATION_PERSISTENCE_KEY,decycle(state),false);
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
>
|
|
@@ -132,7 +132,7 @@ export default function MainScreenScreenWithoutAuthContainer(props) {
|
|
|
132
132
|
{fab}
|
|
133
133
|
</ScrollView>
|
|
134
134
|
) : (
|
|
135
|
-
<View testID={testID+'_ScreenContent'} {...rest} style={[styles.container, style]}>
|
|
135
|
+
<View testID={testID+'_ScreenContent'} {...rest} style={[styles.container,contentContainerStyle, style]}>
|
|
136
136
|
{children}
|
|
137
137
|
{fab}
|
|
138
138
|
</View>
|
|
@@ -217,7 +217,7 @@ export default class TableDataScreenComponent extends FormDataScreen{
|
|
|
217
217
|
prepareField,
|
|
218
218
|
prepareComponentProps,
|
|
219
219
|
...rest
|
|
220
|
-
} = this.prepareComponentProps({...props,tableName,fields:extendObj({},true,this.fields,props.fields),isUpdated,isUpdate:isUpdated,data,datas,currentIndex});
|
|
220
|
+
} = this.prepareComponentProps({...props,tableName,context:this,fields:extendObj({},true,this.fields,props.fields),isUpdated,isUpdate:isUpdated,data,datas,currentIndex});
|
|
221
221
|
const sessionName = this.getSessionName();
|
|
222
222
|
const prepareCb = typeof prepareField =='function'? prepareField : x=> x;
|
|
223
223
|
///on effectue une mutator sur le champ en cours de modification
|
|
@@ -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.31.1","repository":{"type":"git","url":"git+https://github.com/borispipo/expo-ui.git"},"homepage":"https://github.com/borispipo/expo-ui#readme"},"@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.30.19","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.7","url":"https://reactnavigation.org","license":"MIT"},"@react-navigation/native-stack":{"version":"6.9.13","url":"https://github.com/software-mansion/react-native-screens#readme","license":"MIT"},"@shopify/flash-list":{"version":"1.4.3","url":"https://shopify.github.io/flash-list/","license":"MIT"},"apexcharts":{"version":"3.42.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.8","url":"https://github.com/expo/expo/tree/main/packages/expo","license":"MIT"},"expo-camera":{"version":"13.4.2","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-sqlite":{"version":"11.3.2","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.1.1","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"},"pdfmake":{"version":"0.2.7","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.4","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-gesture-handler":{"version":"2.12.1","url":"https://github.com/software-mansion/react-native-gesture-handler#readme","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.10.3","url":"https://callstack.github.io/react-native-paper","license":"MIT"},"react-native-paper-dates":{"version":"0.18.20","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.7","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.5.0","url":"https://virtuoso.dev/","license":"MIT"},"sharp-cli":{"version":"4.1.1","url":"https://github.com/vseventer/sharp-cli","license":"MIT"},"tippy.js":{"version":"6.3.7","url":"https://atomiks.github.io/tippyjs/","license":"MIT"},"uninstall":{"version":"0.0.0","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"}};
|
package/src/screens/index.js
CHANGED
|
@@ -22,7 +22,11 @@ export const handleScreen = ({Screen,Factory,ModalFactory,result,filter,index})=
|
|
|
22
22
|
} else if(typeof Screen ==='object' && React.isComponent(Screen.Component) && isNonNullString(Screen.screenName)){
|
|
23
23
|
screenName = Screen.screenName;
|
|
24
24
|
screenOptions = Screen.options;
|
|
25
|
+
const Modal = typeof Screen.Modal =='boolean'? Screen.Modal : typeof Screen.modal =='boolean'? Screen.modal : undefined;
|
|
25
26
|
Screen = Screen.Component;
|
|
27
|
+
if(Modal !== undefined){
|
|
28
|
+
Screen.Modal = Modal;
|
|
29
|
+
}
|
|
26
30
|
}
|
|
27
31
|
if(React.isComponent(Screen)) {
|
|
28
32
|
screenName = defaultStr(screenName,Screen.screenName);
|
|
@@ -74,7 +78,7 @@ export const handleScreen = ({Screen,Factory,ModalFactory,result,filter,index})=
|
|
|
74
78
|
options.elevation = typeof options.elevation =='number'? options.elevation : typeof Screen.elevation =='number'? Screen.elevation : undefined;
|
|
75
79
|
options.back = args.navigation.canGoBack();
|
|
76
80
|
options.extra = defaultObj(extra);
|
|
77
|
-
options.isModal = Screen.isModalScreen;
|
|
81
|
+
options.isModal = options.Modal = Screen.isModalScreen;
|
|
78
82
|
return options;
|
|
79
83
|
}} component = {ScreenWrapper}/>);
|
|
80
84
|
} else {
|
|
File without changes
|