@fto-consult/expo-ui 8.54.0 → 8.55.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.
- package/bin/create-app/src/auth/index.js +2 -3
- package/package.json +1 -1
- package/src/auth/Login.js +4 -10
- package/src/components/Datagrid/Accordion/Row.js +20 -9
- package/src/components/Datagrid/Accordion/index.js +1 -1
- package/src/components/Datagrid/Test/index.js +1 -1
- package/src/context/Provider.js +0 -1
- package/src/screens/Help/openLibraries.js +31 -27
- package/src/components/Datagrid/Test/accordion.js +0 -80
- package/src/components/Datagrid/Test/multiplicater.js +0 -7
- package/src/realm/Provider/index.js +0 -12
- package/src/realm/Provider/realm.not-enabled.js +0 -7
- package/src/realm/index.js +0 -16
- package/src/realm/react/index.js +0 -9
- package/src/realm/realm/index.js +0 -5
- package/src/realm/realm/index.web.js +0 -5
@@ -31,9 +31,9 @@ export default {
|
|
31
31
|
Pour override l'interface de connexion par défaut, vous dévez définir le contenu de cette propriété comme étant un composant React qui sera rendu
|
32
32
|
rendu en lieu et place du composant de connexion par défaut : Ce composant aura comme props :
|
33
33
|
{
|
34
|
-
|
34
|
+
withScreen : {boolean}, //si le contenu de l'écran doit être rendu dans un Screen ReactNative
|
35
35
|
onSuccess <function> : (data)=><any>, la fonction appelée en cas de success
|
36
|
-
appBarProps <object>, les props à passer au composant ApppBar de l'écran de connexion, lorsque
|
36
|
+
appBarProps <object>, les props à passer au composant ApppBar de l'écran de connexion, lorsque withScreen est à true
|
37
37
|
auth <object>, //le composant auth récupérer à l'aide du hook useAuth de $cauth. définit les fonctions suivantes :
|
38
38
|
{
|
39
39
|
signIn : (data)=><Promise>, la fonction permettant de connecter l'utilisateur
|
@@ -78,7 +78,6 @@ export default {
|
|
78
78
|
headerTopContent : <ReactComponent | ReactNode, le contenu a afficher au headerTop de l'interface de connexion
|
79
79
|
header : <ReactComponent| ReactNode>, le contenu du qui sera rendu immédiatement après le composant Header, par défaut, le texte "Connectez vous svp est affiché". Ce contenu doit être rendu si l'on souhaite override le texte "Connectez vous SVP"
|
80
80
|
containerProps : <object>, les props du composant <Surface/>, le composant qui est le wrapper du composant FormData en charge de récupérer les données de l'interface de connexion
|
81
|
-
withHeaderAvatar : <boolean>, si l'avatar ou l'iconne de connexion sera afficher à l'interface de connexion par défaut
|
82
81
|
canSubmit : ({step,...rest})=> <boolean>, //si les donées du formulaire peuvent être submit
|
83
82
|
beforeSubmit : ({step,data,...rest})=><void>, //la fonction appélée immédiatement avant le submit des donénes
|
84
83
|
...loginProps {object}, les props Supplémentaires à passer au composant FormData utilisé pour le rendu du formulaire de connexion
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fto-consult/expo-ui",
|
3
|
-
"version": "8.
|
3
|
+
"version": "8.55.0",
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
5
5
|
"react-native-paper-doc": "https://github.com/callstack/react-native-paper/tree/main/docs/docs/guides",
|
6
6
|
"scripts": {
|
package/src/auth/Login.js
CHANGED
@@ -101,7 +101,7 @@ export default function LoginComponent(props){
|
|
101
101
|
},[state.step]);
|
102
102
|
if(React.isComponent(Login)) return <Login
|
103
103
|
{...props}
|
104
|
-
|
104
|
+
withScreen = {withPortal}
|
105
105
|
appBarProps = {appBarProps}
|
106
106
|
onSuccess = {onSuccess}
|
107
107
|
auth = {auth}
|
@@ -119,7 +119,6 @@ export default function LoginComponent(props){
|
|
119
119
|
const {header,
|
120
120
|
headerTopContent:HeaderTopContent,
|
121
121
|
containerProps : customContainerProps,
|
122
|
-
withHeaderAvatar,
|
123
122
|
contentProps : customContentProps,
|
124
123
|
withScrollView:customWithScrollView,children,initialize,contentTop,data:loginData,canGoToNext,keyboardEvents,onSuccess:onLoginSuccess,mutateData,beforeSubmit:beforeSubmitForm,canSubmit:canSubmitForm,onStepChange,...loginProps} = loginPropsMutator({
|
125
124
|
...state,
|
@@ -141,7 +140,6 @@ export default function LoginComponent(props){
|
|
141
140
|
});
|
142
141
|
const containerProps = defaultObj(customContainerProps);
|
143
142
|
const contentProps = defaultObj(customContentProps);
|
144
|
-
|
145
143
|
/****la fonction à utiliser pour vérifier si l'on peut envoyer les données pour connextion
|
146
144
|
* par défaut, on envoie les données lorssqu'on est à l'étappe 2
|
147
145
|
* **/
|
@@ -232,12 +230,9 @@ export default function LoginComponent(props){
|
|
232
230
|
formName = {formName}
|
233
231
|
testID = {testID+"_FormData"}
|
234
232
|
style = {[styles.formData,{backgroundColor}]}
|
235
|
-
header = {<View style = {[styles.header]}>
|
236
|
-
|
237
|
-
{
|
238
|
-
React.isValidElement(header)? header :
|
239
|
-
<Label testID={testID+"_HeaderText"} bool style={{color:theme.colors.primaryOnSurface,fontSize:18,paddingTop:10}}>Connectez vous SVP</Label>
|
240
|
-
}
|
233
|
+
header = {React.isValidElement(header)? header : <View testID={`${testID}_HeaderContainer`} style = {[styles.header]}>
|
234
|
+
<Avatar testID={testID+"_Avatar"} size={50} secondary icon = 'lock'/>
|
235
|
+
<Label testID={testID+"_HeaderText"} bool style={{color:theme.colors.primaryOnSurface,fontSize:18,paddingTop:10}}>Connectez vous SVP</Label>
|
241
236
|
</View>}
|
242
237
|
responsive = {false}
|
243
238
|
{...loginProps}
|
@@ -349,7 +344,6 @@ const styles = StyleSheet.create({
|
|
349
344
|
});
|
350
345
|
|
351
346
|
LoginComponent.propTypes = {
|
352
|
-
withHeaderAvatar:PropTypes.bool,//si l'on affichera l'avatar de connexion
|
353
347
|
headerTopContent : PropTypes.oneOfType([
|
354
348
|
PropTypes.func,
|
355
349
|
PropTypes.node,
|
@@ -10,9 +10,7 @@ import {styles as rStyles,getRowStyle} from "../utils";
|
|
10
10
|
import { useIsRowSelected,useDatagrid} from "../hooks";
|
11
11
|
import {HStack} from "$ecomponents/Stack";
|
12
12
|
|
13
|
-
const DatagridAccordionRow = React.forwardRef((
|
14
|
-
const {
|
15
|
-
selectable,
|
13
|
+
const DatagridAccordionRow = React.forwardRef(({selectable,
|
16
14
|
rowKey,
|
17
15
|
bottomSheetTitle:customBottomSheetTitle,
|
18
16
|
bottomSheetTitlePrefix,
|
@@ -24,14 +22,22 @@ const DatagridAccordionRow = React.forwardRef((props,ref)=>{
|
|
24
22
|
item,
|
25
23
|
index,
|
26
24
|
style,
|
25
|
+
contentContainerProps,
|
27
26
|
numColumns,
|
28
27
|
onToggleExpand,
|
29
28
|
callArgs,
|
30
|
-
|
29
|
+
title,
|
30
|
+
right,
|
31
|
+
rightProps,
|
32
|
+
description,
|
33
|
+
avatarContent,
|
34
|
+
rowProps,
|
35
|
+
testID,
|
36
|
+
...restProps},ref)=>{
|
31
37
|
const {context} = useDatagrid();
|
32
|
-
let {title,right,rightProps,description,avatarContent,rowProps} = props;
|
33
38
|
rowProps = defaultObj(rowProps);
|
34
39
|
rightProps = defaultObj(rightProps);
|
40
|
+
contentContainerProps = defaultObj(contentContainerProps);
|
35
41
|
if(!isObj(item)) {
|
36
42
|
return null;
|
37
43
|
}
|
@@ -63,7 +69,7 @@ const DatagridAccordionRow = React.forwardRef((props,ref)=>{
|
|
63
69
|
|
64
70
|
let rowIndex = defaultDecimal(index);
|
65
71
|
let rowIndexCount = index+1;
|
66
|
-
|
72
|
+
testID = defaultStr(testID,"RN_DatagridAccordionRow"+(rowKey||rowIndex))
|
67
73
|
const hasAvatar = React.isValidElement(avatarContent);
|
68
74
|
const handleRowToggle = (event)=>{
|
69
75
|
if(selectable === false) return;
|
@@ -111,6 +117,7 @@ const DatagridAccordionRow = React.forwardRef((props,ref)=>{
|
|
111
117
|
right = typeof right === 'function'? right ({color:theme.colors.primaryOnSurface,selectable:true,style:[rStyles.lineHeight,styles.right]}) : right;
|
112
118
|
return <Pressable
|
113
119
|
disabled = {selectable===false?true : false}
|
120
|
+
{...restProps}
|
114
121
|
{...rowProps}
|
115
122
|
testID={testID}
|
116
123
|
children = {null}
|
@@ -121,10 +128,10 @@ const DatagridAccordionRow = React.forwardRef((props,ref)=>{
|
|
121
128
|
styles.bordered,
|
122
129
|
wrapStyle,
|
123
130
|
rowProps.style,
|
131
|
+
style,
|
124
132
|
numColumns > 1 && styles.multiColumns,
|
125
133
|
selected && styles.selected,
|
126
134
|
selectable !== false && theme.styles.cursorPointer,
|
127
|
-
//style,
|
128
135
|
]}
|
129
136
|
ref = {(el)=>{
|
130
137
|
if(el){
|
@@ -137,8 +144,9 @@ const DatagridAccordionRow = React.forwardRef((props,ref)=>{
|
|
137
144
|
}}
|
138
145
|
>
|
139
146
|
<HStack
|
140
|
-
style={[styles.renderedContent,!hasAvatar && styles.renderedContentHasNotAvatar,viewWrapperStyle,!hasAvatar && styles.contentContainerNotAvatar]}
|
141
147
|
testID={testID+'_ContentContainer'}
|
148
|
+
{...contentContainerProps}
|
149
|
+
style={[styles.renderedContent,!hasAvatar && styles.renderedContentHasNotAvatar,viewWrapperStyle,!hasAvatar && styles.contentContainerNotAvatar,contentContainerProps.style]}
|
142
150
|
>
|
143
151
|
{hasAvatar?<View testID={testID+"_AvatarContentContainer"} style={[styles.avatarContent]}>
|
144
152
|
{avatarContent}
|
@@ -205,6 +213,7 @@ const styles = StyleSheet.create({
|
|
205
213
|
paddingHorizontal : 0,
|
206
214
|
paddingRight : 10,
|
207
215
|
width : "100%",
|
216
|
+
flexWrap : "nowrap"
|
208
217
|
},
|
209
218
|
renderedContentHasNotAvatar : {
|
210
219
|
justifyContent : "space-between",
|
@@ -216,6 +225,8 @@ const styles = StyleSheet.create({
|
|
216
225
|
paddingVertical : 5,
|
217
226
|
fontSize:13,
|
218
227
|
flexWrap: 'nowrap',
|
228
|
+
textAlign : "right",
|
229
|
+
alignSelf : "right",
|
219
230
|
},
|
220
231
|
row : {
|
221
232
|
flexDirection:'row',
|
@@ -227,7 +238,7 @@ const styles = StyleSheet.create({
|
|
227
238
|
},
|
228
239
|
container : {
|
229
240
|
paddingVertical : 0,
|
230
|
-
paddingHorizontal :
|
241
|
+
paddingHorizontal : 7,
|
231
242
|
marginHorizontal : 0,
|
232
243
|
flexWrap : 'nowrap',
|
233
244
|
justifyContent : 'center',
|
@@ -212,7 +212,7 @@ const DatagridFactory = (Factory)=>{
|
|
212
212
|
this.renderingItemsProps[rowKey] = defaultObj(this.renderingItemsProps[rowKey]);
|
213
213
|
this.renderingItemsProps[rowKey].ref = el;
|
214
214
|
}}
|
215
|
-
style = {style}
|
215
|
+
style = {[style,this.props.accordionProps?.style]}
|
216
216
|
callArgs = {this.getItemCallArgs({item,index})}
|
217
217
|
onRowPress = {this.props.onRowPress}
|
218
218
|
onRowLongPress = {this.props.onRowLongPress}
|
package/src/context/Provider.js
CHANGED
@@ -86,7 +86,6 @@ Object.map(Utils,(v,i)=>{
|
|
86
86
|
loginPropsMutator : ({object})=><{object}>, la fonction permettant de muter les props du composant Login,
|
87
87
|
}
|
88
88
|
swrConfig : {object},//les paramètres de configuration de l'objet swr utilisée dans le composant SWRDatagrid
|
89
|
-
realm : {}, //les options de configurations de la base de données realmdb
|
90
89
|
*/
|
91
90
|
const Provider = ({children,getTableData,handleHelpScreen,navigation,swrConfig,auth:cAuth,components:cComponents,parseMangoQueries,getStructData,tablesData,structsData,...props})=>{
|
92
91
|
const {extendAppTheme} = appConfig;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module.exports = {
|
2
2
|
"@fto-consult/expo-ui": {
|
3
|
-
"version": "8.
|
3
|
+
"version": "8.54.1",
|
4
4
|
"url": "https://github.com/borispipo/expo-ui#readme",
|
5
5
|
"license": "ISC"
|
6
6
|
},
|
@@ -15,7 +15,7 @@ module.exports = {
|
|
15
15
|
"license": "MIT"
|
16
16
|
},
|
17
17
|
"@expo/html-elements": {
|
18
|
-
"version": "0.
|
18
|
+
"version": "0.9.1",
|
19
19
|
"url": "https://github.com/expo/expo/tree/main/packages/html-elements",
|
20
20
|
"license": "MIT"
|
21
21
|
},
|
@@ -39,38 +39,28 @@ module.exports = {
|
|
39
39
|
"url": "https://github.com/pchmn/expo-material3-theme#readme",
|
40
40
|
"license": "MIT"
|
41
41
|
},
|
42
|
-
"@react-native-async-storage/async-storage": {
|
43
|
-
"version": "1.21.0",
|
44
|
-
"url": "https://github.com/react-native-async-storage/async-storage#readme",
|
45
|
-
"license": "MIT"
|
46
|
-
},
|
47
|
-
"@react-native-community/datetimepicker": {
|
48
|
-
"version": "7.6.1",
|
49
|
-
"url": "https://github.com/react-native-community/datetimepicker#readme",
|
50
|
-
"license": "MIT"
|
51
|
-
},
|
52
42
|
"@react-native-community/netinfo": {
|
53
43
|
"version": "11.1.0",
|
54
44
|
"url": "https://github.com/react-native-netinfo/react-native-netinfo#readme",
|
55
45
|
"license": "MIT"
|
56
46
|
},
|
57
47
|
"@react-native/assets-registry": {
|
58
|
-
"version": "0.
|
59
|
-
"url": "
|
48
|
+
"version": "0.74.75",
|
49
|
+
"url": "https://github.com/facebook/react-native/tree/HEAD/packages/assets#readme",
|
60
50
|
"license": "MIT"
|
61
51
|
},
|
62
52
|
"@react-navigation/native": {
|
63
|
-
"version": "6.1.
|
53
|
+
"version": "6.1.17",
|
64
54
|
"url": "https://reactnavigation.org",
|
65
55
|
"license": "MIT"
|
66
56
|
},
|
67
57
|
"@react-navigation/native-stack": {
|
68
|
-
"version": "6.9.
|
58
|
+
"version": "6.9.26",
|
69
59
|
"url": "https://github.com/software-mansion/react-native-screens#readme",
|
70
60
|
"license": "MIT"
|
71
61
|
},
|
72
62
|
"@react-navigation/stack": {
|
73
|
-
"version": "6.3.
|
63
|
+
"version": "6.3.29",
|
74
64
|
"url": "https://reactnavigation.org/docs/stack-navigator/",
|
75
65
|
"license": "MIT"
|
76
66
|
},
|
@@ -114,6 +104,11 @@ module.exports = {
|
|
114
104
|
"url": "https://docs.expo.dev/versions/latest/sdk/font/",
|
115
105
|
"license": "MIT"
|
116
106
|
},
|
107
|
+
"expo-image-manipulator": {
|
108
|
+
"version": "11.8.0",
|
109
|
+
"url": "https://docs.expo.dev/versions/latest/sdk/imagemanipulator/",
|
110
|
+
"license": "MIT"
|
111
|
+
},
|
117
112
|
"expo-image-picker": {
|
118
113
|
"version": "14.7.1",
|
119
114
|
"url": "https://docs.expo.dev/versions/latest/sdk/imagepicker/",
|
@@ -154,26 +149,25 @@ module.exports = {
|
|
154
149
|
"url": "https://docs.expo.dev/versions/latest/sdk/webbrowser/",
|
155
150
|
"license": "MIT"
|
156
151
|
},
|
152
|
+
"react": {
|
153
|
+
"version": "18.2.0",
|
154
|
+
"url": "https://reactjs.org/",
|
155
|
+
"license": "MIT"
|
156
|
+
},
|
157
157
|
"react-native": {
|
158
158
|
"version": "0.73.5",
|
159
159
|
"url": "https://reactnative.dev/",
|
160
160
|
"license": "MIT"
|
161
161
|
},
|
162
|
-
"react-native-big-list": {
|
163
|
-
"version": "1.6.1",
|
164
|
-
"url": "https://marcocesarato.github.io/react-native-big-list-docs/",
|
165
|
-
"license": "GPL-3.0-or-later"
|
166
|
-
},
|
167
|
-
"react-native-blob-util": {
|
168
|
-
"version": "0.18.6",
|
169
|
-
"url": "https://github.com/RonRadtke/react-native-blob-util",
|
170
|
-
"license": "MIT"
|
171
|
-
},
|
172
162
|
"react-native-gesture-handler": {
|
173
163
|
"version": "2.14.1",
|
174
164
|
"url": "https://github.com/software-mansion/react-native-gesture-handler#readme",
|
175
165
|
"license": "MIT"
|
176
166
|
},
|
167
|
+
"react-native-get-random-values": {
|
168
|
+
"version": "1.8.0",
|
169
|
+
"license": "MIT"
|
170
|
+
},
|
177
171
|
"react-native-reanimated": {
|
178
172
|
"version": "3.6.2",
|
179
173
|
"url": "https://github.com/software-mansion/react-native-reanimated#readme",
|
@@ -194,11 +188,21 @@ module.exports = {
|
|
194
188
|
"url": "https://github.com/react-native-community/react-native-svg",
|
195
189
|
"license": "MIT"
|
196
190
|
},
|
191
|
+
"react-native-view-shot": {
|
192
|
+
"version": "3.8.0",
|
193
|
+
"url": "https://github.com/gre/react-native-view-shot",
|
194
|
+
"license": "MIT"
|
195
|
+
},
|
197
196
|
"react-native-webview": {
|
198
197
|
"version": "13.6.4",
|
199
198
|
"url": "https://github.com/react-native-webview/react-native-webview#readme",
|
200
199
|
"license": "MIT"
|
201
200
|
},
|
201
|
+
"sharp-cli": {
|
202
|
+
"version": "2.1.1",
|
203
|
+
"url": "https://github.com/vseventer/sharp-cli",
|
204
|
+
"license": "MIT"
|
205
|
+
},
|
202
206
|
"stream-browserify": {
|
203
207
|
"version": "3.0.0",
|
204
208
|
"url": "https://github.com/browserify/stream-browserify",
|
@@ -1,80 +0,0 @@
|
|
1
|
-
// Copyright 2023 @fto-consult/Boris Fouomene. All rights reserved.
|
2
|
-
// Use of this source code is governed by a BSD-style
|
3
|
-
// license that can be found in the LICENSE file.
|
4
|
-
import Label from "$ecomponents/Label";
|
5
|
-
let multiplicater = require("./multiplicater");
|
6
|
-
import DateLib from "$date";
|
7
|
-
export default (args,from,to) =>{
|
8
|
-
let {rowData}= args;
|
9
|
-
rowData = defaultObj(rowData);
|
10
|
-
let cost = multiplicater({rowData,columnField:'cost'},from,to);
|
11
|
-
let tbFrom = "",tbTo = "",typeText = "";
|
12
|
-
let label = defaultStr(rowData.label)
|
13
|
-
let labelT = label;
|
14
|
-
if(label.length >250){
|
15
|
-
labelT = label.substring(0,245)+"...";
|
16
|
-
}
|
17
|
-
switch(rowData.type){
|
18
|
-
case "PSA":
|
19
|
-
tbFrom = "THIRD_PARTIES";
|
20
|
-
tbTo = "CHECKOUTS";
|
21
|
-
typeText = "Vente";
|
22
|
-
break;
|
23
|
-
case "PPU":
|
24
|
-
tbTo = "THIRD_PARTIES";
|
25
|
-
tbFrom = "CHECKOUTS";
|
26
|
-
typeText = "Achat";
|
27
|
-
break;
|
28
|
-
case "PDE":
|
29
|
-
tbTo = "THIRD_PARTIES";
|
30
|
-
tbFrom = "CHECKOUTS";
|
31
|
-
typeText = "Décaissement";
|
32
|
-
break;
|
33
|
-
case "PTR":
|
34
|
-
tbFrom = "CHECKOUTS";
|
35
|
-
tbTo = "CHECKOUTS";
|
36
|
-
typeText = "Transfert";
|
37
|
-
break;
|
38
|
-
case "PIN":
|
39
|
-
tbFrom = "THIRD_PARTIES";
|
40
|
-
tbTo = "CHECKOUTS";
|
41
|
-
typeText = "Encaissement";
|
42
|
-
}
|
43
|
-
if(typeText){
|
44
|
-
typeText = "["+typeText+"]"
|
45
|
-
}
|
46
|
-
if(cost > 0){
|
47
|
-
cost = cost.formatMoney();
|
48
|
-
} else cost = undefined;
|
49
|
-
|
50
|
-
return {
|
51
|
-
title : <div className="accordion-payment">
|
52
|
-
<Label
|
53
|
-
dbName={rowData.dbId}
|
54
|
-
table = {"PAYMENTS"}
|
55
|
-
_id = {rowData.code}
|
56
|
-
>
|
57
|
-
{typeText.toUpperCase()+" "+rowData.code}
|
58
|
-
</Label>
|
59
|
-
</div>,
|
60
|
-
content : <div>
|
61
|
-
{tbFrom && <Label
|
62
|
-
dbName={"common"}
|
63
|
-
table = {tbFrom}
|
64
|
-
_id = {tbFrom+"/"+rowData.from}
|
65
|
-
>
|
66
|
-
{rowData.from}
|
67
|
-
</Label>}
|
68
|
-
{tbFrom && tbTo && " => "}
|
69
|
-
{tbTo && <Label
|
70
|
-
dbName={"common"}
|
71
|
-
table = {tbTo}
|
72
|
-
_id = {tbTo+"/"+rowData.to}
|
73
|
-
>
|
74
|
-
{rowData.to+", "}
|
75
|
-
</Label>}
|
76
|
-
<span>{DateLib.format(rowData.date,DateLib.defaultDateFormat)+(rowData.mode?(" ["+rowData.mode+"]"):"")+
|
77
|
-
(cost? ((", Coût : ").toUpperCase()+cost):"")}</span>
|
78
|
-
</div>,
|
79
|
-
}
|
80
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import useExpoUI from "$econtext/hooks";
|
2
|
-
import React from "$react";
|
3
|
-
|
4
|
-
export default function ExpoUIRealmProvider({children,...props}){
|
5
|
-
return children;
|
6
|
-
const {realm:{RealmProvider,Provider}} = useExpoUI();
|
7
|
-
RealmProvider = React.isComponent(RealmProvider)? RealmProvider : React.isComponent(Provider)?Provider : null;
|
8
|
-
if(!RealmProvider){
|
9
|
-
throw "Vous devez definir le provider realm de l'application, dans l'objet real de la fonction registerApp de $expo-ui";
|
10
|
-
}
|
11
|
-
return <RealmProvider>{children}</RealmProvider>
|
12
|
-
}
|
@@ -1,7 +0,0 @@
|
|
1
|
-
export default function RealNotEnabledProvider({children}){
|
2
|
-
return children;
|
3
|
-
}
|
4
|
-
|
5
|
-
export const useExpoUIRealm = ()=>{
|
6
|
-
throw "La base de données realm n'est pas autorisée, veuillez l'autorisez dans les options de votre fichier babel.config.alias, options withRealm à true";
|
7
|
-
}
|
package/src/realm/index.js
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
import Realm from "./realm";
|
2
|
-
|
3
|
-
export default Realm;
|
4
|
-
|
5
|
-
export * from "./realm";
|
6
|
-
|
7
|
-
export * from "./react";
|
8
|
-
|
9
|
-
export class Model extends Realm.Object{
|
10
|
-
constructor(props){
|
11
|
-
super(props);
|
12
|
-
}
|
13
|
-
static fields;
|
14
|
-
static tableName;//Table name.
|
15
|
-
static name;
|
16
|
-
}
|
package/src/realm/react/index.js
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
import {createRealmContext} from '@realm/react';
|
2
|
-
export * from '@realm/react';
|
3
|
-
|
4
|
-
/*** permet de créer un contexte associé à l'objet Ream */
|
5
|
-
export const createContext = (realmConfig)=>{
|
6
|
-
return createRealmContext(realmConfig);
|
7
|
-
}
|
8
|
-
|
9
|
-
export * from "$erealmProvider";
|
package/src/realm/realm/index.js
DELETED