@fto-consult/expo-ui 8.18.7 → 8.19.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.
- package/bin/create-app/dependencies.js +1 -0
- package/package.json +3 -6
- package/setup-android-ndk.txt +1 -0
- package/src/components/Dropdown/index.js +5 -5
- package/src/components/Form/Fields/SelectField.js +12 -2
- package/src/context/Provider.js +2 -0
- package/src/context/init-sqlite/index.js +2 -0
- package/src/context/init-sqlite/index.native.js +10 -0
- package/src/screens/Help/openLibraries.js +19 -24
@@ -22,6 +22,7 @@ module.exports = {
|
|
22
22
|
"expo-status-bar": "~1.11.1",
|
23
23
|
"expo-system-ui": "~2.9.3",
|
24
24
|
"expo-web-browser": "~12.8.2",
|
25
|
+
"react":"18.2.0",
|
25
26
|
"react-native": "0.73.2",
|
26
27
|
"@react-native-async-storage/async-storage": "1.21.0",
|
27
28
|
"react-native-safe-area-context": "4.8.2",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fto-consult/expo-ui",
|
3
|
-
"version": "8.
|
3
|
+
"version": "8.19.1",
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
5
5
|
"scripts": {
|
6
6
|
"clear-npx-cache": "npx clear-npx-cache",
|
@@ -47,7 +47,7 @@
|
|
47
47
|
"delete-node-modules": "rimraf ./**/node_modules",
|
48
48
|
"dev": "npx expo start --no-dev --minify -c",
|
49
49
|
"modifier-url-remote-git": "git remote set-url origin 'https://borispipo@github.com/borispipo/smart-eneo.git'",
|
50
|
-
"update": "npm i @fto-consult/node-utils@latest react-native-web react-native-blob-util@latest react-native-big-list@latest apexcharts@latest file-saver@latest google-libphonenumber@latest @fto-consult/common@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
|
50
|
+
"update": "npm i @fto-consult/node-utils@latest react-native-web react-native-blob-util@latest react-native-big-list@latest apexcharts@latest file-saver@latest google-libphonenumber@latest @fto-consult/common@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 react-native-get-random-values@latest && npm run update-apexchart && npm run find-licenses"
|
51
51
|
},
|
52
52
|
"bin": {
|
53
53
|
"expo-ui": "./bin/index.js"
|
@@ -78,10 +78,8 @@
|
|
78
78
|
"html2canvas": "^1.4.1",
|
79
79
|
"htmlparser2-without-node-native": "^3.9.2",
|
80
80
|
"is-plain-obj": "^4.1.0",
|
81
|
-
"js-base64": "^3.7.5",
|
82
81
|
"jsbarcode": "^3.11.6",
|
83
82
|
"prop-types": "^15.8.1",
|
84
|
-
"react": "^18.2.0",
|
85
83
|
"react-content-loader": "^6.2.1",
|
86
84
|
"react-dom": "^18.2.0",
|
87
85
|
"react-native-big-list": "^1.6.1",
|
@@ -90,7 +88,7 @@
|
|
90
88
|
"react-native-iphone-x-helper": "^1.3.1",
|
91
89
|
"react-native-mime-types": "^2.4.0",
|
92
90
|
"react-native-paper": "^5.12.3",
|
93
|
-
"react-native-paper-dates": "^0.21.
|
91
|
+
"react-native-paper-dates": "^0.21.8",
|
94
92
|
"react-native-web": "^0.19.10",
|
95
93
|
"react-virtuoso": "^4.6.3",
|
96
94
|
"readable-stream": "^4.5.2",
|
@@ -98,7 +96,6 @@
|
|
98
96
|
"sharp-cli": "^2.1.0",
|
99
97
|
"stream-browserify": "^3.0.0",
|
100
98
|
"tippy.js": "^6.3.7",
|
101
|
-
"websql": "^2.0.3",
|
102
99
|
"xlsx": "^0.18.5"
|
103
100
|
},
|
104
101
|
"devDependencies": {
|
@@ -0,0 +1 @@
|
|
1
|
+
https://stackoverflow.com/questions/64372383/ndk-at-library-android-sdk-ndk-bundle-did-not-have-a-source-properties-file/72644593
|
@@ -45,10 +45,10 @@ class DropdownComponent extends AppComponent {
|
|
45
45
|
value : this.prepareSortableFields(),override : false, writable : false,
|
46
46
|
},
|
47
47
|
___hasErrorSymbol : {value:uniqid(`${this.props.name||''}error-symbol-prop`)},
|
48
|
-
|
48
|
+
hasNoValidSelectedValue : {value:()=>{
|
49
49
|
return this.isLoading()? false : !!this[this.___hasErrorSymbol];
|
50
50
|
}},
|
51
|
-
|
51
|
+
toggleHasNoValidSelectedValue : {value:(bool)=>{
|
52
52
|
if(typeof bool =='boolean'){
|
53
53
|
this[this.___hasErrorSymbol] = bool;
|
54
54
|
}
|
@@ -319,9 +319,9 @@ class DropdownComponent extends AppComponent {
|
|
319
319
|
} else if(isNonNullString(selectedValues)) {
|
320
320
|
sDText = selectedValues
|
321
321
|
}
|
322
|
-
this.
|
322
|
+
this.toggleHasNoValidSelectedValue(!!sDText);
|
323
323
|
} else {
|
324
|
-
this.
|
324
|
+
this.toggleHasNoValidSelectedValue(false);
|
325
325
|
}
|
326
326
|
if(this.canHandleMultiple && counter > maxCount && sDText){
|
327
327
|
sDText+= ", et "+((counter-maxCount).formatNumber()+" de plus")
|
@@ -900,7 +900,7 @@ class DropdownComponent extends AppComponent {
|
|
900
900
|
if(renderTag){
|
901
901
|
tagProps = defaultObj(tagProps);
|
902
902
|
}
|
903
|
-
error = error || this.
|
903
|
+
error = error || this.hasNoValidSelectedValue() || false;
|
904
904
|
if(error && selectedText && (!helperText || !React.isValidElement(helperText,true))){
|
905
905
|
helperText = `Ce champ admet des valeurs par défaut invalide où innexistant dans la liste des éléments à sélectionner`;
|
906
906
|
}
|
@@ -49,7 +49,7 @@ export default class FormSelectField extends Field{
|
|
49
49
|
return !this.isFilter();
|
50
50
|
}
|
51
51
|
getValue () {
|
52
|
-
if(this._field && isFunction(this._field
|
52
|
+
if(this._field && isFunction(this._field?.getSelected)){
|
53
53
|
let selectedItems = this._field.getSelectedItems(true);
|
54
54
|
if(Object.size(selectedItems,true)<=0) {
|
55
55
|
return this.props.multiple ? [] : undefined;
|
@@ -59,11 +59,21 @@ export default class FormSelectField extends Field{
|
|
59
59
|
return super.getValue();
|
60
60
|
}
|
61
61
|
getSelectedItems (force){
|
62
|
-
if(this._field && isFunction(this._field
|
62
|
+
if(this._field && isFunction(this._field?.getSelected)){
|
63
63
|
return this._field.getSelectedItems(force);
|
64
64
|
}
|
65
65
|
return null;
|
66
66
|
}
|
67
|
+
hasNoValidSelectedValue(){
|
68
|
+
if(this._field && isFunction(this._field?.hasNoValidSelectedValue)){
|
69
|
+
return this._field.hasNoValidSelectedValue();
|
70
|
+
}
|
71
|
+
return undefined;
|
72
|
+
}
|
73
|
+
isValid(...args){
|
74
|
+
if(this.hasNoValidSelectedValue() === true) return false;
|
75
|
+
return super.isValid(...args);
|
76
|
+
}
|
67
77
|
getSelectedItem(index){
|
68
78
|
let items = this.getSelectedItems(true);
|
69
79
|
if(typeof index !== 'undefined' && isObjOrArray(items)){
|
package/src/context/Provider.js
CHANGED
@@ -25,6 +25,7 @@ import notify from "$cnotify";
|
|
25
25
|
import {showPrompt} from "$ecomponents/Dialog/confirm";
|
26
26
|
import {SWRConfig} from "$swr";
|
27
27
|
import {Keyboard } from 'react-native';
|
28
|
+
import initSQLite from "./init-sqlite";
|
28
29
|
|
29
30
|
Object.map(Utils,(v,i)=>{
|
30
31
|
if(typeof v =='function' && typeof window !='undefined' && window && !window[i]){
|
@@ -306,6 +307,7 @@ const Provider = ({children,getTableData,handleHelpScreen,navigation,swrConfig,a
|
|
306
307
|
},[]);
|
307
308
|
const {linking} = navigation;
|
308
309
|
React.useEffect(()=>{
|
310
|
+
initSQLite();
|
309
311
|
const onScreenFocus = ({sanitizedName})=>{
|
310
312
|
if(activeScreenRef.current){
|
311
313
|
screensRef.current[activeScreenRef.current] = null;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import * as FileSystem from 'expo-file-system';
|
2
|
+
export default function initSQLite (){
|
3
|
+
return Promise.resolve({});
|
4
|
+
const createD = ()=>FileSystem.makeDirectoryAsync(FileSystem.documentDirectory + 'SQLite').catch(e=>{});
|
5
|
+
return FileSystem.getInfoAsync(FileSystem.documentDirectory + 'SQLite').then((info)=>{
|
6
|
+
if(!info?.exists){
|
7
|
+
createD();
|
8
|
+
}
|
9
|
+
}).catch(createD);
|
10
|
+
}
|
@@ -1,8 +1,12 @@
|
|
1
1
|
module.exports = {
|
2
2
|
"@fto-consult/expo-ui": {
|
3
|
-
"
|
4
|
-
"
|
5
|
-
"
|
3
|
+
"name": "@fto-consult/expo-ui",
|
4
|
+
"version": "8.19.0",
|
5
|
+
"repository": {
|
6
|
+
"type": "git",
|
7
|
+
"url": "git+https://github.com/borispipo/expo-ui.git"
|
8
|
+
},
|
9
|
+
"homepage": "https://github.com/borispipo/expo-ui#readme"
|
6
10
|
},
|
7
11
|
"@babel/plugin-proposal-export-namespace-from": {
|
8
12
|
"version": "7.18.9",
|
@@ -30,7 +34,7 @@ module.exports = {
|
|
30
34
|
"license": "MIT"
|
31
35
|
},
|
32
36
|
"@fto-consult/common": {
|
33
|
-
"version": "4.
|
37
|
+
"version": "4.19.4",
|
34
38
|
"url": "https://github.com/borispipo/common#readme",
|
35
39
|
"license": "ISC"
|
36
40
|
},
|
@@ -53,11 +57,6 @@ module.exports = {
|
|
53
57
|
"url": "https://github.com/tleunen/babel-plugin-module-resolver.git",
|
54
58
|
"license": "MIT"
|
55
59
|
},
|
56
|
-
"commander": {
|
57
|
-
"version": "11.1.0",
|
58
|
-
"url": "https://github.com/tj/commander.js.git",
|
59
|
-
"license": "MIT"
|
60
|
-
},
|
61
60
|
"crypto-browserify": {
|
62
61
|
"version": "3.12.0",
|
63
62
|
"url": "https://github.com/crypto-browserify/crypto-browserify",
|
@@ -87,10 +86,6 @@ module.exports = {
|
|
87
86
|
"version": "4.1.0",
|
88
87
|
"license": "MIT"
|
89
88
|
},
|
90
|
-
"js-base64": {
|
91
|
-
"version": "3.7.6",
|
92
|
-
"license": "BSD-3-Clause"
|
93
|
-
},
|
94
89
|
"jsbarcode": {
|
95
90
|
"version": "3.11.6",
|
96
91
|
"url": "https://github.com/lindell/JsBarcode#readme",
|
@@ -101,11 +96,6 @@ module.exports = {
|
|
101
96
|
"url": "https://facebook.github.io/react/",
|
102
97
|
"license": "MIT"
|
103
98
|
},
|
104
|
-
"react": {
|
105
|
-
"version": "18.2.0",
|
106
|
-
"url": "https://reactjs.org/",
|
107
|
-
"license": "MIT"
|
108
|
-
},
|
109
99
|
"react-content-loader": {
|
110
100
|
"version": "6.2.1",
|
111
101
|
"url": "https://github.com/danilowoz/react-content-loader",
|
@@ -116,6 +106,16 @@ module.exports = {
|
|
116
106
|
"url": "https://reactjs.org/",
|
117
107
|
"license": "MIT"
|
118
108
|
},
|
109
|
+
"react-native-big-list": {
|
110
|
+
"version": "1.6.1",
|
111
|
+
"url": "https://marcocesarato.github.io/react-native-big-list-docs/",
|
112
|
+
"license": "GPL-3.0-or-later"
|
113
|
+
},
|
114
|
+
"react-native-blob-util": {
|
115
|
+
"version": "0.19.6",
|
116
|
+
"url": "https://github.com/RonRadtke/react-native-blob-util",
|
117
|
+
"license": "MIT"
|
118
|
+
},
|
119
119
|
"react-native-get-random-values": {
|
120
120
|
"version": "1.10.0",
|
121
121
|
"license": "MIT"
|
@@ -135,7 +135,7 @@ module.exports = {
|
|
135
135
|
"license": "MIT"
|
136
136
|
},
|
137
137
|
"react-native-paper-dates": {
|
138
|
-
"version": "0.21.
|
138
|
+
"version": "0.21.8",
|
139
139
|
"url": "https://github.com/web-ridge/react-native-paper-dates#readme",
|
140
140
|
"license": "MIT"
|
141
141
|
},
|
@@ -174,11 +174,6 @@ module.exports = {
|
|
174
174
|
"url": "https://atomiks.github.io/tippyjs/",
|
175
175
|
"license": "MIT"
|
176
176
|
},
|
177
|
-
"websql": {
|
178
|
-
"version": "2.0.3",
|
179
|
-
"url": "git://github.com/nolanlawson/node-websql.git",
|
180
|
-
"license": "Apache-2.0"
|
181
|
-
},
|
182
177
|
"xlsx": {
|
183
178
|
"version": "0.18.5",
|
184
179
|
"url": "https://sheetjs.com/",
|