@fto-consult/expo-ui 5.5.2 → 5.6.1

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.
@@ -2,6 +2,8 @@ const path = require("path");
2
2
  const fs = require("fs");
3
3
  const writeFile = require("./electron/utils/writeFile");
4
4
  module.exports = (opts)=>{
5
+ console.log(process.env.EXPO_UI_PATH," is process envvvvv");
6
+ console.log(JSON.stringify(process.env)," is stringityffff");
5
7
  const dir = path.resolve(__dirname);
6
8
  const base = opts.base || process.cwd();
7
9
  const assets = path.resolve(dir,"assets");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "5.5.2",
3
+ "version": "5.6.1",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -61,7 +61,7 @@
61
61
  "@emotion/native": "^11.10.0",
62
62
  "@expo/html-elements": "^0.2.0",
63
63
  "@expo/vector-icons": "^13.0.0",
64
- "@fto-consult/common": "^3.4.1",
64
+ "@fto-consult/common": "^3.9.18",
65
65
  "@gorhom/portal": "^1.0.14",
66
66
  "@react-native-async-storage/async-storage": "^1.17.11",
67
67
  "@react-native-community/datetimepicker": "^6.7.3",
@@ -70,7 +70,7 @@
70
70
  "@react-navigation/native": "^6.1.1",
71
71
  "@react-navigation/native-stack": "^6.9.7",
72
72
  "@shopify/flash-list": "^1.4.0",
73
- "expo": "^48.0.7",
73
+ "expo": "^48.0.9",
74
74
  "expo-camera": "~13.2.1",
75
75
  "expo-clipboard": "~4.1.1",
76
76
  "expo-font": "~11.1.1",
@@ -84,7 +84,6 @@
84
84
  "fs-extra": "^11.1.0",
85
85
  "google-libphonenumber": "^3.2.31",
86
86
  "htmlparser2-without-node-native": "^3.9.2",
87
- "mongo-parse": "^2.1.0",
88
87
  "process": "^0.11.10",
89
88
  "prop-types": "^15.8.1",
90
89
  "react": "^18.2.0",
@@ -40,7 +40,4 @@ DatagridMainComponent.displayName = "DatagridMainComponent";
40
40
  DatagridMainComponent.propTypes = {
41
41
  ...DatagridTableData.propTypes
42
42
  }
43
-
44
- DatagridMainComponent.getDBName = DatagridTableData.getDBName;
45
-
46
43
  DatagridMainComponent.LinesProgressBar = DatagridMainComponent.LineProgressBar = DatagridTableData.LineProgressBar;
@@ -8,7 +8,7 @@ import theme,{Colors,flattenStyle} from "$theme";
8
8
  import DrawerItems from './DrawerItems';
9
9
  import Dimensions,{isDesktopMedia,getCurrentMedia} from "$cplatform/dimensions";
10
10
  import {open,close} from "$epreloader";
11
- import {DRAWER_POSITIONS,DRAWER_TYPES,MINIMIZED_WIDTH,getDrawerWidth,MINIMIZED_ICON_SIZE,ICON_SIZE} from './utils';
11
+ import {DRAWER_POSITIONS,DRAWER_TYPES,MINIMIZED_WIDTH,getDrawerWidth} from './utils';
12
12
  import Icon,{MENU_ICON} from "$ecomponents/Icon";
13
13
  import apiSession from "./session";
14
14
  import View from "$ecomponents/View";
@@ -12,7 +12,6 @@ import fetch from "$capi"
12
12
  import {willConvertFiltersToSQL} from "$ecomponents/Datagrid/utils";
13
13
  import React from "$react";
14
14
  import appConfig from "$appConfig";
15
- import {isJSON,parseJSON} from "$utils/json";
16
15
 
17
16
  /*** la tabledataSelectField permet de faire des requêtes distantes pour rechercher les données
18
17
  * Elle doit prendre en paramètre et de manière requis : les props suivante :
@@ -1,6 +1,6 @@
1
1
  import { isValidUrl, isNonNullString,uniqid,defaultObj,defaultStr} from "$utils";
2
2
  import getCallbackUrl from "./getUrlCallback";
3
- import { getQueryParams,setQueryParams} from "$utils/uri";
3
+ import { getQueryParams,setQueryParams} from "$cutils/uri";
4
4
  const BROWSERS_EVENTS = {};
5
5
  const callbackURIID = "callbackURIIDDD";
6
6
 
@@ -1,5 +1,5 @@
1
1
  import { defaultStr } from "$utils";
2
- import { getCurrentURI,getNativeMobileAppURI } from "$utils/uri";
2
+ import { getCurrentURI,getNativeMobileAppURI } from "$cutils/uri";
3
3
  export default function getCallbackUrl (url){
4
4
  let cUrl = undefined;
5
5
  if (typeof window !== 'undefined' && window) {
@@ -8,6 +8,7 @@ import numberType from './numberType.json'; // eslint-disable-line @typescript-e
8
8
  const phoneUtil = libPhoneNumber.PhoneNumberUtil.getInstance();
9
9
  const asYouTypeFormatter = libPhoneNumber.AsYouTypeFormatter;
10
10
 
11
+ export {phoneUtil};
11
12
 
12
13
  export const parse = (number,iso2)=>{
13
14
  try {
@@ -9,6 +9,7 @@ import Icon from "$ecomponents/Icon";
9
9
  import PhoneNumber from "./PhoneNumber";
10
10
  import SelectCountry from "$ecomponents/Countries/SelectCountry";
11
11
  import {getFlag} from "$ecomponents/Countries";
12
+ import appConfig from "$capp/config";
12
13
 
13
14
  export {PhoneNumber};
14
15
  export * from "./PhoneNumber";
@@ -33,7 +34,7 @@ export const format = (number, iso2) => {
33
34
  }
34
35
  const prepareState = ({defaultValue,country})=>{
35
36
  defaultValue = defaultStr(defaultValue);
36
- country = defaultStr(country);
37
+ country = defaultStr(country,appConfig.countryCode);
37
38
  if (defaultValue) {
38
39
  if (defaultValue[0] !== '+') {
39
40
  defaultValue = `+${defaultValue}`;
@@ -162,7 +163,8 @@ export default function PhoneInputComponent(props){
162
163
  onPress={onPressFlag}
163
164
  >
164
165
  <>
165
- {flagImageSource && <Image testID={testID+"_FlagImage"} source={flagImageSource} height={20} width={30} style={[styles.flagImage]} />}
166
+ {flagImageSource ? <Image testID={testID+"_FlagImage"} source={flagImageSource} height={20} width={30} style={[styles.flagImage]} />
167
+ : null}
166
168
  <Icon testID={testID+"_FlagChevronIcon"} name="chevron-down" size={16} style={[styles.flagIcon]} onPress={onPressFlag} />
167
169
  </>
168
170
  </TouchableOpacity>
@@ -2,7 +2,7 @@ import React from "$react";
2
2
  //import { StatusBar } from 'expo-status-bar';
3
3
  import theme,{getStatusBarStyle,Colors} from "$theme"
4
4
  import {isTouchDevice,uniqid} from "$utils";
5
- import {isDOMElement,removeClassName,addClassName} from "$utils/dom";
5
+ import {isDOMElement,removeClassName,addClassName} from "$cutils/dom";
6
6
  import { StyleSheet } from "react-native";
7
7
 
8
8
  const styleId = uniqid("dynamic-css-style-id");
@@ -1,11 +1,11 @@
1
1
  import tippy from 'tippy.js';
2
2
  import 'tippy.js/dist/tippy.css';
3
3
  import React from "$react";
4
- import {getMaxZindex} from "$utils/dom";
4
+ import {getMaxZindex} from "$cutils/dom";
5
5
  import PropTypes from "prop-types";
6
6
  import Label from "$ecomponents/Label";
7
7
  import { TIPPY_THEME } from '$theme/updateNative/utils';
8
- import {isDOMElement} from "$utils/dom";
8
+ import {isDOMElement} from "$cutils/dom";
9
9
  import {uniqid,defaultStr,defaultObj} from "$utils";
10
10
 
11
11
  const TippyTooltipComponent = React.forwardRef((props,ref)=>{
@@ -6,7 +6,7 @@ import WebView from "./Component";
6
6
  import {defaultStr} from "$utils";
7
7
  import React from "$react";
8
8
  import PropTypes from "prop-types";
9
- import {isValidUrl} from "$utils/uri";
9
+ import {isValidUrl} from "$cutils/uri";
10
10
  import FileSystem from "$file-system";
11
11
 
12
12
  const WebViewComponent = React.forwardRef(({children,source,style,testID,...props},ref)=>{
package/src/index.js CHANGED
@@ -5,7 +5,7 @@ import APP from "$capp";
5
5
  import {AppStateService,trackIDLE,stop as stopIDLE} from "$capp/idle";
6
6
  import { NavigationContainer} from '@react-navigation/native';
7
7
  import {navigationRef} from "$cnavigation"
8
- import NetInfo from '$utils/NetInfo';
8
+ import NetInfo from '$cutils/NetInfo';
9
9
  import Auth from "$cauth";
10
10
  import {isNativeMobile,isElectron} from "$cplatform";
11
11
  import Navigation from "./navigation";
@@ -14,7 +14,7 @@ import { showConfirm } from "$ecomponents/Dialog";
14
14
  import {close as closePreloader, isVisible as isPreloaderVisible} from "$epreloader";
15
15
  import SplashScreen from "$ecomponents/SplashScreen";
16
16
  import {notify} from "$ecomponents/Dialog";
17
- import {decycle} from "$utils/json";
17
+ import {decycle} from "$cutils/json";
18
18
  import init from "$capp/init";
19
19
  import { setIsInitialized} from "$capp/utils";
20
20
  import {isObj,isNonNullString,isPromise,defaultObj,defaultStr} from "$cutils";
@@ -117,7 +117,7 @@ export default function MainScreenScreenWithOrWithoutAuthContainer(props) {
117
117
  const child = <>
118
118
  {withStatusBar !== false ? <StatusBar/> : null}
119
119
  <ErrorBoundary testID={testID+"_ScreenLayoutErrorBoundary"}>
120
- <View testID={testID} {...containerProps} style={[styles.container,{backgroundColor},modal && styles.modal]}>
120
+ <View testID={testID} {...containerProps} style={[styles.container,{backgroundColor},modal && styles.modal,containerProps.style]}>
121
121
  {appBar === false ? null : React.isValidElement(appBar)? state.AppBar : <AppBar
122
122
  testID={testID+'_AppBar'} {...appBarProps}
123
123
  backAction = {defaultVal(appBarProps.backAction,backAction)}
@@ -266,10 +266,13 @@ export default class TableDataScreenComponent extends FormDataScreen{
266
266
  });
267
267
  if(isUpdated){
268
268
  //la props readOnlyOnEditing permet de rendre le champ readOnly en cas de mise à jour de la tableData
269
- if((currentField.readOnlyOnEditing === true)){
269
+ const cArgs = {...this.state,data:this.getCurrentData()};
270
+ const readOnlyOnEditing = typeof currentField.readOnlyOnEditing =='function'? currentField.readOnlyOnEditing(cArgs) : currentField.readOnlyOnEditing;
271
+ if((readOnlyOnEditing === true)){
270
272
  currentField.readOnly = true;
271
273
  }
272
- if((currentField.disabledOnEditing === true)){
274
+ const disabledOnEditing = typeof currentField.disabledOnEditing =='function'? currentField.disabledOnEditing(cArgs) : currentField.disabledOnEditing;
275
+ if((disabledOnEditing === true)){
273
276
  currentField.disabled = true;
274
277
  }
275
278
  }