mg-library 1.0.466 → 1.0.468

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/blocks.js CHANGED
@@ -11,6 +11,7 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
11
11
 
12
12
  import './prototypes.js';
13
13
  import * as mgFunctionsLib from './functions.js';
14
+ import * as mgConstantsLib from './constants.js';
14
15
  import * as mgLoginLib from './login.js';
15
16
 
16
17
  export function MGWelcome(props) {
@@ -404,7 +405,7 @@ export function MGCamera(props) {
404
405
  props.process.goForward(props.nextStep);
405
406
  props.dispatch(props.actions.endProcessing());
406
407
  }
407
- const [facing, setFacing] = useState('front');
408
+ const [facing, setFacing] = useState(mgConstantsLib.CAMERA_FACING_FRONT);
408
409
  const FlipIcon = () => (
409
410
  <MaterialCommunityIcons
410
411
  name='camera-flip-outline'
@@ -433,7 +434,7 @@ export function MGCamera(props) {
433
434
  accessoryLeft={FlipIcon}
434
435
  onPress={() => {
435
436
  setFacing(
436
- facing === 'back' ? 'front' : 'back'
437
+ facing === mgConstantsLib.CAMERA_FACING_BACK ? mgConstantsLib.CAMERA_FACING_FRONT : mgConstantsLib.CAMERA_FACING_BACK
437
438
  )
438
439
  }}>
439
440
  <Text>{mgFunctionsLib.i18nString('doInvertCamera', props.language)}</Text>
@@ -452,7 +453,7 @@ export function MGCamera(props) {
452
453
  </View>
453
454
  );
454
455
  return (
455
- <View style={{ flex: 1, justifyContent: 'flex-start', backgroundColor: 'red', alignItems: 'center' }}>
456
+ <View style={{ flex: 1, flexGrow: 0.8, justifyContent: 'flex-start', alignItems: 'center' }}>
456
457
  <Card header={cardHeader} footer={cardFooter}>
457
458
  <View style={{ alignItems: 'center' }}>
458
459
  <CameraView
package/constants.js CHANGED
@@ -11,6 +11,9 @@ export const SCREEN_HOME = 'Home';
11
11
 
12
12
  export const ACCESS_TOKEN = 'accessToken';
13
13
 
14
+ export const CAMERA_FACING_BACK = 'back';
15
+ export const CAMERA_FACING_FRONT = 'front';
16
+
14
17
  // Date & Time
15
18
 
16
19
  export const TIME_FORMAT = 'HH:mm';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mg-library",
3
- "version": "1.0.466",
3
+ "version": "1.0.468",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {