@capgo/inappbrowser 6.0.19 → 6.0.21

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.
@@ -143,8 +143,8 @@ public class InAppBrowserPlugin: CAPPlugin {
143
143
  }
144
144
 
145
145
  self.webViewController?.source = .remote(url!)
146
- self.webViewController?.leftNavigaionBarItemTypes = self.getToolbarItems(toolbarType: toolbarType) + [.reload]
147
- self.webViewController?.leftNavigaionBarItemTypes = self.getToolbarItems(toolbarType: toolbarType)
146
+ self.webViewController?.leftNavigationBarItemTypes = self.getToolbarItems(toolbarType: toolbarType) + [.reload]
147
+ self.webViewController?.leftNavigationBarItemTypes = self.getToolbarItems(toolbarType: toolbarType)
148
148
  self.webViewController?.toolbarItemTypes = []
149
149
  self.webViewController?.doneBarButtonItemPosition = .right
150
150
  if call.getBool("showArrow", false) {
@@ -169,13 +169,14 @@ public class InAppBrowserPlugin: CAPPlugin {
169
169
  self.navigationWebViewController?.toolbar.isTranslucent = false
170
170
  self.navigationWebViewController?.navigationBar.backgroundColor = backgroundColor
171
171
  self.navigationWebViewController?.toolbar.backgroundColor = backgroundColor
172
+ self.navigationWebViewController?.toolbar.tintColor = backgroundColor == UIColor.black ? UIColor.white : UIColor.black
172
173
  self.navigationWebViewController?.modalPresentationStyle = .fullScreen
173
174
  if toolbarType == "blank" {
174
175
  self.navigationWebViewController?.navigationBar.isHidden = true
175
176
  }
176
177
  if showReloadButton {
177
178
  let toolbarItems = self.getToolbarItems(toolbarType: toolbarType)
178
- self.webViewController?.leftNavigaionBarItemTypes = toolbarItems + [.reload]
179
+ self.webViewController?.leftNavigationBarItemTypes = toolbarItems + [.reload]
179
180
  }
180
181
  if !self.isPresentAfterPageLoad {
181
182
  self.presentView(isAnimated: isAnimated)
@@ -272,7 +273,7 @@ public class InAppBrowserPlugin: CAPPlugin {
272
273
  }
273
274
 
274
275
  self.webViewController?.source = .remote(url!)
275
- self.webViewController?.leftNavigaionBarItemTypes = [.reload]
276
+ self.webViewController?.leftNavigationBarItemTypes = [.reload]
276
277
  self.webViewController?.toolbarItemTypes = [.back, .forward, .activity]
277
278
  self.webViewController?.capBrowserPlugin = self
278
279
  self.webViewController?.hasDynamicTitle = true
@@ -132,7 +132,7 @@ open class WKWebViewController: UIViewController {
132
132
 
133
133
  open var websiteTitleInNavigationBar = true
134
134
  open var doneBarButtonItemPosition: NavigationBarPosition = .right
135
- open var leftNavigaionBarItemTypes: [BarButtonItemType] = []
135
+ open var leftNavigationBarItemTypes: [BarButtonItemType] = []
136
136
  open var rightNavigaionBarItemTypes: [BarButtonItemType] = []
137
137
  open var toolbarItemTypes: [BarButtonItemType] = [.back, .forward, .reload, .activity]
138
138
 
@@ -468,7 +468,7 @@ fileprivate extension WKWebViewController {
468
468
  // if presentingViewController != nil {
469
469
  switch doneBarButtonItemPosition {
470
470
  case .left:
471
- if !leftNavigaionBarItemTypes.contains(where: { type in
471
+ if !leftNavigationBarItemTypes.contains(where: { type in
472
472
  switch type {
473
473
  case .done:
474
474
  return true
@@ -476,7 +476,7 @@ fileprivate extension WKWebViewController {
476
476
  return false
477
477
  }
478
478
  }) {
479
- leftNavigaionBarItemTypes.insert(.done, at: 0)
479
+ leftNavigationBarItemTypes.insert(.done, at: 0)
480
480
  }
481
481
  case .right:
482
482
  if !rightNavigaionBarItemTypes.contains(where: { type in
@@ -494,7 +494,7 @@ fileprivate extension WKWebViewController {
494
494
  }
495
495
  // }
496
496
 
497
- navigationItem.leftBarButtonItems = leftNavigaionBarItemTypes.map {
497
+ navigationItem.leftBarButtonItems = leftNavigationBarItemTypes.map {
498
498
  barButtonItemType in
499
499
  if let barButtonItem = barButtonItem(barButtonItemType) {
500
500
  return barButtonItem
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/inappbrowser",
3
- "version": "6.0.19",
3
+ "version": "6.0.21",
4
4
  "description": "Capacitor plugin in app browser",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",