react-native-pointr 9.9.0 → 9.9.2

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/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [9.9.2] - 2026-07-09
8
+
9
+ ### Changed
10
+ - Mobile SDK 9.9.2 integration.
11
+
12
+
13
+ ## [9.9.1] - 2026-06-23
14
+
15
+ ### Changed
16
+ - Mobile SDK 9.9.1 integration.
17
+
18
+
7
19
  ## [9.9.0] - 2026-04-22
8
20
 
9
21
  ### Changed
@@ -93,7 +93,7 @@ dependencies {
93
93
  //noinspection GradleDynamicVersion
94
94
  implementation "com.facebook.react:react-android:0.82.1"
95
95
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
96
- implementation("com.pointrlabs:pointr:9.9.0")
96
+ implementation("com.pointrlabs:pointr:9.9.2")
97
97
  implementation ("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version")
98
98
  implementation 'com.google.android.material:material:1.12.0'
99
99
  implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
@@ -20,6 +20,7 @@ import com.pointrlabs.core.management.interfaces.PointrListener
20
20
  import com.pointrlabs.core.management.models.ErrorMessage
21
21
  import com.pointrlabs.core.management.models.PTRParams
22
22
  import com.pointrlabs.core.management.models.Site
23
+ import com.pointrlabs.ui.map.views.PTRMapWidgetDisplaySpecs
23
24
  import com.pointrlabs.core.management.models.deeplink.PTRMapWidgetAction
24
25
  import com.pointrlabs.core.management.models.deeplink.PTRMapWidgetBuildingLocation
25
26
  import com.pointrlabs.core.management.models.deeplink.PTRMapWidgetFocusAction
@@ -46,11 +47,13 @@ import com.pointrlabs.ui.map.views.PTRMapFragment
46
47
  import com.pointrlabs.ui.map.views.PTRMapWidgetFragment
47
48
  import com.pointrlabs.ui.map.views.wayfinding.MarkMyCarBottomSheet
48
49
  import java.util.concurrent.Semaphore
50
+ import kotlin.reflect.KMutableProperty1
49
51
 
50
52
 
51
53
  @SuppressLint("LogNotTimber")
52
54
  class PTRMapWidgetManager(private val reactContext: ReactApplicationContext) :
53
- ViewGroupManager<FrameLayout>(), MapEventsListener, MarkMyCarDetailsEventsListener, WayfindingEventsListener {
55
+ ViewGroupManager<FrameLayout>(), MapEventsListener, MarkMyCarDetailsEventsListener,
56
+ WayfindingEventsListener {
54
57
 
55
58
  override fun getName() = REACT_CLASS
56
59
 
@@ -70,6 +73,7 @@ class PTRMapWidgetManager(private val reactContext: ReactApplicationContext) :
70
73
  private var pendingCommandJson: String? = null
71
74
  private var pendingSdkConfigJson: String? = null
72
75
  private var commandDidExecute = false
76
+
73
77
  // Reset per view instance in createViewInstance so re-navigation works.
74
78
  private var commandTriggered = false
75
79
 
@@ -88,20 +92,31 @@ class PTRMapWidgetManager(private val reactContext: ReactApplicationContext) :
88
92
  @ReactProp(name = "mapWidgetConfig")
89
93
  fun setMapWidgetConfig(view: FrameLayout, configJson: String?) {
90
94
  if (configJson == null) return
91
- try {
92
- val obj = org.json.JSONObject(configJson)
93
- val cfg = PointrModule.mapWidgetConfiguration
94
- cfg::class.members.filterIsInstance<kotlin.reflect.KMutableProperty1<*, *>>().forEach { prop ->
95
- val jsonKey = if (prop.name == "isBuildingLevelSelectorEnabled") "isLevelSelectorEnabled" else prop.name
96
- if (!obj.has(jsonKey)) return@forEach
97
- try {
98
- val value = obj.getBoolean(jsonKey)
99
- @Suppress("UNCHECKED_CAST")
100
- (prop as kotlin.reflect.KMutableProperty1<Any, Boolean>).set(cfg, value)
101
- } catch (_: Exception) {}
95
+ val obj = org.json.JSONObject(configJson)
96
+ val cfg = PointrModule.mapWidgetConfiguration
97
+ cfg::class.members.filterIsInstance<KMutableProperty1<*, *>>().forEach { kCallable ->
98
+ if (!obj.has(kCallable.name)) {
99
+ val hasFallback = when (kCallable.name) {
100
+ "isBuildingLevelSelectorEnabled" -> obj.has("isLevelSelectorEnabled")
101
+ "ptrMapWidgetDisplaySpecs" -> obj.has("isFullScreen") || obj.has("isEdgeToEdgeEnabled")
102
+ else -> false
103
+ }
104
+ if (!hasFallback) return@forEach
105
+ }
106
+ try {
107
+ val value = if (kCallable.name == "isBuildingLevelSelectorEnabled") {
108
+ obj.getBoolean("isLevelSelectorEnabled")
109
+ } else if (kCallable.name == "ptrMapWidgetDisplaySpecs") {
110
+ val isEdgeToEdgeEnabled = obj.getBoolean("isEdgeToEdgeEnabled")
111
+ val isFullScreen = obj.getBoolean("isFullScreen")
112
+ PTRMapWidgetDisplaySpecs(isFullScreen, isEdgeToEdgeEnabled)
113
+ } else {
114
+ obj.getBoolean(kCallable.name)
115
+ }
116
+ kCallable.setter.call(cfg, value)
117
+ } catch (ex: Exception) {
118
+ Log.e("PTRMapWidgetConfigurationError", "Caught exception: $ex")
102
119
  }
103
- } catch (e: Exception) {
104
- Log.e(name, "mapWidgetConfig parse error: ${e.message}")
105
120
  }
106
121
  }
107
122
 
@@ -169,30 +184,39 @@ class PTRMapWidgetManager(private val reactContext: ReactApplicationContext) :
169
184
  args.pushString(site)
170
185
  executeCommand(PTRMapWidgetCommandType.SITE, args)
171
186
  }
187
+
172
188
  PTRMapWidgetCommandType.BUILDING -> {
173
189
  args.pushString(site); args.pushString(building)
174
190
  executeCommand(PTRMapWidgetCommandType.BUILDING, args)
175
191
  }
192
+
176
193
  PTRMapWidgetCommandType.LEVEL -> {
177
194
  args.pushString(site); args.pushString(building); args.pushInt(level)
178
195
  executeCommand(PTRMapWidgetCommandType.LEVEL, args)
179
196
  }
197
+
180
198
  PTRMapWidgetCommandType.POI -> {
181
199
  args.pushString(site); args.pushString(poi)
182
200
  executeCommand(PTRMapWidgetCommandType.POI, args)
183
201
  }
202
+
184
203
  PTRMapWidgetCommandType.PATH -> {
185
204
  args.pushString(site); args.pushString(poi)
186
205
  executeCommand(PTRMapWidgetCommandType.PATH, args)
187
206
  }
207
+
188
208
  PTRMapWidgetCommandType.STATIC_PATH -> {
189
209
  args.pushString(site); args.pushString(fromPoi); args.pushString(toPoi)
190
210
  executeCommand(PTRMapWidgetCommandType.STATIC_PATH, args)
191
211
  }
212
+
192
213
  PTRMapWidgetCommandType.STATIC_WAYFINDING -> {
193
- args.pushString(site); args.pushString(sourcePoi); args.pushString(destinationPoi)
214
+ args.pushString(site); args.pushString(sourcePoi); args.pushString(
215
+ destinationPoi
216
+ )
194
217
  executeCommand(PTRMapWidgetCommandType.STATIC_WAYFINDING, args)
195
218
  }
219
+
196
220
  else -> Log.w(name, "Unknown command type in command prop: $type")
197
221
  }
198
222
  } catch (e: Exception) {
@@ -328,8 +352,10 @@ class PTRMapWidgetManager(private val reactContext: ReactApplicationContext) :
328
352
  val siteId = args.getString(0).orEmpty()
329
353
  val sourcePoiId = args.getString(1).orEmpty()
330
354
  val destinationPoiId = args.getString(2).orEmpty()
331
- val sourceLocation = PTRMapWidgetPoiLocation(siteId, sourcePoiId, isExternalIdentifier = true)
332
- val destinationLocation = PTRMapWidgetPoiLocation(siteId, destinationPoiId, isExternalIdentifier = true)
355
+ val sourceLocation =
356
+ PTRMapWidgetPoiLocation(siteId, sourcePoiId, isExternalIdentifier = true)
357
+ val destinationLocation =
358
+ PTRMapWidgetPoiLocation(siteId, destinationPoiId, isExternalIdentifier = true)
333
359
  PTRMapWidgetStaticWayfindingAction(sourceLocation, destinationLocation)
334
360
  }
335
361
 
@@ -380,22 +406,35 @@ class PTRMapWidgetManager(private val reactContext: ReactApplicationContext) :
380
406
  val siteId = args.getString(5).orEmpty()
381
407
  PTRMapWidgetSiteLocation(siteId, isExternal = true)
382
408
  }
409
+
383
410
  PTRMapWidgetCommandType.BUILDING -> {
384
411
  val siteId = args.getString(5).orEmpty()
385
412
  val buildingId = args.getString(6).orEmpty()
386
- PTRMapWidgetBuildingLocation(siteId, buildingId, isExternalIdentifier = true)
413
+ PTRMapWidgetBuildingLocation(
414
+ siteId,
415
+ buildingId,
416
+ isExternalIdentifier = true
417
+ )
387
418
  }
419
+
388
420
  PTRMapWidgetCommandType.LEVEL -> {
389
421
  val siteId = args.getString(5).orEmpty()
390
422
  val buildingId = args.getString(6).orEmpty()
391
423
  val levelIndex = args.getInt(7)
392
- PTRMapWidgetLevelLocation(siteId, buildingId, levelIndex, isExternalIdentifier = true)
424
+ PTRMapWidgetLevelLocation(
425
+ siteId,
426
+ buildingId,
427
+ levelIndex,
428
+ isExternalIdentifier = true
429
+ )
393
430
  }
431
+
394
432
  PTRMapWidgetCommandType.POI -> {
395
433
  val siteId = args.getString(5).orEmpty()
396
434
  val poiId = args.getString(6).orEmpty()
397
435
  PTRMapWidgetPoiLocation(siteId, poiId, isExternalIdentifier = true)
398
436
  }
437
+
399
438
  else -> {
400
439
  // Default to site if invalid focus type
401
440
  val siteId = args.getString(5).orEmpty()
@@ -507,22 +546,26 @@ class PTRMapWidgetManager(private val reactContext: ReactApplicationContext) :
507
546
  event.putString("siteExternalIdentifier", args[5] as String)
508
547
  event.putString("error", args.last().toString())
509
548
  }
549
+
510
550
  PTRMapWidgetCommandType.BUILDING -> {
511
551
  event.putString("siteExternalIdentifier", args[5] as String)
512
552
  event.putString("buildingExternalIdentifier", args[6] as String)
513
553
  event.putString("error", args.last().toString())
514
554
  }
555
+
515
556
  PTRMapWidgetCommandType.LEVEL -> {
516
557
  event.putString("siteExternalIdentifier", args[5] as String)
517
558
  event.putString("buildingExternalIdentifier", args[6] as String)
518
559
  event.putInt("levelIndex", (args[7] as Number).toInt())
519
560
  event.putString("error", args.last().toString())
520
561
  }
562
+
521
563
  PTRMapWidgetCommandType.POI -> {
522
564
  event.putString("siteExternalIdentifier", args[5] as String)
523
565
  event.putString("poiExternalIdentifier", args[6] as String)
524
566
  event.putString("error", args.last().toString())
525
567
  }
568
+
526
569
  else -> {
527
570
  event.putString("siteExternalIdentifier", args[5] as String)
528
571
  event.putString("error", args.last().toString())
@@ -544,7 +587,7 @@ class PTRMapWidgetManager(private val reactContext: ReactApplicationContext) :
544
587
 
545
588
  private fun onWayfindingEvent(type: Int, poi: Poi?) {
546
589
  val event: WritableMap = WritableNativeMap()
547
- event.putInt("type" , type)
590
+ event.putInt("type", type)
548
591
  event.putMap("poi", poi?.map)
549
592
  Log.v(name, "Sending event for wayfinding: $event")
550
593
  reactContext.getJSModule(RCTEventEmitter::class.java).receiveEvent(
@@ -848,20 +891,23 @@ class PTRMapWidgetManager(private val reactContext: ReactApplicationContext) :
848
891
 
849
892
  override fun wayfindingDidShown() {
850
893
  Log.v(name, "Wayfinding did shown")
851
- val destination = (ptrMapWidgetFragment?.mapFragment?.currentRouteSession?.destination as? Poi)
894
+ val destination =
895
+ (ptrMapWidgetFragment?.mapFragment?.currentRouteSession?.destination as? Poi)
852
896
  onWayfindingEvent(0, destination)
853
897
 
854
898
  }
855
899
 
856
900
  override fun wayfindingDidTapClose() {
857
901
  Log.v(name, "Wayfinding cancelled")
858
- val destination = (ptrMapWidgetFragment?.mapFragment?.currentRouteSession?.destination as? Poi)
902
+ val destination =
903
+ (ptrMapWidgetFragment?.mapFragment?.currentRouteSession?.destination as? Poi)
859
904
  onWayfindingEvent(-1, destination)
860
905
  }
861
906
 
862
907
  override fun wayfindingDone() {
863
908
  Log.v(name, "Wayfinding done")
864
- val destination = (ptrMapWidgetFragment?.mapFragment?.currentRouteSession?.destination as? Poi)
909
+ val destination =
910
+ (ptrMapWidgetFragment?.mapFragment?.currentRouteSession?.destination as? Poi)
865
911
  onWayfindingEvent(1, destination)
866
912
  }
867
913
 
@@ -32,6 +32,7 @@ import com.pointrlabs.core.util.models.error.PTRError
32
32
  import com.pointrlabs.ui.map.models.events_listeners.MapEventsListener
33
33
  import com.pointrlabs.ui.map.viewmodels.PTRMapWidgetConfiguration
34
34
  import com.pointrlabs.ui.map.views.PTRMapFragment
35
+ import com.pointrlabs.ui.map.views.PTRMapWidgetDisplaySpecs
35
36
  import com.pointrlabs.ui.map.views.helper_views.PTRDialog
36
37
  import org.json.JSONObject
37
38
  import kotlin.random.Random
@@ -491,16 +492,29 @@ class PointrModule(reactContext: ReactApplicationContext) :
491
492
  }
492
493
  }
493
494
 
494
- fun setPointrMapWidgetConfiguration(jsonObject: JSONObject) {
495
- mapWidgetConfiguration::class.members.forEach { kCallable ->
496
- if (kCallable !is KMutableProperty1<*, *>) return@forEach
497
- if (!jsonObject.has(kCallable.name)) return@forEach
495
+ fun setPointrMapWidgetConfiguration(obj: JSONObject) {
496
+ mapWidgetConfiguration::class.members.filterIsInstance<KMutableProperty1<*, *>>().forEach { kCallable ->
497
+ if (!obj.has(kCallable.name)) {
498
+ val hasFallback = when (kCallable.name) {
499
+ "isBuildingLevelSelectorEnabled" -> obj.has("isLevelSelectorEnabled")
500
+ "ptrMapWidgetDisplaySpecs" -> obj.has("isFullScreen") || obj.has("isEdgeToEdgeEnabled")
501
+ else -> false
502
+ }
503
+ if (!hasFallback) return@forEach
504
+ }
498
505
  try {
499
- val value = if (kCallable.name == "isBuildingLevelSelectorEnabled")
500
- jsonObject.getBoolean("isLevelSelectorEnabled")
501
- else jsonObject.getBoolean(kCallable.name)
506
+ val value = if (kCallable.name == "isBuildingLevelSelectorEnabled") {
507
+ obj.getBoolean("isLevelSelectorEnabled")
508
+ } else if (kCallable.name == "ptrMapWidgetDisplaySpecs") {
509
+ val isEdgeToEdgeEnabled = obj.getBoolean("isEdgeToEdgeEnabled")
510
+ val isFullScreen = obj.getBoolean("isFullScreen")
511
+ PTRMapWidgetDisplaySpecs(isFullScreen, isEdgeToEdgeEnabled)
512
+ } else {
513
+ obj.getBoolean(kCallable.name)
514
+ }
502
515
  kCallable.setter.call(mapWidgetConfiguration, value)
503
- } catch (_: Exception) {
516
+ } catch (ex: Exception) {
517
+ Log.e("PTRMapWidgetConfigurationError", "Caught exception: $ex")
504
518
  }
505
519
  }
506
520
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-pointr",
3
- "version": "9.9.0",
3
+ "version": "9.9.2",
4
4
  "description": "Pointr React-Native Module",
5
5
  "main": "src/index",
6
6
  "files": [
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
16
16
 
17
17
  s.source_files = "ios/**/*.{h,m,mm,swift}"
18
18
 
19
- s.dependency 'PointrKit', '9.9.0'
19
+ s.dependency 'PointrKit', '9.9.2'
20
20
 
21
21
  # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
22
22
  # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
@@ -49,6 +49,10 @@ export interface PTRMapWidgetConfiguration {
49
49
  readonly isQuickAccessEnabled?: boolean;
50
50
  /** Show/hide the app banner */
51
51
  readonly isAppBannerEnabled?: boolean;
52
+ /** If you will use MapWidget as full screen */
53
+ readonly isFullScreen?: boolean;
54
+ /** If your app has edge to edge enabled. It is usually safer to keep this true */
55
+ readonly isEdgeToEdgeEnabled?: boolean;
52
56
  }
53
57
 
54
58
  /**