@shopgate/engage 7.8.0 → 7.8.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import React,{useContext,useMemo}from'react';import classNames from'classnames';import I18n from'@shopgate/pwa-common/components/I18n';import Link from'@shopgate/pwa-common/components/Link';import{SurroundPortals}from'@shopgate/engage/components';import{CART_CHECKOUT_BUTTON}from'@shopgate/pwa-common-commerce/cart/constants/Portals';import RippleButton from'@shopgate/pwa-ui-shared/RippleButton';import{CHECKOUT_PATH}from'@shopgate/pwa-common/constants/RoutePaths';import{CartContext}from"../../cart.context";import{button,disabledButton}from"./CartSummaryWideCheckoutButton.style";import connect from"./CartSummaryWideCheckoutButton.connector";/**
|
|
1
|
+
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import React,{useContext,useMemo}from'react';import classNames from'classnames';import I18n from'@shopgate/pwa-common/components/I18n';import Link from'@shopgate/pwa-common/components/Link';import{SurroundPortals}from'@shopgate/engage/components';import{CART_CHECKOUT_BUTTON}from'@shopgate/pwa-common-commerce/cart/constants/Portals';import RippleButton from'@shopgate/pwa-ui-shared/RippleButton';import{CHECKOUT_PATH}from'@shopgate/pwa-common/constants/RoutePaths';import{CartContext}from"../../cart.context";import{container,button,disabledButton}from"./CartSummaryWideCheckoutButton.style";import connect from"./CartSummaryWideCheckoutButton.connector";/**
|
|
2
2
|
* @param {Object} props The component props
|
|
3
3
|
* @returns {JSX}
|
|
4
|
-
*/var CartSummaryWideCheckoutButton=function CartSummaryWideCheckoutButton(_ref){var isOrderable=_ref.isOrderable;var _useContext=useContext(CartContext),isLoading=_useContext.isLoading;var isActive=useMemo(function(){return isOrderable&&!isLoading;},[isLoading,isOrderable]);var classes=classNames(button,_defineProperty({},disabledButton,!isActive));return React.createElement(SurroundPortals,{portalName:CART_CHECKOUT_BUTTON,props:{isActive:isActive}},React.createElement(Link,{href:CHECKOUT_PATH,disabled:!isActive},React.createElement(RippleButton,{disabled:!isActive,type:"regular",className:classes},React.createElement(I18n.Text,{string:"cart.checkout"}))));};CartSummaryWideCheckoutButton.defaultProps={isOrderable:true};export default connect(CartSummaryWideCheckoutButton);
|
|
4
|
+
*/var CartSummaryWideCheckoutButton=function CartSummaryWideCheckoutButton(_ref){var isOrderable=_ref.isOrderable;var _useContext=useContext(CartContext),isLoading=_useContext.isLoading;var isActive=useMemo(function(){return isOrderable&&!isLoading;},[isLoading,isOrderable]);var classes=classNames(button,_defineProperty({},disabledButton,!isActive));return React.createElement("div",{className:container},React.createElement(SurroundPortals,{portalName:CART_CHECKOUT_BUTTON,props:{isActive:isActive}},React.createElement(Link,{href:CHECKOUT_PATH,disabled:!isActive},React.createElement(RippleButton,{disabled:!isActive,type:"regular",className:classes},React.createElement(I18n.Text,{string:"cart.checkout"})))));};CartSummaryWideCheckoutButton.defaultProps={isOrderable:true};export default connect(CartSummaryWideCheckoutButton);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var colors=themeConfig.colors,variables=themeConfig.variables;export var button=css({width:'100%',background:"var(--color-primary, ".concat(colors.cta,")"),color:"var(--color-primary-contrast, ".concat(colors.ctaContrast,")!important"),borderRadius:4,margin:"".concat(variables.gap.big,"px 0")}).toString();export var disabledButton=css({background:colors.shade7,color:"".concat(colors.shade4,"!important")}).toString();
|
|
1
|
+
import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var colors=themeConfig.colors,variables=themeConfig.variables;export var container=css({display:'flex',flexDirection:'column'});export var button=css({width:'100%',background:"var(--color-primary, ".concat(colors.cta,")"),color:"var(--color-primary-contrast, ".concat(colors.ctaContrast,")!important"),borderRadius:4,margin:"".concat(variables.gap.big,"px 0")}).toString();export var disabledButton=css({background:colors.shade7,color:"".concat(colors.shade4,"!important")}).toString();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{css}from'glamor';import{isIOSTheme}from'@shopgate/engage/core';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var colors=themeConfig.colors,variables=themeConfig.variables,shadows=themeConfig.shadows;export var wrapper=css({background:colors.light,boxShadow:shadows.cart.paymentBar,position:'relative',zIndex:2});export var container=css({padding:isIOSTheme()?variables.gap.small:variables.gap.big,paddingBottom:0,lineHeight:1.45,flexWrap:'wrap',flexDirection:'column',minWidth:'auto'}).toString();export var checkoutButton=css({display:'flex',justifyContent:'flex-end'});export var checkoutButtonContainer=css({background:colors.light,alignItems:'center',padding:isIOSTheme()?variables.gap.small:variables.gap.big,position:'relative',zIndex:2});export var spacer=css({width:isIOSTheme()?27:32,order:1,flexShrink:0}).toString();
|
|
1
|
+
import{css}from'glamor';import{isIOSTheme}from'@shopgate/engage/core';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var colors=themeConfig.colors,variables=themeConfig.variables,shadows=themeConfig.shadows;export var wrapper=css({background:colors.light,boxShadow:shadows.cart.paymentBar,position:'relative',zIndex:2});export var container=css({padding:isIOSTheme()?variables.gap.small:variables.gap.big,paddingBottom:0,lineHeight:1.45,flexWrap:'wrap',flexDirection:'column',minWidth:'auto'}).toString();export var checkoutButton=css({display:'flex',justifyContent:'flex-end',flexDirection:'column'});export var checkoutButtonContainer=css({background:colors.light,alignItems:'center',padding:isIOSTheme()?variables.gap.small:variables.gap.big,position:'relative',zIndex:2});export var spacer=css({width:isIOSTheme()?27:32,order:1,flexShrink:0}).toString();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopgate/engage",
|
|
3
|
-
"version": "7.8.
|
|
3
|
+
"version": "7.8.1",
|
|
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.8.
|
|
20
|
-
"@shopgate/pwa-common-commerce": "7.8.
|
|
21
|
-
"@shopgate/pwa-core": "7.8.
|
|
22
|
-
"@shopgate/pwa-ui-ios": "7.8.
|
|
23
|
-
"@shopgate/pwa-ui-material": "7.8.
|
|
24
|
-
"@shopgate/pwa-ui-shared": "7.8.
|
|
19
|
+
"@shopgate/pwa-common": "7.8.1",
|
|
20
|
+
"@shopgate/pwa-common-commerce": "7.8.1",
|
|
21
|
+
"@shopgate/pwa-core": "7.8.1",
|
|
22
|
+
"@shopgate/pwa-ui-ios": "7.8.1",
|
|
23
|
+
"@shopgate/pwa-ui-material": "7.8.1",
|
|
24
|
+
"@shopgate/pwa-ui-shared": "7.8.1",
|
|
25
25
|
"@stripe/react-stripe-js": "^1.1.2",
|
|
26
26
|
"@stripe/stripe-js": "^1.3.1",
|
|
27
27
|
"@virtuous/conductor": "~2.5.0",
|
package/scanner/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @module scanner */ // ACTION-CREATORS
|
|
2
|
-
export{default as startScanner}from'@shopgate/pwa-common-commerce/scanner
|
|
3
|
-
export{default as handleBarCode}from'@shopgate/pwa-common-commerce/scanner/actions/handleBarCode';export{default as handleQrCode}from'@shopgate/pwa-common-commerce/scanner/actions/handleQrCode';export{default as scanner}from'@shopgate/pwa-core/classes/Scanner';// CONSTANTS
|
|
2
|
+
export{default as startScanner}from'@shopgate/pwa-common-commerce/scanner/action-creators/startScanner';export{default as successHandleScanner}from'@shopgate/pwa-common-commerce/scanner/action-creators/successHandleScanner';export{default as errorHandleScanner}from'@shopgate/pwa-common-commerce/scanner/action-creators/errorHandleScanner';// ACTIONS
|
|
3
|
+
export{default as handleBarCode}from'@shopgate/pwa-common-commerce/scanner/actions/handleBarCode';export{default as handleQrCode}from'@shopgate/pwa-common-commerce/scanner/actions/handleQrCode';export{default as handleSearch}from'@shopgate/pwa-common-commerce/scanner/actions/handleSearch';export{default as handleNoResults}from'@shopgate/pwa-common-commerce/scanner/actions/handleNoResults';export{default as scanner}from'@shopgate/pwa-core/classes/Scanner';// CONSTANTS
|
|
4
4
|
export*from'@shopgate/pwa-common-commerce/scanner/constants';export*from'@shopgate/pwa-common-commerce/scanner/constants/Portals';export*from'@shopgate/pwa-core/constants/Scanner';// HELPERS
|
|
5
5
|
export*from'@shopgate/pwa-common-commerce/scanner/helpers';// STREAMS
|
|
6
6
|
export*from'@shopgate/pwa-common-commerce/scanner/streams';
|