@shopgate/engage 7.27.3-alpha.16 → 7.27.3-alpha.17

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 (1218) hide show
  1. package/a11y/components/LiveMessage/index.js +1 -1
  2. package/a11y/components/LiveMessenger/helpers.js +1 -1
  3. package/a11y/components/LiveMessenger/index.js +2 -2
  4. package/a11y/components/Navigation/index.js +1 -1
  5. package/a11y/components/Section/index.js +3 -3
  6. package/a11y/components/VisuallyHidden/index.js +1 -1
  7. package/a11y/components/index.js +1 -1
  8. package/a11y/index.js +4 -1
  9. package/account/constants/index.js +1 -1
  10. package/account/index.js +1 -1
  11. package/app-rating/actions/showModal.js +3 -3
  12. package/app-rating/helpers/index.js +1 -1
  13. package/app-rating/subscriptions/index.js +6 -11
  14. package/back-in-stock/actions/index.js +1 -1
  15. package/back-in-stock/components/BackInStockButton/index.js +3 -3
  16. package/back-in-stock/components/CharacteristicsButton/index.js +1 -1
  17. package/back-in-stock/components/ProductInfoBackInStockButton/index.js +1 -1
  18. package/back-in-stock/components/Subscriptions/components/List/index.js +2 -2
  19. package/back-in-stock/components/Subscriptions/components/Subscription/index.js +2 -2
  20. package/back-in-stock/components/Subscriptions/index.js +1 -1
  21. package/back-in-stock/providers/BackInStockSubscriptionsProvider.context.js +1 -1
  22. package/back-in-stock/providers/BackInStockSubscriptionsProvider.js +1 -1
  23. package/back-in-stock/selectors/index.js +3 -5
  24. package/back-in-stock/streams/index.js +1 -1
  25. package/back-in-stock/subscriptions/index.js +2 -2
  26. package/cart/index.js +5 -10
  27. package/category/components/CategoryList/index.js +2 -2
  28. package/category/components/CategoryList/style.js +1 -1
  29. package/category/index.js +7 -1
  30. package/checkout/index.js +5 -6
  31. package/components/ChipLayout/index.js +7 -7
  32. package/components/ChipLayout/spec.js +1 -1
  33. package/components/ChipLayout/style.js +2 -2
  34. package/components/ConditionalWrapper/index.js +5 -1
  35. package/components/Footer/Footer.js +23 -4
  36. package/components/Footer/Footer.style.js +7 -1
  37. package/components/Form/Builder/Builder.constants.js +1 -1
  38. package/components/Form/Builder/Builder.js +37 -53
  39. package/components/Form/Builder/ElementCheckbox.js +2 -2
  40. package/components/Form/Builder/ElementRadio.js +2 -2
  41. package/components/Form/Builder/ElementSelect.js +3 -3
  42. package/components/Form/Builder/ElementText.js +4 -4
  43. package/components/Form/Builder/classes/ActionListener.constants.js +2 -2
  44. package/components/Form/Builder/classes/ActionListener.js +15 -72
  45. package/components/Form/Builder/helpers/buildCountryList.js +3 -3
  46. package/components/Form/Builder/helpers/buildFormDefaults.js +1 -1
  47. package/components/Form/Builder/helpers/buildProvinceList.js +1 -1
  48. package/components/Form/Form.js +8 -11
  49. package/components/Form/index.js +1 -1
  50. package/components/IntersectionVisibility/index.js +6 -13
  51. package/components/Logo/index.js +2 -2
  52. package/components/Logo/spec.js +1 -1
  53. package/components/Logo/style.js +1 -1
  54. package/components/MessageBar/index.js +7 -1
  55. package/components/MessageBar/spec.js +1 -0
  56. package/components/MessageBar/style.js +2 -0
  57. package/components/NavigationHandler/connector.js +1 -1
  58. package/components/NavigationHandler/index.js +6 -6
  59. package/components/NavigationHandler/spec.js +1 -1
  60. package/components/Picker/components/Button/index.js +1 -1
  61. package/components/Picker/components/List/index.js +2 -2
  62. package/components/Picker/components/Modal/index.js +7 -7
  63. package/components/Picker/index.js +10 -19
  64. package/components/Picker/spec.js +2 -2
  65. package/components/PickerUtilize/components/Button/index.js +1 -1
  66. package/components/PickerUtilize/index.js +6 -8
  67. package/components/PickerUtilize/spec.js +1 -2
  68. package/components/QuantityInput/QuantityInput.js +4 -5
  69. package/components/RangeSlider/components/Handle/index.js +2 -2
  70. package/components/RangeSlider/components/Handle/style.js +1 -1
  71. package/components/RangeSlider/helper.js +3 -3
  72. package/components/RangeSlider/index.js +23 -35
  73. package/components/RangeSlider/spec.js +4 -4
  74. package/components/ScrollHeader/index.js +5 -22
  75. package/components/ScrollHeader/style.js +1 -1
  76. package/components/SheetDrawer/index.js +3 -4
  77. package/components/SheetList/components/Item/index.js +5 -5
  78. package/components/SheetList/components/Item/spec.js +2 -2
  79. package/components/SheetList/components/Item/style.js +1 -1
  80. package/components/SheetList/index.js +4 -4
  81. package/components/SheetList/spec.js +1 -1
  82. package/components/SheetList/style.js +1 -1
  83. package/components/SnackBarContainer/index.js +1 -1
  84. package/components/Switch/index.js +1 -1
  85. package/components/TimeBoundary/index.js +8 -10
  86. package/components/TimeBoundary/spec.js +3 -3
  87. package/components/VideoPlayer/index.js +6 -9
  88. package/components/View/components/Above/index.js +1 -1
  89. package/components/View/components/Below/index.js +1 -1
  90. package/components/View/components/Content/index.js +13 -13
  91. package/components/View/components/Content/style.js +1 -1
  92. package/components/View/context.js +1 -1
  93. package/components/View/index.js +5 -5
  94. package/components/View/provider.js +7 -24
  95. package/components/View/style.js +6 -1
  96. package/components/index.js +4 -4
  97. package/core/action-creators/appPermissions.js +1 -1
  98. package/core/action-creators/index.js +1 -1
  99. package/core/actions/getGeolocation.js +2 -2
  100. package/core/actions/grantAppTrackingTransparencyPermission.js +1 -3
  101. package/core/actions/grantGeolocationPermissions.js +2 -6
  102. package/core/actions/grantPermissions.js +4 -16
  103. package/core/actions/grantPushPermissions.js +3 -4
  104. package/core/actions/index.js +2 -2
  105. package/core/actions/requestAppPermission.js +2 -7
  106. package/core/actions/requestAppPermissionStatus.js +2 -7
  107. package/core/actions/updateStatusBarBackground.js +3 -3
  108. package/core/classes/GeolocationRequest.js +4 -8
  109. package/core/collections/AppInitialization.js +6 -4
  110. package/core/config/ThemeConfigResolver.js +3 -3
  111. package/core/constants/appFeatures.js +1 -1
  112. package/core/constants/geolocationRequest.js +1 -1
  113. package/core/constants/index.js +3 -3
  114. package/core/contexts/AppContext.js +1 -1
  115. package/core/helpers/appFeatures.js +9 -21
  116. package/core/helpers/baseUrl.js +1 -1
  117. package/core/helpers/getFullImageSource.js +2 -21
  118. package/core/helpers/i18n.js +5 -10
  119. package/core/helpers/index.js +3 -3
  120. package/core/helpers/updateLegacyNavigationBar.js +2 -5
  121. package/core/hocs/withApp.js +1 -1
  122. package/core/hocs/withCurrentProduct.js +3 -3
  123. package/core/hocs/withForwardedRef.js +1 -1
  124. package/core/hocs/withNavigation.js +1 -1
  125. package/core/hocs/withRoute.js +1 -1
  126. package/core/hocs/withTheme.js +3 -42
  127. package/core/hocs/withWidgetSettings.js +1 -1
  128. package/core/hocs/withWidgetStyles.js +1 -1
  129. package/core/hooks/html/useLoadImage.js +1 -1
  130. package/core/hooks/useTheme.js +2 -38
  131. package/core/hooks/useWidgetStyles.js +1 -1
  132. package/core/index.js +11 -5
  133. package/core/initialization/index.js +4 -19
  134. package/core/providers/AppProvider.js +9 -9
  135. package/core/reducers/index.js +1 -1
  136. package/core/selectors/index.js +1 -1
  137. package/core/streams/app.js +1 -1
  138. package/core/streams/index.js +1 -1
  139. package/core/subscriptions/app.js +3 -4
  140. package/favorites/components/Item/Item.js +9 -13
  141. package/favorites/components/Item/ItemCharacteristics.js +2 -2
  142. package/favorites/components/List/List.js +15 -19
  143. package/favorites/components/ListChooser/ListChooser.js +2 -2
  144. package/favorites/components/ListChooser/ListChooserItem.js +5 -4
  145. package/favorites/components/Lists/Lists.js +13 -17
  146. package/favorites/components/Lists/ListsModal.js +4 -3
  147. package/favorites/components/RemoveButton/RemoveButton.js +2 -2
  148. package/favorites/constants/Portals.js +2 -1
  149. package/favorites/constants/constants.js +1 -0
  150. package/favorites/index.js +2 -2
  151. package/filter/components/FilterItem/index.js +2 -2
  152. package/filter/components/FilterItem/spec.js +1 -1
  153. package/filter/components/PriceSlider/components/Label/index.js +3 -3
  154. package/filter/components/PriceSlider/components/Label/spec.js +1 -1
  155. package/filter/components/PriceSlider/index.js +8 -8
  156. package/filter/components/PriceSlider/spec.js +1 -1
  157. package/filter/components/PriceSlider/style.js +1 -1
  158. package/filter/helpers/buildFilterParamsForFetchFiltersRequest.js +2 -2
  159. package/filter/helpers/buildInitialFilters.js +2 -2
  160. package/filter/helpers/buildUpdatedFilters.js +2 -2
  161. package/filter/helpers/translateFilterLabel.js +3 -3
  162. package/filter/index.js +7 -2
  163. package/orders/index.js +1 -1
  164. package/package.json +18 -26
  165. package/page/index.js +4 -2
  166. package/product/components/Characteristics/Characteristic/components/Sheet/index.js +4 -16
  167. package/product/components/Characteristics/Characteristic/components/SheetItem/index.js +3 -8
  168. package/product/components/Characteristics/Characteristic/components/SheetItem/style.js +1 -1
  169. package/product/components/Characteristics/Characteristic/components/VariantAvailability/connector.js +9 -0
  170. package/product/components/Characteristics/Characteristic/components/VariantAvailability/index.js +5 -0
  171. package/product/components/Characteristics/Characteristic/index.js +6 -15
  172. package/product/components/Characteristics/Characteristic/style.js +1 -1
  173. package/product/components/Characteristics/Swatch/index.js +6 -8
  174. package/product/components/Characteristics/index.js +3 -10
  175. package/product/components/Characteristics/transition.js +1 -1
  176. package/product/components/Description/index.js +6 -5
  177. package/product/components/Description/style.js +1 -1
  178. package/product/components/EffectivityDates/helpers.js +5 -5
  179. package/product/components/EffectivityDates/index.js +2 -2
  180. package/product/components/EffectivityDates/style.js +1 -1
  181. package/product/components/Header/PriceStriked/index.js +5 -2
  182. package/product/components/Header/PriceStriked/style.js +1 -1
  183. package/product/components/Header/Shipping/components/Label/index.js +3 -3
  184. package/product/components/Header/Shipping/components/Label/style.js +1 -1
  185. package/product/components/Header/Shipping/index.js +1 -1
  186. package/product/components/Header/Shipping/spec.js +1 -1
  187. package/product/components/Header/Tiers/components/Tier/index.js +2 -2
  188. package/product/components/Header/Tiers/components/Tier/spec.js +1 -1
  189. package/product/components/Header/Tiers/index.js +1 -1
  190. package/product/components/Header/Tiers/spec.js +1 -1
  191. package/product/components/MapPriceHint/index.js +1 -1
  192. package/product/components/Media/FeaturedMedia.js +2 -2
  193. package/product/components/Media/MediaImage.js +3 -3
  194. package/product/components/Media/MediaPlaceholder.js +1 -1
  195. package/product/components/MediaSlider/components/MediaImage/index.js +1 -1
  196. package/product/components/MediaSlider/components/MediaVideo/index.js +1 -1
  197. package/product/components/MediaSlider/index.js +4 -4
  198. package/product/components/Options/components/Content/index.js +8 -8
  199. package/product/components/Options/components/Content/spec.js +2 -2
  200. package/product/components/Options/components/Option/index.js +2 -2
  201. package/product/components/Options/components/TextOption/components/OptionInfo/index.js +3 -3
  202. package/product/components/Options/components/TextOption/components/OptionInfo/spec.js +1 -1
  203. package/product/components/Options/components/TextOption/components/OptionInfo/style.js +1 -1
  204. package/product/components/Options/components/TextOption/index.js +7 -19
  205. package/product/components/Options/components/TextOption/style.js +1 -1
  206. package/product/components/Options/index.js +2 -2
  207. package/product/components/OrderQuantityHint/index.js +2 -3
  208. package/product/components/OrderQuantityHint/style.js +1 -1
  209. package/product/components/PriceDifference/index.js +1 -1
  210. package/product/components/PriceDifference/style.js +1 -1
  211. package/product/components/ProductBadges/index.js +2 -2
  212. package/product/components/ProductCard/index.js +3 -12
  213. package/product/components/ProductCard/style.js +1 -1
  214. package/product/components/ProductCharacteristics/context.js +1 -1
  215. package/product/components/ProductCharacteristics/helpers/index.js +1 -1
  216. package/product/components/ProductCharacteristics/index.js +16 -30
  217. package/product/components/ProductDiscountBadge/index.js +2 -2
  218. package/product/components/ProductDiscountBadge/spec.js +2 -2
  219. package/product/components/ProductDiscountBadge/style.js +1 -1
  220. package/product/components/ProductGridPrice/index.js +3 -3
  221. package/product/components/ProductGridPrice/style.js +1 -1
  222. package/product/components/ProductImage/index.js +13 -17
  223. package/product/components/ProductImage/spec.js +1 -1
  224. package/product/components/ProductList/components/Item/index.js +2 -2
  225. package/product/components/ProductList/components/Iterator/index.js +1 -1
  226. package/product/components/ProductList/components/Layout/index.js +1 -1
  227. package/product/components/ProductList/index.js +2 -2
  228. package/product/components/ProductProperties/Content.js +4 -4
  229. package/product/components/ProductProperties/Group.js +1 -1
  230. package/product/components/ProductProperties/GroupedProperties.js +2 -2
  231. package/product/components/ProductProperties/Lists.js +1 -1
  232. package/product/components/ProductProperties/ProductProperties.js +2 -2
  233. package/product/components/ProductProperties/Row.js +1 -1
  234. package/product/components/ProductProperties/Rows.js +2 -2
  235. package/product/components/ProductProperties/Wrapper.js +1 -1
  236. package/product/components/ProductProperties/helpers/getGroupsFromProperties.js +2 -7
  237. package/product/components/ProductProperties/style.js +1 -1
  238. package/product/{providers/Product → components/ProductProvider}/index.js +1 -1
  239. package/product/components/ProductSlider/index.js +2 -3
  240. package/product/components/ProductSlider/spec.js +1 -1
  241. package/product/components/QuantityPicker/helpers.js +5 -0
  242. package/product/components/QuantityPicker/index.js +3 -4
  243. package/product/components/Rating/index.js +3 -3
  244. package/product/components/Rating/spec.js +2 -2
  245. package/product/components/RelationsSlider/RelationsSheet.js +2 -2
  246. package/product/components/RelationsSlider/RelationsSlider.js +1 -1
  247. package/product/components/RelationsSlider/RelationsSliderContent.js +1 -1
  248. package/product/components/RelationsSlider/style.js +1 -1
  249. package/product/components/Swatch/Swatch.js +1 -1
  250. package/product/components/Swatch/SwatchContent.js +1 -1
  251. package/product/components/Swatch/VariantSwatch.js +1 -1
  252. package/product/components/Swatch/style.js +1 -1
  253. package/product/components/Swatches/Swatches.js +1 -1
  254. package/product/components/UnitQuantityPicker/ProductUnitQuantityPicker.js +6 -3
  255. package/product/components/UnitQuantityPicker/UnitQuantityPicker.js +13 -11
  256. package/product/components/UnitQuantityPicker/UnitQuantityPickerWithSection.js +2 -5
  257. package/product/components/UnitQuantityPicker/index.js +1 -1
  258. package/product/components/context.js +1 -1
  259. package/product/constants/index.js +1 -2
  260. package/product/helpers/index.js +2 -2
  261. package/product/helpers/redirects.js +2 -2
  262. package/product/hocs/withMapPricing.js +4 -4
  263. package/product/hocs/withPriceCalculation.js +2 -2
  264. package/product/hocs/withProductListEntry.js +1 -1
  265. package/product/hocs/withProductListType.js +1 -1
  266. package/product/hooks/useLoadProductImage.js +1 -1
  267. package/product/index.js +11 -4
  268. package/product/providers/ProductListEntry/context.js +1 -1
  269. package/product/providers/ProductListEntry/index.js +1 -1
  270. package/product/providers/ProductListType/context.js +1 -2
  271. package/product/providers/ProductListType/index.js +1 -2
  272. package/product/selectors/product.js +6 -75
  273. package/product/selectors/variants.js +1 -4
  274. package/push-opt-in/action-creators/pushOptIn.js +1 -2
  275. package/push-opt-in/actions/pushOptInModal.js +3 -3
  276. package/push-opt-in/components/PushOptInModal/index.js +6 -3
  277. package/push-opt-in/components/PushOptInModal/push-opt-in.svg +58 -58
  278. package/push-opt-in/reducers/optInModal.js +2 -2
  279. package/push-opt-in/reducers/optInTrigger.js +2 -2
  280. package/push-opt-in/selectors/optInModal.js +2 -5
  281. package/push-opt-in/selectors/optInTrigger.js +2 -4
  282. package/push-opt-in/subscriptions/index.js +1 -1
  283. package/push-opt-in/subscriptions/optInTrigger.js +6 -6
  284. package/reviews/components/Reviews/components/AllReviewsLink/index.js +1 -1
  285. package/reviews/components/Reviews/components/Header/components/AverageRating/index.js +6 -8
  286. package/reviews/components/Reviews/components/Header/components/NoReviews/index.js +3 -3
  287. package/reviews/components/Reviews/components/Header/components/ReviewsExcerpt/index.js +3 -3
  288. package/reviews/components/Reviews/components/Header/components/ReviewsExcerpt/style.js +1 -1
  289. package/reviews/components/Reviews/components/Header/components/WriteReviewLink/index.js +3 -3
  290. package/reviews/components/Reviews/components/Header/components/WriteReviewLink/spec.js +2 -2
  291. package/reviews/components/Reviews/components/Header/index.js +4 -6
  292. package/reviews/components/Reviews/components/Header/spec.js +2 -2
  293. package/reviews/components/Reviews/components/List/components/Info/components/Author/index.js +1 -1
  294. package/reviews/components/Reviews/components/List/components/Info/components/ReviewDate/index.js +1 -1
  295. package/reviews/components/Reviews/components/List/components/Info/index.js +2 -2
  296. package/reviews/components/Reviews/components/List/components/Info/style.js +1 -1
  297. package/reviews/components/Reviews/components/List/components/Rating/index.js +1 -1
  298. package/reviews/components/Reviews/components/List/components/Review/index.js +1 -1
  299. package/reviews/components/Reviews/components/List/components/Text/index.js +1 -1
  300. package/reviews/components/Reviews/components/List/components/Title/index.js +1 -1
  301. package/reviews/components/Reviews/components/List/index.js +3 -3
  302. package/reviews/components/Reviews/components/List/spec.js +1 -1
  303. package/reviews/components/Reviews/components/RatingCount/index.js +1 -1
  304. package/reviews/components/Reviews/components/RatingCount/spec.js +1 -1
  305. package/reviews/components/Reviews/components/RatingCount/style.js +1 -1
  306. package/reviews/components/Reviews/components/ReviewsInfo/index.js +4 -3
  307. package/reviews/components/Reviews/connector.js +6 -2
  308. package/reviews/components/Reviews/index.js +1 -1
  309. package/reviews/components/Reviews/mock.js +6 -2
  310. package/reviews/components/Reviews/spec.js +3 -4
  311. package/reviews/index.js +6 -3
  312. package/scanner/index.js +6 -1
  313. package/search/index.js +6 -1
  314. package/tracking/action-creators/cookieConsent.js +2 -2
  315. package/tracking/actions/cookieConsent.js +5 -17
  316. package/tracking/components/CookieConsentModal/connector.js +5 -3
  317. package/tracking/components/CookieConsentModal/index.js +6 -3
  318. package/tracking/components/CookieConsentModal/tracking-opt-in.svg +14 -14
  319. package/tracking/components/PrivacySettings/connector.js +5 -3
  320. package/tracking/components/PrivacySettings/index.js +2 -2
  321. package/tracking/selectors/cookieConsent.js +5 -10
  322. package/tracking/streams/cookieConsent.js +3 -10
  323. package/tracking/subscriptions/analytics.js +4 -5
  324. package/tracking/subscriptions/cookieConsent.js +10 -6
  325. package/user/index.js +2 -2
  326. package/a11y/action-creators/index.js +0 -9
  327. package/a11y/components/FocusTrap/index.js +0 -1
  328. package/a11y/components/ModalStateTracker/index.js +0 -14
  329. package/a11y/constants/index.js +0 -1
  330. package/a11y/helpers/index.js +0 -1
  331. package/a11y/hooks/index.js +0 -37
  332. package/a11y/reducers/index.js +0 -6
  333. package/a11y/selectors/index.js +0 -8
  334. package/a11y/styles.js +0 -2
  335. package/account/actions/addContacts.js +0 -4
  336. package/account/actions/deleteContact.js +0 -5
  337. package/account/actions/deleteCustomer.js +0 -4
  338. package/account/actions/fetchContacts.js +0 -4
  339. package/account/actions/fetchCustomer.js +0 -4
  340. package/account/actions/updateContact.js +0 -4
  341. package/account/actions/updateCustomer.js +0 -4
  342. package/account/components/Account/Account.connector.js +0 -5
  343. package/account/components/Account/Account.js +0 -4
  344. package/account/components/Account/Account.style.js +0 -1
  345. package/account/components/Account/index.js +0 -1
  346. package/account/components/Profile/Profile.config.js +0 -11
  347. package/account/components/Profile/Profile.constraints.js +0 -1
  348. package/account/components/Profile/Profile.js +0 -1
  349. package/account/components/Profile/Profile.provider.js +0 -22
  350. package/account/components/Profile/ProfileAddressBook.js +0 -6
  351. package/account/components/Profile/ProfileAddressCard.js +0 -3
  352. package/account/components/Profile/ProfileForm.js +0 -3
  353. package/account/components/Profile/ProfileHeader.js +0 -3
  354. package/account/components/Profile/index.js +0 -1
  355. package/account/components/ProfileContact/ProfileContact.config.js +0 -11
  356. package/account/components/ProfileContact/ProfileContact.constraints.js +0 -5
  357. package/account/components/ProfileContact/ProfileContact.js +0 -13
  358. package/account/components/ProfileContact/index.js +0 -1
  359. package/account/components/index.js +0 -1
  360. package/account/constants/actions.js +0 -1
  361. package/account/constants/pipelines.js +0 -1
  362. package/account/helper/form.js +0 -61
  363. package/account/reducers/index.js +0 -6
  364. package/account/selectors/contacts.js +0 -7
  365. package/account/selectors/customer.js +0 -7
  366. package/cart/cart.constants.js +0 -1
  367. package/cart/cart.context.js +0 -1
  368. package/cart/cart.helpers.js +0 -15
  369. package/cart/cart.hooks.js +0 -4
  370. package/cart/cart.selectors.js +0 -34
  371. package/cart/cart.types.js +0 -1
  372. package/cart/components/CartHeaderWide/CartHeaderWide.js +0 -3
  373. package/cart/components/CartHeaderWide/CartHeaderWide.style.js +0 -1
  374. package/cart/components/CartHeaderWide/index.js +0 -1
  375. package/cart/components/CartItem/CartItem.hooks.js +0 -7
  376. package/cart/components/CartItem/CartItem.js +0 -7
  377. package/cart/components/CartItem/CartItem.style.js +0 -1
  378. package/cart/components/CartItem/CartItemCoupon.connector.js +0 -7
  379. package/cart/components/CartItem/CartItemCoupon.js +0 -20
  380. package/cart/components/CartItem/CartItemCoupon.style.js +0 -5
  381. package/cart/components/CartItem/CartItemCoupon.types.js +0 -0
  382. package/cart/components/CartItem/CartItemCouponCode.js +0 -5
  383. package/cart/components/CartItem/CartItemCouponDelete.js +0 -5
  384. package/cart/components/CartItem/CartItemCouponDelete.style.js +0 -1
  385. package/cart/components/CartItem/CartItemCouponFreeShipping.js +0 -5
  386. package/cart/components/CartItem/CartItemCouponIcon.js +0 -4
  387. package/cart/components/CartItem/CartItemCouponLayout.js +0 -6
  388. package/cart/components/CartItem/CartItemCouponLayout.style.js +0 -5
  389. package/cart/components/CartItem/CartItemCouponPrice.js +0 -5
  390. package/cart/components/CartItem/CartItemCouponPrice.style.js +0 -1
  391. package/cart/components/CartItem/CartItemCouponTitle.js +0 -5
  392. package/cart/components/CartItem/CartItemCouponTitle.style.js +0 -1
  393. package/cart/components/CartItem/CartItemProduct.js +0 -5
  394. package/cart/components/CartItem/CartItemProduct.style.js +0 -1
  395. package/cart/components/CartItem/CartItemProductLayout.js +0 -6
  396. package/cart/components/CartItem/CartItemProductLayout.style.js +0 -1
  397. package/cart/components/CartItem/CartItemProductLayoutWide.js +0 -4
  398. package/cart/components/CartItem/CartItemProductLayoutWide.style.js +0 -1
  399. package/cart/components/CartItem/CartItemProductLayoutWideFulfillmentLabel.js +0 -4
  400. package/cart/components/CartItem/CartItemProductLayoutWideFulfillmentLabel.style.js +0 -1
  401. package/cart/components/CartItem/CartItemProductLayoutWideOrderDetails.js +0 -3
  402. package/cart/components/CartItem/CartItemProductLayoutWideRemoveItem.js +0 -4
  403. package/cart/components/CartItem/CartItemProductLayoutWideRemoveItem.style.js +0 -1
  404. package/cart/components/CartItem/CartItemProductOrderDetails.js +0 -3
  405. package/cart/components/CartItem/CartItemProductOrderDetails.style.js +0 -1
  406. package/cart/components/CartItem/CartItemProductPriceCaption.js +0 -4
  407. package/cart/components/CartItem/CartItemProductPriceCaption.style.js +0 -1
  408. package/cart/components/CartItem/CartItemProductPriceList.js +0 -5
  409. package/cart/components/CartItem/CartItemProductPriceListPromotion.js +0 -10
  410. package/cart/components/CartItem/CartItemProductProvider.connector.js +0 -9
  411. package/cart/components/CartItem/CartItemProductProvider.context.js +0 -1
  412. package/cart/components/CartItem/CartItemProductProvider.js +0 -12
  413. package/cart/components/CartItem/CartItemProductProvider.types.js +0 -1
  414. package/cart/components/CartItem/CartItemProductProviderLegacy.js +0 -22
  415. package/cart/components/CartItem/CartItemProductTitle.js +0 -7
  416. package/cart/components/CartItem/CartItemProductTitle.style.js +0 -1
  417. package/cart/components/CartItem/CartItemProvider.connector.js +0 -3
  418. package/cart/components/CartItem/CartItemProvider.context.js +0 -1
  419. package/cart/components/CartItem/CartItemProvider.js +0 -5
  420. package/cart/components/CartItem/CartItemQuantityPicker.js +0 -38
  421. package/cart/components/CartItem/CartItemQuantityPicker.style.js +0 -1
  422. package/cart/components/CartItem/CartItemSubstitution.connector.js +0 -5
  423. package/cart/components/CartItem/CartItemSubstitution.js +0 -5
  424. package/cart/components/CartItem/CartItemSubstitution.style.js +0 -1
  425. package/cart/components/CartItem/index.js +0 -1
  426. package/cart/components/CartItems/CartItem.connector.js +0 -4
  427. package/cart/components/CartItems/CartItemCard.js +0 -5
  428. package/cart/components/CartItems/CartItemCard.style.js +0 -1
  429. package/cart/components/CartItems/CartItemCardReservation.js +0 -5
  430. package/cart/components/CartItems/CartItemCardReservationAccordion.js +0 -4
  431. package/cart/components/CartItems/CartItemCardReservationLabel.js +0 -5
  432. package/cart/components/CartItems/CartItemCardReservationLabelChangeStore.js +0 -3
  433. package/cart/components/CartItems/CartItemCardReservationLabelChangeStore.style.js +0 -1
  434. package/cart/components/CartItems/CartItemGroup.js +0 -5
  435. package/cart/components/CartItems/CartItemGroup.style.js +0 -1
  436. package/cart/components/CartItems/CartItemGroupReservation.js +0 -5
  437. package/cart/components/CartItems/CartItemGroupReservationLabel.js +0 -5
  438. package/cart/components/CartItems/CartItemGroupShipping.js +0 -4
  439. package/cart/components/CartItems/CartItems.js +0 -5
  440. package/cart/components/CartItems/CartItems.style.js +0 -1
  441. package/cart/components/CartItems/CartItemsHeaderWide.connector.js +0 -3
  442. package/cart/components/CartItems/CartItemsHeaderWide.js +0 -3
  443. package/cart/components/CartItems/CartItemsHeaderWide.style.js +0 -1
  444. package/cart/components/CartItems/CartItemsSubscription.connector.js +0 -5
  445. package/cart/components/CartItems/CartItemsSubstitution.js +0 -5
  446. package/cart/components/CartItems/index.js +0 -1
  447. package/cart/components/CartSummaryWide/CartSummaryWide.connector.js +0 -4
  448. package/cart/components/CartSummaryWide/CartSummaryWide.js +0 -4
  449. package/cart/components/CartSummaryWide/CartSummaryWide.style.js +0 -1
  450. package/cart/components/CartSummaryWide/CartSummaryWideCheckoutButton.connector.js +0 -5
  451. package/cart/components/CartSummaryWide/CartSummaryWideCheckoutButton.js +0 -4
  452. package/cart/components/CartSummaryWide/CartSummaryWideCheckoutButton.style.js +0 -1
  453. package/cart/components/CartSummaryWide/CartSummaryWideFooter.js +0 -3
  454. package/cart/components/CartSummaryWide/index.js +0 -1
  455. package/cart/components/PaymentBar/PaymentBar.js +0 -5
  456. package/cart/components/PaymentBar/PaymentBarAppliedPromotions.connector.js +0 -5
  457. package/cart/components/PaymentBar/PaymentBarAppliedPromotions.js +0 -3
  458. package/cart/components/PaymentBar/PaymentBarCheckoutButton.connector.js +0 -5
  459. package/cart/components/PaymentBar/PaymentBarCheckoutButton.js +0 -5
  460. package/cart/components/PaymentBar/PaymentBarCheckoutButton.style.js +0 -1
  461. package/cart/components/PaymentBar/PaymentBarContent.js +0 -4
  462. package/cart/components/PaymentBar/PaymentBarContent.style.js +0 -1
  463. package/cart/components/PaymentBar/PaymentBarDiscounts.connector.js +0 -5
  464. package/cart/components/PaymentBar/PaymentBarDiscounts.js +0 -4
  465. package/cart/components/PaymentBar/PaymentBarGrandTotal.connector.js +0 -5
  466. package/cart/components/PaymentBar/PaymentBarGrandTotal.js +0 -4
  467. package/cart/components/PaymentBar/PaymentBarPromotionCouponMessages.js +0 -4
  468. package/cart/components/PaymentBar/PaymentBarPromotionCoupons.connector.js +0 -8
  469. package/cart/components/PaymentBar/PaymentBarPromotionCoupons.js +0 -3
  470. package/cart/components/PaymentBar/PaymentBarPromotionalText.js +0 -4
  471. package/cart/components/PaymentBar/PaymentBarReserveButton.connector.js +0 -1
  472. package/cart/components/PaymentBar/PaymentBarReserveButton.js +0 -7
  473. package/cart/components/PaymentBar/PaymentBarShippingCost.connector.js +0 -5
  474. package/cart/components/PaymentBar/PaymentBarShippingCost.js +0 -3
  475. package/cart/components/PaymentBar/PaymentBarSubTotal.connector.js +0 -5
  476. package/cart/components/PaymentBar/PaymentBarSubTotal.js +0 -3
  477. package/cart/components/PaymentBar/PaymentBarTax.connector.js +0 -5
  478. package/cart/components/PaymentBar/PaymentBarTax.js +0 -4
  479. package/cart/components/PaymentBar/index.js +0 -1
  480. package/cart/components/Substitution/connector.js +0 -5
  481. package/cart/components/Substitution/index.js +0 -9
  482. package/cart/components/Substitution/style.js +0 -1
  483. package/cart/components/SupplementalContent/SupplementalContent.connector.js +0 -4
  484. package/cart/components/SupplementalContent/SupplementalContent.js +0 -5
  485. package/cart/components/SupplementalContent/SupplementalContent.styles.js +0 -1
  486. package/cart/components/SupplementalContent/index.js +0 -1
  487. package/cart/streams/index.js +0 -1
  488. package/category/actions/index.js +0 -1
  489. package/category/components/CategoryImage/connector.js +0 -5
  490. package/category/components/CategoryImage/index.js +0 -5
  491. package/category/components/index.js +0 -1
  492. package/category/constants/index.js +0 -1
  493. package/category/helpers/index.js +0 -1
  494. package/category/selectors/index.js +0 -2
  495. package/category/streams/index.js +0 -1
  496. package/checkout/action-creators/addCheckoutCampaign.js +0 -5
  497. package/checkout/action-creators/clearCheckoutCampaign.js +0 -5
  498. package/checkout/action-creators/clearCheckoutOrder.js +0 -4
  499. package/checkout/action-creators/index.js +0 -1
  500. package/checkout/action-creators/validationErrorsCheckout.js +0 -5
  501. package/checkout/actions/errorCheckout.js +0 -17
  502. package/checkout/actions/fetchCheckoutOrder.js +0 -4
  503. package/checkout/actions/fetchPaymentMethods.js +0 -4
  504. package/checkout/actions/index.js +0 -1
  505. package/checkout/actions/initializeCheckout.js +0 -4
  506. package/checkout/actions/prepareCheckout.js +0 -8
  507. package/checkout/actions/submitCheckoutOrder.js +0 -5
  508. package/checkout/actions/updateCheckoutOrder.js +0 -5
  509. package/checkout/components/AddressBook/AddressBook.js +0 -5
  510. package/checkout/components/AddressBook/AddressList.js +0 -9
  511. package/checkout/components/AddressBook/index.js +0 -1
  512. package/checkout/components/AddressBookContact/AddressBookContact.js +0 -5
  513. package/checkout/components/AddressBookContact/index.js +0 -1
  514. package/checkout/components/Checkout/Checkout.js +0 -4
  515. package/checkout/components/Checkout/CheckoutActions.js +0 -4
  516. package/checkout/components/Checkout/CheckoutAddress.js +0 -6
  517. package/checkout/components/Checkout/CheckoutHeader.js +0 -4
  518. package/checkout/components/Checkout/CheckoutPickupContactForm.config.js +0 -8
  519. package/checkout/components/Checkout/CheckoutPickupContactForm.js +0 -4
  520. package/checkout/components/Checkout/CheckoutSection.js +0 -4
  521. package/checkout/components/Checkout/CheckoutSectionInfo.js +0 -4
  522. package/checkout/components/Checkout/CheckoutSectionMessages.js +0 -4
  523. package/checkout/components/Checkout/CheckoutSummary.js +0 -4
  524. package/checkout/components/CheckoutConfirmation/CheckoutConfirmation.connector.js +0 -3
  525. package/checkout/components/CheckoutConfirmation/CheckoutConfirmation.js +0 -7
  526. package/checkout/components/CheckoutConfirmation/CheckoutConfirmationBilledTo.js +0 -4
  527. package/checkout/components/CheckoutConfirmation/CheckoutConfirmationOrderContact.js +0 -4
  528. package/checkout/components/CheckoutConfirmation/CheckoutConfirmationOrderSummary.js +0 -4
  529. package/checkout/components/CheckoutConfirmation/CheckoutConfirmationPickUpContact.js +0 -4
  530. package/checkout/components/CheckoutConfirmation/CheckoutConfirmationPickupNotes.js +0 -4
  531. package/checkout/components/CheckoutConfirmation/CheckoutConfirmationSection.js +0 -4
  532. package/checkout/components/CheckoutConfirmation/CheckoutConfirmationShippedTo.js +0 -4
  533. package/checkout/components/CheckoutConfirmation/index.js +0 -1
  534. package/checkout/components/GuestCheckout/GuestCheckout.js +0 -4
  535. package/checkout/components/GuestCheckout/GuestCheckoutOptIn.config.js +0 -4
  536. package/checkout/components/GuestCheckout/GuestCheckoutOptIn.js +0 -3
  537. package/checkout/components/GuestCheckout/GuestCheckoutPickup.js +0 -4
  538. package/checkout/components/GuestCheckout/GuestCheckoutPickupNotes.config.js +0 -4
  539. package/checkout/components/GuestCheckout/GuestCheckoutPickupNotes.js +0 -4
  540. package/checkout/components/PaymentMethodButton/PaymentMethodButton.js +0 -5
  541. package/checkout/components/PaymentMethodButton/index.js +0 -1
  542. package/checkout/components/ResponsiveBackButton/ResponsiveBackButton.js +0 -4
  543. package/checkout/components/ResponsiveBackButton/ResponsiveBackButton.style.js +0 -1
  544. package/checkout/components/ResponsiveBackButton/index.js +0 -1
  545. package/checkout/components/ShippingMethods/ShippingMethod.js +0 -5
  546. package/checkout/components/ShippingMethods/ShippingMethods.js +0 -23
  547. package/checkout/components/ShippingMethods/connector.js +0 -7
  548. package/checkout/components/ShippingMethods/index.js +0 -1
  549. package/checkout/components/SupplementalContent/SupplementalContent.connector.js +0 -4
  550. package/checkout/components/SupplementalContent/SupplementalContent.js +0 -5
  551. package/checkout/components/SupplementalContent/SupplementalContent.styles.js +0 -1
  552. package/checkout/components/SupplementalContent/index.js +0 -1
  553. package/checkout/components/index.js +0 -1
  554. package/checkout/constants/actionTypes.js +0 -1
  555. package/checkout/constants/errorCodes.js +0 -1
  556. package/checkout/constants/index.js +0 -1
  557. package/checkout/constants/routes.js +0 -1
  558. package/checkout/helpers/index.js +0 -34
  559. package/checkout/hooks/common.js +0 -7
  560. package/checkout/paymentMethods/context.js +0 -1
  561. package/checkout/paymentMethods/index.js +0 -28
  562. package/checkout/paymentMethods/paypal/PaypalButton.js +0 -5
  563. package/checkout/paymentMethods/paypal/PaypalButtonApp.js +0 -4
  564. package/checkout/paymentMethods/paypal/PaypalButtonWeb.js +0 -8
  565. package/checkout/paymentMethods/paypal/PaypalPayButton.js +0 -12
  566. package/checkout/paymentMethods/paypal/PaypalProvider.js +0 -6
  567. package/checkout/paymentMethods/paypal/index.js +0 -1
  568. package/checkout/paymentMethods/paypal/paypal_logo.png +0 -0
  569. package/checkout/paymentMethods/paypal/sdk.js +0 -9
  570. package/checkout/paymentMethods/stripe/StripeButton.connector.js +0 -6
  571. package/checkout/paymentMethods/stripe/StripeButton.js +0 -5
  572. package/checkout/paymentMethods/stripe/StripeCreditCard.js +0 -10
  573. package/checkout/paymentMethods/stripe/StripePayButton.js +0 -6
  574. package/checkout/paymentMethods/stripe/StripeProvider.connector.js +0 -6
  575. package/checkout/paymentMethods/stripe/StripeProvider.context.js +0 -1
  576. package/checkout/paymentMethods/stripe/StripeProvider.js +0 -33
  577. package/checkout/paymentMethods/stripe/applepay.svg +0 -84
  578. package/checkout/paymentMethods/stripe/googlepay.png +0 -0
  579. package/checkout/paymentMethods/stripe/index.js +0 -1
  580. package/checkout/paymentMethods/stripe/sdk.js +0 -9
  581. package/checkout/providers/AddressBookProvider.context.js +0 -1
  582. package/checkout/providers/AddressBookProvider.js +0 -11
  583. package/checkout/providers/CheckoutProvider.connector.js +0 -7
  584. package/checkout/providers/CheckoutProvider.constraints.js +0 -1
  585. package/checkout/providers/CheckoutProvider.context.js +0 -1
  586. package/checkout/providers/CheckoutProvider.js +0 -28
  587. package/checkout/reducers/index.js +0 -6
  588. package/checkout/selectors/campaign.js +0 -5
  589. package/checkout/selectors/guestCheckout.js +0 -5
  590. package/checkout/selectors/order.js +0 -59
  591. package/checkout/selectors/payment.js +0 -17
  592. package/checkout/selectors/route.js +0 -4
  593. package/checkout/streams/index.js +0 -1
  594. package/checkout/subscriptions/index.js +0 -3
  595. package/components/BrandingColorBanner/BrandingColorBanner.js +0 -5
  596. package/components/BrandingColorBanner/index.js +0 -1
  597. package/components/ConditionalWrapper/ConditionalWrapper.js +0 -10
  598. package/components/ConnectedReactPortal/index.js +0 -13
  599. package/components/Footer/constants.js +0 -1
  600. package/components/Footer/helpers.js +0 -75
  601. package/components/Form/Builder/ElementMultiSelect.js +0 -6
  602. package/components/Form/Builder/ElementPhoneNumber.js +0 -20
  603. package/components/Form/Builder/FormHelper.js +0 -5
  604. package/components/Form/Builder/helpers/common.js +0 -6
  605. package/components/Form/Builder/stylePresets.js +0 -1
  606. package/components/Logo/connector.js +0 -4
  607. package/components/Menu/components/Item/index.js +0 -8
  608. package/components/Menu/components/Item/style.js +0 -4
  609. package/components/Menu/components/Position/index.js +0 -16
  610. package/components/Menu/components/Position/style.js +0 -1
  611. package/components/Menu/index.js +0 -12
  612. package/components/Menu/style.js +0 -1
  613. package/components/MessageBar/MessageBar.js +0 -9
  614. package/components/MessageBar/MessageBar.style.js +0 -11
  615. package/components/QuantityLabel/QuantityLabel.js +0 -4
  616. package/components/QuantityLabel/index.js +0 -1
  617. package/components/Radio/Radio.js +0 -5
  618. package/components/Radio/index.js +0 -1
  619. package/components/RadioCard/RadioCard.js +0 -9
  620. package/components/RadioCard/index.js +0 -1
  621. package/components/RadioGroup/RadioGroup.context.js +0 -1
  622. package/components/RadioGroup/RadioGroup.js +0 -4
  623. package/components/RadioGroup/index.js +0 -1
  624. package/components/RadioGroup/useRadioGroup.js +0 -4
  625. package/components/ResponsiveContainer/ResponsiveContainer.js +0 -6
  626. package/components/ResponsiveContainer/breakpoints.js +0 -14
  627. package/components/ResponsiveContainer/condition.js +0 -6
  628. package/components/ResponsiveContainer/hooks.js +0 -20
  629. package/components/ResponsiveContainer/index.js +0 -1
  630. package/components/ResponsiveContainer/listener.js +0 -10
  631. package/components/ResponsiveContainer/mediaQuery.js +0 -8
  632. package/components/SideNavigation/SideNavigation.hooks.js +0 -4
  633. package/components/SideNavigation/SideNavigation.js +0 -4
  634. package/components/SideNavigation/SideNavigationCategories.connector.js +0 -8
  635. package/components/SideNavigation/SideNavigationCategories.js +0 -4
  636. package/components/SideNavigation/SideNavigationCategories.style.js +0 -1
  637. package/components/SideNavigation/SideNavigationCategoriesItem.connector.js +0 -8
  638. package/components/SideNavigation/SideNavigationCategoriesItem.js +0 -5
  639. package/components/SideNavigation/SideNavigationCategoriesItem.style.js +0 -2
  640. package/components/SideNavigation/SideNavigationCategoriesItemChildren.js +0 -5
  641. package/components/SideNavigation/SideNavigationContent.js +0 -3
  642. package/components/SideNavigation/SideNavigationContent.style.js +0 -4
  643. package/components/SideNavigation/SideNavigationItem.js +0 -4
  644. package/components/SideNavigation/SideNavigationItem.style.js +0 -4
  645. package/components/SideNavigation/SideNavigationLinks.js +0 -4
  646. package/components/SideNavigation/SideNavigationLinksLegal.connector.js +0 -4
  647. package/components/SideNavigation/SideNavigationLinksLegal.js +0 -5
  648. package/components/SideNavigation/SideNavigationLinksQuicklinks.connector.js +0 -4
  649. package/components/SideNavigation/SideNavigationLinksQuicklinks.js +0 -5
  650. package/components/SideNavigation/SideNavigationNestedItem.js +0 -4
  651. package/components/SideNavigation/SideNavigationProvider.connector.js +0 -8
  652. package/components/SideNavigation/SideNavigationProvider.context.js +0 -1
  653. package/components/SideNavigation/SideNavigationProvider.js +0 -4
  654. package/components/SideNavigation/index.js +0 -1
  655. package/components/SideNavigation/selectors.js +0 -17
  656. package/components/Tabs/TabContext.js +0 -7
  657. package/components/Tabs/components/Tab.js +0 -11
  658. package/components/Tabs/components/Tab.style.js +0 -1
  659. package/components/Tabs/components/TabIndicator.js +0 -5
  660. package/components/Tabs/components/TabIndicator.style.js +0 -1
  661. package/components/Tabs/components/TabPanel.js +0 -5
  662. package/components/Tabs/components/Tabs.js +0 -11
  663. package/components/Tabs/components/Tabs.style.js +0 -2
  664. package/components/Tabs/debounce.js +0 -11
  665. package/components/Tabs/index.js +0 -1
  666. package/components/Tabs/ownerDocument.js +0 -4
  667. package/components/Tabs/ownerWindow.js +0 -4
  668. package/components/Tabs/useEventCallback.js +0 -6
  669. package/components/TextLink/TextLink.js +0 -5
  670. package/components/TextLink/TextLink.style.js +0 -1
  671. package/components/Toggle/index.js +0 -5
  672. package/components/Toggle/style.js +0 -1
  673. package/core/action-creators/merchantSettings.js +0 -5
  674. package/core/action-creators/optIns.js +0 -37
  675. package/core/action-creators/shopSettings.js +0 -9
  676. package/core/classes/GeolocationRequestApp.js +0 -16
  677. package/core/classes/GeolocationRequestBrowser.js +0 -8
  678. package/core/config/config.action-creators.js +0 -12
  679. package/core/config/config.actions.js +0 -3
  680. package/core/config/config.constants.js +0 -1
  681. package/core/config/config.reducers.js +0 -6
  682. package/core/config/config.selectors.js +0 -39
  683. package/core/config/config.streams.js +0 -1
  684. package/core/config/config.subscriptions.js +0 -4
  685. package/core/config/config.types.js +0 -0
  686. package/core/config/index.js +0 -1
  687. package/core/constants/deviceTypes.js +0 -1
  688. package/core/constants/merchantSettings.js +0 -1
  689. package/core/constants/optIns.js +0 -1
  690. package/core/constants/pipelines.js +0 -1
  691. package/core/constants/shopSettings.js +0 -2
  692. package/core/contexts/ThemeResourcesContext.d.ts +0 -60
  693. package/core/contexts/ThemeResourcesContext.js +0 -3
  694. package/core/contexts/index.js +0 -1
  695. package/core/events/index.js +0 -1
  696. package/core/helpers/androidNavigationBar.js +0 -12
  697. package/core/helpers/appPermissions.js +0 -58
  698. package/core/helpers/bridge.js +0 -4
  699. package/core/helpers/deviceType.js +0 -5
  700. package/core/helpers/environment.js +0 -4
  701. package/core/helpers/errorBehavior.js +0 -32
  702. package/core/helpers/featureFlag.js +0 -11
  703. package/core/helpers/googleMaps.js +0 -8
  704. package/core/helpers/isIOSTheme.js +0 -4
  705. package/core/helpers/isTouchDevice.js +0 -4
  706. package/core/helpers/nl2br.js +0 -1
  707. package/core/helpers/scrollContainer.js +0 -4
  708. package/core/helpers/string.js +0 -9
  709. package/core/helpers/svgToDataUrl.js +0 -9
  710. package/core/hocs/index.js +0 -1
  711. package/core/hocs/withThemeResources.js +0 -16
  712. package/core/hooks/events/index.js +0 -1
  713. package/core/hooks/events/useLongPress.d.ts +0 -68
  714. package/core/hooks/events/useLongPress.js +0 -13
  715. package/core/hooks/events/useScrollDirectionChange.d.ts +0 -74
  716. package/core/hooks/events/useScrollDirectionChange.js +0 -18
  717. package/core/hooks/index.js +0 -1
  718. package/core/hooks/layout/index.js +0 -1
  719. package/core/hooks/layout/useElementSize.d.ts +0 -46
  720. package/core/hooks/layout/useElementSize.js +0 -18
  721. package/core/hooks/useAsyncMemo.js +0 -12
  722. package/core/hooks/useFormState.js +0 -27
  723. package/core/hooks/usePrevious.js +0 -2
  724. package/core/hooks/useScrollTo.js +0 -5
  725. package/core/hooks/useThemeResources.js +0 -21
  726. package/core/providers/ThemeResourcesProvider.js +0 -15
  727. package/core/providers/index.js +0 -1
  728. package/core/reducers/merchantSettings.js +0 -6
  729. package/core/reducers/shopSettings.js +0 -6
  730. package/core/selectors/merchantSettings.js +0 -10
  731. package/core/selectors/shopSettings.js +0 -25
  732. package/core/streams/optIns.js +0 -13
  733. package/core/validation/index.js +0 -1
  734. package/core/validation/validation.hooks.js +0 -4
  735. package/core/validation/validation.js +0 -12
  736. package/development/action-creators/index.js +0 -1
  737. package/development/action-creators/settings.js +0 -9
  738. package/development/action-creators/storage.js +0 -6
  739. package/development/components/DevelopmentTools/DevelopmentTools.js +0 -6
  740. package/development/components/DevelopmentTools/Shortcuts.js +0 -4
  741. package/development/components/DevelopmentTools/hooks.js +0 -8
  742. package/development/components/DevelopmentTools/index.js +0 -1
  743. package/development/components/SimulatedInsets/SimulatedInsetBottom.js +0 -7
  744. package/development/components/SimulatedInsets/SimulatedInsetTop.js +0 -12
  745. package/development/components/SimulatedInsets/SimulatedInsets.js +0 -6
  746. package/development/components/SimulatedInsets/index.js +0 -1
  747. package/development/components/index.js +0 -1
  748. package/development/constants/actionTypes.js +0 -1
  749. package/development/constants/index.js +0 -1
  750. package/development/reducers/index.js +0 -1
  751. package/development/reducers/settings.js +0 -10
  752. package/development/reducers/storage.js +0 -9
  753. package/development/selectors/index.js +0 -1
  754. package/development/selectors/settings.js +0 -21
  755. package/development/selectors/storage.js +0 -16
  756. package/development/streams/index.js +0 -1
  757. package/development/streams/insets.js +0 -4
  758. package/development/subscriptions/index.js +0 -6
  759. package/favorites/components/CommentDialog/CommentDialog.js +0 -12
  760. package/favorites/components/CommentDialog/index.js +0 -1
  761. package/favorites/components/FavoriteButtonWide/FavoriteButtonWide.js +0 -8
  762. package/favorites/components/FavoriteButtonWide/index.js +0 -1
  763. package/favorites/components/Item/ItemNotes.js +0 -7
  764. package/favorites/components/Item/ItemQuantity.js +0 -7
  765. package/favorites/components/ItemFulfillmentMethod/ItemFulfillmentMethod.js +0 -4
  766. package/favorites/components/ItemFulfillmentMethod/index.js +0 -1
  767. package/favorites/components/List/ListAccordionHeader.js +0 -8
  768. package/favorites/components/List/ListAccordionLabel.js +0 -5
  769. package/favorites/components/List/ListContent.js +0 -8
  770. package/favorites/components/List/ListItemWrapper.js +0 -6
  771. package/favorites/components/List/styles.js +0 -1
  772. package/favorites/constants/index.js +0 -1
  773. package/filter/actions/index.js +0 -1
  774. package/filter/components/FilterPageContent/components/ApplyButton/index.js +0 -7
  775. package/filter/components/FilterPageContent/components/ApplyButton/spec.js +0 -1
  776. package/filter/components/FilterPageContent/components/ApplyButton/style.js +0 -1
  777. package/filter/components/FilterPageContent/components/ResetButton/index.js +0 -7
  778. package/filter/components/FilterPageContent/components/ResetButton/spec.js +0 -1
  779. package/filter/components/FilterPageContent/components/ResetButton/style.js +0 -1
  780. package/filter/components/FilterPageContent/components/Selector/components/Selected/index.js +0 -7
  781. package/filter/components/FilterPageContent/components/Selector/components/Selected/spec.js +0 -1
  782. package/filter/components/FilterPageContent/components/Selector/components/Selected/style.js +0 -1
  783. package/filter/components/FilterPageContent/components/Selector/components/Toggle/index.js +0 -7
  784. package/filter/components/FilterPageContent/components/Selector/components/Toggle/spec.js +0 -1
  785. package/filter/components/FilterPageContent/components/Selector/components/Toggle/style.js +0 -1
  786. package/filter/components/FilterPageContent/components/Selector/components/ValueButton/index.js +0 -7
  787. package/filter/components/FilterPageContent/components/Selector/components/ValueButton/spec.js +0 -1
  788. package/filter/components/FilterPageContent/components/Selector/components/ValueButton/style.js +0 -1
  789. package/filter/components/FilterPageContent/components/Selector/index.js +0 -19
  790. package/filter/components/FilterPageContent/components/Selector/spec.js +0 -1
  791. package/filter/components/FilterPageContent/components/Selector/style.js +0 -1
  792. package/filter/components/FilterPageContent/index.js +0 -6
  793. package/filter/components/FilterPageContentWithProvider/index.js +0 -16
  794. package/filter/components/index.js +0 -1
  795. package/filter/constants/index.js +0 -1
  796. package/filter/constants/sort.js +0 -11
  797. package/filter/helpers/index.js +0 -1
  798. package/filter/hocs/index.js +0 -1
  799. package/filter/hocs/withSort.js +0 -16
  800. package/filter/hooks/filterPage.js +0 -5
  801. package/filter/hooks/index.js +0 -4
  802. package/filter/providers/FilterPageProvider.context.js +0 -54
  803. package/filter/providers/FilterPageProvider.js +0 -98
  804. package/filter/providers/SortProvider.connector.js +0 -3
  805. package/filter/providers/SortProvider.context.js +0 -1
  806. package/filter/providers/SortProvider.helpers.js +0 -8
  807. package/filter/providers/SortProvider.js +0 -6
  808. package/filter/providers/index.js +0 -1
  809. package/filter/selectors/index.js +0 -17
  810. package/filter/streams/index.js +0 -1
  811. package/i18n/countries.helpers.js +0 -6
  812. package/i18n/countries.hooks.js +0 -6
  813. package/i18n/index.js +0 -1
  814. package/i18n/locale/cs-cz/countries.json +0 -255
  815. package/i18n/locale/de-de/countries.json +0 -255
  816. package/i18n/locale/el-gr/countries.json +0 -255
  817. package/i18n/locale/en-us/countries.json +0 -255
  818. package/i18n/locale/es-es/countries.json +0 -255
  819. package/i18n/locale/fi-fi/countries.json +0 -255
  820. package/i18n/locale/fr-fr/countries.json +0 -255
  821. package/i18n/locale/hu-hu/countries.json +0 -255
  822. package/i18n/locale/it-it/countries.json +0 -255
  823. package/i18n/locale/nl-nl/countries.json +0 -255
  824. package/i18n/locale/pl-pl/countries.json +0 -255
  825. package/i18n/locale/pt-pt/countries.json +0 -255
  826. package/i18n/locale/ro-ro/countries.json +0 -255
  827. package/i18n/locale/sv-se/countries.json +0 -255
  828. package/locations/action-creators/errorInventories.js +0 -7
  829. package/locations/action-creators/errorLocations.js +0 -6
  830. package/locations/action-creators/errorProductInventories.js +0 -7
  831. package/locations/action-creators/errorProductLocations.js +0 -6
  832. package/locations/action-creators/index.js +0 -1
  833. package/locations/action-creators/provideProductAlternativeLocation.js +0 -5
  834. package/locations/action-creators/receiveInventories.js +0 -5
  835. package/locations/action-creators/receiveLocations.js +0 -6
  836. package/locations/action-creators/receiveProductInventories.js +0 -7
  837. package/locations/action-creators/receiveProductLocations.js +0 -7
  838. package/locations/action-creators/requestInventories.js +0 -6
  839. package/locations/action-creators/requestLocations.js +0 -5
  840. package/locations/action-creators/requestProductInventories.js +0 -6
  841. package/locations/action-creators/requestProductLocations.js +0 -5
  842. package/locations/action-creators/selectGlobalLocation.js +0 -5
  843. package/locations/action-creators/selectLocation.js +0 -6
  844. package/locations/action-creators/setStoreFinderSearchRadius.js +0 -5
  845. package/locations/action-creators/setUserGeolocation.js +0 -5
  846. package/locations/action-creators/setUserSearchCountryCode.js +0 -7
  847. package/locations/action-creators/setUserSearchGeolocation.js +0 -8
  848. package/locations/action-creators/setUserSearchPostalCode.js +0 -7
  849. package/locations/action-creators/storeFormInput.js +0 -5
  850. package/locations/action-creators/storeFulfillmentMethod.js +0 -5
  851. package/locations/action-creators/submitReservationError.js +0 -5
  852. package/locations/action-creators/submitReservationRequest.js +0 -5
  853. package/locations/action-creators/submitReservationSuccess.js +0 -5
  854. package/locations/actions/fetchDefaultLocation.js +0 -4
  855. package/locations/actions/fetchFulfillmentSlots.js +0 -6
  856. package/locations/actions/fetchInventories.js +0 -6
  857. package/locations/actions/fetchLocations.js +0 -19
  858. package/locations/actions/fetchProductInventories.js +0 -7
  859. package/locations/actions/fetchProductLocations.js +0 -12
  860. package/locations/actions/index.js +0 -5
  861. package/locations/actions/sendDefaultLocationCode.js +0 -6
  862. package/locations/actions/setUserGeolocation.js +0 -1
  863. package/locations/actions/setUserSearchGeolocation.js +0 -1
  864. package/locations/actions/submitReservation.js +0 -5
  865. package/locations/assets/leaflet.css +0 -765
  866. package/locations/components/Cart/CartChangeFulfillmentMethod.connector.js +0 -4
  867. package/locations/components/Cart/CartChangeFulfillmentMethod.js +0 -8
  868. package/locations/components/Cart/CartChangeFulfillmentMethod.types.js +0 -0
  869. package/locations/components/Cart/CartContextMenuChangeFulfillment.js +0 -6
  870. package/locations/components/Cart/CartContextMenuChangeFulfillmentContent.js +0 -5
  871. package/locations/components/Cart/CartContextMenuChangeFulfillmentContent.style.js +0 -1
  872. package/locations/components/Cart/CartContextMenuItemChangeFulfillment.connector.js +0 -4
  873. package/locations/components/Cart/CartContextMenuItemChangeFulfillment.js +0 -6
  874. package/locations/components/Cart/CartContextMenuItemChangeLocation.js +0 -7
  875. package/locations/components/Cart/CartItemProductChangeLocation.connector.js +0 -5
  876. package/locations/components/Cart/CartItemProductChangeLocation.js +0 -11
  877. package/locations/components/Cart/CartItemProductChangeLocation.types.js +0 -0
  878. package/locations/components/Cart/index.js +0 -1
  879. package/locations/components/ChangeLocationButton/ChangeLocationButton.js +0 -4
  880. package/locations/components/ChangeLocationButton/ChangeLocationButton.style.js +0 -2
  881. package/locations/components/ChangeLocationButton/index.js +0 -1
  882. package/locations/components/FulfillmentPath/FulfillmentPath.js +0 -4
  883. package/locations/components/FulfillmentPath/FulfillmentPath.style.js +0 -2
  884. package/locations/components/FulfillmentPath/FulfillmentPathItem.js +0 -6
  885. package/locations/components/FulfillmentPath/index.js +0 -1
  886. package/locations/components/FulfillmentPathSelector/FulfillmentPathSelector.js +0 -14
  887. package/locations/components/FulfillmentPathSelector/FulfillmentPathSelector.style.js +0 -1
  888. package/locations/components/FulfillmentPathSelector/index.js +0 -1
  889. package/locations/components/FulfillmentSelector/FulfillmentSelector.connector.js +0 -9
  890. package/locations/components/FulfillmentSelector/FulfillmentSelector.context.js +0 -1
  891. package/locations/components/FulfillmentSelector/FulfillmentSelector.hooks.js +0 -3
  892. package/locations/components/FulfillmentSelector/FulfillmentSelector.js +0 -20
  893. package/locations/components/FulfillmentSelector/FulfillmentSelector.style.js +0 -1
  894. package/locations/components/FulfillmentSelector/FulfillmentSelector.types.js +0 -1
  895. package/locations/components/FulfillmentSelector/FulfillmentSelectorAddToCart.js +0 -10
  896. package/locations/components/FulfillmentSelector/FulfillmentSelectorAlternativeLocation.js +0 -8
  897. package/locations/components/FulfillmentSelector/FulfillmentSelectorBOPIS.js +0 -4
  898. package/locations/components/FulfillmentSelector/FulfillmentSelectorDirectShip.js +0 -5
  899. package/locations/components/FulfillmentSelector/FulfillmentSelectorHeader.js +0 -4
  900. package/locations/components/FulfillmentSelector/FulfillmentSelectorHeader.style.js +0 -1
  901. package/locations/components/FulfillmentSelector/FulfillmentSelectorImpossibleError.js +0 -4
  902. package/locations/components/FulfillmentSelector/FulfillmentSelectorImpossibleError.style.js +0 -1
  903. package/locations/components/FulfillmentSelector/FulfillmentSelectorItem.js +0 -8
  904. package/locations/components/FulfillmentSelector/FulfillmentSelectorItem.style.js +0 -1
  905. package/locations/components/FulfillmentSelector/FulfillmentSelectorLocation.js +0 -4
  906. package/locations/components/FulfillmentSelector/FulfillmentSelectorLocation.style.js +0 -1
  907. package/locations/components/FulfillmentSelector/FulfillmentSelectorLocationMethodNotAvailable.js +0 -3
  908. package/locations/components/FulfillmentSelector/FulfillmentSelectorROPIS.js +0 -4
  909. package/locations/components/FulfillmentSelector/index.js +0 -1
  910. package/locations/components/FulfillmentSheet/FulfillmentSheet.js +0 -6
  911. package/locations/components/FulfillmentSheet/FulfillmentSheet.style.js +0 -1
  912. package/locations/components/FulfillmentSheet/FulfillmentSheetContent.js +0 -6
  913. package/locations/components/FulfillmentSheet/index.js +0 -1
  914. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotDialog.js +0 -28
  915. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotProvider.connector.js +0 -8
  916. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotProvider.context.js +0 -1
  917. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotProvider.js +0 -9
  918. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcher.connector.js +0 -4
  919. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcher.js +0 -4
  920. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherBar.js +0 -3
  921. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherBar.style.js +0 -1
  922. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherDefault.js +0 -3
  923. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherDefault.style.js +0 -1
  924. package/locations/components/FulfillmentSlotSwitcher/index.js +0 -1
  925. package/locations/components/FulfillmentSlotSwitcher/time.js +0 -5
  926. package/locations/components/GlobalLocationSelector/GlobalLocationSelector.js +0 -16
  927. package/locations/components/GlobalLocationSelector/index.js +0 -1
  928. package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcher.connector.js +0 -8
  929. package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcher.js +0 -3
  930. package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherBar.js +0 -3
  931. package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherBar.style.js +0 -1
  932. package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherDefault.js +0 -3
  933. package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherDefault.style.js +0 -1
  934. package/locations/components/GlobalLocationSwitcher/index.js +0 -1
  935. package/locations/components/ReservationResponses/ReservationError.js +0 -4
  936. package/locations/components/ReservationResponses/ReservationResponse.style.js +0 -1
  937. package/locations/components/ReservationResponses/ReservationSuccess.js +0 -4
  938. package/locations/components/ReservationResponses/index.js +0 -1
  939. package/locations/components/ReserveForm/ReserveForm.constraints.js +0 -1
  940. package/locations/components/ReserveForm/ReserveForm.js +0 -10
  941. package/locations/components/ReserveForm/ReserveForm.style.js +0 -1
  942. package/locations/components/ReserveForm/ReserveFormPhone.connector.js +0 -3
  943. package/locations/components/ReserveForm/ReserveFormPhone.js +0 -5
  944. package/locations/components/ReserveForm/ReserveFormPhone.types.js +0 -0
  945. package/locations/components/ReserveForm/index.js +0 -1
  946. package/locations/components/StockInfo/StockInfo.defaultSettings.js +0 -1
  947. package/locations/components/StockInfo/StockInfo.js +0 -8
  948. package/locations/components/StockInfo/StockInfoInventory.js +0 -9
  949. package/locations/components/StockInfo/index.js +0 -1
  950. package/locations/components/StockInfoLists/index.js +0 -9
  951. package/locations/components/StoreDetails/components/FindMoreStores.js +0 -4
  952. package/locations/components/StoreDetails/components/GetDirectionsButton.js +0 -7
  953. package/locations/components/StoreDetails/components/StoreDetails.js +0 -5
  954. package/locations/components/StoreDetails/components/StoreFinderMap.js +0 -20
  955. package/locations/components/StoreDetails/components/StoreFinderMap.style.js +0 -1
  956. package/locations/components/StoreDetails/components/StoreLocationMap.js +0 -4
  957. package/locations/components/StoreDetails/components/StoresNearby.js +0 -4
  958. package/locations/components/StoreDetails/components/StoresNearbyListItem.js +0 -9
  959. package/locations/components/StoreDetails/index.js +0 -4
  960. package/locations/components/StoreFinder/Store.context.js +0 -1
  961. package/locations/components/StoreFinder/StoreFinder.js +0 -3
  962. package/locations/components/StoreFinder/StoreFinder.style.js +0 -1
  963. package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.connector.js +0 -4
  964. package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.js +0 -4
  965. package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.style.js +0 -1
  966. package/locations/components/StoreFinder/StoreFinderLocation.js +0 -3
  967. package/locations/components/StoreFinder/StoreFinderLocation.style.js +0 -1
  968. package/locations/components/StoreFinder/StoreFinderLocationDetails.js +0 -3
  969. package/locations/components/StoreFinder/StoreFinderLocationDetails.style.js +0 -1
  970. package/locations/components/StoreFinder/StoreFinderLocationHeader.js +0 -3
  971. package/locations/components/StoreFinder/StoreFinderLocationHeader.style.js +0 -1
  972. package/locations/components/StoreFinder/StoreFinderLocationHeaderPhoneNumber.js +0 -4
  973. package/locations/components/StoreFinder/StoreFinderLocations.js +0 -5
  974. package/locations/components/StoreFinder/StoreFinderLocations.style.js +0 -1
  975. package/locations/components/StoreFinder/StoreFinderSearch.js +0 -3
  976. package/locations/components/StoreFinder/StoreFinderSearch.style.js +0 -1
  977. package/locations/components/StoreFinder/StoreFinderSelectLocationButton.js +0 -5
  978. package/locations/components/StoreFinder/StoreFinderStoreInfoButton.js +0 -8
  979. package/locations/components/StoreFinder/index.js +0 -1
  980. package/locations/components/StoreList/Store.context.js +0 -1
  981. package/locations/components/StoreList/Store.style.js +0 -1
  982. package/locations/components/StoreList/StoreAddress.js +0 -7
  983. package/locations/components/StoreList/StoreAddressShort.js +0 -7
  984. package/locations/components/StoreList/StoreCard.js +0 -4
  985. package/locations/components/StoreList/StoreDetails.js +0 -4
  986. package/locations/components/StoreList/StoreDetailsLine.js +0 -8
  987. package/locations/components/StoreList/StoreDistance.js +0 -7
  988. package/locations/components/StoreList/StoreHeader.js +0 -4
  989. package/locations/components/StoreList/StoreHoursToday.js +0 -7
  990. package/locations/components/StoreList/StoreList.js +0 -4
  991. package/locations/components/StoreList/StoreListLocations.js +0 -4
  992. package/locations/components/StoreList/StoreListProduct.js +0 -4
  993. package/locations/components/StoreList/StoreListProduct.style.js +0 -1
  994. package/locations/components/StoreList/StoreListProductInfo.js +0 -4
  995. package/locations/components/StoreList/StoreListProductName.js +0 -4
  996. package/locations/components/StoreList/StoreListSearch.connector.js +0 -7
  997. package/locations/components/StoreList/StoreListSearch.js +0 -23
  998. package/locations/components/StoreList/StoreListSearch.style.js +0 -1
  999. package/locations/components/StoreList/StoreListSearchRadius.connector.js +0 -7
  1000. package/locations/components/StoreList/StoreListSearchRadius.js +0 -4
  1001. package/locations/components/StoreList/StoreListSearchRadius.style.js +0 -1
  1002. package/locations/components/StoreList/StoreOpeningHours.js +0 -7
  1003. package/locations/components/StoreList/StoreOpeningHoursLine.js +0 -7
  1004. package/locations/components/StoreList/StorePhoneNumber.js +0 -6
  1005. package/locations/components/StoreList/StoreSelectLocationButton.js +0 -4
  1006. package/locations/components/StoreList/index.js +0 -1
  1007. package/locations/components/index.js +0 -1
  1008. package/locations/constants/ActionTypes.js +0 -10
  1009. package/locations/constants/Pipelines.js +0 -1
  1010. package/locations/constants/Portals.js +0 -2
  1011. package/locations/constants/Stages.js +0 -1
  1012. package/locations/constants/index.js +0 -7
  1013. package/locations/constants/routes.js +0 -1
  1014. package/locations/helpers/createOrder.js +0 -28
  1015. package/locations/helpers/formatDistance.js +0 -9
  1016. package/locations/helpers/getAvailabilitySettings.js +0 -12
  1017. package/locations/helpers/index.js +0 -1
  1018. package/locations/helpers/productInventory.js +0 -7
  1019. package/locations/helpers/showInventoryInLists.js +0 -7
  1020. package/locations/index.js +0 -9
  1021. package/locations/locations.context.js +0 -1
  1022. package/locations/locations.hooks.js +0 -4
  1023. package/locations/locations.streams.js +0 -1
  1024. package/locations/locations.types.js +0 -1
  1025. package/locations/providers/FulfillmentProvider.connector.js +0 -10
  1026. package/locations/providers/FulfillmentProvider.js +0 -49
  1027. package/locations/providers/FulfillmentProvider.types.js +0 -1
  1028. package/locations/providers/StoreDetailsContext.js +0 -1
  1029. package/locations/providers/StoreDetailsProvider.js +0 -4
  1030. package/locations/providers/StoreFinder.connector.js +0 -3
  1031. package/locations/providers/StoreFinderProvider.js +0 -7
  1032. package/locations/providers/index.js +0 -1
  1033. package/locations/reducers/index.js +0 -1
  1034. package/locations/reducers/storage.js +0 -24
  1035. package/locations/reducers/storeFinderSearch.js +0 -6
  1036. package/locations/reducers/user.js +0 -5
  1037. package/locations/reducers/userFormInput.js +0 -8
  1038. package/locations/reducers/userSearch.js +0 -6
  1039. package/locations/selectors/index.js +0 -145
  1040. package/locations/subscriptions.js +0 -27
  1041. package/login/action-creators/index.js +0 -1
  1042. package/login/action-creators/resetPassword.js +0 -14
  1043. package/login/actions/index.js +0 -1
  1044. package/login/actions/resetPassword.js +0 -5
  1045. package/login/components/ForgotPassword/ForgotPassword.connector.js +0 -5
  1046. package/login/components/ForgotPassword/ForgotPassword.js +0 -5
  1047. package/login/components/ForgotPassword/ForgotPassword.style.js +0 -1
  1048. package/login/components/ForgotPassword/index.js +0 -1
  1049. package/login/constants/actions.js +0 -1
  1050. package/login/constants/index.js +0 -1
  1051. package/login/constants/pipelines.js +0 -1
  1052. package/login/constants/routes.js +0 -1
  1053. package/login/index.js +0 -1
  1054. package/orders/action-creators/index.js +0 -1
  1055. package/orders/action-creators/orderDetails.js +0 -22
  1056. package/orders/action-creators/orders.js +0 -21
  1057. package/orders/actions/cancelOrder.js +0 -8
  1058. package/orders/actions/fetchOrderDetails.js +0 -10
  1059. package/orders/actions/fetchOrderHistory.js +0 -7
  1060. package/orders/actions/index.js +0 -1
  1061. package/orders/components/OrderDetails/OrderDetails.js +0 -4
  1062. package/orders/components/OrderDetails/OrderDetailsAuthenticate.js +0 -3
  1063. package/orders/components/OrderDetails/OrderDetailsAuthenticate.style.js +0 -1
  1064. package/orders/components/OrderDetails/OrderDetailsAuthenticateForm.config.js +0 -8
  1065. package/orders/components/OrderDetails/OrderDetailsContent.js +0 -3
  1066. package/orders/components/OrderDetails/OrderDetailsContent.style.js +0 -1
  1067. package/orders/components/OrderDetails/OrderDetailsOrder.js +0 -4
  1068. package/orders/components/OrderDetails/OrderDetailsOrder.style.js +0 -1
  1069. package/orders/components/OrderDetails/OrderDetailsOrderHeader.js +0 -4
  1070. package/orders/components/OrderDetails/OrderDetailsOrderHeader.style.js +0 -1
  1071. package/orders/components/OrderDetails/OrderDetailsOrderPickupLocation.connector.js +0 -3
  1072. package/orders/components/OrderDetails/OrderDetailsOrderPickupLocation.js +0 -4
  1073. package/orders/components/OrderDetails/OrderDetailsOrderPickupLocation.style.js +0 -1
  1074. package/orders/components/OrderDetails/index.js +0 -1
  1075. package/orders/components/OrderHistory/OrderHistory.js +0 -4
  1076. package/orders/components/OrderHistory/OrderHistory.style.js +0 -1
  1077. package/orders/components/OrderHistory/OrderHistoryList.js +0 -9
  1078. package/orders/components/OrderHistory/OrderHistoryList.style.js +0 -1
  1079. package/orders/components/OrderHistory/OrderHistoryLoader.js +0 -4
  1080. package/orders/components/OrderHistory/OrderHistoryTable.js +0 -9
  1081. package/orders/components/OrderHistory/OrderHistoryTable.style.js +0 -1
  1082. package/orders/components/OrderHistory/index.js +0 -1
  1083. package/orders/components/index.js +0 -1
  1084. package/orders/constants/actionTypes.js +0 -1
  1085. package/orders/constants/index.js +0 -1
  1086. package/orders/constants/pipelines.js +0 -1
  1087. package/orders/constants/routes.js +0 -1
  1088. package/orders/constants/status.js +0 -12
  1089. package/orders/helpers/index.js +0 -1
  1090. package/orders/helpers/orderDetails.js +0 -5
  1091. package/orders/helpers/orderStatus.js +0 -15
  1092. package/orders/hooks/index.js +0 -7
  1093. package/orders/providers/OrderDetailsPrivateProvider.connector.js +0 -11
  1094. package/orders/providers/OrderDetailsPrivateProvider.js +0 -5
  1095. package/orders/providers/OrderDetailsProvider.connector.js +0 -11
  1096. package/orders/providers/OrderDetailsProvider.constraints.js +0 -1
  1097. package/orders/providers/OrderDetailsProvider.context.js +0 -1
  1098. package/orders/providers/OrderDetailsProvider.js +0 -11
  1099. package/orders/providers/OrderHistoryProvider.connector.js +0 -9
  1100. package/orders/providers/OrderHistoryProvider.context.js +0 -1
  1101. package/orders/providers/OrderHistoryProvider.js +0 -4
  1102. package/orders/reducers/index.js +0 -1
  1103. package/orders/reducers/orders.js +0 -7
  1104. package/orders/reducers/ordersById.js +0 -7
  1105. package/orders/reducers/ordersByNumber.js +0 -7
  1106. package/orders/selectors/index.js +0 -27
  1107. package/orders/subscriptions/index.js +0 -4
  1108. package/page/actions/index.js +0 -1
  1109. package/page/components/NotFound.js +0 -3
  1110. package/page/components/index.js +0 -1
  1111. package/page/selectors/index.js +0 -7
  1112. package/product/collections/index.js +0 -1
  1113. package/product/components/Availability/Availability.connector.js +0 -5
  1114. package/product/components/Availability/Availability.js +0 -6
  1115. package/product/components/Availability/Availability.style.js +0 -1
  1116. package/product/components/Availability/index.js +0 -1
  1117. package/product/components/Header/index.js +0 -1
  1118. package/product/components/PriceInfo/PriceInfo.connector.js +0 -4
  1119. package/product/components/PriceInfo/PriceInfo.js +0 -4
  1120. package/product/components/PriceInfo/index.js +0 -1
  1121. package/product/components/ProductImage/ProductImagePlaceholder.js +0 -5
  1122. package/product/components/ProductImage/connector.js +0 -5
  1123. package/product/components/ProductName/ProductName.js +0 -4
  1124. package/product/components/ProductName/ProductNameContent.js +0 -4
  1125. package/product/components/ProductName/index.js +0 -1
  1126. package/product/components/ProductProperties/ListsHTML.js +0 -5
  1127. package/product/components/ProductProperties/RowHTML.js +0 -5
  1128. package/product/components/ProductVariants/VariantAvailability.connector.js +0 -5
  1129. package/product/components/ProductVariants/VariantAvailability.js +0 -5
  1130. package/product/components/ProductVariants/index.js +0 -1
  1131. package/product/components/QuantityPicker/hooks.js +0 -5
  1132. package/product/components/UnitQuantityPicker/CartUnitQuantityPicker.js +0 -4
  1133. package/product/components/UnitQuantityPicker/styles.js +0 -1
  1134. package/product/components/index.js +0 -1
  1135. package/product/contexts/index.js +0 -1
  1136. package/product/hocs/index.js +0 -1
  1137. package/product/hocs/withProduct.js +0 -6
  1138. package/product/hocs/withProductListEntryProduct.js +0 -12
  1139. package/product/hooks/index.js +0 -1
  1140. package/product/product.types.js +0 -0
  1141. package/product/providers/index.js +0 -1
  1142. package/product/streams/index.js +0 -1
  1143. package/push-opt-in/subscriptions/optInTracking.js +0 -4
  1144. package/registration/action-creators/index.js +0 -18
  1145. package/registration/actions/index.js +0 -1
  1146. package/registration/actions/submitRegistration.js +0 -4
  1147. package/registration/components/GuestRegistration/GuestRegistration.js +0 -4
  1148. package/registration/components/GuestRegistration/GuestRegistrationContent.js +0 -4
  1149. package/registration/components/GuestRegistration/GuestRegistrationFormPickup.config.js +0 -8
  1150. package/registration/components/GuestRegistration/GuestRegistrationFormPickup.js +0 -4
  1151. package/registration/components/Registration/Registration.js +0 -4
  1152. package/registration/components/Registration/RegistrationContent.js +0 -4
  1153. package/registration/components/Registration/RegistrationContent.style.js +0 -2
  1154. package/registration/components/Registration/RegistrationFormActions.js +0 -5
  1155. package/registration/components/Registration/RegistrationFormBase.config.js +0 -4
  1156. package/registration/components/Registration/RegistrationFormBase.js +0 -4
  1157. package/registration/components/Registration/RegistrationFormBilling.config.js +0 -5
  1158. package/registration/components/Registration/RegistrationFormBilling.js +0 -5
  1159. package/registration/components/Registration/RegistrationFormExtra.config.js +0 -5
  1160. package/registration/components/Registration/RegistrationFormExtra.js +0 -5
  1161. package/registration/components/Registration/RegistrationFormShipping.config.js +0 -5
  1162. package/registration/components/Registration/RegistrationFormShipping.js +0 -5
  1163. package/registration/components/Registration/RegistrationFormToggle.js +0 -4
  1164. package/registration/components/index.js +0 -1
  1165. package/registration/constants/actionTypes.js +0 -1
  1166. package/registration/constants/index.js +0 -1
  1167. package/registration/constants/pipelines.js +0 -1
  1168. package/registration/hooks/index.js +0 -5
  1169. package/registration/index.js +0 -2
  1170. package/registration/providers/GuestRegistrationProvider.actions.js +0 -4
  1171. package/registration/providers/GuestRegistrationProvider.connector.js +0 -7
  1172. package/registration/providers/GuestRegistrationProvider.constraints.js +0 -18
  1173. package/registration/providers/GuestRegistrationProvider.context.js +0 -1
  1174. package/registration/providers/GuestRegistrationProvider.js +0 -22
  1175. package/registration/providers/RegistrationProvider.actions.js +0 -8
  1176. package/registration/providers/RegistrationProvider.connector.js +0 -6
  1177. package/registration/providers/RegistrationProvider.constraints.js +0 -27
  1178. package/registration/providers/RegistrationProvider.context.js +0 -1
  1179. package/registration/providers/RegistrationProvider.js +0 -17
  1180. package/registration/streams/index.js +0 -4
  1181. package/registration/subscriptions/index.js +0 -5
  1182. package/reviews/actions/index.js +0 -1
  1183. package/reviews/components/index.js +0 -1
  1184. package/reviews/constants/index.js +0 -1
  1185. package/reviews/selectors/index.js +0 -1
  1186. package/reviews/streams/index.js +0 -1
  1187. package/scanner/action-creators/index.js +0 -1
  1188. package/scanner/actions/index.js +0 -1
  1189. package/scanner/classes/index.js +0 -1
  1190. package/scanner/constants/index.js +0 -1
  1191. package/scanner/helpers/index.js +0 -1
  1192. package/scanner/streams/index.js +0 -1
  1193. package/search/actions/index.js +0 -1
  1194. package/search/constants/index.js +0 -1
  1195. package/search/helpers/index.js +0 -1
  1196. package/search/selectors/index.js +0 -1
  1197. package/search/streams/index.js +0 -1
  1198. package/styles/helpers/cssCustomProperties.js +0 -16
  1199. package/styles/helpers/index.js +0 -1
  1200. package/styles/helpers/initCSSCustomProperties.js +0 -10
  1201. package/styles/helpers/loadCustomStyles.js +0 -6
  1202. package/styles/helpers/setPageBackgroundColor.js +0 -5
  1203. package/styles/helpers/setPageContentWidth.js +0 -5
  1204. package/styles/helpers/setViewportHeight.js +0 -3
  1205. package/styles/helpers/toggleBodyScroll.js +0 -5
  1206. package/styles/helpers/updatePageInsets.js +0 -15
  1207. package/styles/index.js +0 -1
  1208. package/styles/reset/form.js +0 -8
  1209. package/styles/reset/index.js +0 -1
  1210. package/styles/reset/media.js +0 -1
  1211. package/styles/reset/root.js +0 -3
  1212. package/styles/reset/table.js +0 -1
  1213. package/styles/reset/typography.js +0 -1
  1214. package/tracking/helpers/index.js +0 -1
  1215. package/types.js +0 -0
  1216. package/user/selectors/data.js +0 -10
  1217. /package/product/components/{ProductVariants/VariantAvailability.style.js → Characteristics/Characteristic/components/VariantAvailability/style.js} +0 -0
  1218. /package/product/{providers/Product → components/ProductProvider}/connector.js +0 -0
@@ -1,16 +0,0 @@
1
- import React,{useCallback,useMemo}from'react';import PropTypes from'prop-types';import{connect}from'react-redux';import{getCurrentRoute}from'@shopgate/pwa-common/selectors/router';import{selectGlobalLocation}from'@shopgate/engage/locations/action-creators';import{getPreferredLocation,getIsPending}from"../../selectors";import{getIsLocationBasedShopping}from"../../../core/selectors";import{FulfillmentSheet}from"../FulfillmentSheet";import{STAGE_SELECT_STORE,MULTI_LINE_RESERVE}from"../../constants";/**
2
- * Maps state to props.
3
- * @param {Object} state State
4
- * @return {Object}
5
- */var mapStateToProps=function mapStateToProps(state){return{currentRoute:getCurrentRoute(state),isLocationBasedShopping:getIsLocationBasedShopping(state),isPending:getIsPending(state),preferredLocation:getPreferredLocation(state)};};/**
6
- * Maps the contents of the state to the component props.
7
- * @param {Function} dispatch The redux dispatch function.
8
- * @return {Object} The extended component props.
9
- */var mapDispatchToProps={selectGlobalLocation:selectGlobalLocation};/**
10
- * Global selector that forces the customer to choose a location
11
- * in location based shopping mode.
12
- * @param {Object} props Components props.
13
- * @return {Object}
14
- */var GlobalLocationSelector=function GlobalLocationSelector(_ref){var isLocationBasedShopping=_ref.isLocationBasedShopping,preferredLocation=_ref.preferredLocation,selectLocation=_ref.selectGlobalLocation,routePatternAllowList=_ref.routePatternAllowList,currentRoute=_ref.currentRoute,isPending=_ref.isPending;var closeSheetHandler=useCallback(function(location){if(location){selectLocation(location);}},[selectLocation]);var renderComponent=useMemo(function(){if(!currentRoute){return false;}var _ref2=currentRoute||{},pattern=_ref2.pattern;if(routePatternAllowList&&!routePatternAllowList.includes(pattern)){return false;}// Either when location based shopping is disabled or the customer
15
- // already chose a location we skip the dialog.
16
- return!isPending&&isLocationBasedShopping&&!preferredLocation;},[currentRoute,isLocationBasedShopping,isPending,preferredLocation,routePatternAllowList]);if(!renderComponent){return null;}return React.createElement(FulfillmentSheet,{stage:STAGE_SELECT_STORE,fulfillmentPath:MULTI_LINE_RESERVE,allowClose:false,onClose:closeSheetHandler,isInitialized:true,noProduct:true,noInventory:true,changeOnly:true,open:true});};GlobalLocationSelector.defaultProps={preferredLocation:null,isLocationBasedShopping:false,routePatternAllowList:null,currentRoute:null,isPending:false};export default connect(mapStateToProps,mapDispatchToProps)(GlobalLocationSelector);
@@ -1 +0,0 @@
1
- export{default as GlobalLocationSelector}from"./GlobalLocationSelector";
@@ -1,8 +0,0 @@
1
- import{connect}from'react-redux';import{getIsLocationBasedShopping}from'@shopgate/engage/core';import{getPreferredLocation}from'@shopgate/engage/locations/selectors';import{selectGlobalLocation}from'@shopgate/engage/locations/action-creators';import{getIsCartStateConfigurable}from"../../selectors";/**
2
- * Creates the mapStateToProps connector function.
3
- * @returns {Function}
4
- */var makeMapStateToProps=function makeMapStateToProps(){return function(state){return{isLocationBasedShopping:getIsLocationBasedShopping(state),preferredLocation:getPreferredLocation(state),editable:getIsCartStateConfigurable(state)};};};/**
5
- * Maps the contents of the state to the component props.
6
- * @param {Function} dispatch The redux dispatch function.
7
- * @return {Object} The extended component props.
8
- */var mapDispatchToProps={selectGlobalLocation:selectGlobalLocation};export default connect(makeMapStateToProps,mapDispatchToProps);
@@ -1,3 +0,0 @@
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,{Fragment,useCallback,useState,useMemo}from'react';import PropTypes from'prop-types';import{FulfillmentSheet}from"../FulfillmentSheet";import{STAGE_SELECT_STORE,MULTI_LINE_RESERVE}from"../../constants";import GlobalLocationSwitcherDefault from"./GlobalLocationSwitcherDefault";import GlobalLocationSwitcherBar from"./GlobalLocationSwitcherBar";import connect from"./GlobalLocationSwitcher.connector";/**
2
- * @returns {JSX}
3
- */var GlobalLocationSwitcher=function GlobalLocationSwitcher(_ref){var isLocationBasedShopping=_ref.isLocationBasedShopping,preferredLocation=_ref.preferredLocation,renderBar=_ref.renderBar,standalone=_ref.standalone,selectGlobalLocation=_ref.selectGlobalLocation,editable=_ref.editable;var _useState=useState(false),_useState2=_slicedToArray(_useState,2),sheetOpen=_useState2[0],setSheetOpen=_useState2[1];var changeLocationHandler=useCallback(function(){setSheetOpen(true);},[]);var closeSheetHandler=useCallback(function(location){setSheetOpen(false);if(location){selectGlobalLocation(location);}},[selectGlobalLocation]);var locationName=useMemo(function(){return(preferredLocation===null||preferredLocation===void 0?void 0:preferredLocation.name)||null;},[preferredLocation]);if(!isLocationBasedShopping||!preferredLocation){return null;}return React.createElement(Fragment,null,renderBar?React.createElement(GlobalLocationSwitcherBar,{locationName:locationName,handleChange:changeLocationHandler,standalone:standalone}):React.createElement(GlobalLocationSwitcherDefault,{locationName:locationName,handleChange:changeLocationHandler,standalone:standalone,editable:editable}),sheetOpen&&React.createElement(FulfillmentSheet,{stage:STAGE_SELECT_STORE,fulfillmentPath:MULTI_LINE_RESERVE,allowClose:true,onClose:closeSheetHandler,isInitialized:true,noProduct:true,noInventory:true,changeOnly:true,open:true}));};GlobalLocationSwitcher.defaultProps={isLocationBasedShopping:false,preferredLocation:null,renderBar:false,editable:true,standalone:false};export default connect(GlobalLocationSwitcher);
@@ -1,3 +0,0 @@
1
- function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import React from'react';import PropTypes from'prop-types';import classNames from'classnames';import{RippleButton,I18n}from'@shopgate/engage/components';import{i18n}from'@shopgate/engage/core';import{wrapper,inner,innerStandalone,heading,name,button}from"./GlobalLocationSwitcherBar.style";/**
2
- * @returns {JSX.Element}
3
- */var GlobalLocationSwitcherBar=function GlobalLocationSwitcherBar(_ref){var locationName=_ref.locationName,handleChange=_ref.handleChange,standalone=_ref.standalone;return React.createElement("div",{className:wrapper},React.createElement("div",{className:classNames(inner,_defineProperty({},innerStandalone,standalone))},React.createElement("span",{"aria-label":"".concat(i18n.text('locations.your_current_location.heading'),": ").concat(locationName)},React.createElement("span",{className:heading},"".concat(i18n.text('locations.your_current_location.heading'),":")),React.createElement("span",{className:name},locationName)),React.createElement(RippleButton,{onClick:handleChange,type:"secondary",className:button,"aria-haspopup":true,flat:true},React.createElement(I18n.Text,{string:"locations.your_current_location.change"}))));};GlobalLocationSwitcherBar.defaultProps={standalone:false};export default GlobalLocationSwitcherBar;
@@ -1 +0,0 @@
1
- import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var variables=themeConfig.variables;export var wrapper=css({fontSize:'0.875rem',color:'var(--color-text-high-emphasis)',background:'var(--color-background-accent)'}).toString();export var inner=css({display:'flex',flexShrink:0,margin:"0 ".concat(variables.gap.big,"px"),borderBottom:'1px solid #eaeaea',alignItems:'center',height:variables.filterbar.height}).toString();export var innerStandalone=css({borderBottom:'none'}).toString();export var heading=css({paddingRight:variables.gap.small}).toString();export var name=css({fontWeight:500}).toString();export var button=css({marginLeft:'auto',letterSpacing:'0.05em',padding:"".concat(variables.gap.xsmall*0.75,"px 0 !important"),' *':{fontSize:'0.875rem',textTransform:'initial',padding:'0 !important',color:'var(--color-text-high-emphasis)',fontWeight:500}}).toString();
@@ -1,3 +0,0 @@
1
- import React from'react';import PropTypes from'prop-types';import{RippleButton,I18n}from'@shopgate/engage/components';import{i18n}from'@shopgate/engage/core';import{wrapper,heading,name,button}from"./GlobalLocationSwitcherDefault.style";/**
2
- * @returns {JSX}
3
- */var GlobalLocationSwitcherDefault=function GlobalLocationSwitcherDefault(_ref){var locationName=_ref.locationName,handleChange=_ref.handleChange,editable=_ref.editable;return React.createElement("div",{className:wrapper},React.createElement("div",{className:heading},i18n.text('locations.your_current_location.heading')),React.createElement("div",{className:name},React.createElement("span",null,locationName),React.createElement(RippleButton,{onClick:handleChange,type:"secondary",className:button,disabled:!editable,flat:true},React.createElement(I18n.Text,{string:"locations.your_current_location.change"}))));};export default GlobalLocationSwitcherDefault;
@@ -1 +0,0 @@
1
- import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var variables=themeConfig.variables;export var wrapper=css({display:'flex',flexDirection:'column',fontSize:'0.875rem',padding:"0 ".concat(variables.gap.big,"px"),flexShrink:0});export var heading=css({color:'var(--color-text-medium-emphasis)'});export var name=css({fontWeight:500,color:'var(--color-text-high-emphasis)'});export var button=css({fontSize:'0.625rem !important',letterSpacing:'0.05em',padding:"".concat(variables.gap.xsmall*0.75,"px 0 !important"),' *':{padding:'0 !important'}}).toString();
@@ -1 +0,0 @@
1
- export{default as GlobalLocationSwitcher}from"./GlobalLocationSwitcher";
@@ -1,4 +0,0 @@
1
- import React from'react';import{i18n}from"../../../core/helpers/i18n";import{container,heading,body}from"./ReservationResponse.style";/**
2
- * Renders the reservation error screen.
3
- * @returns {JSX}
4
- */export function ReservationError(){return React.createElement("div",{className:container},React.createElement("h2",{className:heading},i18n.text('locations.error_title')),React.createElement("p",{className:body},i18n.text('locations.error_copy')));}
@@ -1 +0,0 @@
1
- import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var variables=themeConfig.variables,colors=themeConfig.colors;export var container=css({background:colors.background,padding:"".concat(variables.gap.big,"px ").concat(variables.gap.small*1.5,"px ").concat(variables.gap.xxbig*2,"px"),boxShadow:'inset rgba(0, 0, 0, .117647) 0 1px 6px, inset rgba(0, 0, 0, .117647) 0 1px 4px'});export var heading=css({fontSize:'1.125rem',fontWeight:'bold',margin:"".concat(variables.gap.small,"px 0 ").concat(variables.gap.bigger,"px")});export var body=css({padding:"".concat(variables.gap.big,"px 0 0"),margin:"0 0 ".concat(variables.gap.bigger,"px"),border:0});export var orderNum=css({padding:0,fontSize:'1.1875rem',fontWeight:'bold',margin:"0 0 ".concat(variables.gap.big,"px"),border:0});
@@ -1,4 +0,0 @@
1
- import React,{useContext}from'react';import{i18n}from"../../../core/helpers/i18n";import{FulfillmentContext}from"../../locations.context";import{container,heading,body,orderNum}from"./ReservationResponse.style";/**
2
- * Renders the reservation success screen.
3
- * @returns {JSX}
4
- */export function ReservationSuccess(){var _useContext=useContext(FulfillmentContext),orderNumbers=_useContext.orderNumbers;return React.createElement("div",{className:container},React.createElement("h2",{className:heading},i18n.text('locations.success_title')),React.createElement("p",{className:body},i18n.text('locations.success_copy')),React.createElement("p",{className:body},i18n.text('locations.success_order_num')),orderNumbers!==null&&React.createElement("p",{className:orderNum},orderNumbers[0]));}
@@ -1 +0,0 @@
1
- export{ReservationSuccess}from"./ReservationSuccess";export{ReservationError}from"./ReservationError";
@@ -1 +0,0 @@
1
- export var constraints={email:{presence:{message:'validation.required',allowEmpty:false},email:{message:'validation.email'}},firstName:{presence:{message:'validation.required',allowEmpty:false}},lastName:{presence:{message:'validation.required',allowEmpty:false}},cellPhone:{presence:{message:'validation.required',allowEmpty:false},format:{pattern:'^[+0-9]+',message:'validation.mobileNumber'}}};
@@ -1,10 +0,0 @@
1
- import _regeneratorRuntime from"@babel/runtime/regenerator";function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}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 _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{hot}from'react-hot-loader/root';import'react-phone-number-input/style.css';import React,{useState,useContext,useMemo,useRef,useLayoutEffect,useCallback,Fragment}from'react';import{TextField,RippleButton,RadioGroup,RadioGroupItem,ProgressBar}from'@shopgate/engage/components';import{useFormState}from"../../../core/hooks/useFormState";import{i18n}from"../../../core/helpers/i18n";import{FulfillmentContext}from"../../locations.context";import{ReserveFormPhone}from"./ReserveFormPhone";import{constraints}from"./ReserveForm.constraints";import{form,fieldset,formField,formHeading,pickerSwitch,pickerItem,button,progressBar}from"./ReserveForm.style";var PICKUP_PERSON_ME='me';var PICKUP_PERSON_OTHER='someoneelse';/**
2
- * Determines the pick up person.
3
- * @param {Object} userInput The current user input
4
- * @return {string}
5
- */var determinePickupPerson=function determinePickupPerson(userInput){if(!userInput){return PICKUP_PERSON_ME;}var meFields=['firstName','lastName','email','cellPhone'];var otherFields=['firstName2','lastName2','email2','cellPhone2'];var hasMeFields=meFields.every(function(field){return typeof userInput[field]!=='undefined';});var hasOtherFields=otherFields.every(function(field){return typeof userInput[field]!=='undefined';});if(!hasOtherFields||!hasMeFields){return PICKUP_PERSON_ME;}var valuesEqual=meFields.every(function(field,index){return userInput[field]===userInput[otherFields[index]];});return valuesEqual?PICKUP_PERSON_ME:PICKUP_PERSON_OTHER;};/**
6
- * Renders the quick reservation form.
7
- * @returns {JSX}
8
- */function ReserveFormUnwrapped(){var _useContext=useContext(FulfillmentContext),sendReservation=_useContext.sendReservation,userInput=_useContext.userInput;var _useState=useState(determinePickupPerson(userInput)),_useState2=_slicedToArray(_useState,2),picker=_useState2[0],setPicker=_useState2[1];var defaultState={firstName:'',lastName:'',cellPhone:'',email:'',firstName2:'',lastName2:'',cellPhone2:'',email2:''};var validationConstraints=useMemo(function(){return _extends({},constraints,{},picker===PICKUP_PERSON_OTHER&&{firstName2:constraints.firstName,lastName2:constraints.lastName,cellPhone2:constraints.cellPhone,email2:constraints.email});},[picker]);var initialState=userInput?_extends({},defaultState,{},userInput):defaultState;/**
9
- * @param {Object} values The form values.
10
- */var complete=useCallback(/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(values){var response;return _regeneratorRuntime.wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:response=values;if(picker===PICKUP_PERSON_ME){response.firstName2=response.firstName;response.lastName2=response.lastName;response.cellPhone2=response.cellPhone;response.email2=response.email;}else{response.firstName2=response.firstName2||response.firstName;response.lastName2=response.lastName2||response.lastName;response.cellPhone2=response.cellPhone2||response.cellPhone;response.email2=response.email2||response.email;}_context.next=4;return sendReservation(response);case 4:case"end":return _context.stop();}},_callee);}));return function(_x){return _ref.apply(this,arguments);};}(),[picker,sendReservation]);var _useFormState=useFormState(initialState,complete,validationConstraints),values=_useFormState.values,handleChange=_useFormState.handleChange,handleSubmit=_useFormState.handleSubmit,changed=_useFormState.changed,valid=_useFormState.valid,_useFormState$validat=_useFormState.validationErrors,validationErrors=_useFormState$validat===void 0?{}:_useFormState$validat,isSubmitting=_useFormState.isSubmitting;var someoneElseRef=useRef(null);useLayoutEffect(function(){if(someoneElseRef.current&&picker===PICKUP_PERSON_OTHER){someoneElseRef.current.scrollIntoView({behavior:'smooth'});}},[picker,someoneElseRef]);return React.createElement(Fragment,null,React.createElement("div",{className:progressBar},React.createElement(ProgressBar,{isVisible:isSubmitting})),React.createElement("form",{onSubmit:handleSubmit,className:form},React.createElement("fieldset",{className:fieldset},React.createElement(TextField,{name:"firstName",value:values.firstName,onChange:handleChange,label:i18n.text('locations.firstName'),className:formField,errorText:i18n.text(validationErrors.firstName)}),React.createElement(TextField,{name:"lastName",value:values.lastName,onChange:handleChange,label:i18n.text('locations.lastName'),className:formField,errorText:i18n.text(validationErrors.lastName)}),React.createElement(ReserveFormPhone,{name:"cellPhone",value:values.cellPhone,onChange:handleChange,label:i18n.text('locations.cellPhone'),errorText:i18n.text(validationErrors.cellPhone)}),React.createElement(TextField,{name:"email",value:values.email,onChange:handleChange,label:i18n.text('locations.emailAddress'),className:formField,errorText:i18n.text(validationErrors.email)})),React.createElement("p",{className:formHeading},i18n.text('locations.who_will_pickup')),React.createElement("div",{className:pickerSwitch},React.createElement(RadioGroup,{name:"picker",direction:"row",value:picker,onChange:setPicker},React.createElement(RadioGroupItem,{label:i18n.text('locations.me'),name:PICKUP_PERSON_ME,className:pickerItem}),React.createElement(RadioGroupItem,{label:i18n.text('locations.someone_else'),name:PICKUP_PERSON_OTHER,className:pickerItem}))),picker===PICKUP_PERSON_OTHER&&React.createElement("fieldset",{className:fieldset,ref:someoneElseRef},React.createElement(TextField,{name:"firstName2",value:values.firstName2,onChange:handleChange,label:i18n.text('locations.firstName'),className:formField,errorText:i18n.text(validationErrors.firstName2)}),React.createElement(TextField,{name:"lastName2",value:values.lastName2,onChange:handleChange,label:i18n.text('locations.lastName'),className:formField,errorText:i18n.text(validationErrors.lastName2)}),React.createElement(ReserveFormPhone,{name:"cellPhone2",value:values.cellPhone2,onChange:handleChange,label:i18n.text('locations.cellPhone'),errorText:i18n.text(validationErrors.cellPhone2)}),React.createElement(TextField,{name:"email2",value:values.email2,onChange:handleChange,label:i18n.text('locations.emailAddress'),className:formField,errorText:i18n.text(validationErrors.email2)})),React.createElement(RippleButton,{type:"secondary",disabled:changed||valid===false||isSubmitting,className:button},i18n.text('locations.place_reservation'))));}export var ReserveForm=hot(ReserveFormUnwrapped);
@@ -1 +0,0 @@
1
- import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var variables=themeConfig.variables,colors=themeConfig.colors;export var form=css({background:colors.background,padding:"".concat(variables.gap.small*1.5,"px ").concat(variables.gap.small*1.5,"px ").concat(variables.gap.big,"px"),boxShadow:'inset rgba(0, 0, 0, .117647) 0 1px 6px, inset rgba(0, 0, 0, .117647) 0 1px 4px'});export var formHeading=css({fontSize:'1.125rem',fontWeight:'bold',margin:"0 0 ".concat(variables.gap.small,"px")});export var fieldset=css({padding:0,margin:"0 0 ".concat(variables.gap.big,"px"),border:0});export var formField=css({width:'100%',paddingBottom:variables.gap.small});export var phoneField=css({position:'relative',width:'100%',paddingTop:variables.gap.big*0.75,paddingBottom:variables.gap.big*1.25,marginBottom:variables.gap.small,' input.PhoneInputInput':{outline:'none',fontSize:'1rem',lineHeight:'1.1875rem',borderRadius:0,paddingBottom:variables.gap.xsmall*1.5,borderBottom:"1px solid ".concat(colors.shade12),'&:focus':{borderBottom:"2px solid ".concat(colors.primary),paddingBottom:variables.gap.xsmall*1.5-1}}});export var phoneFieldError=css({' input.PhoneInputInput':{borderBottom:"2px solid var(--color-state-alert, ".concat(colors.error,") !important"),paddingBottom:variables.gap.xsmall*1.5-1}});export var phoneFieldErrorText=css({position:'absolute',width:'100%',bottom:2,fontSize:'0.75rem',lineHeight:0.875,color:"var(--color-state-alert, ".concat(colors.error,")"),overflow:'hidden',whiteSpace:'nowrap',textOverflow:'ellipsis'});export var pickerSwitch=css({marginTop:'-1rem'});export var pickerItem=css({paddingRight:variables.gap.xbig,':last-of-type':{paddingRight:0}}).toString();export var button=css({width:'100%'}).toString();export var progressBar=css({height:'4px',position:'relative'});
@@ -1,3 +0,0 @@
1
- import{connect}from'react-redux';import{getPreferredLocationAddress}from"../../selectors";/**
2
- * @returns {Function}
3
- */function makeMapStateToProps(){return function(state){return{userLocation:getPreferredLocationAddress(state)};};}export default connect(makeMapStateToProps);
@@ -1,5 +0,0 @@
1
- function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import*as React from'react';import classnames from'classnames';import{i18n}from'@shopgate/engage/core';import{parsePhoneNumber}from'react-phone-number-input';import PhoneInput from'react-phone-number-input/mobile';import{getCountries}from'react-phone-number-input/input';import en from'react-phone-number-input/locale/en';import de from'react-phone-number-input/locale/de';import es from'react-phone-number-input/locale/es';import fr from'react-phone-number-input/locale/fr';import pt from'react-phone-number-input/locale/pt';import flags from'react-phone-number-input/flags';import TextField from'@shopgate/pwa-ui-shared/TextField';import{useCountriesNames}from'@shopgate/engage/i18n';import{FulfillmentContext}from"../../locations.context";import{formField,phoneField,phoneFieldError,phoneFieldErrorText}from"./ReserveForm.style";import connect from"./ReserveFormPhone.connector";var builtInCountries=getCountries();var locales={en:en,de:de,es:es,fr:fr,pt:pt};/**
2
- * Renders the reserve form phone input maybe with country selection.
3
- * @param {Object} props The component props.
4
- * @returns {JSX.Element}
5
- */var ReserveFormPhoneUnwrapped=React.memo(function(props){var name=props.name,value=props.value,onChange=props.onChange,label=props.label,errorText=props.errorText,userLocation=props.userLocation;var _React$useContext=React.useContext(FulfillmentContext),shopSettings=_React$useContext.shopSettings,userInput=_React$useContext.userInput;var initialValue=React.useMemo(function(){return userInput&&userInput[name]?userInput[name]:'';},[name,userInput]);var supportedCountries=React.useMemo(function(){return shopSettings?shopSettings.supportedCountries:[];},[shopSettings]);var countries=React.useMemo(function(){if(!supportedCountries){return builtInCountries;}var sortedCountries=[].concat(builtInCountries);var sanitizedSupportedCountries=supportedCountries.map(function(country){var pieces=country.split('_');return pieces[0];});sanitizedSupportedCountries.forEach(function(country){sortedCountries.splice(sortedCountries.indexOf(country),1);});return[].concat(sanitizedSupportedCountries,sortedCountries);},[supportedCountries]);var countriesNames=useCountriesNames(supportedCountries,locales);var labels=React.useMemo(function(){var output={};if(!countries){return output;}countries.forEach(function(key){var pieces=key.split('_');output[pieces[0]]=countriesNames[key];});return output;},[countries,countriesNames]);var defaultCountry=React.useMemo(function(){if(!initialValue&&!value&&userLocation){return userLocation.country;}var phoneNumber=parsePhoneNumber(value||'');if(phoneNumber&&phoneNumber.country){return phoneNumber.country;}if(userLocation){return userLocation.country;}return i18n.getLang().split('-')[1];},[initialValue,userLocation,value]);var handleChange=React.useCallback(function(phoneValue){onChange(phoneValue,{target:{name:name}});},[name,onChange]);var phoneClasses=classnames(_defineProperty(_defineProperty({},phoneField,true),phoneFieldError,!!errorText));if(!countries||countries.length===0){return React.createElement(TextField,{name:name,value:value,onChange:onChange,label:label,className:formField,errorText:errorText});}return React.createElement("div",{className:phoneClasses},React.createElement(PhoneInput,{defaultCountry:defaultCountry,addInternationalOption:false,flags:flags,name:name,value:value||'',onChange:handleChange,placeholder:label,countries:countries,labels:labels}),!!errorText&&React.createElement("div",{className:phoneFieldErrorText},errorText));});export var ReserveFormPhone=connect(ReserveFormPhoneUnwrapped);
@@ -1 +0,0 @@
1
- export{ReserveForm}from"./ReserveForm";
@@ -1 +0,0 @@
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{themeColors}from'@shopgate/pwa-common/helpers/config';import{AVAILABILITY_TYPE_AVAILABLE,AVAILABILITY_TYPE_LIMITED_AVAILABILITY,AVAILABILITY_TYPE_NOT_AVAILABLE,AVAILABILITY_TYPE_CUSTOM_AVAILABILITY,AVAILABILITY_TYPE_COMING_SOON}from'@shopgate/engage/product/constants';export default _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},AVAILABILITY_TYPE_AVAILABLE,{visibleInventoryFrom:11,visibleInventoryTo:null,includeInventoryBlind:false,includeNoRecordStores:false,availabilityText:'locations.stock_info.availableInventory',availabilityTextColor:"var(--color-state-ok, ".concat(themeColors.success,")")}),AVAILABILITY_TYPE_COMING_SOON,{comingSoon:true,visibleInventoryFrom:0,visibleInventoryTo:Number.MAX_VALUE,includeInventoryBlind:true,includeNoRecordStores:true,availabilityText:"locations.stock_info.".concat(AVAILABILITY_TYPE_COMING_SOON),availabilityTextColor:"var(--color-state-warning, ".concat(themeColors.warning,")")}),AVAILABILITY_TYPE_LIMITED_AVAILABILITY,{visibleInventoryFrom:1,visibleInventoryTo:10,includeInventoryBlind:false,includeNoRecordStores:false,availabilityText:"locations.stock_info.".concat(AVAILABILITY_TYPE_LIMITED_AVAILABILITY),availabilityTextColor:"var(--color-state-warning, ".concat(themeColors.warning,")")}),AVAILABILITY_TYPE_NOT_AVAILABLE,{visibleInventoryFrom:0,visibleInventoryTo:0,includeInventoryBlind:false,includeNoRecordStores:false,availabilityText:"locations.stock_info.".concat(AVAILABILITY_TYPE_NOT_AVAILABLE),availabilityTextColor:"var(--color-state-alert, ".concat(themeColors.error,")"),allowOrderingToStore:true}),AVAILABILITY_TYPE_CUSTOM_AVAILABILITY,{visibleInventoryFrom:0,visibleInventoryTo:0,includeInventoryBlind:false,includeNoRecordStores:true,availabilityText:"locations.stock_info.".concat(AVAILABILITY_TYPE_CUSTOM_AVAILABILITY),availabilityTextColor:"var(--color-state-alert, ".concat(themeColors.error,")"),allowOrderingToStore:true}),"maxNumberOfVisibleInventory",100),"aboveMaxExtension",'+');
@@ -1,8 +0,0 @@
1
- import*as React from'react';import{css}from'glamor';import{connect}from'react-redux';import classNames from'classnames';import defaultsDeep from'lodash/defaultsDeep';import PropTypes from'prop-types';import{makeGetLocationInventory}from"../../selectors";import{getThemeSettings}from"../../../core";import{SurroundPortals}from"../../../components";import{PRODUCT_LOCATION_STOCK_INFO}from"../../constants";import{getAvailabilitySettings}from"../../helpers";import defaultSettings from"./StockInfo.defaultSettings";import{StockInfoInventory}from"./StockInfoInventory";/**
2
- * Creates a mapper for redux.
3
- * @returns {Function}
4
- */var makeMapStateToProps=function makeMapStateToProps(){var getInventory=makeGetLocationInventory(function(_,props){var _props$location;return(_props$location=props.location)===null||_props$location===void 0?void 0:_props$location.code;},function(_,props){var _props$product;return props.productId||((_props$product=props.product)===null||_props$product===void 0?void 0:_props$product.id);});return function(state,props){return{inventory:getInventory(state,props)};};};/**
5
- * Renders visible stock information based on the given location.
6
- * @param {Object} props The component props.
7
- * @return {JSX}
8
- */var StockInfoUnwrapped=function StockInfoUnwrapped(_ref){var location=_ref.location,inventory=_ref.inventory,className=_ref.className;var _ref2=getThemeSettings('product')||{},locationStockInfo=_ref2.locationStockInfo;var settings=defaultsDeep(locationStockInfo,defaultSettings);var _getAvailabilitySetti=getAvailabilitySettings(settings,location,inventory),_getAvailabilitySetti2=_getAvailabilitySetti.availabilityText,availabilityText=_getAvailabilitySetti2===void 0?'':_getAvailabilitySetti2,_getAvailabilitySetti3=_getAvailabilitySetti.availabilityTextColor,availabilityTextColor=_getAvailabilitySetti3===void 0?'inherit':_getAvailabilitySetti3,_getAvailabilitySetti4=_getAvailabilitySetti.comingSoon,comingSoon=_getAvailabilitySetti4===void 0?false:_getAvailabilitySetti4;var defaultClassName=css({color:availabilityTextColor,fontSize:'0.75rem',margin:0,':not(:empty) ~ *':{marginLeft:14}}).toString();var portalProps=React.useMemo(function(){return{location:location,inventory:inventory,comingSoon:comingSoon,settings:settings,className:className,availabilityText:availabilityText,availabilityTextColor:availabilityTextColor};},[availabilityText,availabilityTextColor,className,comingSoon,inventory,location,settings]);return React.createElement(SurroundPortals,{portalName:PRODUCT_LOCATION_STOCK_INFO,portalProps:portalProps},React.createElement("span",{className:classNames(defaultClassName,css(className).toString())},React.createElement(StockInfoInventory,{availabilityText:availabilityText,comingSoon:comingSoon,location:location,inventory:inventory,maxNumberVisible:settings.maxNumberOfVisibleInventory,aboveMaxExtension:settings.aboveMaxExtension})));};StockInfoUnwrapped.defaultProps={className:null,inventory:null};export var StockInfo=connect(makeMapStateToProps)(StockInfoUnwrapped);
@@ -1,9 +0,0 @@
1
- import*as React from'react';import PropTypes from'prop-types';import{I18n}from"../../../components";/**
2
- * Renders the inventory given by the location into a given translation string.
3
- * @param {Object} props The component props.
4
- * @param {string} props.availabilityText The translation string to use.
5
- * @param {Object} props.location The component props.
6
- * @param {number|undefined} props.maxNumberVisible The component props.
7
- * @param {string} props.aboveMaxExtension The component props.
8
- * @return {JSX}
9
- */export function StockInfoInventory(props){var availabilityText=props.availabilityText,comingSoon=props.comingSoon,location=props.location,inventory=props.inventory,maxNumberVisible=props.maxNumberVisible,aboveMaxExtension=props.aboveMaxExtension;var visibleInventory=React.useMemo(function(){if(!location||!inventory){return null;}if(inventory.visible!==null&&inventory.visible>maxNumberVisible){return"".concat(maxNumberVisible).concat(aboveMaxExtension);}return inventory.visible;},[aboveMaxExtension,inventory,location,maxNumberVisible]);if((!location||!availabilityText||!inventory)&&!comingSoon){return null;}return React.createElement(I18n.Text,{string:availabilityText,params:{visibleInventory:visibleInventory}});}StockInfoInventory.defaultProps={comingSoon:false,inventory:null};
@@ -1 +0,0 @@
1
- export{StockInfo}from"./StockInfo";
@@ -1,9 +0,0 @@
1
- import React from'react';import{css}from'glamor';import{connect}from'react-redux';import PlaceholderLabel from'@shopgate/pwa-ui-shared/PlaceholderLabel';import PropTypes from'prop-types';import{getPreferredLocation,makeGetLocationInventory}from"../../selectors";import{I18n,SurroundPortals}from"../../../components";import{StockInfo}from"../StockInfo";import{PRODUCT_LOCATION_STOCK_INFO_LIST}from"../../constants/Portals";import{showInventoryInLists}from"../../helpers/showInventoryInLists";/**
2
- * Creates a mapper for redux.
3
- * @returns {Function}
4
- *
5
- */var makeMapStateToProps=function makeMapStateToProps(){var getInventory=makeGetLocationInventory(function(_,props){var _getPreferredLocation;return(_getPreferredLocation=getPreferredLocation(_,props))===null||_getPreferredLocation===void 0?void 0:_getPreferredLocation.code;},function(_,props){var _props$product;return props.productId||((_props$product=props.product)===null||_props$product===void 0?void 0:_props$product.id);});return function(state,props){return{inventory:getInventory(state,props),preferredLocation:getPreferredLocation(state,props),showStockInfo:showInventoryInLists(state)};};};var styles={wrapper:css({flexDirection:'row',alignItems:'flex-end',fontSize:'0.65rem'}),text:css({margin:'0 !important'}).toString(),location:css({marginLeft:'0 !important'})};/**
6
- * Renders visible stock information based on the given location.
7
- * @param {Object} props The component props.
8
- * @return {JSX}
9
- */var StockInfoLists=function StockInfoLists(_ref){var preferredLocation=_ref.preferredLocation,product=_ref.product,inventory=_ref.inventory,showStockInfo=_ref.showStockInfo;if(!showStockInfo||!preferredLocation){return null;}var portalProps={inventory:inventory,location:preferredLocation,product:product};/* eslint-disable jsx-a11y/aria-role */return React.createElement(SurroundPortals,{portalName:PRODUCT_LOCATION_STOCK_INFO_LIST,portalProps:portalProps},React.createElement("div",{className:styles.wrapper,role:"text"},React.createElement(PlaceholderLabel,{ready:!!inventory},React.createElement(StockInfo,{product:product,location:preferredLocation}),' ',React.createElement(I18n.Text,{string:"locations.stock_info.pick_up_at",params:{storeName:''},className:styles.text}),' ',React.createElement("span",{className:styles.location},preferredLocation.name))));/* eslint-enable jsx-a11y/aria-role */};StockInfoLists.defaultProps={inventory:null,preferredLocation:null};export default connect(makeMapStateToProps)(StockInfoLists);
@@ -1,4 +0,0 @@
1
- import React from'react';import{css}from'glamor';import{i18n}from'@shopgate/engage/core/helpers';import{MagnifierIcon,LocatorIcon,Link}from'@shopgate/engage/components';import{themeColors}from'@shopgate/pwa-common/helpers/config';import classNames from'classnames';import{STORE_FINDER_PATTERN}from"../../../constants";var styles={container:css({margin:'16px 0px'}),title:css({fontSize:'20px',fontWeight:'500',color:'var(--color-primary)',marginBottom:'8px'}),inputCell:css({gridArea:'input'}),inputContainer:css({position:'relative',background:themeColors.light,border:"1px solid ".concat(themeColors.shade7),borderRadius:4,display:'flex',alignItems:'center',width:'100%'}),inputIcon:css({padding:0,margin:'0 8px',color:themeColors.shade9,fontSize:'1.23rem',flexShrink:0,outline:0}),input:css({margin:'3px 0',width:'100%',lineHeight:'28px',outline:'none',verticalAlign:'middle',WebkitAppearance:'none'}),inputOverlay:css({position:'absolute',height:'100%',width:'100%'})};/**
2
- * Find more stores component.
3
- * @returns {JSX}
4
- * */var FindMoreStores=function FindMoreStores(){return React.createElement("div",{className:styles.container},React.createElement("div",{className:styles.title,"aria-hidden":true},i18n.text('location.findMoreStores')),React.createElement("div",{className:styles.inputCell},React.createElement("div",{className:styles.inputContainer},React.createElement("span",{className:styles.inputIcon,"aria-hidden":true},React.createElement(MagnifierIcon,null)),React.createElement("input",{name:"postalCode",className:styles.input,disabled:true,type:"search",autoComplete:"off",autoCorrect:"off",placeholder:"","aria-hidden":true}),React.createElement("div",{className:styles.inputIcon},React.createElement(LocatorIcon,null)),React.createElement(Link,{href:STORE_FINDER_PATTERN,className:classNames(styles.inputOverlay),role:"button","aria-label":i18n.text('location.findMoreStores')},React.createElement("div",null)))));};export default FindMoreStores;
@@ -1,7 +0,0 @@
1
- import React,{useMemo}from'react';import{css}from'glamor';import{historyPush}from'@shopgate/pwa-common/actions/router';import PropTypes from'prop-types';import{Button}from'@shopgate/engage/components';import{generateGoogleMapsDirectionsUrl,i18n}from'@shopgate/engage/core';import{useDispatch}from'react-redux';var styles={container:css({}),buttonText:css({color:'var(--color-primary)'})};/**
2
- * @param {Object} props The component props
3
- * @param {Object} props.address The address object.
4
- * @returns {JSX}
5
- */var GetDirectionsButton=function GetDirectionsButton(_ref){var address=_ref.address;var dispatch=useDispatch();var url=useMemo(function(){return address&&generateGoogleMapsDirectionsUrl(address);},[address]);/**
6
- * Handles the button click.
7
- */var handleClick=function handleClick(){dispatch(historyPush({pathname:url,state:{target:'_blank'}}));};return React.createElement("div",{className:styles.container},React.createElement(Button,{onClick:handleClick,role:"button",type:"plain"},React.createElement("span",{className:styles.buttonText},i18n.text('location.getDirections'))));};GetDirectionsButton.defaultProps={address:null};export default GetDirectionsButton;
@@ -1,5 +0,0 @@
1
- function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import React,{useContext,useMemo}from'react';import{css}from'glamor';import{LocationIcon,Button,Link,ConditionalWrapper}from'@shopgate/engage/components';import{getWeekDaysOrder}from'@shopgate/engage/core';import{i18n}from'@shopgate/engage/core/helpers';import classNames from'classnames';import moment from'moment';import{StoreDetailsContext}from"../../../providers/StoreDetailsContext";import GetDirectionsButton from"./GetDirectionsButton";var styles={headerWrapper:css({display:'flex'}),headerIcon:css({color:'var(--color-primary)',fontSize:20,alignContent:'center',marginRight:4}),header:css({color:'var(--color-primary)',fontWeight:'600',fontSize:20}),locationName:css({fontSize:20,fontWeight:'600',marginBottom:8}),locationRow:css({display:'flex',gap:8,flexWrap:'wrap'}),locationColumn:css({flex:1,minWidth:'200px','& > p':{margin:0}}),storeHoursColumn:css({flex:1,minWidth:'250px',maxWidth:'455px'}),storeHours:css({fontSize:17,fontWeight:'600'}),storeHoursLine:css({}),storeHoursWeekday:css({textAlign:'left'}),bold:css({fontWeight:'600'}),storeHoursOpeningTime:css({textAlign:'right'}),phone:css({fontSize:17,fontWeight:'600'}),phoneNumber:css({textDecoration:'underline'}),makeMyStoreButton:css({color:'var(--color-primary)'}),comingSoon:css({fontStyle:'italic'}),buttonRow:css({display:'flex',alignItems:'center',gap:'8px 30px',flexWrap:'wrap',margin:'8px 0'})};/**
2
- * Store details component.
3
- * @returns {JSX}
4
- */var StoreDetails=function StoreDetails(){var _useContext=useContext(StoreDetailsContext),selectLocation=_useContext.selectLocation,routeLocation=_useContext.routeLocation,isRouteLocationPreferred=_useContext.isRouteLocationPreferred;var _ref=routeLocation||{},_ref$address=_ref.address,address=_ref$address===void 0?{}:_ref$address,_ref$operationHours=_ref.operationHours,operationHours=_ref$operationHours===void 0?{}:_ref$operationHours,isComingSoon=_ref.isComingSoon;var currentDay=moment().format('ddd').toLowerCase();// Check if there are any opening hours to hide the section if not
5
- var hasOpeningHours=useMemo(function(){return Object.keys(operationHours).length>0&&Object.values(operationHours).some(function(value){return value&&typeof value==='string'&&value.length>0;});},[operationHours]);if(!routeLocation){return null;}return React.createElement("div",null,React.createElement(ConditionalWrapper,{condition:!isRouteLocationPreferred,wrapper:function wrapper(children){return React.createElement(Button,{onClick:function onClick(){return selectLocation(routeLocation,true);},role:"button",type:"plain"},children);}},React.createElement("div",{className:styles.headerWrapper},React.createElement("div",{className:styles.headerIcon},React.createElement(LocationIcon,{className:styles.icon,size:20})),React.createElement("div",{className:styles.header},isRouteLocationPreferred?i18n.text('location.myStore'):i18n.text('location.makeMyStore')))),React.createElement("div",{className:styles.locationName},routeLocation.name),React.createElement("div",{className:styles.locationRow},React.createElement("div",{className:styles.locationColumn},React.createElement("p",null,address===null||address===void 0?void 0:address.street),(address===null||address===void 0?void 0:address.street2)&&address.street2!==''&&React.createElement("p",null,address.street2),(address===null||address===void 0?void 0:address.street3)&&address.street3!==''&&React.createElement("p",null,address.street3),(address===null||address===void 0?void 0:address.street4)&&address.street4!==''&&React.createElement("p",null,address.street4),React.createElement("p",null,i18n.text('locations.address',address)),React.createElement("div",{className:styles.buttonRow},React.createElement(GetDirectionsButton,{address:address}),!isComingSoon&&!isRouteLocationPreferred&&React.createElement(Button,{onClick:function onClick(){return selectLocation(routeLocation,true);},role:"button",type:"plain",className:classNames(styles.makeMyStoreButton)},React.createElement("span",null,i18n.text('location.makeMyStore'))),isComingSoon&&React.createElement("div",{className:styles.comingSoon},i18n.text('location.comingSoon'))),(address===null||address===void 0?void 0:address.phoneNumber)&&React.createElement(React.Fragment,null,React.createElement("div",{className:styles.phone},"".concat(i18n.text('location.phone'),": ")),React.createElement("div",{className:styles.phoneNumber},React.createElement(Link,{href:"tel:".concat(address.phoneNumber),className:classNames(styles.phoneNumber),target:"_blank",role:"button","aria-label":address.phoneNumber},address.phoneNumber)))),hasOpeningHours&&React.createElement("div",{className:styles.storeHoursColumn},React.createElement("div",{className:styles.storeHours},"".concat(i18n.text('location.storeHours'),":")),React.createElement("table",null,React.createElement("tbody",null,getWeekDaysOrder().map(function(weekDay){if(!operationHours[weekDay]){return null;}return React.createElement("tr",{className:styles.storeHoursLine,key:weekDay,"aria-label":"".concat(i18n.text("locations.".concat(weekDay)),": ").concat(operationHours[weekDay]),tabIndex:0},React.createElement("td",{className:classNames(styles.storeHoursWeekday,_defineProperty({},styles.bold,weekDay===currentDay)),"aria-hidden":true},"".concat(i18n.text("locations.".concat(weekDay)),":")),React.createElement("td",{className:classNames(styles.storeHoursOpeningTime,_defineProperty({},styles.bold,weekDay===currentDay)),"aria-hidden":true},operationHours[weekDay]));}))))));};export default StoreDetails;
@@ -1,20 +0,0 @@
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,{useCallback,useMemo,useContext,useRef,useEffect}from'react';import{useDispatch}from'react-redux';import{Circle,MapContainer,Marker,TileLayer}from'react-leaflet';import{GestureHandling}from'leaflet-gesture-handling';import"../../../assets/leaflet.css";import'leaflet-gesture-handling/dist/leaflet-gesture-handling.css';import Leaflet from'leaflet';import{renderToString}from'react-dom/server';import MapMarkerIcon from'@shopgate/pwa-ui-shared/icons/MapMarkerIcon';import{historyPush}from'@shopgate/engage/core';import{container,markerSelected}from"./StoreFinderMap.style";import{MAP_RADIUS_KM}from"../../../constants";import{StoreDetailsContext}from"../../../providers/StoreDetailsContext";Leaflet.Map.addInitHook('addHandler','gestureHandling',GestureHandling);/**
2
- * @returns {JSX.Element}
3
- */var StoreFinderMap=function StoreFinderMap(){var mapContainerRef=useRef(null);var dispatch=useDispatch();/**
4
- * Handles the click on the OpenStreetMap copyright
5
- * Cause the copyright is only a plain a tag
6
- * this causes weird routing in the app
7
- * To prevent this we need to handle the click on the a tag
8
- * @param {Event} e The event
9
- * @returns {void}
10
- * */var handleOpenStreetMapCopyrightClick=useCallback(function(e){if(e.target.tagName==='A'&&e.target.href){e.preventDefault();dispatch(historyPush({pathname:e.target.href}));}},[dispatch]);// check the mapContainerRef if any a tag is clicked
11
- // to catch the click on the OpenStreetMap copyright
12
- useEffect(function(){if(mapContainerRef.current){mapContainerRef.current.addEventListener('click',handleOpenStreetMapCopyrightClick);}return function(){if(mapContainerRef.current){mapContainerRef.current.removeEventListener('click',handleOpenStreetMapCopyrightClick);}};},[handleOpenStreetMapCopyrightClick]);var _useContext=useContext(StoreDetailsContext),routeLocation=_useContext.routeLocation;var iconHTML=useMemo(function(){return renderToString(React.createElement(MapMarkerIcon,null));},[]);var markerIconSelected=useMemo(function(){return Leaflet.divIcon({html:iconHTML,className:markerSelected,iconSize:[40,40]});},[iconHTML]);var _ref=routeLocation||{},code=_ref.code,latitude=_ref.latitude,longitude=_ref.longitude;var viewport=useMemo(function(){if(!latitude||!longitude){return null;}return[latitude,longitude];},[latitude,longitude]);/**
13
- * Enables touch and gestures on the map
14
- * @param {Object} map available parameters for the map
15
- */var handleMapCreated=function handleMapCreated(map){map.gestureHandling.enable();map.attributionControl.setPrefix('');if(Leaflet.Browser.mobile){map.touchZoom.enable();}};/**
16
- * Creates coordinates for a bounding box around a center point
17
- * @param {Array} center The center point
18
- * @param {number} distanceInMeter The distance in meters
19
- * @returns {Array} The bounds
20
- */var createBounds=useCallback(function(_ref2,distanceInMeter){var _ref3=_slicedToArray(_ref2,2),lat=_ref3[0],lng=_ref3[1];var EARTH_RADIUS_KM=6371;var distanceInKm=distanceInMeter/1000;var distanceToBoundaryInKm=distanceInKm/2;var latInRadians=lat*(Math.PI/180);var deltaLat=distanceToBoundaryInKm/EARTH_RADIUS_KM*(180/Math.PI);var deltaLng=distanceToBoundaryInKm/EARTH_RADIUS_KM*(180/Math.PI)/Math.cos(latInRadians);return[[lat-deltaLat,lng-deltaLng],[lat+deltaLat,lng+deltaLng]];},[]);var radiusinMeters=MAP_RADIUS_KM*1000;var bounds=useMemo(function(){if(!viewport||!MAP_RADIUS_KM){return null;}return createBounds(viewport,radiusinMeters);},[createBounds,radiusinMeters,viewport]);var debug=false;if(!routeLocation){return null;}return React.createElement("div",{className:container,"aria-hidden":true,ref:mapContainerRef},React.createElement(MapContainer,{center:viewport,bounds:bounds,className:container,whenCreated:handleMapCreated},debug&&React.createElement(Circle,{center:viewport,radius:radiusinMeters,color:"blue"}),React.createElement(TileLayer,{attribution:"&copy <a href=\"https://osm.org/copyright\">OpenStreetMap</a>",url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),React.createElement(Marker,{key:code,icon:markerIconSelected,position:[latitude,longitude]})));};export default StoreFinderMap;
@@ -1 +0,0 @@
1
- import{css}from'glamor';import{themeColors}from'@shopgate/pwa-common/helpers/config';export var container=css({height:'100%',width:'100%'});export var markerSelected=css({' svg':{height:40,width:40,fontSize:'1.5rem',color:"var(--color-primary, ".concat(themeColors.primary,")")}}).toString();
@@ -1,4 +0,0 @@
1
- import React,{useRef}from'react';import{css}from'glamor';import{SurroundPortals}from'@shopgate/engage/components';import StoreFinderMap from"./StoreFinderMap";import{StoreFinderProvider}from"../../../providers";import{STORE_DETAILS_LOCATION_MAP}from"../../../constants/Portals";var styles={container:css({maxHeight:'250px',height:'250px',width:'100%',marginTop:'10px',marginBottom:'10px'}).toString()};/**
2
- * Store location map component.
3
- * @returns {JSX.Element}
4
- */var StoreLocationMap=function StoreLocationMap(){var storeListRef=useRef(null);return React.createElement(StoreFinderProvider,{storeListRef:storeListRef},React.createElement(SurroundPortals,{portalName:STORE_DETAILS_LOCATION_MAP},React.createElement("div",{className:styles.container},React.createElement(StoreFinderMap,null))));};export default StoreLocationMap;
@@ -1,4 +0,0 @@
1
- import React,{useContext}from'react';import{css}from'glamor';import{i18n}from'@shopgate/engage/core/helpers';import StoresNearbyListItem from"./StoresNearbyListItem";import{StoreDetailsContext}from"../../../providers/StoreDetailsContext";var styles={title:css({fontSize:20,fontWeight:'600',marginBottom:12}),table:css({width:'100%'})};/**
2
- * Show stores nearby selected location
3
- * @returns {JSX}
4
- */var StoresNearby=function StoresNearby(){var _useContext=useContext(StoreDetailsContext),nearbyLocations=_useContext.nearbyLocations;return React.createElement("div",null,React.createElement("div",{className:styles.title},i18n.text('location.storesNearby')),nearbyLocations.length>0&&React.createElement("table",{className:styles.table},React.createElement("tbody",null,nearbyLocations.map(function(location){return React.createElement(StoresNearbyListItem,{location:location,key:location.code});}))),nearbyLocations.length===0&&React.createElement("div",null,i18n.text('location.noStoresNearby')));};export default StoresNearby;
@@ -1,9 +0,0 @@
1
- import React,{useContext}from'react';import{useDispatch}from'react-redux';import PropTypes from'prop-types';import{css}from'glamor';import{Button}from'@shopgate/engage/components';import{i18n}from'@shopgate/engage/core/helpers';import{historyPush}from'@shopgate/engage/core';import formatDistance from"../../../helpers/formatDistance";import{STORE_DETAILS_PATH}from"../../../constants";import{StoreDetailsContext}from"../../../providers/StoreDetailsContext";var styles={button:css({fontSize:'14px !important',padding:'0px !important'}).toString(),locationRow:css({borderBottom:'1px solid #e8e8e8',borderTop:'1px solid #e8e8e8','> td:first-child > div':{paddingLeft:0},'> td:last-child > div':{paddingRight:0}}),distance:css({textWrapMode:'nowrap',alignContent:'center',verticalAlign:'middle',fontWeight:'500'}),makeMyStore:css({textWrapMode:'nowrap',alignContent:'center',verticalAlign:'middle'}),storeInfo:css({textWrapMode:'nowrap',alignContent:'center',verticalAlign:'middle'}),name:css({textAlign:'start'}),cellContainer:css({padding:'8px',textAlign:'end'}),cell:css({verticalAlign:'middle'}),buttonContainer:css({display:'flex',gap:'4px 16px',flexWrap:'wrap',justifyContent:'flex-end'})};/**
2
- * Shows a location in a row
3
- * @param {Object} props Props
4
- * @param {Object} props.location Location
5
- * @returns {JSX}
6
- */var StoresNearbyListItem=function StoresNearbyListItem(_ref){var location=_ref.location;var dispatch=useDispatch();var _useContext=useContext(StoreDetailsContext),preferredLocation=_useContext.preferredLocation,selectLocation=_useContext.selectLocation;var name=location.name,distance=location.distance,unitSystem=location.unitSystem,code=location.code,isComingSoon=location.isComingSoon;var isPreferredLocation=preferredLocation&&preferredLocation.code===code;/**
7
- * Opens the store details page
8
- * @param {string} locationCode Location code
9
- */var openStoreDetails=function openStoreDetails(locationCode){dispatch(historyPush({pathname:"".concat(STORE_DETAILS_PATH,"/").concat(locationCode)}));};return React.createElement("tr",{className:styles.locationRow},React.createElement("td",{className:styles.cell},React.createElement("div",{className:styles.cellContainer},React.createElement("div",{className:styles.name},name))),React.createElement("td",{className:styles.cell},React.createElement("div",{className:styles.cellContainer},React.createElement("div",{className:styles.distance},formatDistance(distance||0,unitSystem==='imperial')))),React.createElement("td",{className:styles.cell},React.createElement("div",{className:styles.cellContainer},React.createElement("div",{className:styles.buttonContainer},React.createElement("div",{className:styles.makeMyStore},!isComingSoon&&React.createElement(Button,{className:styles.button,onClick:function onClick(){return selectLocation(location,true);},role:"button",type:"primary",flat:true,disabled:isPreferredLocation,wrapContent:false},"".concat(i18n.text('location.makeMyStore'))),isComingSoon&&React.createElement(Button,{className:styles.button,role:"button",type:"primary",flat:true,disabled:true,wrapContent:false},i18n.text('location.comingSoon'))),React.createElement("div",{className:styles.storeInfo},React.createElement(Button,{className:styles.button,role:"button",type:"primary",flat:true,onClick:function onClick(){return openStoreDetails(code);},wrapContent:false},i18n.text('locations.details')))))));};export default StoresNearbyListItem;
@@ -1,4 +0,0 @@
1
- import React from'react';import{css}from'glamor';import{themeConfig}from'@shopgate/engage';import StoreDetails from"./components/StoreDetails";import StoreLocationMap from"./components/StoreLocationMap";import StoresNearby from"./components/StoresNearby";import FindMoreStores from"./components/FindMoreStores";import{StoreDetailsProvider}from"../../providers";var styles={page:css({padding:"".concat(themeConfig.variables.gap.small,"px ").concat(themeConfig.variables.gap.big,"px")}).toString()};/**
2
- * @param {Object} props .
3
- * @returns {JSX}
4
- */var StoreDetailsContent=function StoreDetailsContent(){return React.createElement(StoreDetailsProvider,null,React.createElement("div",{className:styles.page},React.createElement(StoreDetails,null),React.createElement(StoreLocationMap,null),React.createElement(StoresNearby,null),React.createElement(FindMoreStores,null)));};export default StoreDetailsContent;
@@ -1 +0,0 @@
1
- import{createContext}from'react';export var StoreContext=createContext({});
@@ -1,3 +0,0 @@
1
- import React,{useRef}from'react';import{hot}from'react-hot-loader/root';import{StoreFinderProvider}from"../../providers";import StoreFinderSearch from"./StoreFinderSearch";import StoreFinderLocations from"./StoreFinderLocations";import{container,storeSearch,storeList}from"./StoreFinder.style";/**
2
- * @returns {JSX.Element}
3
- */var StoreFinder=function StoreFinder(){var storeListRef=useRef(null);return React.createElement(StoreFinderProvider,{storeListRef:storeListRef},React.createElement("div",{className:container},React.createElement("div",{className:storeSearch},React.createElement(StoreFinderSearch,null)),React.createElement("div",{className:storeList},React.createElement(StoreFinderLocations,{ref:storeListRef}))));};export default hot(StoreFinder);
@@ -1 +0,0 @@
1
- import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var variables=themeConfig.variables;export var container=css({display:'grid',gridTemplateColumns:'1fr',gridTemplateRows:'auto 1fr',gridTemplateAreas:'"search" "store-list"',height:'inherit'});export var storeSearch=css({gridArea:'search',padding:"".concat(variables.gap.big,"px 4px 0 4px"),' select':{color:'var(--color-text-medium-emphasis)'}});export var storeList=css({gridArea:'store-list',width:'100%',overflow:'hidden',padding:'0 12px 8px 12px'});
@@ -1,4 +0,0 @@
1
- import{connect}from'react-redux';import{historyPush}from'@shopgate/pwa-common/actions/router/historyPush';/**
2
- * @param {Function} dispatch The redux dispatch function.
3
- * @return {Object} The extended component props.
4
- */var mapDispatchToProps=function mapDispatchToProps(dispatch){return{openMap:function openMap(url){return dispatch(historyPush({pathname:url,state:{target:'_blank'}}));}};};export default connect(null,mapDispatchToProps);
@@ -1,4 +0,0 @@
1
- import React,{useMemo,useCallback}from'react';import PropTypes from'prop-types';import classNames from'classnames';import{i18n,generateGoogleMapsDirectionsUrl}from'@shopgate/engage/core';import{RippleButton}from'@shopgate/engage/components';import{container,button}from"./StoreFinderGetDirectionsButton.style";import connect from"./StoreFinderGetDirectionsButton.connector";/**
2
- * @param {Object} props The component props
3
- * @returns {JSX}
4
- */var StoreFinderGetDirectionsButton=function StoreFinderGetDirectionsButton(_ref){var address=_ref.address,openMap=_ref.openMap,className=_ref.className;var url=useMemo(function(){return address&&generateGoogleMapsDirectionsUrl(address);},[address]);var handleClick=useCallback(function(){openMap(url);},[openMap,url]);if(!address){return null;}return React.createElement("div",{className:classNames(container,className)},React.createElement(RippleButton,{onClick:handleClick,className:button},i18n.text('locations.get_directions')));};StoreFinderGetDirectionsButton.defaultProps={address:null,openMap:function openMap(){},className:null};export default connect(StoreFinderGetDirectionsButton);
@@ -1 +0,0 @@
1
- import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var colors=themeConfig.colors;export var container=css({}).toString();export var button=css({width:'100%',background:"var(--color-primary, ".concat(colors.primary,")!important"),color:"var(--color-primary-contrast, ".concat(colors.primaryContrast,")!important"),fontSize:'0.875rem !important'}).toString();
@@ -1,3 +0,0 @@
1
- function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import React,{useContext,useMemo}from'react';import classNames from'classnames';import{StoreContext}from"./Store.context";import{StoreFinderContext}from"../../locations.context";import StoreFinderLocationHeader from"./StoreFinderLocationHeader";import{container,selected}from"./StoreFinderLocation.style";import{StoreFinderSelectLocationButton}from"./StoreFinderSelectLocationButton";import StoreFinderStoreInfoButton from"./StoreFinderStoreInfoButton";/**
2
- * @returns {JSX}
3
- */var StoreFinderLocation=function StoreFinderLocation(){var store=useContext(StoreContext);var _useContext=useContext(StoreFinderContext),selectedLocation=_useContext.selectedLocation;var isSelected=useMemo(function(){var _ref=selectedLocation||{},code=_ref.code;return store.code===code;},[selectedLocation,store.code]);return React.createElement("div",{className:classNames(container,_defineProperty({},selected,isSelected)),"data-location-code":store.code},React.createElement(StoreFinderLocationHeader,null),React.createElement(StoreFinderSelectLocationButton,null),React.createElement(StoreFinderStoreInfoButton,null));};export default StoreFinderLocation;
@@ -1 +0,0 @@
1
- import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var variables=themeConfig.variables;export var container=css({}).toString();export var selected=css({}).toString();export var directionsButton=css({padding:"0 ".concat(variables.gap.big,"px ").concat(variables.gap.big,"px")}).toString();
@@ -1,3 +0,0 @@
1
- import _isEmpty from"lodash/isEmpty";import _every from"lodash/every";import React,{useContext}from'react';import{StoreContext}from"./Store.context";import{StoreOpeningHours}from"../StoreList/StoreOpeningHours";import{Accordion,I18n}from"../../../components";import{accordionHeader,accordionContent}from"./StoreFinderLocationDetails.style";/**
2
- * @returns {JSX}
3
- */var StoreFinderLocationDetails=function StoreFinderLocationDetails(){var _useContext=useContext(StoreContext),operationHours=_useContext.operationHours;if(!operationHours||_every(operationHours,_isEmpty)){return null;}return React.createElement(Accordion,{className:accordionHeader,renderLabel:function renderLabel(){return React.createElement(I18n.Text,{string:"locations.details"});}},React.createElement("div",{className:accordionContent},React.createElement(StoreOpeningHours,{hours:operationHours,pure:true})));};export default StoreFinderLocationDetails;
@@ -1 +0,0 @@
1
- import{css}from'glamor';import{themeColors}from'@shopgate/pwa-common/helpers/config';export var accordionHeader=css({borderTop:"1px solid ".concat(themeColors.shade7),cursor:'pointer',' svg':{display:'inline'}}).toString();export var accordionContent=css({fontSize:'0.875rem',' > div':{padding:0}}).toString();
@@ -1,3 +0,0 @@
1
- import React,{useContext,useMemo}from'react';import{Grid,LocationIcon}from'@shopgate/engage/components';import{i18n}from'@shopgate/engage/core/helpers';import{StoreContext}from"./Store.context";import{StoreFinderContext}from"../../locations.context";import{StoreDistance}from"../StoreList/StoreDistance";import{StoreHoursToday}from"../StoreList/StoreHoursToday";import{StoreAddress}from"../StoreList/StoreAddress";import StoreFinderLocationHeaderPhoneNumber from"./StoreFinderLocationHeaderPhoneNumber";import{container,storeName,storeDistance,storeHoursToday,clickable,storeNameWrapper,myStore,myStoreIcon,myStoreWrapper}from"./StoreFinderLocationHeader.style";/**
2
- * @returns {JSX}
3
- */var StoreFinderLocationHeader=function StoreFinderLocationHeader(){var store=useContext(StoreContext);var name=store.name,distance=store.distance,unitSystem=store.unitSystem,operationHours=store.operationHours,address=store.address;var _useContext=useContext(StoreFinderContext),selectedLocation=_useContext.selectedLocation;var isSelectedLocation=useMemo(function(){return(selectedLocation===null||selectedLocation===void 0?void 0:selectedLocation.code)===(store===null||store===void 0?void 0:store.code);},[selectedLocation,store]);return React.createElement("div",{className:container},React.createElement("div",{className:clickable},React.createElement(Grid,null,React.createElement(Grid.Item,{grow:1},React.createElement("div",{className:storeNameWrapper},React.createElement("div",{className:storeName},name),isSelectedLocation&&React.createElement("div",{className:myStoreWrapper},React.createElement("div",{className:myStoreIcon},React.createElement(LocationIcon,{size:20})),React.createElement("div",{className:myStore},i18n.text('location.myStore'))))),React.createElement(Grid.Item,{className:storeDistance},React.createElement(StoreDistance,{distance:distance,unitSystem:unitSystem}))),React.createElement("div",{className:storeHoursToday},React.createElement(StoreHoursToday,{hours:operationHours})),React.createElement(StoreAddress,{address:address})),React.createElement(StoreFinderLocationHeaderPhoneNumber,{phone:address.phoneNumber}));};export default StoreFinderLocationHeader;
@@ -1 +0,0 @@
1
- import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var variables=themeConfig.variables;export var container=css({padding:variables.gap.big,display:'flex',flexDirection:'column',color:'var(--color-text-low-emphasis)',' > *':{margin:0},' svg':{color:'var(--color-text-low-emphasis)'},' li':{paddingTop:0},' a':{color:'var(--color-primary)',textDecoration:'underline'},fontSize:'0.875rem',lineHeight:'1.5rem',' > *:not(:last-child)':{paddingBottom:variables.gap.xsmall,paddingTop:0}}).toString();export var clickable=css({' > *':{margin:0,paddingTop:0},' > *:not(:last-child)':{paddingBottom:variables.gap.xsmall,paddingTop:0}}).toString();export var storeName=css({fontSize:'1rem',fontWeight:500,color:'var(--color-text-high-emphasis)'}).toString();export var myStoreWrapper=css({display:'flex',alignItems:'center'}).toString();export var myStore=css({color:'var(--color-primary)',fontSize:'1rem',fontWeight:500}).toString();export var myStoreIcon=css({' svg':{color:'var(--color-primary)'},marginRight:'4px'}).toString();export var storeNameWrapper=css({flexWrap:'wrap',display:'flex',gap:'2px 12px'});export var storeDistance=css({lineHeight:'1.65rem',paddingLeft:variables.gap.small}).toString();export var storeHoursToday=css({' > *':{color:'var(--color-text-low-emphasis)'}}).toString();
@@ -1,4 +0,0 @@
1
- import React from'react';import PropTypes from'prop-types';import PhoneIcon from'@shopgate/pwa-ui-shared/icons/PhoneIcon';import{StoreDetailsLine}from"../StoreList/StoreDetailsLine";/**
2
- * @param {Object} props The component props
3
- * @returns {JSX}
4
- */var StoreFinderLocationHeaderPhoneNumber=function StoreFinderLocationHeaderPhoneNumber(_ref){var phone=_ref.phone,pure=_ref.pure;if(!phone){return null;}if(pure){return React.createElement("a",{href:"tel:".concat(phone)},phone);}return React.createElement(StoreDetailsLine,{icon:PhoneIcon},React.createElement("a",{href:"tel:".concat(phone)},phone));};StoreFinderLocationHeaderPhoneNumber.defaultProps={phone:null,pure:false};export default StoreFinderLocationHeaderPhoneNumber;
@@ -1,5 +0,0 @@
1
- import React,{useContext,forwardRef}from'react';import{CardList}from'@shopgate/engage/components';import{StoreFinderContext}from"../../locations.context";import{StoreContext}from"./Store.context";import StoreFinderLocation from"./StoreFinderLocation";import{container,cardList,card}from"./StoreFinderLocations.style";/**
2
- * @param {Object} props The component props
3
- * @param {Object} ref A forwarded ref
4
- * @returns {JSX}
5
- */var StoreFinderLocations=function StoreFinderLocations(props,ref){var _useContext=useContext(StoreFinderContext),locations=_useContext.locations;if(!locations||locations.length===0){return null;}return React.createElement("div",{ref:ref,className:container},React.createElement(CardList,{className:cardList},locations.map(function(location){return React.createElement(CardList.Item,{className:card,key:location.code},React.createElement(StoreContext.Provider,{value:location},React.createElement(StoreFinderLocation,null)));})));};export default forwardRef(StoreFinderLocations);
@@ -1 +0,0 @@
1
- import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var colors=themeConfig.colors,variables=themeConfig.variables;var gapM=variables.gap.small+variables.gap.xsmall;export var container=css({paddingTop:2,borderTop:'none',overflowY:'unset',WebkitOverflowScrolling:'unset'});export var cardList=css({paddingTop:0}).toString();export var card=css({background:colors.light,border:"1px solid ".concat(colors.shade7),boxSizing:'border-box',boxShadow:'0px 1px 2px rgba(0, 0, 0, 0.25)',borderRadius:3,':not(:last-child)':{marginBottom:gapM}}).toString();
@@ -1,3 +0,0 @@
1
- import React from'react';import StoreListSearch from"../StoreList/StoreListSearch";import{container}from"./StoreFinderSearch.style";/**
2
- * @returns {JSX}
3
- */var StoreFinderSearch=function StoreFinderSearch(){return React.createElement("div",{className:container},React.createElement(StoreListSearch,{isStoreFinder:true}));};export default StoreFinderSearch;
@@ -1 +0,0 @@
1
- import{css}from'glamor';import{themeVariables}from'@shopgate/pwa-common/helpers/config';export var container=css({paddingBottom:themeVariables.gap.small});
@@ -1,5 +0,0 @@
1
- import React,{useCallback,useContext,useMemo}from'react';import{RippleButton}from'@shopgate/engage/components';import{StoreContext}from"./Store.context";import{i18n}from"../../../core";import{StoreFinderContext}from"../../locations.context";import{selectLocationButton,selectLocationButtonWrapper}from"../StoreList/Store.style";/**
2
- * The StoreFinderSelectLocationButton component.
3
- * Renders if route query.selectLocation param is passed
4
- * @returns {JSX.Element}
5
- */export var StoreFinderSelectLocationButton=function StoreFinderSelectLocationButton(){var store=useContext(StoreContext);var _useContext=useContext(StoreFinderContext),selectLocation=_useContext.selectLocation,isLoading=_useContext.isLoading,selectedLocation=_useContext.selectedLocation;var handleClick=useCallback(function(e){e.stopPropagation();selectLocation(store);},[selectLocation,store]);var isSelected=useMemo(function(){return(selectedLocation===null||selectedLocation===void 0?void 0:selectedLocation.code)===(store===null||store===void 0?void 0:store.code);},[selectedLocation,store]);return React.createElement("div",{className:selectLocationButtonWrapper},React.createElement(RippleButton,{onClick:handleClick,className:selectLocationButton.toString(),disabled:isLoading||(store===null||store===void 0?void 0:store.isComingSoon)||isSelected},i18n.text((store===null||store===void 0?void 0:store.isComingSoon)?'location.comingSoon':'locations.select_location')));};
@@ -1,8 +0,0 @@
1
- import React,{useCallback,useContext}from'react';import classNames from'classnames';import PropTypes from'prop-types';import{RippleButton}from'@shopgate/engage/components';import{historyPush}from'@shopgate/engage/core';import{connect}from'react-redux';import{css}from'glamor';import{themeColors,themeVariables}from'@shopgate/pwa-common/helpers/config';import{StoreContext}from"./Store.context";import{i18n}from"../../../core";import{StoreFinderContext}from"../../locations.context";import{STORE_DETAILS_PATH}from"../../constants";var gap=themeVariables.gap;var styles={showStoreInfoButton:css({width:'100%',fontSize:'.875rem !important',':not(:disabled)':{background:"var(--color-primary, ".concat(themeColors.primary,")!important"),color:"var(--color-primary-contrast, ".concat(themeColors.primaryContrast,")!important")}}),showStoreInfoButtonWrapper:css({padding:"0 ".concat(gap.big,"px ").concat(gap.small,"px ").concat(gap.big,"px")})};/**
2
- * @param {Function} dispatch The dispatch function.
3
- * @returns {Object}
4
- */var mapDispatchToProps=function mapDispatchToProps(dispatch){return{openStoreDetail:function openStoreDetail(code){return dispatch(historyPush({pathname:"".concat(STORE_DETAILS_PATH,"/").concat(code)}));}};};/**
5
- * The StoreFinderStoreInfoButton component.
6
- * @param {Function} openStoreDetail The openStoreDetail function.
7
- * @returns {JSX}
8
- */var StoreFinderStoreInfoButton=function StoreFinderStoreInfoButton(_ref){var openStoreDetail=_ref.openStoreDetail;var store=useContext(StoreContext);var _useContext=useContext(StoreFinderContext),isLoading=_useContext.isLoading;var handleClick=useCallback(function(e){e.stopPropagation();openStoreDetail(store===null||store===void 0?void 0:store.code);},[openStoreDetail,store]);return React.createElement("div",{className:styles.showStoreInfoButtonWrapper},React.createElement(RippleButton,{onClick:handleClick,className:classNames(styles.showStoreInfoButton),disabled:isLoading},i18n.text('locations.store_info')));};export default connect(null,mapDispatchToProps)(StoreFinderStoreInfoButton);
@@ -1 +0,0 @@
1
- export{default as StoreFinder}from"./StoreFinder";
@@ -1 +0,0 @@
1
- import{createContext}from'react';export var StoreContext=createContext({});
@@ -1 +0,0 @@
1
- function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import{css}from'glamor';import{themeVariables,themeColors}from'@shopgate/pwa-common/helpers/config';import{responsiveMediaQuery}from'@shopgate/engage/styles';var gap=themeVariables.gap;var baseCardPadding="".concat(gap.small,"px ").concat(gap.big,"px");var gapM=gap.small+gap.xsmall;export var stores=css({background:"var(--color-background-accent, ".concat(themeColors.background,")"),padding:"".concat(gapM,"px ").concat(gapM,"px ").concat(gap.big,"px"),fontSize:'0.875rem',boxShadow:'inset rgba(0, 0, 0, .117647) 0 1px 6px, inset rgba(0, 0, 0, .117647) 0 1px 4px'}).toString();export var storeCard=css({background:themeColors.light,marginBottom:gapM,':last-of-type':{marginBottom:0},border:"1px solid ".concat(themeColors.shade7),boxSizing:'border-box',boxShadow:'0px 1px 2px rgba(0, 0, 0, 0.25)',borderRadius:'0px 0px 3px 3px'}).toString();export var storeCardPlaceholder=css({margin:'10px 0',height:36}).toString();export var storeHeader=css({cursor:'pointer',padding:"".concat(baseCardPadding," ").concat(gap.xsmall,"px")}).toString();export var disabled=css({cursor:'not-allowed'}).toString();export var storeName=css({fontSize:'1rem',fontWeight:500}).toString();export var storeDistance=css(_defineProperty({whiteSpace:'nowrap',color:"var(--color-text-medium-emphasis, ".concat(themeColors.gray,")")},responsiveMediaQuery('>sm',{webOnly:true}),{fontSize:'0.875rem'})).toString();export var storeDetailsBody=css({padding:baseCardPadding,borderTop:"1px solid ".concat(themeColors.shade7)}).toString();export var storeDetailsAccordion=css({justifyContent:'space-between'}).toString();export var storeHoursToday=css({color:"var(--color-text-medium-emphasis, ".concat(themeColors.gray,")")}).toString();export var address=css({display:'flex',flexFlow:'row nowrap',color:"var(--color-text-medium-emphasis, ".concat(themeColors.gray,")"),marginBottom:4}).toString();export var addressIcon=css({color:'var(--color-text-medium-emphasis)',fontSize:'1.4rem',padding:"".concat(gap.xsmall,"px ").concat(gap.big,"px 0 0")}).toString();export var detailsIcon=css({color:'var(--color-text-medium-emphasis)',fontSize:'1.4rem',padding:"".concat(gap.xsmall,"px ").concat(gap.big,"px 0 0")}).toString();export var detailsIconLinked=css({color:'var(--color-primary)'}).toString();export var detailsLine=css({marginTop:gapM}).toString();export var details=css({paddingTop:gap.xsmall}).toString();export var openingHours=css({display:'table',color:'var(--color-text-medium-emphasis)'}).toString();export var openingHoursRow=css({display:'table-row'}).toString();export var openingHoursDay=css({display:'table-cell',paddingRight:gap.big}).toString();export var detailsPrimary=css({margin:0,color:"var(--color-primary, ".concat(themeColors.primary,")"),lineHeight:'1.375rem'}).toString();export var detailsSecondary=css({color:"var(--color-text-medium-emphasis, ".concat(themeColors.shade11,")"),fontSize:'0.75rem'}).toString();export var selectLocationButtonWrapper=css({padding:"0 ".concat(gap.big,"px ").concat(gap.small,"px ").concat(gap.big,"px")});export var stockInfoContainer=css({marginTop:8,':empty':{display:'none'}});export var selectLocationButton=css({width:'100%',fontSize:'.875rem !important',':not(:disabled)':{background:"var(--color-primary, ".concat(themeColors.primary,")!important"),color:"var(--color-primary-contrast, ".concat(themeColors.primaryContrast,")!important")}});
@@ -1,7 +0,0 @@
1
- import*as React from'react';import PropTypes from'prop-types';import{StoreContext}from"./Store.context";import{FulfillmentContext}from"../../locations.context";import{StockInfo}from"../StockInfo";import{LocationIcon}from"../../../components";import{i18n}from"../../../core";import{address as container,addressIcon,stockInfoContainer}from"./Store.style";/**
2
- * Renders the pickup location's address information.
3
- * @param {Object} props The component props.
4
- * @param {Object} props.address The address object.
5
- * @param {boolean} props.pure Whether to only render the address without any wrapper components.
6
- * @returns {JSX.Element}
7
- */export function StoreAddress(_ref){var address=_ref.address,pure=_ref.pure;var store=React.useContext(StoreContext);var _React$useContext=React.useContext(FulfillmentContext),product=_React$useContext.product;if(!address){return null;}var addressContent=React.createElement("div",null,React.createElement("div",{"data-test-id":"street"},address.street),address.street2&&address.street2!==''&&React.createElement("div",{"data-test-id":"street2"},address.street2),address.street3&&address.street3!==''&&React.createElement("div",{"data-test-id":"street3"},address.street3),address.street4&&address.street4!==''&&React.createElement("div",{"data-test-id":"street4"},address.street4),i18n.text('locations.address',address));if(pure){return addressContent;}return React.createElement("div",{className:container},React.createElement("div",{className:addressIcon,"aria-hidden":true},React.createElement(LocationIcon,null)),React.createElement("div",null,addressContent,product&&React.createElement("div",{className:stockInfoContainer},React.createElement(StockInfo,{location:store,product:product,showStoreName:false}))));}StoreAddress.defaultProps={address:null,pure:false};
@@ -1,7 +0,0 @@
1
- import React,{Fragment,useMemo}from'react';import PropTypes from'prop-types';import{i18n,generateGoogleMapsDirectionsUrl}from'@shopgate/engage/core';import{LocationIcon,Link,Ellipsis,I18n}from'@shopgate/engage/components';import{StoreDetailsLine}from"./StoreDetailsLine";import{detailsPrimary,detailsSecondary}from"./Store.style";/**
2
- * Renders the pickup location's address information.
3
- * @param {Object} props The component props.
4
- * @param {Object} props.address The address object.
5
- * @param {boolean} props.showFull Whether to show the full address.
6
- * @returns {JSX.Element}
7
- */export function StoreAddressShort(_ref){var address=_ref.address,showFull=_ref.showFull;var mapsUrl=useMemo(function(){return address&&generateGoogleMapsDirectionsUrl(address);},[address]);if(!address){return null;}var addressLabel="".concat(address.street+(address.street2?", ".concat(address.street2):'')+(address.street3?", ".concat(address.street3):'')+(address.street4?", ".concat(address.street4):'')+i18n.text('locations.address',address),": ").concat(i18n.text('locations.map_open'));return React.createElement(Link,{target:"_blank",href:mapsUrl,role:"button","aria-label":addressLabel},React.createElement(StoreDetailsLine,{icon:LocationIcon,linked:true},showFull&&React.createElement(Fragment,null,React.createElement("p",{className:detailsPrimary},address.street),address.street2&&address.street2!==''&&React.createElement("p",{className:detailsPrimary},address.street2),address.street3&&address.street3!==''&&React.createElement("p",{className:detailsPrimary},address.street3),address.street4&&address.street4!==''&&React.createElement("p",{className:detailsPrimary},address.street4)),React.createElement(Ellipsis,{rows:1,className:detailsPrimary},i18n.text('locations.address',address)),React.createElement(I18n.Text,{string:"locations.map_open",className:detailsSecondary,"aria-label":": ".concat(i18n.text('locations.map_open'))})));}StoreAddressShort.defaultProps={address:null,showFull:false};
@@ -1,4 +0,0 @@
1
- import React,{useContext,Fragment}from'react';import{StoreContext}from"./Store.context";import{StoreHeader}from"./StoreHeader";import{StoreDetails}from"./StoreDetails";import{StoreSelectLocationButton}from"./StoreSelectLocationButton";/**
2
- * Renders the store's card.
3
- * @returns {JSX}
4
- */export function StoreCard(){var store=useContext(StoreContext);if(!store||!store.address){return null;}return React.createElement(Fragment,null,React.createElement(StoreHeader,null),React.createElement(StoreDetails,null),React.createElement(StoreSelectLocationButton,null));}
@@ -1,4 +0,0 @@
1
- import React,{useContext}from'react';import{Accordion}from"../../../components";import{StoreContext}from"./Store.context";import{StoreOpeningHours}from"./StoreOpeningHours";import{StoreAddress}from"./StoreAddress";import{StorePhoneNumber}from"./StorePhoneNumber";import{StoreAddressShort}from"./StoreAddressShort";import{storeDetailsBody,storeDetailsAccordion}from"./Store.style";/**
2
- * Renders a single store details.
3
- * @returns {JSX}
4
- */export function StoreDetails(){var store=useContext(StoreContext);if(!store){return null;}return React.createElement(Accordion,{className:storeDetailsAccordion,renderLabel:function renderLabel(){return React.createElement(StoreAddress,{address:store.address});},contentClassName:storeDetailsBody},React.createElement(StoreOpeningHours,{hours:store.operationHours}),store.address&&React.createElement(StorePhoneNumber,{phone:store.address.phoneNumber}),React.createElement(StoreAddressShort,{showFull:true,address:store.address}));}
@@ -1,8 +0,0 @@
1
- function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import*as React from'react';import PropTypes from'prop-types';import classNames from'classnames';import{Grid}from'@shopgate/engage/components';import{detailsLine,detailsIcon,detailsIconLinked,details}from"./Store.style";/**
2
- * Renders a single store headline.
3
- * @param {Object} props The component props.
4
- * @param {React.ReactElement} props.icon The icon component.
5
- * @param {boolean} props.linked Whether the details should be linked.
6
- * @param {React.ReactNode} props.children The component children.
7
- * @returns {JSX.Element}
8
- */export function StoreDetailsLine(_ref){var Icon=_ref.icon,children=_ref.children,linked=_ref.linked;return React.createElement(Grid,{className:detailsLine},React.createElement(Grid.Item,{shrink:0,className:classNames(detailsIcon,_defineProperty({},detailsIconLinked,linked))},React.createElement(Icon,{"aria-hidden":true})),React.createElement(Grid.Item,{grow:1,className:details},children));}StoreDetailsLine.defaultProps={linked:false};
@@ -1,7 +0,0 @@
1
- import React from'react';import PropTypes from'prop-types';import formatDistance from"../../helpers/formatDistance";import{storeDistance}from"./Store.style";export var UNIT_SYSTEM_METRIC='metric';export var UNIT_SYSTEM_IMPERIAL='imperial';/**
2
- * Renders a single store distance.
3
- * @param {Object} props The component props.
4
- * @param {number} props.distance The distance.
5
- * @param {string} props.unitSystem The unit system.
6
- * @returns {JSX.Element}
7
- */export function StoreDistance(_ref){var _ref$distance=_ref.distance,distance=_ref$distance===void 0?null:_ref$distance,_ref$unitSystem=_ref.unitSystem,unitSystem=_ref$unitSystem===void 0?UNIT_SYSTEM_METRIC:_ref$unitSystem;if(distance===null){return null;}return React.createElement("span",{className:storeDistance},formatDistance(distance,unitSystem===UNIT_SYSTEM_IMPERIAL));}StoreDistance.defaultProps={distance:null,unitSystem:UNIT_SYSTEM_METRIC};
@@ -1,4 +0,0 @@
1
- function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import React,{useContext}from'react';import classNames from'classnames';import{Grid,ResponsiveContainer}from'@shopgate/engage/components';import{isProductAvailable}from"../../helpers";import{FulfillmentContext}from"../../locations.context";import{StoreContext}from"./Store.context";import{StoreDistance}from"./StoreDistance";import{StoreHoursToday}from"./StoreHoursToday";import{StoreSelectLocationButton}from"./StoreSelectLocationButton";import{StockInfo}from"../StockInfo";import{storeHeader,storeName,disabled}from"./Store.style";/**
2
- * Renders a single store headline.
3
- * @returns {JSX}
4
- */export function StoreHeader(){var store=useContext(StoreContext);var _useContext=useContext(FulfillmentContext),product=_useContext.product;var isAvailable=isProductAvailable(store,store===null||store===void 0?void 0:store.inventory);var name=store.name,distance=store.distance,unitSystem=store.unitSystem;return React.createElement("div",{className:classNames(storeHeader,_defineProperty({},disabled,!isAvailable))},React.createElement(Grid,null,React.createElement(Grid.Item,{grow:1,className:storeName},name,React.createElement(ResponsiveContainer,{breakpoint:">=sm",webOnly:true},React.createElement("ul",null,React.createElement(Grid.Item,{shrink:0},React.createElement(StockInfo,{location:store,product:product,showStoreName:false}),React.createElement(StoreDistance,{distance:distance,unitSystem:unitSystem}))))),React.createElement(ResponsiveContainer,{breakpoint:"<sm",appAlways:true},React.createElement(Grid.Item,{shrink:0},React.createElement(StoreDistance,{distance:distance,unitSystem:unitSystem}))),React.createElement(ResponsiveContainer,{breakpoint:">=sm",webOnly:true},React.createElement(Grid.Item,{shrink:0},React.createElement(StoreSelectLocationButton,null)))),React.createElement(StoreHoursToday,{hours:store.operationHours}));}
@@ -1,7 +0,0 @@
1
- import React from'react';import PropTypes from'prop-types';import{i18n}from"../../../core";import{storeHoursToday}from"./Store.style";var weekdays=['sun','mon','tue','wed','thu','fri','sat'];/**
2
- * Renders the store's opening hours for "today".
3
- * @param {Object} props The component props.
4
- * @param {Object} props.hours The store's opening hours.
5
- * @param {boolean} props.longLabel Whether to render the opening hours with a long label
6
- * @returns {JSX.Element}
7
- */export function StoreHoursToday(_ref){var hours=_ref.hours,longLabel=_ref.longLabel;if(!hours){return null;}var today=weekdays[new Date().getDay()];var hoursToday=hours[today]||null;if(!hoursToday||hoursToday===''){return null;}var label=longLabel?'locations.today_hours_long':'locations.today_hours';return React.createElement("div",{className:storeHoursToday},i18n.text(label,{hours:hoursToday}));}StoreHoursToday.defaultProps={hours:null,longLabel:false};