mg-library 1.0.261 → 1.0.263
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/functions.js +15 -9
- package/login.js +2 -2
- package/package.json +1 -2
- package/welcome.js +0 -3
package/functions.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import Toast from 'react-native-root-toast';
|
|
1
|
+
//import Toast from 'react-native-root-toast';
|
|
2
2
|
import moment from 'moment';
|
|
3
3
|
import 'moment/locale/es';
|
|
4
4
|
import 'moment/locale/en-gb';
|
|
5
|
-
import { Notifications } from 'expo';
|
|
6
5
|
import { Camera } from 'expo-camera';
|
|
7
|
-
import * as Permissions from 'expo-permissions';
|
|
8
|
-
import Constants from 'expo-constants';
|
|
9
|
-
//import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
10
6
|
import { AsyncStorage } from 'react-native';
|
|
11
7
|
import axios from 'axios';
|
|
12
8
|
import * as mgConstants from './constants.js';
|
|
@@ -118,7 +114,7 @@ export function isValidEmail(email) {
|
|
|
118
114
|
// Toast
|
|
119
115
|
|
|
120
116
|
function showToast(config) {
|
|
121
|
-
/*
|
|
117
|
+
/* Toast.show(config.message, {
|
|
122
118
|
duration: Toast.durations.LONG,
|
|
123
119
|
position: Toast.positions.CENTER,
|
|
124
120
|
shadow: true,
|
|
@@ -261,7 +257,7 @@ export function i18nMessage(key, language, messagesSpanish, messagesEnglish) {
|
|
|
261
257
|
|
|
262
258
|
// Push Notifications
|
|
263
259
|
|
|
264
|
-
export const registerPushToken = async (store) => {
|
|
260
|
+
/* export const registerPushToken = async (store) => {
|
|
265
261
|
if (Constants.isDevice) {
|
|
266
262
|
const { status: existingStatus } = await Permissions.getAsync(Permissions.NOTIFICATIONS);
|
|
267
263
|
let finalStatus = existingStatus;
|
|
@@ -283,11 +279,11 @@ export const registerPushToken = async (store) => {
|
|
|
283
279
|
}
|
|
284
280
|
store.dispatch(mgActions.sessionPushTokenUpdate(pushToken));
|
|
285
281
|
}
|
|
286
|
-
}
|
|
282
|
+
} */
|
|
287
283
|
|
|
288
284
|
// Camera
|
|
289
285
|
|
|
290
|
-
export async function isCameraAvailable() {
|
|
286
|
+
/* export async function isCameraAvailable() {
|
|
291
287
|
let isAvailable = false;
|
|
292
288
|
await Camera.requestPermissionsAsync()
|
|
293
289
|
.then(response => {
|
|
@@ -295,4 +291,14 @@ export async function isCameraAvailable() {
|
|
|
295
291
|
isAvailable = true;
|
|
296
292
|
});
|
|
297
293
|
return isAvailable;
|
|
294
|
+
} */
|
|
295
|
+
|
|
296
|
+
export async function isCameraAvailable() {
|
|
297
|
+
let isAvailable = false;
|
|
298
|
+
await Camera.requestCameraPermissionsAsync()
|
|
299
|
+
.then(response => {
|
|
300
|
+
if(response.status === 'granted')
|
|
301
|
+
isAvailable = true;
|
|
302
|
+
});
|
|
303
|
+
return isAvailable;
|
|
298
304
|
}
|
package/login.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { Container, Content, Label,
|
|
3
|
-
import { Keyboard, StyleSheet, Image, ImageBackground, View, ActivityIndicator, TouchableOpacity } from "react-native";
|
|
2
|
+
import { Container, Content, Label, Card, CardItem, Body, Item, Form, Input, Button, Icon } from 'native-base';
|
|
3
|
+
import { Keyboard, StyleSheet, Image, Text, ImageBackground, View, ActivityIndicator, TouchableOpacity } from "react-native";
|
|
4
4
|
import { useForm } from 'react-hook-form';
|
|
5
5
|
import axios from 'axios';
|
|
6
6
|
import moment from 'moment';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mg-library",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.263",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
"expo-camera": "~14.0.3",
|
|
15
15
|
"expo-constants": "~15.4.5",
|
|
16
16
|
"expo-image-manipulator": "~11.8.0",
|
|
17
|
-
"expo-permissions": "~14.2.1",
|
|
18
17
|
"moment": "^2.27.0",
|
|
19
18
|
"moment-timezone": "^0.5.31",
|
|
20
19
|
"react": "18.2.0",
|
package/welcome.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, View, Image, FlatList, Text, TouchableOpacity } from 'react-native';
|
|
3
3
|
import { Card, CardItem } from 'native-base';
|
|
4
|
-
import { connect } from 'react-redux';
|
|
5
4
|
import { MGSubtitle } from './blocks.js';
|
|
6
5
|
import * as mgFunctions from './functions.js';
|
|
7
|
-
import * as mgBlocks from './blocks.js';
|
|
8
|
-
import * as mgClasses from './classes.js';
|
|
9
6
|
|
|
10
7
|
export function MGWelcome(props) {
|
|
11
8
|
|