@fto-consult/expo-ui 5.6.0 → 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.6.0",
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.8.11",
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",
@@ -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";
@@ -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>
@@ -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
  }