@fto-consult/expo-ui 7.2.1 → 7.2.2
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 +4 -4
- package/src/components/Datagrid/Accordion/Row.js +5 -2
- package/src/components/Datagrid/Common/Common.js +1 -1
- package/src/components/Form/Fields/Field.js +2 -1
- package/src/context/hooks.js +4 -4
- package/src/layouts/Screen/TableData.js +3 -2
- package/src/layouts/Screen/utils.js +7 -2
- package/src/pdf/index.js +0 -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": "7.2.
|
3
|
+
"version": "7.2.2",
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
5
5
|
"main": "main",
|
6
6
|
"scripts": {
|
@@ -71,7 +71,7 @@
|
|
71
71
|
"@expo/html-elements": "^0.5.1",
|
72
72
|
"@expo/vector-icons": "^13.0.0",
|
73
73
|
"@faker-js/faker": "^8.0.2",
|
74
|
-
"@fto-consult/common": "^3.72.
|
74
|
+
"@fto-consult/common": "^3.72.18",
|
75
75
|
"@pchmn/expo-material3-theme": "^1.3.1",
|
76
76
|
"@react-native-async-storage/async-storage": "1.18.2",
|
77
77
|
"@react-native-community/datetimepicker": "7.2.0",
|
@@ -111,8 +111,8 @@
|
|
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.
|
115
|
-
"react-native-paper-dates": "^0.20.
|
114
|
+
"react-native-paper": "^5.11.4",
|
115
|
+
"react-native-paper-dates": "^0.20.5",
|
116
116
|
"react-native-reanimated": "~3.3.0",
|
117
117
|
"react-native-safe-area-context": "4.6.3",
|
118
118
|
"react-native-screens": "~3.22.0",
|
@@ -137,7 +137,7 @@ const DatagridAccordionRow = React.forwardRef((props,ref)=>{
|
|
137
137
|
}}
|
138
138
|
>
|
139
139
|
<HStack
|
140
|
-
style={[styles.renderedContent,viewWrapperStyle,!hasAvatar && styles.contentContainerNotAvatar]}
|
140
|
+
style={[styles.renderedContent,!hasAvatar && styles.renderedContentHasNotAvatar,viewWrapperStyle,!hasAvatar && styles.contentContainerNotAvatar]}
|
141
141
|
testID={testID+'_ContentContainer'}
|
142
142
|
>
|
143
143
|
{hasAvatar?<View testID={testID+"_AvatarContentContainer"} style={[styles.avatarContent]}>
|
@@ -206,6 +206,9 @@ const styles = StyleSheet.create({
|
|
206
206
|
paddingRight : 10,
|
207
207
|
width : "100%",
|
208
208
|
},
|
209
|
+
renderedContentHasNotAvatar : {
|
210
|
+
justifyContent : "space-between",
|
211
|
+
},
|
209
212
|
right : {
|
210
213
|
marginHorizontal : 0,
|
211
214
|
paddingLeft:0,
|
@@ -248,7 +251,7 @@ const styles = StyleSheet.create({
|
|
248
251
|
paddingLeft : 2,
|
249
252
|
},
|
250
253
|
content : {
|
251
|
-
maxWidth : "
|
254
|
+
maxWidth : "80%",
|
252
255
|
},
|
253
256
|
});
|
254
257
|
|
@@ -3275,7 +3275,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
3275
3275
|
cb = undefined;
|
3276
3276
|
}
|
3277
3277
|
fetchOptions = this.getFetchOptions({fetchOptions,parseMangoQueries:false});
|
3278
|
-
if(typeof this.props.fetchOptionsMutator =='function' && this.props.fetchOptionsMutator(fetchOptions) === false){
|
3278
|
+
if(typeof this.props.fetchOptionsMutator =='function' && this.props.fetchOptionsMutator({fetchOptions,context:this}) === false){
|
3279
3279
|
this.isFetchingData = false;
|
3280
3280
|
return resolve(sData);
|
3281
3281
|
}
|
@@ -333,8 +333,9 @@ export default class Field extends AppComponent {
|
|
333
333
|
}
|
334
334
|
return true;
|
335
335
|
}
|
336
|
-
onNoValidate({msg,value,context,validRule,validParams,event,...rest}){
|
336
|
+
onNoValidate({msg,message,value,context,validRule,validParams,event,...rest}){
|
337
337
|
this.validatingValue = value;
|
338
|
+
msg = msg || message;
|
338
339
|
this.trigger.call(this,"noValidate",{...defaultObj(rest),props:this.props,context:this,msg,value,event,validRule,validParams},(result)=>{
|
339
340
|
this.setState({
|
340
341
|
errorText : msg,
|
package/src/context/hooks.js
CHANGED
@@ -31,13 +31,13 @@ export const useSWR = (path,options)=>{
|
|
31
31
|
swrOptions : {
|
32
32
|
provider: () => new Map(),
|
33
33
|
...swrConfig,
|
34
|
-
isOnline() {
|
34
|
+
isOnline(...rest) {
|
35
35
|
if(isLocalHost) return true;
|
36
|
-
return swrConfig.isOnline();
|
36
|
+
return swrConfig.isOnline(...rest);
|
37
37
|
},
|
38
38
|
initReconnect(cb) {
|
39
|
-
|
40
|
-
|
39
|
+
if(isLocalHost) return cb();
|
40
|
+
return swrConfig.initReconnect(cb);
|
41
41
|
},
|
42
42
|
...extendObj({},options,options?.swrOptions)
|
43
43
|
}
|
@@ -350,7 +350,7 @@ export default class TableDataScreenComponent extends FormDataScreen{
|
|
350
350
|
saveButton : isUpdated?'Modifier':'Enregistrer',
|
351
351
|
currentData:data,
|
352
352
|
hasManyData : this.hasManyData(),
|
353
|
-
onPressToPrint : this.print.bind(this),
|
353
|
+
onPressToPrint : this.doSave.bind(this),//this.print.bind(this),
|
354
354
|
datas,
|
355
355
|
currentDataIndex:currentIndex,
|
356
356
|
onPressToPrevious:this.goToPreviousData.bind(this),
|
@@ -702,6 +702,7 @@ export default class TableDataScreenComponent extends FormDataScreen{
|
|
702
702
|
}
|
703
703
|
}
|
704
704
|
doSave ({goBack,data,action}){
|
705
|
+
action = defaultStr(action,this.clickedEl);
|
705
706
|
const cb = ()=>{
|
706
707
|
if(action === 'new'){
|
707
708
|
this.reset();
|
@@ -720,7 +721,7 @@ export default class TableDataScreenComponent extends FormDataScreen{
|
|
720
721
|
return false;
|
721
722
|
}
|
722
723
|
if(action === 'clone'){
|
723
|
-
this.clone(
|
724
|
+
this.clone(Object.clone(data));
|
724
725
|
return false;
|
725
726
|
}
|
726
727
|
const isUpdated = this.isDocEditing(data);
|
@@ -5,6 +5,7 @@ import {Colors} from "$theme";
|
|
5
5
|
import { COPY_ICON,PRINT_ICON} from "$ecomponents/Icon";
|
6
6
|
import {getTableDataRouteName} from "$enavigation/utils";
|
7
7
|
|
8
|
+
const isFunction = x => typeof x =='function';
|
8
9
|
//@seee : https://github.com/typeorm/typeorm/blob/master/src/entity-schema/EntitySchemaColumnOptions.ts
|
9
10
|
///'_rev','_id','code',
|
10
11
|
export const generatedColumnsProperties = ["createDate","updateDate","createdBy","updateBy",'updatedDate','updatedHour','createdHour','createdDate']
|
@@ -275,12 +276,16 @@ export function renderActions({context,isUpdate,newElementLabel,readablePerms:c
|
|
275
276
|
|
276
277
|
export const createCallback = ({context,action,callback,force}) =>{
|
277
278
|
if(force === true && isFunction(callback)) return callback;
|
278
|
-
return (
|
279
|
+
return (a,...args) =>{
|
279
280
|
context = context || {};
|
280
281
|
if(action && typeof action == "string"){
|
281
282
|
context.clickedEl = action;
|
282
283
|
}
|
283
|
-
if(
|
284
|
+
if(isObj(a)){
|
285
|
+
a.action = defaultStr(a.action,action);
|
286
|
+
a.clickedEl = a.clickedEl || a.action;
|
287
|
+
}
|
288
|
+
if(isFunction(callback)) callback.call(context,a,...args);
|
284
289
|
return true;
|
285
290
|
}
|
286
291
|
}
|
package/src/pdf/index.js
CHANGED
@@ -9,7 +9,6 @@ import session from "$session";
|
|
9
9
|
|
10
10
|
const {createPdf} = pdfMake;
|
11
11
|
pdfMake.createPdf = (docDefinition,...rest)=>{
|
12
|
-
console.log("creating pdf ",docDefinition);
|
13
12
|
try {
|
14
13
|
//@see : https://pdfmake.github.io/docs/0.1/getting-started/client-side/methods/
|
15
14
|
const pdf = createPdf(docDefinition,...rest);
|
@@ -1 +1 @@
|
|
1
|
-
module.exports = {"@fto-consult/expo-ui":{"name":"@fto-consult/expo-ui","version":"7.1
|
1
|
+
module.exports = {"@fto-consult/expo-ui":{"name":"@fto-consult/expo-ui","version":"7.2.1","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.72.16","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.2","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.4","url":"https://callstack.github.io/react-native-paper","license":"MIT"},"react-native-paper-dates":{"version":"0.20.5","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"}};
|