@shopgate/engage 7.20.0-beta.12 → 7.20.0-beta.13

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.
@@ -1,6 +1,6 @@
1
- function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}import{isAvailable}from'@shopgate/native-modules';import{isIos}from'@shopgate/pwa-common/selectors/client';import{updateLegacyNavigationBar}from"../helpers/updateLegacyNavigationBar";/**
1
+ function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}import{isIos}from'@shopgate/pwa-common/selectors/client';import{updateLegacyNavigationBar}from"../helpers/updateLegacyNavigationBar";/**
2
2
  * Updates the status bar background on iOS devices.
3
3
  * @param {string} color The background color.
4
4
  * @param {boolean} isDefault When set, the status bar will init with the color on next app start.
5
5
  * @return {Function} A redux thunk.
6
- */export default function updateStatusBarBackground(color){var isDefault=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;return function(dispatch,getState){if(!isAvailable()&&!isIos(getState())){return;}updateLegacyNavigationBar(_extends({},color&&{statusBarBackground:color},{isDefault:isDefault}));};}
6
+ */export default function updateStatusBarBackground(color){var isDefault=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;return function(dispatch,getState){if(!isIos(getState())){return;}updateLegacyNavigationBar(_extends({},color&&{statusBarBackground:color},{isDefault:isDefault}));};}
@@ -1,4 +1,6 @@
1
1
  function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}import Color from'color';import{isAvailable,StatusBar}from'@shopgate/native-modules';import broadcastEvent from'@shopgate/pwa-core/commands/broadcastEvent';/**
2
2
  * Updates the styles of the navigation bar of iOS devices.
3
3
  * @param {Object} options Options for the status bar.
4
- */export var updateLegacyNavigationBar=function updateLegacyNavigationBar(){var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var targetTab=options.targetTab||'main';var isDefault=options.isDefault;var styles=_extends({},options.color&&{color:options.color},{},options.background&&{background:options.background},{},options.buttonColor&&{buttonColor:options.buttonColor},{},options.buttonColorDisabled&&{buttonColorDisabled:options.buttonColorDisabled},{},options.statusBarBackground&&{statusBarBackground:options.statusBarBackground});if(!styles.statusBarBackground&&styles.background){styles.statusBarBackground=styles.background;}var statusBarStyle;if(options.statusBarStyle){statusBarStyle=options.statusBarStyle;}else if(styles.statusBarBackground){statusBarStyle=Color(styles.statusBarBackground).isDark()?'light':'dark';}if(isAvailable()){var style=statusBarStyle==='dark'?'dark-content':'light-content';StatusBar.setBarStyle({style:style});if(styles.statusBarBackground){StatusBar.setBackgroundColor({color:styles.statusBarBackground});}return;}broadcastEvent({event:'updateNavigationBarStyle',parameters:[_extends({},statusBarStyle&&{statusBarStyle:statusBarStyle},{},isDefault&&{isDefault:isDefault},{targetTab:targetTab,styles:styles})]});};
4
+ */export var updateLegacyNavigationBar=function updateLegacyNavigationBar(){var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var targetTab=options.targetTab||'main';var isDefault=options.isDefault;var styles=_extends({},options.color&&{color:options.color},{},options.background&&{background:options.background},{},options.buttonColor&&{buttonColor:options.buttonColor},{},options.buttonColorDisabled&&{buttonColorDisabled:options.buttonColorDisabled},{},options.statusBarBackground&&{statusBarBackground:options.statusBarBackground});if(!styles.statusBarBackground&&styles.background){styles.statusBarBackground=styles.background;}var statusBarStyle;if(options.statusBarStyle){statusBarStyle=options.statusBarStyle;}else if(styles.statusBarBackground){statusBarStyle=Color(styles.statusBarBackground).isDark()?'light':'dark';}// Status bar update via native-modules deactivated for now since it doesn't work
5
+ // reliable when opening a page inside the In-App-Browser.
6
+ if(false&&isAvailable()){var style=statusBarStyle==='dark'?'dark-content':'light-content';StatusBar.setBarStyle({style:style});if(styles.statusBarBackground){StatusBar.setBackgroundColor({color:styles.statusBarBackground});}return;}broadcastEvent({event:'updateNavigationBarStyle',parameters:[_extends({},statusBarStyle&&{statusBarStyle:statusBarStyle},{},isDefault&&{isDefault:isDefault},{targetTab:targetTab,styles:styles})]});};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopgate/engage",
3
- "version": "7.20.0-beta.12",
3
+ "version": "7.20.0-beta.13",
4
4
  "description": "Shopgate's ENGAGE library.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Shopgate <support@shopgate.com>",
@@ -16,12 +16,12 @@
16
16
  ],
17
17
  "dependencies": {
18
18
  "@shopgate/native-modules": "1.0.0-beta.18",
19
- "@shopgate/pwa-common": "7.20.0-beta.12",
20
- "@shopgate/pwa-common-commerce": "7.20.0-beta.12",
21
- "@shopgate/pwa-core": "7.20.0-beta.12",
22
- "@shopgate/pwa-ui-ios": "7.20.0-beta.12",
23
- "@shopgate/pwa-ui-material": "7.20.0-beta.12",
24
- "@shopgate/pwa-ui-shared": "7.20.0-beta.12",
19
+ "@shopgate/pwa-common": "7.20.0-beta.13",
20
+ "@shopgate/pwa-common-commerce": "7.20.0-beta.13",
21
+ "@shopgate/pwa-core": "7.20.0-beta.13",
22
+ "@shopgate/pwa-ui-ios": "7.20.0-beta.13",
23
+ "@shopgate/pwa-ui-material": "7.20.0-beta.13",
24
+ "@shopgate/pwa-ui-shared": "7.20.0-beta.13",
25
25
  "@stripe/react-stripe-js": "^1.1.2",
26
26
  "@stripe/stripe-js": "^1.3.1",
27
27
  "@virtuous/conductor": "~2.5.0",