@shopgate/engage 7.28.0 → 7.29.0-alpha.10

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 (167) hide show
  1. package/category/components/CategoryImage/index.js +1 -1
  2. package/category/components/CategoryList/index.js +7 -3
  3. package/category/components/CategoryList/style.js +1 -1
  4. package/components/ResponsiveContainer/breakpoints.js +2 -2
  5. package/components/SheetList/components/Item/index.js +7 -7
  6. package/components/Typography/Typography.d.ts +132 -0
  7. package/components/Typography/Typography.js +11 -0
  8. package/components/Typography/index.js +1 -0
  9. package/components/View/components/Content/index.js +4 -1
  10. package/components/View/components/Content/style.js +1 -1
  11. package/components/View/context.js +1 -1
  12. package/components/index.js +2 -2
  13. package/core/constants/index.js +8 -2
  14. package/core/constants/merchantSettings.js +1 -1
  15. package/core/constants/shopSettings.js +1 -1
  16. package/core/contexts/ThemeResourcesContext.d.ts +10 -1
  17. package/core/contexts/ThemeResourcesContext.js +1 -1
  18. package/core/helpers/scrollContainer.js +2 -2
  19. package/core/hocs/withThemeResources.js +4 -1
  20. package/core/hooks/events/index.js +1 -1
  21. package/core/hooks/events/useLongPress.js +1 -1
  22. package/core/hooks/events/usePressHandler.js +38 -0
  23. package/core/hooks/useThemeResources.js +6 -5
  24. package/core/providers/ThemeResourcesProvider.js +9 -5
  25. package/core/reducers/merchantSettings.js +1 -1
  26. package/core/reducers/shopSettings.js +1 -1
  27. package/core/selectors/index.js +1 -1
  28. package/core/selectors/merchantSettings.js +5 -2
  29. package/core/selectors/shopSettings.js +5 -2
  30. package/development/action-creators/settings.js +6 -2
  31. package/development/components/ClientInformation/ClientInformation.js +5 -0
  32. package/development/components/ClientInformation/actions.js +4 -0
  33. package/development/components/ClientInformation/index.js +1 -0
  34. package/development/components/DevelopmentSettings/DevelopmentSettings.js +9 -0
  35. package/development/components/DevelopmentSettings/index.js +1 -0
  36. package/development/components/DevelopmentTools/hooks.js +2 -2
  37. package/development/components/index.js +1 -1
  38. package/development/constants/actionTypes.js +1 -1
  39. package/development/reducers/settings.js +3 -3
  40. package/development/selectors/settings.js +4 -1
  41. package/locations/subscriptions.js +2 -2
  42. package/package.json +9 -7
  43. package/page/action-creators/index.js +22 -0
  44. package/page/components/ResponsiveWidgetImage/ResponsiveWidgetImage.js +7 -0
  45. package/page/components/ResponsiveWidgetImage/index.js +1 -0
  46. package/page/components/WidgetHeadline/WidgetHeadline.js +7 -0
  47. package/page/components/WidgetHeadline/index.js +1 -0
  48. package/page/components/WidgetRichText/WidgetRichText.js +6 -0
  49. package/page/components/WidgetRichText/index.js +1 -0
  50. package/page/components/Widgets/Overlay.js +51 -0
  51. package/page/components/Widgets/Tooltip.js +22 -0
  52. package/page/components/Widgets/Widget.js +17 -0
  53. package/page/components/Widgets/WidgetContext.d.ts +42 -0
  54. package/page/components/Widgets/WidgetContext.js +9 -0
  55. package/page/components/Widgets/WidgetProvider.js +8 -0
  56. package/page/components/Widgets/Widgets.js +11 -0
  57. package/page/components/Widgets/WidgetsPreviewContext.js +9 -0
  58. package/page/components/Widgets/WidgetsPreviewProvider.js +8 -0
  59. package/page/components/Widgets/constants.js +4 -0
  60. package/page/components/Widgets/events.js +23 -0
  61. package/page/components/Widgets/helpers.js +23 -0
  62. package/page/components/Widgets/hooks.js +69 -0
  63. package/page/components/Widgets/index.js +1 -0
  64. package/page/components/Widgets/types.d.ts +132 -0
  65. package/page/components/index.js +1 -1
  66. package/page/constants/actionTypes.js +1 -0
  67. package/page/constants/index.js +5 -1
  68. package/page/helpers/index.d.ts +55 -0
  69. package/page/helpers/index.js +17 -0
  70. package/page/hooks/index.d.ts +60 -0
  71. package/page/hooks/index.js +37 -0
  72. package/page/index.js +1 -2
  73. package/page/reducers/index.js +15 -0
  74. package/page/selectors/index.js +56 -2
  75. package/page/subscriptions/index.js +4 -0
  76. package/page/widgets/CategoryList/CategoryList.js +4 -0
  77. package/page/widgets/CategoryList/hooks.js +16 -0
  78. package/page/widgets/CategoryList/index.js +1 -0
  79. package/page/widgets/CategoryList/selectors.js +8 -0
  80. package/page/widgets/HTML/HTML.js +5 -0
  81. package/page/widgets/HTML/hooks.js +12 -0
  82. package/page/widgets/HTML/index.js +1 -0
  83. package/page/widgets/Headline/Headline.js +4 -0
  84. package/page/widgets/Headline/index.js +1 -0
  85. package/page/widgets/HeroBanner/HeroBanner.js +3 -0
  86. package/page/widgets/HeroBanner/hooks.js +14 -0
  87. package/page/widgets/HeroBanner/index.js +1 -0
  88. package/page/widgets/Image/Image.js +4 -0
  89. package/page/widgets/Image/hooks.js +19 -0
  90. package/page/widgets/Image/index.js +1 -0
  91. package/page/widgets/ImageRow/ImageRow.js +4 -0
  92. package/page/widgets/ImageRow/hooks.js +15 -0
  93. package/page/widgets/ImageRow/index.js +1 -0
  94. package/page/widgets/ImageSlider/ImageSlider.js +4 -0
  95. package/page/widgets/ImageSlider/hooks.js +33 -0
  96. package/page/widgets/ImageSlider/index.js +1 -0
  97. package/page/widgets/Placeholder/Placeholder.js +5 -0
  98. package/page/widgets/Placeholder/hooks.js +12 -0
  99. package/page/widgets/Placeholder/index.js +1 -0
  100. package/page/widgets/ProductList/ProductList.js +5 -0
  101. package/page/widgets/ProductList/hooks.js +21 -0
  102. package/page/widgets/ProductList/index.js +1 -0
  103. package/page/widgets/ProductSlider/ProductSlider.js +5 -0
  104. package/page/widgets/ProductSlider/hooks.js +24 -0
  105. package/page/widgets/ProductSlider/index.js +1 -0
  106. package/page/widgets/RichText/RichText.js +3 -0
  107. package/page/widgets/RichText/hooks.js +10 -0
  108. package/page/widgets/RichText/index.js +1 -0
  109. package/page/widgets/index.js +1 -0
  110. package/page/widgets/widgets.json +35 -0
  111. package/product/components/ProductCard/index.js +1 -1
  112. package/product/components/ProductGrid/components/Item/components/ItemDetails/index.js +8 -0
  113. package/product/components/ProductGrid/components/Item/components/ItemDetails/spec.js +1 -0
  114. package/product/components/ProductGrid/components/Item/components/ItemDiscount/index.js +5 -0
  115. package/product/components/ProductGrid/components/Item/components/ItemFavoritesButton/index.js +5 -0
  116. package/product/components/ProductGrid/components/Item/components/ItemFavoritesButton/spec.js +1 -0
  117. package/product/components/ProductGrid/components/Item/components/ItemImage/index.js +5 -0
  118. package/product/components/ProductGrid/components/Item/components/ItemImage/spec.js +1 -0
  119. package/product/components/ProductGrid/components/Item/components/ItemName/index.js +5 -0
  120. package/product/components/ProductGrid/components/Item/components/ItemName/spec.js +1 -0
  121. package/product/components/ProductGrid/components/Item/components/ItemPrice/index.js +5 -0
  122. package/product/components/ProductGrid/components/Item/components/ItemPrice/spec.js +1 -0
  123. package/product/components/ProductGrid/components/Item/index.js +7 -0
  124. package/product/components/ProductGrid/components/Iterator/index.js +5 -0
  125. package/product/components/ProductGrid/components/Layout/index.js +5 -0
  126. package/product/components/ProductGrid/index.js +22 -0
  127. package/product/components/ProductGrid/spec.js +1 -0
  128. package/product/components/ProductGridPrice/index.js +1 -1
  129. package/product/components/ProductSlider/index.js +4 -4
  130. package/product/components/index.js +1 -1
  131. package/styles/helpers/color.js +23 -0
  132. package/styles/helpers/index.js +1 -1
  133. package/styles/helpers/setPageBackgroundColor.js +2 -2
  134. package/styles/index.d.ts +17 -0
  135. package/styles/index.js +1 -1
  136. package/styles/theme/createTheme/createBreakpoints.d.ts +114 -0
  137. package/styles/theme/createTheme/createBreakpoints.js +41 -0
  138. package/styles/theme/createTheme/createPalette.d.ts +36 -0
  139. package/styles/theme/createTheme/createPalette.js +4 -0
  140. package/styles/theme/createTheme/createSpacing.d.ts +23 -0
  141. package/styles/theme/createTheme/createSpacing.js +14 -0
  142. package/styles/theme/createTheme/createTypography.d.ts +55 -0
  143. package/styles/theme/createTheme/createTypography.js +23 -0
  144. package/styles/theme/createTheme/index.d.ts +41 -0
  145. package/styles/theme/createTheme/index.js +5 -0
  146. package/styles/theme/createTheme/transitions.d.ts +100 -0
  147. package/styles/theme/createTheme/transitions.js +26 -0
  148. package/styles/theme/createTheme/zIndex.d.ts +12 -0
  149. package/styles/theme/createTheme/zIndex.js +3 -0
  150. package/styles/theme/hooks/index.d.ts +4 -0
  151. package/styles/theme/hooks/index.js +1 -0
  152. package/styles/theme/hooks/useActiveBreakpoint.d.ts +18 -0
  153. package/styles/theme/hooks/useActiveBreakpoint.js +4 -0
  154. package/styles/theme/hooks/useMediaQuery.d.ts +33 -0
  155. package/styles/theme/hooks/useMediaQuery.js +20 -0
  156. package/styles/theme/hooks/useResponsiveValue.d.ts +27 -0
  157. package/styles/theme/hooks/useResponsiveValue.js +4 -0
  158. package/styles/theme/hooks/useTheme.d.ts +8 -0
  159. package/styles/theme/hooks/useTheme.js +4 -0
  160. package/styles/theme/index.d.ts +8 -0
  161. package/styles/theme/index.js +1 -0
  162. package/styles/theme/providers/ActiveBreakpointProvider.d.ts +21 -0
  163. package/styles/theme/providers/ActiveBreakpointProvider.js +13 -0
  164. package/styles/theme/providers/ThemeProvider.d.ts +18 -0
  165. package/styles/theme/providers/ThemeProvider.js +7 -0
  166. package/styles/tss/index.js +3 -0
  167. package/tracking/selectors/cookieConsent.js +2 -2
@@ -1,5 +1,5 @@
1
1
  function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance");}function _iterableToArrayLimit(arr,i){var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}import React,{useState,useCallback}from'react';import PropTypes from'prop-types';import{Image}from'@shopgate/engage/components';import connect from"./connector";/**
2
2
  * The CategoryImage component
3
3
  * @param {Object} props The component props.
4
- * @returns {JSX}
4
+ * @returns {JSX.Element}
5
5
  */var CategoryImage=function CategoryImage(_ref){var className=_ref.className,src=_ref.src,placeholderSrc=_ref.placeholderSrc;var _useState=useState(!src),_useState2=_slicedToArray(_useState,2),showPlaceholder=_useState2[0],setShowPlaceholder=_useState2[1];var onImageError=useCallback(function(){setShowPlaceholder(true);},[setShowPlaceholder]);if(!showPlaceholder){return React.createElement(Image,{className:className,src:src,onError:onImageError});}if(!placeholderSrc){return null;}return React.createElement(Image,{key:"placeholder",className:className,src:placeholderSrc});};CategoryImage.defaultProps={src:null,placeholderSrc:null,className:null};export default connect(CategoryImage);
@@ -1,7 +1,11 @@
1
1
  import React from'react';import PropTypes from'prop-types';import classNames from'classnames';import{bin2hex}from'@shopgate/pwa-common/helpers/data';import{CATEGORY_PATH}from'@shopgate/pwa-common-commerce/category/constants';import Portal from'@shopgate/pwa-common/components/Portal';import{Placeholder}from'@shopgate/pwa-ui-shared';import{CATEGORY_ITEM}from'@shopgate/pwa-common-commerce/category/constants/Portals';import{i18n}from'@shopgate/engage/core';import{getShowAllProductsFilters}from'@shopgate/engage/category';import{SheetList,TextLink}from'@shopgate/engage/components';import CategoryImage from"../CategoryImage";import styles from"./style";/**
2
2
  * The CategoryList component.
3
3
  * @param {Object} props The component props.
4
+ * @param {Object} props.parentCategory The parentCategory props.
4
5
  * @param {Array} props.categories The categories to display.
5
- * @param {Array} props.categories The number of rows to prerender.
6
- * @returns {JSX}
7
- */var CategoryList=function CategoryList(_ref){var categories=_ref.categories,parentCategory=_ref.parentCategory,prerender=_ref.prerender,showAllProducts=_ref.showAllProducts,showImages=_ref.showImages;if(!categories||!categories.length){if(prerender===0){return null;}return React.createElement(SheetList,{className:classNames(styles.sheet,'engage__category__category-list')},Array(Math.min(prerender,8)).fill('').map(function(val,index){var key="placeholder-".concat(index);return React.createElement(Placeholder,{height:20,key:key,left:0,top:18,width:220});}));}var filters=getShowAllProductsFilters(parentCategory);return React.createElement(SheetList,{className:classNames(styles.sheet,'engage__category__category-list')},showAllProducts?React.createElement("div",{className:classNames(styles.showAllProducts,'engage__category__category-show-all-products')},React.createElement(Portal,{key:parentCategory.id,name:"category.show-all-products",props:{categoryId:parentCategory.id}},React.createElement(SheetList.Item,{link:"".concat(CATEGORY_PATH,"/").concat(bin2hex(parentCategory.id),"/all"),title:i18n.text('category.showAllProducts.label'),linkState:{categoryName:parentCategory.name,categoryId:parentCategory.id,filters:filters},testId:"showAllProducts",linkComponent:TextLink}))):null,categories.map(function(category){return React.createElement(Portal,{key:category.id,name:CATEGORY_ITEM,props:{categoryId:category.id}},React.createElement(SheetList.Item,{link:"".concat(CATEGORY_PATH,"/").concat(bin2hex(category.id)),title:category.name,description:category.description,linkState:{categoryId:category.id,title:category.name},testId:category.name,rightComponent:showImages?React.createElement(CategoryImage,{className:styles.image,src:category.imageUrl}):null,linkComponent:TextLink}));}));};CategoryList.defaultProps={categories:null,parentCategory:null,prerender:0,showAllProducts:false,showImages:false};export default CategoryList;
6
+ * @param {number} props.prerender The number of rows to prerender.
7
+ * @param {boolean} props.showAllProducts Whether to show all products
8
+ * @param {boolean} props.showImages Whether to show category images
9
+ * @param {boolean} props.showLeftSideImages Whether to show category images on the left side
10
+ * @returns {JSX.Element}
11
+ */var CategoryList=function CategoryList(_ref){var categories=_ref.categories,parentCategory=_ref.parentCategory,prerender=_ref.prerender,showAllProducts=_ref.showAllProducts,showImages=_ref.showImages,showLeftSideImages=_ref.showLeftSideImages;if(!categories||!categories.length){if(prerender===0){return null;}return React.createElement(SheetList,{className:classNames(styles.sheet,'engage__category__category-list')},Array(Math.min(prerender,8)).fill('').map(function(val,index){var key="placeholder-".concat(index);return React.createElement(Placeholder,{height:20,key:key,left:0,top:18,width:220});}));}var filters=getShowAllProductsFilters(parentCategory);return React.createElement(SheetList,{className:classNames(styles.sheet,'engage__category__category-list')},showAllProducts?React.createElement("div",{className:classNames(styles.showAllProducts,'engage__category__category-show-all-products')},React.createElement(Portal,{key:parentCategory.id,name:"category.show-all-products",props:{categoryId:parentCategory.id}},React.createElement(SheetList.Item,{link:"".concat(CATEGORY_PATH,"/").concat(bin2hex(parentCategory.id),"/all"),title:i18n.text('category.showAllProducts.label'),linkState:{categoryName:parentCategory.name,categoryId:parentCategory.id,filters:filters},testId:"showAllProducts",linkComponent:TextLink}))):null,categories.map(function(category){return React.createElement(Portal,{key:category.id,name:CATEGORY_ITEM,props:{categoryId:category.id}},React.createElement(SheetList.Item,{link:"".concat(CATEGORY_PATH,"/").concat(bin2hex(category.id)),title:category.name,description:category.description,linkState:{categoryId:category.id,title:category.name},testId:category.name,rightComponent:showImages?React.createElement(CategoryImage,{className:styles.image,src:category.imageUrl}):null,leftComponent:showLeftSideImages?React.createElement(CategoryImage,{className:styles.image,src:category.imageUrl}):null,linkComponent:TextLink}));}));};CategoryList.defaultProps={categories:null,parentCategory:null,prerender:0,showAllProducts:false,showImages:false,showLeftSideImages:false};export default CategoryList;
@@ -1 +1 @@
1
- import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var colors=themeConfig.colors;var sheet=css({background:colors.light}).toString();var showAllProducts=css({fontWeight:700}).toString();var image=css({display:'none',background:'red',borderRadius:20}).toString();export default{sheet:sheet,showAllProducts:showAllProducts,image:image};
1
+ import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var colors=themeConfig.colors;var sheet=css({background:colors.light}).toString();var showAllProducts=css({fontWeight:700}).toString();var image=css({width:'30px',marginRight:8}).toString();export default{sheet:sheet,showAllProducts:showAllProducts,image:image};
@@ -1,5 +1,5 @@
1
1
  // Ugly imports to avoid breaking tests due to circular dependencies
2
- import{isIOSTheme}from'@shopgate/engage/core/helpers/isIOSTheme';import{hasWebBridge}from'@shopgate/engage/core/helpers/bridge';var iosThemeActive=isIOSTheme();/* eslint-disable extra-rules/no-single-line-objects */var breakpoints=[{name:'xs',from:0,to:600},{name:'sm',from:600,to:960},{name:'md',from:960,to:1280},{name:'lg',from:1280,to:1920},{name:'xl',from:1920,to:Number.MAX_VALUE}];/* eslint-enable extra-rules/no-single-line-objects */ /**
2
+ import{isIOSTheme}from'@shopgate/engage/core/helpers/isIOSTheme';import{hasWebBridge}from'@shopgate/engage/core/helpers/bridge';import{IS_PAGE_PREVIEW_ACTIVE}from'@shopgate/engage/page/constants';var iosThemeActive=isIOSTheme();/* eslint-disable extra-rules/no-single-line-objects */var breakpoints=[{name:'xs',from:0,to:600},{name:'sm',from:600,to:960},{name:'md',from:960,to:1280},{name:'lg',from:1280,to:1920},{name:'xl',from:1920,to:Number.MAX_VALUE}];/* eslint-enable extra-rules/no-single-line-objects */ /**
3
3
  * Generates a media query for different breakpoints and platform.
4
4
  * @param {Object} comparators Comparators.
5
5
  * @param {string} breakpoint Breakpoint rule.
@@ -9,6 +9,6 @@ import{isIOSTheme}from'@shopgate/engage/core/helpers/isIOSTheme';import{hasWebBr
9
9
  var breakpointStart=breakpoint.search(/[a-zA-Z]/);var comparatorString=breakpoint.substring(0,breakpointStart===-1?0:breakpointStart);var breakpointString=breakpoint.substring(breakpointStart===-1?0:breakpointStart);// Get configuration.
10
10
  var comparator=comparators[comparatorString];var config=breakpoints.find(function(b){return b.name===breakpointString;});// Web / App config.
11
11
  // Handle iOS theme as app for now so that media queries in shared components only work for app
12
- var isWeb=hasWebBridge()&&!iosThemeActive;// Always mode.
12
+ var isWeb=hasWebBridge()&&!iosThemeActive&&!IS_PAGE_PREVIEW_ACTIVE;// Always mode.
13
13
  if(webAlways&&isWeb||appAlways&&!isWeb){return true;}// Return media query that never evaluates for now.
14
14
  if(appOnly&&isWeb||webOnly&&!isWeb){return false;}return comparator(config.from,config.to,window.innerWidth);};export default breakpoints;
@@ -1,17 +1,17 @@
1
1
  function _typeof(obj){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;}function _callSuper(_this,derived,args){function isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(e){return false;}}derived=_getPrototypeOf(derived);return _possibleConstructorReturn(_this,isNativeReflectConstruct()?Reflect.construct(derived,args||[],_getPrototypeOf(_this).constructor):derived.apply(_this,args));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}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,{Component}from'react';import PropTypes from'prop-types';import classNames from'classnames';import{withForwardedRef}from'@shopgate/engage/core';import Grid from'@shopgate/pwa-common/components/Grid';import Link from'@shopgate/pwa-common/components/Link';import Glow from'@shopgate/pwa-ui-shared/Glow';import styles from"./style";/**
2
2
  * The list item component.
3
3
  */var Item=/*#__PURE__*/function(_Component){function Item(){_classCallCheck(this,Item);return _callSuper(this,Item,arguments);}_inherits(Item,_Component);return _createClass(Item,[{key:"shouldComponentUpdate",value:/**
4
- * Should only update what the `selected` or `disabled` props change.
4
+ * Should only update when the `selected` or `disabled` or 'leftComponent' props change.
5
5
  * @param {Object} nextProps The next set of component props.
6
- * @returns {JSX}
7
- */function shouldComponentUpdate(nextProps){return this.props.isSelected!==nextProps.isSelected||this.props.isDisabled!==nextProps.isDisabled;}/**
6
+ * @returns {boolean}
7
+ */function shouldComponentUpdate(nextProps){return this.props.isSelected!==nextProps.isSelected||this.props.isDisabled!==nextProps.isDisabled||this.props.leftComponent!==nextProps.leftComponent;}/**
8
8
  * Renders the bulk of the content.
9
9
  * @param {boolean} [isNested=true] Tells if the content is rendered nested.
10
- * @returns {JSX}
11
- */},{key:"renderContent",value:function renderContent(){var isNested=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;var _this$props=this.props,isDisabled=_this$props.isDisabled,isSelected=_this$props.isSelected,title=_this$props.title,image=_this$props.image,rightComponent=_this$props.rightComponent,forwardedRef=_this$props.forwardedRef,description=_this$props.description;var gridStyles=_defineProperty(_defineProperty({},styles.grid,true),styles.selected,isSelected);var titleStyles=_defineProperty(_defineProperty({},styles.title,true),styles.disabled,isDisabled);var ref=isNested?null:forwardedRef;return React.createElement("div",{"data-test-id":this.props.testId,ref:ref,className:"engage__sheet-list__item"},React.createElement(Grid,{className:classNames(gridStyles),component:"div"},image!==null&&React.createElement("div",{className:styles.image},image),React.createElement(Grid.Item,{className:classNames(titleStyles),component:"div",grow:1},React.createElement("div",null,title),description&&React.createElement("div",{className:styles.description,dangerouslySetInnerHTML:{__html:description}})),rightComponent!==null&&React.createElement(Grid.Item,{component:"div",grow:1},rightComponent)));}/**
12
- * @returns {JSX}
10
+ * @returns {JSX.Element}
11
+ */},{key:"renderContent",value:function renderContent(){var isNested=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;var _this$props=this.props,isDisabled=_this$props.isDisabled,isSelected=_this$props.isSelected,title=_this$props.title,image=_this$props.image,rightComponent=_this$props.rightComponent,leftComponent=_this$props.leftComponent,forwardedRef=_this$props.forwardedRef,description=_this$props.description;var gridStyles=_defineProperty(_defineProperty({},styles.grid,true),styles.selected,isSelected);var titleStyles=_defineProperty(_defineProperty({},styles.title,true),styles.disabled,isDisabled);var ref=isNested?null:forwardedRef;return React.createElement("div",{"data-test-id":this.props.testId,ref:ref,className:"engage__sheet-list__item"},React.createElement(Grid,{className:classNames(gridStyles),component:"div"},image!==null&&React.createElement("div",{className:styles.image},image),leftComponent!==null&&React.createElement(Grid.Item,{component:"div",grow:1},leftComponent),React.createElement(Grid.Item,{className:classNames(titleStyles),component:"div",grow:1},React.createElement("div",null,title),description&&React.createElement("div",{className:styles.description,dangerouslySetInnerHTML:{__html:description}})),rightComponent!==null&&React.createElement(Grid.Item,{component:"div",grow:1},rightComponent)));}/**
12
+ * @returns {JSX.Element}
13
13
  */},{key:"render",value:function render(){var _this$props2=this.props,link=_this$props2.link,linkState=_this$props2.linkState,LinkComponent=_this$props2.linkComponent,onClick=_this$props2.onClick,className=_this$props2.className,isDisabled=_this$props2.isDisabled,testId=_this$props2.testId,forwardedRef=_this$props2.forwardedRef,isSelected=_this$props2.isSelected;/**
14
14
  * If this item is disabled, selected or doesn't have a valid
15
15
  * link or click handler then wrap the content with other components.
16
16
  */if(isDisabled||!link&&!onClick){return this.renderContent(false);}// Wrap with a <Link> if the `link` prop is set.
17
- if(link){return React.createElement(Glow,{ref:forwardedRef,className:className,styles:{hover:styles.glowHover}},React.createElement(LinkComponent,{href:link,onClick:onClick,state:linkState,tabIndex:0},this.renderContent()));}return React.createElement("div",{onKeyPress:function onKeyPress(){},onClick:onClick,"data-test-id":testId,ref:forwardedRef,tabIndex:0,role:"option","aria-selected":isSelected},React.createElement(Glow,{className:className,styles:{hover:styles.glowHover}},this.renderContent()));}}]);}(Component);_defineProperty(Item,"defaultProps",{className:null,description:null,forwardedRef:null,image:null,isDisabled:false,isSelected:false,link:null,linkState:null,onClick:null,rightComponent:null,linkComponent:Link,testId:null});export default withForwardedRef(Item);
17
+ if(link){return React.createElement(Glow,{ref:forwardedRef,className:className,styles:{hover:styles.glowHover}},React.createElement(LinkComponent,{href:link,onClick:onClick,state:linkState,tabIndex:0},this.renderContent()));}return React.createElement("div",{onKeyPress:function onKeyPress(){},onClick:onClick,"data-test-id":testId,ref:forwardedRef,tabIndex:0,role:"option","aria-selected":isSelected},React.createElement(Glow,{className:className,styles:{hover:styles.glowHover}},this.renderContent()));}}]);}(Component);_defineProperty(Item,"defaultProps",{className:null,description:null,forwardedRef:null,image:null,isDisabled:false,isSelected:false,leftComponent:null,link:null,linkComponent:Link,linkState:null,onClick:null,rightComponent:null,testId:null});export default withForwardedRef(Item);
@@ -0,0 +1,132 @@
1
+ import * as React from 'react';
2
+ import { Variant as ThemeVariant } from '../../styles/theme/createTheme/createTypography';
3
+
4
+ type Variant = ThemeVariant | 'srOnly';
5
+
6
+ export type TypographyClassKey =
7
+ | 'root'
8
+ | 'h1'
9
+ | 'h2'
10
+ | 'h3'
11
+ | 'h4'
12
+ | 'h5'
13
+ | 'h6'
14
+ | 'subtitle1'
15
+ | 'subtitle2'
16
+ | 'body1'
17
+ | 'body2'
18
+ | 'caption'
19
+ | 'button'
20
+ | 'overline'
21
+ | 'srOnly'
22
+ | 'alignLeft'
23
+ | 'alignCenter'
24
+ | 'alignRight'
25
+ | 'alignJustify'
26
+ | 'noWrap'
27
+ | 'gutterBottom'
28
+ | 'paragraph'
29
+ | 'colorInherit'
30
+ | 'colorPrimary'
31
+ | 'colorSecondary'
32
+ | 'colorTextPrimary'
33
+ | 'colorTextSecondary'
34
+ | 'colorTextTertiary'
35
+ | 'colorError'
36
+ | 'colorWarning'
37
+ | 'colorSuccess'
38
+ | 'displayInline'
39
+ | 'displayBlock';
40
+
41
+ /**
42
+ * Props for the polymorphic Typography component.
43
+ *
44
+ * @template C - the element or component type to render (defaults to 'span')
45
+ */
46
+ export type TypographyProps<
47
+ C extends React.ElementType = 'span'
48
+ > = {
49
+ /**
50
+ * Set the text-align on the component.
51
+ * @default "inherit"
52
+ */
53
+ align?: 'inherit' | 'left' | 'center' | 'right' | 'justify';
54
+ color?:
55
+ | 'initial'
56
+ | 'inherit'
57
+ | 'primary'
58
+ | 'secondary'
59
+ | 'textPrimary'
60
+ | 'textSecondary'
61
+ | 'textTertiary'
62
+ | 'error'
63
+ | 'warning'
64
+ | 'success';
65
+ /**
66
+ * Controls the display type
67
+ * @default "initial"
68
+ */
69
+ display?: 'initial' | 'block' | 'inline';
70
+ /**
71
+ * If `true`, the text will have a bottom margin.
72
+ * @default false
73
+ */
74
+ gutterBottom?: boolean;
75
+ /**
76
+ * If true, the text will not wrap, but instead will truncate with a text overflow ellipsis.
77
+ * Note that text overflow can only happen with block or inline-block level elements
78
+ * (the element needs to have a width in order to overflow).
79
+ * @default false
80
+ */
81
+ noWrap?: boolean;
82
+ /**
83
+ * If true, the text will have a bottom margin.
84
+ * @default false
85
+ */
86
+ paragraph?: boolean;
87
+ /**
88
+ * Applies the theme typography styles.
89
+ * @default "body1"
90
+ */
91
+ variant?: Variant | 'inherit';
92
+ /**
93
+ * The component used for the root node. Either a string to use a HTML element or a component.
94
+ * Overrides the behavior of the variantMapping prop.
95
+ */
96
+ component?: C;
97
+ /**
98
+ * The component maps the variant prop to a range of different HTML element types.
99
+ * For instance, subtitle1 to <h6>. If you wish to change that mapping, you can provide your own.
100
+ * Alternatively, you can use the component prop.
101
+ */
102
+ variantMapping?: Partial<Record<Variant, string>>;
103
+ /**
104
+ * Additional CSS class names to apply to the root element.
105
+ */
106
+ className?: string;
107
+ /**
108
+ * Override specific variant styles
109
+ */
110
+ classes?: Partial<Record<TypographyClassKey, string>>;
111
+ /**
112
+ * Content to render inside the component
113
+ */
114
+ children?: React.ReactNode;
115
+ /**
116
+ * Element type or custom component to render
117
+ * @internal
118
+ */
119
+ as?: C;
120
+ } & Omit<React.ComponentPropsWithRef<C>, 'children' | 'as' | 'component'>;
121
+
122
+ /**
123
+ * The Typography component is used to render text with various styles and alignments.
124
+ * It uses the theme's typography styles and can be customized with props.
125
+ */
126
+ export declare const Typography: <
127
+ C extends React.ElementType = 'span'
128
+ >(
129
+ props: TypographyProps<C> & { ref?: React.ComponentPropsWithRef<C>['ref'] }
130
+ ) => React.ReactElement | null;
131
+
132
+ export default Typography;
@@ -0,0 +1,11 @@
1
+ var _excluded=["align","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping","classes"];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);}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 _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded);var key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++){key=sourceSymbolKeys[i];if(excluded.indexOf(key)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key];}}return target;}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={};var sourceKeys=Object.keys(source);var key,i;for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;target[key]=source[key];}return target;}import*as React from'react';import PropTypes from'prop-types';import{withStyles}from'@shopgate/engage/styles';import classNames from'classnames';/**
2
+ * Capitalizes the first letter of a string.
3
+ * @param {string} string The string to capitalize.
4
+ * @returns {string} The string with the first letter capitalized.
5
+ */var capitalize=function capitalize(string){return string.charAt(0).toUpperCase()+string.slice(1);};/**
6
+ * @typedef {import('../../styles').Theme} Theme
7
+ */ /**
8
+ * Creates the styles for the Typography component.
9
+ * @param {Theme} theme The theme object.
10
+ * @returns {Object} The styles object.
11
+ */export var styles=function styles(theme){return{/* Styles applied to the root element. */root:{margin:0},/* Styles applied to the root element if `variant="body2"`. */body2:theme.typography.body2,/* Styles applied to the root element if `variant="body1"`. */body1:theme.typography.body1,/* Styles applied to the root element if `variant="caption"`. */caption:theme.typography.caption,/* Styles applied to the root element if `variant="button"`. */button:theme.typography.button,/* Styles applied to the root element if `variant="h1"`. */h1:theme.typography.h1,/* Styles applied to the root element if `variant="h2"`. */h2:theme.typography.h2,/* Styles applied to the root element if `variant="h3"`. */h3:theme.typography.h3,/* Styles applied to the root element if `variant="h4"`. */h4:theme.typography.h4,/* Styles applied to the root element if `variant="h5"`. */h5:theme.typography.h5,/* Styles applied to the root element if `variant="h6"`. */h6:theme.typography.h6,/* Styles applied to the root element if `variant="subtitle1"`. */subtitle1:theme.typography.subtitle1,/* Styles applied to the root element if `variant="subtitle2"`. */subtitle2:theme.typography.subtitle2,/* Styles applied to the root element if `variant="overline"`. */overline:theme.typography.overline,/* Styles applied to the root element if `variant="srOnly"`. Only accessible to screen readers. */srOnly:{position:'absolute',height:1,width:1,overflow:'hidden'},/* Styles applied to the root element if `align="left"`. */alignLeft:{textAlign:'left'},/* Styles applied to the root element if `align="center"`. */alignCenter:{textAlign:'center'},/* Styles applied to the root element if `align="right"`. */alignRight:{textAlign:'right'},/* Styles applied to the root element if `align="justify"`. */alignJustify:{textAlign:'justify'},/* Styles applied to the root element if `nowrap={true}`. */noWrap:{overflow:'hidden',textOverflow:'ellipsis',whiteSpace:'nowrap'},/* Styles applied to the root element if `gutterBottom={true}`. */gutterBottom:{marginBottom:'0.35em'},/* Styles applied to the root element if `paragraph={true}`. */paragraph:{marginBottom:16},/* Styles applied to the root element if `color="inherit"`. */colorInherit:{color:'inherit'},/* Styles applied to the root element if `color="primary"`. */colorPrimary:{color:theme.palette.primary.main},/* Styles applied to the root element if `color="secondary"`. */colorSecondary:{color:theme.palette.secondary.main},/* Styles applied to the root element if `color="textPrimary"`. */colorTextPrimary:{color:theme.palette.text.primary},/* Styles applied to the root element if `color="textSecondary"`. */colorTextSecondary:{color:theme.palette.text.secondary},colorTextTertiary:{color:theme.palette.text.tertiary},/* Styles applied to the root element if `color="error"`. */colorError:{color:theme.palette.error.main},/* Styles applied to the root element if `color="warning"` */colorWarning:{color:theme.palette.warning.main},/* Styles applied to the root element if `color="success"` */colorSuccess:{color:theme.palette.success.main},/* Styles applied to the root element if `display="inline"`. */displayInline:{display:'inline'},/* Styles applied to the root element if `display="block"`. */displayBlock:{display:'block'}};};var defaultVariantMapping={h1:'h1',h2:'h2',h3:'h3',h4:'h4',h5:'h5',h6:'h6',subtitle1:'h6',subtitle2:'h6',body1:'p',body2:'p'};var Typography=React.forwardRef(function(props,ref){var _props$align=props.align,align=_props$align===void 0?'inherit':_props$align,className=props.className,_props$color=props.color,color=_props$color===void 0?'initial':_props$color,component=props.component,_props$display=props.display,display=_props$display===void 0?'initial':_props$display,_props$gutterBottom=props.gutterBottom,gutterBottom=_props$gutterBottom===void 0?false:_props$gutterBottom,_props$noWrap=props.noWrap,noWrap=_props$noWrap===void 0?false:_props$noWrap,_props$paragraph=props.paragraph,paragraph=_props$paragraph===void 0?false:_props$paragraph,_props$variant=props.variant,variant=_props$variant===void 0?'body1':_props$variant,_props$variantMapping=props.variantMapping,variantMapping=_props$variantMapping===void 0?defaultVariantMapping:_props$variantMapping,classes=props.classes,other=_objectWithoutProperties(props,_excluded);var Component=component||(paragraph?'p':variantMapping[variant]||defaultVariantMapping[variant])||'span';return React.createElement(Component,_extends({className:classNames(classes.root,_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},classes[variant],variant!=='inherit'),classes["color".concat(capitalize(color))],color!=='initial'),classes.noWrap,noWrap),classes.gutterBottom,gutterBottom),classes.paragraph,paragraph),classes["align".concat(capitalize(align))],align!=='inherit'),classes["display".concat(capitalize(display))],display!=='initial'),className),ref:ref},other));});Typography.defaultProps={align:'inherit',children:null,className:undefined,color:'initial',component:null,display:'initial',gutterBottom:false,noWrap:false,paragraph:false,variant:'body1',variantMapping:defaultVariantMapping};export default withStyles(Typography,styles,{name:'Typography'});
@@ -0,0 +1 @@
1
+ export{default as Typography}from"./Typography";
@@ -15,7 +15,10 @@ function _extends(){_extends=Object.assign||function(target){for(var i=1;i<argum
15
15
  * @returns {Object}
16
16
  */_inherits(ViewContent,_Component);return _createClass(ViewContent,[{key:"componentDidMount",value:/**
17
17
  * Restore the scroll position of the page.
18
- */function componentDidMount(){var scrollTop=this.context.state.scrollTop;if(this.ref.current===window){window.scrollTo(0,scrollTop||0);}else{this.ref.current.scrollTop=scrollTop;}}/**
18
+ */function componentDidMount(){var _this3=this;var scrollTop=this.context.state.scrollTop;// This trick ensures the scroll position is restored correctly. Without it there where
19
+ // situations where scroll position was restored before the content was rendered.
20
+ // In that case restoration didn't have any effect.
21
+ window.requestAnimationFrame(function(){if(_this3.ref.current===window){window.scrollTo(0,scrollTop||0);}else{_this3.ref.current.scrollTop=scrollTop;}});}/**
19
22
  * Removes the keyboardWillChange listener.
20
23
  */},{key:"componentWillUnmount",value:function componentWillUnmount(){var scrollTop;if(this.ref.current===window){scrollTop=window.scrollY;}else{scrollTop=this.ref.current.scrollTop;}router.update(this.context.id,{scrollTop:scrollTop},false);event.removeCallback(EVENT_KEYBOARD_WILL_CHANGE,this.handleKeyboardChange);if(isIOs){window.removeEventListener('focusin',this.handleInputFocusChange);window.removeEventListener('focusout',this.handleInputFocusChange);}}/**
21
24
  * @returns {Object}
@@ -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;}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{useScrollContainer,isIOs}from'@shopgate/engage/core/helpers';import{responsiveMediaQuery}from'@shopgate/engage/styles';export var container=css(_extends({display:'flex',flexDirection:'column',width:'100vw'},useScrollContainer()?{bottom:0,top:0,overflowScrolling:'touch',position:'absolute',WebkitOverflowScrolling:'touch'}:{height:'100%',backgroundColor:'var(--page-background-color)'},_defineProperty({},responsiveMediaQuery('>xs',{webOnly:true}),{width:'var(--page-content-width)'})));export var containerInner=css(_extends({},isIOs&&useScrollContainer()?{// Make the scroll container content a bit higher than the actual scroll container to
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{css}from'glamor';import{useScrollContainer,isIOs}from'@shopgate/engage/core/helpers';import{responsiveMediaQuery}from'@shopgate/engage/styles';import{IS_PAGE_PREVIEW_ACTIVE}from'@shopgate/engage/page/constants';export var container=css(_extends({display:'flex',flexDirection:'column',width:'100vw'},useScrollContainer()?_extends({bottom:0,top:0,overflowScrolling:'touch',position:'absolute',WebkitOverflowScrolling:'touch'},IS_PAGE_PREVIEW_ACTIVE&&{scrollbarWidth:'thin',backgroundColor:'var(--page-background-color)'}):{height:'100%',backgroundColor:'var(--page-background-color)'},_defineProperty({},responsiveMediaQuery('>xs',{webOnly:true}),{width:'var(--page-content-width)'})));export var containerInner=css(_extends({},isIOs&&useScrollContainer()?{// Make the scroll container content a bit higher than the actual scroll container to
2
2
  // get a rubber band effect in all situations
3
3
  minHeight:'calc(100% + var(--extra-ios-scroll-space, 0px))'}:{},{':after':{content:"''",display:'block',pointerEvents:'none',paddingBottom:'calc(var(--page-content-offset-bottom) + var(--keyboard-height))'}}));
@@ -1 +1 @@
1
- import React from'react';export var ViewContext=React.createContext();
1
+ import React from'react';import noop from'lodash/noop';export var ViewContext=React.createContext({top:null,bottom:null,ariaHidden:false,set:noop,setTop:noop,setBottom:noop,setContentRef:noop,getContentRef:function getContentRef(){return{current:null};},scrollTop:noop,setAriaHidden:noop});
@@ -5,8 +5,8 @@
5
5
  export{default as Backdrop}from'@shopgate/pwa-common/components/Backdrop';export{default as BaseButton}from'@shopgate/pwa-common/components/Button';export{default as BaseCheckbox}from'@shopgate/pwa-common/components/Checkbox';export{default as Consume}from'@shopgate/pwa-common/components/Consume';export{default as CountdownTimer}from'@shopgate/pwa-common/components/CountdownTimer';export{default as Drawer}from'@shopgate/pwa-common/components/Drawer';export{default as Dropdown}from'@shopgate/pwa-common/components/Dropdown';export{default as Ellipsis}from'@shopgate/pwa-common/components/Ellipsis';export{default as ErrorBoundary}from'@shopgate/pwa-common/components/ErrorBoundary';export{default as Grid}from'@shopgate/pwa-common/components/Grid';export{default as HtmlSanitizer}from'@shopgate/pwa-common/components/HtmlSanitizer';export{default as I18n}from'@shopgate/pwa-common/components/I18n';export{default as Icon}from'@shopgate/pwa-common/components/Icon';export{default as Image}from'@shopgate/pwa-common/components/Image';export{default as InfiniteContainer}from'@shopgate/pwa-common/components/InfiniteContainer';export{default as Input}from'@shopgate/pwa-common/components/Input';export{default as KeyboardConsumer}from'@shopgate/pwa-common/components/KeyboardConsumer';export{default as Link}from'@shopgate/pwa-common/components/Link';export{default as List}from'@shopgate/pwa-common/components/List';export{default as Loading}from'@shopgate/pwa-common/components/Loading';export{default as Modal}from'@shopgate/pwa-common/components/Modal';export{default as ModalContainer,MODAL_EVENTS}from'@shopgate/pwa-common/components/ModalContainer';export{default as Picker}from"./Picker";export{default as Portal}from'@shopgate/pwa-common/components/Portal';export{default as RangeSlider}from"./RangeSlider";export{default as Route}from'@shopgate/pwa-common/components/Route';export{default as ScannerContainer}from'@shopgate/pwa-common/components/ScannerContainer';export{default as BaseSelect}from'@shopgate/pwa-common/components/Select';export{default as SelectBox}from'@shopgate/pwa-common/components/SelectBox';export{default as Slider}from'@shopgate/pwa-common/components/Slider';export{default as SurroundPortals}from'@shopgate/pwa-common/components/SurroundPortals';export{default as Swiper}from'@shopgate/pwa-common/components/Swiper';export{default as Toaster}from'@shopgate/pwa-common/components/Toaster';export{default as Transition}from'@shopgate/pwa-common/components/Transition';export{default as Widgets}from'@shopgate/pwa-common/components/Widgets';// iOS
6
6
  export{default as AppBarIOS}from'@shopgate/pwa-ui-ios/AppBar';export{default as BaseDialogIOS}from'@shopgate/pwa-ui-ios/BaseDialog';// ANDROID
7
7
  export{default as Accordion}from'@shopgate/pwa-ui-material/Accordion';export{default as AppBarAndroid}from'@shopgate/pwa-ui-material/AppBar';export{default as BaseDialogAndroid}from'@shopgate/pwa-ui-material/BaseDialog';export{default as FloatingActionButton}from'@shopgate/pwa-ui-material/FloatingActionButton';export{default as NavDrawer}from'@shopgate/pwa-ui-material/NavDrawer';export{default as SnackBar}from'@shopgate/pwa-ui-material/SnackBar';// SHARED
8
- export{default as AccordionContainer}from'@shopgate/pwa-ui-shared/AccordionContainer';export{default as ActionButton}from'@shopgate/pwa-ui-shared/ActionButton';export{default as AddToCartButton}from'@shopgate/pwa-ui-shared/AddToCartButton';export{default as Availability}from'@shopgate/pwa-ui-shared/Availability';export{default as Button}from'@shopgate/pwa-ui-shared/Button';export{default as ButtonLink}from'@shopgate/pwa-ui-shared/ButtonLink';export{default as Card}from'@shopgate/pwa-ui-shared/Card';export{default as CardList}from'@shopgate/pwa-ui-shared/CardList';export{default as CartTotalLine}from'@shopgate/pwa-ui-shared/CartTotalLine';export{default as Chip}from'@shopgate/pwa-ui-shared/Chip';export{default as ClientInformation}from'@shopgate/pwa-ui-shared/ClientInformation';export{default as ContextMenu}from'@shopgate/pwa-ui-shared/ContextMenu';export{default as Dialog}from'@shopgate/pwa-ui-shared/Dialog';export{default as DiscountBadge}from'@shopgate/pwa-ui-shared/DiscountBadge';export{default as FavoritesButton}from'@shopgate/pwa-ui-shared/FavoritesButton';export{default as Checkbox}from'@shopgate/pwa-ui-shared/Form/Checkbox';export{default as Password}from'@shopgate/pwa-ui-shared/Form/Password';export{default as RadioGroup}from'@shopgate/pwa-ui-shared/Form/RadioGroup';export{default as RadioGroupItem}from'@shopgate/pwa-ui-shared/Form/RadioGroup/components/Item';export{default as Select}from'@shopgate/pwa-ui-shared/Form/Select';export{default as TextField}from'@shopgate/pwa-ui-shared/Form/TextField';export{default as FormElement}from'@shopgate/pwa-ui-shared/FormElement';export{default as Glow}from'@shopgate/pwa-ui-shared/Glow';export{default as IndicatorCircle}from'@shopgate/pwa-ui-shared/IndicatorCircle';export{default as LoadingIndicator}from'@shopgate/pwa-ui-shared/LoadingIndicator';export{default as Manufacturer}from'@shopgate/pwa-ui-shared/Manufacturer';export{default as NoResults}from'@shopgate/pwa-ui-shared/NoResults';export{default as Placeholder}from'@shopgate/pwa-ui-shared/Placeholder';export{default as PlaceholderLabel}from'@shopgate/pwa-ui-shared/PlaceholderLabel';export{default as PlaceholderParagraph}from'@shopgate/pwa-ui-shared/PlaceholderParagraph';export{default as Price}from'@shopgate/pwa-ui-shared/Price';export{default as PriceInfo}from'@shopgate/pwa-ui-shared/PriceInfo';export{default as PriceStriked}from'@shopgate/pwa-ui-shared/PriceStriked';export{default as ProductProperties}from'@shopgate/pwa-ui-shared/ProductProperties';export{default as ProgressBar}from'@shopgate/pwa-ui-shared/ProgressBar';export{default as RadioButton}from'@shopgate/pwa-ui-shared/RadioButton';export{default as RatingNumber}from'@shopgate/pwa-ui-shared/RatingNumber';export{default as RatingStars}from'@shopgate/pwa-ui-shared/RatingStars';export{default as Ripple}from'@shopgate/pwa-ui-shared/Ripple';export{default as RippleButton}from'@shopgate/pwa-ui-shared/RippleButton';export{default as ScannerOverlay}from'@shopgate/pwa-ui-shared/ScannerOverlay';export{default as Sheet,SHEET_EVENTS}from'@shopgate/pwa-ui-shared/Sheet';export{default as TaxDisclaimer}from'@shopgate/pwa-ui-shared/TaxDisclaimer';export{default as ToggleIcon}from'@shopgate/pwa-ui-shared/ToggleIcon';// ICONS IOS
8
+ export{default as AccordionContainer}from'@shopgate/pwa-ui-shared/AccordionContainer';export{default as ActionButton}from'@shopgate/pwa-ui-shared/ActionButton';export{default as AddToCartButton}from'@shopgate/pwa-ui-shared/AddToCartButton';export{default as Availability}from'@shopgate/pwa-ui-shared/Availability';export{default as Button}from'@shopgate/pwa-ui-shared/Button';export{default as ButtonLink}from'@shopgate/pwa-ui-shared/ButtonLink';export{default as Card}from'@shopgate/pwa-ui-shared/Card';export{default as CardList}from'@shopgate/pwa-ui-shared/CardList';export{default as CartTotalLine}from'@shopgate/pwa-ui-shared/CartTotalLine';export{default as Chip}from'@shopgate/pwa-ui-shared/Chip';export{default as ContextMenu}from'@shopgate/pwa-ui-shared/ContextMenu';export{default as Dialog}from'@shopgate/pwa-ui-shared/Dialog';export{default as DiscountBadge}from'@shopgate/pwa-ui-shared/DiscountBadge';export{default as FavoritesButton}from'@shopgate/pwa-ui-shared/FavoritesButton';export{default as Checkbox}from'@shopgate/pwa-ui-shared/Form/Checkbox';export{default as Password}from'@shopgate/pwa-ui-shared/Form/Password';export{default as RadioGroup}from'@shopgate/pwa-ui-shared/Form/RadioGroup';export{default as RadioGroupItem}from'@shopgate/pwa-ui-shared/Form/RadioGroup/components/Item';export{default as Select}from'@shopgate/pwa-ui-shared/Form/Select';export{default as TextField}from'@shopgate/pwa-ui-shared/Form/TextField';export{default as FormElement}from'@shopgate/pwa-ui-shared/FormElement';export{default as Glow}from'@shopgate/pwa-ui-shared/Glow';export{default as IndicatorCircle}from'@shopgate/pwa-ui-shared/IndicatorCircle';export{default as LoadingIndicator}from'@shopgate/pwa-ui-shared/LoadingIndicator';export{default as Manufacturer}from'@shopgate/pwa-ui-shared/Manufacturer';export{default as NoResults}from'@shopgate/pwa-ui-shared/NoResults';export{default as Placeholder}from'@shopgate/pwa-ui-shared/Placeholder';export{default as PlaceholderLabel}from'@shopgate/pwa-ui-shared/PlaceholderLabel';export{default as PlaceholderParagraph}from'@shopgate/pwa-ui-shared/PlaceholderParagraph';export{default as Price}from'@shopgate/pwa-ui-shared/Price';export{default as PriceInfo}from'@shopgate/pwa-ui-shared/PriceInfo';export{default as PriceStriked}from'@shopgate/pwa-ui-shared/PriceStriked';export{default as ProductProperties}from'@shopgate/pwa-ui-shared/ProductProperties';export{default as ProgressBar}from'@shopgate/pwa-ui-shared/ProgressBar';export{default as RadioButton}from'@shopgate/pwa-ui-shared/RadioButton';export{default as RatingNumber}from'@shopgate/pwa-ui-shared/RatingNumber';export{default as RatingStars}from'@shopgate/pwa-ui-shared/RatingStars';export{default as Ripple}from'@shopgate/pwa-ui-shared/Ripple';export{default as RippleButton}from'@shopgate/pwa-ui-shared/RippleButton';export{default as ScannerOverlay}from'@shopgate/pwa-ui-shared/ScannerOverlay';export{default as Sheet,SHEET_EVENTS}from'@shopgate/pwa-ui-shared/Sheet';export{default as TaxDisclaimer}from'@shopgate/pwa-ui-shared/TaxDisclaimer';export{default as ToggleIcon}from'@shopgate/pwa-ui-shared/ToggleIcon';// ICONS IOS
9
9
  export{default as CartIconIOS}from'@shopgate/pwa-ui-ios/icons/CartIcon';export{default as FilterIconIOS}from'@shopgate/pwa-ui-ios/icons/FilterIcon';export{default as HomeIconIOS}from'@shopgate/pwa-ui-ios/icons/HomeIcon';export{default as ShareIconIOS}from'@shopgate/pwa-ui-ios/icons/ShareIcon';// ICONS ANDROID
10
10
  export{default as ShareIconAndroid}from'@shopgate/pwa-ui-material/icons/ShareIcon';// ICONS SHARED
11
11
  export{default as AccountBoxIcon}from'@shopgate/pwa-ui-shared/icons/AccountBoxIcon';export{default as AddMoreIcon}from'@shopgate/pwa-ui-shared/icons/AddMoreIcon';export{default as ArrowDropIcon}from'@shopgate/pwa-ui-shared/icons/ArrowDropIcon';export{default as ArrowIcon}from'@shopgate/pwa-ui-shared/icons/ArrowIcon';export{default as BarcodeScannerIcon}from'@shopgate/pwa-ui-shared/icons/BarcodeScannerIcon';export{default as BoxIcon}from'@shopgate/pwa-ui-shared/icons/BoxIcon';export{default as BrowseIcon}from'@shopgate/pwa-ui-shared/icons/BrowseIcon';export{default as BurgerIcon}from'@shopgate/pwa-ui-shared/icons/BurgerIcon';export{default as CartIcon}from'@shopgate/pwa-ui-shared/icons/CartIcon';export{default as CartPlusIcon}from'@shopgate/pwa-ui-shared/icons/CartPlusIcon';export{default as CartCouponIcon}from'@shopgate/pwa-ui-shared/icons/CartCouponIcon';export{default as CheckedIcon}from'@shopgate/pwa-ui-shared/icons/CheckedIcon';export{default as CheckIcon}from'@shopgate/pwa-ui-shared/icons/CheckIcon';export{default as ChevronIcon}from'@shopgate/pwa-ui-shared/icons/ChevronIcon';export{default as CreditCardIcon}from'@shopgate/pwa-ui-shared/icons/CreditCardIcon';export{default as CrossIcon}from'@shopgate/pwa-ui-shared/icons/CrossIcon';export{default as DescriptionIcon}from'@shopgate/pwa-ui-shared/icons/DescriptionIcon';export{default as FilterIcon}from'@shopgate/pwa-ui-shared/icons/FilterIcon';export{default as FlashEnabledIcon}from'@shopgate/pwa-ui-shared/icons/FlashEnabledIcon';export{default as FlashDisabledIcon}from'@shopgate/pwa-ui-shared/icons/FlashDisabledIcon';export{default as GridIcon}from'@shopgate/pwa-ui-shared/icons/GridIcon';export{default as HeartIcon}from'@shopgate/pwa-ui-shared/icons/HeartIcon';export{default as HeartOutlineIcon}from'@shopgate/pwa-ui-shared/icons/HeartOutlineIcon';export{default as HeartPlusIcon}from'@shopgate/pwa-ui-shared/icons/HeartPlusIcon';export{default as HeartPlusOutlineIcon}from'@shopgate/pwa-ui-shared/icons/HeartPlusOutlineIcon';export{default as HomeIcon}from'@shopgate/pwa-ui-shared/icons/HomeIcon';export{default as InfoIcon}from'@shopgate/pwa-ui-shared/icons/InfoIcon';export{default as InfoOutlineIcon}from'@shopgate/pwa-ui-shared/icons/InfoOutlineIcon';export{default as ListIcon}from'@shopgate/pwa-ui-shared/icons/ListIcon';export{default as LocatorIcon}from'@shopgate/pwa-ui-shared/icons/LocatorIcon';export{default as LocalShippingIcon}from'@shopgate/pwa-ui-shared/icons/LocalShippingIcon';export{default as LocationIcon}from'@shopgate/pwa-ui-shared/icons/LocationIcon';export{default as LockIcon}from'@shopgate/pwa-ui-shared/icons/LockIcon';export{default as LogoutIcon}from'@shopgate/pwa-ui-shared/icons/LogoutIcon';export{default as MagnifierIcon}from'@shopgate/pwa-ui-shared/icons/MagnifierIcon';export{default as MoreIcon}from'@shopgate/pwa-ui-shared/icons/MoreIcon';export{default as MoreVertIcon}from'@shopgate/pwa-ui-shared/icons/MoreVertIcon';export{default as PersonIcon}from'@shopgate/pwa-ui-shared/icons/PersonIcon';export{default as PhoneIcon}from'@shopgate/pwa-ui-shared/icons/PhoneIcon';export{default as PlaceholderIcon}from'@shopgate/pwa-ui-shared/icons/PlaceholderIcon';export{default as RadioCheckedIcon}from'@shopgate/pwa-ui-shared/icons/RadioCheckedIcon';export{default as RadioUncheckedIcon}from'@shopgate/pwa-ui-shared/icons/RadioUncheckedIcon';export{default as SecurityIcon}from'@shopgate/pwa-ui-shared/icons/SecurityIcon';export{default as ShoppingCartIcon}from'@shopgate/pwa-ui-shared/icons/ShoppingCartIcon';export{default as SortIcon}from'@shopgate/pwa-ui-shared/icons/SortIcon';export{default as StarHalfIcon}from'@shopgate/pwa-ui-shared/icons/StarHalfIcon';export{default as StarIcon}from'@shopgate/pwa-ui-shared/icons/StarIcon';export{default as StarOutlineIcon}from'@shopgate/pwa-ui-shared/icons/StarOutlineIcon';export{default as TickIcon}from'@shopgate/pwa-ui-shared/icons/TickIcon';export{default as TrashIcon}from'@shopgate/pwa-ui-shared/icons/TrashIcon';export{default as TrashOutlineIcon}from'@shopgate/pwa-ui-shared/icons/TrashOutlineIcon';export{default as UncheckedIcon}from'@shopgate/pwa-ui-shared/icons/UncheckedIcon';export{default as ViewListIcon}from'@shopgate/pwa-ui-shared/icons/ViewListIcon';export{default as VisibilityIcon}from'@shopgate/pwa-ui-shared/icons/VisibilityIcon';export{default as VisibilityOffIcon}from'@shopgate/pwa-ui-shared/icons/VisibilityOffIcon';export{default as TimeIcon}from'@shopgate/pwa-ui-shared/icons/TimeIcon';export{default as NotificationIcon}from'@shopgate/pwa-ui-shared/icons/NotificationIcon';// LOCAL
12
- export{MessageBar}from"./MessageBar";export{default as NavigationHandler}from"./NavigationHandler";export{default as TimeBoundary}from"./TimeBoundary";export{default as IntersectionVisibility}from"./IntersectionVisibility";export{default as VideoPlayer}from"./VideoPlayer";export{default as SheetDrawer}from"./SheetDrawer";export{default as SheetList}from"./SheetList";export{default as NullComponent}from"./NullComponent";export{default as View,ViewContext}from"./View";export{default as QuantityInput}from"./QuantityInput";export{default as QuantityLabel}from"./QuantityLabel";export{default as ResponsiveContainer}from"./ResponsiveContainer";export{default as BrandingColorBanner}from"./BrandingColorBanner";export{default as ScrollHeader}from"./ScrollHeader";export{default as Menu}from"./Menu";export{default as Toggle}from"./Toggle";export{Form}from"./Form";export{FormBuilder}from"./Form";export{Footer}from"./Footer";export{SideNavigation}from"./SideNavigation";export{default as TextLink}from"./TextLink/TextLink";export{ConditionalWrapper}from"./ConditionalWrapper";export{default as RadioGroupV2,useRadioGroup}from"./RadioGroup";export{default as RadioV2}from"./Radio";export{default as RadioCard}from"./RadioCard";export{default as ChipLayout}from"./ChipLayout";export{default as Logo}from"./Logo";export{default as PickerUtilize}from"./PickerUtilize";export{default as Switch}from"./Switch";export{default as SnackBarContainer}from"./SnackBarContainer";export{default as ConnectedReactPortal}from"./ConnectedReactPortal";
12
+ export{MessageBar}from"./MessageBar";export{default as NavigationHandler}from"./NavigationHandler";export{default as TimeBoundary}from"./TimeBoundary";export{default as IntersectionVisibility}from"./IntersectionVisibility";export{default as VideoPlayer}from"./VideoPlayer";export{default as SheetDrawer}from"./SheetDrawer";export{default as SheetList}from"./SheetList";export{default as NullComponent}from"./NullComponent";export{default as View,ViewContext}from"./View";export{default as QuantityInput}from"./QuantityInput";export{default as QuantityLabel}from"./QuantityLabel";export{default as ResponsiveContainer}from"./ResponsiveContainer";export{default as BrandingColorBanner}from"./BrandingColorBanner";export{default as ScrollHeader}from"./ScrollHeader";export{default as Menu}from"./Menu";export{default as Toggle}from"./Toggle";export{Form}from"./Form";export{FormBuilder}from"./Form";export{Footer}from"./Footer";export{SideNavigation}from"./SideNavigation";export{default as TextLink}from"./TextLink/TextLink";export{ConditionalWrapper}from"./ConditionalWrapper";export{default as RadioGroupV2,useRadioGroup}from"./RadioGroup";export{default as RadioV2}from"./Radio";export{default as RadioCard}from"./RadioCard";export{default as ChipLayout}from"./ChipLayout";export{default as Logo}from"./Logo";export{default as PickerUtilize}from"./PickerUtilize";export{default as Switch}from"./Switch";export{default as SnackBarContainer}from"./SnackBarContainer";export{default as ConnectedReactPortal}from"./ConnectedReactPortal";export{Typography}from"./Typography";
@@ -1,6 +1,12 @@
1
- import{INDEX_PATH,INDEX_PATH_DEEPLINK,LOGIN_PATH}from'@shopgate/pwa-common/constants/RoutePaths';export{RECEIVE_SHOP_SETTINGS,ERROR_SHOP_SETTINGS,CACHE_LEASE_SHOP_SETTINGS,SHOP_SETTING_GOOGLE_SITE_VERIFICATION_CODE,SHOP_SETTING_CART_SUPPLEMENTAL_CONTENT,SHOP_SETTING_ORDER_SUPPLEMENTAL_CONTENT,SHOP_SETTING_SHOW_SHOP_LOGO_IN_APP,SHOP_SETTING_SHOW_SHOP_LOGO_IN_WEB,SHOP_SETTING_PRODUCTS_SORT_ORDER,SHOP_SETTING_COOKIE_CONSENT_MODE,SHOP_SETTING_DISPLAY_PRICE_PER_MEASURE_UNIT,SHOP_SETTING_IMAGES,SHOP_SETTING_IMAGES_PRODUCT_PLACEHOLDER,SHOP_SETTING_IMAGES_CATEGORY_PLACEHOLDER,SHOP_SETTING_IMAGES_FAVICON,SHOP_SETTING_NUMBER_OF_ADDRESS_LINES,SHOP_SETTING_REGISTRATION_MODE_SIMPLE,SHOP_SETTING_REGISTRATION_MODE_EXTENDED,SHOP_SETTING_WISHLIST_ITEM_QUANTITY_ENABLED,SHOP_SETTING_WISHLIST_ITEM_NOTES_ENABLED,SHOP_SETTING_LOAD_WISHLIST_ON_APP_START_ENABLED,SHOP_SETTING_SHOW_WISHLIST_ITEMS_COUNT_BADGE}from"./shopSettings";export{RECEIVE_MERCHANT_SETTINGS,MERCHANT_SETTINGS_LOCATION_BASED_SHOPPING_ENABLED,MERCHANT_SETTINGS_SUBSTITUTION_PREFERENCES_ENABLED,MERCHANT_SETTINGS_CUSTOMER_ATTRIBUTES,MERCHANT_SETTINGS_FULFILLMENT_SCHEDULED_ENABLED,MERCHANT_SETTINGS_RESTRICT_MULTI_LOCATION_ORDERS,MERCHANT_SETTINGS_DEFAULT_CURRENCY,MERCHANT_SETTINGS_ENABLE_WEB_INDEXING,MERCHANT_SETTINGS_PRODUCT_SHOW_ALTERNATIVE_LOCATION,MERCHANT_SETTINGS_PRODUCTLIST_SHOW_INVENTORY}from"./merchantSettings";export{SHOPGATE_CORE_GET_SHOP_SETTINGS,EUNAUTHORIZED,EAUTHENTICATION}from"./pipelines";export*from"./actionTypes";export*from"./appFeatures";export*from"./deviceTypes";export*from"./geolocationRequest";export*from"./optIns";// Core Constants
1
+ import{INDEX_PATH,INDEX_PATH_DEEPLINK,LOGIN_PATH}from'@shopgate/pwa-common/constants/RoutePaths';export{RECEIVE_SHOP_SETTINGS,ERROR_SHOP_SETTINGS,CACHE_LEASE_SHOP_SETTINGS,SHOP_SETTING_GOOGLE_SITE_VERIFICATION_CODE,SHOP_SETTING_CART_SUPPLEMENTAL_CONTENT,SHOP_SETTING_ORDER_SUPPLEMENTAL_CONTENT,SHOP_SETTING_SHOW_SHOP_LOGO_IN_APP,SHOP_SETTING_SHOW_SHOP_LOGO_IN_WEB,SHOP_SETTING_PRODUCTS_SORT_ORDER,SHOP_SETTING_COOKIE_CONSENT_MODE,SHOP_SETTING_DISPLAY_PRICE_PER_MEASURE_UNIT,SHOP_SETTING_IMAGES,SHOP_SETTING_IMAGES_PRODUCT_PLACEHOLDER,SHOP_SETTING_IMAGES_CATEGORY_PLACEHOLDER,SHOP_SETTING_IMAGES_FAVICON,SHOP_SETTING_NUMBER_OF_ADDRESS_LINES,SHOP_SETTING_REGISTRATION_MODE_SIMPLE,SHOP_SETTING_REGISTRATION_MODE_EXTENDED,SHOP_SETTING_WISHLIST_ITEM_QUANTITY_ENABLED,SHOP_SETTING_WISHLIST_ITEM_NOTES_ENABLED,SHOP_SETTING_LOAD_WISHLIST_ON_APP_START_ENABLED,SHOP_SETTING_SHOW_WISHLIST_ITEMS_COUNT_BADGE,SHOP_SETTING_ENABLE_CMS_2_FOR_ALL_SHOPPERS}from"./shopSettings";export{RECEIVE_MERCHANT_SETTINGS,MERCHANT_SETTINGS_LOCATION_BASED_SHOPPING_ENABLED,MERCHANT_SETTINGS_SUBSTITUTION_PREFERENCES_ENABLED,MERCHANT_SETTINGS_CUSTOMER_ATTRIBUTES,MERCHANT_SETTINGS_FULFILLMENT_SCHEDULED_ENABLED,MERCHANT_SETTINGS_RESTRICT_MULTI_LOCATION_ORDERS,MERCHANT_SETTINGS_DEFAULT_CURRENCY,MERCHANT_SETTINGS_ENABLE_WEB_INDEXING,MERCHANT_SETTINGS_PRODUCT_SHOW_ALTERNATIVE_LOCATION,MERCHANT_SETTINGS_PRODUCTLIST_SHOW_INVENTORY,MERCHANT_SETTINGS_ENABLED_CMS_VERSION}from"./merchantSettings";export{SHOPGATE_CORE_GET_SHOP_SETTINGS,EUNAUTHORIZED,EAUTHENTICATION}from"./pipelines";export*from"./actionTypes";export*from"./appFeatures";export*from"./deviceTypes";export*from"./geolocationRequest";export*from"./optIns";// Core Constants
2
2
  export*from'@shopgate/pwa-core/constants/ErrorManager';export*from'@shopgate/pwa-core/constants/AppEvents';export*from'@shopgate/pwa-core/constants/AppPermissions';export*from'@shopgate/pwa-core/constants/ErrorHandleTypes';export*from'@shopgate/pwa-core/constants/Pipeline';export*from'@shopgate/pwa-core/constants/ProcessTypes';export*from'@shopgate/pwa-core/constants/Scanner';export*from'@shopgate/pwa-core/constants/Trilean';// Common Constants
3
3
  export*from'@shopgate/pwa-common/constants/ActionTypes';export*from'@shopgate/pwa-common/constants/Configuration';export*from'@shopgate/pwa-common/constants/Device';export*from'@shopgate/pwa-common/constants/DisplayOptions';export*from'@shopgate/pwa-common/constants/Pipelines';export*from'@shopgate/pwa-common/constants/Portals';// CLIENT CONSTANTS
4
4
  export*from'@shopgate/pwa-common/constants/client';// MENU CONSTANTS
5
5
  export*from'@shopgate/pwa-common/constants/MenuIDs';// MODAL CONSTANTS
6
- export*from'@shopgate/pwa-common/constants/ModalTypes';export{INDEX_PATH,INDEX_PATH_DEEPLINK,LOGIN_PATH};
6
+ export*from'@shopgate/pwa-common/constants/ModalTypes';export{INDEX_PATH,INDEX_PATH_DEEPLINK,LOGIN_PATH};/**
7
+ * Helper constant that can be used as a return value in Redux selectors to prevent
8
+ * unnecessary re-renders.
9
+ */export var EMPTY_OBJECT=Object.freeze({});/**
10
+ * Helper constant that can be used as a return value in Redux selectors to prevent
11
+ * unnecessary re-renders.
12
+ */export var EMPTY_ARRAY=Object.freeze([]);
@@ -1 +1 @@
1
- export var RECEIVE_MERCHANT_SETTINGS='RECEIVE_MERCHANT_SETTINGS';export var MERCHANT_SETTINGS_LOCATION_BASED_SHOPPING_ENABLED='locationBasedShoppingEnabled';export var MERCHANT_SETTINGS_SUBSTITUTION_PREFERENCES_ENABLED='enableSubstitutionPreferences';export var MERCHANT_SETTINGS_CUSTOMER_ATTRIBUTES='customerAttributes';export var MERCHANT_SETTINGS_FULFILLMENT_SCHEDULED_ENABLED='enableFulfillmentScheduling';export var MERCHANT_SETTINGS_RESTRICT_MULTI_LOCATION_ORDERS='restrictMultiLocationOrders';export var MERCHANT_SETTINGS_DEFAULT_CURRENCY='defaultCurrency';export var MERCHANT_SETTINGS_ENABLE_WEB_INDEXING='enableWebIndexing';export var MERCHANT_SETTINGS_PRODUCT_SHOW_ALTERNATIVE_LOCATION='productShowAlternativeLocation';export var MERCHANT_SETTINGS_PRODUCTLIST_SHOW_INVENTORY='productListShowInventory';
1
+ export var RECEIVE_MERCHANT_SETTINGS='RECEIVE_MERCHANT_SETTINGS';export var MERCHANT_SETTINGS_LOCATION_BASED_SHOPPING_ENABLED='locationBasedShoppingEnabled';export var MERCHANT_SETTINGS_SUBSTITUTION_PREFERENCES_ENABLED='enableSubstitutionPreferences';export var MERCHANT_SETTINGS_CUSTOMER_ATTRIBUTES='customerAttributes';export var MERCHANT_SETTINGS_FULFILLMENT_SCHEDULED_ENABLED='enableFulfillmentScheduling';export var MERCHANT_SETTINGS_RESTRICT_MULTI_LOCATION_ORDERS='restrictMultiLocationOrders';export var MERCHANT_SETTINGS_DEFAULT_CURRENCY='defaultCurrency';export var MERCHANT_SETTINGS_ENABLE_WEB_INDEXING='enableWebIndexing';export var MERCHANT_SETTINGS_PRODUCT_SHOW_ALTERNATIVE_LOCATION='productShowAlternativeLocation';export var MERCHANT_SETTINGS_PRODUCTLIST_SHOW_INVENTORY='productListShowInventory';export var MERCHANT_SETTINGS_ENABLED_CMS_VERSION='enabledCmsVersion';
@@ -1,2 +1,2 @@
1
1
  export var RECEIVE_SHOP_SETTINGS='RECEIVE_SHOP_SETTINGS';export var ERROR_SHOP_SETTINGS='ERROR_SHOP_SETTINGS';export var CACHE_LEASE_SHOP_SETTINGS=10*60*1000;// 10 minutes in milliseconds
2
- export var SHOP_SETTING_GOOGLE_SITE_VERIFICATION_CODE='googleSiteVerificationCode';export var SHOP_SETTING_CART_SUPPLEMENTAL_CONTENT='cartSupplementalContent';export var SHOP_SETTING_ORDER_SUPPLEMENTAL_CONTENT='orderSupplementalContent';export var SHOP_SETTING_SHOW_SHOP_LOGO_IN_APP='showShopLogoInApp';export var SHOP_SETTING_SHOW_SHOP_LOGO_IN_WEB='showShopLogoInWeb';export var SHOP_SETTING_PRODUCTS_SORT_ORDER='productsSortOrder';export var SHOP_SETTING_WISHLIST_MODE='wishlistMode';export var SHOP_SETTING_COOKIE_CONSENT_MODE='cookieConsentMode';export var SHOP_SETTING_DISPLAY_PRICE_PER_MEASURE_UNIT='displayPricePerMeasureUnit';export var SHOP_SETTING_IMAGES='images';export var SHOP_SETTING_IMAGES_PRODUCT_PLACEHOLDER='productPlaceholder';export var SHOP_SETTING_IMAGES_CATEGORY_PLACEHOLDER='categoryPlaceholder';export var SHOP_SETTING_IMAGES_FAVICON='favicon';export var SHOP_SETTING_NUMBER_OF_ADDRESS_LINES='numberOfAddressLines';export var SHOP_SETTINGS_SHOW_CATEGORY_IMAGES='showCategoryImages';export var SHOP_SETTING_REGISTRATION_MODE='registrationMode';export var SHOP_SETTING_REGISTRATION_MODE_SIMPLE='simple';export var SHOP_SETTING_REGISTRATION_MODE_EXTENDED='extended';export var SHOP_SETTING_WISHLIST_ITEM_QUANTITY_ENABLED='wishlistItemQuantityEnabled';export var SHOP_SETTING_WISHLIST_ITEM_NOTES_ENABLED='wishlistItemNotesEnabled';export var SHOP_SETTING_LOAD_WISHLIST_ON_APP_START_ENABLED='loadWishlistOnAppStartEnabled';export var SHOP_SETTING_SHOW_WISHLIST_ITEMS_COUNT_BADGE='showWishlistItemsCountBadge';export var WISHLIST_MODE_PERSIST_ON_ADD='persistOnAdd';
2
+ export var SHOP_SETTING_GOOGLE_SITE_VERIFICATION_CODE='googleSiteVerificationCode';export var SHOP_SETTING_CART_SUPPLEMENTAL_CONTENT='cartSupplementalContent';export var SHOP_SETTING_ORDER_SUPPLEMENTAL_CONTENT='orderSupplementalContent';export var SHOP_SETTING_SHOW_SHOP_LOGO_IN_APP='showShopLogoInApp';export var SHOP_SETTING_SHOW_SHOP_LOGO_IN_WEB='showShopLogoInWeb';export var SHOP_SETTING_PRODUCTS_SORT_ORDER='productsSortOrder';export var SHOP_SETTING_WISHLIST_MODE='wishlistMode';export var SHOP_SETTING_COOKIE_CONSENT_MODE='cookieConsentMode';export var SHOP_SETTING_DISPLAY_PRICE_PER_MEASURE_UNIT='displayPricePerMeasureUnit';export var SHOP_SETTING_IMAGES='images';export var SHOP_SETTING_IMAGES_PRODUCT_PLACEHOLDER='productPlaceholder';export var SHOP_SETTING_IMAGES_CATEGORY_PLACEHOLDER='categoryPlaceholder';export var SHOP_SETTING_IMAGES_FAVICON='favicon';export var SHOP_SETTING_NUMBER_OF_ADDRESS_LINES='numberOfAddressLines';export var SHOP_SETTINGS_SHOW_CATEGORY_IMAGES='showCategoryImages';export var SHOP_SETTING_REGISTRATION_MODE='registrationMode';export var SHOP_SETTING_REGISTRATION_MODE_SIMPLE='simple';export var SHOP_SETTING_REGISTRATION_MODE_EXTENDED='extended';export var SHOP_SETTING_WISHLIST_ITEM_QUANTITY_ENABLED='wishlistItemQuantityEnabled';export var SHOP_SETTING_WISHLIST_ITEM_NOTES_ENABLED='wishlistItemNotesEnabled';export var SHOP_SETTING_LOAD_WISHLIST_ON_APP_START_ENABLED='loadWishlistOnAppStartEnabled';export var SHOP_SETTING_SHOW_WISHLIST_ITEMS_COUNT_BADGE='showWishlistItemsCountBadge';export var SHOP_SETTING_ENABLE_CMS_2_FOR_ALL_SHOPPERS='enableCms2ForAllShoppers';export var WISHLIST_MODE_PERSIST_ON_ADD='persistOnAdd';
@@ -43,7 +43,16 @@ export interface ThemeResourcesContextType {
43
43
  * Mapping object that contains all available widgets.
44
44
  * Key is the widget code, value is the widget component.
45
45
  */
46
- widgets: ThemeWidgetMap;
46
+ widgets: {
47
+ /**
48
+ * All available widgets for Widget API v1
49
+ */
50
+ v1: ThemeWidgetMap;
51
+ /**
52
+ * All available widgets for Widget API v2
53
+ */
54
+ v2: ThemeWidgetMap;
55
+ };
47
56
 
48
57
  /**
49
58
  * Mapping object that contains multiple components provided by the theme.
@@ -1,3 +1,3 @@
1
1
  import{createContext}from'react';/**
2
2
  * @typedef {import('./ThemeResourcesContext').ThemeResourcesContextType ThemeResourcesContextType}
3
- */ /** @type {import('react').Context<ThemeResourcesContextType>} */export default createContext({widgets:{},components:{}});
3
+ */ /** @type {import('react').Context<ThemeResourcesContextType>} */export default createContext({widgets:{v1:{},v2:{}},components:{}});
@@ -1,4 +1,4 @@
1
- import{hasWebBridge}from"./bridge";/**
1
+ import{IS_PAGE_PREVIEW_ACTIVE}from'@shopgate/engage/page/constants';import{hasWebBridge}from"./bridge";/**
2
2
  * Checks whether the app shall use a scroll container
3
3
  * @returns {boolean}
4
- */export var useScrollContainer=function useScrollContainer(){return!hasWebBridge();};
4
+ */export var useScrollContainer=function useScrollContainer(){return IS_PAGE_PREVIEW_ACTIVE||!hasWebBridge();};
@@ -12,5 +12,8 @@ function _extends(){_extends=Object.assign||function(target){for(var i=1;i<argum
12
12
  * HOC that injects the `widgets` value of the ThemeResources context as a prop called
13
13
  * `themeWidgets`.
14
14
  * @param {React.ComponentType<any>} WrappedComponent The wrapped component
15
+ * @param {Object} [options={}] Options for the HOC.
16
+ * @param {"v1"|"v2"} [options.version='v1'] The API version of the widgets to return. Can be 'v1'
17
+ * or 'v2'.
15
18
  * @returns {React.FC<any>}
16
- */export var withThemeWidgets=function withThemeWidgets(WrappedComponent){return function ThemeResourcesWrapper(props){var themeWidgets=useThemeWidgets();return React.createElement(WrappedComponent,_extends({},props,{themeWidgets:themeWidgets}));};};
19
+ */export var withThemeWidgets=function withThemeWidgets(WrappedComponent){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return function ThemeResourcesWrapper(props){var _options$version=options.version,version=_options$version===void 0?'v1':_options$version;var themeWidgets=useThemeWidgets(version);return React.createElement(WrappedComponent,_extends({},props,{themeWidgets:themeWidgets}));};};
@@ -1 +1 @@
1
- export{default as useLongPress}from"./useLongPress";export{default as useScrollDirectionChange}from"./useScrollDirectionChange";
1
+ export{default as usePressHandler}from"./usePressHandler";export{default as useLongPress}from"./useLongPress";export{default as useScrollDirectionChange}from"./useScrollDirectionChange";
@@ -9,5 +9,5 @@ import{useRef,useCallback}from'react';/** @typedef {import('./useLongPress').Lon
9
9
  * @param {(e: Event) => void} callback - Function to call on long press.
10
10
  * @param {UseLongPressOptions} [options={}] - Configuration and lifecycle callbacks.
11
11
  * @returns {LongPressHandlers} An object containing event handlers for mouse and touch events.
12
- */export default function useLongPress(callback){var _ref=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},_ref$threshold=_ref.threshold,threshold=_ref$threshold===void 0?1000:_ref$threshold,onStart=_ref.onStart,onFinish=_ref.onFinish,onCancel=_ref.onCancel;var timerRef=useRef(null);var triggeredRef=useRef(false);var start=useCallback(function(e){if(onStart)onStart(e);triggeredRef.current=false;timerRef.current=setTimeout(function(){callback(e);triggeredRef.current=true;if(onFinish)onFinish(e);},threshold);},[onStart,threshold,callback,onFinish]);var cancel=useCallback(function(e){clearTimeout(timerRef.current);if(!triggeredRef.current&&onCancel){onCancel(e);}},[onCancel]);return{onMouseDown:start,onTouchStart:start,onMouseUp:cancel,onMouseLeave:cancel,onTouchEnd:cancel,// prevents right-click or long-press menu
12
+ */export default function useLongPress(callback){var _ref=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},_ref$threshold=_ref.threshold,threshold=_ref$threshold===void 0?1000:_ref$threshold,onStart=_ref.onStart,onFinish=_ref.onFinish,onCancel=_ref.onCancel;/** @type {import('react').MutableRefObject<number | undefined>} */var timerRef=useRef(undefined);var triggeredRef=useRef(false);var start=useCallback(function(e){if(onStart)onStart(e);triggeredRef.current=false;timerRef.current=window.setTimeout(function(){callback(e);triggeredRef.current=true;if(onFinish)onFinish(e);},threshold);},[onStart,threshold,callback,onFinish]);var cancel=useCallback(function(e){window.clearTimeout(timerRef.current);if(!triggeredRef.current&&onCancel){onCancel(e);}},[onCancel]);return{onMouseDown:start,onTouchStart:start,onMouseUp:cancel,onMouseLeave:cancel,onTouchEnd:cancel,// prevents right-click or long-press menu
13
13
  onContextMenu:preventContextMenu};}
@@ -0,0 +1,38 @@
1
+ import{useCallback}from'react';/**
2
+ * @typedef {Object} PressHandlers
3
+ * @property {Function} onClick - Click event handler.
4
+ * @property {Function} onKeyDown - Keydown handler for Enter/Space.
5
+ */ /**
6
+ * Improves development for accessibility by simplifying registration of multiple
7
+ * listeners (click, Enter, Space) to invoke the a callback when an element is
8
+ * interacted with.
9
+ *
10
+ * @param {Function} onPress Callback to run when the element is interacted with
11
+ * @param {Object} [options] Optional configuration
12
+ * @param {boolean} [options.triggerOnSpace=true] Whether Space triggers onActivate
13
+ * @param {boolean} [options.triggerOnEnter=false] Whether Enter triggers onActivate
14
+ * @returns {PressHandlers} handlers - Event handlers to spread onto an element
15
+ *
16
+ * @example
17
+ * ```js
18
+ * function MyPressableButton({ onActivate }) {
19
+ * // Only Enter will trigger activation; Space is disabled
20
+ * const handlers = usePressHandler(onActivate, {
21
+ * triggerOnEnter: true,
22
+ * triggerOnSpace: false,
23
+ * })
24
+ * //
25
+ * return (
26
+ * <div
27
+ * {...handlers}
28
+ * role="button"
29
+ * tabIndex={0}
30
+ * >
31
+ * Press Me (Enter only)
32
+ * </div>
33
+ * )
34
+ * }
35
+ * ```
36
+ */function usePressHandler(onPress){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var _options$triggerOnSpa=options.triggerOnSpace,triggerOnSpace=_options$triggerOnSpa===void 0?true:_options$triggerOnSpa,_options$triggerOnEnt=options.triggerOnEnter,triggerOnEnter=_options$triggerOnEnt===void 0?false:_options$triggerOnEnt;var handleKeyDown=useCallback(function(e){// Check for Enter
37
+ if(triggerOnEnter&&e.key==='Enter'){e.preventDefault();onPress(e);}// Check for Space (may be ' ' or 'Spacebar')
38
+ if(triggerOnSpace&&(e.key===' '||e.key==='Spacebar')){e.preventDefault();onPress(e);}},[onPress,triggerOnEnter,triggerOnSpace]);var handleClick=useCallback(function(e){onPress(e);},[onPress]);return{onClick:handleClick,onKeyDown:handleKeyDown};}export default usePressHandler;
@@ -2,20 +2,21 @@ import{useContext}from'react';import ThemeResourcesContext from"../contexts/Them
2
2
  * @typedef {import('../contexts/ThemeResourcesContext').ThemeResourcesContextType
3
3
  * ThemeResourcesContextType}
4
4
  */ /**
5
- * @typedef {ThemeResourcesContextType['components']} ThemeComponentsType
5
+ * @typedef {import('../contexts/ThemeResourcesContext').ThemeComponentMap ThemeComponentMap}
6
6
  */ /**
7
- * @typedef {ThemeResourcesContextType['widgets']} ThemeWidgetsType
7
+ * @typedef {import('../contexts/ThemeResourcesContext').ThemeWidgetMap ThemeWidgetMap}
8
8
  */ /**
9
9
  * Hook to access to the ThemeResourceContext. The context provides access to different groups
10
10
  * of React components provided by the active theme.
11
11
  * @returns {ThemeResourcesContextType} Value of the ThemeResourceContext
12
12
  */export function useThemeResources(){return useContext(ThemeResourcesContext);}/**
13
13
  * Hook to access the components provided by the ThemeResourceContext
14
- * @returns {ThemeComponentsType} Mapping object that contains multiple components provided by the
14
+ * @returns {ThemeComponentMap} Mapping object that contains multiple components provided by the
15
15
  * theme.
16
16
  * Key is the component name, value is the component
17
17
  */export function useThemeComponents(){var _useThemeResources=useThemeResources(),components=_useThemeResources.components;return components;}/**
18
18
  * Hook to access the widgets provided by the ThemeResourceContext
19
- * @returns {ThemeWidgetsType} Mapping object that contains all available widgets.
19
+ * @param {string} [version='v1'] The version of the widget API to use. Defaults to 'v1'.
20
+ * @returns {ThemeWidgetMap} Mapping object that contains all available widgets.
20
21
  * Key is the widget code, value is the widget component.
21
- */export function useThemeWidgets(){var _useThemeResources2=useThemeResources(),widgets=_useThemeResources2.widgets;return widgets;}
22
+ */export function useThemeWidgets(){var version=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'v1';var _useThemeResources2=useThemeResources(),widgets=_useThemeResources2.widgets;return widgets[version]?widgets[version]:widgets.v1;}
@@ -1,14 +1,18 @@
1
1
  import React,{useMemo}from'react';import PropTypes from'prop-types';import{ThemeContext as LegacyThemeContext}from'@shopgate/pwa-common/context';import{ThemeResourcesContext}from"../contexts";/**
2
- * @typedef {Object<string, React.ComponentType<any>>} ComponentMap
2
+ * @typedef {import('../contexts/ThemeResourcesContext').ThemeComponentMap} ThemeComponentMap
3
+ */ /**
4
+ * @typedef {Object} Widgets
5
+ * @property {ThemeComponentMap} v1 All available widgets for Widget API v1
6
+ * @property {ThemeComponentMap} v2 All available widgets for Widget API v2
3
7
  */ /**
4
8
  * ThemeResourcesProvider component.
5
9
  * @param {Object} props The component props.
6
- * @param {ComponentMap} props.widgets Mapping object with all available widget components for the
10
+ * @param {Widgets} props.widgets Mapping object with all available widget components for the
7
11
  * theme. Key is the widget code, value is the widget component.
8
- * @param {ComponentMap} props.components Object with shared theme components. Can be used by
9
- * extensions the get unified visual presentation.
10
- * @param {ComponentMap} [props.legacyThemeAPI] Object with shared theme components. Can be used by
12
+ * @param {ThemeComponentMap} props.components Object with shared theme components. Can be used by
11
13
  * extensions the get unified visual presentation.
14
+ * @param {ThemeComponentMap} [props.legacyThemeAPI] Object with shared theme components. Can be
15
+ * used by extensions the get unified visual presentation.
12
16
  * Kept for backward compatibility with existing extensions which use the deprecated `ThemeContext`.
13
17
  * @param {React.ReactNode} props.children The component children.
14
18
  * @returns {JSX.Element}
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import{produce}from'immer';import appConfig from'@shopgate/pwa-common/helpers/config';import{RECEIVE_MERCHANT_SETTINGS,MERCHANT_SETTINGS_LOCATION_BASED_SHOPPING_ENABLED,MERCHANT_SETTINGS_SUBSTITUTION_PREFERENCES_ENABLED,MERCHANT_SETTINGS_RESTRICT_MULTI_LOCATION_ORDERS,MERCHANT_SETTINGS_DEFAULT_CURRENCY,MERCHANT_SETTINGS_ENABLE_WEB_INDEXING}from"../constants";var _appConfig$locales=appConfig.locales,_appConfig$locales2=_appConfig$locales===void 0?{}:_appConfig$locales,_appConfig$locales2$c=_appConfig$locales2.currency,currency=_appConfig$locales2$c===void 0?null:_appConfig$locales2$c;var defaultState=_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},MERCHANT_SETTINGS_LOCATION_BASED_SHOPPING_ENABLED,false),MERCHANT_SETTINGS_SUBSTITUTION_PREFERENCES_ENABLED,false),MERCHANT_SETTINGS_RESTRICT_MULTI_LOCATION_ORDERS,false),MERCHANT_SETTINGS_DEFAULT_CURRENCY,currency),MERCHANT_SETTINGS_ENABLE_WEB_INDEXING,false);/**
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{produce}from'immer';import appConfig from'@shopgate/pwa-common/helpers/config';import{RECEIVE_MERCHANT_SETTINGS,MERCHANT_SETTINGS_LOCATION_BASED_SHOPPING_ENABLED,MERCHANT_SETTINGS_SUBSTITUTION_PREFERENCES_ENABLED,MERCHANT_SETTINGS_RESTRICT_MULTI_LOCATION_ORDERS,MERCHANT_SETTINGS_DEFAULT_CURRENCY,MERCHANT_SETTINGS_ENABLE_WEB_INDEXING,MERCHANT_SETTINGS_ENABLED_CMS_VERSION}from"../constants";var _appConfig$locales=appConfig.locales,_appConfig$locales2=_appConfig$locales===void 0?{}:_appConfig$locales,_appConfig$locales2$c=_appConfig$locales2.currency,currency=_appConfig$locales2$c===void 0?null:_appConfig$locales2$c;var defaultState=_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},MERCHANT_SETTINGS_LOCATION_BASED_SHOPPING_ENABLED,false),MERCHANT_SETTINGS_SUBSTITUTION_PREFERENCES_ENABLED,false),MERCHANT_SETTINGS_RESTRICT_MULTI_LOCATION_ORDERS,false),MERCHANT_SETTINGS_DEFAULT_CURRENCY,currency),MERCHANT_SETTINGS_ENABLE_WEB_INDEXING,false),MERCHANT_SETTINGS_ENABLED_CMS_VERSION,'v1');/**
2
2
  * Stores the merchant settings.
3
3
  * @param {Object} [state={}] The current state.
4
4
  * @param {Object} action The action object.
@@ -1,4 +1,4 @@
1
- var _defaultState;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);}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{produce}from'immer';import{SORT_RELEVANCE}from'@shopgate/pwa-common/constants/DisplayOptions';import{RECEIVE_SHOP_SETTINGS,ERROR_SHOP_SETTINGS,SHOP_SETTING_GOOGLE_SITE_VERIFICATION_CODE,SHOP_SETTING_CART_SUPPLEMENTAL_CONTENT,SHOP_SETTING_ORDER_SUPPLEMENTAL_CONTENT,SHOP_SETTING_SHOW_SHOP_LOGO_IN_WEB,SHOP_SETTING_SHOW_SHOP_LOGO_IN_APP,SHOP_SETTING_PRODUCTS_SORT_ORDER,SHOP_SETTING_IMAGES,SHOP_SETTING_IMAGES_PRODUCT_PLACEHOLDER,SHOP_SETTING_IMAGES_CATEGORY_PLACEHOLDER,SHOP_SETTING_IMAGES_FAVICON,SHOP_SETTING_NUMBER_OF_ADDRESS_LINES,SHOP_SETTING_WISHLIST_ITEM_QUANTITY_ENABLED,SHOP_SETTING_WISHLIST_ITEM_NOTES_ENABLED,SHOP_SETTING_LOAD_WISHLIST_ON_APP_START_ENABLED,SHOP_SETTING_SHOW_WISHLIST_ITEMS_COUNT_BADGE}from"../constants";var defaultState=(_defaultState={},_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defaultState,SHOP_SETTING_GOOGLE_SITE_VERIFICATION_CODE,null),SHOP_SETTING_CART_SUPPLEMENTAL_CONTENT,null),SHOP_SETTING_ORDER_SUPPLEMENTAL_CONTENT,null),SHOP_SETTING_SHOW_SHOP_LOGO_IN_WEB,true),SHOP_SETTING_SHOW_SHOP_LOGO_IN_APP,true),SHOP_SETTING_PRODUCTS_SORT_ORDER,SORT_RELEVANCE),SHOP_SETTING_NUMBER_OF_ADDRESS_LINES,2),SHOP_SETTING_IMAGES,_defineProperty(_defineProperty(_defineProperty({},SHOP_SETTING_IMAGES_PRODUCT_PLACEHOLDER,null),SHOP_SETTING_IMAGES_CATEGORY_PLACEHOLDER,null),SHOP_SETTING_IMAGES_FAVICON,null)),SHOP_SETTING_WISHLIST_ITEM_QUANTITY_ENABLED,false),SHOP_SETTING_WISHLIST_ITEM_NOTES_ENABLED,false),_defineProperty(_defineProperty(_defaultState,SHOP_SETTING_LOAD_WISHLIST_ON_APP_START_ENABLED,true),SHOP_SETTING_SHOW_WISHLIST_ITEMS_COUNT_BADGE,true));/**
1
+ var _defaultState;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);}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{produce}from'immer';import{SORT_RELEVANCE}from'@shopgate/pwa-common/constants/DisplayOptions';import{RECEIVE_SHOP_SETTINGS,ERROR_SHOP_SETTINGS,SHOP_SETTING_GOOGLE_SITE_VERIFICATION_CODE,SHOP_SETTING_CART_SUPPLEMENTAL_CONTENT,SHOP_SETTING_ORDER_SUPPLEMENTAL_CONTENT,SHOP_SETTING_SHOW_SHOP_LOGO_IN_WEB,SHOP_SETTING_SHOW_SHOP_LOGO_IN_APP,SHOP_SETTING_PRODUCTS_SORT_ORDER,SHOP_SETTING_IMAGES,SHOP_SETTING_IMAGES_PRODUCT_PLACEHOLDER,SHOP_SETTING_IMAGES_CATEGORY_PLACEHOLDER,SHOP_SETTING_IMAGES_FAVICON,SHOP_SETTING_NUMBER_OF_ADDRESS_LINES,SHOP_SETTING_WISHLIST_ITEM_QUANTITY_ENABLED,SHOP_SETTING_WISHLIST_ITEM_NOTES_ENABLED,SHOP_SETTING_LOAD_WISHLIST_ON_APP_START_ENABLED,SHOP_SETTING_SHOW_WISHLIST_ITEMS_COUNT_BADGE,SHOP_SETTING_ENABLE_CMS_2_FOR_ALL_SHOPPERS}from"../constants";var defaultState=(_defaultState={},_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defaultState,SHOP_SETTING_GOOGLE_SITE_VERIFICATION_CODE,null),SHOP_SETTING_CART_SUPPLEMENTAL_CONTENT,null),SHOP_SETTING_ORDER_SUPPLEMENTAL_CONTENT,null),SHOP_SETTING_SHOW_SHOP_LOGO_IN_WEB,true),SHOP_SETTING_SHOW_SHOP_LOGO_IN_APP,true),SHOP_SETTING_PRODUCTS_SORT_ORDER,SORT_RELEVANCE),SHOP_SETTING_NUMBER_OF_ADDRESS_LINES,2),SHOP_SETTING_IMAGES,_defineProperty(_defineProperty(_defineProperty({},SHOP_SETTING_IMAGES_PRODUCT_PLACEHOLDER,null),SHOP_SETTING_IMAGES_CATEGORY_PLACEHOLDER,null),SHOP_SETTING_IMAGES_FAVICON,null)),SHOP_SETTING_WISHLIST_ITEM_QUANTITY_ENABLED,false),SHOP_SETTING_WISHLIST_ITEM_NOTES_ENABLED,false),_defineProperty(_defineProperty(_defineProperty(_defaultState,SHOP_SETTING_LOAD_WISHLIST_ON_APP_START_ENABLED,true),SHOP_SETTING_SHOW_WISHLIST_ITEMS_COUNT_BADGE,true),SHOP_SETTING_ENABLE_CMS_2_FOR_ALL_SHOPPERS,false));/**
2
2
  * Stores the product locations by the location code.
3
3
  * @param {Object} [state={}] The current state.
4
4
  * @param {Object} action The action object.
@@ -1,4 +1,4 @@
1
- export{getState as getShopSettingsState,makeGetShopSettingByKey,makeGetShopSettings,getProductImagePlaceholder,getCategoryImagePlaceholder,getFavicon,getNumberOfAddressLines,getGoogleSiteVerificationCode,getRegistrationMode,getWishlistItemQuantityEnabled,getWishlistItemNotesEnabled,getShowWishlistItemsCountBadge,getLoadWishlistOnAppStartEnabled}from"./shopSettings";export{getIsLocationBasedShopping,getFulfillmentSchedulingEnabled,getRestrictMultiLocationOrders,getDefaultCurrency,getEnableWebIndexing,getProductShowAlternativeLocation,getProductListShowInventory}from"./merchantSettings";export*from"../config/config.selectors";export*from"./app";// --------------- CLIENT --------------- //
1
+ export{getState as getShopSettingsState,makeGetShopSettingByKey,makeGetShopSettings,getProductImagePlaceholder,getCategoryImagePlaceholder,getFavicon,getNumberOfAddressLines,getGoogleSiteVerificationCode,getRegistrationMode,getWishlistItemQuantityEnabled,getWishlistItemNotesEnabled,getShowWishlistItemsCountBadge,getLoadWishlistOnAppStartEnabled,getEnableCms2ForAllShoppers}from"./shopSettings";export{getIsLocationBasedShopping,getFulfillmentSchedulingEnabled,getRestrictMultiLocationOrders,getDefaultCurrency,getEnableWebIndexing,getProductShowAlternativeLocation,getProductListShowInventory,getEnabledCMSVersion}from"./merchantSettings";export*from"../config/config.selectors";export*from"./app";// --------------- CLIENT --------------- //
2
2
  export*from'@shopgate/pwa-common/selectors/client';// --------------- ROUTER --------------- //
3
3
  export*from'@shopgate/pwa-common/selectors/router';export*from'@shopgate/pwa-common/selectors/history';// --------------- URL --------------- //
4
4
  export*from'@shopgate/pwa-common/selectors/url';// --------------- MENU --------------- //