@fto-consult/expo-ui 8.43.1 → 8.45.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.
@@ -7,9 +7,9 @@
7
7
  "@react-native-community/netinfo": "11.1.0",
8
8
  "@react-native/assets-registry": "^0.72.0",
9
9
  "react-native-get-random-values": "~1.8.0",
10
- "@react-navigation/native": "^6.1.15",
11
- "@react-navigation/native-stack": "^6.9.24",
12
- "@react-navigation/stack": "^6.3.27",
10
+ "@react-navigation/native": "^6.1.16",
11
+ "@react-navigation/native-stack": "^6.9.25",
12
+ "@react-navigation/stack": "^6.3.28",
13
13
  "@shopify/flash-list": "1.6.3",
14
14
  "expo": "^50.0.11",
15
15
  "expo-camera": "~14.0.6",
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "8.43.1",
3
+ "version": "8.45.0",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
+ "react-native-paper-doc" : "https://github.com/callstack/react-native-paper/tree/main/docs/docs/guides",
5
6
  "scripts": {
6
7
  "clear-npx-cache": "npx clear-npx-cache",
7
8
  "publish1": "npm publish --access=public",
@@ -46,7 +47,7 @@
46
47
  "delete-node-modules": "rimraf ./**/node_modules",
47
48
  "dev": "npx expo start --no-dev --minify -c",
48
49
  "modifier-url-remote-git": "git remote set-url origin 'https://borispipo@github.com/borispipo/smart-eneo.git'",
49
- "update": "npm i @fto-consult/common@latest @fto-consult/node-utils@latest react-native-web react-native-big-list@latest apexcharts@latest file-saver@latest google-libphonenumber@latest react-native-iphone-x-helper@latest react-native-mime-types@latest react-native-paper@5 react-native-paper-dates@latest react-virtuoso@latest tippy.js@latest xlsx@latest && npm run update-apexchart && npm run find-licenses"
50
+ "update": "npm i @fto-consult/common@latest @fto-consult/node-utils@latest react-native-web react-native-big-list@latest apexcharts@latest file-saver@latest google-libphonenumber@latest react-native-iphone-x-helper@latest react-native-mime-types@latest react-native-paper@latest react-native-paper-dates@latest react-virtuoso@latest tippy.js@latest xlsx@latest && npm run update-apexchart && npm run find-licenses"
50
51
  },
51
52
  "bin": {
52
53
  "expo-ui": "./bin/index.js"
@@ -68,7 +69,7 @@
68
69
  "dependencies": {
69
70
  "@emotion/react": "^11.11.1",
70
71
  "@faker-js/faker": "^8.0.2",
71
- "@fto-consult/common": "^4.35.9",
72
+ "@fto-consult/common": "^4.36.0",
72
73
  "@fto-consult/node-utils": "^1.7.1",
73
74
  "apexcharts": "^3.47.0",
74
75
  "crypto-browserify": "^3.12.0",
@@ -2,9 +2,16 @@ import "../utils";
2
2
  import {DatePickerModal} from 'react-native-paper-dates'
3
3
  import {PaperProvider} from 'react-native-paper';
4
4
  import theme from "$theme";
5
+ import FontIcon from "$ecomponents/Icon/Font";
5
6
 
6
7
  export default function DatePickerModalComponent(props){
7
- return <PaperProvider theme={theme}>
8
+ return <PaperProvider theme={theme}
9
+ settings={{
10
+ icon: (props) => {
11
+ return <FontIcon {...props}/>
12
+ },
13
+ }}
14
+ >
8
15
  <DatePickerModal {...props}/>
9
16
  </PaperProvider>
10
17
  }
@@ -1,11 +1,12 @@
1
1
  import AppBar from "$ecomponents/AppBar";
2
2
  import React from "$react";
3
- import APP from "$capp/instance";
4
3
  import { renderActions } from "./utils";
5
4
  import {isIos,isAndroid,isWeb} from "$cplatform";
5
+ import {useWindowDimensions} from "$cdimensions/utils";
6
6
 
7
7
  const AppBarDialogComponent = React.forwardRef((props,ref)=>{
8
8
  const {actions,responsive,isFullScreen,fullScreen,actionsProps,...rest} = props;
9
+ useWindowDimensions();
9
10
  if(responsive && !isFullScreen() || (typeof fullScreen =='boolean' && !fullScreen)){
10
11
  return null;
11
12
  }
@@ -171,8 +171,20 @@ const DialogComponent = React.forwardRef((props,ref)=>{
171
171
  paddingRight : borderRadius,
172
172
  paddingVertical : borderRadius?10:0,
173
173
  };
174
+ const getRRProps = (containerProps,setDimensions)=>{
175
+ if(!isPreloader){
176
+ const {mediaQueryUpdateStyle} = containerProps;
177
+ containerProps.mediaQueryUpdateStyle = (...rest)=>{
178
+ const r = typeof mediaQueryUpdateStyle =="function"? mediaQueryUpdateStyle(...rest) : undefined;
179
+ const {width,height} = rest[0];
180
+ const rW = setDimensions !== false ? {width,height} : {};
181
+ return isFullScreenDialog()? [r,{...rW,maxWidth:"100%",maxHeight:"100%"}] : [r,setDimensions !== false && {maxHeight:getMaxHeight(),maxWidth:getMaxWidth()}];
182
+ }
183
+ }
184
+ return containerProps;
185
+ }
174
186
  const alertContentStyle = isAlert ? {paddingHorizontal:15} : null;
175
- content = <View ref={contentRef} testID = {testID+"_Content11"} {...contentProps} style={[fullScreen? {flex:1}:{maxWidth,maxHeight:maxHeight-Math.min(SCREEN_INDENT*2+50,100)},isPreloader && {paddingHorizontal:10},{backgroundColor},alertContentStyle,contentProps.style]}>
187
+ content = <View ref={contentRef} testID = {testID+"_Content11"} {...getRRProps(contentProps,false)} style={[fullScreen? {flex:1}:{maxWidth,maxHeight:maxHeight-Math.min(SCREEN_INDENT*2+50,100)},isPreloader && {paddingHorizontal:10},{backgroundColor},alertContentStyle,contentProps.style]}>
176
188
  {content}
177
189
  </View>
178
190
  if(withScrollView){
@@ -182,17 +194,6 @@ const DialogComponent = React.forwardRef((props,ref)=>{
182
194
  {content}
183
195
  </ScrollView>
184
196
  }
185
- const getRRProps = (containerProps)=>{
186
- if(!isPreloader){
187
- const {mediaQueryUpdateStyle} = containerProps;
188
- containerProps.mediaQueryUpdateStyle = (...rest)=>{
189
- const r = typeof mediaQueryUpdateStyle =="function"? mediaQueryUpdateStyle(...rest) : undefined;
190
- const {width,height} = rest[0];
191
- return isFullScreenDialog()? [r,{width,height}] : r;
192
- }
193
- }
194
- return containerProps;
195
- }
196
197
  return <ModalComponent
197
198
  onDismiss={(e)=>{
198
199
  return handleBack(e,false);
@@ -7,10 +7,10 @@ import {renderActions} from "./utils";
7
7
  import View from "$ecomponents/View";
8
8
  import { StyleSheet } from "react-native";
9
9
  import DialogActions from "./RNPDialogActions";
10
- import {usePageDimensions} from "$cdimensions/utils";
10
+ import {usePageDimensions,useWindowDimensions} from "$cdimensions/utils";
11
11
 
12
12
  const DialogActionsComponent = React.forwardRef(({actions,isAlert,onAlertRequestClose,testID,containerProps,actionMutator,actionProps,cancelButton,responsive,isFullScreen,fullScreen,actionsProps,menuProps,...rest},ref)=>{
13
- usePageDimensions();
13
+ useWindowDimensions();
14
14
  if(responsive && isFullScreen() || fullScreen){
15
15
  return null;
16
16
  }
@@ -2,10 +2,10 @@ import React from "$react";
2
2
  import {defaultObj} from "$cutils";;
3
3
  import View from "$ecomponents/View";
4
4
  import { StyleSheet } from "react-native";
5
- import {usePageDimensions} from "$cdimensions/utils";
5
+ import {useWindowDimensions} from "$cdimensions/utils";
6
6
 
7
7
  const DialogFullPageFooter = React.forwardRef(({responsive,containerProps,children,isFullScreen,fullScreen,...rest},ref)=>{
8
- usePageDimensions();
8
+ useWindowDimensions();
9
9
  if(responsive && !isFullScreen() || (typeof fullScreen =='boolean' && !fullScreen) || !React.isValidElement(children)){
10
10
  return null;
11
11
  }
@@ -5,10 +5,10 @@ import {isNonNullString,defaultObj} from "$cutils";
5
5
  import View from "$ecomponents/View";
6
6
  import theme from "$theme";
7
7
  import { StyleSheet } from "react-native";
8
- import {usePageDimensions} from "$cdimensions/utils";
8
+ import {useWindowDimensions} from "$cdimensions/utils";
9
9
 
10
10
  const DialogTitleComponent = React.forwardRef(({responsive,containerProps,title,titleProps,isFullScreen,fullScreen,...rest},ref)=>{
11
- usePageDimensions();
11
+ useWindowDimensions();
12
12
  if(responsive && isFullScreen() || fullScreen || !React.isValidElement(title,true)){
13
13
  return null;
14
14
  }
@@ -100,7 +100,6 @@ const Provider = ({children,getTableData,handleHelpScreen,navigation,swrConfig,a
100
100
  },
101
101
  }
102
102
  Auth.setRef(auth);
103
- console.log("has set ref auth ",auth);
104
103
  extendFormFields(customFormFields);
105
104
  structsData = isObj(structsData)? structsData : null;
106
105
  appConfig.tablesData = tablesData;
@@ -189,7 +188,7 @@ const Provider = ({children,getTableData,handleHelpScreen,navigation,swrConfig,a
189
188
  if(!isObj(theme)) return;
190
189
  const isDark = theme.dark || theme.isDark || isDynamicThemeSupported && isColorShemeDark ;
191
190
  const elevation = defaultObj(theme.elevation,isDark ? pTheme.dark?.elevation : pTheme.light?.elevation)
192
- const newTheme = isDark ? { ...MD3DarkTheme,fonts:configureFonts(), colors: pTheme.dark } : { ...MD3LightTheme,fonts:configureFonts(), colors: pTheme.light };
191
+ const newTheme = isDark ? { ...MD3DarkTheme,fonts:configureFonts({isV3:true}), colors: pTheme.dark } : { ...MD3LightTheme,fonts:configureFonts({isV3:true}), colors: pTheme.light };
193
192
  if(isElectron() && typeof window.ELECTRON =='object' && typeof ELECTRON.setThemeToDark =="function" && typeof ELECTRON.setThemeToLight =="function"){
194
193
  if(isDark){
195
194
  ELECTRON.setThemeToDark();
@@ -222,6 +221,7 @@ const Provider = ({children,getTableData,handleHelpScreen,navigation,swrConfig,a
222
221
  const _theme = (isObj(r) ? r : theme);
223
222
  const customCSS = _theme.customCSS;
224
223
  extendObj(Theme,{
224
+ version : 3,
225
225
  elevations : elevation,
226
226
  elevation,
227
227
  colorScheme,
@@ -120,6 +120,9 @@ const PermTextType = PropTypes.shape({
120
120
  defaultAction : PropTypes.bool,//si les actions par défaut seront associés à la permission en cours
121
121
  });
122
122
 
123
+ const permsType = PropTypes.oneOfType([
124
+ PropTypes.func,PropTypes.object,
125
+ ]);
123
126
  PermLines.propTypes = {
124
127
  data : PropTypes.object,
125
128
  gridProps : PropTypes.object,//les props du composant Grid, wrapper au contentu expandable
@@ -129,10 +132,10 @@ PermLines.propTypes = {
129
132
  PropTypes.shape({
130
133
  table : PropTypes.string,
131
134
  tableName : PropTypes.string,
132
- perms : PropTypes.object,
135
+ perms : permsType,
133
136
  })
134
137
  ).isRequired,
135
- perms : PropTypes.object,//la liste des permissions qui peuvent associer au compte d'un utilisaters
138
+ perms : permsType,//la liste des permissions qui peuvent associer au compte d'un utilisaters
136
139
  /*** si les élements de permissions seront modifiable où non */
137
140
  disabled : PropTypes.bool,
138
141
  title : PropTypes.oneOfType([
@@ -1,6 +1,6 @@
1
1
  module.exports = {
2
2
  "@fto-consult/expo-ui": {
3
- "version": "8.41.0",
3
+ "version": "8.44.0",
4
4
  "url": "https://github.com/borispipo/expo-ui#readme",
5
5
  "license": "ISC"
6
6
  },
@@ -50,17 +50,17 @@ module.exports = {
50
50
  "license": "MIT"
51
51
  },
52
52
  "@react-navigation/native": {
53
- "version": "6.1.15",
53
+ "version": "6.1.16",
54
54
  "url": "https://reactnavigation.org",
55
55
  "license": "MIT"
56
56
  },
57
57
  "@react-navigation/native-stack": {
58
- "version": "6.9.24",
58
+ "version": "6.9.25",
59
59
  "url": "https://github.com/software-mansion/react-native-screens#readme",
60
60
  "license": "MIT"
61
61
  },
62
62
  "@react-navigation/stack": {
63
- "version": "6.3.27",
63
+ "version": "6.3.28",
64
64
  "url": "https://reactnavigation.org/docs/stack-navigator/",
65
65
  "license": "MIT"
66
66
  },
@@ -139,28 +139,27 @@ module.exports = {
139
139
  "url": "https://docs.expo.dev/versions/latest/sdk/webbrowser/",
140
140
  "license": "MIT"
141
141
  },
142
+ "react": {
143
+ "version": "18.2.0",
144
+ "url": "https://reactjs.org/",
145
+ "license": "MIT"
146
+ },
142
147
  "react-native": {
143
148
  "version": "0.73.4",
144
149
  "url": "https://reactnative.dev/",
145
150
  "license": "MIT"
146
151
  },
147
- "react-native-big-list": {
148
- "version": "1.6.1",
149
- "url": "https://marcocesarato.github.io/react-native-big-list-docs/",
150
- "license": "GPL-3.0-or-later"
151
- },
152
- "react-native-blob-util": {
153
- "version": "0.18.6",
154
- "url": "https://github.com/RonRadtke/react-native-blob-util",
155
- "license": "MIT"
156
- },
157
152
  "react-native-gesture-handler": {
158
153
  "version": "2.14.1",
159
154
  "url": "https://github.com/software-mansion/react-native-gesture-handler#readme",
160
155
  "license": "MIT"
161
156
  },
157
+ "react-native-get-random-values": {
158
+ "version": "1.8.0",
159
+ "license": "MIT"
160
+ },
162
161
  "react-native-reanimated": {
163
- "version": "3.6.2",
162
+ "version": "3.6.3",
164
163
  "url": "https://github.com/software-mansion/react-native-reanimated#readme",
165
164
  "license": "MIT"
166
165
  },