@shopgate/engage 7.23.9 → 7.23.11-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.
@@ -3,4 +3,4 @@ function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj
3
3
  * @returns {JSX}
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,toggleEditMode=context.toggleEditMode,isEditable=context.isEditable;var portalProps=useMemo(function(){return _extends({},context,{isOrderDetails:isOrderDetails,isCheckoutConfirmation:isCheckoutConfirmation,quantity:cartItem.quantity});},[cartItem.quantity,context,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(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}));}
@@ -1,5 +1,5 @@
1
1
  /** @module core */import{getCurrentRoute as getCurrentRouteHelper,router,history,parseQueryStringToObject,parseObjectToQueryString}from'@shopgate/pwa-common/helpers/router';export*from"./environment";export*from"./appFeatures";export*from"./appPermissions";export*from"./baseUrl";export*from"./bridge";export{isBeta}from"../config/isBeta";export{getFullImageSource}from"./getFullImageSource";export{getImageFormat}from"./getImageFormat";export{i18n,getWeekDaysOrder}from"./i18n";export{updateLegacyNavigationBar}from"./updateLegacyNavigationBar";export{default as nl2br}from"./nl2br";export*from"./string";export{isIOSTheme}from"./isIOSTheme";export{isTouchDevice}from"./isTouchDevice";export{generateGoogleMapsDirectionsUrl}from"./googleMaps";export{useScrollContainer}from"./scrollContainer";export{getDeviceTypeForCms}from"./deviceType";export*from"./featureFlag";// --------------- CORE --------------- //
2
- export{logger,ajaxUrl,hasSGJavaScriptBridge,useBrowserConnector,hasWebBridgeCore,logDeprecationMessage}from'@shopgate/pwa-core/helpers';export{default as logGroup}from'@shopgate/pwa-core/helpers/logGroup';export*from'@shopgate/pwa-core/helpers/version';export*from'@shopgate/pwa-common/helpers/data';export*from'@shopgate/pwa-common/helpers/date';export*from'@shopgate/pwa-common/helpers/dom';export{env,isDev,isProd,isRemote,isStaging}from'@shopgate/pwa-common/helpers/environment';export{default as decodeHTML}from'@shopgate/pwa-common/helpers/html/decodeHTML';export*from'@shopgate/pwa-common/helpers/html/handleDOM';export{default as parseHTML}from'@shopgate/pwa-common/helpers/html/parseHTML';export{default as getTranslator}from'@shopgate/pwa-common/helpers/i18n/getTranslator';export{default as getPriceFormatter}from'@shopgate/pwa-common/helpers/i18n/getPriceFormatter';export{default as getDateFormatter}from'@shopgate/pwa-common/helpers/i18n/getDateFormatter';export{default as getTimeFormatter}from'@shopgate/pwa-common/helpers/i18n/getTimeFormatter';export{default as getNumberFormatter}from'@shopgate/pwa-common/helpers/i18n/getNumberFormatter';export*from'@shopgate/pwa-common/helpers/legacy';// TODO: Can only be exported once the theme uses it. causes issues with the custom routes feature.
2
+ export{logger,ajaxUrl,hasSGJavaScriptBridge,useBrowserConnector,hasWebBridgeCore,logDeprecationMessage}from'@shopgate/pwa-core/helpers';export{default as logGroup}from'@shopgate/pwa-core/helpers/logGroup';export*from'@shopgate/pwa-core/helpers/version';export*from'@shopgate/pwa-common/helpers/data';export*from'@shopgate/pwa-common/helpers/date';export*from'@shopgate/pwa-common/helpers/dom';export{env,isDev,isProd,isRemote,isStaging,isWindows}from'@shopgate/pwa-common/helpers/environment';export{default as decodeHTML}from'@shopgate/pwa-common/helpers/html/decodeHTML';export*from'@shopgate/pwa-common/helpers/html/handleDOM';export{default as parseHTML}from'@shopgate/pwa-common/helpers/html/parseHTML';export{default as getTranslator}from'@shopgate/pwa-common/helpers/i18n/getTranslator';export{default as getPriceFormatter}from'@shopgate/pwa-common/helpers/i18n/getPriceFormatter';export{default as getDateFormatter}from'@shopgate/pwa-common/helpers/i18n/getDateFormatter';export{default as getTimeFormatter}from'@shopgate/pwa-common/helpers/i18n/getTimeFormatter';export{default as getNumberFormatter}from'@shopgate/pwa-common/helpers/i18n/getNumberFormatter';export*from'@shopgate/pwa-common/helpers/legacy';// TODO: Can only be exported once the theme uses it. causes issues with the custom routes feature.
3
3
  /*
4
4
  export { default as portalCollection } from '@shopgate/pwa-common/helpers/portals/portalCollection';
5
5
  export { default as routePortals } from '@shopgate/pwa-common/helpers/portals/routePortals';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopgate/engage",
3
- "version": "7.23.9",
3
+ "version": "7.23.11-beta.1",
4
4
  "description": "Shopgate's ENGAGE library.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Shopgate <support@shopgate.com>",
@@ -16,12 +16,12 @@
16
16
  ],
17
17
  "dependencies": {
18
18
  "@shopgate/native-modules": "1.0.0-beta.18",
19
- "@shopgate/pwa-common": "7.23.9",
20
- "@shopgate/pwa-common-commerce": "7.23.9",
21
- "@shopgate/pwa-core": "7.23.9",
22
- "@shopgate/pwa-ui-ios": "7.23.9",
23
- "@shopgate/pwa-ui-material": "7.23.9",
24
- "@shopgate/pwa-ui-shared": "7.23.9",
19
+ "@shopgate/pwa-common": "7.23.11-beta.1",
20
+ "@shopgate/pwa-common-commerce": "7.23.11-beta.1",
21
+ "@shopgate/pwa-core": "7.23.11-beta.1",
22
+ "@shopgate/pwa-ui-ios": "7.23.11-beta.1",
23
+ "@shopgate/pwa-ui-material": "7.23.11-beta.1",
24
+ "@shopgate/pwa-ui-shared": "7.23.11-beta.1",
25
25
  "@stripe/react-stripe-js": "^1.16.5",
26
26
  "@stripe/stripe-js": "^1.3.1",
27
27
  "@virtuous/conductor": "~2.5.0",
@@ -1,2 +1,3 @@
1
- import{css}from'glamor';import{useScrollContainer,hasWebBridge,isIOSTheme}from'@shopgate/engage/core';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var typography=themeConfig.typography;var iosThemeActive=isIOSTheme();css.global('*, *:before, *:after',{boxSizing:'border-box'});css.global('*',{touchAction:'manipulation'});css.global('::-moz-focus-inner',{border:0});css.global('html, body',{WebkitTapHighlightColor:'transparent',width:'100%',height:'100%'});css.global('html',{overflow:useScrollContainer()?'hidden':'inherit',MozOsxFontSmoothing:'grayscale',WebkitFontSmoothing:'antialiased',MsTextSizeAdjust:'100%',WebkitTextSizeAdjust:'100%',minHeight:'100%'});css.global('body',{font:"".concat(typography.rootSize,"px/").concat(typography.lineHeight," ").concat(typography.family),overflow:'auto',margin:0,WebkitOverflowScrolling:'touch',WebkitUserSelect:hasWebBridge()?'inherit':'none',userSelect:hasWebBridge()?'inherit':'none',color:'var(--color-text-high-emphasis)'});css.global('[data-pattern]',{height:'100% !important'});css.global('html, body',{backgroundColor:'var(--page-background-color)'});if(hasWebBridge()&&!iosThemeActive){css.insert("@media(min-width: 600px) {\n html, body {\n background-color: var(--color-background-gutter-body, var(--page-background-color))\n }\n }");}// since iOS 15 button has a default color of blue rgb(0, 122, 255);
1
+ var _typography$family;import{css}from'glamor';import{useScrollContainer,hasWebBridge,isIOSTheme,isWindows,isDev}from'@shopgate/engage/core/helpers';import{themeConfig}from'@shopgate/engage';var typography=themeConfig.typography;var iosThemeActive=isIOSTheme();css.global('*, *:before, *:after',{boxSizing:'border-box'});css.global('*',{touchAction:'manipulation'});css.global('::-moz-focus-inner',{border:0});css.global('html, body',{WebkitTapHighlightColor:'transparent',width:'100%',height:'100%'});css.global('html',{overflow:useScrollContainer()?'hidden':'inherit',MozOsxFontSmoothing:'grayscale',WebkitFontSmoothing:'antialiased',MsTextSizeAdjust:'100%',WebkitTextSizeAdjust:'100%',minHeight:'100%'});// Include Roboto font on Windows in dev mode on iOS theme, so that developers see nice fonts.
2
+ var fontSuffix=isDev&&iosThemeActive&&isWindows&&!((_typography$family=typography.family)!==null&&_typography$family!==void 0?_typography$family:'').includes('Roboto')?', Roboto':'';css.global('body',{font:"".concat(typography.rootSize,"px/").concat(typography.lineHeight," ").concat(typography.family).concat(fontSuffix),overflow:'auto',margin:0,WebkitOverflowScrolling:'touch',WebkitUserSelect:hasWebBridge()?'inherit':'none',userSelect:hasWebBridge()?'inherit':'none',color:'var(--color-text-high-emphasis)'});css.global('[data-pattern]',{height:'100% !important'});css.global('html, body',{backgroundColor:'var(--page-background-color)'});if(hasWebBridge()&&!iosThemeActive){css.insert("@media(min-width: 600px) {\n html, body {\n background-color: var(--color-background-gutter-body, var(--page-background-color))\n }\n }");}// since iOS 15 button has a default color of blue rgb(0, 122, 255);
2
3
  css.global('button',{color:'inherit'});