react-native-steerpath-smart-map 1.29.5 → 2.0.0-alpha.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.
Files changed (116) hide show
  1. package/.eslintrc.js +66 -0
  2. package/.prettierrc +7 -0
  3. package/CHANGELOG.md +35 -0
  4. package/README.md +7 -0
  5. package/android/bin/src/main/java/com/steerpath/rnsmartmap/RNEventKeys.class +0 -0
  6. package/android/bin/src/main/java/com/steerpath/rnsmartmap/RNSmartGeofenceManager.class +0 -0
  7. package/android/bin/src/main/java/com/steerpath/rnsmartmap/RNSmartLocationManager.class +0 -0
  8. package/android/bin/src/main/java/com/steerpath/rnsmartmap/RNSmartMapManager.class +0 -0
  9. package/android/bin/src/main/java/com/steerpath/rnsmartmap/RNSmartMapModule.class +0 -0
  10. package/android/bin/src/main/java/com/steerpath/rnsmartmap/RNSmartMapPackage.class +0 -0
  11. package/android/bin/src/main/java/com/steerpath/rnsmartmap/RNSmartMapPackage.kt +28 -0
  12. package/android/bin/src/main/java/com/steerpath/rnsmartmap/RNSmartMapView.class +0 -0
  13. package/android/bin/src/main/java/com/steerpath/rnsmartmap/RNSmartMapViewManager.class +0 -0
  14. package/android/bin/src/main/java/com/steerpath/rnsmartmap/Utils.class +0 -0
  15. package/android/build.gradle +22 -33
  16. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  17. package/android/src/main/java/com/steerpath/rnsmartmap/RNSmartLocationManager.java +22 -14
  18. package/android/src/main/java/com/steerpath/rnsmartmap/RNSmartMapManager.java +9 -31
  19. package/android/src/main/java/com/steerpath/rnsmartmap/RNSmartMapPackage.java +11 -9
  20. package/android/src/main/java/com/steerpath/rnsmartmap/Utils.java +36 -36
  21. package/ios/RNSmartLocationManager.m +28 -3
  22. package/ios/RNSmartMapManager.m +10 -22
  23. package/lib/commonjs/SmartLocationManager.js +50 -0
  24. package/lib/commonjs/SmartLocationManager.js.map +1 -0
  25. package/lib/commonjs/SmartLocationManager.web.js +11 -0
  26. package/lib/commonjs/SmartLocationManager.web.js.map +1 -0
  27. package/lib/commonjs/SmartMapManager.js +59 -0
  28. package/lib/commonjs/SmartMapManager.js.map +1 -0
  29. package/lib/commonjs/SmartMapManager.web.js +24 -0
  30. package/lib/commonjs/SmartMapManager.web.js.map +1 -0
  31. package/lib/commonjs/index.js +28 -0
  32. package/lib/commonjs/index.js.map +1 -0
  33. package/lib/commonjs/package.json +1 -0
  34. package/lib/module/SmartLocationManager.js +46 -0
  35. package/lib/module/SmartLocationManager.js.map +1 -0
  36. package/lib/module/SmartLocationManager.web.js +7 -0
  37. package/lib/module/SmartLocationManager.web.js.map +1 -0
  38. package/lib/module/SmartMapManager.js +54 -0
  39. package/lib/module/SmartMapManager.js.map +1 -0
  40. package/lib/module/SmartMapManager.web.js +20 -0
  41. package/lib/module/SmartMapManager.web.js.map +1 -0
  42. package/lib/module/index.js +5 -0
  43. package/lib/module/index.js.map +1 -0
  44. package/lib/typescript/SmartLocationManager.d.ts +19 -0
  45. package/lib/typescript/SmartLocationManager.d.ts.map +1 -0
  46. package/{dist → lib/typescript}/SmartLocationManager.web.d.ts +1 -0
  47. package/lib/typescript/SmartLocationManager.web.d.ts.map +1 -0
  48. package/{dist → lib/typescript}/SmartMapManager.d.ts +13 -15
  49. package/lib/typescript/SmartMapManager.d.ts.map +1 -0
  50. package/lib/typescript/SmartMapManager.web.d.ts +8 -0
  51. package/lib/typescript/SmartMapManager.web.d.ts.map +1 -0
  52. package/lib/typescript/index.d.ts +5 -0
  53. package/lib/typescript/index.d.ts.map +1 -0
  54. package/package.json +38 -13
  55. package/react-native-steerpath-smart-map.podspec +15 -12
  56. package/src/SmartLocationManager.ts +25 -9
  57. package/src/SmartMapManager.ts +12 -19
  58. package/src/SmartMapManager.web.ts +3 -24
  59. package/src/index.ts +3 -4
  60. package/tsconfig.json +14 -9
  61. package/.eslintrc.json +0 -81
  62. package/android/bin/.project +0 -34
  63. package/android/bin/.settings/org.eclipse.buildship.core.prefs +0 -13
  64. package/android/bin/README.md +0 -14
  65. package/android/bin/build.gradle +0 -59
  66. package/android/bin/gradle/wrapper/gradle-wrapper.jar +0 -0
  67. package/android/bin/gradle/wrapper/gradle-wrapper.properties +0 -6
  68. package/android/bin/gradlew +0 -172
  69. package/android/bin/gradlew.bat +0 -84
  70. package/android/bin/src/main/AndroidManifest.xml +0 -4
  71. package/android/src/main/java/com/steerpath/rnsmartmap/RNEventKeys.java +0 -29
  72. package/android/src/main/java/com/steerpath/rnsmartmap/RNSmartGeofenceManager.java +0 -103
  73. package/android/src/main/java/com/steerpath/rnsmartmap/RNSmartMapModule.java +0 -284
  74. package/android/src/main/java/com/steerpath/rnsmartmap/RNSmartMapView.java +0 -470
  75. package/android/src/main/java/com/steerpath/rnsmartmap/RNSmartMapViewManager.java +0 -307
  76. package/dist/SmartGeofenceManager.d.ts +0 -17
  77. package/dist/SmartGeofenceManager.js +0 -61
  78. package/dist/SmartGeofenceManager.web.d.ts +0 -9
  79. package/dist/SmartGeofenceManager.web.js +0 -10
  80. package/dist/SmartLocationManager.d.ts +0 -11
  81. package/dist/SmartLocationManager.js +0 -22
  82. package/dist/SmartLocationManager.web.js +0 -4
  83. package/dist/SmartMapEventManager.web.d.ts +0 -5
  84. package/dist/SmartMapEventManager.web.js +0 -10
  85. package/dist/SmartMapManager.js +0 -53
  86. package/dist/SmartMapManager.web.d.ts +0 -12
  87. package/dist/SmartMapManager.web.js +0 -33
  88. package/dist/SmartMapView.d.ts +0 -3
  89. package/dist/SmartMapView.js +0 -294
  90. package/dist/SmartMapView.web.d.ts +0 -3
  91. package/dist/SmartMapView.web.js +0 -270
  92. package/dist/SmartMapViewProps.d.ts +0 -267
  93. package/dist/SmartMapViewProps.js +0 -76
  94. package/dist/index.d.ts +0 -5
  95. package/dist/index.js +0 -5
  96. package/dist/internalUtils.d.ts +0 -1
  97. package/dist/internalUtils.js +0 -5
  98. package/ios/RCTConvert+SmartMapView.h +0 -35
  99. package/ios/RCTConvert+SmartMapView.m +0 -295
  100. package/ios/RNSmartGeofenceManager.h +0 -24
  101. package/ios/RNSmartGeofenceManager.m +0 -110
  102. package/ios/RNSmartMapUserTaskEventManager.h +0 -19
  103. package/ios/RNSmartMapUserTaskEventManager.m +0 -46
  104. package/ios/RNSmartMapView.h +0 -37
  105. package/ios/RNSmartMapView.m +0 -21
  106. package/ios/RNSmartMapViewManager.h +0 -27
  107. package/ios/RNSmartMapViewManager.m +0 -608
  108. package/package-lock.json +0 -6570
  109. package/src/SmartGeofenceManager.ts +0 -94
  110. package/src/SmartGeofenceManager.web.ts +0 -11
  111. package/src/SmartMapEventManager.web.ts +0 -13
  112. package/src/SmartMapView.tsx +0 -377
  113. package/src/SmartMapView.web.tsx +0 -342
  114. package/src/SmartMapViewProps.ts +0 -338
  115. package/src/internalUtils.ts +0 -5
  116. package/src/typings/steerpath-smart-sdk.d.ts +0 -5
@@ -1,24 +0,0 @@
1
- //
2
- // RNSmartGeofenceManager.h
3
- // SteerpathOfficeApp
4
- //
5
- // Created by Jarvis Luong on 26/07/2019.
6
- // Copyright © 2019 Facebook. All rights reserved.
7
- //
8
-
9
- #ifndef RNSmartGeofenceManager_h
10
- #define RNSmartGeofenceManager_h
11
-
12
- #import <React/RCTBridgeModule.h>
13
- #import <React/RCTEventEmitter.h>
14
- #import <React/RCTConvert.h>
15
-
16
- #import "RCTConvert+SmartMapView.h"
17
-
18
- @import SteerpathSmartSDK;
19
-
20
- @interface RNSmartGeofenceManager : RCTEventEmitter <RCTBridgeModule, SPSmartGeofenceManagerDelegate>
21
-
22
- @end
23
-
24
- #endif /* RNSmartGeofenceManager_h */
@@ -1,110 +0,0 @@
1
- //
2
- // RNSmartGeofenceManager.m
3
- // SteerpathOfficeApp
4
- //
5
- // Created by Jarvis Luong on 26/07/2019.
6
- // Copyright © 2019 Facebook. All rights reserved.
7
- //
8
-
9
- #import "RNSmartGeofenceManager.h"
10
-
11
- @implementation RNSmartGeofenceManager
12
- {
13
- bool hasListeners;
14
- }
15
-
16
- RCT_EXPORT_MODULE(RNSmartGeofenceManager);
17
-
18
- // Will be called when this module's first listener is added.
19
- -(void)startObserving {
20
- hasListeners = YES;
21
- [[SPSmartGeofenceManager sharedInstance] addDelegate:self];
22
- // Set up any upstream listeners or background tasks as necessary
23
- }
24
-
25
- // Will be called when this module's last listener is removed, or on dealloc.
26
- -(void)stopObserving {
27
- hasListeners = NO;
28
- [[SPSmartGeofenceManager sharedInstance] removeDelegate:self];
29
- // Remove upstream listeners, stop unnecessary background tasks
30
- }
31
-
32
- - (NSArray<NSString *> *)supportedEvents
33
- {
34
- return @[@"GeofenceEntered", @"GeofenceExited", @"BeaconfenceEntered", @"BeaconfenceExited"];
35
- }
36
-
37
- RCT_EXPORT_METHOD(addGeofence:(nonnull NSString *) localRef
38
- buildingRef:(nonnull NSString*) buildingRef
39
- callback:(RCTResponseSenderBlock) callback)
40
- {
41
- SPSmartGeofenceManager* manager = [SPSmartGeofenceManager sharedInstance];
42
-
43
- [manager addGeofence:localRef building:buildingRef completion:^(SPSmartGeofenceResponseType response) {
44
- callback(@[[NSNull null], [RCTConvert SPSmartGeofenceResponseType:response]]);
45
- }];
46
- }
47
-
48
- RCT_EXPORT_METHOD(removeGeofence:(nonnull NSString *) localRef
49
- buildingRef:(nonnull NSString*) buildingRef)
50
- {
51
- SPSmartGeofenceManager* manager = [SPSmartGeofenceManager sharedInstance];
52
-
53
- [manager removeGeofence:localRef building:buildingRef];
54
- }
55
-
56
- RCT_EXPORT_METHOD(addBeaconfence:(nonnull NSString *)beaconId
57
- radius:(nonnull NSNumber*)radiusInMeter
58
- loiteringDelay:(nonnull NSNumber*)loiteringDelayInSecond
59
- callback:(RCTResponseSenderBlock) callback)
60
- {
61
- SPSmartGeofenceManager* manager = [SPSmartGeofenceManager sharedInstance];
62
-
63
- [manager addBeaconfence:beaconId radius:[radiusInMeter integerValue] loiteringDelay:[loiteringDelayInSecond doubleValue] completion:^(SPSmartGeofenceResponseType response) {
64
- callback(@[[NSNull null], [RCTConvert SPSmartGeofenceResponseType:response]]);
65
- }];
66
- }
67
-
68
- RCT_EXPORT_METHOD(removeBeaconfence:(nonnull NSString *)beaconId)
69
- {
70
- SPSmartGeofenceManager* manager = [SPSmartGeofenceManager sharedInstance];
71
-
72
- [manager removeBeaconfence:beaconId];
73
- }
74
-
75
- - (void)spSmartGeofenceManager:(SPSmartGeofenceManager *)manager
76
- didEnterGeofence:(NSString *)localRef
77
- building:(NSString *)buildingRef
78
- {
79
- if (hasListeners) { // Only send events if anyone is listening
80
- [self sendEventWithName:@"GeofenceEntered" body:@{@"localRef": localRef, @"buildingRef": buildingRef}];
81
- }
82
- }
83
-
84
- - (void)spSmartGeofenceManager:(SPSmartGeofenceManager *)manager
85
- didExitGeofence:(NSString *)localRef
86
- building:(NSString *)buildingRef
87
- {
88
- if (hasListeners) { // Only send events if anyone is listening
89
- [self sendEventWithName:@"GeofenceExited" body:@{@"localRef": localRef, @"buildingRef": buildingRef}];
90
- }
91
- }
92
-
93
- - (void)spSmartGeofenceManager:(SPSmartGeofenceManager *)manager
94
- didEnterBeaconfence:(NSString *)beaconId
95
- {
96
- if (hasListeners) { // Only send events if anyone is listening
97
- [self sendEventWithName:@"BeaconfenceEntered" body:@{@"beaconId": beaconId}];
98
- }
99
- }
100
-
101
- - (void)spSmartGeofenceManager:(SPSmartGeofenceManager *)manager
102
- didExitBeaconfence:(NSString *)beaconId
103
- {
104
- if (hasListeners) { // Only send events if anyone is listening
105
- [self sendEventWithName:@"BeaconfenceExited" body:@{@"beaconId": beaconId}];
106
- }
107
-
108
- }
109
-
110
- @end
@@ -1,19 +0,0 @@
1
- //
2
- // RNSmartMapUserTaskEventManager.h
3
- // Pods
4
- //
5
- // Created by Jarvis Luong on 18.11.2019.
6
- //
7
-
8
- #ifndef RNSmartMapUserTaskEventManager_h
9
- #define RNSmartMapUserTaskEventManager_h
10
-
11
- @interface RNSmartMapUserTaskEventManager : NSObject <SPSmartMapUserTaskDelegate>
12
-
13
- -(instancetype)initWithMapView:(RNSmartMapView*)mapView;
14
-
15
- @property (nonatomic) RNSmartMapView* mapView;
16
-
17
- @end
18
-
19
- #endif /* RNSmartMapUserTaskEventManager_h */
@@ -1,46 +0,0 @@
1
- //
2
- // RNSmartMapEventManager.m
3
- // SteerpathSmartMapSdk
4
- //
5
- // Created by Jarvis Luong on 07/08/2019.
6
- // Copyright © 2019 Facebook. All rights reserved.
7
- //
8
-
9
- #import <Foundation/Foundation.h>
10
- #import "RNSmartMapView.h"
11
- #import "RCTConvert+SmartMapView.h"
12
-
13
- @interface RNSmartMapUserTaskEventManager : NSObject <SPSmartMapUserTaskDelegate>
14
-
15
- -(instancetype)initWithMapView:(RNSmartMapView*)mapView;
16
-
17
- @property (nonatomic) RNSmartMapView* mapView;
18
-
19
- @end
20
-
21
- @implementation RNSmartMapUserTaskEventManager
22
- @synthesize mapView = mapView;
23
-
24
-
25
- -(instancetype)initWithMapView:(RNSmartMapView *)mapView
26
- {
27
- self = [self init];
28
- self.mapView = mapView;
29
- return self;
30
- }
31
-
32
- #pragma mark UserTaskEvent
33
- // Put user task event delegate here
34
-
35
- - (void)spSmartMapUserTask:(SPSmartMapUserTask *)userTask onUserTaskResponse:(SPSmartMapUserTaskResponse)response
36
- {
37
- if (mapView.onUserTaskResponse) {
38
- mapView.onUserTaskResponse(@{
39
- @"response": [RCTConvert SPSmartMapUserTaskResponse:response],
40
- @"userTask": [RCTConvert convertUserTaskToJSONWith:userTask]
41
- });
42
- }
43
- }
44
-
45
-
46
- @end
@@ -1,37 +0,0 @@
1
- //
2
- // RNSmartMapView.h
3
- // SteerpathSmartMapSdk
4
- //
5
- // Created by Jarvis Luong on 07/08/2019.
6
- // Copyright © 2019 Facebook. All rights reserved.
7
- //
8
-
9
- #import <SteerpathSmartSDK/SteerpathSmartSDK.h>
10
- #import <React/RCTComponent.h>
11
-
12
- NS_ASSUME_NONNULL_BEGIN
13
-
14
- @interface RNSmartMapView : SPSmartMapView
15
-
16
- @property(nonatomic, copy) RCTBubblingEventBlock onMapLoaded;
17
- @property(nonatomic, copy) RCTBubblingEventBlock onMapClicked;
18
- @property(nonatomic, copy) RCTBubblingEventBlock onUserFloorChanged;
19
- @property(nonatomic, copy) RCTBubblingEventBlock onVisibleFloorChanged;
20
-
21
- @property(nonatomic, copy) RCTBubblingEventBlock onViewStatusChanged;
22
- @property(nonatomic, copy) RCTBubblingEventBlock onBottomSheetStateChanged;
23
-
24
- @property(nonatomic, copy) RCTBubblingEventBlock onNavigationEnded;
25
- @property(nonatomic, copy) RCTBubblingEventBlock onNavigationFailed;
26
- @property(nonatomic, copy) RCTBubblingEventBlock onNavigationStarted;
27
- @property(nonatomic, copy) RCTBubblingEventBlock onNavigationPreviewAppeared;
28
- @property(nonatomic, copy) RCTBubblingEventBlock onNavigationDestinationReached;
29
-
30
- @property(nonatomic, copy) RCTBubblingEventBlock onUserTaskResponse;
31
-
32
- @property(nonatomic, copy) RCTBubblingEventBlock onSearchResultSelected;
33
- @property(nonatomic, copy) RCTBubblingEventBlock onSearchCategorySelected;
34
-
35
- @end
36
-
37
- NS_ASSUME_NONNULL_END
@@ -1,21 +0,0 @@
1
- //
2
- // RNSmartMapView.m
3
- // SteerpathSmartMapSdk
4
- //
5
- // Created by Jarvis Luong on 07/08/2019.
6
- // Copyright © 2019 Facebook. All rights reserved.
7
- //
8
-
9
- #import "RNSmartMapView.h"
10
-
11
- @implementation RNSmartMapView
12
-
13
- /*
14
- // Only override drawRect: if you perform custom drawing.
15
- // An empty implementation adversely affects performance during animation.
16
- - (void)drawRect:(CGRect)rect {
17
- // Drawing code
18
- }
19
- */
20
-
21
- @end
@@ -1,27 +0,0 @@
1
- //
2
- // RNSmartMapViewManager.h
3
- // SteerpathOfficeApp
4
- //
5
- // Created by Jarvis Luong on 30/07/2019.
6
- // Copyright © 2019 Facebook. All rights reserved.
7
- //
8
-
9
- #ifndef RNSmartMapViewManager_h
10
- #define RNSmartMapViewManager_h
11
-
12
- #import <React/RCTViewManager.h>
13
- #import <React/RCTUIManager.h>
14
- #import <React/RCTConvert.h>
15
- #import <SteerpathSmartSDK/SteerpathSmartSDK.h>
16
- #import <Foundation/Foundation.h>
17
-
18
- #import "RCTConvert+SmartMapView.h"
19
- #import "RNSmartMapView.h"
20
- #import "RNSmartMapUserTaskEventManager.h"
21
-
22
-
23
- @interface RNSmartMapViewManager : RCTViewManager<SPSmartMapViewDelegate>
24
-
25
- @end
26
-
27
- #endif /* RNSmartMapViewManager_h */