@fto-consult/expo-ui 6.15.4 → 6.16.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/babel.config.alias.js +1 -1
- package/package.json +2 -2
- package/src/components/Datagrid/Common/utils.js +1 -1
- package/src/components/ErrorBoundary/ErrorMessage.js +1 -1
- package/src/components/ErrorBoundary/Provider.js +1 -1
- package/src/components/Fab/Group.js +1 -1
- package/src/components/Table/AbsoluteScrollView.js +1 -1
- package/src/components/TableLink/index.js +3 -2
- package/src/components/TextField/index.js +13 -22
- package/src/layouts/Screen/ScreenWithoutAuthContainer.js +0 -1
package/babel.config.alias.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports = (opts)=>{
|
|
|
82
82
|
const outputPath = path.resolve(HelpScreen,"openLibraries.js");
|
|
83
83
|
r.$nodeModulesPath = r.$enodeModulesPath= nodeModulesPath;
|
|
84
84
|
require("./find-licenses")({
|
|
85
|
-
paths : [root,r["$expo-ui-root-path"]],
|
|
85
|
+
paths : [root,r["$expo-ui-root-path",path.resolve(process.cwd())]],
|
|
86
86
|
nodeModulesPath : nodeModulesPath,
|
|
87
87
|
outputPath
|
|
88
88
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fto-consult/expo-ui",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.16.0",
|
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@emotion/native": "^11.11.0",
|
|
63
63
|
"@expo/html-elements": "^0.5.1",
|
|
64
64
|
"@expo/vector-icons": "^13.0.0",
|
|
65
|
-
"@fto-consult/common": "^3.23.
|
|
65
|
+
"@fto-consult/common": "^3.23.13",
|
|
66
66
|
"@gorhom/portal": "^1.0.14",
|
|
67
67
|
"@pchmn/expo-material3-theme": "^1.3.1",
|
|
68
68
|
"@react-native-async-storage/async-storage": "1.18.2",
|
|
@@ -45,7 +45,7 @@ export const renderRowCell = (arg)=>{
|
|
|
45
45
|
} else if(typeof columnDef.render === "function"){
|
|
46
46
|
_render = columnDef.render.call(context,renderArgs);
|
|
47
47
|
} else if(arrayValueExists( _type,["date","datetime","time"])){
|
|
48
|
-
const sqlFormat =_type === 'time'?
|
|
48
|
+
const sqlFormat =_type === 'time'? undefined : _type ==="datetime" ? DateLib.SQLDateTimeFormat : DateLib.SQLDateFormat;
|
|
49
49
|
let _dd =DateLib.parse(rowData[columnField],sqlFormat);
|
|
50
50
|
if(DateLib.isDateObj(_dd)){
|
|
51
51
|
const eFormat = defaultStr(columnDef.format,(_type === 'time'?DateLib.defaultTimeFormat:DateLib.masks.defaultDate));
|
|
@@ -2,7 +2,7 @@ import * as React from 'react'
|
|
|
2
2
|
import Types from 'prop-types';
|
|
3
3
|
import {StyleSheet,ScrollView,View,useWindowDimensions} from "react-native";
|
|
4
4
|
import {Paragraph,Button,List } from "react-native-paper";
|
|
5
|
-
import Portal from "
|
|
5
|
+
import {Portal} from "react-native-paper";
|
|
6
6
|
import theme from "$theme";
|
|
7
7
|
import {navigationRef,sanitizeName} from "$cnavigation";
|
|
8
8
|
import Expandable from "$ecomponents/Expandable";
|
|
@@ -6,7 +6,7 @@ import PropTypes from "prop-types";
|
|
|
6
6
|
import {MENU_ICON} from "$ecomponents/Icon";
|
|
7
7
|
import theme,{Colors} from "$theme";
|
|
8
8
|
import Group from "./GroupComponent";
|
|
9
|
-
import Portal from "
|
|
9
|
+
import {Portal} from "react-native-paper";
|
|
10
10
|
import {isAllowedFromStr} from "$cauth/perms";
|
|
11
11
|
|
|
12
12
|
const activeRef = {current:null};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { ScrollView,StyleSheet,View,useWindowDimensions,Dimensions} from "react-native";
|
|
6
6
|
import React from "$react";
|
|
7
7
|
import {defaultStr,defaultObj,isObj,isNumber} from "$cutils";
|
|
8
|
-
import Portal from "
|
|
8
|
+
import {Portal} from "react-native-paper";
|
|
9
9
|
import {isMobileNative,isTouchDevice} from "$platform";
|
|
10
10
|
|
|
11
11
|
const isNative = isMobileNative() || isTouchDevice();
|
|
@@ -11,7 +11,7 @@ import {defaultStr,isPromise,defaultObj} from "$cutils";
|
|
|
11
11
|
import {open as openPreloader,close as closePreloader} from "$preloader";
|
|
12
12
|
import {styles as _styles} from "$theme";
|
|
13
13
|
import Tooltip from "$ecomponents/Tooltip";
|
|
14
|
-
import {navigateToTableData} from "$enavigation/utils";
|
|
14
|
+
import {navigateToTableData,navigateToStructData} from "$enavigation/utils";
|
|
15
15
|
import Auth from "$cauth";
|
|
16
16
|
import fetch from "$capi/fetch";
|
|
17
17
|
import useContext from "$econtext/hooks";
|
|
@@ -46,8 +46,9 @@ const TableLinKComponent = React.forwardRef((props,ref)=>{
|
|
|
46
46
|
const r2 = typeof fetchForeignData === 'function'? fetchForeignData({...args,...defaultObj(a)}) : undefined;
|
|
47
47
|
if(isPromise(r2)){
|
|
48
48
|
return r2.then((data)=>{
|
|
49
|
+
const nav = isStructData ? navigateToStructData : navigateToTableData;
|
|
49
50
|
if(isObj(data) && (isNonNullString(foreignKeyColumn) ? data[foreignKeyColumn] !== undefined:true)){
|
|
50
|
-
|
|
51
|
+
nav({tableName:foreignKeyTable,isStructData,data});
|
|
51
52
|
}
|
|
52
53
|
});
|
|
53
54
|
}
|
|
@@ -52,6 +52,7 @@ const TextFieldComponent = React.forwardRef((componentProps,inputRef)=>{
|
|
|
52
52
|
lower,
|
|
53
53
|
dynamicBackgroundColor,
|
|
54
54
|
lowerCase,
|
|
55
|
+
onContentSizeChange,
|
|
55
56
|
handleOpacity,
|
|
56
57
|
...props} = componentProps;
|
|
57
58
|
upper = defaultBool(upper,upperCase,false);
|
|
@@ -294,7 +295,7 @@ const TextFieldComponent = React.forwardRef((componentProps,inputRef)=>{
|
|
|
294
295
|
const currentDefaultValue = alwaysUseLabel && displayText == emptyValue ? "" : displayText;
|
|
295
296
|
const withAutoHeight = typeof autoHeight === 'boolean'? autoHeight : false;
|
|
296
297
|
const height = withAutoHeight || multiline ? undefined : tHeight;
|
|
297
|
-
const inputStyle2 = withAutoHeight || multiline ? {
|
|
298
|
+
const inputStyle2 = withAutoHeight || multiline ? {height : heightRef.current} : null;
|
|
298
299
|
const containerStyle = StyleSheet.flatten(containerProps.style) || {};
|
|
299
300
|
const inputProps= {
|
|
300
301
|
caretHidden : false,
|
|
@@ -356,7 +357,7 @@ const TextFieldComponent = React.forwardRef((componentProps,inputRef)=>{
|
|
|
356
357
|
inputStyle2,
|
|
357
358
|
isNormalMode && styles.inputNormalMode,
|
|
358
359
|
isShadowMode && styles.inputShadowMode,
|
|
359
|
-
isShadowMode && multiline && {minHeight:heightRef.current},
|
|
360
|
+
//isShadowMode && multiline && {minHeight:heightRef.current},
|
|
360
361
|
multiline && {paddingTop : isFlatMode? 12 : 7},
|
|
361
362
|
],
|
|
362
363
|
secureTextEntry,
|
|
@@ -368,6 +369,13 @@ const TextFieldComponent = React.forwardRef((componentProps,inputRef)=>{
|
|
|
368
369
|
displayText,
|
|
369
370
|
parsedValue,
|
|
370
371
|
rows:numberOfLines,
|
|
372
|
+
onContentSizeChange : (e,...rest) => {
|
|
373
|
+
if(typeof onContentSizeChange ==='function' && onContentSizeChange(e,...rest) === false) return;
|
|
374
|
+
if(multiline){
|
|
375
|
+
heightRef.current = e.nativeEvent.contentSize.height;
|
|
376
|
+
setToggle(!toggle);
|
|
377
|
+
}
|
|
378
|
+
},
|
|
371
379
|
onChange : ({ nativeEvent: {target, text:text2} }) => {
|
|
372
380
|
if(canValueBeDecimal && (text2 && !text2.isNumber() && !text2.endsWith(".") && !text2.endsWith(","))) {
|
|
373
381
|
return;
|
|
@@ -375,28 +383,11 @@ const TextFieldComponent = React.forwardRef((componentProps,inputRef)=>{
|
|
|
375
383
|
if(canValueBeDecimal && isFocused && (text2 ==='.'|| text2 =='.')){
|
|
376
384
|
text2 = "0"+text2;
|
|
377
385
|
}
|
|
378
|
-
if(multiline){
|
|
379
|
-
let hasS = false;
|
|
380
|
-
if(text2){
|
|
381
|
-
const spl = text2.trim().split('\n');
|
|
382
|
-
if(spl.length>1){
|
|
383
|
-
heightRef.current+=MULTIPLE_HEIGHT+(10*(spl.length-1));
|
|
384
|
-
hasS = true;
|
|
385
|
-
setToggle(!toggle);
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
if(!hasS){
|
|
389
|
-
if(!text2 || text2.length < 30){
|
|
390
|
-
heightRef.current = MULTIPLE_HEIGHT;
|
|
391
|
-
setToggle(!toggle);
|
|
392
|
-
} else if(target.scrollHeight > heightRef.current){
|
|
393
|
-
heightRef.current = Math.max(target.scrollHeight,MULTIPLE_HEIGHT);
|
|
394
|
-
setToggle(!toggle);
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
386
|
const tVal = toCase(text2);
|
|
399
387
|
if(tVal !== text){
|
|
388
|
+
if(multiline && tVal.toLowerCase()+"\n" === text.toLowerCase()){
|
|
389
|
+
heightRef.current = Math.max(heightRef.current - 16,MULTIPLE_HEIGHT);
|
|
390
|
+
}
|
|
400
391
|
setText(text2,true);
|
|
401
392
|
callOnChange(tVal);
|
|
402
393
|
}
|
|
@@ -8,7 +8,6 @@ import { useNavigation} from '$cnavigation';
|
|
|
8
8
|
import Fab from "$layouts/Fab";
|
|
9
9
|
import APP from "$capp";
|
|
10
10
|
import AppBar,{createAppBarRef} from "$elayouts/AppBar";
|
|
11
|
-
import Portal from "$ecomponents/Portal";
|
|
12
11
|
import {Portal as RNPortal} from "react-native-paper";
|
|
13
12
|
import theme,{StyleProp} from "$theme";
|
|
14
13
|
import StatusBar from "$ecomponents/StatusBar";
|