@woosmap/react-native-plugin-geofencing 0.1.27 → 0.2.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.
- package/android/build.gradle +5 -5
- package/android/src/main/java/com/reactnativeplugingeofencing/AbstractPushHelper.java +7 -0
- package/android/src/main/java/com/reactnativeplugingeofencing/AirshipPushHelper.java +157 -0
- package/android/src/main/java/com/reactnativeplugingeofencing/PluginGeofencingModule.java +4 -0
- package/android/src/main/java/com/reactnativeplugingeofencing/WoosRegionReadyListener.java +8 -1
- package/android/src/main/java/com/reactnativeplugingeofencing/WoosmapMessageAndKey.java +1 -0
- package/android/src/main/java/com/reactnativeplugingeofencing/WoosmapUtil.java +17 -0
- package/ios/AirshipEvents.swift +48 -12
- package/ios/PluginGeofencing.swift +64 -54
- package/ios/WoosmapGeofenceService.swift +14 -13
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/internal/Location.js.map +1 -1
- package/lib/commonjs/internal/Poi.js.map +1 -1
- package/lib/commonjs/internal/Region.js.map +1 -1
- package/lib/commonjs/internal/Visit.js.map +1 -1
- package/lib/commonjs/internal/Zoi.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/Location.js.map +1 -1
- package/lib/module/internal/Poi.js.map +1 -1
- package/lib/module/internal/Region.js.map +1 -1
- package/lib/module/internal/Visit.js.map +1 -1
- package/lib/module/internal/Zoi.js.map +1 -1
- package/package.json +1 -4
- package/react-native-plugin-geofencing.podspec +9 -2
- package/src/index.tsx +0 -375
- package/src/internal/Airship.tsx +0 -24
- package/src/internal/Location.tsx +0 -46
- package/src/internal/MarketingCloud.tsx +0 -24
- package/src/internal/Poi.tsx +0 -107
- package/src/internal/Region.tsx +0 -66
- package/src/internal/Visit.tsx +0 -49
- package/src/internal/Zoi.tsx +0 -107
- package/src/internal/nativeInterface.tsx +0 -8
- package/src/internal/types.tsx +0 -20
|
@@ -63,7 +63,7 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
//MARK: Private method
|
|
66
|
-
private func
|
|
66
|
+
private func showWoosmapError(_ msg: String) -> NSError {
|
|
67
67
|
var result: [String: Any] = [:]
|
|
68
68
|
result["message"] = msg
|
|
69
69
|
let resultError: NSError = NSError(domain: WoosmapGeofenceMessage.plugin_errorDomain, code: WoosmapGeofenceMessage.plugin_errorcode,userInfo: result)
|
|
@@ -79,35 +79,45 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
79
79
|
@objc(initialize:withResolver:withRejecter:)
|
|
80
80
|
func initialize(command: NSDictionary, resolve:RCTPromiseResolveBlock,reject:RCTPromiseRejectBlock) -> Void{
|
|
81
81
|
|
|
82
|
-
guard let
|
|
82
|
+
guard let initParameters = command as? [String: Any] else {
|
|
83
83
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
84
84
|
WoosmapGeofenceMessage.plugin_parsingFailed,
|
|
85
|
-
|
|
85
|
+
showWoosmapError(WoosmapGeofenceMessage.plugin_parsingFailed))
|
|
86
86
|
return
|
|
87
87
|
}
|
|
88
|
-
var
|
|
88
|
+
var isCallUnsuccessful = false
|
|
89
89
|
var privateKeyWoosmapAPI = ""
|
|
90
|
+
var isAirshipCallbackEnable: Bool = false
|
|
90
91
|
|
|
91
|
-
if let keyWoosmapAPI =
|
|
92
|
+
if let keyWoosmapAPI = initParameters["privateKeyWoosmapAPI"] as? String {
|
|
92
93
|
privateKeyWoosmapAPI = keyWoosmapAPI
|
|
93
94
|
}
|
|
95
|
+
#if canImport(AirshipKit)
|
|
96
|
+
if let keyAirshipPush = initParameters["enableAirshipConnector"] as? Bool {
|
|
97
|
+
isAirshipCallbackEnable = keyAirshipPush
|
|
98
|
+
}
|
|
99
|
+
#endif
|
|
94
100
|
|
|
95
|
-
if let trackingProfile =
|
|
101
|
+
if let trackingProfile = initParameters["trackingProfile"] as? String {
|
|
96
102
|
if ConfigurationProfile(rawValue: trackingProfile) != nil {
|
|
97
|
-
WoosmapGeofenceService.setup(woosmapKey: privateKeyWoosmapAPI,
|
|
103
|
+
WoosmapGeofenceService.setup(woosmapKey: privateKeyWoosmapAPI,
|
|
104
|
+
configurationProfile: trackingProfile,
|
|
105
|
+
airshipTrackingEnable: isAirshipCallbackEnable)
|
|
98
106
|
|
|
99
107
|
} else {
|
|
100
|
-
|
|
108
|
+
isCallUnsuccessful = true
|
|
101
109
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
102
110
|
WoosmapGeofenceMessage.invalidProfile,
|
|
103
|
-
|
|
111
|
+
showWoosmapError(WoosmapGeofenceMessage.invalidProfile))
|
|
104
112
|
|
|
105
113
|
}
|
|
106
114
|
|
|
107
115
|
} else {
|
|
108
|
-
WoosmapGeofenceService.setup(woosmapKey: privateKeyWoosmapAPI,
|
|
116
|
+
WoosmapGeofenceService.setup(woosmapKey: privateKeyWoosmapAPI,
|
|
117
|
+
configurationProfile: "",
|
|
118
|
+
airshipTrackingEnable: isAirshipCallbackEnable)
|
|
109
119
|
}
|
|
110
|
-
if(
|
|
120
|
+
if(isCallUnsuccessful == false){
|
|
111
121
|
resolve(WoosmapGeofenceMessage.initialize)
|
|
112
122
|
}
|
|
113
123
|
}
|
|
@@ -151,21 +161,21 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
151
161
|
} catch let error as WoosGeofenceError {
|
|
152
162
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
153
163
|
error.localizedDescription,
|
|
154
|
-
|
|
164
|
+
showWoosmapError(error.localizedDescription))
|
|
155
165
|
} catch {
|
|
156
166
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
157
167
|
error.localizedDescription,
|
|
158
|
-
|
|
168
|
+
showWoosmapError(error.localizedDescription))
|
|
159
169
|
}
|
|
160
170
|
} else {
|
|
161
171
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
162
172
|
WoosmapGeofenceMessage.woosemapNotInitialized,
|
|
163
|
-
|
|
173
|
+
showWoosmapError(WoosmapGeofenceMessage.woosemapNotInitialized))
|
|
164
174
|
}
|
|
165
175
|
} else {
|
|
166
176
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
167
177
|
WoosmapGeofenceMessage.invalidWoosmapKey,
|
|
168
|
-
|
|
178
|
+
showWoosmapError(WoosmapGeofenceMessage.invalidWoosmapKey))
|
|
169
179
|
}
|
|
170
180
|
}
|
|
171
181
|
|
|
@@ -180,21 +190,21 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
180
190
|
} catch let error as WoosGeofenceError {
|
|
181
191
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
182
192
|
error.localizedDescription,
|
|
183
|
-
|
|
193
|
+
showWoosmapError(error.localizedDescription))
|
|
184
194
|
} catch {
|
|
185
195
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
186
196
|
error.localizedDescription,
|
|
187
|
-
|
|
197
|
+
showWoosmapError(error.localizedDescription))
|
|
188
198
|
}
|
|
189
199
|
} else {
|
|
190
200
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
191
201
|
WoosmapGeofenceMessage.woosemapNotInitialized,
|
|
192
|
-
|
|
202
|
+
showWoosmapError(WoosmapGeofenceMessage.woosemapNotInitialized))
|
|
193
203
|
}
|
|
194
204
|
} else {
|
|
195
205
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
196
206
|
WoosmapGeofenceMessage.invalidWoosmapKey,
|
|
197
|
-
|
|
207
|
+
showWoosmapError(WoosmapGeofenceMessage.invalidWoosmapKey))
|
|
198
208
|
}
|
|
199
209
|
}
|
|
200
210
|
|
|
@@ -215,7 +225,7 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
215
225
|
else{
|
|
216
226
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
217
227
|
WoosmapGeofenceMessage.woosemapNotInitialized,
|
|
218
|
-
|
|
228
|
+
showWoosmapError(WoosmapGeofenceMessage.woosemapNotInitialized))
|
|
219
229
|
}
|
|
220
230
|
}
|
|
221
231
|
|
|
@@ -325,7 +335,7 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
325
335
|
} else {
|
|
326
336
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
327
337
|
WoosmapGeofenceMessage.woosemapNotInitialized,
|
|
328
|
-
|
|
338
|
+
showWoosmapError(WoosmapGeofenceMessage.woosemapNotInitialized))
|
|
329
339
|
}
|
|
330
340
|
|
|
331
341
|
}
|
|
@@ -384,7 +394,7 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
384
394
|
} else {
|
|
385
395
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
386
396
|
WoosmapGeofenceMessage.woosemapNotInitialized,
|
|
387
|
-
|
|
397
|
+
showWoosmapError(WoosmapGeofenceMessage.woosemapNotInitialized))
|
|
388
398
|
}
|
|
389
399
|
|
|
390
400
|
}
|
|
@@ -467,11 +477,11 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
467
477
|
if lat == 0 || lng == 0 {
|
|
468
478
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
469
479
|
WoosmapGeofenceMessage.invalidLocation,
|
|
470
|
-
|
|
480
|
+
showWoosmapError(WoosmapGeofenceMessage.invalidLocation))
|
|
471
481
|
} else if !(regiontype == "circle" || regiontype == "isochrone") {
|
|
472
482
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
473
483
|
WoosmapGeofenceMessage.invalidRegionType,
|
|
474
|
-
|
|
484
|
+
showWoosmapError(WoosmapGeofenceMessage.invalidRegionType))
|
|
475
485
|
} else {
|
|
476
486
|
let coordinate: CLLocationCoordinate2D = CLLocationCoordinate2D.init(latitude: lat, longitude: lng)
|
|
477
487
|
|
|
@@ -485,19 +495,19 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
485
495
|
else{
|
|
486
496
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
487
497
|
WoosmapGeofenceMessage.regionInfoDuplicateID,
|
|
488
|
-
|
|
498
|
+
showWoosmapError(WoosmapGeofenceMessage.regionInfoDuplicateID))
|
|
489
499
|
}
|
|
490
500
|
}
|
|
491
501
|
} else {
|
|
492
502
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
493
503
|
WoosmapGeofenceMessage.regionInfoEmptyOrNull,
|
|
494
|
-
|
|
504
|
+
showWoosmapError(WoosmapGeofenceMessage.regionInfoEmptyOrNull))
|
|
495
505
|
}
|
|
496
506
|
|
|
497
507
|
} else {
|
|
498
508
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
499
509
|
WoosmapGeofenceMessage.woosemapNotInitialized,
|
|
500
|
-
|
|
510
|
+
showWoosmapError(WoosmapGeofenceMessage.woosemapNotInitialized))
|
|
501
511
|
}
|
|
502
512
|
}
|
|
503
513
|
|
|
@@ -516,21 +526,21 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
516
526
|
} catch let error as WoosGeofenceError {
|
|
517
527
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
518
528
|
error.localizedDescription,
|
|
519
|
-
|
|
529
|
+
showWoosmapError(error.localizedDescription))
|
|
520
530
|
} catch {
|
|
521
531
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
522
532
|
error.localizedDescription,
|
|
523
|
-
|
|
533
|
+
showWoosmapError(error.localizedDescription))
|
|
524
534
|
}
|
|
525
535
|
} else {
|
|
526
536
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
527
537
|
WoosmapGeofenceMessage.invalidSFMCCredentials,
|
|
528
|
-
|
|
538
|
+
showWoosmapError(WoosmapGeofenceMessage.invalidSFMCCredentials))
|
|
529
539
|
}
|
|
530
540
|
} else {
|
|
531
541
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
532
542
|
WoosmapGeofenceMessage.woosemapNotInitialized,
|
|
533
|
-
|
|
543
|
+
showWoosmapError(WoosmapGeofenceMessage.woosemapNotInitialized))
|
|
534
544
|
}
|
|
535
545
|
}
|
|
536
546
|
|
|
@@ -560,12 +570,12 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
560
570
|
} else {
|
|
561
571
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
562
572
|
WoosmapGeofenceMessage.invalidPOIRadius,
|
|
563
|
-
|
|
573
|
+
showWoosmapError(WoosmapGeofenceMessage.invalidPOIRadius))
|
|
564
574
|
}
|
|
565
575
|
} else {
|
|
566
576
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
567
577
|
WoosmapGeofenceMessage.woosemapNotInitialized,
|
|
568
|
-
|
|
578
|
+
showWoosmapError(WoosmapGeofenceMessage.woosemapNotInitialized))
|
|
569
579
|
}
|
|
570
580
|
}
|
|
571
581
|
|
|
@@ -586,7 +596,7 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
586
596
|
} else {
|
|
587
597
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
588
598
|
WoosmapGeofenceMessage.woosemapNotInitialized,
|
|
589
|
-
|
|
599
|
+
showWoosmapError(WoosmapGeofenceMessage.woosemapNotInitialized))
|
|
590
600
|
}
|
|
591
601
|
}
|
|
592
602
|
|
|
@@ -605,19 +615,19 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
605
615
|
else{
|
|
606
616
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
607
617
|
WoosmapGeofenceMessage.notfound_regionid,
|
|
608
|
-
|
|
618
|
+
showWoosmapError(WoosmapGeofenceMessage.notfound_regionid))
|
|
609
619
|
}
|
|
610
620
|
}
|
|
611
621
|
else{
|
|
612
622
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
613
623
|
WoosmapGeofenceMessage.required_regionid,
|
|
614
|
-
|
|
624
|
+
showWoosmapError(WoosmapGeofenceMessage.required_regionid))
|
|
615
625
|
}
|
|
616
626
|
|
|
617
627
|
} else {
|
|
618
628
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
619
629
|
WoosmapGeofenceMessage.woosemapNotInitialized,
|
|
620
|
-
|
|
630
|
+
showWoosmapError(WoosmapGeofenceMessage.woosemapNotInitialized))
|
|
621
631
|
}
|
|
622
632
|
}
|
|
623
633
|
|
|
@@ -633,7 +643,7 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
633
643
|
} else {
|
|
634
644
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
635
645
|
WoosmapGeofenceMessage.woosemapNotInitialized,
|
|
636
|
-
|
|
646
|
+
showWoosmapError(WoosmapGeofenceMessage.woosemapNotInitialized))
|
|
637
647
|
}
|
|
638
648
|
}
|
|
639
649
|
|
|
@@ -653,23 +663,23 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
653
663
|
catch let error as WoosGeofenceError {
|
|
654
664
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
655
665
|
error.localizedDescription,
|
|
656
|
-
|
|
666
|
+
showWoosmapError(error.localizedDescription))
|
|
657
667
|
} catch {
|
|
658
668
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
659
669
|
error.localizedDescription,
|
|
660
|
-
|
|
670
|
+
showWoosmapError(error.localizedDescription))
|
|
661
671
|
}
|
|
662
672
|
}
|
|
663
673
|
else{
|
|
664
674
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
665
675
|
WoosmapGeofenceMessage.required_regionid,
|
|
666
|
-
|
|
676
|
+
showWoosmapError(WoosmapGeofenceMessage.required_regionid))
|
|
667
677
|
}
|
|
668
678
|
|
|
669
679
|
} else {
|
|
670
680
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
671
681
|
WoosmapGeofenceMessage.woosemapNotInitialized,
|
|
672
|
-
|
|
682
|
+
showWoosmapError(WoosmapGeofenceMessage.woosemapNotInitialized))
|
|
673
683
|
}
|
|
674
684
|
}
|
|
675
685
|
|
|
@@ -690,7 +700,7 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
690
700
|
} else {
|
|
691
701
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
692
702
|
WoosmapGeofenceMessage.woosemapNotInitialized,
|
|
693
|
-
|
|
703
|
+
showWoosmapError(WoosmapGeofenceMessage.woosemapNotInitialized))
|
|
694
704
|
}
|
|
695
705
|
}
|
|
696
706
|
|
|
@@ -709,19 +719,19 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
709
719
|
else{
|
|
710
720
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
711
721
|
WoosmapGeofenceMessage.notfound_locationid,
|
|
712
|
-
|
|
722
|
+
showWoosmapError(WoosmapGeofenceMessage.notfound_locationid))
|
|
713
723
|
}
|
|
714
724
|
}
|
|
715
725
|
else{
|
|
716
726
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
717
727
|
WoosmapGeofenceMessage.required_regionid,
|
|
718
|
-
|
|
728
|
+
showWoosmapError(WoosmapGeofenceMessage.required_regionid))
|
|
719
729
|
}
|
|
720
730
|
|
|
721
731
|
} else {
|
|
722
732
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
723
733
|
WoosmapGeofenceMessage.woosemapNotInitialized,
|
|
724
|
-
|
|
734
|
+
showWoosmapError(WoosmapGeofenceMessage.woosemapNotInitialized))
|
|
725
735
|
}
|
|
726
736
|
}
|
|
727
737
|
|
|
@@ -741,7 +751,7 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
741
751
|
} else {
|
|
742
752
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
743
753
|
WoosmapGeofenceMessage.woosemapNotInitialized,
|
|
744
|
-
|
|
754
|
+
showWoosmapError(WoosmapGeofenceMessage.woosemapNotInitialized))
|
|
745
755
|
}
|
|
746
756
|
}
|
|
747
757
|
|
|
@@ -760,19 +770,19 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
760
770
|
else{
|
|
761
771
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
762
772
|
WoosmapGeofenceMessage.notfound_poiid,
|
|
763
|
-
|
|
773
|
+
showWoosmapError(WoosmapGeofenceMessage.notfound_poiid))
|
|
764
774
|
}
|
|
765
775
|
}
|
|
766
776
|
else{
|
|
767
777
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
768
778
|
WoosmapGeofenceMessage.required_poiid,
|
|
769
|
-
|
|
779
|
+
showWoosmapError(WoosmapGeofenceMessage.required_poiid))
|
|
770
780
|
}
|
|
771
781
|
|
|
772
782
|
} else {
|
|
773
783
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
774
784
|
WoosmapGeofenceMessage.woosemapNotInitialized,
|
|
775
|
-
|
|
785
|
+
showWoosmapError(WoosmapGeofenceMessage.woosemapNotInitialized))
|
|
776
786
|
}
|
|
777
787
|
}
|
|
778
788
|
|
|
@@ -788,7 +798,7 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
788
798
|
} else {
|
|
789
799
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
790
800
|
WoosmapGeofenceMessage.woosemapNotInitialized,
|
|
791
|
-
|
|
801
|
+
showWoosmapError(WoosmapGeofenceMessage.woosemapNotInitialized))
|
|
792
802
|
}
|
|
793
803
|
}
|
|
794
804
|
|
|
@@ -804,7 +814,7 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
804
814
|
} else {
|
|
805
815
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
806
816
|
WoosmapGeofenceMessage.woosemapNotInitialized,
|
|
807
|
-
|
|
817
|
+
showWoosmapError(WoosmapGeofenceMessage.woosemapNotInitialized))
|
|
808
818
|
}
|
|
809
819
|
}
|
|
810
820
|
|
|
@@ -826,7 +836,7 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
826
836
|
if let functionError = Error{
|
|
827
837
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
828
838
|
functionError.localizedDescription,
|
|
829
|
-
self.
|
|
839
|
+
self.showWoosmapError(functionError.localizedDescription))
|
|
830
840
|
}
|
|
831
841
|
else{
|
|
832
842
|
if(Value){
|
|
@@ -837,7 +847,7 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
837
847
|
} else {
|
|
838
848
|
reject(WoosmapGeofenceMessage.plugin_errorDomain,
|
|
839
849
|
WoosmapGeofenceMessage.woosemapNotInitialized,
|
|
840
|
-
|
|
850
|
+
showWoosmapError(WoosmapGeofenceMessage.woosemapNotInitialized))
|
|
841
851
|
}
|
|
842
852
|
}
|
|
843
853
|
|
|
@@ -9,9 +9,6 @@ import Foundation
|
|
|
9
9
|
import UIKit
|
|
10
10
|
import CoreLocation
|
|
11
11
|
import WoosmapGeofencing
|
|
12
|
-
#if canImport(AirshipCore)
|
|
13
|
-
import AirshipCore
|
|
14
|
-
#endif
|
|
15
12
|
|
|
16
13
|
/// Geofence services
|
|
17
14
|
@objc(WoosmapGeofenceService) public class WoosmapGeofenceService: NSObject {
|
|
@@ -27,6 +24,7 @@ import AirshipCore
|
|
|
27
24
|
private static var _shared: WoosmapGeofenceService?
|
|
28
25
|
private var woosmapKey: String = ""
|
|
29
26
|
private var defaultProfile: String = ""
|
|
27
|
+
private var enableAirshipCallback: Bool = false
|
|
30
28
|
private let dataLocation = DataLocation()
|
|
31
29
|
private let dataPOI = DataPOI()
|
|
32
30
|
private let dataDistance = DataDistance()
|
|
@@ -130,6 +128,7 @@ import AirshipCore
|
|
|
130
128
|
let defaults = UserDefaults.standard
|
|
131
129
|
let woosmapKey = defaults.string(forKey: "WoosmapGeofenceService.woosmap") ?? ""
|
|
132
130
|
let defaultProfile = defaults.string(forKey: "WoosmapGeofenceService.profile") ?? ""
|
|
131
|
+
self.enableAirshipCallback = defaults.bool(forKey: "WoosmapGeofenceService.AirshipCallbackEnable")
|
|
133
132
|
self.woosmapKey = woosmapKey
|
|
134
133
|
self.defaultProfile = defaultProfile
|
|
135
134
|
|
|
@@ -147,15 +146,17 @@ import AirshipCore
|
|
|
147
146
|
/// - Parameters:
|
|
148
147
|
/// - woosmapKey: key use for woosmap service
|
|
149
148
|
/// - configurationProfile: configuration profile
|
|
150
|
-
|
|
149
|
+
/// - airshipEnable: To enable airship callback
|
|
150
|
+
private init(_ woosmapKey: String, _ configurationProfile: String, _ airshipEnable: Bool = false) {
|
|
151
151
|
super.init()
|
|
152
152
|
self.woosmapKey = woosmapKey
|
|
153
153
|
self.defaultProfile = configurationProfile
|
|
154
|
-
|
|
155
|
-
// Save it on
|
|
154
|
+
self.enableAirshipCallback = airshipEnable
|
|
155
|
+
// Save it on preferences
|
|
156
156
|
let defaults = UserDefaults.standard
|
|
157
157
|
defaults.set(woosmapKey, forKey: "WoosmapGeofenceService.woosmap")
|
|
158
158
|
defaults.set(configurationProfile, forKey: "WoosmapGeofenceService.profile")
|
|
159
|
+
defaults.set(airshipEnable, forKey: "WoosmapGeofenceService.AirshipCallbackEnable")
|
|
159
160
|
|
|
160
161
|
defaults.register(defaults: ["TrackingEnable": true,
|
|
161
162
|
"ModeHighfrequencyLocation": false,
|
|
@@ -169,11 +170,11 @@ import AirshipCore
|
|
|
169
170
|
/// - Parameters:
|
|
170
171
|
/// - woosmapKey: key use for woosmap service
|
|
171
172
|
/// - configurationProfile: configuration profile
|
|
172
|
-
@objc public static func setup(woosmapKey: String, configurationProfile: String) {
|
|
173
|
+
@objc public static func setup(woosmapKey: String, configurationProfile: String,airshipTrackingEnable: Bool = false) {
|
|
173
174
|
let group = DispatchGroup()
|
|
174
175
|
group.enter()
|
|
175
176
|
DispatchQueue.main.async {
|
|
176
|
-
_shared = WoosmapGeofenceService.init( woosmapKey, configurationProfile)
|
|
177
|
+
_shared = WoosmapGeofenceService.init( woosmapKey, configurationProfile,airshipTrackingEnable)
|
|
177
178
|
group.leave()
|
|
178
179
|
}
|
|
179
180
|
group.wait()
|
|
@@ -254,11 +255,11 @@ import AirshipCore
|
|
|
254
255
|
|
|
255
256
|
// Enable Visit and set delegate of protocol Visit
|
|
256
257
|
WoosmapGeofencing.shared.getLocationService().visitDelegate = dataVisit
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
258
|
+
if(self.enableAirshipCallback){
|
|
259
|
+
// Set delagate for Airship Cloud
|
|
260
|
+
WoosmapGeofencing.shared.getLocationService().airshipEventsDelegate = airshipEvents
|
|
261
|
+
}
|
|
262
|
+
|
|
262
263
|
// Set delagate for Marketing Cloud
|
|
263
264
|
WoosmapGeofencing.shared.getLocationService().marketingCloudEventsDelegate = marketingCloudEvents
|
|
264
265
|
if defaultPOIRadius != "" {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_reactNativeUuid","_interopRequireDefault","_nativeInterface","_Location","_Region","_Poi","obj","__esModule","default","eventEmitter","NativeEventEmitter","PluginGeofencing","subscriptionsLocation","subscriptionsRegion","initialize","arg0","setWoosmapApiKey","apiKey","startTracking","trackingProfile","stopTracking","requestPermissions","background","getPermissionsStatus","watchLocation","success","error","watchID","uuid","v1","toString","successCallback","result","Location","jsonToObj","addListener","clearLocationWatch","removeAllListeners","clearAllLocationWatch","saved","removeListener","arg1","undefined","watchRegions","Region","clearRegionsWatch","clearAllRegionsWatch","setSFMCCredentials","setPoiRadius","radius","addRegion","region","getRegions","regionID","getAllRegions","then","formatted","forEach","item","push","Promise","resolve","catch","e","reject","getLocations","locationID","getAllLocations","getLocation","getPois","poiID","getAllPois","Poi","getPoi","removeRegions","removeAllRegions","removeRegion","removeLocations","removeAllLocations","removePois","removeAllPois","startCustomTracking","sourceType","source","WoosmapGeofencing","_default","exports"],"sources":["index.tsx"],"sourcesContent":["import { NativeEventEmitter } from 'react-native';\nimport uuid from 'react-native-uuid';\nimport PluginGeofencing from './internal/nativeInterface';\nimport Location from './internal/Location';\nimport Region from './internal/Region';\nimport Poi from './internal/Poi';\nimport type {\n GeofenceRegion,\n RegionType,\n ProfileSource,\n} from './internal/types';\n\nconst eventEmitter = new NativeEventEmitter(PluginGeofencing);\n\nlet subscriptionsLocation: any = {};\nlet subscriptionsRegion: any = {};\n/**\n * Initializes the Woosmap object\n * @param arg0 A JSON object with Woosmap Key (optional) and tracking profile (`liveTracking`,`passiveTracking`,`visitsTracking`).\n * @returns promise:success - A callback function that will be called on success.\n error - A callback function that will be called on error.\n */\nfunction initialize(arg0?: any): Promise<string> {\n if (arg0 == null) {\n arg0 = {};\n }\n return PluginGeofencing.initialize(arg0);\n}\n\n/**\n * A method that sets Woosmap private API key\n * @param apiKey new API key.\n * @returns promise:success - A callback function that will be called on success.\n error - A callback function that will be called on error.\n */\nfunction setWoosmapApiKey(apiKey: string): Promise<string> {\n return PluginGeofencing.setWoosmapApiKey([apiKey]);\n}\n\n/**\n * A method to start tracking the user's location.\n * @param trackingProfile The configuration profile to use. Values could be anyone of the following: liveTracking, passiveTracking and visitsTracking.\n * @returns promise:success - A callback function that will be called on success.\n error - A callback function that will be called on error.\n */\nfunction startTracking(trackingProfile: string): Promise<string> {\n return PluginGeofencing.startTracking([trackingProfile]);\n}\n\n/**\n * Stops tracking the user's location.\n * @returns promise:success - A callback function that will be called on success.\n error - A callback function that will be called on error.\n */\nfunction stopTracking(): Promise<string> {\n return PluginGeofencing.stopTracking();\n}\n\n/**\n * A method to request the required permissions to collect locations.\n * @param background - A boolean value indicating whether the permissions to request is for background or foreground permission.\n * @returns A callback that will be called on successful authorization by the app. A callback that will be called when the app denies permission. The plugin will return an object with a message - 'Permission Denied'.\n */\nfunction requestPermissions(background?: boolean): Promise<string> {\n if (background == null) {\n background = false;\n }\n return PluginGeofencing.requestPermissions([background]);\n}\n\n/**\n * A method to check if the app has granted required permissions to track location.\n * @returns A callback that will be called with the following status - GRANTED_BACKGROUND, GRANTED_FOREGROUND, DENIED\n */\nfunction getPermissionsStatus(): Promise<string> {\n return PluginGeofencing.getPermissionsStatus();\n}\n\n/**\n * Method will\ninvoke callback and pass a location object as a parameter. Method will return a watchId . This id can be used to remove a callback.\n * @param success new location found callback\n * @param error error status callback\n * @returns watchid\n */\nfunction watchLocation(\n success: (result: Location) => any,\n error?: any\n): Promise<string> {\n const watchID = uuid.v1().toString();\n\n const successCallback = (result: any) => {\n success(Location.jsonToObj(result));\n };\n\n subscriptionsLocation[watchID] = [\n eventEmitter.addListener('geolocationDidChange', successCallback),\n error ? eventEmitter.addListener('geolocationError', error) : null,\n ];\n return PluginGeofencing.watchLocation(watchID);\n}\n\n/**\n * A method to stop tracking location for a specified watch. If watchId is null or undefined the plugin will clear all watches.\n * @param watchID Reference ID.\n * @returns return promise with same id back in case of success otherwise error info\n */\nfunction clearLocationWatch(watchID?: string): Promise<string> {\n if (watchID == null) {\n eventEmitter.removeAllListeners('geolocationDidChange');\n eventEmitter.removeAllListeners('geolocationError');\n subscriptionsLocation = {};\n return PluginGeofencing.clearAllLocationWatch();\n } else {\n const saved = subscriptionsLocation[watchID];\n if (saved) {\n const arg0 = saved[0];\n eventEmitter.removeListener('geolocationDidChange', arg0);\n const arg1 = saved[1];\n if (arg1) {\n eventEmitter.removeListener('geolocationError', arg1);\n }\n subscriptionsLocation[watchID] = undefined;\n }\n return PluginGeofencing.clearLocationWatch(watchID);\n }\n}\n\n/**\n * A method to to track Regions. Method will invoke a callback with Region object. Method will return\na watch id which can be used later to remove the callback.\n * @param success new location found callback\n * @param error error status callback\n * @returns watchid\n */\nfunction watchRegions(\n success: (result: Region) => any,\n error?: any\n): Promise<string> {\n const watchID = uuid.v1().toString();\n\n const successCallback = (result: any) => {\n success(Region.jsonToObj(result));\n };\n\n subscriptionsRegion[watchID] = [\n eventEmitter.addListener('woosmapgeofenceRegionDidChange', successCallback),\n error\n ? eventEmitter.addListener('woosmapgeofenceRegionError', error)\n : null,\n ];\n return PluginGeofencing.watchRegions(watchID);\n}\n\n/**\n * A method to clear the specified watch tracing the regions. If the watchId is null or undefined then it will clear all the watches tracking the regions.\n * @param watchID Reference ID.\n * @returns return promise with same id back in case of success otherwise error info\n */\nfunction clearRegionsWatch(watchID: string): Promise<string> {\n if (watchID == null) {\n eventEmitter.removeAllListeners('woosmapgeofenceRegionDidChange');\n eventEmitter.removeAllListeners('woosmapgeofenceRegionError');\n subscriptionsRegion = {};\n return PluginGeofencing.clearAllRegionsWatch();\n } else {\n const saved = subscriptionsRegion[watchID];\n if (saved) {\n const arg0 = saved[0];\n eventEmitter.removeListener('woosmapgeofenceRegionDidChange', arg0);\n const arg1 = saved[1];\n if (arg1) {\n eventEmitter.removeListener('woosmapgeofenceRegionError', arg1);\n }\n subscriptionsRegion[watchID] = undefined;\n }\n return PluginGeofencing.clearRegionsWatch(watchID);\n }\n}\n/**\n * Sets Sales Force Marketing Cloud (SFMC) credentials\n * @param arg0 A JSON object with SFMC credentials. Keys authenticationBaseURI, restBaseURI, client_id, client_secret and contactKey are required.\n * @returns promise with A callback that will be called on success or error.\n */\nfunction setSFMCCredentials(arg0: Object): Promise<string> {\n return PluginGeofencing.setSFMCCredentials(arg0);\n}\n\n/**\n * When you create a geofence around a POI, manually define the radius value (100.0) or choose the user_properties subfield that corresponds to radius value of the geofence (\"radiusPOI\").\n * @param radius can be integer or string.\n * @returns promise with A callback that will be called on success or error.\n */\nfunction setPoiRadius(radius: string): Promise<string> {\n return PluginGeofencing.setPoiRadius(radius);\n}\n/**\n * Adds a custom region that you want to monitor.\n * @param region A GeofenceRegion object with latitude, longitude, radius and type.\n * @returns promise with A callback that will be called on success or error.\n */\n\nfunction addRegion(region: GeofenceRegion): Promise<string> {\n return PluginGeofencing.addRegion(region);\n}\n/**\n * Retrieve saved region info\n * @param regionID If it pass return info for given region or return all region info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction getRegions(regionID?: string): Promise<Region[]> {\n if (regionID == null) {\n return PluginGeofencing.getAllRegions()\n .then((result: any[]) => {\n var formatted: Region[] = [];\n result.forEach((item) => {\n formatted.push(Region.jsonToObj(item));\n });\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n } else {\n return PluginGeofencing.getRegions(regionID)\n .then((result: any) => {\n var formatted: Region[] = [];\n formatted.push(Region.jsonToObj(result));\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n }\n}\n\n/**\n * Retrieve saved location info\n * @param locationID - Optional in case of location id pass it return only that location info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction getLocations(locationID?: string): Promise<Location[]> {\n if (locationID == null) {\n return PluginGeofencing.getAllLocations()\n .then((result: any[]) => {\n var formatted: Location[] = [];\n result.forEach((item) => {\n formatted.push(Location.jsonToObj(item));\n });\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n } else {\n return PluginGeofencing.getLocation(locationID)\n .then((result: any) => {\n var formatted: Location[] = [];\n formatted.push(Location.jsonToObj(result));\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n }\n}\n\n/**\n * Retrieve saved POI info\n * @param poiID - Optional in case of poi id (LocationID or StoreID) pass it return only that POI info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction getPois(poiID?: string): Promise<Poi[]> {\n if (poiID == null) {\n return PluginGeofencing.getAllPois()\n .then((result: any[]) => {\n var formatted: Poi[] = [];\n result.forEach((item) => {\n formatted.push(Poi.jsonToObj(item));\n });\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n } else {\n return PluginGeofencing.getPoi(poiID)\n .then((result: any) => {\n var formatted: Poi[] = [];\n formatted.push(Poi.jsonToObj(result));\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n }\n}\n\n/**\n * Remove saved region info\n * @param regionID If it pass remove info for given region or removes all region info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction removeRegions(regionID?: string): Promise<string> {\n if (regionID == null) {\n return PluginGeofencing.removeAllRegions();\n } else {\n return PluginGeofencing.removeRegion(regionID);\n }\n}\n\n/**\n * Remove saved location info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction removeLocations(): Promise<string> {\n return PluginGeofencing.removeAllLocations();\n}\n\n/**\n * Remove saved POI info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction removePois(): Promise<string> {\n return PluginGeofencing.removeAllPois();\n}\n/**\n * if preset tracking profiles don’t fit with your use cases, you can build your own profile and uses the startCustomTracking() method. \n * There are two way to host the json file:\n * - included in the client application (local)\n * - hosted externally in a file folder in your information system (external)\n * @param sourceType local/external\n * @param source location of profile to be fetch\n * @returns promise with A callback that will be called on success or error.\n */\nfunction startCustomTracking(\n sourceType: ProfileSource,\n source: string\n): Promise<string> {\n return PluginGeofencing.startCustomTracking(sourceType, source);\n}\n\nexport type {\n RegionType,\n GeofenceRegion,\n Region,\n Location,\n Poi,\n ProfileSource,\n};\n\nconst WoosmapGeofencing = {\n initialize,\n setWoosmapApiKey,\n startTracking,\n requestPermissions,\n getPermissionsStatus,\n stopTracking,\n watchLocation,\n clearLocationWatch,\n watchRegions,\n clearRegionsWatch,\n setSFMCCredentials,\n setPoiRadius,\n addRegion,\n getRegions,\n removeRegions,\n getLocations,\n removeLocations,\n getPois,\n removePois,\n startCustomTracking,\n};\n\nexport default WoosmapGeofencing;\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,SAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,OAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,IAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAAiC,SAAAE,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAOjC,MAAMG,YAAY,GAAG,IAAIC,+BAAkB,CAACC,wBAAgB,CAAC;AAE7D,IAAIC,qBAA0B,GAAG,CAAC,CAAC;AACnC,IAAIC,mBAAwB,GAAG,CAAC,CAAC;AACjC;A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ZE,iBAAiB;EACjBE,kBAAkB;EAClBC,YAAY;EACZE,SAAS;EACTE,UAAU;EACVsB,aAAa;EACbT,YAAY;EACZY,eAAe;EACfR,OAAO;EACPU,UAAU;EACVE;AACF,CAAC;AAAC,IAAAI,QAAA,GAEaD,iBAAiB;AAAAE,OAAA,CAAA9E,OAAA,GAAA6E,QAAA"}
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_reactNativeUuid","_interopRequireDefault","_nativeInterface","_Location","_Region","_Poi","obj","__esModule","default","eventEmitter","NativeEventEmitter","PluginGeofencing","subscriptionsLocation","subscriptionsRegion","initialize","arg0","setWoosmapApiKey","apiKey","startTracking","trackingProfile","stopTracking","requestPermissions","background","getPermissionsStatus","watchLocation","success","error","watchID","uuid","v1","toString","successCallback","result","Location","jsonToObj","addListener","clearLocationWatch","removeAllListeners","clearAllLocationWatch","saved","removeListener","arg1","undefined","watchRegions","Region","clearRegionsWatch","clearAllRegionsWatch","setSFMCCredentials","setPoiRadius","radius","addRegion","region","getRegions","regionID","getAllRegions","then","formatted","forEach","item","push","Promise","resolve","catch","e","reject","getLocations","locationID","getAllLocations","getLocation","getPois","poiID","getAllPois","Poi","getPoi","removeRegions","removeAllRegions","removeRegion","removeLocations","removeAllLocations","removePois","removeAllPois","startCustomTracking","sourceType","source","WoosmapGeofencing","_default","exports"],"sources":["index.tsx"],"sourcesContent":["import { NativeEventEmitter } from 'react-native';\nimport uuid from 'react-native-uuid';\nimport PluginGeofencing from './internal/nativeInterface';\nimport Location from './internal/Location';\nimport Region from './internal/Region';\nimport Poi from './internal/Poi';\nimport type {\n GeofenceRegion,\n RegionType,\n ProfileSource,\n} from './internal/types';\n\nconst eventEmitter = new NativeEventEmitter(PluginGeofencing);\n\nlet subscriptionsLocation: any = {};\nlet subscriptionsRegion: any = {};\n/**\n * Initializes the Woosmap object\n * @param arg0 A JSON object with Woosmap Key (optional) and tracking profile (`liveTracking`,`passiveTracking`,`visitsTracking`).\n * @returns promise:success - A callback function that will be called on success.\n error - A callback function that will be called on error.\n */\nfunction initialize(arg0?: any): Promise<string> {\n if (arg0 == null) {\n arg0 = {};\n }\n return PluginGeofencing.initialize(arg0);\n}\n\n/**\n * A method that sets Woosmap private API key\n * @param apiKey new API key.\n * @returns promise:success - A callback function that will be called on success.\n error - A callback function that will be called on error.\n */\nfunction setWoosmapApiKey(apiKey: string): Promise<string> {\n return PluginGeofencing.setWoosmapApiKey([apiKey]);\n}\n\n/**\n * A method to start tracking the user's location.\n * @param trackingProfile The configuration profile to use. Values could be anyone of the following: liveTracking, passiveTracking and visitsTracking.\n * @returns promise:success - A callback function that will be called on success.\n error - A callback function that will be called on error.\n */\nfunction startTracking(trackingProfile: string): Promise<string> {\n return PluginGeofencing.startTracking([trackingProfile]);\n}\n\n/**\n * Stops tracking the user's location.\n * @returns promise:success - A callback function that will be called on success.\n error - A callback function that will be called on error.\n */\nfunction stopTracking(): Promise<string> {\n return PluginGeofencing.stopTracking();\n}\n\n/**\n * A method to request the required permissions to collect locations.\n * @param background - A boolean value indicating whether the permissions to request is for background or foreground permission.\n * @returns A callback that will be called on successful authorization by the app. A callback that will be called when the app denies permission. The plugin will return an object with a message - 'Permission Denied'.\n */\nfunction requestPermissions(background?: boolean): Promise<string> {\n if (background == null) {\n background = false;\n }\n return PluginGeofencing.requestPermissions([background]);\n}\n\n/**\n * A method to check if the app has granted required permissions to track location.\n * @returns A callback that will be called with the following status - GRANTED_BACKGROUND, GRANTED_FOREGROUND, DENIED\n */\nfunction getPermissionsStatus(): Promise<string> {\n return PluginGeofencing.getPermissionsStatus();\n}\n\n/**\n * Method will\ninvoke callback and pass a location object as a parameter. Method will return a watchId . This id can be used to remove a callback.\n * @param success new location found callback\n * @param error error status callback\n * @returns watchid\n */\nfunction watchLocation(\n success: (result: Location) => any,\n error?: any\n): Promise<string> {\n const watchID = uuid.v1().toString();\n\n const successCallback = (result: any) => {\n success(Location.jsonToObj(result));\n };\n\n subscriptionsLocation[watchID] = [\n eventEmitter.addListener('geolocationDidChange', successCallback),\n error ? eventEmitter.addListener('geolocationError', error) : null,\n ];\n return PluginGeofencing.watchLocation(watchID);\n}\n\n/**\n * A method to stop tracking location for a specified watch. If watchId is null or undefined the plugin will clear all watches.\n * @param watchID Reference ID.\n * @returns return promise with same id back in case of success otherwise error info\n */\nfunction clearLocationWatch(watchID?: string): Promise<string> {\n if (watchID == null) {\n eventEmitter.removeAllListeners('geolocationDidChange');\n eventEmitter.removeAllListeners('geolocationError');\n subscriptionsLocation = {};\n return PluginGeofencing.clearAllLocationWatch();\n } else {\n const saved = subscriptionsLocation[watchID];\n if (saved) {\n const arg0 = saved[0];\n eventEmitter.removeListener('geolocationDidChange', arg0);\n const arg1 = saved[1];\n if (arg1) {\n eventEmitter.removeListener('geolocationError', arg1);\n }\n subscriptionsLocation[watchID] = undefined;\n }\n return PluginGeofencing.clearLocationWatch(watchID);\n }\n}\n\n/**\n * A method to to track Regions. Method will invoke a callback with Region object. Method will return\na watch id which can be used later to remove the callback.\n * @param success new location found callback\n * @param error error status callback\n * @returns watchid\n */\nfunction watchRegions(\n success: (result: Region) => any,\n error?: any\n): Promise<string> {\n const watchID = uuid.v1().toString();\n\n const successCallback = (result: any) => {\n success(Region.jsonToObj(result));\n };\n\n subscriptionsRegion[watchID] = [\n eventEmitter.addListener('woosmapgeofenceRegionDidChange', successCallback),\n error\n ? eventEmitter.addListener('woosmapgeofenceRegionError', error)\n : null,\n ];\n return PluginGeofencing.watchRegions(watchID);\n}\n\n/**\n * A method to clear the specified watch tracing the regions. If the watchId is null or undefined then it will clear all the watches tracking the regions.\n * @param watchID Reference ID.\n * @returns return promise with same id back in case of success otherwise error info\n */\nfunction clearRegionsWatch(watchID: string): Promise<string> {\n if (watchID == null) {\n eventEmitter.removeAllListeners('woosmapgeofenceRegionDidChange');\n eventEmitter.removeAllListeners('woosmapgeofenceRegionError');\n subscriptionsRegion = {};\n return PluginGeofencing.clearAllRegionsWatch();\n } else {\n const saved = subscriptionsRegion[watchID];\n if (saved) {\n const arg0 = saved[0];\n eventEmitter.removeListener('woosmapgeofenceRegionDidChange', arg0);\n const arg1 = saved[1];\n if (arg1) {\n eventEmitter.removeListener('woosmapgeofenceRegionError', arg1);\n }\n subscriptionsRegion[watchID] = undefined;\n }\n return PluginGeofencing.clearRegionsWatch(watchID);\n }\n}\n/**\n * Sets Sales Force Marketing Cloud (SFMC) credentials\n * @param arg0 A JSON object with SFMC credentials. Keys authenticationBaseURI, restBaseURI, client_id, client_secret and contactKey are required.\n * @returns promise with A callback that will be called on success or error.\n */\nfunction setSFMCCredentials(arg0: Object): Promise<string> {\n return PluginGeofencing.setSFMCCredentials(arg0);\n}\n\n/**\n * When you create a geofence around a POI, manually define the radius value (100.0) or choose the user_properties subfield that corresponds to radius value of the geofence (\"radiusPOI\").\n * @param radius can be integer or string.\n * @returns promise with A callback that will be called on success or error.\n */\nfunction setPoiRadius(radius: string): Promise<string> {\n return PluginGeofencing.setPoiRadius(radius);\n}\n/**\n * Adds a custom region that you want to monitor.\n * @param region A GeofenceRegion object with latitude, longitude, radius and type.\n * @returns promise with A callback that will be called on success or error.\n */\n\nfunction addRegion(region: GeofenceRegion): Promise<string> {\n return PluginGeofencing.addRegion(region);\n}\n/**\n * Retrieve saved region info\n * @param regionID If it pass return info for given region or return all region info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction getRegions(regionID?: string): Promise<Region[]> {\n if (regionID == null) {\n return PluginGeofencing.getAllRegions()\n .then((result: any[]) => {\n var formatted: Region[] = [];\n result.forEach((item) => {\n formatted.push(Region.jsonToObj(item));\n });\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n } else {\n return PluginGeofencing.getRegions(regionID)\n .then((result: any) => {\n var formatted: Region[] = [];\n formatted.push(Region.jsonToObj(result));\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n }\n}\n\n/**\n * Retrieve saved location info\n * @param locationID - Optional in case of location id pass it return only that location info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction getLocations(locationID?: string): Promise<Location[]> {\n if (locationID == null) {\n return PluginGeofencing.getAllLocations()\n .then((result: any[]) => {\n var formatted: Location[] = [];\n result.forEach((item) => {\n formatted.push(Location.jsonToObj(item));\n });\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n } else {\n return PluginGeofencing.getLocation(locationID)\n .then((result: any) => {\n var formatted: Location[] = [];\n formatted.push(Location.jsonToObj(result));\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n }\n}\n\n/**\n * Retrieve saved POI info\n * @param poiID - Optional in case of poi id (LocationID or StoreID) pass it return only that POI info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction getPois(poiID?: string): Promise<Poi[]> {\n if (poiID == null) {\n return PluginGeofencing.getAllPois()\n .then((result: any[]) => {\n var formatted: Poi[] = [];\n result.forEach((item) => {\n formatted.push(Poi.jsonToObj(item));\n });\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n } else {\n return PluginGeofencing.getPoi(poiID)\n .then((result: any) => {\n var formatted: Poi[] = [];\n formatted.push(Poi.jsonToObj(result));\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n }\n}\n\n/**\n * Remove saved region info\n * @param regionID If it pass remove info for given region or removes all region info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction removeRegions(regionID?: string): Promise<string> {\n if (regionID == null) {\n return PluginGeofencing.removeAllRegions();\n } else {\n return PluginGeofencing.removeRegion(regionID);\n }\n}\n\n/**\n * Remove saved location info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction removeLocations(): Promise<string> {\n return PluginGeofencing.removeAllLocations();\n}\n\n/**\n * Remove saved POI info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction removePois(): Promise<string> {\n return PluginGeofencing.removeAllPois();\n}\n/**\n * if preset tracking profiles don’t fit with your use cases, you can build your own profile and uses the startCustomTracking() method. \n * There are two way to host the json file:\n * - included in the client application (local)\n * - hosted externally in a file folder in your information system (external)\n * @param sourceType local/external\n * @param source location of profile to be fetch\n * @returns promise with A callback that will be called on success or error.\n */\nfunction startCustomTracking(\n sourceType: ProfileSource,\n source: string\n): Promise<string> {\n return PluginGeofencing.startCustomTracking(sourceType, source);\n}\n\nexport type {\n RegionType,\n GeofenceRegion,\n Region,\n Location,\n Poi,\n ProfileSource,\n};\n\nconst WoosmapGeofencing = {\n initialize,\n setWoosmapApiKey,\n startTracking,\n requestPermissions,\n getPermissionsStatus,\n stopTracking,\n watchLocation,\n clearLocationWatch,\n watchRegions,\n clearRegionsWatch,\n setSFMCCredentials,\n setPoiRadius,\n addRegion,\n getRegions,\n removeRegions,\n getLocations,\n removeLocations,\n getPois,\n removePois,\n startCustomTracking,\n};\n\nexport default WoosmapGeofencing;\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,SAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,OAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,IAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAAiC,SAAAE,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAOjC,MAAMG,YAAY,GAAG,IAAIC,+BAAkB,CAACC,wBAAgB,CAAC;AAE7D,IAAIC,qBAA0B,GAAG,CAAC,CAAC;AACnC,IAAIC,mBAAwB,GAAG,CAAC,CAAC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,UAAUA,CAACC,IAAU,EAAmB;EAC/C,IAAIA,IAAI,IAAI,IAAI,EAAE;IAChBA,IAAI,GAAG,CAAC,CAAC;EACX;EACA,OAAOJ,wBAAgB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,aAAa;EACbT,YAAY;EACZY,eAAe;EACfR,OAAO;EACPU,UAAU;EACVE;AACF,CAAC;AAAC,IAAAI,QAAA,GAEaD,iBAAiB;AAAAE,OAAA,CAAA9E,OAAA,GAAA6E,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Location","constructor","date","latitude","locationdescription","locationid","longitude","_defineProperty","Date","Latitude","Locationdescription","Locationid","Longitude","jsonToObj","json","_default","exports","default"],"sources":["Location.tsx"],"sourcesContent":["/**\n * @classdesc A class that represents the location object.\n * @constructs Location\n * @param {number} date The datetime stamp.\n * @param {number} latitude The latitude of the location.\n\n * @param {string} Locationdescription The description of the location. \n * @param {string} Locationid A unique identifier for the location.\n * @param {number} longitude The longitude of the location.\n */\nclass Location {\n Date: number;\n Latitude: number;\n Locationdescription: string;\n Locationid: string;\n Longitude: number;\n constructor(\n date: number,\n latitude: number,\n locationdescription: string,\n locationid: string,\n longitude: number\n ) {\n this.Date = date;\n this.Latitude = latitude;\n this.Locationdescription = locationdescription;\n this.Locationid = locationid;\n this.Longitude = longitude;\n }\n /**\n * Converts json object to an object of type Location.\n * @param {Object} json The json representation of the Location.\n * @returns Object\n * @memberof Location\n */\n static jsonToObj(json: any) {\n return new Location(\n json.date,\n json.latitude,\n json.locationdescription,\n json.locationid,\n json.longitude\n );\n }\n}\nexport default Location;\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,QAAQ,CAAC;EAMbC,WAAWA,CACTC,IAAY,EACZC,QAAgB,EAChBC,mBAA2B,EAC3BC,UAAkB,EAClBC,SAAiB,EACjB;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IACA,IAAI,CAACC,IAAI,GAAGN,IAAI;IAChB,IAAI,CAACO,QAAQ,GAAGN,QAAQ;IACxB,IAAI,CAACO,mBAAmB,GAAGN,mBAAmB;IAC9C,IAAI,CAACO,UAAU,GAAGN,UAAU;IAC5B,IAAI,CAACO,SAAS,GAAGN,SAAS;EAC5B;EACA;AACF;AACA;AACA;AACA;AACA;EACE,OAAOO,SAASA,CAACC,IAAS,EAAE;IAC1B,OAAO,IAAId,QAAQ,CACjBc,IAAI,CAACZ,IAAI,EACTY,IAAI,CAACX,QAAQ,EACbW,IAAI,CAACV,mBAAmB,EACxBU,IAAI,CAACT,UAAU,EACfS,IAAI,CAACR,
|
|
1
|
+
{"version":3,"names":["Location","constructor","date","latitude","locationdescription","locationid","longitude","_defineProperty","Date","Latitude","Locationdescription","Locationid","Longitude","jsonToObj","json","_default","exports","default"],"sources":["Location.tsx"],"sourcesContent":["/**\n * @classdesc A class that represents the location object.\n * @constructs Location\n * @param {number} date The datetime stamp.\n * @param {number} latitude The latitude of the location.\n\n * @param {string} Locationdescription The description of the location. \n * @param {string} Locationid A unique identifier for the location.\n * @param {number} longitude The longitude of the location.\n */\nclass Location {\n Date: number;\n Latitude: number;\n Locationdescription: string;\n Locationid: string;\n Longitude: number;\n constructor(\n date: number,\n latitude: number,\n locationdescription: string,\n locationid: string,\n longitude: number\n ) {\n this.Date = date;\n this.Latitude = latitude;\n this.Locationdescription = locationdescription;\n this.Locationid = locationid;\n this.Longitude = longitude;\n }\n /**\n * Converts json object to an object of type Location.\n * @param {Object} json The json representation of the Location.\n * @returns Object\n * @memberof Location\n */\n static jsonToObj(json: any) {\n return new Location(\n json.date,\n json.latitude,\n json.locationdescription,\n json.locationid,\n json.longitude\n );\n }\n}\nexport default Location;\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,QAAQ,CAAC;EAMbC,WAAWA,CACTC,IAAY,EACZC,QAAgB,EAChBC,mBAA2B,EAC3BC,UAAkB,EAClBC,SAAiB,EACjB;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IACA,IAAI,CAACC,IAAI,GAAGN,IAAI;IAChB,IAAI,CAACO,QAAQ,GAAGN,QAAQ;IACxB,IAAI,CAACO,mBAAmB,GAAGN,mBAAmB;IAC9C,IAAI,CAACO,UAAU,GAAGN,UAAU;IAC5B,IAAI,CAACO,SAAS,GAAGN,SAAS;EAC5B;EACA;AACF;AACA;AACA;AACA;AACA;EACE,OAAOO,SAASA,CAACC,IAAS,EAAE;IAC1B,OAAO,IAAId,QAAQ,CACjBc,IAAI,CAACZ,IAAI,EACTY,IAAI,CAACX,QAAQ,EACbW,IAAI,CAACV,mBAAmB,EACxBU,IAAI,CAACT,UAAU,EACfS,IAAI,CAACR,SACP,CAAC;EACH;AACF;AAAC,IAAAS,QAAA,GACcf,QAAQ;AAAAgB,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Poi","constructor","jsondata","city","idstore","name","date","distance","duration","latitude","locationid","longitude","zipcode","radius","address","countrycode","tags","types","contact","_defineProperty","Jsondata","City","Idstore","Name","Date","Distance","Duration","Latitude","Locationid","Longitude","Zipcode","Radius","Countrycode","Tags","Types","Contact","Address","jsonToObj","json","_default","exports","default"],"sources":["Poi.tsx"],"sourcesContent":["/**\n * A class that represents the POI object.\n * @classdesc A class that represents the POI object.\n * @constructs Poi\n * @param {Object} jsonData A json object representing the POI.\n * @param {string} city The name of the city the POI belongs to.\n * @param {string} idstore A unique identifier for the POI.\n * @param {name} name The name of the POI.\n * @param {number} date The datetime stamp.\n * @param {number} distance The distance between the POI and the user's location.\n * @param {number} duration The duration to travel to the POI from the user's location.\n * @param {number} latitude The latitude of the POI.\n * @param {string} locationid Location id of the POI.\n * @param {number} longitude The longitude of the POI.\n * @param {string} zipcode The zip code of the POI.\n * @param {number} radius The radius of the POI.\n * @param {string} address The address of the POI.\n * @param {string} countrycode The countrycode of the POI.\n * @param {string} tags The tags for the POI.\n * @param {string} types The types of the POI.\n * @param {string} contact The contact for the POI.\n */\nclass Poi {\n Jsondata: object;\n City: string;\n Idstore: string;\n Name: string;\n Date: number;\n Distance: number;\n Duration: number;\n Latitude: number;\n Locationid: string;\n Longitude: number;\n Zipcode: string;\n Radius: number;\n Countrycode: string;\n Tags: string;\n Types: string;\n Contact: string;\n Address: string;\n constructor(\n jsondata: object,\n city: string,\n idstore: string,\n name: string,\n date: number,\n distance: number,\n duration: number,\n latitude: number,\n locationid: string,\n longitude: number,\n zipcode: string,\n radius: number,\n address: string,\n countrycode: string,\n tags: string,\n types: string,\n contact: string\n ) {\n this.Jsondata = jsondata;\n this.City = city;\n this.Idstore = idstore;\n this.Name = name;\n this.Date = date;\n this.Distance = distance;\n this.Duration = duration;\n this.Latitude = latitude;\n this.Locationid = locationid;\n this.Longitude = longitude;\n this.Zipcode = zipcode;\n this.Radius = radius;\n this.Idstore = idstore;\n this.Countrycode = countrycode;\n this.Tags = tags;\n this.Types = types;\n this.Contact = contact;\n this.Address = address;\n }\n /**\n * Converts json object to an object of type Poi.\n * @param {Object} json The json representation of the Poi.\n * @returns Object\n * @memberof Poi\n */\n static jsonToObj(json: any) {\n return new Poi(\n json.jsondata,\n json.city,\n json.idstore,\n json.name,\n json.date,\n json.distance,\n json.duration,\n json.latitude,\n json.locationid,\n json.longitude,\n json.zipcode,\n json.radius,\n json.address,\n json.countrycode,\n json.tags,\n json.types,\n json.contact\n );\n }\n}\nexport default Poi;\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,GAAG,CAAC;EAkBRC,WAAWA,CACTC,QAAgB,EAChBC,IAAY,EACZC,OAAe,EACfC,IAAY,EACZC,IAAY,EACZC,QAAgB,EAChBC,QAAgB,EAChBC,QAAgB,EAChBC,UAAkB,EAClBC,SAAiB,EACjBC,OAAe,EACfC,MAAc,EACdC,OAAe,EACfC,WAAmB,EACnBC,IAAY,EACZC,KAAa,EACbC,OAAe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AC9B,QAAQ,EACb8B,IAAI,CAAC7B,QAAQ,EACb6B,IAAI,CAAC5B,UAAU,EACf4B,IAAI,CAAC3B,SAAS,EACd2B,IAAI,CAAC1B,OAAO,EACZ0B,IAAI,CAACzB,MAAM,EACXyB,IAAI,CAACxB,OAAO,EACZwB,IAAI,CAACvB,WAAW,EAChBuB,IAAI,CAACtB,IAAI,EACTsB,IAAI,CAACrB,KAAK,EACVqB,IAAI,CAACpB,
|
|
1
|
+
{"version":3,"names":["Poi","constructor","jsondata","city","idstore","name","date","distance","duration","latitude","locationid","longitude","zipcode","radius","address","countrycode","tags","types","contact","_defineProperty","Jsondata","City","Idstore","Name","Date","Distance","Duration","Latitude","Locationid","Longitude","Zipcode","Radius","Countrycode","Tags","Types","Contact","Address","jsonToObj","json","_default","exports","default"],"sources":["Poi.tsx"],"sourcesContent":["/**\n * A class that represents the POI object.\n * @classdesc A class that represents the POI object.\n * @constructs Poi\n * @param {Object} jsonData A json object representing the POI.\n * @param {string} city The name of the city the POI belongs to.\n * @param {string} idstore A unique identifier for the POI.\n * @param {name} name The name of the POI.\n * @param {number} date The datetime stamp.\n * @param {number} distance The distance between the POI and the user's location.\n * @param {number} duration The duration to travel to the POI from the user's location.\n * @param {number} latitude The latitude of the POI.\n * @param {string} locationid Location id of the POI.\n * @param {number} longitude The longitude of the POI.\n * @param {string} zipcode The zip code of the POI.\n * @param {number} radius The radius of the POI.\n * @param {string} address The address of the POI.\n * @param {string} countrycode The countrycode of the POI.\n * @param {string} tags The tags for the POI.\n * @param {string} types The types of the POI.\n * @param {string} contact The contact for the POI.\n */\nclass Poi {\n Jsondata: object;\n City: string;\n Idstore: string;\n Name: string;\n Date: number;\n Distance: number;\n Duration: number;\n Latitude: number;\n Locationid: string;\n Longitude: number;\n Zipcode: string;\n Radius: number;\n Countrycode: string;\n Tags: string;\n Types: string;\n Contact: string;\n Address: string;\n constructor(\n jsondata: object,\n city: string,\n idstore: string,\n name: string,\n date: number,\n distance: number,\n duration: number,\n latitude: number,\n locationid: string,\n longitude: number,\n zipcode: string,\n radius: number,\n address: string,\n countrycode: string,\n tags: string,\n types: string,\n contact: string\n ) {\n this.Jsondata = jsondata;\n this.City = city;\n this.Idstore = idstore;\n this.Name = name;\n this.Date = date;\n this.Distance = distance;\n this.Duration = duration;\n this.Latitude = latitude;\n this.Locationid = locationid;\n this.Longitude = longitude;\n this.Zipcode = zipcode;\n this.Radius = radius;\n this.Idstore = idstore;\n this.Countrycode = countrycode;\n this.Tags = tags;\n this.Types = types;\n this.Contact = contact;\n this.Address = address;\n }\n /**\n * Converts json object to an object of type Poi.\n * @param {Object} json The json representation of the Poi.\n * @returns Object\n * @memberof Poi\n */\n static jsonToObj(json: any) {\n return new Poi(\n json.jsondata,\n json.city,\n json.idstore,\n json.name,\n json.date,\n json.distance,\n json.duration,\n json.latitude,\n json.locationid,\n json.longitude,\n json.zipcode,\n json.radius,\n json.address,\n json.countrycode,\n json.tags,\n json.types,\n json.contact\n );\n }\n}\nexport default Poi;\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,GAAG,CAAC;EAkBRC,WAAWA,CACTC,QAAgB,EAChBC,IAAY,EACZC,OAAe,EACfC,IAAY,EACZC,IAAY,EACZC,QAAgB,EAChBC,QAAgB,EAChBC,QAAgB,EAChBC,UAAkB,EAClBC,SAAiB,EACjBC,OAAe,EACfC,MAAc,EACdC,OAAe,EACfC,WAAmB,EACnBC,IAAY,EACZC,KAAa,EACbC,OAAe,EACf;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAA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ACtB,IAAI,EACTsB,IAAI,CAACrB,KAAK,EACVqB,IAAI,CAACpB,OACP,CAAC;EACH;AACF;AAAC,IAAAqB,QAAA,GACcvC,GAAG;AAAAwC,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Region","constructor","date","didenter","identifier","latitude","longitude","radius","frompositiondetection","eventname","spenttime","_defineProperty","Date","Didenter","Identifier","Latitude","Longitude","Radius","Frompositiondetection","Eventname","SpentTime","jsonToObj","json","_default","exports","default"],"sources":["Region.tsx"],"sourcesContent":["/**\n * A class that represents the Region object.\n * @classdesc A class that represents the Region object.\n * @constructs Region\n * @param {number} date The datetime stamp.\n * @param {boolean} didEnter A boolean value indicating whether the region was entered.\n * @param {string} identifier An alphanumeric unique identifier for the region.\n * @param {number} latitude The latitude of the region.\n * @param {number} longitude The longitude of the region.\n * @param {number} radius The radius of the region in meters.\n * @param {boolean} frompositiondetection Determines whether the user's current position is inside the region.\n * @param {string} eventName Describe cause of region event, Entry or Exit.\n * @param {number} spenttime Number of seconds the user spent in region in case of event name Exit.\n */\nclass Region {\n Date: number;\n Didenter: boolean;\n Identifier: string;\n Latitude: number;\n Longitude: number;\n Radius: number;\n Frompositiondetection: boolean;\n Eventname: string;\n SpentTime: number;\n constructor(\n date: number,\n didenter: boolean,\n identifier: string,\n latitude: number,\n longitude: number,\n radius: number,\n frompositiondetection: boolean,\n eventname: string,\n spenttime: number\n ) {\n this.Date = date;\n this.Didenter = didenter;\n this.Identifier = identifier;\n this.Latitude = latitude;\n this.Longitude = longitude;\n this.Radius = radius;\n this.Frompositiondetection = frompositiondetection;\n this.Eventname = eventname;\n this.SpentTime = spenttime;\n }\n /**\n * Converts json object to an object of type Region.\n * @param {Object} json The json representation of the region.\n * @returns Object\n * @memberof Region\n */\n static jsonToObj(json: any) {\n return new Region(\n json.date,\n json.didenter,\n json.identifier,\n json.latitude,\n json.longitude,\n json.radius,\n json.frompositiondetection,\n json.eventname,\n json.spenttime\n );\n }\n}\nexport default Region;\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAM,CAAC;EAUXC,WAAWA,CACTC,IAAY,EACZC,QAAiB,EACjBC,UAAkB,EAClBC,QAAgB,EAChBC,SAAiB,EACjBC,MAAc,EACdC,qBAA8B,EAC9BC,SAAiB,EACjBC,SAAiB,EACjB;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IACA,IAAI,CAACC,IAAI,GAAGV,IAAI;IAChB,IAAI,CAACW,QAAQ,GAAGV,QAAQ;IACxB,IAAI,CAACW,UAAU,GAAGV,UAAU;IAC5B,IAAI,CAACW,QAAQ,GAAGV,QAAQ;IACxB,IAAI,CAACW,SAAS,GAAGV,SAAS;IAC1B,IAAI,CAACW,MAAM,GAAGV,MAAM;IACpB,IAAI,CAACW,qBAAqB,GAAGV,qBAAqB;IAClD,IAAI,CAACW,SAAS,GAAGV,SAAS;IAC1B,IAAI,CAACW,SAAS,GAAGV,SAAS;EAC5B;EACA;AACF;AACA;AACA;AACA;AACA;EACE,OAAOW,SAASA,CAACC,IAAS,EAAE;IAC1B,OAAO,IAAItB,MAAM,CACfsB,IAAI,CAACpB,IAAI,EACToB,IAAI,CAACnB,QAAQ,EACbmB,IAAI,CAAClB,UAAU,EACfkB,IAAI,CAACjB,QAAQ,EACbiB,IAAI,CAAChB,SAAS,EACdgB,IAAI,CAACf,MAAM,EACXe,IAAI,CAACd,qBAAqB,EAC1Bc,IAAI,CAACb,SAAS,EACda,IAAI,CAACZ,
|
|
1
|
+
{"version":3,"names":["Region","constructor","date","didenter","identifier","latitude","longitude","radius","frompositiondetection","eventname","spenttime","_defineProperty","Date","Didenter","Identifier","Latitude","Longitude","Radius","Frompositiondetection","Eventname","SpentTime","jsonToObj","json","_default","exports","default"],"sources":["Region.tsx"],"sourcesContent":["/**\n * A class that represents the Region object.\n * @classdesc A class that represents the Region object.\n * @constructs Region\n * @param {number} date The datetime stamp.\n * @param {boolean} didEnter A boolean value indicating whether the region was entered.\n * @param {string} identifier An alphanumeric unique identifier for the region.\n * @param {number} latitude The latitude of the region.\n * @param {number} longitude The longitude of the region.\n * @param {number} radius The radius of the region in meters.\n * @param {boolean} frompositiondetection Determines whether the user's current position is inside the region.\n * @param {string} eventName Describe cause of region event, Entry or Exit.\n * @param {number} spenttime Number of seconds the user spent in region in case of event name Exit.\n */\nclass Region {\n Date: number;\n Didenter: boolean;\n Identifier: string;\n Latitude: number;\n Longitude: number;\n Radius: number;\n Frompositiondetection: boolean;\n Eventname: string;\n SpentTime: number;\n constructor(\n date: number,\n didenter: boolean,\n identifier: string,\n latitude: number,\n longitude: number,\n radius: number,\n frompositiondetection: boolean,\n eventname: string,\n spenttime: number\n ) {\n this.Date = date;\n this.Didenter = didenter;\n this.Identifier = identifier;\n this.Latitude = latitude;\n this.Longitude = longitude;\n this.Radius = radius;\n this.Frompositiondetection = frompositiondetection;\n this.Eventname = eventname;\n this.SpentTime = spenttime;\n }\n /**\n * Converts json object to an object of type Region.\n * @param {Object} json The json representation of the region.\n * @returns Object\n * @memberof Region\n */\n static jsonToObj(json: any) {\n return new Region(\n json.date,\n json.didenter,\n json.identifier,\n json.latitude,\n json.longitude,\n json.radius,\n json.frompositiondetection,\n json.eventname,\n json.spenttime\n );\n }\n}\nexport default Region;\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAM,CAAC;EAUXC,WAAWA,CACTC,IAAY,EACZC,QAAiB,EACjBC,UAAkB,EAClBC,QAAgB,EAChBC,SAAiB,EACjBC,MAAc,EACdC,qBAA8B,EAC9BC,SAAiB,EACjBC,SAAiB,EACjB;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IACA,IAAI,CAACC,IAAI,GAAGV,IAAI;IAChB,IAAI,CAACW,QAAQ,GAAGV,QAAQ;IACxB,IAAI,CAACW,UAAU,GAAGV,UAAU;IAC5B,IAAI,CAACW,QAAQ,GAAGV,QAAQ;IACxB,IAAI,CAACW,SAAS,GAAGV,SAAS;IAC1B,IAAI,CAACW,MAAM,GAAGV,MAAM;IACpB,IAAI,CAACW,qBAAqB,GAAGV,qBAAqB;IAClD,IAAI,CAACW,SAAS,GAAGV,SAAS;IAC1B,IAAI,CAACW,SAAS,GAAGV,SAAS;EAC5B;EACA;AACF;AACA;AACA;AACA;AACA;EACE,OAAOW,SAASA,CAACC,IAAS,EAAE;IAC1B,OAAO,IAAItB,MAAM,CACfsB,IAAI,CAACpB,IAAI,EACToB,IAAI,CAACnB,QAAQ,EACbmB,IAAI,CAAClB,UAAU,EACfkB,IAAI,CAACjB,QAAQ,EACbiB,IAAI,CAAChB,SAAS,EACdgB,IAAI,CAACf,MAAM,EACXe,IAAI,CAACd,qBAAqB,EAC1Bc,IAAI,CAACb,SAAS,EACda,IAAI,CAACZ,SACP,CAAC;EACH;AACF;AAAC,IAAAa,QAAA,GACcvB,MAAM;AAAAwB,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|