@shopgate/engage 7.25.0-beta.1 → 7.26.0-beta.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.
Files changed (77) hide show
  1. package/a11y/styles.js +2 -0
  2. package/cart/components/CartItem/CartItemProductLayout.js +3 -3
  3. package/cart/components/CartItem/CartItemProductLayout.style.js +1 -1
  4. package/cart/components/CartItem/CartItemProductTitle.js +5 -4
  5. package/cart/components/CartItems/CartItemCard.style.js +1 -1
  6. package/cart/components/PaymentBar/PaymentBarCheckoutButton.js +3 -3
  7. package/cart/components/Substitution/index.js +1 -1
  8. package/components/Menu/components/Item/index.js +2 -2
  9. package/components/TextLink/TextLink.js +3 -3
  10. package/components/Toggle/index.js +2 -2
  11. package/favorites/components/ItemFulfillmentMethod/ItemFulfillmentMethod.js +1 -1
  12. package/favorites/components/List/List.js +3 -3
  13. package/favorites/components/List/ListAccordionHeader.js +8 -0
  14. package/favorites/components/List/ListAccordionLabel.js +5 -4
  15. package/favorites/components/ListChooser/ListChooser.js +1 -1
  16. package/filter/components/PriceSlider/components/Label/index.js +1 -1
  17. package/locations/action-creators/selectLocation.js +1 -2
  18. package/locations/actions/fetchLocations.js +1 -1
  19. package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherBar.js +3 -3
  20. package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherBar.style.js +1 -1
  21. package/locations/components/StockInfo/StockInfo.js +2 -2
  22. package/locations/components/StockInfo/StockInfoInventory.js +2 -2
  23. package/locations/components/StoreFinder/StoreFinder.js +3 -3
  24. package/locations/components/StoreFinder/StoreFinder.style.js +2 -1
  25. package/locations/components/StoreFinder/StoreFinderLocation.js +2 -2
  26. package/locations/components/StoreFinder/StoreFinderLocation.style.js +1 -1
  27. package/locations/components/StoreFinder/StoreFinderLocationDetailsWide.js +3 -0
  28. package/locations/components/StoreFinder/StoreFinderLocationDetailsWide.style.js +1 -0
  29. package/locations/components/StoreFinder/StoreFinderLocationHeader.js +2 -2
  30. package/locations/components/StoreFinder/StoreFinderLocationHeader.style.js +1 -1
  31. package/locations/components/StoreFinder/StoreFinderLocations.style.js +2 -1
  32. package/locations/components/StoreFinder/StoreFinderMap.js +4 -0
  33. package/locations/components/StoreFinder/StoreFinderMap.style.js +2 -0
  34. package/locations/components/StoreFinder/StoreFinderSearch.style.js +1 -1
  35. package/locations/components/StoreFinder/StoreFinderSelectLocationButton.js +2 -2
  36. package/locations/components/StoreFinder/StoreFinderStoresNear.js +3 -0
  37. package/locations/components/StoreFinder/StoreFinderStoresNear.style.js +1 -0
  38. package/locations/components/StoreList/Store.style.js +1 -1
  39. package/locations/components/StoreList/StoreAddress.js +2 -2
  40. package/locations/components/StoreList/StoreAddressShort.js +2 -2
  41. package/locations/components/StoreList/StoreCard.js +2 -2
  42. package/locations/components/StoreList/StoreDetailsLine.js +1 -1
  43. package/locations/components/StoreList/StoreDistance.js +1 -1
  44. package/locations/components/StoreList/StoreListProduct.style.js +1 -1
  45. package/locations/components/StoreList/StoreListSearch.js +1 -1
  46. package/locations/components/StoreList/StoreListSearch.style.js +1 -1
  47. package/locations/components/StoreList/StoreOpeningHoursLine.js +1 -1
  48. package/locations/components/StoreList/StorePhoneNumber.js +2 -2
  49. package/locations/components/StoreList/StoreSelectLocationButton.js +1 -1
  50. package/locations/components/index.js +1 -1
  51. package/locations/constants/index.js +1 -3
  52. package/locations/constants/routes.js +1 -1
  53. package/locations/locations.streams.js +1 -1
  54. package/locations/providers/StoreFinderProvider.js +4 -4
  55. package/locations/providers/index.js +1 -1
  56. package/locations/selectors/index.js +2 -7
  57. package/locations/subscriptions.js +3 -3
  58. package/login/components/ForgotPassword/ForgotPassword.style.js +1 -1
  59. package/package.json +10 -10
  60. package/product/components/Header/PriceStriked/style.js +1 -1
  61. package/product/components/OrderQuantityHint/style.js +1 -1
  62. package/product/components/ProductImage/index.js +4 -4
  63. package/product/components/ProductName/ProductName.js +1 -1
  64. package/product/components/ProductName/ProductNameContent.js +1 -1
  65. package/product/components/ProductProperties/Row.js +1 -1
  66. package/locations/components/StoreDetails/components/FindMoreStores.js +0 -4
  67. package/locations/components/StoreDetails/components/GetDirectionsButton.js +0 -7
  68. package/locations/components/StoreDetails/components/StoreDetails.js +0 -5
  69. package/locations/components/StoreDetails/components/StoreFinderMap.js +0 -20
  70. package/locations/components/StoreDetails/components/StoreFinderMap.style.js +0 -1
  71. package/locations/components/StoreDetails/components/StoreLocationMap.js +0 -4
  72. package/locations/components/StoreDetails/components/StoresNearby.js +0 -4
  73. package/locations/components/StoreDetails/components/StoresNearbyListItem.js +0 -9
  74. package/locations/components/StoreDetails/index.js +0 -4
  75. package/locations/components/StoreFinder/StoreFinderStoreInfoButton.js +0 -8
  76. package/locations/providers/StoreDetailsContext.js +0 -1
  77. package/locations/providers/StoreDetailsProvider.js +0 -4
package/a11y/styles.js ADDED
@@ -0,0 +1,2 @@
1
+ import{css}from'glamor';// global class for screen readers only, visually hidden
2
+ css.global('.sr-only',{border:'0',clip:'rect(0 0 0 0)',height:'1px',margin:'-1px',overflow:'hidden',padding:'0',position:'absolute',width:'1px',whiteSpace:'nowrap'});
@@ -1,6 +1,6 @@
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;}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 React,{useMemo}from'react';import classNames from'classnames';import{Grid,Link,TextLink,ProductProperties,SurroundPortals,ConditionalWrapper,I18n}from'@shopgate/engage/components';import{CART_ITEM_IMAGE,CART_ITEM_LINK,CART_ITEM_PROPERTIES,CART_ITEM_QUANTITY_PICKER}from'@shopgate/engage/cart';import{showTaxDisclaimer}from'@shopgate/engage/market';import{bin2hex}from'@shopgate/engage/core/helpers';import{useWidgetSettings}from'@shopgate/engage/core/hooks';import{ProductImage,PriceInfo,ITEM_PATH}from'@shopgate/engage/product';import{CartItemProductChangeLocation,CartChangeFulfillmentMethod}from'@shopgate/engage/locations';import{getLineItemActiveStatus}from'@shopgate/engage/orders';import{CartItemQuantityPicker}from"./CartItemQuantityPicker";import{CartItemProductTitle}from"./CartItemProductTitle";import CartItemProductOrderDetails from"./CartItemProductOrderDetails";import CartItemProductPriceList from"./CartItemProductPriceList";import{useCartItem,useCartItemProduct}from"./CartItem.hooks";import styles from"./CartItemProductLayout.style";/**
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;}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 React,{useMemo}from'react';import classNames from'classnames';import{Grid,Link,ProductProperties,SurroundPortals,ConditionalWrapper,I18n}from'@shopgate/engage/components';import{CART_ITEM_IMAGE,CART_ITEM_LINK,CART_ITEM_PROPERTIES,CART_ITEM_QUANTITY_PICKER}from'@shopgate/engage/cart';import{showTaxDisclaimer}from'@shopgate/engage/market';import{bin2hex}from'@shopgate/engage/core/helpers';import{useWidgetSettings}from'@shopgate/engage/core/hooks';import{ProductImage,PriceInfo,ITEM_PATH}from'@shopgate/engage/product';import{CartItemProductChangeLocation,CartChangeFulfillmentMethod}from'@shopgate/engage/locations';import{getLineItemActiveStatus}from'@shopgate/engage/orders';import{CartItemQuantityPicker}from"./CartItemQuantityPicker";import{CartItemProductTitle}from"./CartItemProductTitle";import CartItemProductOrderDetails from"./CartItemProductOrderDetails";import CartItemProductPriceList from"./CartItemProductPriceList";import{useCartItem,useCartItemProduct}from"./CartItem.hooks";import styles from"./CartItemProductLayout.style";/**
2
2
  * The Cart Product Layout component.
3
- * @returns {JSX}
3
+ * @returns {JSX.Element}
4
4
  */export function CartItemProductLayout(){// Added with PWA 6 - CCP-2372
5
5
  var _useWidgetSettings=useWidgetSettings('@shopgate/engage/components/TaxDisclaimer'),show=_useWidgetSettings.show;// use widget setting if set to true/false, otherwise use market logic
6
- var showDisclaimer=typeof show==='boolean'?show:showTaxDisclaimer;var _useCartItem=useCartItem(),registerFulfillmentAction=_useCartItem.registerFulfillmentAction,isOrderDetails=_useCartItem.isOrderDetails,isCheckoutConfirmation=_useCartItem.isCheckoutConfirmation;var context=useCartItemProduct();var cartItem=context.cartItem,product=context.product,currency=context.currency,editMode=context.editMode,handleUpdate=context.handleUpdate,handleRemove=context.handleRemove,toggleEditMode=context.toggleEditMode,isEditable=context.isEditable;var portalProps=useMemo(function(){return _extends({context:{type:context.type,cartItemId:context.cartItemId,product:context.product}},context,{isOrderDetails:isOrderDetails,isCheckoutConfirmation:isCheckoutConfirmation,quantity:cartItem.quantity,handleDelete:handleRemove});},[cartItem.quantity,context,handleRemove,isCheckoutConfirmation,isOrderDetails]);var isActive=!isOrderDetails?true:getLineItemActiveStatus(cartItem===null||cartItem===void 0?void 0:cartItem.status,cartItem===null||cartItem===void 0?void 0:cartItem.subStatus);var showLineItemPromotions=useMemo(function(){if(isOrderDetails||isCheckoutConfirmation){return false;}return((cartItem===null||cartItem===void 0?void 0:cartItem.appliedPromotions)||[]).length>0;},[cartItem,isCheckoutConfirmation,isOrderDetails]);return React.createElement(React.Fragment,null,React.createElement(Grid,{className:classNames(styles.item,_defineProperty({},styles.itemInactive,!isActive))},React.createElement(Grid.Item,{className:styles.content,grow:1},React.createElement(ConditionalWrapper,{condition:isEditable,wrapper:function wrapper(children){return React.createElement(TextLink,{href:"".concat(ITEM_PATH,"/").concat(bin2hex(product.id))},children);}},React.createElement(SurroundPortals,{portalName:CART_ITEM_LINK,portalProps:portalProps},React.createElement(CartItemProductTitle,{value:product.name}))),React.createElement(Grid,{className:styles.info},React.createElement(Grid.Item,{grow:1,className:styles.properties},React.createElement(SurroundPortals,{portalName:CART_ITEM_PROPERTIES,portalProps:portalProps},React.createElement(ProductProperties,{properties:product.properties,lineClamp:2})),isOrderDetails&&React.createElement(CartItemProductOrderDetails,null)),React.createElement(Grid.Item,{grow:1,className:styles.price},isOrderDetails&&React.createElement(I18n.Text,{string:"cart.subtotal",className:styles.orderDetailsSubtotalLabel}),!showLineItemPromotions&&React.createElement(React.Fragment,null,React.createElement(CartItemProductPriceList,{isSubtotal:true}),React.createElement(PriceInfo,{product:product,currency:currency,className:styles.priceInfo}))),showDisclaimer&&React.createElement(Grid.Item,{className:styles.disclaimerSpacer,grow:0,shrink:0})),showLineItemPromotions&&React.createElement(Grid,{className:classNames(styles.info,styles.promotionLine)},React.createElement(Grid.Item,null),React.createElement(Grid.Item,{className:styles.promotionLineItem},React.createElement(CartItemProductPriceList,{isSubtotal:true,showLabels:true}),React.createElement(PriceInfo,{product:product,currency:currency,className:styles.priceInfo})))),React.createElement(Grid.Item,{className:styles.leftColumn},React.createElement("div",{className:styles.image,"aria-hidden":true},React.createElement(ConditionalWrapper,{condition:isEditable,wrapper:function wrapper(children){return React.createElement(Link,{tagName:"a",href:"".concat(ITEM_PATH,"/").concat(bin2hex(product.id))},children);}},React.createElement(SurroundPortals,{portalName:CART_ITEM_IMAGE,portalProps:portalProps},React.createElement(ProductImage,{src:product.featuredImageBaseUrl||product.featuredImageUrl})))),!isOrderDetails&&React.createElement(SurroundPortals,{portalName:CART_ITEM_QUANTITY_PICKER,portalProps:portalProps},React.createElement(CartItemQuantityPicker,{unit:product.unit,hasCatchWeight:product.hasCatchWeight,quantity:cartItem.quantity,editMode:editMode,onChange:handleUpdate,onToggleEditMode:toggleEditMode,disabled:!isEditable})))),React.createElement(CartItemProductChangeLocation,{cartItem:cartItem,registerAction:registerFulfillmentAction}),React.createElement(CartChangeFulfillmentMethod,{cartItem:cartItem,registerAction:registerFulfillmentAction}));}
6
+ var showDisclaimer=typeof show==='boolean'?show:showTaxDisclaimer;var _useCartItem=useCartItem(),registerFulfillmentAction=_useCartItem.registerFulfillmentAction,isOrderDetails=_useCartItem.isOrderDetails,isCheckoutConfirmation=_useCartItem.isCheckoutConfirmation;var context=useCartItemProduct();var cartItem=context.cartItem,product=context.product,currency=context.currency,editMode=context.editMode,handleUpdate=context.handleUpdate,handleRemove=context.handleRemove,toggleEditMode=context.toggleEditMode,isEditable=context.isEditable;var portalProps=useMemo(function(){return _extends({context:{type:context.type,cartItemId:context.cartItemId,product:context.product}},context,{isOrderDetails:isOrderDetails,isCheckoutConfirmation:isCheckoutConfirmation,quantity:cartItem.quantity,handleDelete:handleRemove});},[cartItem.quantity,context,handleRemove,isCheckoutConfirmation,isOrderDetails]);var isActive=!isOrderDetails?true:getLineItemActiveStatus(cartItem===null||cartItem===void 0?void 0:cartItem.status,cartItem===null||cartItem===void 0?void 0:cartItem.subStatus);var showLineItemPromotions=useMemo(function(){if(isOrderDetails||isCheckoutConfirmation){return false;}return((cartItem===null||cartItem===void 0?void 0:cartItem.appliedPromotions)||[]).length>0;},[cartItem,isCheckoutConfirmation,isOrderDetails]);return React.createElement(React.Fragment,null,React.createElement(Grid,{className:classNames(styles.item,_defineProperty({},styles.itemInactive,!isActive))},React.createElement(Grid.Item,{className:styles.content,grow:1},React.createElement(SurroundPortals,{portalName:CART_ITEM_LINK,portalProps:portalProps},React.createElement(CartItemProductTitle,{value:product.name,productId:product.id})),React.createElement(Grid,{className:styles.info},React.createElement(Grid.Item,{grow:1,className:styles.properties},React.createElement(SurroundPortals,{portalName:CART_ITEM_PROPERTIES,portalProps:portalProps},React.createElement(ProductProperties,{properties:product.properties,lineClamp:2})),isOrderDetails&&React.createElement(CartItemProductOrderDetails,null)),React.createElement(Grid.Item,{grow:1,className:styles.price},isOrderDetails&&React.createElement(I18n.Text,{string:"cart.subtotal",className:styles.orderDetailsSubtotalLabel}),!showLineItemPromotions&&React.createElement(React.Fragment,null,React.createElement(CartItemProductPriceList,{isSubtotal:true}),React.createElement(PriceInfo,{product:product,currency:currency,className:styles.priceInfo}))),showDisclaimer&&React.createElement(Grid.Item,{className:styles.disclaimerSpacer,grow:0,shrink:0})),showLineItemPromotions&&React.createElement(Grid,{className:classNames(styles.info,styles.promotionLine)},React.createElement(Grid.Item,null),React.createElement(Grid.Item,{className:styles.promotionLineItem},React.createElement(CartItemProductPriceList,{isSubtotal:true,showLabels:true}),React.createElement(PriceInfo,{product:product,currency:currency,className:styles.priceInfo})))),React.createElement(Grid.Item,{className:styles.leftColumn},React.createElement("div",{className:styles.image,"aria-hidden":true},React.createElement(ConditionalWrapper,{condition:isEditable,wrapper:function wrapper(children){return React.createElement(Link,{tagName:"a",href:"".concat(ITEM_PATH,"/").concat(bin2hex(product.id))},children);}},React.createElement(SurroundPortals,{portalName:CART_ITEM_IMAGE,portalProps:portalProps},React.createElement(ProductImage,{src:product.featuredImageBaseUrl||product.featuredImageUrl})))),!isOrderDetails&&React.createElement(SurroundPortals,{portalName:CART_ITEM_QUANTITY_PICKER,portalProps:portalProps},React.createElement(CartItemQuantityPicker,{unit:product.unit,hasCatchWeight:product.hasCatchWeight,quantity:cartItem.quantity,editMode:editMode,onChange:handleUpdate,onToggleEditMode:toggleEditMode,disabled:!isEditable})))),React.createElement(CartItemProductChangeLocation,{cartItem:cartItem,registerAction:registerFulfillmentAction}),React.createElement(CartChangeFulfillmentMethod,{cartItem:cartItem,registerAction:registerFulfillmentAction}));}
@@ -1 +1 @@
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{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var variables=themeConfig.variables,colors=themeConfig.colors;var leftColumnWidth=72;var item=css({padding:variables.gap.big,/** Row is DOM reversed for a11y navigation */flexDirection:'row-reverse'}).toString();var leftColumn=css({width:leftColumnWidth}).toString();var image=css({background:colors.placeholder,marginBottom:variables.gap.small*1.25,height:leftColumnWidth,width:leftColumnWidth}).toString();var content=css({display:'flex',flexDirection:'column',paddingLeft:variables.gap.big}).toString();var info=css({fontSize:'0.875rem',marginTop:variables.gap.big*0.875,marginBottom:variables.gap.small*0.25,flexGrow:1,alignItems:'flex-end',justifyContent:'space-between'}).toString();var promotionLine=css({marginTop:0}).toString();var promotionLineItem=css({width:'100%'}).toString();var priceInfo=css({textAlign:'right',wordBreak:'break-word'}).toString();var disclaimerSpacer=css({width:10}).toString();export var priceLabel=css({color:"var(--color-text-low-emphasis, ".concat(colors.shade9,")")});var price=css({display:'flex',marginLeft:'1em',alignItems:'flex-end',flexDirection:'column'}).toString();var properties=css(_defineProperty({wordBreak:'break-word',alignSelf:'flex-start',fontSize:'0.875rem',color:"var(--color-text-low-emphasis, ".concat(colors.shade9,")"),lineHeight:1.3},":not(:empty) + .".concat(price),{textAlign:'right',maxWidth:'40%'})).toString();var itemInactive=css(_defineProperty({' *':{color:'var(--color-text-low-emphasis) !important'}}," .".concat(image),{opacity:0.7})).toString();var orderDetailsSubtotalLabel=css({color:"var(--color-text-low-emphasis, ".concat(colors.shade9,")")}).toString();export default{item:item,itemInactive:itemInactive,leftColumn:leftColumn,image:image,content:content,info:info,promotionLine:promotionLine,promotionLineItem:promotionLineItem,disclaimerSpacer:disclaimerSpacer,priceInfo:priceInfo,price:price,properties:properties,orderDetailsSubtotalLabel:orderDetailsSubtotalLabel};
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{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var variables=themeConfig.variables,colors=themeConfig.colors;var leftColumnWidth=72;var item=css({padding:variables.gap.big,/** Row is DOM reversed for a11y navigation */flexDirection:'row-reverse'}).toString();var leftColumn=css({width:leftColumnWidth}).toString();var image=css({background:colors.placeholder,marginBottom:variables.gap.small*1.25,height:leftColumnWidth,width:leftColumnWidth}).toString();var content=css({display:'flex',flexDirection:'column',paddingLeft:variables.gap.big}).toString();var info=css({fontSize:'0.875rem',marginTop:variables.gap.big*0.875,marginBottom:variables.gap.small*0.25,flexGrow:1,alignItems:'flex-end',justifyContent:'space-between'}).toString();var promotionLine=css({marginTop:0}).toString();var promotionLineItem=css({width:'100%'}).toString();var priceInfo=css({textAlign:'right',wordBreak:'break-word'}).toString();var disclaimerSpacer=css({width:10}).toString();var price=css({display:'flex',marginLeft:'1em',alignItems:'flex-end',flexDirection:'column'}).toString();var properties=css(_defineProperty({wordBreak:'break-word',alignSelf:'flex-start',fontSize:'0.875rem',color:colors.shade11,lineHeight:1.3},":not(:empty) + .".concat(price),{textAlign:'right',maxWidth:'40%'})).toString();var itemInactive=css(_defineProperty({' *':{color:'var(--color-text-low-emphasis) !important'}}," .".concat(image),{opacity:0.7})).toString();var orderDetailsSubtotalLabel=css({color:"var(--color-text-low-emphasis, ".concat(colors.shade9,")")}).toString();export default{item:item,itemInactive:itemInactive,leftColumn:leftColumn,image:image,content:content,info:info,promotionLine:promotionLine,promotionLineItem:promotionLineItem,disclaimerSpacer:disclaimerSpacer,priceInfo:priceInfo,price:price,properties:properties,orderDetailsSubtotalLabel:orderDetailsSubtotalLabel};
@@ -1,6 +1,7 @@
1
- import React,{useCallback}from'react';import PropTypes from'prop-types';import{Grid,I18n,ContextMenu,SurroundPortals}from'@shopgate/engage/components';import{CART_ITEM_CONTEXT_MENU,CART_ITEM_CONTEXT_MENU_ITEM_EDIT,CART_ITEM_CONTEXT_MENU_ITEM_REMOVE,CART_ITEM_NAME}from'@shopgate/engage/cart';import{CartContextMenuItemChangeLocation,CartContextMenuItemChangeFulfillment}from'@shopgate/engage/locations';import{ProductName}from'@shopgate/engage/product';import{useCartItem,useCartItemProduct}from"./CartItem.hooks";import{menuToggleButton,menuToggleContainer,title,menuContainer}from"./CartItemProductTitle.style";var contextMenuClasses={button:menuToggleButton,container:menuToggleContainer};/**
1
+ import React,{useCallback}from'react';import PropTypes from'prop-types';import{Grid,I18n,ContextMenu,SurroundPortals,TextLink}from'@shopgate/engage/components';import{CART_ITEM_CONTEXT_MENU,CART_ITEM_CONTEXT_MENU_ITEM_EDIT,CART_ITEM_CONTEXT_MENU_ITEM_REMOVE,CART_ITEM_NAME}from'@shopgate/engage/cart';import{CartContextMenuItemChangeLocation,CartContextMenuItemChangeFulfillment}from'@shopgate/engage/locations';import{ITEM_PATH,ProductName}from'@shopgate/engage/product';import{bin2hex}from'@shopgate/pwa-common/helpers/data';import{useCartItem,useCartItemProduct}from"./CartItem.hooks";import{menuToggleButton,menuToggleContainer,title,menuContainer}from"./CartItemProductTitle.style";import{ConditionalWrapper}from"../../../components";var contextMenuClasses={button:menuToggleButton,container:menuToggleContainer};/**
2
2
  * The Cart Product Title component.
3
3
  * @param {Object} props The component properties.
4
- * @param {Object} context The component context.
5
- * @returns {JSX}
6
- */export function CartItemProductTitle(_ref){var value=_ref.value;var _useCartItem=useCartItem(),invokeFulfillmentAction=_useCartItem.invokeFulfillmentAction;var context=useCartItemProduct();var handleRemove=context.handleRemove,toggleEditMode=context.toggleEditMode,cartItem=context.cartItem,isEditable=context.isEditable;var handleToggleEditMode=useCallback(function(){if(toggleEditMode){toggleEditMode(true);}},[toggleEditMode]);var handleChangeLocationClick=useCallback(function(){if(!cartItem||!cartItem.fulfillment||!cartItem.fulfillment.method){return;}var method=cartItem.fulfillment.method;invokeFulfillmentAction('changeLocation',method);},[cartItem,invokeFulfillmentAction]);var handleChangeFulfillmentClick=useCallback(function(){invokeFulfillmentAction('changeFulfillment');},[invokeFulfillmentAction]);return React.createElement(Grid,null,React.createElement(Grid.Item,{grow:1},React.createElement(ProductName,{name:value,className:title,portalName:CART_ITEM_NAME,portalProps:context,testId:value,ellipsis:false})),isEditable&&React.createElement(Grid.Item,{className:menuContainer,shrink:0},React.createElement(SurroundPortals,{portalName:CART_ITEM_CONTEXT_MENU,portalProps:{context:context,handleRemove:handleRemove,toggleEditMode:toggleEditMode}},React.createElement(ContextMenu,{classes:contextMenuClasses},React.createElement(SurroundPortals,{portalName:CART_ITEM_CONTEXT_MENU_ITEM_REMOVE,portalProps:{context:context,handleRemove:handleRemove}},React.createElement("div",{"data-test-id":"cartItemContextMenuItemRemove"},React.createElement(ContextMenu.Item,{onClick:handleRemove},React.createElement(I18n.Text,{string:"cart.remove"})))),React.createElement(SurroundPortals,{portalName:CART_ITEM_CONTEXT_MENU_ITEM_EDIT,portalProps:{context:context,toggleEditMode:toggleEditMode}},React.createElement("div",{"data-test-id":"cartItemContextMenuItemEdit"},React.createElement(ContextMenu.Item,{onClick:handleToggleEditMode},React.createElement(I18n.Text,{string:"cart.edit"})))),React.createElement(CartContextMenuItemChangeLocation,{cartItem:context.cartItem,onClick:handleChangeLocationClick}),React.createElement(CartContextMenuItemChangeFulfillment,{cartItem:context.cartItem,onClick:handleChangeFulfillmentClick})))));}
4
+ * @param {string} props.value The product name
5
+ * @param {string} props.productId The product id
6
+ * @returns {JSX.Element}
7
+ */export function CartItemProductTitle(_ref){var value=_ref.value,productId=_ref.productId;var _useCartItem=useCartItem(),invokeFulfillmentAction=_useCartItem.invokeFulfillmentAction;var context=useCartItemProduct();var handleRemove=context.handleRemove,toggleEditMode=context.toggleEditMode,cartItem=context.cartItem,isEditable=context.isEditable;var handleToggleEditMode=useCallback(function(){if(toggleEditMode){toggleEditMode(true);}},[toggleEditMode]);var handleChangeLocationClick=useCallback(function(){if(!cartItem||!cartItem.fulfillment||!cartItem.fulfillment.method){return;}var method=cartItem.fulfillment.method;invokeFulfillmentAction('changeLocation',method);},[cartItem,invokeFulfillmentAction]);var handleChangeFulfillmentClick=useCallback(function(){invokeFulfillmentAction('changeFulfillment');},[invokeFulfillmentAction]);return React.createElement(Grid,null,React.createElement(Grid.Item,{grow:1},React.createElement(ConditionalWrapper,{condition:isEditable,wrapper:function wrapper(children){return React.createElement(TextLink,{href:"".concat(ITEM_PATH,"/").concat(bin2hex(productId))},children);}},React.createElement(ProductName,{name:value,className:title,portalName:CART_ITEM_NAME,portalProps:context,testId:value,ellipsis:false}))),isEditable&&React.createElement(Grid.Item,{className:menuContainer,shrink:0},React.createElement(SurroundPortals,{portalName:CART_ITEM_CONTEXT_MENU,portalProps:{context:context,handleRemove:handleRemove,toggleEditMode:toggleEditMode}},React.createElement(ContextMenu,{classes:contextMenuClasses},React.createElement(SurroundPortals,{portalName:CART_ITEM_CONTEXT_MENU_ITEM_REMOVE,portalProps:{context:context,handleRemove:handleRemove}},React.createElement("div",{"data-test-id":"cartItemContextMenuItemRemove"},React.createElement(ContextMenu.Item,{onClick:handleRemove},React.createElement(I18n.Text,{string:"cart.remove"})))),React.createElement(SurroundPortals,{portalName:CART_ITEM_CONTEXT_MENU_ITEM_EDIT,portalProps:{context:context,toggleEditMode:toggleEditMode}},React.createElement("div",{"data-test-id":"cartItemContextMenuItemEdit"},React.createElement(ContextMenu.Item,{onClick:handleToggleEditMode},React.createElement(I18n.Text,{string:"cart.edit"})))),React.createElement(CartContextMenuItemChangeLocation,{cartItem:context.cartItem,onClick:handleChangeLocationClick}),React.createElement(CartContextMenuItemChangeFulfillment,{cartItem:context.cartItem,onClick:handleChangeFulfillmentClick})))));}
@@ -1 +1 @@
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{css}from'glamor';import{responsiveMediaQuery}from'@shopgate/engage/styles';import{themeColors,themeVariables}from'@shopgate/pwa-common/helpers/config';var gap=themeVariables.gap;export var withBorder=css({borderBottom:"1px solid ".concat(themeColors.shade7)});export var accordionToggle=css({padding:"".concat(gap.big*1.25,"px ").concat(gap.big,"px")}).toString();export var accordionContent=css({paddingLeft:gap.xbig*1.25});export var address=css({display:'flex',flexFlow:'row nowrap'});export var addressIcon=css({fontSize:'1.25rem',marginRight:gap.big*1.25,flexShrink:0,color:'var(--color-text-heigh-emphasis)'});export var titles=css({marginTop:-3,marginBottom:-2,paddingRight:themeVariables.gap.big*2});export var name=css(_defineProperty({fontSize:'0.85rem',fontWeight:500},responsiveMediaQuery('>xs',{webOnly:true}),{fontSize:'1.25rem',lineHeight:'1.5rem'}));export var method=css({fontSize:'0.75rem',color:themeColors.shade3});export var locationAddress=css({fontSize:'0.85rem',color:'var(--color-text-low-emphasis)'});export var locationHours=css({paddingTop:gap.big,fontSize:'0.85rem'});
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{css}from'glamor';import{responsiveMediaQuery}from'@shopgate/engage/styles';import{themeColors,themeVariables}from'@shopgate/pwa-common/helpers/config';var gap=themeVariables.gap;export var withBorder=css({borderBottom:"1px solid ".concat(themeColors.shade7)});export var accordionToggle=css({padding:"".concat(gap.big*1.25,"px ").concat(gap.big,"px")}).toString();export var accordionContent=css({paddingLeft:gap.xbig*1.25});export var address=css({display:'flex',flexFlow:'row nowrap'});export var addressIcon=css({fontSize:'1.25rem',marginRight:gap.big*1.25,flexShrink:0,color:'var(--color-text-heigh-emphasis)'});export var titles=css({marginTop:-3,marginBottom:-2,paddingRight:themeVariables.gap.big*2});export var name=css(_defineProperty({fontSize:'0.85rem',fontWeight:500},responsiveMediaQuery('>xs',{webOnly:true}),{fontSize:'1.25rem',lineHeight:'1.5rem'}));export var method=css({fontSize:'0.75rem',color:themeColors.shade11});export var locationAddress=css({fontSize:'0.85rem',color:'var(--color-text-low-emphasis)'});export var locationHours=css({paddingTop:gap.big,fontSize:'0.85rem'});
@@ -1,5 +1,5 @@
1
- import React,{useContext,useMemo}from'react';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 connect from"./PaymentBarCheckoutButton.connector";import{button,disabledButton}from"./PaymentBarCheckoutButton.style";/**
1
+ import React,{useContext,useMemo}from'react';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 PropTypes from'prop-types';import{CartContext}from"../../cart.context";import connect from"./PaymentBarCheckoutButton.connector";import{button,disabledButton}from"./PaymentBarCheckoutButton.style";/**
2
2
  * Renders the cart payment bar checkout button.
3
3
  * @param {boolean} isOrderable Whether the cart is orderable.
4
- * @return {JSX}
5
- */function PaymentBarCheckoutButton(_ref){var isOrderable=_ref.isOrderable;var _useContext=useContext(CartContext),isLoading=_useContext.isLoading;var isActive=useMemo(function(){return isOrderable&&!isLoading;},[isLoading,isOrderable]);return React.createElement(SurroundPortals,{portalName:CART_CHECKOUT_BUTTON,portalProps:{isActive:isActive}},React.createElement(Link,{href:CHECKOUT_PATH,disabled:!isActive},React.createElement(RippleButton,{disabled:!isActive,type:"regular",className:isActive?button:disabledButton},React.createElement(I18n.Text,{string:"cart.checkout"}))));}PaymentBarCheckoutButton.defaultProps={isOrderable:true};export default connect(PaymentBarCheckoutButton);
4
+ * @return {JSX.Element}
5
+ */var PaymentBarCheckoutButton=function PaymentBarCheckoutButton(_ref){var isOrderable=_ref.isOrderable;var _useContext=useContext(CartContext),isLoading=_useContext.isLoading;var isActive=useMemo(function(){return isOrderable&&!isLoading;},[isLoading,isOrderable]);return React.createElement(SurroundPortals,{portalName:CART_CHECKOUT_BUTTON,portalProps:{isActive:isActive}},React.createElement(Link,{href:CHECKOUT_PATH,disabled:!isActive,tabIndex:0,role:"button","aria-disabled":!isActive},React.createElement(RippleButton,{disabled:!isActive,type:"regular",className:isActive?button:disabledButton},React.createElement(I18n.Text,{string:"cart.checkout"}))));};PaymentBarCheckoutButton.defaultProps={isOrderable:true};export default connect(PaymentBarCheckoutButton);
@@ -1,7 +1,7 @@
1
1
  import React from'react';import PropTypes from'prop-types';import classNames from'classnames';import{Toggle}from'@shopgate/engage/components';import{root,checkbox,leftSpace,rightSpace,text}from"./style";import connect from"./connector";/**
2
2
  * Renders the cart reservation card label.
3
3
  * @param {Object} props The component props.
4
- * @returns {JSX}
4
+ * @returns {JSX.Element}
5
5
  */var Substitution=function Substitution(_ref){var id=_ref.id,onChange=_ref.onChange,checked=_ref.checked,className=_ref.className,label=_ref.label,disabled=_ref.disabled;return React.createElement("div",{className:classNames(root,className)},React.createElement("div",{className:leftSpace}),React.createElement("span",{className:text},label),React.createElement("div",{className:rightSpace},React.createElement(Toggle,{className:checkbox,checked:checked,id:id,onChange:onChange,disabled:disabled})));};Substitution.defaultProps={className:undefined,disabled:false,checked:false};/**
6
6
  * Gate component for Substitution.
7
7
  * @param {Object} props The component props.
@@ -4,5 +4,5 @@ import React from'react';import PropTypes from'prop-types';import compose from'l
4
4
  */var CLOSE_DELAY=250;/**
5
5
  * The Context Menu Item component.
6
6
  * @param {Object} props The component props.
7
- * @returns {JSX}
8
- */var Item=function Item(_ref){var children=_ref.children,closeMenu=_ref.closeMenu,onClick=_ref.onClick;var handleClick=compose(onClick,function(){return setTimeout(closeMenu,CLOSE_DELAY);});return React.createElement(Glow,null,React.createElement("div",{className:getItemClass(),onClick:handleClick,"aria-hidden":true,"data-test-id":"contextMenuButton"},children));};Item.defaultProps={children:null,closeMenu:function closeMenu(){},onClick:function onClick(){}};export default Item;
7
+ * @returns {JSX.Element}
8
+ */var Item=function Item(_ref){var children=_ref.children,closeMenu=_ref.closeMenu,onClick=_ref.onClick;var handleClick=compose(onClick,function(){return setTimeout(closeMenu,CLOSE_DELAY);});return React.createElement(Glow,null,React.createElement("button",{className:getItemClass(),onClick:handleClick,type:"button","data-test-id":"contextMenuButton"},children));};Item.defaultProps={children:null,closeMenu:function closeMenu(){},onClick:function onClick(){}};export default Item;
@@ -1,5 +1,5 @@
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 React from'react';import PropTypes from'prop-types';import classNames from'classnames';import Link from'@shopgate/pwa-common/components/Link';import{link}from"./TextLink.style";/**
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 React from'react';import PropTypes from'prop-types';import classNames from'classnames';import{Link}from'@shopgate/engage/components';import{link}from"./TextLink.style";/**
2
2
  * The TextLink component
3
3
  * @param {Object} props The component props
4
- * @returns {JSX}
5
- */var TextLink=function TextLink(props){return React.createElement(Link,_extends({},props,{className:classNames(props.className,link),tag:"a"}));};TextLink.defaultProps={className:null};export default TextLink;
4
+ * @returns {JSX.Element}
5
+ */var TextLink=function TextLink(props){return React.createElement(Link,_extends({},props,{className:classNames(props.className,link),tag:"a",role:"link",tabIndex:0}));};TextLink.defaultProps={className:null};export default TextLink;
@@ -1,5 +1,5 @@
1
1
  import React from'react';import PropTypes from'prop-types';import classNames from'classnames';import{label,checkbox,hidden,thumb,container}from"./style";/**
2
- * The TextLink component
2
+ * The Toggle component
3
3
  * @param {Object} props The component props
4
- * @returns {JSX}
4
+ * @returns {JSX.Element}
5
5
  */var Toggle=function Toggle(_ref){var id=_ref.id,checked=_ref.checked,className=_ref.className,onChange=_ref.onChange,disabled=_ref.disabled;return React.createElement("div",{className:className},React.createElement("div",{className:container},React.createElement("input",{type:"checkbox",id:id,className:classNames(checkbox,hidden),checked:checked,onChange:onChange,disabled:disabled}),React.createElement("label",{htmlFor:id,className:label}),React.createElement("div",{className:thumb})));};Toggle.defaultProps={checked:false,className:null,onChange:null,disabled:false};export default Toggle;
@@ -1,4 +1,4 @@
1
1
  import React from'react';import PropTypes from'prop-types';import{i18n}from'@shopgate/engage/core';import{SheetList,SheetDrawer}from'@shopgate/engage/components';/**
2
2
  * @param {Object} props Props.
3
- * @returns {JSX}
3
+ * @returns {JSX.Element}
4
4
  */var ItemFulfillmentMethod=function ItemFulfillmentMethod(_ref){var isOpen=_ref.isOpen,methods=_ref.methods,onClose=_ref.onClose,onSelect=_ref.onSelect;return React.createElement(SheetDrawer,{isOpen:isOpen,title:i18n.text('favorites.fo_method_chooser.title'),onDidClose:function onDidClose(){return onClose(null);}},React.createElement(SheetList,null,methods.includes('ROPIS')?React.createElement(SheetList.Item,{title:i18n.text('locations.method.ropis'),onClick:function onClick(){return onSelect('ROPIS');}}):null,methods.includes('BOPIS')?React.createElement(SheetList.Item,{title:i18n.text('locations.method.bopis'),onClick:function onClick(){return onSelect('BOPIS');}}):null,methods.includes('directShip')?React.createElement(SheetList.Item,{title:i18n.text('locations.method.direct_ship'),onClick:function onClick(){return onSelect('directShip');}}):null));};export default ItemFulfillmentMethod;
@@ -1,4 +1,4 @@
1
- import _regeneratorRuntime from"@babel/runtime/regenerator";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;}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}import React,{useState,useEffect,useCallback,useMemo}from'react';import PropTypes from'prop-types';import{connect}from'react-redux';import{showModal}from'@shopgate/engage/core/actions';import{Accordion,Card,ConditionalWrapper}from'@shopgate/engage/components';import{makeGetFavorites,getUseGetFavoriteIdsPipeline}from'@shopgate/pwa-common-commerce/favorites/selectors';import{FAVORITES_SHOW_LIMIT}from'@shopgate/engage/favorites/constants';import ListAccordionLabel from"./ListAccordionLabel";import ListContent from"./ListContent";import styles from"./styles";/**
1
+ import _regeneratorRuntime from"@babel/runtime/regenerator";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;}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}import React,{useState,useEffect,useCallback,useMemo}from'react';import PropTypes from'prop-types';import{connect}from'react-redux';import{showModal}from'@shopgate/engage/core/actions';import{Accordion,Card,ConditionalWrapper}from'@shopgate/engage/components';import{makeGetFavorites,getUseGetFavoriteIdsPipeline}from'@shopgate/pwa-common-commerce/favorites/selectors';import{FAVORITES_SHOW_LIMIT}from'@shopgate/engage/favorites/constants';import ListAccordionLabel from"./ListAccordionLabel";import ListContent from"./ListContent";import styles from"./styles";import ListAccordionHeader from"./ListAccordionHeader";/**
2
2
  * @param {Object} _ State
3
3
  * @param {Object} props Props
4
4
  * @returns {Object}
@@ -8,7 +8,7 @@ import _regeneratorRuntime from"@babel/runtime/regenerator";function _slicedToAr
8
8
  * @returns {Object}
9
9
  */var mapDispatchToProps=function mapDispatchToProps(dispatch,props){return{remove:function(){var _remove=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(id){var confirmed;return _regeneratorRuntime.wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=2;return dispatch(showModal({message:'favorites.delete_list_modal.message',title:'favorites.delete_list_modal.title',params:{name:props.name}}));case 2:confirmed=_context.sent;if(confirmed){props.remove(id);}case 4:case"end":return _context.stop();}},_callee);}));function remove(_x){return _remove.apply(this,arguments);}return remove;}()};};/**
10
10
  * Favorite List component
11
- * @return {JSX}
11
+ * @return {JSX.Element}
12
12
  */var FavoriteList=function FavoriteList(_ref2){var id=_ref2.id,name=_ref2.name,items=_ref2.items,_rename=_ref2.rename,remove=_ref2.remove,removeItem=_ref2.removeItem,addToCart=_ref2.addToCart,hasMultipleFavoritesListsSupport=_ref2.hasMultipleFavoritesListsSupport,useGetFavoriteIdsPipeline=_ref2.useGetFavoriteIdsPipeline;var _useState=useState(FAVORITES_SHOW_LIMIT),_useState2=_slicedToArray(_useState,2),offset=_useState2[0],setOffset=_useState2[1];var filteredItems=useMemo(function(){/**
13
13
  * The getFavoriteIds pipeline doesn't return full products, but only product ids. Product data
14
14
  * is selected inside the ListContent component via the ProductProvider. To avoid requests with
@@ -23,4 +23,4 @@ return items;},[items,offset,useGetFavoriteIdsPipeline]);var allFavoritesLoaded=
23
23
  * In case of getFavorites pipeline is used, and all favorites are always loaded, "false" as
24
24
  * return value might seem a bit weird, but the value is actually used to determine if the
25
25
  * load more button is supposed to be shown (not needed if all favorites are already present).
26
- */return false;},[filteredItems.length,items.length,useGetFavoriteIdsPipeline]);var _useState3=useState(allFavoritesLoaded),_useState4=_slicedToArray(_useState3,2),showLoadMoreButton=_useState4[0],setShowLoadMoreButton=_useState4[1];var handleLoadMore=useCallback(function(){setOffset(offset+FAVORITES_SHOW_LIMIT);},[offset]);useEffect(function(){setShowLoadMoreButton(allFavoritesLoaded);},[offset,allFavoritesLoaded]);return React.createElement(ConditionalWrapper,{condition:hasMultipleFavoritesListsSupport,wrapperFalsy:function wrapperFalsy(children){return React.createElement("div",{className:styles.rootNoFavoritesLists},children);},wrapper:function wrapper(children){return React.createElement(Card,{className:styles.root},React.createElement(Accordion,{className:"",renderLabel:function renderLabel(){return React.createElement(ListAccordionLabel,{id:id,title:name,rename:function rename(newName){return _rename(id,newName);},remove:remove});},chevronPosition:"left",startOpened:true},children));}},React.createElement(ListContent,{listId:id,items:filteredItems,removeItem:removeItem,addToCart:addToCart,onLoadMore:handleLoadMore,showLoadMoreButton:showLoadMoreButton}));};FavoriteList.defaultProps={hasMultipleFavoritesListsSupport:false,useGetFavoriteIdsPipeline:false};export default connect(makeMapStateToProps,mapDispatchToProps)(FavoriteList);
26
+ */return false;},[filteredItems.length,items.length,useGetFavoriteIdsPipeline]);var _useState3=useState(allFavoritesLoaded),_useState4=_slicedToArray(_useState3,2),showLoadMoreButton=_useState4[0],setShowLoadMoreButton=_useState4[1];var handleLoadMore=useCallback(function(){setOffset(offset+FAVORITES_SHOW_LIMIT);},[offset]);useEffect(function(){setShowLoadMoreButton(allFavoritesLoaded);},[offset,allFavoritesLoaded]);return React.createElement(ConditionalWrapper,{condition:hasMultipleFavoritesListsSupport,wrapperFalsy:function wrapperFalsy(children){return React.createElement("div",{className:styles.rootNoFavoritesLists},children);},wrapper:function wrapper(children){return React.createElement(Card,{className:styles.root},React.createElement(Accordion,{className:"",header:React.createElement(ListAccordionHeader,{rename:function rename(newName){return _rename(id,newName);},remove:remove,id:id}),renderLabel:function renderLabel(){return React.createElement(ListAccordionLabel,{title:name});},chevronPosition:"left",startOpened:true},children));}},React.createElement(ListContent,{listId:id,items:filteredItems,removeItem:removeItem,addToCart:addToCart,onLoadMore:handleLoadMore,showLoadMoreButton:showLoadMoreButton}));};FavoriteList.defaultProps={hasMultipleFavoritesListsSupport:false,useGetFavoriteIdsPipeline:false};export default connect(makeMapStateToProps,mapDispatchToProps)(FavoriteList);
@@ -0,0 +1,8 @@
1
+ import React from'react';import PropTypes from'prop-types';import{i18n}from'@shopgate/engage/core/helpers';import{ContextMenu,SurroundPortals}from'@shopgate/engage/components';import{FAVORITES_LIST_CONTEXT_MENU}from"../../constants";/**
2
+ * Favorite List Accordion header component
3
+ * @param {Object} props The component props
4
+ * @param {Function} props.rename The rename function
5
+ * @param {Function} props.remove The remove function
6
+ * @param {string} props.id The label name
7
+ * @return {JSX.Element}
8
+ */var ListAccordionHeader=function ListAccordionHeader(_ref){var rename=_ref.rename,remove=_ref.remove,id=_ref.id;return React.createElement(SurroundPortals,{portalName:FAVORITES_LIST_CONTEXT_MENU,portalProps:{id:id}},React.createElement(ContextMenu,null,React.createElement(ContextMenu.Item,{onClick:rename},i18n.text('favorites.rename_list')),React.createElement(ContextMenu.Item,{onClick:remove,disabled:id==='DEFAULT'},i18n.text('favorites.remove_list'))));};export default ListAccordionHeader;
@@ -1,4 +1,5 @@
1
- import React from'react';import PropTypes from'prop-types';import{i18n}from'@shopgate/engage/core/helpers';import{ContextMenu,SurroundPortals}from'@shopgate/engage/components';import{FAVORITES_LIST_CONTEXT_MENU}from"../../constants/Portals";import styles from"./styles";/**
2
- * Favorite List Label component
3
- * @return {JSX}
4
- */var ListAccordionLabel=function ListAccordionLabel(_ref){var id=_ref.id,title=_ref.title,rename=_ref.rename,remove=_ref.remove;return React.createElement(React.Fragment,null,React.createElement("span",{className:styles.title},title),React.createElement(SurroundPortals,{portalName:FAVORITES_LIST_CONTEXT_MENU,portalProps:{id:id}},React.createElement(ContextMenu,null,React.createElement(ContextMenu.Item,{onClick:rename},i18n.text('favorites.rename_list')),React.createElement(ContextMenu.Item,{onClick:remove,disabled:id==='DEFAULT'},i18n.text('favorites.remove_list')))));};export default ListAccordionLabel;
1
+ import React from'react';import PropTypes from'prop-types';import styles from"./styles";/**
2
+ * Favorite List Accordion Label component
3
+ * @param {string} title The label name
4
+ * @return {JSX.Element}
5
+ */var ListAccordionLabel=function ListAccordionLabel(_ref){var title=_ref.title;return React.createElement("span",{className:styles.title},title);};export default ListAccordionLabel;
@@ -6,5 +6,5 @@ import React from'react';import PropTypes from'prop-types';import{connect}from'r
6
6
  * @returns {Object}
7
7
  */var mapDispatchToProps=function mapDispatchToProps(dispatch){return{close:function close(){return dispatch(closeFavoritesListChooser());},toggle:function toggle(){return dispatch(toggleFavorite.apply(void 0,arguments));}};};/**
8
8
  * @param {Object} props Props.
9
- * @returns {JSX}
9
+ * @returns {JSX.Element}
10
10
  */var ListChooser=function ListChooser(_ref){var settings=_ref.settings,lists=_ref.lists,close=_ref.close,toggle=_ref.toggle;var isVisible=!!settings;var productId=settings===null||settings===void 0?void 0:settings.productId;var withRelatives=settings===null||settings===void 0?void 0:settings.withRelatives;return React.createElement(SheetDrawer,{isOpen:isVisible,title:i18n.text('favorites.list_chooser.title'),onDidClose:close},React.createElement(SheetList,null,lists.map(function(list){return React.createElement(SheetList.Item,{key:list.id,title:list.name,onClick:function onClick(){close();toggle(productId,list.id,withRelatives);},rightComponent:React.createElement(ListChooserItem,{listId:list.id,productId:productId})});})));};ListChooser.defaultProps={settings:null,lists:[]};export default connect(mapStateToProps,mapDispatchToProps)(ListChooser);
@@ -13,4 +13,4 @@ useEffect(function(){setMinOffset(minRef.current.offsetLeft);setMMaxOffset(maxRe
13
13
  */function handleChangeMin(_ref2){var target=_ref2.target;setMinValue(target.value);if(target.value){onChange([parseInt(target.value,10)*100,parseInt(maxValue,10)*100]);}}/**
14
14
  * Handles the change of the maximum price field.
15
15
  * @param {SyntheticEvent} event The change event object.
16
- */function handleChangeMax(_ref3){var target=_ref3.target;setMaxValue(target.value);if(target.value){onChange([parseInt(minValue,10)*100,parseInt(target.value,10)*100]);}}var currencySymbol=Intl.NumberFormat('en-US',{style:'currency',currency:currency}).format('0').replace('0.00','');return React.createElement("div",{className:styles.editableContainer},React.createElement("span",{className:styles.srOnly},i18n.text('price.range',{fromPrice:i18n.price(priceMin,currency,false),toPrice:i18n.price(priceMax,currency,false)})),React.createElement(I18n.Text,{string:"price.range","aria-hidden":true},React.createElement(I18n.Placeholder,{forKey:"fromPrice"},React.createElement("span",{className:styles.price,style:{minWidth:priceLength},ref:minRef},React.createElement(I18n.Price,{price:priceMin,currency:currency,fractions:false}))),React.createElement(I18n.Placeholder,{forKey:"toPrice"},React.createElement("span",{className:styles.price,style:{minWidth:priceLength},ref:maxRef},React.createElement(I18n.Price,{price:priceMax,currency:currency,fractions:false})))),React.createElement("span",{"aria-hidden":true,hidden:true,id:"price-slider-currency-label"},currencySymbol),React.createElement("input",{type:"text",id:"priceMin",name:"priceMin",value:minValue,onChange:handleChangeMin,onClick:handleFieldClick,style:{width:priceLength,left:minOffset},className:styles.editableField,"aria-label":i18n.text('price.range_from'),"aria-describedby":"price-slider-currency-label"}),React.createElement("input",{type:"text",id:"priceMax",name:"priceMax",value:maxValue,onChange:handleChangeMax,onClick:handleFieldClick,style:{width:priceLength,left:maxOffset},className:styles.editableField,"aria-label":i18n.text('price.range_to'),"aria-describedby":"price-slider-currency-label"}));}export default memo(Label);
16
+ */function handleChangeMax(_ref3){var target=_ref3.target;setMaxValue(target.value);if(target.value){onChange([parseInt(minValue,10)*100,parseInt(target.value,10)*100]);}}var currencySymbol=Intl.NumberFormat('en-US',{style:'currency',currency:currency}).format('0').replace('0.00','');return React.createElement("div",{className:styles.editableContainer},React.createElement("span",{className:styles.srOnly},i18n.text('price.range',{fromPrice:i18n.price(priceMin,currency,false),toPrice:i18n.price(priceMax,currency,false)})),React.createElement(I18n.Text,{string:"price.range","aria-hidden":true},React.createElement(I18n.Placeholder,{forKey:"fromPrice"},React.createElement("span",{className:styles.price,style:{minWidth:priceLength},ref:minRef},React.createElement(I18n.Price,{price:priceMin,currency:currency,fractions:false}))),React.createElement(I18n.Placeholder,{forKey:"toPrice"},React.createElement("span",{className:styles.price,style:{minWidth:priceLength},ref:maxRef},React.createElement(I18n.Price,{price:priceMax,currency:currency,fractions:false})))),React.createElement("span",{"aria-hidden":true,hidden:true,id:"price-slider-currency-label"},currencySymbol),React.createElement("input",{type:"number",inputMode:"numeric",pattern:"[0-9]*",id:"priceMin",name:"priceMin",value:minValue,onChange:handleChangeMin,onClick:handleFieldClick,style:{width:priceLength,left:minOffset},className:styles.editableField,"aria-label":i18n.text('price.range_from'),"aria-describedby":"price-slider-currency-label"}),React.createElement("input",{type:"number",inputMode:"numeric",pattern:"[0-9]*",id:"priceMax",name:"priceMax",value:maxValue,onChange:handleChangeMax,onClick:handleFieldClick,style:{width:priceLength,left:maxOffset},className:styles.editableField,"aria-label":i18n.text('price.range_to'),"aria-describedby":"price-slider-currency-label"}));}export default memo(Label);
@@ -1,6 +1,5 @@
1
1
  import{SELECT_LOCATION}from"../constants";/**
2
2
  * Creates the dispatched SELECT_LOCATION action object.
3
3
  * @param {Object} location The location data to store for the use.
4
- * @param {boolean} showToast Whether to show a toast message.
5
4
  * @returns {Object}
6
- */var selectLocation=function selectLocation(location,showToast){return{type:SELECT_LOCATION,location:location,showToast:showToast};};export default selectLocation;
5
+ */var selectLocation=function selectLocation(location){return{type:SELECT_LOCATION,location:location};};export default selectLocation;
@@ -16,4 +16,4 @@ import{logger}from'@shopgate/pwa-core/helpers';import PipelineRequest from'@shop
16
16
  * @param {boolean} [params.enableInLocationFinder=false] When set to `true` only locations are
17
17
  * returned which are enabled for the location finder.
18
18
  * @returns {Function} A redux thunk.
19
- */function fetchLocations(params){return function(dispatch){dispatch(requestLocations(params));var filters={countryCode:params.countryCode};if(params.geolocation){filters.longitude=params.geolocation.longitude;filters.latitude=params.geolocation.latitude;}if(params.postalCode){filters.postalCode=params.postalCode;}if(params.enableInLocationFinder){filters.enableInLocationFinder=params.enableInLocationFinder;}if(params.radius){filters.radius=params.radius;}if(params.codes){filters.codes=params.codes;}if(params.limit){filters.limit=params.limit;}if(params.offset){filters.offset=params.offset;}var request=new PipelineRequest(SHOPGATE_STOREFRONT_GET_LOCATIONS).setInput(filters).dispatch();request.then(function(result){dispatch(receiveLocations(filters,result.locations));})["catch"](function(error){logger.error(error);dispatch(errorLocations(params,error));});return request;};}/** @mixes {MutableFunction} */export default mutable(fetchLocations);
19
+ */function fetchLocations(params){return function(dispatch){dispatch(requestLocations(params));var filters={countryCode:params.countryCode};if(params.geolocation){filters.longitude=params.geolocation.longitude;filters.latitude=params.geolocation.latitude;}if(params.postalCode){filters.postalCode=params.postalCode;}if(params.enableInLocationFinder){filters.enableInLocationFinder=params.enableInLocationFinder;}if(params.radius){filters.radius=params.radius;}if(params.codes){filters.codes=params.codes;}var request=new PipelineRequest(SHOPGATE_STOREFRONT_GET_LOCATIONS).setInput(filters).dispatch();request.then(function(result){dispatch(receiveLocations(filters,result.locations));})["catch"](function(error){logger.error(error);dispatch(errorLocations(params,error));});return request;};}/** @mixes {MutableFunction} */export default mutable(fetchLocations);
@@ -1,3 +1,3 @@
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;}/* eslint-disable jsx-a11y/aria-role */import React from'react';import PropTypes from'prop-types';import classNames from'classnames';import{RippleButton,I18n}from'@shopgate/engage/components';import{i18n}from'@shopgate/engage/core';import{wrapper,inner,innerStandalone,heading,name,button}from"./GlobalLocationSwitcherBar.style";/**
2
- * @returns {JSX}
3
- */var GlobalLocationSwitcherBar=function GlobalLocationSwitcherBar(_ref){var locationName=_ref.locationName,handleChange=_ref.handleChange,standalone=_ref.standalone;return React.createElement("div",{className:wrapper},React.createElement("div",{className:classNames(inner,_defineProperty({},innerStandalone,standalone))},React.createElement("span",{role:"text"},React.createElement("span",{className:heading},i18n.text('locations.your_current_location.heading')),React.createElement("span",{className:name},locationName)),React.createElement(RippleButton,{onClick:handleChange,type:"secondary",className:button,"aria-haspopup":true,flat:true},React.createElement(I18n.Text,{string:"locations.your_current_location.change"}))));};GlobalLocationSwitcherBar.defaultProps={standalone:false};export default GlobalLocationSwitcherBar;/* eslint-enable jsx-a11y/aria-role */
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 from'react';import PropTypes from'prop-types';import classNames from'classnames';import{RippleButton,I18n}from'@shopgate/engage/components';import{i18n}from'@shopgate/engage/core';import{wrapper,inner,innerStandalone,heading,name,button}from"./GlobalLocationSwitcherBar.style";/**
2
+ * @returns {JSX.Element}
3
+ */var GlobalLocationSwitcherBar=function GlobalLocationSwitcherBar(_ref){var locationName=_ref.locationName,handleChange=_ref.handleChange,standalone=_ref.standalone;return React.createElement("div",{className:wrapper},React.createElement("div",{className:classNames(inner,_defineProperty({},innerStandalone,standalone))},React.createElement("span",{"aria-label":"".concat(i18n.text('locations.your_current_location.heading'),": ").concat(locationName)},React.createElement("span",{className:heading},"".concat(i18n.text('locations.your_current_location.heading'),":")),React.createElement("span",{className:name},locationName)),React.createElement(RippleButton,{onClick:handleChange,type:"secondary",className:button,"aria-haspopup":true,flat:true},React.createElement(I18n.Text,{string:"locations.your_current_location.change"}))));};GlobalLocationSwitcherBar.defaultProps={standalone:false};export default GlobalLocationSwitcherBar;
@@ -1 +1 @@
1
- import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var variables=themeConfig.variables;export var wrapper=css({fontSize:'0.875rem',color:'var(--color-text-high-emphasis)',background:'var(--color-background-accent)'}).toString();export var inner=css({display:'flex',flexShrink:0,margin:"0 ".concat(variables.gap.big,"px"),borderBottom:'1px solid #eaeaea',alignItems:'center',height:variables.filterbar.height}).toString();export var innerStandalone=css({borderBottom:'none'}).toString();export var heading=css({paddingRight:variables.gap.small,':after':{content:':'}}).toString();export var name=css({fontWeight:500}).toString();export var button=css({marginLeft:'auto',letterSpacing:'0.05em',padding:"".concat(variables.gap.xsmall*0.75,"px 0 !important"),' *':{fontSize:'0.875rem',textTransform:'initial',padding:'0 !important',color:'var(--color-text-high-emphasis)',fontWeight:500}}).toString();
1
+ import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var variables=themeConfig.variables;export var wrapper=css({fontSize:'0.875rem',color:'var(--color-text-high-emphasis)',background:'var(--color-background-accent)'}).toString();export var inner=css({display:'flex',flexShrink:0,margin:"0 ".concat(variables.gap.big,"px"),borderBottom:'1px solid #eaeaea',alignItems:'center',height:variables.filterbar.height}).toString();export var innerStandalone=css({borderBottom:'none'}).toString();export var heading=css({paddingRight:variables.gap.small}).toString();export var name=css({fontWeight:500}).toString();export var button=css({marginLeft:'auto',letterSpacing:'0.05em',padding:"".concat(variables.gap.xsmall*0.75,"px 0 !important"),' *':{fontSize:'0.875rem',textTransform:'initial',padding:'0 !important',color:'var(--color-text-high-emphasis)',fontWeight:500}}).toString();
@@ -1,8 +1,8 @@
1
- import*as React from'react';import{css}from'glamor';import{connect}from'react-redux';import classNames from'classnames';import defaultsDeep from'lodash/defaultsDeep';import PropTypes from'prop-types';import{makeGetLocationInventory}from"../../selectors";import{getThemeSettings}from"../../../core";import{SurroundPortals}from"../../../components";import{PRODUCT_LOCATION_STOCK_INFO}from"../../constants";import{getAvailabilitySettings}from"../../helpers";import defaultSettings from"./StockInfo.defaultSettings";import{StockInfoInventory}from"./StockInfoInventory";/**
1
+ import*as React from'react';import{css}from'glamor';import{connect}from'react-redux';import classNames from'classnames';import defaultsDeep from'lodash/defaultsDeep';import{makeGetLocationInventory}from"../../selectors";import{getThemeSettings}from"../../../core";import{SurroundPortals}from"../../../components";import{PRODUCT_LOCATION_STOCK_INFO}from"../../constants";import{getAvailabilitySettings}from"../../helpers";import defaultSettings from"./StockInfo.defaultSettings";import{StockInfoInventory}from"./StockInfoInventory";/**
2
2
  * Creates a mapper for redux.
3
3
  * @returns {Function}
4
4
  */var makeMapStateToProps=function makeMapStateToProps(){var getInventory=makeGetLocationInventory(function(_,props){var _props$location;return(_props$location=props.location)===null||_props$location===void 0?void 0:_props$location.code;},function(_,props){var _props$product;return props.productId||((_props$product=props.product)===null||_props$product===void 0?void 0:_props$product.id);});return function(state,props){return{inventory:getInventory(state,props)};};};/**
5
5
  * Renders visible stock information based on the given location.
6
6
  * @param {Object} props The component props.
7
7
  * @return {JSX}
8
- */var StockInfoUnwrapped=function StockInfoUnwrapped(_ref){var location=_ref.location,inventory=_ref.inventory,className=_ref.className;var _ref2=getThemeSettings('product')||{},locationStockInfo=_ref2.locationStockInfo;var settings=defaultsDeep(locationStockInfo,defaultSettings);var _getAvailabilitySetti=getAvailabilitySettings(settings,location,inventory),_getAvailabilitySetti2=_getAvailabilitySetti.availabilityText,availabilityText=_getAvailabilitySetti2===void 0?'':_getAvailabilitySetti2,_getAvailabilitySetti3=_getAvailabilitySetti.availabilityTextColor,availabilityTextColor=_getAvailabilitySetti3===void 0?'inherit':_getAvailabilitySetti3,_getAvailabilitySetti4=_getAvailabilitySetti.comingSoon,comingSoon=_getAvailabilitySetti4===void 0?false:_getAvailabilitySetti4;var defaultClassName=css({color:availabilityTextColor,fontSize:'0.75rem',margin:0,':not(:empty) ~ *':{marginLeft:14}}).toString();var portalProps=React.useMemo(function(){return{location:location,inventory:inventory,comingSoon:comingSoon,settings:settings,className:className,availabilityText:availabilityText,availabilityTextColor:availabilityTextColor};},[availabilityText,availabilityTextColor,className,comingSoon,inventory,location,settings]);return React.createElement(SurroundPortals,{portalName:PRODUCT_LOCATION_STOCK_INFO,portalProps:portalProps},React.createElement("span",{className:classNames(defaultClassName,css(className).toString())},React.createElement(StockInfoInventory,{availabilityText:availabilityText,comingSoon:comingSoon,location:location,inventory:inventory,maxNumberVisible:settings.maxNumberOfVisibleInventory,aboveMaxExtension:settings.aboveMaxExtension})));};StockInfoUnwrapped.defaultProps={className:null,inventory:null};export var StockInfo=connect(makeMapStateToProps)(StockInfoUnwrapped);
8
+ */var StockInfoUnwrapped=function StockInfoUnwrapped(_ref){var location=_ref.location,inventory=_ref.inventory,className=_ref.className;var _ref2=getThemeSettings('product')||{},locationStockInfo=_ref2.locationStockInfo;var settings=defaultsDeep(locationStockInfo,defaultSettings);var _getAvailabilitySetti=getAvailabilitySettings(settings,location,inventory),_getAvailabilitySetti2=_getAvailabilitySetti.availabilityText,availabilityText=_getAvailabilitySetti2===void 0?'':_getAvailabilitySetti2,_getAvailabilitySetti3=_getAvailabilitySetti.availabilityTextColor,availabilityTextColor=_getAvailabilitySetti3===void 0?'inherit':_getAvailabilitySetti3,_getAvailabilitySetti4=_getAvailabilitySetti.comingSoon,comingSoon=_getAvailabilitySetti4===void 0?false:_getAvailabilitySetti4;var defaultClassName=css({color:availabilityTextColor,fontSize:'0.75rem',margin:0,':not(:empty) ~ *':{marginLeft:14}}).toString();var portalProps=React.useMemo(function(){return{location:location,inventory:inventory,comingSoon:comingSoon,settings:settings,className:className,availabilityText:availabilityText,availabilityTextColor:availabilityTextColor};},[availabilityText,availabilityTextColor,className,comingSoon,inventory,location,settings]);return React.createElement(SurroundPortals,{portalName:PRODUCT_LOCATION_STOCK_INFO,portalProps:portalProps},React.createElement("span",{className:classNames(defaultClassName,css(className).toString())},React.createElement(StockInfoInventory,{availabilityText:availabilityText,comingSoon:comingSoon,location:location,inventory:inventory,maxNumberVisible:settings.maxNumberOfVisibleInventory,aboveMaxExtension:settings.aboveMaxExtension})));};StockInfoUnwrapped.defaultProps={className:null};export var StockInfo=connect(makeMapStateToProps)(StockInfoUnwrapped);
@@ -1,4 +1,4 @@
1
- import*as React from'react';import PropTypes from'prop-types';import{I18n}from"../../../components";/**
1
+ import*as React from'react';import{I18n}from"../../../components";/**
2
2
  * Renders the inventory given by the location into a given translation string.
3
3
  * @param {Object} props The component props.
4
4
  * @param {string} props.availabilityText The translation string to use.
@@ -6,4 +6,4 @@ import*as React from'react';import PropTypes from'prop-types';import{I18n}from".
6
6
  * @param {number|undefined} props.maxNumberVisible The component props.
7
7
  * @param {string} props.aboveMaxExtension The component props.
8
8
  * @return {JSX}
9
- */export function StockInfoInventory(props){var availabilityText=props.availabilityText,comingSoon=props.comingSoon,location=props.location,inventory=props.inventory,maxNumberVisible=props.maxNumberVisible,aboveMaxExtension=props.aboveMaxExtension;var visibleInventory=React.useMemo(function(){if(!location||!inventory){return null;}if(inventory.visible!==null&&inventory.visible>maxNumberVisible){return"".concat(maxNumberVisible).concat(aboveMaxExtension);}return inventory.visible;},[aboveMaxExtension,inventory,location,maxNumberVisible]);if((!location||!availabilityText||!inventory)&&!comingSoon){return null;}return React.createElement(I18n.Text,{string:availabilityText,params:{visibleInventory:visibleInventory}});}StockInfoInventory.defaultProps={comingSoon:false,inventory:null};
9
+ */export function StockInfoInventory(props){var availabilityText=props.availabilityText,comingSoon=props.comingSoon,location=props.location,inventory=props.inventory,maxNumberVisible=props.maxNumberVisible,aboveMaxExtension=props.aboveMaxExtension;var visibleInventory=React.useMemo(function(){if(!location||!inventory){return null;}if(inventory.visible!==null&&inventory.visible>maxNumberVisible){return"".concat(maxNumberVisible).concat(aboveMaxExtension);}return inventory.visible;},[aboveMaxExtension,inventory,location,maxNumberVisible]);if((!location||!availabilityText||!inventory)&&!comingSoon){return null;}return React.createElement(I18n.Text,{string:availabilityText,params:{visibleInventory:visibleInventory}});}StockInfoInventory.defaultProps={comingSoon:false};
@@ -1,3 +1,3 @@
1
- import React,{useRef}from'react';import{hot}from'react-hot-loader/root';import{StoreFinderProvider}from"../../providers";import StoreFinderSearch from"./StoreFinderSearch";import StoreFinderLocations from"./StoreFinderLocations";import{container,storeSearch,storeList}from"./StoreFinder.style";/**
2
- * @returns {JSX.Element}
3
- */var StoreFinder=function StoreFinder(){var storeListRef=useRef(null);return React.createElement(StoreFinderProvider,{storeListRef:storeListRef},React.createElement("div",{className:container},React.createElement("div",{className:storeSearch},React.createElement(StoreFinderSearch,null)),React.createElement("div",{className:storeList},React.createElement(StoreFinderLocations,{ref:storeListRef}))));};export default hot(StoreFinder);
1
+ import React,{useRef}from'react';import{hot}from'react-hot-loader/root';import{ResponsiveContainer}from'@shopgate/engage/components';import{StoreFinderProvider}from"../../providers";import StoreFinderSearch from"./StoreFinderSearch";import StoreFinderMap from"./StoreFinderMap";import StoreFinderLocations from"./StoreFinderLocations";import StoreFinderLocationDetailsWide from"./StoreFinderLocationDetailsWide";import StoreFinderStoresNear from"./StoreFinderStoresNear";import{container,storeSearch,storeList,storeDetails,storeDetailsMap}from"./StoreFinder.style";/**
2
+ * @returns {JSX}
3
+ */var StoreFinder=function StoreFinder(){var storeListRef=useRef(null);return React.createElement(StoreFinderProvider,{storeListRef:storeListRef},React.createElement("div",{className:container},React.createElement("div",{className:storeSearch},React.createElement(StoreFinderSearch,null),React.createElement(ResponsiveContainer,{breakpoint:">sm",webOnly:true},React.createElement(StoreFinderStoresNear,null))),React.createElement("div",{className:storeDetailsMap},React.createElement(StoreFinderMap,null)),React.createElement("div",{className:storeDetails},React.createElement(StoreFinderLocationDetailsWide,null)),React.createElement("div",{className:storeList},React.createElement(StoreFinderLocations,{ref:storeListRef}))));};export default hot(StoreFinder);
@@ -1 +1,2 @@
1
- import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var variables=themeConfig.variables;export var container=css({display:'grid',gridTemplateColumns:'1fr',gridTemplateRows:'auto 1fr',gridTemplateAreas:'"search" "store-list"',height:'inherit'});export var storeSearch=css({gridArea:'search',padding:"".concat(variables.gap.big,"px 4px 0 4px"),' select':{color:'var(--color-text-medium-emphasis)'}});export var storeList=css({gridArea:'store-list',width:'100%',overflow:'hidden',padding:'0 12px 8px 12px'});
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{css}from'glamor';import{responsiveMediaQuery}from'@shopgate/engage/styles';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var variables=themeConfig.variables;export var container=css(_defineProperty({display:'grid',gridTemplateColumns:'350px 1fr',gridTemplateRows:'auto 200px 1fr 1fr',gridTemplateAreas:"\n \"search map\"\n \"store-list map\"\n \"store-list store-details\"\n \"store-list store-details\"\n ",height:'calc(100vh - var(--app-bar-height))'},responsiveMediaQuery('<=sm',{appAlways:true}),{gridTemplateColumns:'1fr',gridTemplateRows:'auto 1fr',gridTemplateAreas:'"search" "store-list"',// height: '100vh',
2
+ height:'inherit'}));export var storeSearch=css({gridArea:'search',padding:"".concat(variables.gap.big,"px 4px 0 4px"),' select':{color:'var(--color-text-medium-emphasis)'}});export var storeList=css(_defineProperty({gridArea:'store-list',width:'100%',overflow:'hidden'},responsiveMediaQuery('<=sm',{appAlways:true}),{width:'100%'}));export var storeDetailsMap=css(_defineProperty({gridArea:'map',paddingBottom:variables.gap.big},responsiveMediaQuery('>sm',{webOnly:true}),{paddingRight:variables.gap.big,paddingTop:variables.gap.big,paddingBottom:0}));export var storeDetails=css(_defineProperty({gridArea:'store-details',paddingRight:variables.gap.big,paddingTop:variables.gap.big},responsiveMediaQuery('<=sm',{appAlways:true}),{display:'none'}));
@@ -1,3 +1,3 @@
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{StoreContext}from"./Store.context";import{StoreFinderContext}from"../../locations.context";import StoreFinderLocationHeader from"./StoreFinderLocationHeader";import{container,selected}from"./StoreFinderLocation.style";import{StoreFinderSelectLocationButton}from"./StoreFinderSelectLocationButton";import StoreFinderStoreInfoButton from"./StoreFinderStoreInfoButton";/**
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{ResponsiveContainer}from'@shopgate/engage/components';import{StoreContext}from"./Store.context";import{StoreFinderContext}from"../../locations.context";import StoreFinderLocationHeader from"./StoreFinderLocationHeader";import StoreFinderLocationDetails from"./StoreFinderLocationDetails";import StoreFinderGetDirectionsButton from"./StoreFinderGetDirectionsButton";import{container,selected,directionsButton}from"./StoreFinderLocation.style";import{StoreFinderSelectLocationButton}from"./StoreFinderSelectLocationButton";/**
2
2
  * @returns {JSX}
3
- */var StoreFinderLocation=function StoreFinderLocation(){var store=useContext(StoreContext);var _useContext=useContext(StoreFinderContext),selectedLocation=_useContext.selectedLocation;var isSelected=useMemo(function(){var _ref=selectedLocation||{},code=_ref.code;return store.code===code;},[selectedLocation,store.code]);return React.createElement("div",{className:classNames(container,_defineProperty({},selected,isSelected)),"data-location-code":store.code},React.createElement(StoreFinderLocationHeader,null),React.createElement(StoreFinderSelectLocationButton,null),React.createElement(StoreFinderStoreInfoButton,null));};export default StoreFinderLocation;
3
+ */var StoreFinderLocation=function StoreFinderLocation(){var store=useContext(StoreContext);var _useContext=useContext(StoreFinderContext),selectedLocation=_useContext.selectedLocation;var isSelected=useMemo(function(){var _ref=selectedLocation||{},code=_ref.code;return store.code===code;},[selectedLocation,store.code]);return React.createElement("div",{className:classNames(container,_defineProperty({},selected,isSelected)),"data-location-code":store.code},React.createElement(StoreFinderLocationHeader,null),React.createElement(ResponsiveContainer,{breakpoint:"<=sm",appAlways:true},React.createElement(StoreFinderLocationDetails,null),React.createElement(StoreFinderSelectLocationButton,null),React.createElement(StoreFinderGetDirectionsButton,{address:store.address,className:directionsButton})));};export default StoreFinderLocation;
@@ -1 +1 @@
1
- import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var variables=themeConfig.variables;export var container=css({}).toString();export var selected=css({}).toString();export var directionsButton=css({padding:"0 ".concat(variables.gap.big,"px ").concat(variables.gap.big,"px")}).toString();
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{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';import{responsiveMediaQuery}from'@shopgate/engage/styles';var colors=themeConfig.colors,variables=themeConfig.variables;export var container=css({}).toString();export var selected=css(_defineProperty({boxShadow:"0 0 0 2px var(--color-primary, ".concat(colors.primary,")"),borderRadius:3},responsiveMediaQuery('<=sm',{appAlways:true}),{boxShadow:'none'})).toString();export var directionsButton=css({padding:"0 ".concat(variables.gap.big,"px ").concat(variables.gap.big,"px")}).toString();
@@ -0,0 +1,3 @@
1
+ import _isEmpty from"lodash/isEmpty";import _every from"lodash/every";import React,{Fragment,useMemo,useContext}from'react';import{Grid,I18n}from'@shopgate/engage/components';import{StoreFinderContext}from"../../locations.context";import{StoreAddress}from"../StoreList/StoreAddress";import{StoreOpeningHours}from"../StoreList/StoreOpeningHours";import{StoreHoursToday}from"../StoreList/StoreHoursToday";import{StoreDistance}from"../StoreList/StoreDistance";import StoreFinderGetDirectionsButton from"./StoreFinderGetDirectionsButton";import StoreFinderLocationHeaderPhoneNumber from"./StoreFinderLocationHeaderPhoneNumber";import{container,headingLine,storeName,storeHours,storeDistance,storeDetailsLine,storeAddress,storePhoneNumber,storeOpeningHours,directionButton}from"./StoreFinderLocationDetailsWide.style";import{StoreFinderSelectLocationButton}from"./StoreFinderSelectLocationButton";import{StoreContext}from"./Store.context";/**
2
+ * @returns {JSX}
3
+ */var StoreFinderLocationDetailsWide=function StoreFinderLocationDetailsWide(){var _useContext=useContext(StoreFinderContext),location=_useContext.selectedLocation,locations=_useContext.locations;var hasOperationHours=useMemo(function(){var _ref=location||{},operationHours=_ref.operationHours;return operationHours&&!_every(operationHours,_isEmpty);},[location]);if(!location||locations.length===0){return null;}return React.createElement(StoreContext.Provider,{value:location},React.createElement("div",{className:container},React.createElement(Grid,{className:headingLine},React.createElement(Grid.Item,{grow:1},React.createElement("div",{className:storeName},location.name),React.createElement("div",{className:storeHours},React.createElement(StoreHoursToday,{hours:location.operationHours,longLabel:true}))),React.createElement(Grid.Item,null,React.createElement("div",{className:storeDistance},React.createElement(StoreDistance,{distance:location.distance,unitSystem:location.unitSystem})),React.createElement(StoreFinderSelectLocationButton,null),React.createElement(StoreFinderGetDirectionsButton,{address:location.address,className:directionButton}))),React.createElement(Grid,{className:storeDetailsLine},React.createElement(Grid.Item,null,React.createElement("div",{className:storeAddress},React.createElement(StoreAddress,{pure:true,address:location.address})),location.address.phoneNumber&&React.createElement("div",{className:storePhoneNumber},React.createElement(I18n.Text,{string:"locations.phone"}),': ',React.createElement(StoreFinderLocationHeaderPhoneNumber,{phone:location.address.phoneNumber,pure:true}))),React.createElement(Grid.Item,{className:storeOpeningHours},hasOperationHours&&React.createElement(Fragment,null,React.createElement(I18n.Text,{string:"locations.store_hours"}),':',React.createElement(StoreOpeningHours,{pure:true,hours:location.operationHours}))))));};export default StoreFinderLocationDetailsWide;
@@ -0,0 +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{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var colors=themeConfig.colors,variables=themeConfig.variables;export var container=css({background:colors.light,border:"1px solid ".concat(colors.shade7),boxSizing:'border-box',boxShadow:'0px 1px 2px rgba(0, 0, 0, 0.25)',borderRadius:3,padding:variables.gap.big}).toString();var linePadding={paddingBottom:variables.gap.big};export var headingLine=css(_extends({},linePadding,{fontWeight:500,fontSize:'1.125rem',lineHeight:'1.5rem'})).toString();export var storeName=css({paddingBottom:variables.gap.small});export var storeDistance=css({textAlign:'right',':not(:empty)':{paddingBottom:variables.gap.small},' > *':{fontWeight:500,fontSize:'1.125rem',lineHeight:'1.5rem'}}).toString();export var storeHours=css({' > *':{color:'var(--color-text-medium-emphasis)',fontWeight:'normal'}}).toString();export var directionButton=css({minWidth:220}).toString();export var storeDetailsLine=css(_extends({},linePadding,{color:'var(--color-text-medium-emphasis)',justifyContent:'space-between'})).toString();export var storeAddress=css(_extends({},linePadding,{paddingRight:variables.gap.big,fontSize:'1.125rem',lineHeight:'1.5rem'})).toString();export var storePhoneNumber=css({fontSize:'1rem',' a':{color:'var(--color-primary)',textDecoration:'underline'}}).toString();export var storeOpeningHours=css({paddingRight:variables.gap.big,' > *':{color:'var(--color-text-medium-emphasis)'}}).toString();
@@ -1,3 +1,3 @@
1
- import React,{useContext,useMemo}from'react';import{Grid,LocationIcon}from'@shopgate/engage/components';import{i18n}from'@shopgate/engage/core/helpers';import{StoreContext}from"./Store.context";import{StoreFinderContext}from"../../locations.context";import{StoreDistance}from"../StoreList/StoreDistance";import{StoreHoursToday}from"../StoreList/StoreHoursToday";import{StoreAddress}from"../StoreList/StoreAddress";import StoreFinderLocationHeaderPhoneNumber from"./StoreFinderLocationHeaderPhoneNumber";import{container,storeName,storeDistance,storeHoursToday,clickable,storeNameWrapper,myStore,myStoreIcon,myStoreWrapper}from"./StoreFinderLocationHeader.style";/**
1
+ import React,{useContext,useCallback}from'react';import{Grid,ResponsiveContainer}from'@shopgate/engage/components';import{StoreContext}from"./Store.context";import{StoreFinderContext}from"../../locations.context";import{StoreDistance}from"../StoreList/StoreDistance";import{StoreHoursToday}from"../StoreList/StoreHoursToday";import{StoreAddress}from"../StoreList/StoreAddress";import StoreFinderLocationHeaderPhoneNumber from"./StoreFinderLocationHeaderPhoneNumber";import{container,storeName,storeDistance,storeHoursToday,clickable}from"./StoreFinderLocationHeader.style";/**
2
2
  * @returns {JSX}
3
- */var StoreFinderLocationHeader=function StoreFinderLocationHeader(){var store=useContext(StoreContext);var name=store.name,distance=store.distance,unitSystem=store.unitSystem,operationHours=store.operationHours,address=store.address;var _useContext=useContext(StoreFinderContext),selectedLocation=_useContext.selectedLocation;var isSelectedLocation=useMemo(function(){return(selectedLocation===null||selectedLocation===void 0?void 0:selectedLocation.code)===(store===null||store===void 0?void 0:store.code);},[selectedLocation,store]);return React.createElement("div",{className:container},React.createElement("div",{className:clickable},React.createElement(Grid,null,React.createElement(Grid.Item,{grow:1},React.createElement("div",{className:storeNameWrapper},React.createElement("div",{className:storeName},name),isSelectedLocation&&React.createElement("div",{className:myStoreWrapper},React.createElement("div",{className:myStoreIcon},React.createElement(LocationIcon,{size:20})),React.createElement("div",{className:myStore},i18n.text('location.myStore'))))),React.createElement(Grid.Item,{className:storeDistance},React.createElement(StoreDistance,{distance:distance,unitSystem:unitSystem}))),React.createElement("div",{className:storeHoursToday},React.createElement(StoreHoursToday,{hours:operationHours})),React.createElement(StoreAddress,{address:address})),React.createElement(StoreFinderLocationHeaderPhoneNumber,{phone:address.phoneNumber}));};export default StoreFinderLocationHeader;
3
+ */var StoreFinderLocationHeader=function StoreFinderLocationHeader(){var store=useContext(StoreContext);var name=store.name,distance=store.distance,unitSystem=store.unitSystem,operationHours=store.operationHours,address=store.address;var _useContext=useContext(StoreFinderContext),changeLocation=_useContext.changeLocation;var handleClick=useCallback(function(){changeLocation(store);},[changeLocation,store]);return React.createElement("div",{className:container},React.createElement("div",{className:clickable,role:"button",tabIndex:"0",onClick:handleClick,onKeyDown:handleClick},React.createElement(Grid,null,React.createElement(Grid.Item,{grow:1,className:storeName},name),React.createElement(Grid.Item,{className:storeDistance},React.createElement(StoreDistance,{distance:distance,unitSystem:unitSystem}))),React.createElement(ResponsiveContainer,{breakpoint:">sm",webOnly:true},React.createElement("div",{className:storeHoursToday},React.createElement(StoreHoursToday,{hours:operationHours,longLabel:true})),React.createElement(StoreAddress,{address:address,pure:true})),React.createElement(ResponsiveContainer,{breakpoint:"<=sm",appAlways:true},React.createElement("div",{className:storeHoursToday},React.createElement(StoreHoursToday,{hours:operationHours})),React.createElement(StoreAddress,{address:address}))),React.createElement(ResponsiveContainer,{breakpoint:"<=sm",appAlways:true},React.createElement(StoreFinderLocationHeaderPhoneNumber,{phone:address.phoneNumber})));};export default StoreFinderLocationHeader;
@@ -1 +1 @@
1
- import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var variables=themeConfig.variables;export var container=css({padding:variables.gap.big,display:'flex',flexDirection:'column',color:'var(--color-text-low-emphasis)',' > *':{margin:0},' svg':{color:'var(--color-text-low-emphasis)'},' li':{paddingTop:0},' a':{color:'var(--color-primary)',textDecoration:'underline'},fontSize:'0.875rem',lineHeight:'1.5rem',' > *:not(:last-child)':{paddingBottom:variables.gap.xsmall,paddingTop:0}}).toString();export var clickable=css({' > *':{margin:0,paddingTop:0},' > *:not(:last-child)':{paddingBottom:variables.gap.xsmall,paddingTop:0}}).toString();export var storeName=css({fontSize:'1rem',fontWeight:500,color:'var(--color-text-high-emphasis)'}).toString();export var myStoreWrapper=css({display:'flex',alignItems:'center'}).toString();export var myStore=css({color:'var(--color-primary)',fontSize:'1rem',fontWeight:500}).toString();export var myStoreIcon=css({' svg':{color:'var(--color-primary)'},marginRight:'4px'}).toString();export var storeNameWrapper=css({flexWrap:'wrap',display:'flex',gap:'2px 12px'});export var storeDistance=css({lineHeight:'1.65rem',paddingLeft:variables.gap.small}).toString();export var storeHoursToday=css({' > *':{color:'var(--color-text-low-emphasis)'}}).toString();
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{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';import{responsiveMediaQuery}from'@shopgate/engage/styles';var variables=themeConfig.variables;export var container=css(_defineProperty({padding:variables.gap.big,display:'flex',flexDirection:'column',color:'var(--color-text-low-emphasis)',' > *':{margin:0},' > *:not(:last-child)':{paddingBottom:variables.gap.small},' svg':{color:'var(--color-text-low-emphasis)'},' li':{paddingTop:0},' a':{color:'var(--color-primary)',textDecoration:'underline'}},responsiveMediaQuery('<=sm',{appAlways:true}),{fontSize:'0.875rem',lineHeight:'1.5rem',' > *:not(:last-child)':{paddingBottom:variables.gap.xsmall,paddingTop:0}})).toString();export var clickable=css(_defineProperty({cursor:'pointer',' > *:not(:last-child)':{paddingBottom:variables.gap.small},' > *':{margin:0,paddingTop:0}},responsiveMediaQuery('<=sm',{appAlways:true}),{' > *:not(:last-child)':{paddingBottom:variables.gap.xsmall,paddingTop:0}})).toString();export var storeName=css(_defineProperty({fontSize:'1rem',fontWeight:500,color:'var(--color-text-high-emphasis)'},responsiveMediaQuery('>sm',{webOnly:true}),{fontSize:'1.125rem',lineHeight:'1.5rem'})).toString();export var storeDistance=css({lineHeight:'1.65rem',paddingLeft:variables.gap.small}).toString();export var storeHoursToday=css({' > *':{color:'var(--color-text-low-emphasis)'}}).toString();
@@ -1 +1,2 @@
1
- import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var colors=themeConfig.colors,variables=themeConfig.variables;var gapM=variables.gap.small+variables.gap.xsmall;export var container=css({paddingTop:2,borderTop:'none',overflowY:'unset',WebkitOverflowScrolling:'unset'});export var cardList=css({paddingTop:0}).toString();export var card=css({background:colors.light,border:"1px solid ".concat(colors.shade7),boxSizing:'border-box',boxShadow:'0px 1px 2px rgba(0, 0, 0, 0.25)',borderRadius:3,':not(:last-child)':{marginBottom:gapM}}).toString();
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{css}from'glamor';import{responsiveMediaQuery}from'@shopgate/engage/styles';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var colors=themeConfig.colors,variables=themeConfig.variables;var gapM=variables.gap.small+variables.gap.xsmall;export var container=css(_defineProperty({borderTop:"1px solid ".concat(colors.shade7),overflowY:'scroll',WebkitOverflowScrolling:'touch',height:'100%'},responsiveMediaQuery('<=sm',{appAlways:true}),{paddingTop:2,borderTop:'none',overflowY:'unset',WebkitOverflowScrolling:'unset'// overflowY: 'initial',
2
+ }));export var cardList=css(_defineProperty({padding:variables.gap.big},responsiveMediaQuery('<=sm',{appAlways:true}),{paddingTop:0})).toString();export var card=css({background:colors.light,border:"1px solid ".concat(colors.shade7),boxSizing:'border-box',boxShadow:'0px 1px 2px rgba(0, 0, 0, 0.25)',borderRadius:3,':not(:last-child)':{marginBottom:gapM}}).toString();
@@ -0,0 +1,4 @@
1
+ import React,{useContext,useMemo,useCallback}from'react';import PropTypes from'prop-types';import"../../assets/leaflet.css";import'leaflet-gesture-handling/dist/leaflet-gesture-handling.css';import Leaflet from'leaflet';import{GestureHandling}from'leaflet-gesture-handling';import{Map,Marker,TileLayer}from'react-leaflet';import{renderToString}from'react-dom/server';import MapMarkerIcon from'@shopgate/pwa-ui-shared/icons/MapMarkerIcon';import{StoreFinderContext}from"../../locations.context";import{container,marker,markerSelected,userPosition as userPositionStyle}from"./StoreFinderMap.style";Leaflet.Map.addInitHook('addHandler','gestureHandling',GestureHandling);/**
2
+ * @param {Object} props The component props
3
+ * @returns {JSX}
4
+ */var StoreFinderMap=function StoreFinderMap(_ref){var showUserPosition=_ref.showUserPosition;var _useContext=useContext(StoreFinderContext),locations=_useContext.locations,selectedLocation=_useContext.selectedLocation,changeLocation=_useContext.changeLocation,userSearch=_useContext.userSearch;var iconHTML=useMemo(function(){return renderToString(React.createElement(MapMarkerIcon,null));},[]);var makerIcon=useMemo(function(){return Leaflet.divIcon({html:iconHTML,className:marker,iconSize:[40,40]});},[iconHTML]);var markerIconSelected=useMemo(function(){return Leaflet.divIcon({html:iconHTML,className:markerSelected,iconSize:[40,40]});},[iconHTML]);var userPositionIcon=useMemo(function(){return Leaflet.divIcon({html:'<div/>',className:userPositionStyle,iconSize:[20,20]});},[]);var positions=useMemo(function(){return locations.map(function(location){var code=location.code,latitude=location.latitude,longitude=location.longitude;var _ref2=selectedLocation||{},selectedCode=_ref2.code;var icon=selectedCode===code?markerIconSelected:makerIcon;return{code:code,location:location,icon:icon,position:[latitude,longitude]};});},[locations,makerIcon,markerIconSelected,selectedLocation]);var userPosition=useMemo(function(){var geolocation=userSearch.geolocation;if(!geolocation||!showUserPosition){return null;}var latitude=geolocation.latitude,longitude=geolocation.longitude;return{icon:userPositionIcon,position:[latitude,longitude]};},[showUserPosition,userPositionIcon,userSearch]);var viewport=useMemo(function(){var _ref3=selectedLocation||locations[0]||{},latitude=_ref3.latitude,longitude=_ref3.longitude;if(!latitude||!longitude){return(userPosition===null||userPosition===void 0?void 0:userPosition.position)||null;}return[latitude,longitude];},[locations,selectedLocation,userPosition]);var onMarkerClick=useCallback(function(event,location){changeLocation(location,true);},[changeLocation]);return React.createElement("div",{className:container},React.createElement(Map,{center:viewport,zoom:15,className:container,gestureHandling:Leaflet.Browser.mobile,touchZoom:true},React.createElement(TileLayer,{attribution:"&copy <a href=\"http://osm.org/copyright\">OpenStreetMap</a> contributors",url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),positions.map(function(_ref4){var position=_ref4.position,code=_ref4.code,location=_ref4.location,icon=_ref4.icon;return React.createElement(Marker,{key:code,icon:icon,position:position,onclick:function onclick(e){onMarkerClick(e,location);}});}),userPosition&&React.createElement(Marker,{key:"user-position",icon:userPosition.icon,position:userPosition.position})));};StoreFinderMap.defaultProps={showUserPosition:true};export default StoreFinderMap;
@@ -0,0 +1,2 @@
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{css}from'glamor';import{responsiveMediaQuery}from'@shopgate/engage/styles';import{themeColors}from'@shopgate/pwa-common/helpers/config';export var container=css(_defineProperty(_defineProperty({height:'100%',width:'100%'},responsiveMediaQuery('>sm',{appAlways:true}),{borderRadius:3,overflow:'hidden'}),responsiveMediaQuery('<=sm',{appAlways:true}),{// position: 'fixed',
2
+ zIndex:10,maxHeight:200}));export var marker=css({' svg':{height:40,width:40,fontSize:'1.5rem',color:"var(--color-text-medium-emphasis, ".concat(themeColors.shade9,")")}}).toString();export var markerSelected=css({' svg':{height:40,width:40,fontSize:'1.5rem',color:"var(--color-primary, ".concat(themeColors.primary,")")}}).toString();var pulseAnimation=css.keyframes({'0%':{boxShadow:'0 0 0 0px rgba(0, 0, 0, 0.2)'},'100%':{boxShadow:'0 0 0 10px rgba(0, 0, 0, 0)'}});export var userPosition=css({' div':{background:'var(--color-secondary)',border:'3px solid #fff',borderRadius:25,height:20,width:20,animation:"".concat(pulseAnimation," 2s infinite")}}).toString();
@@ -1 +1 @@
1
- import{css}from'glamor';import{themeVariables}from'@shopgate/pwa-common/helpers/config';export var container=css({paddingBottom:themeVariables.gap.small});
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{css}from'glamor';import{responsiveMediaQuery}from'@shopgate/engage/styles';import{themeVariables}from'@shopgate/pwa-common/helpers/config';export var container=css(_defineProperty({},responsiveMediaQuery('<=sm',{appAlways:true}),{paddingBottom:themeVariables.gap.small}));
@@ -1,5 +1,5 @@
1
- import React,{useCallback,useContext,useMemo}from'react';import{RippleButton}from'@shopgate/engage/components';import{StoreContext}from"./Store.context";import{i18n}from"../../../core";import{StoreFinderContext}from"../../locations.context";import{selectLocationButton,selectLocationButtonWrapper}from"../StoreList/Store.style";/**
1
+ import React,{useCallback,useContext}from'react';import{RippleButton}from'@shopgate/engage/components';import{StoreContext}from"./Store.context";import{i18n}from"../../../core";import{StoreFinderContext}from"../../locations.context";import{selectLocationButton,selectLocationButtonWrapper}from"../StoreList/Store.style";/**
2
2
  * The StoreFinderSelectLocationButton component.
3
3
  * Renders if route query.selectLocation param is passed
4
4
  * @returns {JSX.Element}
5
- */export var StoreFinderSelectLocationButton=function StoreFinderSelectLocationButton(){var store=useContext(StoreContext);var _useContext=useContext(StoreFinderContext),selectLocation=_useContext.selectLocation,isLoading=_useContext.isLoading,selectedLocation=_useContext.selectedLocation;var handleClick=useCallback(function(e){e.stopPropagation();selectLocation(store);},[selectLocation,store]);var isSelected=useMemo(function(){return(selectedLocation===null||selectedLocation===void 0?void 0:selectedLocation.code)===(store===null||store===void 0?void 0:store.code);},[selectedLocation,store]);return React.createElement("div",{className:selectLocationButtonWrapper},React.createElement(RippleButton,{onClick:handleClick,className:selectLocationButton.toString(),disabled:isLoading||(store===null||store===void 0?void 0:store.isComingSoon)||isSelected},i18n.text((store===null||store===void 0?void 0:store.isComingSoon)?'location.comingSoon':'locations.select_location')));};
5
+ */export var StoreFinderSelectLocationButton=function StoreFinderSelectLocationButton(){var store=useContext(StoreContext);var _useContext=useContext(StoreFinderContext),selectLocation=_useContext.selectLocation,isLoading=_useContext.isLoading;var handleClick=useCallback(function(e){e.stopPropagation();selectLocation(store);},[selectLocation,store]);return React.createElement("div",{className:selectLocationButtonWrapper},React.createElement(RippleButton,{onClick:handleClick,className:selectLocationButton.toString(),disabled:isLoading||(store===null||store===void 0?void 0:store.isComingSoon)},i18n.text('locations.select_location')));};
@@ -0,0 +1,3 @@
1
+ import React,{useContext,useMemo}from'react';import{i18n}from'@shopgate/engage/core';import{StoreFinderContext}from"../../locations.context";import{container}from"./StoreFinderStoresNear.style";/**
2
+ * @returns {JSX}
3
+ */var StoreFinderStoresNear=function StoreFinderStoresNear(){var _useContext=useContext(StoreFinderContext),userSearch=_useContext.userSearch,locations=_useContext.locations;var hasZipCode=!!(userSearch===null||userSearch===void 0?void 0:userSearch.postalCode);var hasGeolocation=!!(userSearch===null||userSearch===void 0?void 0:userSearch.geolocation);var text=useMemo(function(){if(hasZipCode){return i18n.text('locations.stores_near.zip_code',{zipCode:userSearch.postalCode});}if(hasGeolocation){return i18n.text('locations.stores_near.location');}return'';},[hasGeolocation,hasZipCode,userSearch.postalCode]);if(!hasZipCode&&!hasGeolocation||locations.length===0){return React.createElement("div",{className:container});}return React.createElement("div",{className:container},text);};export default StoreFinderStoresNear;
@@ -0,0 +1 @@
1
+ import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var variables=themeConfig.variables;export var container=css({fontSize:'1.125rem',fontWeight:500,color:'var(--color-text-high-emphasis)',padding:"0 ".concat(variables.gap.big,"px ").concat(variables.gap.small,"px ").concat(variables.gap.big,"px")});
@@ -1 +1 @@
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{css}from'glamor';import{themeVariables,themeColors}from'@shopgate/pwa-common/helpers/config';import{responsiveMediaQuery}from'@shopgate/engage/styles';var gap=themeVariables.gap;var baseCardPadding="".concat(gap.small,"px ").concat(gap.big,"px");var gapM=gap.small+gap.xsmall;export var stores=css({background:"var(--color-background-accent, ".concat(themeColors.background,")"),padding:"".concat(gapM,"px ").concat(gapM,"px ").concat(gap.big,"px"),fontSize:'0.875rem',boxShadow:'inset rgba(0, 0, 0, .117647) 0 1px 6px, inset rgba(0, 0, 0, .117647) 0 1px 4px'}).toString();export var storeCard=css({background:themeColors.light,marginBottom:gapM,':last-of-type':{marginBottom:0},border:"1px solid ".concat(themeColors.shade7),boxSizing:'border-box',boxShadow:'0px 1px 2px rgba(0, 0, 0, 0.25)',borderRadius:'0px 0px 3px 3px'}).toString();export var storeCardPlaceholder=css({margin:'10px 0',height:36}).toString();export var storeHeader=css({cursor:'pointer',padding:"".concat(baseCardPadding," ").concat(gap.xsmall,"px")}).toString();export var disabled=css({cursor:'not-allowed'}).toString();export var storeName=css({fontSize:'1rem',fontWeight:500}).toString();export var storeDistance=css(_defineProperty({whiteSpace:'nowrap',color:"var(--color-text-medium-emphasis, ".concat(themeColors.gray,")")},responsiveMediaQuery('>sm',{webOnly:true}),{fontSize:'0.875rem'})).toString();export var storeDetailsBody=css({padding:baseCardPadding,borderTop:"1px solid ".concat(themeColors.shade7)}).toString();export var storeDetailsAccordion=css({justifyContent:'space-between'}).toString();export var storeHoursToday=css({color:"var(--color-text-low-emphasis, ".concat(themeColors.gray,")")}).toString();export var address=css({display:'flex',flexFlow:'row nowrap',color:"var(--color-text-low-emphasis, ".concat(themeColors.gray,")"),marginBottom:4}).toString();export var addressIcon=css({color:themeColors.shade7,fontSize:'1.4rem',padding:"".concat(gap.xsmall,"px ").concat(gap.big,"px 0 0")}).toString();export var detailsIcon=css({color:themeColors.shade3,fontSize:'1.4rem',padding:"".concat(gap.xsmall,"px ").concat(gap.big,"px 0 0")}).toString();export var detailsIconLinked=css({color:'var(--color-primary)'}).toString();export var detailsLine=css({marginTop:gapM}).toString();export var details=css({paddingTop:gap.xsmall}).toString();export var openingHours=css({display:'table',color:'var(--color-text-low-emphasis)'}).toString();export var openingHoursRow=css({display:'table-row'}).toString();export var openingHoursDay=css({display:'table-cell',paddingRight:gap.big}).toString();export var detailsPrimary=css({color:"var(--color-primary, ".concat(themeColors.primary,")"),lineHeight:'1.375rem'}).toString();export var detailsSecondary=css({color:"var(--color-text-medium-emphasis, ".concat(themeColors.shade3,")"),fontSize:'0.75rem'}).toString();export var selectLocationButtonWrapper=css({padding:"0 ".concat(gap.big,"px ").concat(gap.small,"px ").concat(gap.big,"px")});export var stockInfoContainer=css({marginTop:8,':empty':{display:'none'}});export var selectLocationButton=css({width:'100%',fontSize:'.875rem !important',':not(:disabled)':{background:"var(--color-primary, ".concat(themeColors.primary,")!important"),color:"var(--color-primary-contrast, ".concat(themeColors.primaryContrast,")!important")}});
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{css}from'glamor';import{themeVariables,themeColors}from'@shopgate/pwa-common/helpers/config';import{responsiveMediaQuery}from'@shopgate/engage/styles';var gap=themeVariables.gap;var baseCardPadding="".concat(gap.small,"px ").concat(gap.big,"px");var gapM=gap.small+gap.xsmall;export var stores=css(_defineProperty({background:"var(--color-background-accent, ".concat(themeColors.background,")"),padding:"".concat(gapM,"px ").concat(gapM,"px ").concat(gap.big,"px"),fontSize:'0.875rem'},responsiveMediaQuery('<=sm'),{boxShadow:'inset rgba(0, 0, 0, .117647) 0 1px 6px, inset rgba(0, 0, 0, .117647) 0 1px 4px'})).toString();export var storeCard=css({background:themeColors.light,marginBottom:gapM,':last-of-type':{marginBottom:0},border:"1px solid ".concat(themeColors.shade7),boxSizing:'border-box',boxShadow:'0px 1px 2px rgba(0, 0, 0, 0.25)',borderRadius:'0px 0px 3px 3px'}).toString();export var storeCardPlaceholder=css({margin:'10px 0',height:36}).toString();export var storeHeader=css({cursor:'pointer',padding:"".concat(baseCardPadding," ").concat(gap.xsmall,"px")}).toString();export var disabled=css({cursor:'not-allowed'}).toString();export var storeName=css({fontSize:'1rem',fontWeight:500}).toString();export var storeDistance=css(_defineProperty({whiteSpace:'nowrap',color:"var(--color-text-medium-emphasis, ".concat(themeColors.gray,")")},responsiveMediaQuery('>sm',{webOnly:true}),{fontSize:'0.875rem'})).toString();export var storeDetailsBody=css({padding:baseCardPadding,borderTop:"1px solid ".concat(themeColors.shade7)}).toString();export var storeDetailsAccordion=css({justifyContent:'space-between'}).toString();export var storeHoursToday=css({color:themeColors.gray}).toString();export var address=css({display:'flex',flexFlow:'row nowrap',color:themeColors.gray,marginBottom:4}).toString();export var addressIcon=css({color:themeColors.shade11,fontSize:'1.4rem',padding:"".concat(gap.xsmall,"px ").concat(gap.big,"px 0 0")}).toString();export var detailsIcon=css({color:themeColors.shade11,fontSize:'1.4rem',padding:"".concat(gap.xsmall,"px ").concat(gap.big,"px 0 0")}).toString();export var detailsIconLinked=css({color:'var(--color-primary)'}).toString();export var detailsLine=css({marginTop:gapM}).toString();export var details=css({paddingTop:gap.xsmall}).toString();export var openingHours=css({display:'table',color:themeColors.shade11}).toString();export var openingHoursRow=css({display:'table-row'}).toString();export var openingHoursDay=css({display:'table-cell',paddingRight:gap.big}).toString();export var detailsPrimary=css({color:"var(--color-primary, ".concat(themeColors.primary,")"),lineHeight:'1.375rem'}).toString();export var detailsSecondary=css({color:"var(--color-text-medium-emphasis, ".concat(themeColors.shade11,")"),fontSize:'0.75rem'}).toString();export var selectLocationButtonWrapper=css(_defineProperty({padding:"0 ".concat(gap.big,"px ").concat(gap.small,"px ").concat(gap.big,"px")},responsiveMediaQuery('>=sm',{webOnly:true}),{padding:"0 0 ".concat(gap.small,"px 0")}));export var stockInfoContainer=css({marginTop:8,':empty':{display:'none'}});export var selectLocationButton=css({width:'100%',fontSize:'.875rem !important',':not(:disabled)':{background:"var(--color-primary, ".concat(themeColors.primary,")!important"),color:"var(--color-primary-contrast, ".concat(themeColors.primaryContrast,")!important")}});
@@ -1,5 +1,5 @@
1
- import*as React from'react';import PropTypes from'prop-types';import{StoreContext}from"./Store.context";import{FulfillmentContext}from"../../locations.context";import{StockInfo}from"../StockInfo";import{LocationIcon}from"../../../components";import{i18n}from"../../../core";import{address as container,addressIcon,stockInfoContainer}from"./Store.style";/**
1
+ import*as React from'react';import{ResponsiveContainer}from'@shopgate/engage/components';import{StoreContext}from"./Store.context";import{FulfillmentContext}from"../../locations.context";import{StockInfo}from"../StockInfo";import{LocationIcon}from"../../../components";import{i18n}from"../../../core";import{address as container,addressIcon,stockInfoContainer}from"./Store.style";/**
2
2
  * Renders the pickup location's address information.
3
3
  * @param {Object} props The component props.
4
4
  * @returns {JSX}
5
- */export function StoreAddress(_ref){var address=_ref.address,pure=_ref.pure;var store=React.useContext(StoreContext);var _React$useContext=React.useContext(FulfillmentContext),product=_React$useContext.product;if(!address){return null;}var addressContent=React.createElement("div",null,React.createElement("div",{"data-test-id":"street"},address.street),address.street2&&address.street2!==''&&React.createElement("div",{"data-test-id":"street2"},address.street2),address.street3&&address.street3!==''&&React.createElement("div",{"data-test-id":"street3"},address.street3),address.street4&&address.street4!==''&&React.createElement("div",{"data-test-id":"street4"},address.street4),i18n.text('locations.address',address));if(pure){return addressContent;}return React.createElement("div",{className:container},React.createElement("div",{className:addressIcon},React.createElement(LocationIcon,null)),React.createElement("div",null,addressContent,product&&React.createElement("div",{className:stockInfoContainer},React.createElement(StockInfo,{location:store,product:product,showStoreName:false}))));}StoreAddress.defaultProps={address:null,pure:false};
5
+ */export function StoreAddress(_ref){var address=_ref.address,pure=_ref.pure;var store=React.useContext(StoreContext);var _React$useContext=React.useContext(FulfillmentContext),product=_React$useContext.product;if(!address){return null;}var addressContent=React.createElement("div",null,React.createElement("div",{"data-test-id":"street"},address.street),address.street2&&address.street2!==''&&React.createElement("div",{"data-test-id":"street2"},address.street2),address.street3&&address.street3!==''&&React.createElement("div",{"data-test-id":"street3"},address.street3),address.street4&&address.street4!==''&&React.createElement("div",{"data-test-id":"street4"},address.street4),i18n.text('locations.address',address));if(pure){return addressContent;}return React.createElement("div",{className:container},React.createElement("div",{className:addressIcon,"aria-hidden":true},React.createElement(LocationIcon,null)),React.createElement("div",null,addressContent,React.createElement(ResponsiveContainer,{breakpoint:"<sm",appAlways:true},React.createElement("div",{className:stockInfoContainer},React.createElement(StockInfo,{location:store,product:product,showStoreName:false})))));}StoreAddress.defaultProps={address:null,pure:false};
@@ -1,5 +1,5 @@
1
- import React,{Fragment,useMemo}from'react';import{i18n,generateGoogleMapsDirectionsUrl}from'@shopgate/engage/core';import{LocationIcon,Link,Ellipsis,I18n}from'@shopgate/engage//components';import PropTypes from'prop-types';import{StoreDetailsLine}from"./StoreDetailsLine";import{detailsPrimary,detailsSecondary}from"./Store.style";/**
1
+ import React,{Fragment,useMemo}from'react';import{i18n,generateGoogleMapsDirectionsUrl}from'@shopgate/engage/core';import{LocationIcon,Link,Ellipsis,I18n}from'@shopgate/engage/components';import{StoreDetailsLine}from"./StoreDetailsLine";import{detailsPrimary,detailsSecondary}from"./Store.style";/**
2
2
  * Renders the pickup location's address information.
3
3
  * @param {Object} props The component props.
4
4
  * @returns {JSX}
5
- */export function StoreAddressShort(_ref){var address=_ref.address,showFull=_ref.showFull;var mapsUrl=useMemo(function(){return address&&generateGoogleMapsDirectionsUrl(address);},[address]);if(!address){return null;}return React.createElement(Link,{target:"_blank",href:mapsUrl},React.createElement(StoreDetailsLine,{icon:LocationIcon,linked:true},showFull&&React.createElement(Fragment,null,React.createElement("div",{className:detailsPrimary},address.street),address.street2&&address.street2!==''&&React.createElement("div",{className:detailsPrimary},address.street2),address.street3&&address.street3!==''&&React.createElement("div",{className:detailsPrimary},address.street3),address.street4&&address.street4!==''&&React.createElement("div",{className:detailsPrimary},address.street4)),React.createElement(Ellipsis,{rows:1,className:detailsPrimary},i18n.text('locations.address',address)),React.createElement(I18n.Text,{string:"locations.map_open",className:detailsSecondary})));}StoreAddressShort.defaultProps={address:null,showFull:false};
5
+ */export function StoreAddressShort(_ref){var address=_ref.address,showFull=_ref.showFull;var mapsUrl=useMemo(function(){return address&&generateGoogleMapsDirectionsUrl(address);},[address]);if(!address){return null;}var addressLabel="".concat(address.street+(address.street2&&address.street2!==''?", ".concat(address.street2):'')+(address.street3&&address.street3!==''?", ".concat(address.street3):'')+(address.street4&&address.street4!==''?", ".concat(address.street4):'')+i18n.text('locations.address',address),": ").concat(i18n.text('locations.map_open'));return React.createElement(Link,{target:"_blank",href:mapsUrl,role:"button","aria-label":addressLabel},React.createElement(StoreDetailsLine,{icon:LocationIcon,linked:true},showFull&&React.createElement(Fragment,null,React.createElement("div",{className:detailsPrimary},address.street),address.street2&&address.street2!==''&&React.createElement("div",{className:detailsPrimary},address.street2),address.street3&&address.street3!==''&&React.createElement("div",{className:detailsPrimary},address.street3),address.street4&&address.street4!==''&&React.createElement("div",{className:detailsPrimary},address.street4)),React.createElement(Ellipsis,{rows:1,className:detailsPrimary},i18n.text('locations.address',address)),React.createElement(I18n.Text,{string:"locations.map_open",className:detailsSecondary})));}StoreAddressShort.defaultProps={address:null,showFull:false};
@@ -1,4 +1,4 @@
1
- import React,{useContext,Fragment}from'react';import{StoreContext}from"./Store.context";import{StoreHeader}from"./StoreHeader";import{StoreDetails}from"./StoreDetails";import{StoreSelectLocationButton}from"./StoreSelectLocationButton";/**
1
+ import React,{useContext,Fragment}from'react';import{ResponsiveContainer}from'@shopgate/engage/components';import{StoreContext}from"./Store.context";import{StoreHeader}from"./StoreHeader";import{StoreDetails}from"./StoreDetails";import{StoreSelectLocationButton}from"./StoreSelectLocationButton";/**
2
2
  * Renders the store's card.
3
3
  * @returns {JSX}
4
- */export function StoreCard(){var store=useContext(StoreContext);if(!store||!store.address){return null;}return React.createElement(Fragment,null,React.createElement(StoreHeader,null),React.createElement(StoreDetails,null),React.createElement(StoreSelectLocationButton,null));}
4
+ */export function StoreCard(){var store=useContext(StoreContext);if(!store||!store.address){return null;}return React.createElement(Fragment,null,React.createElement(StoreHeader,null),React.createElement(StoreDetails,null),React.createElement(ResponsiveContainer,{breakpoint:"<sm",appAlways:true},React.createElement(StoreSelectLocationButton,null)));}
@@ -1,4 +1,4 @@
1
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*as React from'react';import classNames from'classnames';import{Grid}from'@shopgate/engage/components';import{detailsLine,detailsIcon,detailsIconLinked,details}from"./Store.style";/**
2
2
  * Renders a single store headline.
3
3
  * @returns {JSX}
4
- */export function StoreDetailsLine(_ref){var Icon=_ref.icon,children=_ref.children,linked=_ref.linked;return React.createElement(Grid,{className:detailsLine},React.createElement(Grid.Item,{shrink:0,className:classNames(detailsIcon,_defineProperty({},detailsIconLinked,linked))},React.createElement(Icon,null)),React.createElement(Grid.Item,{grow:1,className:details},children));}StoreDetailsLine.defaultProps={linked:false};
4
+ */export function StoreDetailsLine(_ref){var Icon=_ref.icon,children=_ref.children,linked=_ref.linked;return React.createElement(Grid,{className:detailsLine},React.createElement(Grid.Item,{shrink:0,className:classNames(detailsIcon,_defineProperty({},detailsIconLinked,linked))},React.createElement(Icon,{"aria-hidden":true})),React.createElement(Grid.Item,{grow:1,className:details},children));}StoreDetailsLine.defaultProps={linked:false};