@fto-consult/expo-ui 6.87.3 → 6.88.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/package.json +3 -3
- package/src/AppEntry/index.js +4 -9
- package/src/components/Datagrid/Accordion/index.js +1 -4
- package/src/components/Datagrid/Common/Common.js +3 -50
- package/src/components/Datagrid/Table/index.js +1 -2
- package/src/components/TableLink/index.js +1 -1
- package/src/screens/Help/openLibraries.js +1 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fto-consult/expo-ui",
|
3
|
-
"version": "6.
|
3
|
+
"version": "6.88.0",
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
5
5
|
"main": "main",
|
6
6
|
"scripts": {
|
@@ -94,7 +94,7 @@
|
|
94
94
|
"expo-system-ui": "~2.4.0",
|
95
95
|
"expo-web-browser": "~12.3.2",
|
96
96
|
"file-saver": "^2.0.5",
|
97
|
-
"fs-extra": "^11.
|
97
|
+
"fs-extra": "^11.2.0",
|
98
98
|
"google-libphonenumber": "^3.2.33",
|
99
99
|
"htmlparser2-without-node-native": "^3.9.2",
|
100
100
|
"is-plain-obj": "^4.1.0",
|
@@ -111,7 +111,7 @@
|
|
111
111
|
"react-native-get-random-values": "~1.9.0",
|
112
112
|
"react-native-iphone-x-helper": "^1.3.1",
|
113
113
|
"react-native-mime-types": "^2.4.0",
|
114
|
-
"react-native-paper": "^5.11.
|
114
|
+
"react-native-paper": "^5.11.3",
|
115
115
|
"react-native-paper-dates": "^0.20.4",
|
116
116
|
"react-native-reanimated": "~3.3.0",
|
117
117
|
"react-native-safe-area-context": "4.6.3",
|
package/src/AppEntry/index.js
CHANGED
@@ -15,9 +15,8 @@ import { showConfirm } from "$ecomponents/Dialog";
|
|
15
15
|
import {close as closePreloader, isVisible as isPreloaderVisible} from "$epreloader";
|
16
16
|
import SplashScreen from "$ecomponents/SplashScreen";
|
17
17
|
import {decycle} from "$cutils/json";
|
18
|
-
import init from "$capp/init";
|
19
18
|
import { setIsInitialized} from "$capp/utils";
|
20
|
-
import {isObj,
|
19
|
+
import {isObj,defaultObj,defaultStr} from "$cutils";
|
21
20
|
import {loadFonts} from "$ecomponents/Icon/Font";
|
22
21
|
import appConfig from "$capp/config";
|
23
22
|
import Preloader from "$preloader";
|
@@ -119,11 +118,7 @@ function App({init:initApp,initialRouteName:appInitialRouteName,children}) {
|
|
119
118
|
}
|
120
119
|
const exit = ()=>{
|
121
120
|
if(typeof beforeExit =='function'){
|
122
|
-
|
123
|
-
if(!isPromise(r2)){
|
124
|
-
throw {message:'La fonction before exit du contexte doit retourner une promesse',returnedResult:r2}
|
125
|
-
}
|
126
|
-
return r2.then(foreceExit).catch(reject);
|
121
|
+
Promise.resolve(beforeExit()).then(foreceExit).catch(reject);
|
127
122
|
}
|
128
123
|
foreceExit();
|
129
124
|
}
|
@@ -183,10 +178,10 @@ function App({init:initApp,initialRouteName:appInitialRouteName,children}) {
|
|
183
178
|
APP.setOnlineState(state);
|
184
179
|
});
|
185
180
|
NetInfo.fetch().catch((e)=>{
|
186
|
-
console.log(e," is net info
|
181
|
+
console.log(e," is net info")
|
187
182
|
});
|
188
183
|
loadResources().finally(()=>{
|
189
|
-
(typeof initApp =='function'?initApp :
|
184
|
+
Promise.resolve((typeof initApp =='function'?initApp : x=>true)({appConfig,contex:{setState}})).then((args)=>{
|
190
185
|
if(Auth.isLoggedIn()){
|
191
186
|
Auth.loginUser(false);
|
192
187
|
}
|
@@ -45,7 +45,6 @@ const DatagridFactory = (Factory)=>{
|
|
45
45
|
},
|
46
46
|
});
|
47
47
|
this.state.refreshing = false;
|
48
|
-
this.updateLayout = this.updateLayout.bind(this);
|
49
48
|
}
|
50
49
|
componentDidUpdate(){
|
51
50
|
super.componentDidUpdate();
|
@@ -510,9 +509,7 @@ const DatagridFactory = (Factory)=>{
|
|
510
509
|
</View>
|
511
510
|
return <DatagridProvider context={this}>
|
512
511
|
<View testID={testID+"_Container"} pointerEvents={pointerEvents} style={[styles.container,this.props.style]} collapsable={false}>
|
513
|
-
<View testID={testID+"_AccordionHeader"} style={[styles.accordionHeader]}
|
514
|
-
this.layoutRef.current = el;
|
515
|
-
}} onLayout={this.updateLayout.bind(this)}>
|
512
|
+
<View testID={testID+"_AccordionHeader"} style={[styles.accordionHeader]}>
|
516
513
|
{this.canRenderActions() ? <DatagridActions
|
517
514
|
testID={testID+"_Actions"}
|
518
515
|
pointerEvents = {pointerEvents}
|
@@ -9,16 +9,16 @@ import Tooltip from "$ecomponents/Tooltip";
|
|
9
9
|
import setQueryLimit from "./setQueryLimit";
|
10
10
|
import {showConfirm} from "$ecomponents/Dialog";
|
11
11
|
import Label from "$ecomponents/Label";
|
12
|
-
import Icon,{COPY_ICON
|
12
|
+
import Icon,{COPY_ICON} from "$ecomponents/Icon";
|
13
13
|
import filterUtils from "$cfilters";
|
14
14
|
import {sortBy,isDecimal,defaultVal,sanitizeSheetName,extendObj,isObjOrArray,isObj,isDataURL,defaultNumber,defaultStr,isFunction,defaultBool,defaultArray,defaultObj,isNonNullString,defaultDecimal} from "$cutils";
|
15
15
|
import {Datagrid as DatagridContentLoader} from "$ecomponents/ContentLoader";
|
16
16
|
import React from "$react";
|
17
17
|
import DateLib from "$lib/date";
|
18
|
-
import Filter,{canHandleFilter,prepareFilters
|
18
|
+
import Filter,{canHandleFilter,prepareFilters} from "$ecomponents/Filter";
|
19
19
|
import {CHECKED_ICON_NAME} from "$ecomponents/Checkbox";
|
20
20
|
import { COLUMN_WIDTH,DATE_COLUMN_WIDTH,DATE_TIME_COLUMN_WIDTH } from "../utils";
|
21
|
-
import { StyleSheet,Dimensions
|
21
|
+
import { StyleSheet,Dimensions} from "react-native";
|
22
22
|
import Preloader from "$ecomponents/Preloader";
|
23
23
|
import Checkbox from "../Checkbox";
|
24
24
|
import { TouchableRipple } from "react-native-paper";
|
@@ -182,7 +182,6 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
182
182
|
} = props;
|
183
183
|
if(this.bindResizeEvents()){
|
184
184
|
extendObj(this._events,{
|
185
|
-
RESIZE_PAGE : this.onResizePage.bind(this),
|
186
185
|
SET_DATAGRID_QUERY_LIMIT : this.onSetQueryLimit.bind(this),
|
187
186
|
});
|
188
187
|
}
|
@@ -1182,7 +1181,6 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
1182
1181
|
this.setIsLoading(true,()=>{
|
1183
1182
|
const fixedTable = !this.state.fixedTable;
|
1184
1183
|
this.setState({fixedTable},()=>{
|
1185
|
-
this.updateLayout();
|
1186
1184
|
this.setSessionData("fixedTable",fixedTable);
|
1187
1185
|
})
|
1188
1186
|
})
|
@@ -3504,21 +3502,6 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
3504
3502
|
forceRefresh(){
|
3505
3503
|
this.refresh(true);
|
3506
3504
|
}
|
3507
|
-
/***retourne la hauteur maximale du composant FlashList */
|
3508
|
-
getMaxListHeight(){
|
3509
|
-
const {height:winheight} = Dimensions.get("window");
|
3510
|
-
const layout = defaultObj(this.layoutRef.current);
|
3511
|
-
let maxHeight = winheight-100;
|
3512
|
-
if(layout && typeof layout.windowHeight =='number' && layout.windowHeight){
|
3513
|
-
const diff = winheight - Math.max(defaultNumber(layout.y,layout.top),100);
|
3514
|
-
if(diff<=350){
|
3515
|
-
maxHeight = Math.max(Math.min(winheight,350),200);
|
3516
|
-
} else {
|
3517
|
-
maxHeight = diff;
|
3518
|
-
}
|
3519
|
-
}
|
3520
|
-
return maxHeight;
|
3521
|
-
}
|
3522
3505
|
/***
|
3523
3506
|
@param {boolean|object}
|
3524
3507
|
@param {function|object}
|
@@ -3543,17 +3526,12 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
3543
3526
|
}).then(resolve).catch(reject);
|
3544
3527
|
})
|
3545
3528
|
}
|
3546
|
-
onResizePage(){
|
3547
|
-
this.updateLayout();
|
3548
|
-
}
|
3549
3529
|
componentDidMount(){
|
3550
3530
|
super.componentDidMount();
|
3551
|
-
APP.on(APP.EVENTS.RESIZE_PAGE,this._events.RESIZE_PAGE);
|
3552
3531
|
APP.on(APP.EVENTS.SET_DATAGRID_QUERY_LIMIT,this._events.SET_DATAGRID_QUERY_LIMIT);
|
3553
3532
|
}
|
3554
3533
|
componentWillUnmount(){
|
3555
3534
|
super.componentWillUnmount();
|
3556
|
-
APP.off(APP.EVENTS.RESIZE_PAGE,this._events.RESIZE_PAGE);
|
3557
3535
|
APP.off(APP.EVENTS.SET_DATAGRID_QUERY_LIMIT,this._events.SET_DATAGRID_QUERY_LIMIT);
|
3558
3536
|
this.clearEvents();
|
3559
3537
|
}
|
@@ -3660,19 +3638,6 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
3660
3638
|
getDefaultPaginationRowsPerPageItems (){
|
3661
3639
|
return [5,10,15,20,25,30,40,50,60,80,100];
|
3662
3640
|
}
|
3663
|
-
measureLayout(cb,force,layoutRef){
|
3664
|
-
cb = typeof cb === 'function'? cb : x=>x;
|
3665
|
-
layoutRef = layoutRef || this.layoutRef.current;
|
3666
|
-
return new Promise((resolve)=>{
|
3667
|
-
if(layoutRef && layoutRef.measureInWindow){
|
3668
|
-
layoutRef.measureInWindow((x, y, width, height) => {
|
3669
|
-
const r = this.getLayoutState({ x, y, width, height },force);
|
3670
|
-
cb(r);
|
3671
|
-
resolve(r);
|
3672
|
-
});
|
3673
|
-
}
|
3674
|
-
})
|
3675
|
-
}
|
3676
3641
|
getLayoutState(layout,force){
|
3677
3642
|
layout = defaultObj(layout);
|
3678
3643
|
const {width,height} = Dimensions.get("window");
|
@@ -3695,18 +3660,6 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
3695
3660
|
}
|
3696
3661
|
return "auto";
|
3697
3662
|
}
|
3698
|
-
updateLayout(p){
|
3699
|
-
this.measureLayout(state=>{
|
3700
|
-
if(isObj(state)){
|
3701
|
-
this.layoutRef.current = state;
|
3702
|
-
/*
|
3703
|
-
if(!this.state.isReady){
|
3704
|
-
state.isReady = true;
|
3705
|
-
}
|
3706
|
-
this.setState(state);*/
|
3707
|
-
}
|
3708
|
-
},isObj(p) && typeof p.force ==='boolean'?p.force : !this.state.isReady)
|
3709
|
-
}
|
3710
3663
|
isTableData(){
|
3711
3664
|
return false;
|
3712
3665
|
}
|
@@ -15,7 +15,6 @@ import Footer from "../Footer/Footer";
|
|
15
15
|
import theme from "$theme";
|
16
16
|
import Table,{styles as tableStyles} from "$ecomponents/Table";
|
17
17
|
import DatagridProvider from "../hooks/Provider";
|
18
|
-
import Filters from "../Filters";
|
19
18
|
|
20
19
|
|
21
20
|
const DatagridFactory = (Factory)=>{
|
@@ -290,7 +289,7 @@ const DatagridFactory = (Factory)=>{
|
|
290
289
|
</View> : null;
|
291
290
|
return <DatagridProvider context={this}>
|
292
291
|
<View style={[styles.container,{flex:1}]} testID={testID+"_TableContainer"} pointerEvents={pointerEvents}>
|
293
|
-
<View
|
292
|
+
<View testID={testID+"_LayoutContainer"}>
|
294
293
|
{this.canRenderActions() ? <DatagridActions
|
295
294
|
pointerEvents = {pointerEvents}
|
296
295
|
title = {this.renderDataSourceSelector()}
|
@@ -54,7 +54,7 @@ const TableLinKComponent = React.forwardRef((props,ref)=>{
|
|
54
54
|
}
|
55
55
|
});
|
56
56
|
}
|
57
|
-
return Promise.reject({msg:'type de données retournée par la fonction fetchForeignKeyData invalide'});
|
57
|
+
return Promise.reject({msg:'type de données retournée par la fonction fetchForeignKeyData invalide',fetchForeignData,foreignKeyTable,foreignKeyColumn,id,data});
|
58
58
|
}
|
59
59
|
openPreloader("traitement de la requête...");
|
60
60
|
if(isPromise(r)){
|
@@ -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.87.3","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.65.12","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"}};
|