@shopgate/engage 7.9.0-beta.8 → 7.9.0-beta.9
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,7 +1,7 @@
|
|
|
1
|
-
function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance");}function _iterableToArrayLimit(arr,i){var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}import React,{useState,useCallback}from'react';import PropTypes from'prop-types';import{css}from'glamor';import{connect}from'react-redux';import{getWishlistItemQuantityEnabled}from"../../../core/selectors/shopSettings";import UnitQuantityPicker from"../../../product/components/UnitQuantityPicker/UnitQuantityPicker";var styles={root:css({width:120})};/**
|
|
1
|
+
function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance");}function _iterableToArrayLimit(arr,i){var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}import React,{useState,useCallback,useEffect}from'react';import PropTypes from'prop-types';import{css}from'glamor';import{connect}from'react-redux';import{getWishlistItemQuantityEnabled}from"../../../core/selectors/shopSettings";import UnitQuantityPicker from"../../../product/components/UnitQuantityPicker/UnitQuantityPicker";var styles={root:css({width:120})};/**
|
|
2
2
|
* @return {Function} The extended component props.
|
|
3
3
|
*/var makeMapStateToProps=function makeMapStateToProps(){return function(state){return{wishlistItemQuantityEnabled:getWishlistItemQuantityEnabled(state)};};};/**
|
|
4
4
|
*
|
|
5
5
|
* @param {Object} props The component props
|
|
6
6
|
* @returns {JSX}
|
|
7
|
-
*/var ItemQuantity=function ItemQuantity(_ref){var wishlistItemQuantityEnabled=_ref.wishlistItemQuantityEnabled,quantity=_ref.quantity,onChange=_ref.onChange;var _useState=useState(quantity),_useState2=_slicedToArray(_useState,2),internalQuantity=_useState2[0],setInternalQuantity=_useState2[1];var handleChange=useCallback(function(newQuantity){setInternalQuantity(newQuantity);onChange(newQuantity);},[onChange]);if(!wishlistItemQuantityEnabled){return null;}return React.createElement("div",{className:styles.root},React.createElement(UnitQuantityPicker,{maxValue:99,maxDecimals:0,incrementStep:1,decrementStep:1,onChange:handleChange,value:internalQuantity}));};export default connect(makeMapStateToProps)(ItemQuantity);
|
|
7
|
+
*/var ItemQuantity=function ItemQuantity(_ref){var wishlistItemQuantityEnabled=_ref.wishlistItemQuantityEnabled,quantity=_ref.quantity,onChange=_ref.onChange;var _useState=useState(quantity),_useState2=_slicedToArray(_useState,2),internalQuantity=_useState2[0],setInternalQuantity=_useState2[1];var handleChange=useCallback(function(newQuantity){setInternalQuantity(newQuantity);onChange(newQuantity);},[onChange]);useEffect(function(){setInternalQuantity(quantity);},[quantity]);if(!wishlistItemQuantityEnabled){return null;}return React.createElement("div",{className:styles.root},React.createElement(UnitQuantityPicker,{maxValue:99,maxDecimals:0,incrementStep:1,decrementStep:1,onChange:handleChange,value:internalQuantity}));};export default connect(makeMapStateToProps)(ItemQuantity);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopgate/engage",
|
|
3
|
-
"version": "7.9.0-beta.
|
|
3
|
+
"version": "7.9.0-beta.9",
|
|
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.9.0-beta.
|
|
20
|
-
"@shopgate/pwa-common-commerce": "7.9.0-beta.
|
|
21
|
-
"@shopgate/pwa-core": "7.9.0-beta.
|
|
22
|
-
"@shopgate/pwa-ui-ios": "7.9.0-beta.
|
|
23
|
-
"@shopgate/pwa-ui-material": "7.9.0-beta.
|
|
24
|
-
"@shopgate/pwa-ui-shared": "7.9.0-beta.
|
|
19
|
+
"@shopgate/pwa-common": "7.9.0-beta.9",
|
|
20
|
+
"@shopgate/pwa-common-commerce": "7.9.0-beta.9",
|
|
21
|
+
"@shopgate/pwa-core": "7.9.0-beta.9",
|
|
22
|
+
"@shopgate/pwa-ui-ios": "7.9.0-beta.9",
|
|
23
|
+
"@shopgate/pwa-ui-material": "7.9.0-beta.9",
|
|
24
|
+
"@shopgate/pwa-ui-shared": "7.9.0-beta.9",
|
|
25
25
|
"@stripe/react-stripe-js": "^1.1.2",
|
|
26
26
|
"@stripe/stripe-js": "^1.3.1",
|
|
27
27
|
"@virtuous/conductor": "~2.5.0",
|