ordering-ui-react-native 0.21.41-test → 0.21.43-test

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.21.41-test",
3
+ "version": "0.21.43-test",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -1,4 +1,3 @@
1
- import { OIconButton } from 'ordering-ui-react-native/themes/business/src/components/shared';
2
1
  import React, { useState } from 'react';
3
2
  import {
4
3
  View,
@@ -14,6 +13,7 @@ import {
14
13
  StarPrinter
15
14
  } from 'react-native-star-io10';
16
15
  import { useTheme } from 'styled-components';
16
+ import { OIconButton } from '../shared';
17
17
 
18
18
  export const SearchStarPrinter = ({ navigation }: any) => {
19
19
 
@@ -21,7 +21,8 @@ export const SearchStarPrinter = ({ navigation }: any) => {
21
21
  let _manager: StarDeviceDiscoveryManager;
22
22
 
23
23
  const [state, setState] = useState({
24
- bluetoonabled: true,
24
+ bluetoothIsEnabled: true,
25
+ bluetoothLeIsEnabled: true,
25
26
  printers: [],
26
27
  })
27
28
 
@@ -34,10 +35,13 @@ export const SearchStarPrinter = ({ navigation }: any) => {
34
35
  try {
35
36
  await _manager?.stopDiscovery()
36
37
 
37
- var interfaceTypes: Array<InterfaceType> = []
38
- if (state.bluetoonabled) {
38
+ let interfaceTypes: Array<InterfaceType> = []
39
+ if (state.bluetoothIsEnabled) {
39
40
  interfaceTypes.push(InterfaceType.Bluetooth);
40
41
  }
42
+ if (state.bluetoothLeIsEnabled) {
43
+ interfaceTypes.push(InterfaceType.BluetoothLE);
44
+ }
41
45
 
42
46
  _manager = await StarDeviceDiscoveryManagerFactory.create(interfaceTypes);
43
47
  _manager.discoveryTime = 10000;
@@ -77,8 +81,7 @@ export const SearchStarPrinter = ({ navigation }: any) => {
77
81
  style={{ maxWidth: 40, justifyContent: 'flex-end' }}
78
82
  onClick={() => handleArrowBack()}
79
83
  />
80
- <View
81
- style={{ width: 100, marginTop: 30 }}>
84
+ <View style={{ flexDirection: 'row' }}>
82
85
  <Button
83
86
  title="Discovery"
84
87
  onPress={_onPressDiscoveryButton}