@shopgate/engage 7.27.3-alpha.15 → 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.
- package/a11y/components/LiveMessage/index.js +1 -1
- package/a11y/components/LiveMessenger/helpers.js +1 -1
- package/a11y/components/LiveMessenger/index.js +2 -2
- package/a11y/components/Navigation/index.js +1 -1
- package/a11y/components/Section/index.js +3 -3
- package/a11y/components/VisuallyHidden/index.js +1 -1
- package/a11y/components/index.js +1 -1
- package/a11y/index.js +4 -1
- package/account/constants/index.js +1 -1
- package/account/index.js +1 -1
- package/app-rating/actions/showModal.js +3 -3
- package/app-rating/helpers/index.js +1 -1
- package/app-rating/subscriptions/index.js +6 -11
- package/back-in-stock/actions/index.js +1 -1
- package/back-in-stock/components/BackInStockButton/index.js +3 -3
- package/back-in-stock/components/CharacteristicsButton/index.js +1 -1
- package/back-in-stock/components/ProductInfoBackInStockButton/index.js +1 -1
- package/back-in-stock/components/Subscriptions/components/List/index.js +2 -2
- package/back-in-stock/components/Subscriptions/components/Subscription/index.js +2 -2
- package/back-in-stock/components/Subscriptions/index.js +1 -1
- package/back-in-stock/providers/BackInStockSubscriptionsProvider.context.js +1 -1
- package/back-in-stock/providers/BackInStockSubscriptionsProvider.js +1 -1
- package/back-in-stock/selectors/index.js +3 -5
- package/back-in-stock/streams/index.js +1 -1
- package/back-in-stock/subscriptions/index.js +2 -2
- package/cart/index.js +5 -10
- package/category/components/CategoryList/index.js +2 -2
- package/category/components/CategoryList/style.js +1 -1
- package/category/index.js +7 -1
- package/checkout/index.js +5 -6
- package/components/ChipLayout/index.js +7 -7
- package/components/ChipLayout/spec.js +1 -1
- package/components/ChipLayout/style.js +2 -2
- package/components/ConditionalWrapper/index.js +5 -1
- package/components/Footer/Footer.js +23 -4
- package/components/Footer/Footer.style.js +7 -1
- package/components/Form/Builder/Builder.constants.js +1 -1
- package/components/Form/Builder/Builder.js +37 -53
- package/components/Form/Builder/ElementCheckbox.js +2 -2
- package/components/Form/Builder/ElementRadio.js +2 -2
- package/components/Form/Builder/ElementSelect.js +3 -3
- package/components/Form/Builder/ElementText.js +4 -4
- package/components/Form/Builder/classes/ActionListener.constants.js +2 -2
- package/components/Form/Builder/classes/ActionListener.js +15 -72
- package/components/Form/Builder/helpers/buildCountryList.js +3 -3
- package/components/Form/Builder/helpers/buildFormDefaults.js +1 -1
- package/components/Form/Builder/helpers/buildProvinceList.js +1 -1
- package/components/Form/Form.js +8 -11
- package/components/Form/index.js +1 -1
- package/components/IntersectionVisibility/index.js +6 -13
- package/components/Logo/index.js +2 -2
- package/components/Logo/spec.js +1 -1
- package/components/Logo/style.js +1 -1
- package/components/MessageBar/index.js +7 -1
- package/components/MessageBar/spec.js +1 -0
- package/components/MessageBar/style.js +2 -0
- package/components/NavigationHandler/connector.js +1 -1
- package/components/NavigationHandler/index.js +6 -6
- package/components/NavigationHandler/spec.js +1 -1
- package/components/Picker/components/Button/index.js +1 -1
- package/components/Picker/components/List/index.js +2 -2
- package/components/Picker/components/Modal/index.js +7 -7
- package/components/Picker/index.js +10 -19
- package/components/Picker/spec.js +2 -2
- package/components/PickerUtilize/components/Button/index.js +1 -1
- package/components/PickerUtilize/index.js +6 -8
- package/components/PickerUtilize/spec.js +1 -2
- package/components/QuantityInput/QuantityInput.js +4 -5
- package/components/RangeSlider/components/Handle/index.js +2 -2
- package/components/RangeSlider/components/Handle/style.js +1 -1
- package/components/RangeSlider/helper.js +3 -3
- package/components/RangeSlider/index.js +23 -35
- package/components/RangeSlider/spec.js +4 -4
- package/components/ScrollHeader/index.js +5 -22
- package/components/ScrollHeader/style.js +1 -1
- package/components/SheetDrawer/index.js +3 -4
- package/components/SheetList/components/Item/index.js +5 -5
- package/components/SheetList/components/Item/spec.js +2 -2
- package/components/SheetList/components/Item/style.js +1 -1
- package/components/SheetList/index.js +4 -4
- package/components/SheetList/spec.js +1 -1
- package/components/SheetList/style.js +1 -1
- package/components/SnackBarContainer/index.js +1 -1
- package/components/Switch/index.js +1 -1
- package/components/TimeBoundary/index.js +8 -10
- package/components/TimeBoundary/spec.js +3 -3
- package/components/VideoPlayer/index.js +6 -9
- package/components/View/components/Above/index.js +1 -1
- package/components/View/components/Below/index.js +1 -1
- package/components/View/components/Content/index.js +13 -13
- package/components/View/components/Content/style.js +1 -1
- package/components/View/context.js +1 -1
- package/components/View/index.js +5 -5
- package/components/View/provider.js +7 -24
- package/components/View/style.js +6 -1
- package/components/index.js +4 -4
- package/core/action-creators/appPermissions.js +1 -1
- package/core/action-creators/index.js +1 -1
- package/core/actions/getGeolocation.js +2 -2
- package/core/actions/grantAppTrackingTransparencyPermission.js +1 -3
- package/core/actions/grantGeolocationPermissions.js +2 -6
- package/core/actions/grantPermissions.js +4 -16
- package/core/actions/grantPushPermissions.js +3 -4
- package/core/actions/index.js +2 -2
- package/core/actions/requestAppPermission.js +2 -7
- package/core/actions/requestAppPermissionStatus.js +2 -7
- package/core/actions/updateStatusBarBackground.js +3 -3
- package/core/classes/GeolocationRequest.js +4 -8
- package/core/collections/AppInitialization.js +6 -4
- package/core/config/ThemeConfigResolver.js +3 -3
- package/core/constants/appFeatures.js +1 -1
- package/core/constants/geolocationRequest.js +1 -1
- package/core/constants/index.js +3 -3
- package/core/contexts/AppContext.js +1 -1
- package/core/helpers/appFeatures.js +9 -21
- package/core/helpers/baseUrl.js +1 -1
- package/core/helpers/getFullImageSource.js +2 -21
- package/core/helpers/i18n.js +5 -10
- package/core/helpers/index.js +3 -3
- package/core/helpers/updateLegacyNavigationBar.js +2 -5
- package/core/hocs/withApp.js +1 -1
- package/core/hocs/withCurrentProduct.js +3 -3
- package/core/hocs/withForwardedRef.js +1 -1
- package/core/hocs/withNavigation.js +1 -1
- package/core/hocs/withRoute.js +1 -1
- package/core/hocs/withTheme.js +3 -42
- package/core/hocs/withWidgetSettings.js +1 -1
- package/core/hocs/withWidgetStyles.js +1 -1
- package/core/hooks/html/useLoadImage.js +1 -1
- package/core/hooks/useTheme.js +2 -38
- package/core/hooks/useWidgetStyles.js +1 -1
- package/core/index.js +11 -5
- package/core/initialization/index.js +4 -19
- package/core/providers/AppProvider.js +9 -9
- package/core/reducers/index.js +1 -1
- package/core/selectors/index.js +1 -1
- package/core/streams/app.js +1 -1
- package/core/streams/index.js +1 -1
- package/core/subscriptions/app.js +3 -4
- package/favorites/components/Item/Item.js +9 -13
- package/favorites/components/Item/ItemCharacteristics.js +2 -2
- package/favorites/components/List/List.js +15 -19
- package/favorites/components/ListChooser/ListChooser.js +2 -2
- package/favorites/components/ListChooser/ListChooserItem.js +5 -4
- package/favorites/components/Lists/Lists.js +13 -17
- package/favorites/components/Lists/ListsModal.js +4 -3
- package/favorites/components/RemoveButton/RemoveButton.js +2 -2
- package/favorites/constants/Portals.js +2 -1
- package/favorites/constants/constants.js +1 -0
- package/favorites/index.js +2 -2
- package/filter/components/FilterItem/index.js +2 -2
- package/filter/components/FilterItem/spec.js +1 -1
- package/filter/components/PriceSlider/components/Label/index.js +3 -3
- package/filter/components/PriceSlider/components/Label/spec.js +1 -1
- package/filter/components/PriceSlider/index.js +8 -8
- package/filter/components/PriceSlider/spec.js +1 -1
- package/filter/components/PriceSlider/style.js +1 -1
- package/filter/helpers/buildFilterParamsForFetchFiltersRequest.js +2 -2
- package/filter/helpers/buildInitialFilters.js +2 -2
- package/filter/helpers/buildUpdatedFilters.js +2 -2
- package/filter/helpers/translateFilterLabel.js +3 -3
- package/filter/index.js +7 -2
- package/orders/index.js +1 -1
- package/package.json +18 -26
- package/page/index.js +4 -2
- package/product/components/Characteristics/Characteristic/components/Sheet/index.js +4 -16
- package/product/components/Characteristics/Characteristic/components/SheetItem/index.js +3 -8
- package/product/components/Characteristics/Characteristic/components/SheetItem/style.js +1 -1
- package/product/components/Characteristics/Characteristic/components/VariantAvailability/connector.js +9 -0
- package/product/components/Characteristics/Characteristic/components/VariantAvailability/index.js +5 -0
- package/product/components/Characteristics/Characteristic/index.js +6 -15
- package/product/components/Characteristics/Characteristic/style.js +1 -1
- package/product/components/Characteristics/Swatch/index.js +6 -8
- package/product/components/Characteristics/index.js +3 -10
- package/product/components/Characteristics/transition.js +1 -1
- package/product/components/Description/index.js +6 -5
- package/product/components/Description/style.js +1 -1
- package/product/components/EffectivityDates/helpers.js +5 -5
- package/product/components/EffectivityDates/index.js +2 -2
- package/product/components/EffectivityDates/style.js +1 -1
- package/product/components/Header/PriceStriked/index.js +5 -2
- package/product/components/Header/PriceStriked/style.js +1 -1
- package/product/components/Header/Shipping/components/Label/index.js +3 -3
- package/product/components/Header/Shipping/components/Label/style.js +1 -1
- package/product/components/Header/Shipping/index.js +1 -1
- package/product/components/Header/Shipping/spec.js +1 -1
- package/product/components/Header/Tiers/components/Tier/index.js +2 -2
- package/product/components/Header/Tiers/components/Tier/spec.js +1 -1
- package/product/components/Header/Tiers/index.js +1 -1
- package/product/components/Header/Tiers/spec.js +1 -1
- package/product/components/MapPriceHint/index.js +1 -1
- package/product/components/Media/FeaturedMedia.js +2 -2
- package/product/components/Media/MediaImage.js +3 -3
- package/product/components/Media/MediaPlaceholder.js +1 -1
- package/product/components/MediaSlider/components/MediaImage/index.js +1 -1
- package/product/components/MediaSlider/components/MediaVideo/index.js +1 -1
- package/product/components/MediaSlider/index.js +4 -4
- package/product/components/Options/components/Content/index.js +8 -8
- package/product/components/Options/components/Content/spec.js +2 -2
- package/product/components/Options/components/Option/index.js +2 -2
- package/product/components/Options/components/TextOption/components/OptionInfo/index.js +3 -3
- package/product/components/Options/components/TextOption/components/OptionInfo/spec.js +1 -1
- package/product/components/Options/components/TextOption/components/OptionInfo/style.js +1 -1
- package/product/components/Options/components/TextOption/index.js +7 -19
- package/product/components/Options/components/TextOption/style.js +1 -1
- package/product/components/Options/index.js +2 -2
- package/product/components/OrderQuantityHint/index.js +2 -3
- package/product/components/OrderQuantityHint/style.js +1 -1
- package/product/components/PriceDifference/index.js +1 -1
- package/product/components/PriceDifference/style.js +1 -1
- package/product/components/ProductBadges/index.js +2 -2
- package/product/components/ProductCard/index.js +3 -12
- package/product/components/ProductCard/style.js +1 -1
- package/product/components/ProductCharacteristics/context.js +1 -1
- package/product/components/ProductCharacteristics/helpers/index.js +1 -1
- package/product/components/ProductCharacteristics/index.js +16 -30
- package/product/components/ProductDiscountBadge/index.js +2 -2
- package/product/components/ProductDiscountBadge/spec.js +2 -2
- package/product/components/ProductDiscountBadge/style.js +1 -1
- package/product/components/ProductGridPrice/index.js +3 -3
- package/product/components/ProductGridPrice/style.js +1 -1
- package/product/components/ProductImage/index.js +13 -17
- package/product/components/ProductImage/spec.js +1 -1
- package/product/components/ProductList/components/Item/index.js +2 -2
- package/product/components/ProductList/components/Iterator/index.js +1 -1
- package/product/components/ProductList/components/Layout/index.js +1 -1
- package/product/components/ProductList/index.js +2 -2
- package/product/components/ProductProperties/Content.js +4 -4
- package/product/components/ProductProperties/Group.js +1 -1
- package/product/components/ProductProperties/GroupedProperties.js +2 -2
- package/product/components/ProductProperties/Lists.js +1 -1
- package/product/components/ProductProperties/ProductProperties.js +2 -2
- package/product/components/ProductProperties/Row.js +1 -1
- package/product/components/ProductProperties/Rows.js +2 -2
- package/product/components/ProductProperties/Wrapper.js +1 -1
- package/product/components/ProductProperties/helpers/getGroupsFromProperties.js +2 -7
- package/product/components/ProductProperties/style.js +1 -1
- package/product/{providers/Product → components/ProductProvider}/index.js +1 -1
- package/product/components/ProductSlider/index.js +2 -3
- package/product/components/ProductSlider/spec.js +1 -1
- package/product/components/QuantityPicker/helpers.js +5 -0
- package/product/components/QuantityPicker/index.js +3 -4
- package/product/components/Rating/index.js +3 -3
- package/product/components/Rating/spec.js +2 -2
- package/product/components/RelationsSlider/RelationsSheet.js +2 -2
- package/product/components/RelationsSlider/RelationsSlider.js +1 -1
- package/product/components/RelationsSlider/RelationsSliderContent.js +1 -1
- package/product/components/RelationsSlider/style.js +1 -1
- package/product/components/Swatch/Swatch.js +1 -1
- package/product/components/Swatch/SwatchContent.js +1 -1
- package/product/components/Swatch/VariantSwatch.js +1 -1
- package/product/components/Swatch/style.js +1 -1
- package/product/components/Swatches/Swatches.js +1 -1
- package/product/components/UnitQuantityPicker/ProductUnitQuantityPicker.js +6 -3
- package/product/components/UnitQuantityPicker/UnitQuantityPicker.js +13 -11
- package/product/components/UnitQuantityPicker/UnitQuantityPickerWithSection.js +2 -5
- package/product/components/UnitQuantityPicker/index.js +1 -1
- package/product/components/context.js +1 -1
- package/product/constants/index.js +1 -2
- package/product/helpers/index.js +2 -2
- package/product/helpers/redirects.js +2 -2
- package/product/hocs/withMapPricing.js +4 -4
- package/product/hocs/withPriceCalculation.js +2 -2
- package/product/hocs/withProductListEntry.js +1 -1
- package/product/hocs/withProductListType.js +1 -1
- package/product/hooks/useLoadProductImage.js +1 -1
- package/product/index.js +11 -4
- package/product/providers/ProductListEntry/context.js +1 -1
- package/product/providers/ProductListEntry/index.js +1 -1
- package/product/providers/ProductListType/context.js +1 -2
- package/product/providers/ProductListType/index.js +1 -2
- package/product/selectors/product.js +6 -75
- package/product/selectors/variants.js +1 -4
- package/push-opt-in/action-creators/pushOptIn.js +1 -2
- package/push-opt-in/actions/pushOptInModal.js +3 -3
- package/push-opt-in/components/PushOptInModal/index.js +6 -3
- package/push-opt-in/components/PushOptInModal/push-opt-in.svg +58 -58
- package/push-opt-in/reducers/optInModal.js +2 -2
- package/push-opt-in/reducers/optInTrigger.js +2 -2
- package/push-opt-in/selectors/optInModal.js +2 -5
- package/push-opt-in/selectors/optInTrigger.js +2 -4
- package/push-opt-in/subscriptions/index.js +1 -1
- package/push-opt-in/subscriptions/optInTrigger.js +6 -6
- package/reviews/components/Reviews/components/AllReviewsLink/index.js +1 -1
- package/reviews/components/Reviews/components/Header/components/AverageRating/index.js +6 -8
- package/reviews/components/Reviews/components/Header/components/NoReviews/index.js +3 -3
- package/reviews/components/Reviews/components/Header/components/ReviewsExcerpt/index.js +3 -3
- package/reviews/components/Reviews/components/Header/components/ReviewsExcerpt/style.js +1 -1
- package/reviews/components/Reviews/components/Header/components/WriteReviewLink/index.js +3 -3
- package/reviews/components/Reviews/components/Header/components/WriteReviewLink/spec.js +2 -2
- package/reviews/components/Reviews/components/Header/index.js +4 -6
- package/reviews/components/Reviews/components/Header/spec.js +2 -2
- package/reviews/components/Reviews/components/List/components/Info/components/Author/index.js +1 -1
- package/reviews/components/Reviews/components/List/components/Info/components/ReviewDate/index.js +1 -1
- package/reviews/components/Reviews/components/List/components/Info/index.js +2 -2
- package/reviews/components/Reviews/components/List/components/Info/style.js +1 -1
- package/reviews/components/Reviews/components/List/components/Rating/index.js +1 -1
- package/reviews/components/Reviews/components/List/components/Review/index.js +1 -1
- package/reviews/components/Reviews/components/List/components/Text/index.js +1 -1
- package/reviews/components/Reviews/components/List/components/Title/index.js +1 -1
- package/reviews/components/Reviews/components/List/index.js +3 -3
- package/reviews/components/Reviews/components/List/spec.js +1 -1
- package/reviews/components/Reviews/components/RatingCount/index.js +1 -1
- package/reviews/components/Reviews/components/RatingCount/spec.js +1 -1
- package/reviews/components/Reviews/components/RatingCount/style.js +1 -1
- package/reviews/components/Reviews/components/ReviewsInfo/index.js +4 -3
- package/reviews/components/Reviews/connector.js +6 -2
- package/reviews/components/Reviews/index.js +1 -1
- package/reviews/components/Reviews/mock.js +6 -2
- package/reviews/components/Reviews/spec.js +3 -4
- package/reviews/index.js +6 -3
- package/scanner/index.js +6 -1
- package/search/index.js +6 -1
- package/tracking/action-creators/cookieConsent.js +2 -2
- package/tracking/actions/cookieConsent.js +5 -17
- package/tracking/components/CookieConsentModal/connector.js +5 -3
- package/tracking/components/CookieConsentModal/index.js +6 -3
- package/tracking/components/CookieConsentModal/tracking-opt-in.svg +14 -14
- package/tracking/components/PrivacySettings/connector.js +5 -3
- package/tracking/components/PrivacySettings/index.js +2 -2
- package/tracking/selectors/cookieConsent.js +5 -10
- package/tracking/streams/cookieConsent.js +3 -10
- package/tracking/subscriptions/analytics.js +4 -5
- package/tracking/subscriptions/cookieConsent.js +10 -6
- package/user/index.js +2 -2
- package/a11y/action-creators/index.js +0 -9
- package/a11y/components/FocusTrap/index.js +0 -1
- package/a11y/components/ModalStateTracker/index.js +0 -14
- package/a11y/constants/index.js +0 -1
- package/a11y/helpers/index.js +0 -1
- package/a11y/hooks/index.js +0 -37
- package/a11y/reducers/index.js +0 -6
- package/a11y/selectors/index.js +0 -8
- package/a11y/styles.js +0 -2
- package/account/actions/addContacts.js +0 -4
- package/account/actions/deleteContact.js +0 -5
- package/account/actions/deleteCustomer.js +0 -4
- package/account/actions/fetchContacts.js +0 -4
- package/account/actions/fetchCustomer.js +0 -4
- package/account/actions/updateContact.js +0 -4
- package/account/actions/updateCustomer.js +0 -4
- package/account/components/Account/Account.connector.js +0 -5
- package/account/components/Account/Account.js +0 -4
- package/account/components/Account/Account.style.js +0 -1
- package/account/components/Account/index.js +0 -1
- package/account/components/Profile/Profile.config.js +0 -11
- package/account/components/Profile/Profile.constraints.js +0 -1
- package/account/components/Profile/Profile.js +0 -1
- package/account/components/Profile/Profile.provider.js +0 -22
- package/account/components/Profile/ProfileAddressBook.js +0 -6
- package/account/components/Profile/ProfileAddressCard.js +0 -3
- package/account/components/Profile/ProfileForm.js +0 -3
- package/account/components/Profile/ProfileHeader.js +0 -3
- package/account/components/Profile/index.js +0 -1
- package/account/components/ProfileContact/ProfileContact.config.js +0 -11
- package/account/components/ProfileContact/ProfileContact.constraints.js +0 -5
- package/account/components/ProfileContact/ProfileContact.js +0 -13
- package/account/components/ProfileContact/index.js +0 -1
- package/account/components/index.js +0 -1
- package/account/constants/actions.js +0 -1
- package/account/constants/pipelines.js +0 -1
- package/account/helper/form.js +0 -61
- package/account/reducers/index.js +0 -6
- package/account/selectors/contacts.js +0 -7
- package/account/selectors/customer.js +0 -7
- package/cart/cart.constants.js +0 -1
- package/cart/cart.context.js +0 -1
- package/cart/cart.helpers.js +0 -15
- package/cart/cart.hooks.js +0 -4
- package/cart/cart.selectors.js +0 -34
- package/cart/cart.types.js +0 -1
- package/cart/components/CartHeaderWide/CartHeaderWide.js +0 -3
- package/cart/components/CartHeaderWide/CartHeaderWide.style.js +0 -1
- package/cart/components/CartHeaderWide/index.js +0 -1
- package/cart/components/CartItem/CartItem.hooks.js +0 -7
- package/cart/components/CartItem/CartItem.js +0 -7
- package/cart/components/CartItem/CartItem.style.js +0 -1
- package/cart/components/CartItem/CartItemCoupon.connector.js +0 -7
- package/cart/components/CartItem/CartItemCoupon.js +0 -20
- package/cart/components/CartItem/CartItemCoupon.style.js +0 -5
- package/cart/components/CartItem/CartItemCoupon.types.js +0 -0
- package/cart/components/CartItem/CartItemCouponCode.js +0 -5
- package/cart/components/CartItem/CartItemCouponDelete.js +0 -5
- package/cart/components/CartItem/CartItemCouponDelete.style.js +0 -1
- package/cart/components/CartItem/CartItemCouponFreeShipping.js +0 -5
- package/cart/components/CartItem/CartItemCouponIcon.js +0 -4
- package/cart/components/CartItem/CartItemCouponLayout.js +0 -6
- package/cart/components/CartItem/CartItemCouponLayout.style.js +0 -5
- package/cart/components/CartItem/CartItemCouponPrice.js +0 -5
- package/cart/components/CartItem/CartItemCouponPrice.style.js +0 -1
- package/cart/components/CartItem/CartItemCouponTitle.js +0 -5
- package/cart/components/CartItem/CartItemCouponTitle.style.js +0 -1
- package/cart/components/CartItem/CartItemProduct.js +0 -5
- package/cart/components/CartItem/CartItemProduct.style.js +0 -1
- package/cart/components/CartItem/CartItemProductLayout.js +0 -6
- package/cart/components/CartItem/CartItemProductLayout.style.js +0 -1
- package/cart/components/CartItem/CartItemProductLayoutWide.js +0 -4
- package/cart/components/CartItem/CartItemProductLayoutWide.style.js +0 -1
- package/cart/components/CartItem/CartItemProductLayoutWideFulfillmentLabel.js +0 -4
- package/cart/components/CartItem/CartItemProductLayoutWideFulfillmentLabel.style.js +0 -1
- package/cart/components/CartItem/CartItemProductLayoutWideOrderDetails.js +0 -3
- package/cart/components/CartItem/CartItemProductLayoutWideRemoveItem.js +0 -4
- package/cart/components/CartItem/CartItemProductLayoutWideRemoveItem.style.js +0 -1
- package/cart/components/CartItem/CartItemProductOrderDetails.js +0 -3
- package/cart/components/CartItem/CartItemProductOrderDetails.style.js +0 -1
- package/cart/components/CartItem/CartItemProductPriceCaption.js +0 -4
- package/cart/components/CartItem/CartItemProductPriceCaption.style.js +0 -1
- package/cart/components/CartItem/CartItemProductPriceList.js +0 -5
- package/cart/components/CartItem/CartItemProductPriceListPromotion.js +0 -10
- package/cart/components/CartItem/CartItemProductProvider.connector.js +0 -9
- package/cart/components/CartItem/CartItemProductProvider.context.js +0 -1
- package/cart/components/CartItem/CartItemProductProvider.js +0 -12
- package/cart/components/CartItem/CartItemProductProvider.types.js +0 -1
- package/cart/components/CartItem/CartItemProductProviderLegacy.js +0 -22
- package/cart/components/CartItem/CartItemProductTitle.js +0 -7
- package/cart/components/CartItem/CartItemProductTitle.style.js +0 -1
- package/cart/components/CartItem/CartItemProvider.connector.js +0 -3
- package/cart/components/CartItem/CartItemProvider.context.js +0 -1
- package/cart/components/CartItem/CartItemProvider.js +0 -5
- package/cart/components/CartItem/CartItemQuantityPicker.js +0 -38
- package/cart/components/CartItem/CartItemQuantityPicker.style.js +0 -1
- package/cart/components/CartItem/CartItemSubstitution.connector.js +0 -5
- package/cart/components/CartItem/CartItemSubstitution.js +0 -5
- package/cart/components/CartItem/CartItemSubstitution.style.js +0 -1
- package/cart/components/CartItem/index.js +0 -1
- package/cart/components/CartItems/CartItem.connector.js +0 -4
- package/cart/components/CartItems/CartItemCard.js +0 -5
- package/cart/components/CartItems/CartItemCard.style.js +0 -1
- package/cart/components/CartItems/CartItemCardReservation.js +0 -5
- package/cart/components/CartItems/CartItemCardReservationAccordion.js +0 -4
- package/cart/components/CartItems/CartItemCardReservationLabel.js +0 -5
- package/cart/components/CartItems/CartItemCardReservationLabelChangeStore.js +0 -3
- package/cart/components/CartItems/CartItemCardReservationLabelChangeStore.style.js +0 -1
- package/cart/components/CartItems/CartItemGroup.js +0 -5
- package/cart/components/CartItems/CartItemGroup.style.js +0 -1
- package/cart/components/CartItems/CartItemGroupReservation.js +0 -5
- package/cart/components/CartItems/CartItemGroupReservationLabel.js +0 -5
- package/cart/components/CartItems/CartItemGroupShipping.js +0 -4
- package/cart/components/CartItems/CartItems.js +0 -5
- package/cart/components/CartItems/CartItems.style.js +0 -1
- package/cart/components/CartItems/CartItemsHeaderWide.connector.js +0 -3
- package/cart/components/CartItems/CartItemsHeaderWide.js +0 -3
- package/cart/components/CartItems/CartItemsHeaderWide.style.js +0 -1
- package/cart/components/CartItems/CartItemsSubscription.connector.js +0 -5
- package/cart/components/CartItems/CartItemsSubstitution.js +0 -5
- package/cart/components/CartItems/index.js +0 -1
- package/cart/components/CartSummaryWide/CartSummaryWide.connector.js +0 -4
- package/cart/components/CartSummaryWide/CartSummaryWide.js +0 -4
- package/cart/components/CartSummaryWide/CartSummaryWide.style.js +0 -1
- package/cart/components/CartSummaryWide/CartSummaryWideCheckoutButton.connector.js +0 -5
- package/cart/components/CartSummaryWide/CartSummaryWideCheckoutButton.js +0 -4
- package/cart/components/CartSummaryWide/CartSummaryWideCheckoutButton.style.js +0 -1
- package/cart/components/CartSummaryWide/CartSummaryWideFooter.js +0 -3
- package/cart/components/CartSummaryWide/index.js +0 -1
- package/cart/components/PaymentBar/PaymentBar.js +0 -5
- package/cart/components/PaymentBar/PaymentBarAppliedPromotions.connector.js +0 -5
- package/cart/components/PaymentBar/PaymentBarAppliedPromotions.js +0 -3
- package/cart/components/PaymentBar/PaymentBarCheckoutButton.connector.js +0 -5
- package/cart/components/PaymentBar/PaymentBarCheckoutButton.js +0 -5
- package/cart/components/PaymentBar/PaymentBarCheckoutButton.style.js +0 -1
- package/cart/components/PaymentBar/PaymentBarContent.js +0 -4
- package/cart/components/PaymentBar/PaymentBarContent.style.js +0 -1
- package/cart/components/PaymentBar/PaymentBarDiscounts.connector.js +0 -5
- package/cart/components/PaymentBar/PaymentBarDiscounts.js +0 -4
- package/cart/components/PaymentBar/PaymentBarGrandTotal.connector.js +0 -5
- package/cart/components/PaymentBar/PaymentBarGrandTotal.js +0 -4
- package/cart/components/PaymentBar/PaymentBarPromotionCouponMessages.js +0 -4
- package/cart/components/PaymentBar/PaymentBarPromotionCoupons.connector.js +0 -8
- package/cart/components/PaymentBar/PaymentBarPromotionCoupons.js +0 -3
- package/cart/components/PaymentBar/PaymentBarPromotionalText.js +0 -4
- package/cart/components/PaymentBar/PaymentBarReserveButton.connector.js +0 -1
- package/cart/components/PaymentBar/PaymentBarReserveButton.js +0 -7
- package/cart/components/PaymentBar/PaymentBarShippingCost.connector.js +0 -5
- package/cart/components/PaymentBar/PaymentBarShippingCost.js +0 -3
- package/cart/components/PaymentBar/PaymentBarSubTotal.connector.js +0 -5
- package/cart/components/PaymentBar/PaymentBarSubTotal.js +0 -3
- package/cart/components/PaymentBar/PaymentBarTax.connector.js +0 -5
- package/cart/components/PaymentBar/PaymentBarTax.js +0 -4
- package/cart/components/PaymentBar/index.js +0 -1
- package/cart/components/Substitution/connector.js +0 -5
- package/cart/components/Substitution/index.js +0 -9
- package/cart/components/Substitution/style.js +0 -1
- package/cart/components/SupplementalContent/SupplementalContent.connector.js +0 -4
- package/cart/components/SupplementalContent/SupplementalContent.js +0 -5
- package/cart/components/SupplementalContent/SupplementalContent.styles.js +0 -1
- package/cart/components/SupplementalContent/index.js +0 -1
- package/cart/streams/index.js +0 -1
- package/category/actions/index.js +0 -1
- package/category/components/CategoryImage/connector.js +0 -5
- package/category/components/CategoryImage/index.js +0 -5
- package/category/components/index.js +0 -1
- package/category/constants/index.js +0 -1
- package/category/helpers/index.js +0 -1
- package/category/selectors/index.js +0 -2
- package/category/streams/index.js +0 -1
- package/checkout/action-creators/addCheckoutCampaign.js +0 -5
- package/checkout/action-creators/clearCheckoutCampaign.js +0 -5
- package/checkout/action-creators/clearCheckoutOrder.js +0 -4
- package/checkout/action-creators/index.js +0 -1
- package/checkout/action-creators/validationErrorsCheckout.js +0 -5
- package/checkout/actions/errorCheckout.js +0 -17
- package/checkout/actions/fetchCheckoutOrder.js +0 -4
- package/checkout/actions/fetchPaymentMethods.js +0 -4
- package/checkout/actions/index.js +0 -1
- package/checkout/actions/initializeCheckout.js +0 -4
- package/checkout/actions/prepareCheckout.js +0 -8
- package/checkout/actions/submitCheckoutOrder.js +0 -5
- package/checkout/actions/updateCheckoutOrder.js +0 -5
- package/checkout/components/AddressBook/AddressBook.js +0 -5
- package/checkout/components/AddressBook/AddressList.js +0 -9
- package/checkout/components/AddressBook/index.js +0 -1
- package/checkout/components/AddressBookContact/AddressBookContact.js +0 -5
- package/checkout/components/AddressBookContact/index.js +0 -1
- package/checkout/components/Checkout/Checkout.js +0 -4
- package/checkout/components/Checkout/CheckoutActions.js +0 -4
- package/checkout/components/Checkout/CheckoutAddress.js +0 -6
- package/checkout/components/Checkout/CheckoutHeader.js +0 -4
- package/checkout/components/Checkout/CheckoutPickupContactForm.config.js +0 -8
- package/checkout/components/Checkout/CheckoutPickupContactForm.js +0 -4
- package/checkout/components/Checkout/CheckoutSection.js +0 -4
- package/checkout/components/Checkout/CheckoutSectionInfo.js +0 -4
- package/checkout/components/Checkout/CheckoutSectionMessages.js +0 -4
- package/checkout/components/Checkout/CheckoutSummary.js +0 -4
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmation.connector.js +0 -3
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmation.js +0 -7
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationBilledTo.js +0 -4
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationOrderContact.js +0 -4
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationOrderSummary.js +0 -4
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationPickUpContact.js +0 -4
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationPickupNotes.js +0 -4
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationSection.js +0 -4
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationShippedTo.js +0 -4
- package/checkout/components/CheckoutConfirmation/index.js +0 -1
- package/checkout/components/GuestCheckout/GuestCheckout.js +0 -4
- package/checkout/components/GuestCheckout/GuestCheckoutOptIn.config.js +0 -4
- package/checkout/components/GuestCheckout/GuestCheckoutOptIn.js +0 -3
- package/checkout/components/GuestCheckout/GuestCheckoutPickup.js +0 -4
- package/checkout/components/GuestCheckout/GuestCheckoutPickupNotes.config.js +0 -4
- package/checkout/components/GuestCheckout/GuestCheckoutPickupNotes.js +0 -4
- package/checkout/components/PaymentMethodButton/PaymentMethodButton.js +0 -5
- package/checkout/components/PaymentMethodButton/index.js +0 -1
- package/checkout/components/ResponsiveBackButton/ResponsiveBackButton.js +0 -4
- package/checkout/components/ResponsiveBackButton/ResponsiveBackButton.style.js +0 -1
- package/checkout/components/ResponsiveBackButton/index.js +0 -1
- package/checkout/components/ShippingMethods/ShippingMethod.js +0 -5
- package/checkout/components/ShippingMethods/ShippingMethods.js +0 -23
- package/checkout/components/ShippingMethods/connector.js +0 -7
- package/checkout/components/ShippingMethods/index.js +0 -1
- package/checkout/components/SupplementalContent/SupplementalContent.connector.js +0 -4
- package/checkout/components/SupplementalContent/SupplementalContent.js +0 -5
- package/checkout/components/SupplementalContent/SupplementalContent.styles.js +0 -1
- package/checkout/components/SupplementalContent/index.js +0 -1
- package/checkout/components/index.js +0 -1
- package/checkout/constants/actionTypes.js +0 -1
- package/checkout/constants/errorCodes.js +0 -1
- package/checkout/constants/index.js +0 -1
- package/checkout/constants/routes.js +0 -1
- package/checkout/helpers/index.js +0 -34
- package/checkout/hooks/common.js +0 -7
- package/checkout/paymentMethods/context.js +0 -1
- package/checkout/paymentMethods/index.js +0 -28
- package/checkout/paymentMethods/paypal/PaypalButton.js +0 -5
- package/checkout/paymentMethods/paypal/PaypalButtonApp.js +0 -4
- package/checkout/paymentMethods/paypal/PaypalButtonWeb.js +0 -8
- package/checkout/paymentMethods/paypal/PaypalPayButton.js +0 -12
- package/checkout/paymentMethods/paypal/PaypalProvider.js +0 -6
- package/checkout/paymentMethods/paypal/index.js +0 -1
- package/checkout/paymentMethods/paypal/paypal_logo.png +0 -0
- package/checkout/paymentMethods/paypal/sdk.js +0 -9
- package/checkout/paymentMethods/stripe/StripeButton.connector.js +0 -6
- package/checkout/paymentMethods/stripe/StripeButton.js +0 -5
- package/checkout/paymentMethods/stripe/StripeCreditCard.js +0 -10
- package/checkout/paymentMethods/stripe/StripePayButton.js +0 -6
- package/checkout/paymentMethods/stripe/StripeProvider.connector.js +0 -6
- package/checkout/paymentMethods/stripe/StripeProvider.context.js +0 -1
- package/checkout/paymentMethods/stripe/StripeProvider.js +0 -33
- package/checkout/paymentMethods/stripe/applepay.svg +0 -84
- package/checkout/paymentMethods/stripe/googlepay.png +0 -0
- package/checkout/paymentMethods/stripe/index.js +0 -1
- package/checkout/paymentMethods/stripe/sdk.js +0 -9
- package/checkout/providers/AddressBookProvider.context.js +0 -1
- package/checkout/providers/AddressBookProvider.js +0 -11
- package/checkout/providers/CheckoutProvider.connector.js +0 -7
- package/checkout/providers/CheckoutProvider.constraints.js +0 -1
- package/checkout/providers/CheckoutProvider.context.js +0 -1
- package/checkout/providers/CheckoutProvider.js +0 -28
- package/checkout/reducers/index.js +0 -6
- package/checkout/selectors/campaign.js +0 -5
- package/checkout/selectors/guestCheckout.js +0 -5
- package/checkout/selectors/order.js +0 -59
- package/checkout/selectors/payment.js +0 -17
- package/checkout/selectors/route.js +0 -4
- package/checkout/streams/index.js +0 -1
- package/checkout/subscriptions/index.js +0 -3
- package/components/BrandingColorBanner/BrandingColorBanner.js +0 -5
- package/components/BrandingColorBanner/index.js +0 -1
- package/components/ConditionalWrapper/ConditionalWrapper.js +0 -10
- package/components/ConnectedReactPortal/index.js +0 -13
- package/components/Footer/constants.js +0 -1
- package/components/Footer/helpers.js +0 -75
- package/components/Form/Builder/ElementMultiSelect.js +0 -6
- package/components/Form/Builder/ElementPhoneNumber.js +0 -20
- package/components/Form/Builder/FormHelper.js +0 -5
- package/components/Form/Builder/helpers/common.js +0 -6
- package/components/Form/Builder/stylePresets.js +0 -1
- package/components/Logo/connector.js +0 -4
- package/components/Menu/components/Item/index.js +0 -8
- package/components/Menu/components/Item/style.js +0 -4
- package/components/Menu/components/Position/index.js +0 -16
- package/components/Menu/components/Position/style.js +0 -1
- package/components/Menu/index.js +0 -12
- package/components/Menu/style.js +0 -1
- package/components/MessageBar/MessageBar.js +0 -9
- package/components/MessageBar/MessageBar.style.js +0 -11
- package/components/QuantityLabel/QuantityLabel.js +0 -4
- package/components/QuantityLabel/index.js +0 -1
- package/components/Radio/Radio.js +0 -5
- package/components/Radio/index.js +0 -1
- package/components/RadioCard/RadioCard.js +0 -9
- package/components/RadioCard/index.js +0 -1
- package/components/RadioGroup/RadioGroup.context.js +0 -1
- package/components/RadioGroup/RadioGroup.js +0 -4
- package/components/RadioGroup/index.js +0 -1
- package/components/RadioGroup/useRadioGroup.js +0 -4
- package/components/ResponsiveContainer/ResponsiveContainer.js +0 -6
- package/components/ResponsiveContainer/breakpoints.js +0 -14
- package/components/ResponsiveContainer/condition.js +0 -6
- package/components/ResponsiveContainer/hooks.js +0 -20
- package/components/ResponsiveContainer/index.js +0 -1
- package/components/ResponsiveContainer/listener.js +0 -10
- package/components/ResponsiveContainer/mediaQuery.js +0 -8
- package/components/SideNavigation/SideNavigation.hooks.js +0 -4
- package/components/SideNavigation/SideNavigation.js +0 -4
- package/components/SideNavigation/SideNavigationCategories.connector.js +0 -8
- package/components/SideNavigation/SideNavigationCategories.js +0 -4
- package/components/SideNavigation/SideNavigationCategories.style.js +0 -1
- package/components/SideNavigation/SideNavigationCategoriesItem.connector.js +0 -8
- package/components/SideNavigation/SideNavigationCategoriesItem.js +0 -5
- package/components/SideNavigation/SideNavigationCategoriesItem.style.js +0 -2
- package/components/SideNavigation/SideNavigationCategoriesItemChildren.js +0 -5
- package/components/SideNavigation/SideNavigationContent.js +0 -3
- package/components/SideNavigation/SideNavigationContent.style.js +0 -4
- package/components/SideNavigation/SideNavigationItem.js +0 -4
- package/components/SideNavigation/SideNavigationItem.style.js +0 -4
- package/components/SideNavigation/SideNavigationLinks.js +0 -4
- package/components/SideNavigation/SideNavigationLinksLegal.connector.js +0 -4
- package/components/SideNavigation/SideNavigationLinksLegal.js +0 -5
- package/components/SideNavigation/SideNavigationLinksQuicklinks.connector.js +0 -4
- package/components/SideNavigation/SideNavigationLinksQuicklinks.js +0 -5
- package/components/SideNavigation/SideNavigationNestedItem.js +0 -4
- package/components/SideNavigation/SideNavigationProvider.connector.js +0 -8
- package/components/SideNavigation/SideNavigationProvider.context.js +0 -1
- package/components/SideNavigation/SideNavigationProvider.js +0 -4
- package/components/SideNavigation/index.js +0 -1
- package/components/SideNavigation/selectors.js +0 -17
- package/components/Tabs/TabContext.js +0 -7
- package/components/Tabs/components/Tab.js +0 -11
- package/components/Tabs/components/Tab.style.js +0 -1
- package/components/Tabs/components/TabIndicator.js +0 -5
- package/components/Tabs/components/TabIndicator.style.js +0 -1
- package/components/Tabs/components/TabPanel.js +0 -5
- package/components/Tabs/components/Tabs.js +0 -11
- package/components/Tabs/components/Tabs.style.js +0 -2
- package/components/Tabs/debounce.js +0 -11
- package/components/Tabs/index.js +0 -1
- package/components/Tabs/ownerDocument.js +0 -4
- package/components/Tabs/ownerWindow.js +0 -4
- package/components/Tabs/useEventCallback.js +0 -6
- package/components/TextLink/TextLink.js +0 -5
- package/components/TextLink/TextLink.style.js +0 -1
- package/components/Toggle/index.js +0 -5
- package/components/Toggle/style.js +0 -1
- package/core/action-creators/merchantSettings.js +0 -5
- package/core/action-creators/optIns.js +0 -37
- package/core/action-creators/shopSettings.js +0 -9
- package/core/classes/GeolocationRequestApp.js +0 -16
- package/core/classes/GeolocationRequestBrowser.js +0 -8
- package/core/config/config.action-creators.js +0 -12
- package/core/config/config.actions.js +0 -3
- package/core/config/config.constants.js +0 -1
- package/core/config/config.reducers.js +0 -6
- package/core/config/config.selectors.js +0 -39
- package/core/config/config.streams.js +0 -1
- package/core/config/config.subscriptions.js +0 -4
- package/core/config/config.types.js +0 -0
- package/core/config/index.js +0 -1
- package/core/constants/deviceTypes.js +0 -1
- package/core/constants/merchantSettings.js +0 -1
- package/core/constants/optIns.js +0 -1
- package/core/constants/pipelines.js +0 -1
- package/core/constants/shopSettings.js +0 -2
- package/core/contexts/ThemeResourcesContext.d.ts +0 -60
- package/core/contexts/ThemeResourcesContext.js +0 -3
- package/core/contexts/index.js +0 -1
- package/core/events/index.js +0 -1
- package/core/helpers/androidNavigationBar.js +0 -12
- package/core/helpers/appPermissions.js +0 -58
- package/core/helpers/bridge.js +0 -4
- package/core/helpers/deviceType.js +0 -5
- package/core/helpers/environment.js +0 -4
- package/core/helpers/errorBehavior.js +0 -32
- package/core/helpers/featureFlag.js +0 -11
- package/core/helpers/googleMaps.js +0 -8
- package/core/helpers/isIOSTheme.js +0 -4
- package/core/helpers/isTouchDevice.js +0 -4
- package/core/helpers/nl2br.js +0 -1
- package/core/helpers/scrollContainer.js +0 -4
- package/core/helpers/string.js +0 -9
- package/core/helpers/svgToDataUrl.js +0 -9
- package/core/hocs/index.js +0 -1
- package/core/hocs/withThemeResources.js +0 -16
- package/core/hooks/events/index.js +0 -1
- package/core/hooks/events/useLongPress.d.ts +0 -68
- package/core/hooks/events/useLongPress.js +0 -13
- package/core/hooks/events/useScrollDirectionChange.d.ts +0 -74
- package/core/hooks/events/useScrollDirectionChange.js +0 -18
- package/core/hooks/index.js +0 -1
- package/core/hooks/layout/index.js +0 -1
- package/core/hooks/layout/useElementSize.d.ts +0 -46
- package/core/hooks/layout/useElementSize.js +0 -18
- package/core/hooks/useAsyncMemo.js +0 -12
- package/core/hooks/useFormState.js +0 -27
- package/core/hooks/usePrevious.js +0 -2
- package/core/hooks/useScrollTo.js +0 -5
- package/core/hooks/useThemeResources.js +0 -21
- package/core/providers/ThemeResourcesProvider.js +0 -15
- package/core/providers/index.js +0 -1
- package/core/reducers/merchantSettings.js +0 -6
- package/core/reducers/shopSettings.js +0 -6
- package/core/selectors/merchantSettings.js +0 -10
- package/core/selectors/shopSettings.js +0 -25
- package/core/streams/optIns.js +0 -13
- package/core/validation/index.js +0 -1
- package/core/validation/validation.hooks.js +0 -4
- package/core/validation/validation.js +0 -12
- package/development/action-creators/index.js +0 -1
- package/development/action-creators/settings.js +0 -9
- package/development/action-creators/storage.js +0 -6
- package/development/components/DevelopmentTools/DevelopmentTools.js +0 -6
- package/development/components/DevelopmentTools/Shortcuts.js +0 -4
- package/development/components/DevelopmentTools/hooks.js +0 -8
- package/development/components/DevelopmentTools/index.js +0 -1
- package/development/components/SimulatedInsets/SimulatedInsetBottom.js +0 -7
- package/development/components/SimulatedInsets/SimulatedInsetTop.js +0 -12
- package/development/components/SimulatedInsets/SimulatedInsets.js +0 -6
- package/development/components/SimulatedInsets/index.js +0 -1
- package/development/components/index.js +0 -1
- package/development/constants/actionTypes.js +0 -1
- package/development/constants/index.js +0 -1
- package/development/reducers/index.js +0 -1
- package/development/reducers/settings.js +0 -10
- package/development/reducers/storage.js +0 -9
- package/development/selectors/index.js +0 -1
- package/development/selectors/settings.js +0 -21
- package/development/selectors/storage.js +0 -16
- package/development/streams/index.js +0 -1
- package/development/streams/insets.js +0 -4
- package/development/subscriptions/index.js +0 -6
- package/favorites/components/CommentDialog/CommentDialog.js +0 -12
- package/favorites/components/CommentDialog/index.js +0 -1
- package/favorites/components/FavoriteButtonWide/FavoriteButtonWide.js +0 -8
- package/favorites/components/FavoriteButtonWide/index.js +0 -1
- package/favorites/components/Item/ItemNotes.js +0 -7
- package/favorites/components/Item/ItemQuantity.js +0 -7
- package/favorites/components/ItemFulfillmentMethod/ItemFulfillmentMethod.js +0 -4
- package/favorites/components/ItemFulfillmentMethod/index.js +0 -1
- package/favorites/components/List/ListAccordionHeader.js +0 -8
- package/favorites/components/List/ListAccordionLabel.js +0 -5
- package/favorites/components/List/ListContent.js +0 -8
- package/favorites/components/List/ListItemWrapper.js +0 -6
- package/favorites/components/List/styles.js +0 -1
- package/favorites/constants/index.js +0 -1
- package/filter/actions/index.js +0 -1
- package/filter/components/FilterPageContent/components/ApplyButton/index.js +0 -7
- package/filter/components/FilterPageContent/components/ApplyButton/spec.js +0 -1
- package/filter/components/FilterPageContent/components/ApplyButton/style.js +0 -1
- package/filter/components/FilterPageContent/components/ResetButton/index.js +0 -7
- package/filter/components/FilterPageContent/components/ResetButton/spec.js +0 -1
- package/filter/components/FilterPageContent/components/ResetButton/style.js +0 -1
- package/filter/components/FilterPageContent/components/Selector/components/Selected/index.js +0 -7
- package/filter/components/FilterPageContent/components/Selector/components/Selected/spec.js +0 -1
- package/filter/components/FilterPageContent/components/Selector/components/Selected/style.js +0 -1
- package/filter/components/FilterPageContent/components/Selector/components/Toggle/index.js +0 -7
- package/filter/components/FilterPageContent/components/Selector/components/Toggle/spec.js +0 -1
- package/filter/components/FilterPageContent/components/Selector/components/Toggle/style.js +0 -1
- package/filter/components/FilterPageContent/components/Selector/components/ValueButton/index.js +0 -7
- package/filter/components/FilterPageContent/components/Selector/components/ValueButton/spec.js +0 -1
- package/filter/components/FilterPageContent/components/Selector/components/ValueButton/style.js +0 -1
- package/filter/components/FilterPageContent/components/Selector/index.js +0 -19
- package/filter/components/FilterPageContent/components/Selector/spec.js +0 -1
- package/filter/components/FilterPageContent/components/Selector/style.js +0 -1
- package/filter/components/FilterPageContent/index.js +0 -6
- package/filter/components/FilterPageContentWithProvider/index.js +0 -16
- package/filter/components/index.js +0 -1
- package/filter/constants/index.js +0 -1
- package/filter/constants/sort.js +0 -11
- package/filter/helpers/index.js +0 -1
- package/filter/hocs/index.js +0 -1
- package/filter/hocs/withSort.js +0 -16
- package/filter/hooks/filterPage.js +0 -5
- package/filter/hooks/index.js +0 -4
- package/filter/providers/FilterPageProvider.context.js +0 -54
- package/filter/providers/FilterPageProvider.js +0 -98
- package/filter/providers/SortProvider.connector.js +0 -3
- package/filter/providers/SortProvider.context.js +0 -1
- package/filter/providers/SortProvider.helpers.js +0 -8
- package/filter/providers/SortProvider.js +0 -6
- package/filter/providers/index.js +0 -1
- package/filter/selectors/index.js +0 -17
- package/filter/streams/index.js +0 -1
- package/i18n/countries.helpers.js +0 -6
- package/i18n/countries.hooks.js +0 -6
- package/i18n/index.js +0 -1
- package/i18n/locale/cs-cz/countries.json +0 -255
- package/i18n/locale/de-de/countries.json +0 -255
- package/i18n/locale/el-gr/countries.json +0 -255
- package/i18n/locale/en-us/countries.json +0 -255
- package/i18n/locale/es-es/countries.json +0 -255
- package/i18n/locale/fi-fi/countries.json +0 -255
- package/i18n/locale/fr-fr/countries.json +0 -255
- package/i18n/locale/hu-hu/countries.json +0 -255
- package/i18n/locale/it-it/countries.json +0 -255
- package/i18n/locale/nl-nl/countries.json +0 -255
- package/i18n/locale/pl-pl/countries.json +0 -255
- package/i18n/locale/pt-pt/countries.json +0 -255
- package/i18n/locale/ro-ro/countries.json +0 -255
- package/i18n/locale/sv-se/countries.json +0 -255
- package/locations/action-creators/errorInventories.js +0 -7
- package/locations/action-creators/errorLocations.js +0 -6
- package/locations/action-creators/errorProductInventories.js +0 -7
- package/locations/action-creators/errorProductLocations.js +0 -6
- package/locations/action-creators/index.js +0 -1
- package/locations/action-creators/provideProductAlternativeLocation.js +0 -5
- package/locations/action-creators/receiveInventories.js +0 -5
- package/locations/action-creators/receiveLocations.js +0 -6
- package/locations/action-creators/receiveProductInventories.js +0 -7
- package/locations/action-creators/receiveProductLocations.js +0 -7
- package/locations/action-creators/requestInventories.js +0 -6
- package/locations/action-creators/requestLocations.js +0 -5
- package/locations/action-creators/requestProductInventories.js +0 -6
- package/locations/action-creators/requestProductLocations.js +0 -5
- package/locations/action-creators/selectGlobalLocation.js +0 -5
- package/locations/action-creators/selectLocation.js +0 -6
- package/locations/action-creators/setStoreFinderSearchRadius.js +0 -5
- package/locations/action-creators/setUserGeolocation.js +0 -5
- package/locations/action-creators/setUserSearchCountryCode.js +0 -7
- package/locations/action-creators/setUserSearchGeolocation.js +0 -8
- package/locations/action-creators/setUserSearchPostalCode.js +0 -7
- package/locations/action-creators/storeFormInput.js +0 -5
- package/locations/action-creators/storeFulfillmentMethod.js +0 -5
- package/locations/action-creators/submitReservationError.js +0 -5
- package/locations/action-creators/submitReservationRequest.js +0 -5
- package/locations/action-creators/submitReservationSuccess.js +0 -5
- package/locations/actions/fetchDefaultLocation.js +0 -4
- package/locations/actions/fetchFulfillmentSlots.js +0 -6
- package/locations/actions/fetchInventories.js +0 -6
- package/locations/actions/fetchLocations.js +0 -19
- package/locations/actions/fetchProductInventories.js +0 -7
- package/locations/actions/fetchProductLocations.js +0 -12
- package/locations/actions/index.js +0 -5
- package/locations/actions/sendDefaultLocationCode.js +0 -6
- package/locations/actions/setUserGeolocation.js +0 -1
- package/locations/actions/setUserSearchGeolocation.js +0 -1
- package/locations/actions/submitReservation.js +0 -5
- package/locations/assets/leaflet.css +0 -765
- package/locations/components/Cart/CartChangeFulfillmentMethod.connector.js +0 -4
- package/locations/components/Cart/CartChangeFulfillmentMethod.js +0 -8
- package/locations/components/Cart/CartChangeFulfillmentMethod.types.js +0 -0
- package/locations/components/Cart/CartContextMenuChangeFulfillment.js +0 -6
- package/locations/components/Cart/CartContextMenuChangeFulfillmentContent.js +0 -5
- package/locations/components/Cart/CartContextMenuChangeFulfillmentContent.style.js +0 -1
- package/locations/components/Cart/CartContextMenuItemChangeFulfillment.connector.js +0 -4
- package/locations/components/Cart/CartContextMenuItemChangeFulfillment.js +0 -6
- package/locations/components/Cart/CartContextMenuItemChangeLocation.js +0 -7
- package/locations/components/Cart/CartItemProductChangeLocation.connector.js +0 -5
- package/locations/components/Cart/CartItemProductChangeLocation.js +0 -11
- package/locations/components/Cart/CartItemProductChangeLocation.types.js +0 -0
- package/locations/components/Cart/index.js +0 -1
- package/locations/components/ChangeLocationButton/ChangeLocationButton.js +0 -4
- package/locations/components/ChangeLocationButton/ChangeLocationButton.style.js +0 -2
- package/locations/components/ChangeLocationButton/index.js +0 -1
- package/locations/components/FulfillmentPath/FulfillmentPath.js +0 -4
- package/locations/components/FulfillmentPath/FulfillmentPath.style.js +0 -2
- package/locations/components/FulfillmentPath/FulfillmentPathItem.js +0 -6
- package/locations/components/FulfillmentPath/index.js +0 -1
- package/locations/components/FulfillmentPathSelector/FulfillmentPathSelector.js +0 -14
- package/locations/components/FulfillmentPathSelector/FulfillmentPathSelector.style.js +0 -1
- package/locations/components/FulfillmentPathSelector/index.js +0 -1
- package/locations/components/FulfillmentSelector/FulfillmentSelector.connector.js +0 -9
- package/locations/components/FulfillmentSelector/FulfillmentSelector.context.js +0 -1
- package/locations/components/FulfillmentSelector/FulfillmentSelector.hooks.js +0 -3
- package/locations/components/FulfillmentSelector/FulfillmentSelector.js +0 -20
- package/locations/components/FulfillmentSelector/FulfillmentSelector.style.js +0 -1
- package/locations/components/FulfillmentSelector/FulfillmentSelector.types.js +0 -1
- package/locations/components/FulfillmentSelector/FulfillmentSelectorAddToCart.js +0 -10
- package/locations/components/FulfillmentSelector/FulfillmentSelectorAlternativeLocation.js +0 -8
- package/locations/components/FulfillmentSelector/FulfillmentSelectorBOPIS.js +0 -4
- package/locations/components/FulfillmentSelector/FulfillmentSelectorDirectShip.js +0 -5
- package/locations/components/FulfillmentSelector/FulfillmentSelectorHeader.js +0 -4
- package/locations/components/FulfillmentSelector/FulfillmentSelectorHeader.style.js +0 -1
- package/locations/components/FulfillmentSelector/FulfillmentSelectorImpossibleError.js +0 -4
- package/locations/components/FulfillmentSelector/FulfillmentSelectorImpossibleError.style.js +0 -1
- package/locations/components/FulfillmentSelector/FulfillmentSelectorItem.js +0 -8
- package/locations/components/FulfillmentSelector/FulfillmentSelectorItem.style.js +0 -1
- package/locations/components/FulfillmentSelector/FulfillmentSelectorLocation.js +0 -4
- package/locations/components/FulfillmentSelector/FulfillmentSelectorLocation.style.js +0 -1
- package/locations/components/FulfillmentSelector/FulfillmentSelectorLocationMethodNotAvailable.js +0 -3
- package/locations/components/FulfillmentSelector/FulfillmentSelectorROPIS.js +0 -4
- package/locations/components/FulfillmentSelector/index.js +0 -1
- package/locations/components/FulfillmentSheet/FulfillmentSheet.js +0 -6
- package/locations/components/FulfillmentSheet/FulfillmentSheet.style.js +0 -1
- package/locations/components/FulfillmentSheet/FulfillmentSheetContent.js +0 -6
- package/locations/components/FulfillmentSheet/index.js +0 -1
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotDialog.js +0 -28
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotProvider.connector.js +0 -8
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotProvider.context.js +0 -1
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotProvider.js +0 -9
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcher.connector.js +0 -4
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcher.js +0 -4
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherBar.js +0 -3
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherBar.style.js +0 -1
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherDefault.js +0 -3
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherDefault.style.js +0 -1
- package/locations/components/FulfillmentSlotSwitcher/index.js +0 -1
- package/locations/components/FulfillmentSlotSwitcher/time.js +0 -5
- package/locations/components/GlobalLocationSelector/GlobalLocationSelector.js +0 -16
- package/locations/components/GlobalLocationSelector/index.js +0 -1
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcher.connector.js +0 -8
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcher.js +0 -3
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherBar.js +0 -3
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherBar.style.js +0 -1
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherDefault.js +0 -3
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherDefault.style.js +0 -1
- package/locations/components/GlobalLocationSwitcher/index.js +0 -1
- package/locations/components/ReservationResponses/ReservationError.js +0 -4
- package/locations/components/ReservationResponses/ReservationResponse.style.js +0 -1
- package/locations/components/ReservationResponses/ReservationSuccess.js +0 -4
- package/locations/components/ReservationResponses/index.js +0 -1
- package/locations/components/ReserveForm/ReserveForm.constraints.js +0 -1
- package/locations/components/ReserveForm/ReserveForm.js +0 -10
- package/locations/components/ReserveForm/ReserveForm.style.js +0 -1
- package/locations/components/ReserveForm/ReserveFormPhone.connector.js +0 -3
- package/locations/components/ReserveForm/ReserveFormPhone.js +0 -5
- package/locations/components/ReserveForm/ReserveFormPhone.types.js +0 -0
- package/locations/components/ReserveForm/index.js +0 -1
- package/locations/components/StockInfo/StockInfo.defaultSettings.js +0 -1
- package/locations/components/StockInfo/StockInfo.js +0 -8
- package/locations/components/StockInfo/StockInfoInventory.js +0 -9
- package/locations/components/StockInfo/index.js +0 -1
- package/locations/components/StockInfoLists/index.js +0 -9
- package/locations/components/StoreDetails/components/FindMoreStores.js +0 -4
- package/locations/components/StoreDetails/components/GetDirectionsButton.js +0 -7
- package/locations/components/StoreDetails/components/StoreDetails.js +0 -5
- package/locations/components/StoreDetails/components/StoreFinderMap.js +0 -20
- package/locations/components/StoreDetails/components/StoreFinderMap.style.js +0 -1
- package/locations/components/StoreDetails/components/StoreLocationMap.js +0 -4
- package/locations/components/StoreDetails/components/StoresNearby.js +0 -4
- package/locations/components/StoreDetails/components/StoresNearbyListItem.js +0 -9
- package/locations/components/StoreDetails/index.js +0 -4
- package/locations/components/StoreFinder/Store.context.js +0 -1
- package/locations/components/StoreFinder/StoreFinder.js +0 -3
- package/locations/components/StoreFinder/StoreFinder.style.js +0 -1
- package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.connector.js +0 -4
- package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.js +0 -4
- package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.style.js +0 -1
- package/locations/components/StoreFinder/StoreFinderLocation.js +0 -3
- package/locations/components/StoreFinder/StoreFinderLocation.style.js +0 -1
- package/locations/components/StoreFinder/StoreFinderLocationDetails.js +0 -3
- package/locations/components/StoreFinder/StoreFinderLocationDetails.style.js +0 -1
- package/locations/components/StoreFinder/StoreFinderLocationHeader.js +0 -3
- package/locations/components/StoreFinder/StoreFinderLocationHeader.style.js +0 -1
- package/locations/components/StoreFinder/StoreFinderLocationHeaderPhoneNumber.js +0 -4
- package/locations/components/StoreFinder/StoreFinderLocations.js +0 -5
- package/locations/components/StoreFinder/StoreFinderLocations.style.js +0 -1
- package/locations/components/StoreFinder/StoreFinderSearch.js +0 -3
- package/locations/components/StoreFinder/StoreFinderSearch.style.js +0 -1
- package/locations/components/StoreFinder/StoreFinderSelectLocationButton.js +0 -5
- package/locations/components/StoreFinder/StoreFinderStoreInfoButton.js +0 -8
- package/locations/components/StoreFinder/index.js +0 -1
- package/locations/components/StoreList/Store.context.js +0 -1
- package/locations/components/StoreList/Store.style.js +0 -1
- package/locations/components/StoreList/StoreAddress.js +0 -7
- package/locations/components/StoreList/StoreAddressShort.js +0 -7
- package/locations/components/StoreList/StoreCard.js +0 -4
- package/locations/components/StoreList/StoreDetails.js +0 -4
- package/locations/components/StoreList/StoreDetailsLine.js +0 -8
- package/locations/components/StoreList/StoreDistance.js +0 -7
- package/locations/components/StoreList/StoreHeader.js +0 -4
- package/locations/components/StoreList/StoreHoursToday.js +0 -7
- package/locations/components/StoreList/StoreList.js +0 -4
- package/locations/components/StoreList/StoreListLocations.js +0 -4
- package/locations/components/StoreList/StoreListProduct.js +0 -4
- package/locations/components/StoreList/StoreListProduct.style.js +0 -1
- package/locations/components/StoreList/StoreListProductInfo.js +0 -4
- package/locations/components/StoreList/StoreListProductName.js +0 -4
- package/locations/components/StoreList/StoreListSearch.connector.js +0 -7
- package/locations/components/StoreList/StoreListSearch.js +0 -23
- package/locations/components/StoreList/StoreListSearch.style.js +0 -1
- package/locations/components/StoreList/StoreListSearchRadius.connector.js +0 -7
- package/locations/components/StoreList/StoreListSearchRadius.js +0 -4
- package/locations/components/StoreList/StoreListSearchRadius.style.js +0 -1
- package/locations/components/StoreList/StoreOpeningHours.js +0 -7
- package/locations/components/StoreList/StoreOpeningHoursLine.js +0 -7
- package/locations/components/StoreList/StorePhoneNumber.js +0 -6
- package/locations/components/StoreList/StoreSelectLocationButton.js +0 -4
- package/locations/components/StoreList/index.js +0 -1
- package/locations/components/index.js +0 -1
- package/locations/constants/ActionTypes.js +0 -10
- package/locations/constants/Pipelines.js +0 -1
- package/locations/constants/Portals.js +0 -2
- package/locations/constants/Stages.js +0 -1
- package/locations/constants/index.js +0 -7
- package/locations/constants/routes.js +0 -1
- package/locations/helpers/createOrder.js +0 -28
- package/locations/helpers/formatDistance.js +0 -9
- package/locations/helpers/getAvailabilitySettings.js +0 -12
- package/locations/helpers/index.js +0 -1
- package/locations/helpers/productInventory.js +0 -7
- package/locations/helpers/showInventoryInLists.js +0 -7
- package/locations/index.js +0 -9
- package/locations/locations.context.js +0 -1
- package/locations/locations.hooks.js +0 -4
- package/locations/locations.streams.js +0 -1
- package/locations/locations.types.js +0 -1
- package/locations/providers/FulfillmentProvider.connector.js +0 -10
- package/locations/providers/FulfillmentProvider.js +0 -49
- package/locations/providers/FulfillmentProvider.types.js +0 -1
- package/locations/providers/StoreDetailsContext.js +0 -1
- package/locations/providers/StoreDetailsProvider.js +0 -4
- package/locations/providers/StoreFinder.connector.js +0 -3
- package/locations/providers/StoreFinderProvider.js +0 -7
- package/locations/providers/index.js +0 -1
- package/locations/reducers/index.js +0 -1
- package/locations/reducers/storage.js +0 -24
- package/locations/reducers/storeFinderSearch.js +0 -6
- package/locations/reducers/user.js +0 -5
- package/locations/reducers/userFormInput.js +0 -8
- package/locations/reducers/userSearch.js +0 -6
- package/locations/selectors/index.js +0 -145
- package/locations/subscriptions.js +0 -27
- package/login/action-creators/index.js +0 -1
- package/login/action-creators/resetPassword.js +0 -14
- package/login/actions/index.js +0 -1
- package/login/actions/resetPassword.js +0 -5
- package/login/components/ForgotPassword/ForgotPassword.connector.js +0 -5
- package/login/components/ForgotPassword/ForgotPassword.js +0 -5
- package/login/components/ForgotPassword/ForgotPassword.style.js +0 -1
- package/login/components/ForgotPassword/index.js +0 -1
- package/login/constants/actions.js +0 -1
- package/login/constants/index.js +0 -1
- package/login/constants/pipelines.js +0 -1
- package/login/constants/routes.js +0 -1
- package/login/index.js +0 -1
- package/orders/action-creators/index.js +0 -1
- package/orders/action-creators/orderDetails.js +0 -22
- package/orders/action-creators/orders.js +0 -21
- package/orders/actions/cancelOrder.js +0 -8
- package/orders/actions/fetchOrderDetails.js +0 -10
- package/orders/actions/fetchOrderHistory.js +0 -7
- package/orders/actions/index.js +0 -1
- package/orders/components/OrderDetails/OrderDetails.js +0 -4
- package/orders/components/OrderDetails/OrderDetailsAuthenticate.js +0 -3
- package/orders/components/OrderDetails/OrderDetailsAuthenticate.style.js +0 -1
- package/orders/components/OrderDetails/OrderDetailsAuthenticateForm.config.js +0 -8
- package/orders/components/OrderDetails/OrderDetailsContent.js +0 -3
- package/orders/components/OrderDetails/OrderDetailsContent.style.js +0 -1
- package/orders/components/OrderDetails/OrderDetailsOrder.js +0 -4
- package/orders/components/OrderDetails/OrderDetailsOrder.style.js +0 -1
- package/orders/components/OrderDetails/OrderDetailsOrderHeader.js +0 -4
- package/orders/components/OrderDetails/OrderDetailsOrderHeader.style.js +0 -1
- package/orders/components/OrderDetails/OrderDetailsOrderPickupLocation.connector.js +0 -3
- package/orders/components/OrderDetails/OrderDetailsOrderPickupLocation.js +0 -4
- package/orders/components/OrderDetails/OrderDetailsOrderPickupLocation.style.js +0 -1
- package/orders/components/OrderDetails/index.js +0 -1
- package/orders/components/OrderHistory/OrderHistory.js +0 -4
- package/orders/components/OrderHistory/OrderHistory.style.js +0 -1
- package/orders/components/OrderHistory/OrderHistoryList.js +0 -9
- package/orders/components/OrderHistory/OrderHistoryList.style.js +0 -1
- package/orders/components/OrderHistory/OrderHistoryLoader.js +0 -4
- package/orders/components/OrderHistory/OrderHistoryTable.js +0 -9
- package/orders/components/OrderHistory/OrderHistoryTable.style.js +0 -1
- package/orders/components/OrderHistory/index.js +0 -1
- package/orders/components/index.js +0 -1
- package/orders/constants/actionTypes.js +0 -1
- package/orders/constants/index.js +0 -1
- package/orders/constants/pipelines.js +0 -1
- package/orders/constants/routes.js +0 -1
- package/orders/constants/status.js +0 -12
- package/orders/helpers/index.js +0 -1
- package/orders/helpers/orderDetails.js +0 -5
- package/orders/helpers/orderStatus.js +0 -15
- package/orders/hooks/index.js +0 -7
- package/orders/providers/OrderDetailsPrivateProvider.connector.js +0 -11
- package/orders/providers/OrderDetailsPrivateProvider.js +0 -5
- package/orders/providers/OrderDetailsProvider.connector.js +0 -11
- package/orders/providers/OrderDetailsProvider.constraints.js +0 -1
- package/orders/providers/OrderDetailsProvider.context.js +0 -1
- package/orders/providers/OrderDetailsProvider.js +0 -11
- package/orders/providers/OrderHistoryProvider.connector.js +0 -9
- package/orders/providers/OrderHistoryProvider.context.js +0 -1
- package/orders/providers/OrderHistoryProvider.js +0 -4
- package/orders/reducers/index.js +0 -1
- package/orders/reducers/orders.js +0 -7
- package/orders/reducers/ordersById.js +0 -7
- package/orders/reducers/ordersByNumber.js +0 -7
- package/orders/selectors/index.js +0 -27
- package/orders/subscriptions/index.js +0 -4
- package/page/actions/index.js +0 -1
- package/page/components/NotFound.js +0 -3
- package/page/components/index.js +0 -1
- package/page/selectors/index.js +0 -7
- package/product/collections/index.js +0 -1
- package/product/components/Availability/Availability.connector.js +0 -5
- package/product/components/Availability/Availability.js +0 -6
- package/product/components/Availability/Availability.style.js +0 -1
- package/product/components/Availability/index.js +0 -1
- package/product/components/Header/index.js +0 -1
- package/product/components/PriceInfo/PriceInfo.connector.js +0 -4
- package/product/components/PriceInfo/PriceInfo.js +0 -4
- package/product/components/PriceInfo/index.js +0 -1
- package/product/components/ProductImage/ProductImagePlaceholder.js +0 -5
- package/product/components/ProductImage/connector.js +0 -5
- package/product/components/ProductName/ProductName.js +0 -4
- package/product/components/ProductName/ProductNameContent.js +0 -4
- package/product/components/ProductName/index.js +0 -1
- package/product/components/ProductProperties/ListsHTML.js +0 -5
- package/product/components/ProductProperties/RowHTML.js +0 -5
- package/product/components/ProductVariants/VariantAvailability.connector.js +0 -5
- package/product/components/ProductVariants/VariantAvailability.js +0 -5
- package/product/components/ProductVariants/index.js +0 -1
- package/product/components/QuantityPicker/hooks.js +0 -5
- package/product/components/UnitQuantityPicker/CartUnitQuantityPicker.js +0 -4
- package/product/components/UnitQuantityPicker/styles.js +0 -1
- package/product/components/index.js +0 -1
- package/product/contexts/index.js +0 -1
- package/product/hocs/index.js +0 -1
- package/product/hocs/withProduct.js +0 -6
- package/product/hocs/withProductListEntryProduct.js +0 -12
- package/product/hooks/index.js +0 -1
- package/product/product.types.js +0 -0
- package/product/providers/index.js +0 -1
- package/product/streams/index.js +0 -1
- package/push-opt-in/subscriptions/optInTracking.js +0 -4
- package/registration/action-creators/index.js +0 -18
- package/registration/actions/index.js +0 -1
- package/registration/actions/submitRegistration.js +0 -4
- package/registration/components/GuestRegistration/GuestRegistration.js +0 -4
- package/registration/components/GuestRegistration/GuestRegistrationContent.js +0 -4
- package/registration/components/GuestRegistration/GuestRegistrationFormPickup.config.js +0 -8
- package/registration/components/GuestRegistration/GuestRegistrationFormPickup.js +0 -4
- package/registration/components/Registration/Registration.js +0 -4
- package/registration/components/Registration/RegistrationContent.js +0 -4
- package/registration/components/Registration/RegistrationContent.style.js +0 -2
- package/registration/components/Registration/RegistrationFormActions.js +0 -5
- package/registration/components/Registration/RegistrationFormBase.config.js +0 -4
- package/registration/components/Registration/RegistrationFormBase.js +0 -4
- package/registration/components/Registration/RegistrationFormBilling.config.js +0 -5
- package/registration/components/Registration/RegistrationFormBilling.js +0 -5
- package/registration/components/Registration/RegistrationFormExtra.config.js +0 -5
- package/registration/components/Registration/RegistrationFormExtra.js +0 -5
- package/registration/components/Registration/RegistrationFormShipping.config.js +0 -5
- package/registration/components/Registration/RegistrationFormShipping.js +0 -5
- package/registration/components/Registration/RegistrationFormToggle.js +0 -4
- package/registration/components/index.js +0 -1
- package/registration/constants/actionTypes.js +0 -1
- package/registration/constants/index.js +0 -1
- package/registration/constants/pipelines.js +0 -1
- package/registration/hooks/index.js +0 -5
- package/registration/index.js +0 -2
- package/registration/providers/GuestRegistrationProvider.actions.js +0 -4
- package/registration/providers/GuestRegistrationProvider.connector.js +0 -7
- package/registration/providers/GuestRegistrationProvider.constraints.js +0 -18
- package/registration/providers/GuestRegistrationProvider.context.js +0 -1
- package/registration/providers/GuestRegistrationProvider.js +0 -22
- package/registration/providers/RegistrationProvider.actions.js +0 -8
- package/registration/providers/RegistrationProvider.connector.js +0 -6
- package/registration/providers/RegistrationProvider.constraints.js +0 -27
- package/registration/providers/RegistrationProvider.context.js +0 -1
- package/registration/providers/RegistrationProvider.js +0 -17
- package/registration/streams/index.js +0 -4
- package/registration/subscriptions/index.js +0 -5
- package/reviews/actions/index.js +0 -1
- package/reviews/components/index.js +0 -1
- package/reviews/constants/index.js +0 -1
- package/reviews/selectors/index.js +0 -1
- package/reviews/streams/index.js +0 -1
- package/scanner/action-creators/index.js +0 -1
- package/scanner/actions/index.js +0 -1
- package/scanner/classes/index.js +0 -1
- package/scanner/constants/index.js +0 -1
- package/scanner/helpers/index.js +0 -1
- package/scanner/streams/index.js +0 -1
- package/search/actions/index.js +0 -1
- package/search/constants/index.js +0 -1
- package/search/helpers/index.js +0 -1
- package/search/selectors/index.js +0 -1
- package/search/streams/index.js +0 -1
- package/styles/helpers/cssCustomProperties.js +0 -16
- package/styles/helpers/index.js +0 -1
- package/styles/helpers/initCSSCustomProperties.js +0 -10
- package/styles/helpers/loadCustomStyles.js +0 -6
- package/styles/helpers/setPageBackgroundColor.js +0 -5
- package/styles/helpers/setPageContentWidth.js +0 -5
- package/styles/helpers/setViewportHeight.js +0 -3
- package/styles/helpers/toggleBodyScroll.js +0 -5
- package/styles/helpers/updatePageInsets.js +0 -15
- package/styles/index.js +0 -1
- package/styles/reset/form.js +0 -8
- package/styles/reset/index.js +0 -1
- package/styles/reset/media.js +0 -1
- package/styles/reset/root.js +0 -3
- package/styles/reset/table.js +0 -1
- package/styles/reset/typography.js +0 -1
- package/tracking/helpers/index.js +0 -1
- package/types.js +0 -0
- package/user/selectors/data.js +0 -10
- /package/product/components/{ProductVariants/VariantAvailability.style.js → Characteristics/Characteristic/components/VariantAvailability/style.js} +0 -0
- /package/product/{providers/Product → components/ProductProvider}/connector.js +0 -0
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{connect}from'react-redux';import{fetchProductLocations}from"../../actions";/**
|
|
2
|
-
* @param {Function} dispatch The redux dispatch function.
|
|
3
|
-
* @return {Object} The extended component props.
|
|
4
|
-
*/var mapDispatchToProps={fetchProductLocations:fetchProductLocations};export default connect(null,mapDispatchToProps);
|
|
@@ -1,8 +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*as React from'react';import{FulfillmentSheet}from"../FulfillmentSheet";import connect from"./CartChangeFulfillmentMethod.connector";import{STAGE_FULFILLMENT_METHOD}from"../../constants";/**
|
|
2
|
-
* @param {Object} props The component props.
|
|
3
|
-
* @returns {JSX.Element}
|
|
4
|
-
*/function CartChangeFulfillmentMethod(props){var cartItem=props.cartItem,fetchProductLocations=props.fetchProductLocations,registerAction=props.registerAction;var _React$useState=React.useState(false),_React$useState2=_slicedToArray(_React$useState,2),opened=_React$useState2[0],setOpened=_React$useState2[1];/**
|
|
5
|
-
* Register cart item action
|
|
6
|
-
*/React.useEffect(function(){if(!registerAction||!cartItem){return;}registerAction('changeFulfillment',function(){fetchProductLocations(cartItem.product.id);setOpened(true);});},[cartItem,fetchProductLocations,registerAction]);/**
|
|
7
|
-
* Handles closing of the sheet.
|
|
8
|
-
*/function handleClose(){setOpened(false);}if(!opened){return null;}return React.createElement(FulfillmentSheet,{open:true,productId:cartItem.product.id,stage:STAGE_FULFILLMENT_METHOD,meta:{cartItem:cartItem},onClose:handleClose,updatePreferredLocation:true});}export default connect(CartChangeFulfillmentMethod);
|
|
File without changes
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React,{useMemo}from'react';import{hot}from'react-hot-loader/root';import{FulfillmentProvider}from"../../providers";import{FulfillmentSheetContent}from"../FulfillmentSheet/FulfillmentSheetContent";import CartContextMenuChangeFulfillmentContent from"./CartContextMenuChangeFulfillmentContent";/**
|
|
2
|
-
* The CartContextMenuChangeFulfillmentContent component renders a context menu which enables
|
|
3
|
-
* switching the active fulfillment method for a cart item.
|
|
4
|
-
* @param {Object} props The component props.
|
|
5
|
-
* @returns {JSX}
|
|
6
|
-
*/var CartContextMenuChangeFulfillment=function CartContextMenuChangeFulfillment(_ref){var cartItem=_ref.cartItem;var contextProps=useMemo(function(){return{productId:cartItem.product.id,meta:{cartItem:cartItem},updatePreferredLocation:true};},[cartItem]);return React.createElement(FulfillmentProvider,contextProps,React.createElement(CartContextMenuChangeFulfillmentContent,null),React.createElement(FulfillmentSheetContent,null));};export default hot(CartContextMenuChangeFulfillment);
|
|
@@ -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,{useCallback,useMemo}from'react';import{I18n,ContextMenu}from'@shopgate/engage/components';import{DIRECT_SHIP,ROPIS,BOPIS}from"../../constants";import{menuToggleButton,menuToggleContainer}from"./CartContextMenuChangeFulfillmentContent.style";import{useFulfillmentState}from"../../locations.hooks";var contextMenuClasses={button:menuToggleButton,container:menuToggleContainer};/**
|
|
2
|
-
* The CartContextMenuChangeFulfillmentContent component renders a context menu which enables
|
|
3
|
-
* switching the active fulfillment method for a cart item.
|
|
4
|
-
* @returns {JSX}
|
|
5
|
-
*/var CartContextMenuChangeFulfillmentContent=function CartContextMenuChangeFulfillmentContent(){var labelMapping=_defineProperty(_defineProperty(_defineProperty({},DIRECT_SHIP,'cart.change_fulfillment.direct_ship'),ROPIS,'cart.change_fulfillment.ropis'),BOPIS,'cart.change_fulfillment.bopis');var _useFulfillmentState=useFulfillmentState(),fulfillmentMethods=_useFulfillmentState.fulfillmentMethods,enabledFulfillmentMethods=_useFulfillmentState.enabledFulfillmentMethods,cartItem=_useFulfillmentState.meta.cartItem,changeFulfillment=_useFulfillmentState.changeFulfillment;var activeFulfillmentMethod=useMemo(function(){var _cartItem$fulfillment;return((_cartItem$fulfillment=cartItem.fulfillment)===null||_cartItem$fulfillment===void 0?void 0:_cartItem$fulfillment.method)||DIRECT_SHIP;},[cartItem.fulfillment]);var handleChangeFulfillment=useCallback(function(method){changeFulfillment(method,cartItem);},[cartItem,changeFulfillment]);var selectableFulfillmentMethods=useMemo(function(){if(!enabledFulfillmentMethods||!fulfillmentMethods){return[];}return fulfillmentMethods.filter(function(method){return enabledFulfillmentMethods.includes(method)&&method!==activeFulfillmentMethod;});},[activeFulfillmentMethod,enabledFulfillmentMethods,fulfillmentMethods]);var disabled=selectableFulfillmentMethods.length===0;return React.createElement(ContextMenu,{classes:contextMenuClasses,disabled:disabled},selectableFulfillmentMethods.map(function(method){return React.createElement(ContextMenu.Item,{key:method,onClick:function onClick(){return handleChangeFulfillment(method);}},React.createElement(I18n.Text,{string:labelMapping[method]}));}));};export default CartContextMenuChangeFulfillmentContent;
|
|
@@ -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{themeConfig}from'@shopgate/pwa-common/helpers/config';import{responsiveMediaQuery}from'@shopgate/engage/styles';var variables=themeConfig.variables;var menuToggleSize=variables.gap.big*2;var menuToggleFontSize=variables.gap.big*1.5;export var menuToggleContainer=css(_defineProperty({margin:variables.gap.small},responsiveMediaQuery('>sm',{webOnly:true}),{marginLeft:0})).toString();export var menuToggleButton=css({height:menuToggleSize,width:menuToggleSize,fontSize:menuToggleFontSize,display:'flex',alignItems:'center',justifyContent:'flex-end'}).toString();
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{connect}from'react-redux';import{makeGetEnabledFulfillmentMethods}from'@shopgate/engage/core';/**
|
|
2
|
-
* Creates the mapStateToProps connector function.
|
|
3
|
-
* @returns {Function}
|
|
4
|
-
*/var makeMapStateToProps=function makeMapStateToProps(){var getEnabledFulfillmentMethods=makeGetEnabledFulfillmentMethods();return function(state,props){return{enabledFulfillmentMethods:getEnabledFulfillmentMethods(state,props)};};};export default connect(makeMapStateToProps);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import*as React from'react';import noop from'lodash/noop';import{I18n,ContextMenu}from'@shopgate/engage/components';import connect from"./CartContextMenuItemChangeFulfillment.connector";/**
|
|
2
|
-
* @param {Object} props The component props.
|
|
3
|
-
* @property {Function} props.onClick onClick
|
|
4
|
-
* @property {Function} props.closeMenu closeMenu
|
|
5
|
-
* @returns {JSX}
|
|
6
|
-
*/export var CartContextMenuItemChangeFulfillment=connect(function(props){var onClick=props.onClick,closeMenu=props.closeMenu,enabledFulfillmentMethods=props.enabledFulfillmentMethods;if(!Array.isArray(enabledFulfillmentMethods)||enabledFulfillmentMethods.length<=1){return null;}return React.createElement(ContextMenu.Item,{onClick:onClick,closeMenu:closeMenu},React.createElement(I18n.Text,{string:"locations.change_fulfillment_method"}));});CartContextMenuItemChangeFulfillment.defaultProps={onClick:noop,closeMenu:noop};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import*as React from'react';import noop from'lodash/noop';import{I18n,ContextMenu}from'@shopgate/engage/components';import{DIRECT_SHIP}from"../../constants";/**
|
|
2
|
-
* @param {Object} props The component props.
|
|
3
|
-
* @property {Object} props.cartItem cartItem
|
|
4
|
-
* @property {Function} props.onClick onClick
|
|
5
|
-
* @property {Function} props.closeMenu closeMenu
|
|
6
|
-
* @returns {JSX}
|
|
7
|
-
*/export var CartContextMenuItemChangeLocation=function CartContextMenuItemChangeLocation(props){var cartItem=props.cartItem,onClick=props.onClick,closeMenu=props.closeMenu;if(!cartItem.fulfillment||cartItem.fulfillment.method===DIRECT_SHIP){return null;}return React.createElement(ContextMenu.Item,{onClick:onClick,closeMenu:closeMenu},React.createElement(I18n.Text,{string:"locations.change_location"}));};CartContextMenuItemChangeLocation.defaultProps={onClick:noop,closeMenu:noop};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import*as Redux from'redux';import{connect}from'react-redux';import{updateProductsInCart}from'@shopgate/engage/cart';import{fetchProductLocations}from"../../actions";/**
|
|
2
|
-
* Connects the dispatch function to a callable function in the props.
|
|
3
|
-
* @param {Function} dispatch The redux dispatch function.
|
|
4
|
-
* @return {Object} The extended component props.
|
|
5
|
-
*/var mapDispatchToProps=function mapDispatchToProps(dispatch){return{fetchProductLocations:fetchProductLocations,updateProductInCart:function updateProductInCart(cartItemId,quantity,location,fulfillmentMethod){dispatch(updateProductsInCart([{cartItemId:cartItemId,quantity:quantity,fulfillment:{method:fulfillmentMethod,location:{code:location.code,name:location.name}}}]));}};};export default connect(null,mapDispatchToProps);
|
|
@@ -1,11 +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*as React from'react';import noop from'lodash/noop';import{FulfillmentSheet}from"../FulfillmentSheet";import{isProductAvailable}from"../../helpers";import{STAGE_SELECT_STORE}from"../../constants";import connect from"./CartItemProductChangeLocation.connector";/**
|
|
2
|
-
* @param {Object} props The component props.
|
|
3
|
-
* @param {Object} cartItem cartItem
|
|
4
|
-
* @param {Function} updateProduct updateProduct
|
|
5
|
-
* @param {Function} fetchProductLocations fetchProductLocations
|
|
6
|
-
* @returns {JSX}
|
|
7
|
-
*/var CartItemProductChangeLocation=function CartItemProductChangeLocation(props){var cartItem=props.cartItem,updateProductInCart=props.updateProductInCart,fetchProductLocations=props.fetchProductLocations,registerAction=props.registerAction;var _React$useState=React.useState(false),_React$useState2=_slicedToArray(_React$useState,2),opened=_React$useState2[0],setOpened=_React$useState2[1];var _React$useState3=React.useState(null),_React$useState4=_slicedToArray(_React$useState3,2),fulfillmentMethod=_React$useState4[0],setFulfillmentMethod=_React$useState4[1];/**
|
|
8
|
-
* Register cart item action
|
|
9
|
-
*/React.useEffect(function(){if(!registerAction||!cartItem){return;}registerAction('changeLocation',function(currentFulfillmentMethod){fetchProductLocations(cartItem.product.id);setOpened(true);setFulfillmentMethod(currentFulfillmentMethod);});},[cartItem,fetchProductLocations,registerAction]);/**
|
|
10
|
-
* Select location callback
|
|
11
|
-
*/var onLocationSelect=React.useCallback(function(location){setTimeout(function(){return setOpened(false);},500);if(!location||!isProductAvailable(location,location===null||location===void 0?void 0:location.inventory)){return;}updateProductInCart(cartItem.id,cartItem.quantity,location,fulfillmentMethod);setFulfillmentMethod(fulfillmentMethod);},[cartItem.id,cartItem.quantity,fulfillmentMethod,updateProductInCart]);var fulfillment=cartItem.fulfillment;if(!opened||!fulfillment){return null;}return React.createElement(FulfillmentSheet,{stage:STAGE_SELECT_STORE,open:true,title:"locations.headline",changeOnly:true,productId:cartItem.product.id,updatePreferredLocation:true,onClose:onLocationSelect,isCart:true});};CartItemProductChangeLocation.defaultProps={registerAction:noop};export default connect(CartItemProductChangeLocation);
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{default as CartItemProductChangeLocation}from"./CartItemProductChangeLocation";export{default as CartChangeFulfillmentMethod}from"./CartChangeFulfillmentMethod";export{CartContextMenuItemChangeLocation}from"./CartContextMenuItemChangeLocation";export{CartContextMenuItemChangeFulfillment}from"./CartContextMenuItemChangeFulfillment";export{default as CartContextMenuChangeFulfillment}from"./CartContextMenuChangeFulfillment";
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from'react';import{RippleButton,I18n,SurroundPortals}from'@shopgate/engage/components';import{button,ripple}from"./ChangeLocationButton.style";import{PRODUCT_FULFILLMENT_CHANGE_LOCATION}from"../../constants/Portals";/**
|
|
2
|
-
* @param {Object} props .
|
|
3
|
-
* @returns {JSX}
|
|
4
|
-
*/export var ChangeLocationButtonUnwrapped=function ChangeLocationButtonUnwrapped(_ref){var onClick=_ref.onClick,disabled=_ref.disabled;return React.createElement(SurroundPortals,{portalName:PRODUCT_FULFILLMENT_CHANGE_LOCATION,portalProps:{onClick:onClick,disabled:disabled}},React.createElement(RippleButton,{onClick:onClick,className:button,disabled:disabled,rippleClassName:ripple,type:"secondary",flat:true},React.createElement(I18n.Text,{string:"locations.change_location"})));};ChangeLocationButtonUnwrapped.defaultProps={disabled:false};export var ChangeLocationButton=React.memo(ChangeLocationButtonUnwrapped);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var variables=themeConfig.variables;export var button=css({fontSize:'0.625rem !important',// textAlign: 'right',
|
|
2
|
-
letterSpacing:'0.05em',padding:"".concat(variables.gap.xsmall*0.75,"px 0 !important"),' *':{padding:'0 !important'}}).toString();export var ripple=css({padding:0}).toString();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{ChangeLocationButton}from"./ChangeLocationButton";
|
|
@@ -1,4 +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;}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,{useState,useCallback}from'react';import{Availability}from'@shopgate/engage/product';import{RadioGroup}from"../../../components";import{useFulfillmentState}from"../../locations.hooks";import{IN_STORE_PICKUP_BOPIS_LABEL,IN_STORE_PICKUP_ROPIS_LABEL,DIRECT_SHIP_LABEL,DIRECT_SHIP,ROPIS,BOPIS}from"../../constants";import{container,radioGroup}from"./FulfillmentPath.style";import{FulfillmentPathItem}from"./FulfillmentPathItem";/**
|
|
2
|
-
* Renders the fulfillment path selector stage.
|
|
3
|
-
* @returns {JSX}
|
|
4
|
-
*/export function FulfillmentPath(){var labelMapping=_defineProperty(_defineProperty(_defineProperty({},DIRECT_SHIP,DIRECT_SHIP_LABEL),ROPIS,IN_STORE_PICKUP_ROPIS_LABEL),BOPIS,IN_STORE_PICKUP_BOPIS_LABEL);var _useFulfillmentState=useFulfillmentState(),product=_useFulfillmentState.product,enabledFulfillmentMethods=_useFulfillmentState.enabledFulfillmentMethods,_useFulfillmentState$=_useFulfillmentState.meta,_useFulfillmentState$2=_useFulfillmentState$===void 0?{}:_useFulfillmentState$,_useFulfillmentState$3=_useFulfillmentState$2.cartItem,cartItem=_useFulfillmentState$3===void 0?undefined:_useFulfillmentState$3,changeFulfillment=_useFulfillmentState.changeFulfillment;var _ref=cartItem||{},_ref$fulfillment=_ref.fulfillment,fulfillment=_ref$fulfillment===void 0?{}:_ref$fulfillment,_ref$product=_ref.product,_ref$product2=_ref$product===void 0?{}:_ref$product,_ref$product2$fulfill=_ref$product2.fulfillmentMethods,cartItemFulfillmentMethods=_ref$product2$fulfill===void 0?[]:_ref$product2$fulfill;var _ref2=fulfillment||{},_ref2$method=_ref2.method,activeCartItemFulfillmentMethod=_ref2$method===void 0?DIRECT_SHIP:_ref2$method;var _useState=useState(labelMapping[activeCartItemFulfillmentMethod]),_useState2=_slicedToArray(_useState,2),selection=_useState2[0],setSelection=_useState2[1];var handleChange=useCallback(function(elementName){var method=Object.keys(labelMapping).find(function(key){return labelMapping[key]===elementName;});setSelection(method);changeFulfillment(method,cartItem);},[cartItem,changeFulfillment,labelMapping]);return React.createElement("div",{className:container},React.createElement(RadioGroup,{name:"cartItem.fulfillment_selector",value:selection,onChange:handleChange,className:radioGroup,isControlled:true,direction:"column"},enabledFulfillmentMethods.includes(DIRECT_SHIP)&&React.createElement(FulfillmentPathItem,{name:DIRECT_SHIP_LABEL,attributes:{disabled:!cartItemFulfillmentMethods.includes(DIRECT_SHIP)}},React.createElement(Availability,{productId:product.id,fulfillmentSelection:DIRECT_SHIP})),enabledFulfillmentMethods.includes(BOPIS)&&React.createElement(FulfillmentPathItem,{name:IN_STORE_PICKUP_BOPIS_LABEL,attributes:{disabled:!cartItemFulfillmentMethods.includes(BOPIS)}}),enabledFulfillmentMethods.includes(ROPIS)&&React.createElement(FulfillmentPathItem,{name:IN_STORE_PICKUP_ROPIS_LABEL,attributes:{disabled:!cartItemFulfillmentMethods.includes(ROPIS)}})));}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{css}from'glamor';import classNames from'classnames';import{themeConfig}from'@shopgate/pwa-common/helpers/config';import radioGroupStyles from'@shopgate/pwa-ui-shared/Form/RadioGroup/components/Item/style';var variables=themeConfig.variables,colors=themeConfig.colors;export var container=css({padding:"0 ".concat(variables.gap.big,"px")});export var radioGroup=css({// Removes the vertical padding, which are applied by default around radio groups
|
|
2
|
-
paddingTop:0,paddingBottom:0,transition:'opacity 250ms cubic-bezier(0.25, 0.1, 0.25, 1)'}).toString();export var radioItem=css({display:'flex',alignItems:'center',padding:"".concat(variables.gap.big,"px 0"),boxShadow:"0 1px 0 ".concat(colors.darkGray)}).toString();export var itemLabel=classNames(radioGroupStyles.label,css({display:'flex',flexWrap:'wrap',justifyContent:'space-between',alignItems:'baseline',marginBottom:0}).toString());export var pickUpContainer=css({display:'flex',flexDirection:'column',textAlign:'right'});
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
var _excluded=["name","children"];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 _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded);var key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++){key=sourceSymbolKeys[i];if(excluded.indexOf(key)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key];}}return target;}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={};var sourceKeys=Object.keys(source);var key,i;for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;target[key]=source[key];}return target;}import*as React from'react';import{i18n}from"../../../core";import{RadioGroupItem}from"../../../components";import{radioItem,itemLabel}from"./FulfillmentPath.style";/**
|
|
2
|
-
* Renders a RadioItem element to be used by the FulfillmentPathSelector component.
|
|
3
|
-
* This component is meant to be rendered as child of a RadioGroup.
|
|
4
|
-
* @param {Object} props All props required by the RadioGroupItem component to work.
|
|
5
|
-
* @returns {JSX}
|
|
6
|
-
*/export var FulfillmentPathItem=function FulfillmentPathItem(_ref){var name=_ref.name,children=_ref.children,rest=_objectWithoutProperties(_ref,_excluded);return React.createElement(RadioGroupItem,_extends({},rest,{name:name,className:radioItem,label:React.createElement("div",{className:itemLabel},React.createElement("span",null,i18n.text(name)),children)}));};FulfillmentPathItem.defaultProps={children:null};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{FulfillmentPath}from"./FulfillmentPath";
|
|
@@ -1,14 +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*as React from'react';import{UIEvents,i18n}from'@shopgate/engage/core';import{SheetList}from'@shopgate/engage/components';import SheetDrawer from"../../../components/SheetDrawer";import{QUICK_RESERVE,MULTI_LINE_RESERVE}from"../../constants";import{sheetDrawer}from"./FulfillmentPathSelector.style";var callback=null;var EVENT_SET_OPEN='FulfillmentPathSelector.setOpen';/**
|
|
2
|
-
* @param {Object} props The component props.
|
|
3
|
-
* @returns {JSX.Element}
|
|
4
|
-
*/function FulfillmentPathSelector(){var _React$useState=React.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isOpen=_React$useState2[0],setIsOpen=_React$useState2[1];/**
|
|
5
|
-
* Handles opening of the sheet.
|
|
6
|
-
*/function handleOpen(){setIsOpen(true);}React.useEffect(function(){UIEvents.addListener(EVENT_SET_OPEN,handleOpen);return function(){UIEvents.removeListener(EVENT_SET_OPEN,handleOpen);};},[]);/**
|
|
7
|
-
* @param {string} value The selected value.
|
|
8
|
-
*/function handleSelect(value){if(callback!==null){callback(value);}setIsOpen(false);callback=null;}/**
|
|
9
|
-
* @param {Object} event The click event.
|
|
10
|
-
*/function handleQuickReserve(event){event.preventDefault();handleSelect(QUICK_RESERVE);}/**
|
|
11
|
-
* @param {Object} event The click event.
|
|
12
|
-
*/function handleReserveToCart(event){event.preventDefault();handleSelect(MULTI_LINE_RESERVE);}/**
|
|
13
|
-
* Handles the case when the sheet is closed manually.
|
|
14
|
-
*/function handleClose(){if(callback!==null){callback('');}setIsOpen(false);callback=null;}return React.createElement(SheetDrawer,{isOpen:isOpen,title:i18n.text('locations.choose_reservation_type'),className:sheetDrawer,onDidClose:handleClose},React.createElement(SheetList,null,React.createElement(SheetList.Item,{title:i18n.text('locations.quick_reserve'),onClick:handleQuickReserve}),React.createElement(SheetList.Item,{title:i18n.text('locations.reserve_to_cart'),onClick:handleReserveToCart})));}FulfillmentPathSelector.open=function(callbackFn){callback=callbackFn;UIEvents.emit(EVENT_SET_OPEN);};export default FulfillmentPathSelector;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{css}from'glamor';export var sheetDrawer=css({boxShadow:'0 0 0 9999px rgba(0, 0, 0, 0.25)'}).toString();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{default as FulfillmentPathSelector}from"./FulfillmentPathSelector";
|
|
@@ -1,9 +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{connect}from'react-redux';import{hasProductVariants,isProductOrderable,makeIsBaseProductActive}from'@shopgate/engage/product';import{DIRECT_SHIP,ROPIS,BOPIS}from"../../constants";import{makeGetEnabledFulfillmentMethods,makeGetFulfillmentPaths,makeUseLocationFulfillmentMethods}from"../../../core/config";import{getProductShowAlternativeLocation}from"../../../core/selectors";import{MERCHANT_SETTINGS_PRODUCT_SHOW_ALTERNATIVE_LOCATION}from"../../../core/constants";import{makeIsFulfillmentSelectorMethodEnabled,getPreferredLocation,makeGetLocationInventory,makeGetLocationFulfillmentMethods,getPreferredFulfillmentMethod,getProductFulfillmentMethods,getUserSearch}from"../../selectors";import{storeFulfillmentMethod}from"../../action-creators";/**
|
|
2
|
-
* @return {Function} The extended component props.
|
|
3
|
-
*/function makeMapStateToProps(){/* eslint-disable require-jsdoc */var getLocationCode=function getLocationCode(state,props){var _getPreferredLocation;return(_getPreferredLocation=getPreferredLocation(state,props))===null||_getPreferredLocation===void 0?void 0:_getPreferredLocation.code;};var getProductCode=function getProductCode(_,props){return props.variantId||props.productId||null;};/* eslint-enable require-jsdoc */var getFulfillmentPaths=makeGetFulfillmentPaths();var isDirectShipEnabled=makeIsFulfillmentSelectorMethodEnabled(getLocationCode,getProductCode,DIRECT_SHIP);var isROPISEnabled=makeIsFulfillmentSelectorMethodEnabled(getLocationCode,getProductCode,ROPIS,// Set to true when fulfillment methods shall not be disabled that are not supported by location
|
|
4
|
-
false);var isBOPISEnabled=makeIsFulfillmentSelectorMethodEnabled(getLocationCode,getProductCode,BOPIS,// Set to true when fulfillment methods shall not be disabled that are not supported by location
|
|
5
|
-
false);var getInventory=makeGetLocationInventory(getLocationCode,getProductCode);var getEnabledFulfillmentMethods=makeGetEnabledFulfillmentMethods();var getLocationFulfillmentMethods=makeGetLocationFulfillmentMethods(getLocationCode);var isBaseProductActive=makeIsBaseProductActive();var useLocationFulfillmentMethods=makeUseLocationFulfillmentMethods();/**
|
|
6
|
-
* @param {Object} state The application state.
|
|
7
|
-
* @param {Object} props The component props.
|
|
8
|
-
* @returns {Object}
|
|
9
|
-
*/return function(state,props){var hasVariants=hasProductVariants(state,props);var baseProductActive=isBaseProductActive(state,props);return{merchantSettings:_defineProperty({},MERCHANT_SETTINGS_PRODUCT_SHOW_ALTERNATIVE_LOCATION,getProductShowAlternativeLocation(state)),fulfillmentPaths:getFulfillmentPaths(state),shopFulfillmentMethods:getEnabledFulfillmentMethods(state),productFulfillmentMethods:getProductFulfillmentMethods(state,props),locationFulfillmentMethods:getLocationFulfillmentMethods(state,props),useLocationFulfillmentMethods:useLocationFulfillmentMethods(state,props),userFulfillmentMethod:getPreferredFulfillmentMethod(state,props),preferredLocation:getPreferredLocation(state,props),inventory:getInventory(state,props),isDirectShipEnabled:isDirectShipEnabled(state,props),isROPISEnabled:isROPISEnabled(state,props),isBOPISEnabled:isBOPISEnabled(state,props),isOrderable:isProductOrderable(state,props)||!!hasVariants,isReady:hasVariants!==null&&(!hasVariants||!baseProductActive),userSearch:getUserSearch(state)};};}var mapDispatchToProps={storeFulfillmentMethod:storeFulfillmentMethod};export default connect(makeMapStateToProps,mapDispatchToProps);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createContext}from'react';import{DIRECT_SHIP}from"../../constants";export var FulfillmentSelectorContext=createContext({selection:DIRECT_SHIP,selectedLocation:null,location:null,isDirectShipEnabled:false,isROPISEnabled:false,isBOPISEnabled:false,isReady:false,productId:null,handleChange:function handleChange(){},conditioner:{},fulfillmentPaths:[],userFulfillmentMethod:null,isOrderable:false,shopFulfillmentMethods:null,productFulfillmentMethods:null,locationFulfillmentMethods:null,useLocationFulfillmentMethods:false,merchantSettings:null});
|
|
@@ -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{hot}from'react-hot-loader/root';import React,{useState,useEffect,useCallback,useMemo}from'react';import{SurroundPortals}from"../../../components";import{DIRECT_SHIP,ROPIS,BOPIS,STAGE_SELECT_STORE,PRODUCT_FULFILLMENT_SELECTOR}from"../../constants";import{FulfillmentSheet}from"../FulfillmentSheet";import{FulfillmentSelectorContext}from"./FulfillmentSelector.context";import{FulfillmentSelectorHeader}from"./FulfillmentSelectorHeader";import{FulfillmentSelectorItem}from"./FulfillmentSelectorItem";import{FulfillmentSelectorDirectShip}from"./FulfillmentSelectorDirectShip";import{FulfillmentSelectorBOPIS}from"./FulfillmentSelectorBOPIS";import{FulfillmentSelectorROPIS}from"./FulfillmentSelectorROPIS";import{FulfillmentSelectorAddToCart}from"./FulfillmentSelectorAddToCart";import{FulfillmentSelectorLocation}from"./FulfillmentSelectorLocation";import{container}from"./FulfillmentSelector.style";import connect from"./FulfillmentSelector.connector";/**
|
|
2
|
-
* Renders the fulfillment selector radio button group.
|
|
3
|
-
* @param {Object} props The component props.
|
|
4
|
-
* @returns {JSX}
|
|
5
|
-
*/function FulfillmentSelector(props){var productId=props.productId,merchantSettings=props.merchantSettings,shopFulfillmentMethods=props.shopFulfillmentMethods,productFulfillmentMethods=props.productFulfillmentMethods,locationFulfillmentMethods=props.locationFulfillmentMethods,useLocationFulfillmentMethods=props.useLocationFulfillmentMethods,preferredLocation=props.preferredLocation,inventory=props.inventory,conditioner=props.conditioner,isDirectShipEnabled=props.isDirectShipEnabled,isROPISEnabled=props.isROPISEnabled,isBOPISEnabled=props.isBOPISEnabled,storeFulfillmentMethod=props.storeFulfillmentMethod,userFulfillmentMethod=props.userFulfillmentMethod,fulfillmentPaths=props.fulfillmentPaths,isOrderable=props.isOrderable,isReady=props.isReady;var _useState=useState(userFulfillmentMethod),_useState2=_slicedToArray(_useState,2),selection=_useState2[0],setSelection=_useState2[1];var _useState3=useState(preferredLocation),_useState4=_slicedToArray(_useState3,2),selectedLocation=_useState4[0],setSelectedLocation=_useState4[1];var _useState5=useState(false),_useState6=_slicedToArray(_useState5,2),isOpen=_useState6[0],setIsOpen=_useState6[1];var usedLocation=selectedLocation||preferredLocation;// Initialize fo selection once it is available.
|
|
6
|
-
useEffect(function(){if(!selection&&userFulfillmentMethod){setSelection(userFulfillmentMethod);}},[selection,userFulfillmentMethod]);// Initialize location selection once it is available.
|
|
7
|
-
useEffect(function(){if(!selectedLocation&&preferredLocation){setSelectedLocation(preferredLocation);}},[preferredLocation,selectedLocation]);var fulfillmentMethodFallback=useMemo(function(){if(!shopFulfillmentMethods){return null;}var states=[isDirectShipEnabled,isBOPISEnabled,isROPISEnabled];return[DIRECT_SHIP,BOPIS,ROPIS].find(function(method,index){return states[index]&&shopFulfillmentMethods.includes(method);})||null;},[isBOPISEnabled,isDirectShipEnabled,isROPISEnabled,shopFulfillmentMethods]);/**
|
|
8
|
-
* Determine and set a default fulfillment method when none was set before.
|
|
9
|
-
*/useEffect(function(){if(!shopFulfillmentMethods){return;}/**
|
|
10
|
-
* The user has already set a fulfillment method which is supported by the shop, so we don't
|
|
11
|
-
* need to apply the fallback. We don't check against the product fulfillment methods to
|
|
12
|
-
* avoid too much auto magic when navigating through catalogs with different set up products.
|
|
13
|
-
*/if(userFulfillmentMethod&&shopFulfillmentMethods.includes(userFulfillmentMethod)){return;}if(fulfillmentMethodFallback!==userFulfillmentMethod){setSelection(fulfillmentMethodFallback);storeFulfillmentMethod(fulfillmentMethodFallback);}},[fulfillmentMethodFallback,isBOPISEnabled,isDirectShipEnabled,isROPISEnabled,shopFulfillmentMethods,storeFulfillmentMethod,userFulfillmentMethod]);useEffect(function(){if((preferredLocation===null||preferredLocation===void 0?void 0:preferredLocation.code)!==(selectedLocation===null||selectedLocation===void 0?void 0:selectedLocation.code)){setSelectedLocation(preferredLocation);}},[preferredLocation,selectedLocation,shopFulfillmentMethods]);/**
|
|
14
|
-
* Updates the selected location when the sheet closes.
|
|
15
|
-
*/var handleClose=useCallback(function(newLocationData){setIsOpen(false);if(!newLocationData&&(!usedLocation||!usedLocation.code)){// Reset the UI back to directShip if there was no location selected already
|
|
16
|
-
setSelection(fulfillmentMethodFallback);return;}if(newLocationData){// Update the selected location only when the selection was done for the same product.
|
|
17
|
-
setSelectedLocation(newLocationData.location);}},[fulfillmentMethodFallback,usedLocation]);/**
|
|
18
|
-
* Whenever the pick-up selection is made, open the
|
|
19
|
-
* store selector sheet and use the new location.
|
|
20
|
-
*/var handleChange=useCallback(function(method){var changeOnly=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;conditioner.without('fulfillment-inventory').check().then(function(passed){if(!passed){return;}setSelection(method);storeFulfillmentMethod(method);var isValidRopeSelection=[ROPIS,BOPIS].includes(method)&&!!preferredLocation&&!!preferredLocation.code;if(!changeOnly&&(isOpen||isValidRopeSelection)){return;}if(method===DIRECT_SHIP){setSelectedLocation(null);return;}setIsOpen(true);FulfillmentSheet.open({stage:STAGE_SELECT_STORE,callback:handleClose,changeOnly:changeOnly});});},[conditioner,handleClose,isOpen,preferredLocation,storeFulfillmentMethod]);var shopHasRopeMethods=useMemo(function(){if(!Array.isArray(shopFulfillmentMethods)){return false;}return shopFulfillmentMethods.filter(function(method){return method!==DIRECT_SHIP;}).length>0;},[shopFulfillmentMethods]);if(!shopHasRopeMethods){return null;}var context={selection:selection,selectedLocation:selectedLocation,inventory:inventory,preferredLocation:preferredLocation,isDirectShipEnabled:isDirectShipEnabled,isBOPISEnabled:isBOPISEnabled,isROPISEnabled:isROPISEnabled,isReady:isReady,productId:productId,handleChange:handleChange,conditioner:conditioner,merchantSettings:merchantSettings,fulfillmentPaths:fulfillmentPaths,userFulfillmentMethod:userFulfillmentMethod,isOrderable:isOrderable,shopFulfillmentMethods:shopFulfillmentMethods,productFulfillmentMethods:productFulfillmentMethods,locationFulfillmentMethods:locationFulfillmentMethods,useLocationFulfillmentMethods:useLocationFulfillmentMethods};return React.createElement(FulfillmentSelectorContext.Provider,{value:context},React.createElement(SurroundPortals,{portalName:PRODUCT_FULFILLMENT_SELECTOR},React.createElement("div",{className:container,role:"radiogroup",tabIndex:"0"},React.createElement(FulfillmentSelectorHeader,null),shopFulfillmentMethods.includes(DIRECT_SHIP)&&React.createElement(FulfillmentSelectorItem,{name:DIRECT_SHIP,onChange:handleChange,disabled:!isReady||!isDirectShipEnabled},React.createElement(FulfillmentSelectorDirectShip,null)),shopFulfillmentMethods.includes(BOPIS)&&React.createElement(FulfillmentSelectorItem,{name:BOPIS,onChange:handleChange,disabled:!isReady||!isBOPISEnabled},React.createElement(FulfillmentSelectorBOPIS,null)),shopFulfillmentMethods.includes(ROPIS)&&React.createElement(FulfillmentSelectorItem,{name:ROPIS,onChange:handleChange,disabled:!isReady||!isROPISEnabled},React.createElement(FulfillmentSelectorROPIS,null)))),React.createElement(FulfillmentSelectorLocation,null),React.createElement(FulfillmentSelectorAddToCart,null));}export default hot(connect(React.memo(FulfillmentSelector)));
|
|
@@ -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:"".concat(variables.gap.small,"px ").concat(variables.gap.big,"px")});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{DIRECT_SHIP,ROPIS,BOPIS}from"../../constants";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import _regeneratorRuntime from"@babel/runtime/regenerator";function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}import{useEffect}from'react';import{isProductAvailable}from"../../helpers";import{MULTI_LINE_RESERVE,QUICK_RESERVE,DIRECT_SHIP,ROPIS,BOPIS,STAGE_RESERVE_FORM}from"../../constants";import{FulfillmentSheet}from"../FulfillmentSheet";import{FulfillmentPathSelector}from"../FulfillmentPathSelector";import{useFulfillmentSelectorState}from"./FulfillmentSelector.hooks";/**
|
|
2
|
-
* Opens the fulfillment path selector and returns a promise that resolves after selection.
|
|
3
|
-
* @returns {Promise}
|
|
4
|
-
*/function promisifiedFulfillmentPathSelector(){return new Promise(function(resolve){FulfillmentPathSelector.open(function(selectedPath){resolve(selectedPath);});});}/**
|
|
5
|
-
* Interject add to cart flow.
|
|
6
|
-
* @returns {JSX}
|
|
7
|
-
*/export function FulfillmentSelectorAddToCart(){var _useFulfillmentSelect=useFulfillmentSelectorState(),preferredLocation=_useFulfillmentSelect.preferredLocation,inventory=_useFulfillmentSelect.inventory,selectedLocation=_useFulfillmentSelect.selectedLocation,conditioner=_useFulfillmentSelect.conditioner,fulfillmentPaths=_useFulfillmentSelect.fulfillmentPaths,selection=_useFulfillmentSelect.selection,isDirectShipEnabled=_useFulfillmentSelect.isDirectShipEnabled,isROPISEnabled=_useFulfillmentSelect.isROPISEnabled,isBOPISEnabled=_useFulfillmentSelect.isBOPISEnabled;var usedLocation=selectedLocation||preferredLocation;// Add to cart effect to validate inventory
|
|
8
|
-
useEffect(function(){// Add most late conditioner
|
|
9
|
-
conditioner.addConditioner('fulfillment-inventory',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(){var mapping,selectedPath;return _regeneratorRuntime.wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:if(!(isDirectShipEnabled&&selection===DIRECT_SHIP)){_context.next=2;break;}return _context.abrupt("return",true);case 2:mapping=_defineProperty(_defineProperty(_defineProperty({},DIRECT_SHIP,isDirectShipEnabled),ROPIS,isROPISEnabled),BOPIS,isBOPISEnabled);if(!(!selection||!mapping[selection]||!usedLocation)){_context.next=5;break;}return _context.abrupt("return",false);case 5:if(isProductAvailable(usedLocation,inventory)){_context.next=7;break;}return _context.abrupt("return",false);case 7:if(!(fulfillmentPaths.length>1)){_context.next=19;break;}_context.next=10;return promisifiedFulfillmentPathSelector();case 10:selectedPath=_context.sent;if(!(selectedPath==='')){_context.next=13;break;}return _context.abrupt("return",false);case 13:if(!(selectedPath===MULTI_LINE_RESERVE)){_context.next=15;break;}return _context.abrupt("return",true);case 15:if(!(selectedPath===QUICK_RESERVE)){_context.next=18;break;}FulfillmentSheet.open({stage:STAGE_RESERVE_FORM,fulfillmentPath:selectedPath});return _context.abrupt("return",false);case 18:return _context.abrupt("return",false);case 19:if(fulfillmentPaths.includes(MULTI_LINE_RESERVE)){_context.next=22;break;}// Open reservation form. Stop adding to a cart
|
|
10
|
-
FulfillmentSheet.open({stage:STAGE_RESERVE_FORM});return _context.abrupt("return",false);case 22:return _context.abrupt("return",isProductAvailable(usedLocation,inventory));case 23:case"end":return _context.stop();}},_callee);})),100);return function(){return conditioner.removeConditioner('fulfillment-inventory');};},[conditioner,fulfillmentPaths,selection,usedLocation,isDirectShipEnabled,isROPISEnabled,isBOPISEnabled,inventory]);return null;}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React,{useEffect,memo}from'react';import{connect}from'react-redux';import PropTypes from'prop-types';import{withWidgetSettings}from'@shopgate/engage/core';import{Grid,ResponsiveContainer,SurroundPortals}from'@shopgate/engage/components';import{MERCHANT_SETTINGS_PRODUCT_SHOW_ALTERNATIVE_LOCATION}from"../../../core/constants";import{provideProductAlternativeLocation}from"../../action-creators";import{StockInfo}from"../StockInfo";import{locationName,alternativeLocation as gridClassName}from"./FulfillmentSelectorLocation.style";import{itemColumn,itemSpacer}from"./FulfillmentSelectorItem.style";import{useFulfillmentSelectorState}from"./FulfillmentSelector.hooks";import{PRODUCT_FULFILLMENT_SELECTOR_ALTERNATIVE_LOCATION}from"../../constants/Portals";import{getProductAlternativeLocations}from"../../selectors";import{SORT_CLOSEST_LOCATION_WITH_INVENTORY}from"../../constants";/**
|
|
2
|
-
* The FulfillmentSelectorLocation component
|
|
3
|
-
* @returns {JSX}
|
|
4
|
-
*/function FulfillmentSelectorAlternativeLocation(_ref){var productId=_ref.productId,show=_ref.show,alternativeLocations=_ref.alternativeLocations,provideAlternativeLocation=_ref.provideAlternativeLocation,widgetSettings=_ref.widgetSettings;var _useFulfillmentSelect=useFulfillmentSelectorState(),_useFulfillmentSelect2=_useFulfillmentSelect.merchantSettings,merchantSettings=_useFulfillmentSelect2===void 0?{}:_useFulfillmentSelect2,selectedLocation=_useFulfillmentSelect.selectedLocation;var _ref2=widgetSettings||{},_ref2$alternativeLoca=_ref2.alternativeLocationOnPDP,_ref2$alternativeLoca2=_ref2$alternativeLoca===void 0?{}:_ref2$alternativeLoca,_ref2$alternativeLoca3=_ref2$alternativeLoca2.radius,radius=_ref2$alternativeLoca3===void 0?50:_ref2$alternativeLoca3;var showAlternative=merchantSettings[MERCHANT_SETTINGS_PRODUCT_SHOW_ALTERNATIVE_LOCATION]||false;useEffect(function(){if(show&&showAlternative&&productId&&!alternativeLocations){provideAlternativeLocation(productId,{sort:SORT_CLOSEST_LOCATION_WITH_INVENTORY,radius:radius});}},[productId,provideAlternativeLocation,alternativeLocations,radius,show,showAlternative]);if(!show||!showAlternative||!productId){return null;}if(!alternativeLocations||!alternativeLocations.length){return null;}var alternativeLocation=alternativeLocations.find(function(l){return l.code!==(selectedLocation===null||selectedLocation===void 0?void 0:selectedLocation.code);});return React.createElement(SurroundPortals,{portalName:PRODUCT_FULFILLMENT_SELECTOR_ALTERNATIVE_LOCATION,portalProps:{productId:productId,location:alternativeLocation}},alternativeLocation&&React.createElement(Grid,{component:"div",className:gridClassName},React.createElement(ResponsiveContainer,{appAlways:true,breakpoint:"xs"},React.createElement(Grid.Item,{className:itemColumn,grow:1,shrink:0,component:"div"},React.createElement("div",{className:locationName},alternativeLocation.name)),React.createElement(Grid.Item,{className:itemColumn,grow:1,shrink:0,component:"div"},React.createElement(StockInfo,{productId:productId,location:alternativeLocation}))),React.createElement(ResponsiveContainer,{webOnly:true,breakpoint:">xs"},React.createElement("div",{className:locationName},alternativeLocation.name,React.createElement("span",{className:itemSpacer},React.createElement(StockInfo,{productId:productId,location:alternativeLocation}))))));}FulfillmentSelectorAlternativeLocation.defaultProps={alternativeLocations:null,productId:null,widgetSettings:null};/**
|
|
5
|
-
* @param {Object} state The current application state.
|
|
6
|
-
* @param {Object} props The component props.
|
|
7
|
-
* @return {Object}
|
|
8
|
-
*/var mapStateToProps=function mapStateToProps(state,props){var _props$widgetSettings,_props$widgetSettings2;return{alternativeLocations:getProductAlternativeLocations(state,{productId:props.productId,params:{sort:SORT_CLOSEST_LOCATION_WITH_INVENTORY,radius:((_props$widgetSettings=props.widgetSettings)===null||_props$widgetSettings===void 0?void 0:(_props$widgetSettings2=_props$widgetSettings.alternativeLocationOnPDP)===null||_props$widgetSettings2===void 0?void 0:_props$widgetSettings2.radius)||50}})};};var mapDispatchToProps={provideAlternativeLocation:provideProductAlternativeLocation};export default withWidgetSettings(connect(mapStateToProps,mapDispatchToProps)(memo(FulfillmentSelectorAlternativeLocation)),'@shopgate/engage/locations');
|
|
@@ -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 from'react';import classNames from'classnames';import{i18n}from"../../../core";import{IN_STORE_PICKUP_BOPIS_LABEL}from"../../constants";import{itemRowDisabled}from"./FulfillmentSelectorItem.style";import{useFulfillmentSelectorState}from"./FulfillmentSelector.hooks";/**
|
|
2
|
-
* Renders the FulfillmentSelectorBOPIS components.
|
|
3
|
-
* @returns {JSX}
|
|
4
|
-
*/export function FulfillmentSelectorBOPIS(){var _useFulfillmentSelect=useFulfillmentSelectorState(),isBOPISEnabled=_useFulfillmentSelect.isBOPISEnabled,isReady=_useFulfillmentSelect.isReady;var classes=classNames(_defineProperty({},itemRowDisabled.toString(),!isReady||!isBOPISEnabled));return React.createElement("div",{className:classes},i18n.text(IN_STORE_PICKUP_BOPIS_LABEL));}
|
|
@@ -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{Grid}from'@shopgate/engage/components';import{i18n}from"../../../core";import{Availability}from"../../../product";import{DIRECT_SHIP_LABEL,DIRECT_SHIP}from"../../constants";import{itemRow,itemColumn,itemRowDisabled}from"./FulfillmentSelectorItem.style";import{useFulfillmentSelectorState}from"./FulfillmentSelector.hooks";import{FulfillmentSelectorImpossibleError}from"./FulfillmentSelectorImpossibleError";/**
|
|
2
|
-
* Renders the direct ship item label.
|
|
3
|
-
* @param {Object} props The component props.
|
|
4
|
-
* @returns {JSX}
|
|
5
|
-
*/export function FulfillmentSelectorDirectShip(){var _useFulfillmentSelect=useFulfillmentSelectorState(),productId=_useFulfillmentSelect.productId,selection=_useFulfillmentSelect.selection,isOrderable=_useFulfillmentSelect.isOrderable,isDirectShipEnabled=_useFulfillmentSelect.isDirectShipEnabled,isReady=_useFulfillmentSelect.isReady;var rowClasses=React.useMemo(function(){return classNames(itemRow,_defineProperty({},itemRowDisabled.toString(),!isReady||!isDirectShipEnabled));},[isDirectShipEnabled,isReady]);var selected=selection===DIRECT_SHIP;if(selected&&!isOrderable){return React.createElement(React.Fragment,null,React.createElement("div",null,i18n.text(DIRECT_SHIP_LABEL)),React.createElement(FulfillmentSelectorImpossibleError,null));}return React.createElement(Grid,{className:rowClasses,component:"div"},React.createElement(Grid.Item,{className:itemColumn,grow:1,shrink:0,component:"div"},i18n.text(DIRECT_SHIP_LABEL)),React.createElement(Grid.Item,{className:itemColumn,grow:1,shrink:0,component:"div"},isReady&&isDirectShipEnabled&&isOrderable&&React.createElement(Availability,{productId:productId,fulfillmentSelection:DIRECT_SHIP})));}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from'react';import{i18n}from'@shopgate/engage/core';import{container}from"./FulfillmentSelectorHeader.style";/**
|
|
2
|
-
* Renders the fulfillment selector title.
|
|
3
|
-
* @returns {JSX}
|
|
4
|
-
*/export function FulfillmentSelectorHeader(){return React.createElement("div",{role:"heading",className:container},i18n.text('locations.fulfillment.heading'));}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var variables=themeConfig.variables;export var container=css({fontWeight:500,marginBottom:variables.gap.xsmall});
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React,{useMemo,useContext}from'react';import{Availability}from'@shopgate/engage/components';import{i18n,LoadingContext,useRoute}from'@shopgate/engage/core';import{AVAILABILITY_STATE_ALERT}from'@shopgate/engage/product';import{DIRECT_SHIP,ROPIS,BOPIS}from"../../constants";import{useFulfillmentSelectorState}from"./FulfillmentSelector.hooks";import{container}from"./FulfillmentSelectorImpossibleError.style";/**
|
|
2
|
-
* Renders the "not possible" error for each item.
|
|
3
|
-
* @returns {JSX}
|
|
4
|
-
*/export function FulfillmentSelectorImpossibleError(){var _useFulfillmentSelect=useFulfillmentSelectorState(),selection=_useFulfillmentSelect.selection,selectedLocation=_useFulfillmentSelect.selectedLocation;var _useRoute=useRoute(),pathname=_useRoute.pathname;var _useContext=useContext(LoadingContext),isLoading=_useContext.isLoading;var isDirectShip=useMemo(function(){return selection===DIRECT_SHIP;},[selection]);var isInStorePickup=useMemo(function(){return[ROPIS,BOPIS].includes(selection);},[selection]);if(!isDirectShip&&!isInStorePickup||isLoading(pathname)){return null;}var label=i18n.text('locations.fulfillment.error.reserve');if(isDirectShip){label=i18n.text('locations.fulfillment.error.direct_ship');}if(!isDirectShip&&!(selectedLocation===null||selectedLocation===void 0?void 0:selectedLocation.code)){label=i18n.text('locations.fulfillment.error.not_ready');}return React.createElement(Availability,{className:container,showWhenAvailable:true,text:label,state:AVAILABILITY_STATE_ALERT});}
|
package/locations/components/FulfillmentSelector/FulfillmentSelectorImpossibleError.style.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{css}from'glamor';export var container=css({fontSize:'0.625rem'}).toString();
|
|
@@ -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 classNames from'classnames';import CheckedIcon from'@shopgate/pwa-ui-shared/icons/RadioCheckedIcon';import UncheckedIcon from'@shopgate/pwa-ui-shared/icons/RadioUncheckedIcon';import{radioContainer,disabled as radioContainerDisabled,activeIcon,activeIconDisabled,inactiveIcon,inactiveIconDisabled,radio,content}from"./FulfillmentSelectorItem.style";import{useFulfillmentSelectorState}from"./FulfillmentSelector.hooks";/**
|
|
2
|
-
* Renders a fulfillment selector radio item.
|
|
3
|
-
* @param {Object} props The component props.
|
|
4
|
-
* @returns {JSX}
|
|
5
|
-
*/function FulfillmentSelectorItemUnwrapped(props){var name=props.name,children=props.children,onChange=props.onChange,disabled=props.disabled;var _useFulfillmentSelect=useFulfillmentSelectorState(),selection=_useFulfillmentSelect.selection;var checked=selection===name;/**
|
|
6
|
-
* Handle the change to the radio item.
|
|
7
|
-
* @param {Object} event The change event.
|
|
8
|
-
*/function handleChange(event){event.preventDefault();if(disabled){return;}onChange(name);}var containerClasses=classNames(radioContainer.toString(),_defineProperty({},radioContainerDisabled.toString(),disabled));return React.createElement("label",{htmlFor:name,className:containerClasses,onClick:handleChange,role:"radio","aria-checked":checked,tabIndex:"0"},checked?React.createElement(CheckedIcon,{className:disabled?activeIconDisabled:activeIcon}):React.createElement(UncheckedIcon,{className:disabled?inactiveIconDisabled:inactiveIcon}),React.createElement("input",{type:"radio",checked:checked,name:name,className:radio,readOnly:true}),React.createElement("div",{className:content},children));}FulfillmentSelectorItemUnwrapped.defaultProps={disabled:false};export var FulfillmentSelectorItem=React.memo(FulfillmentSelectorItemUnwrapped);
|
|
@@ -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 radioContainer=css({display:'flex',flexFlow:'row nowrap',padding:"".concat(variables.gap.xsmall,"px 0")});export var disabled=css({cursor:'not-allowed'});var icon={width:24,height:24,flexShrink:0,marginTop:'-1px',marginRight:variables.gap.small,color:'var(--color-text-medium-emphasis)'};export var inactiveIcon=css(icon).toString();export var inactiveIconDisabled=css(icon,{opacity:0.3}).toString();export var activeIcon=css(icon,{color:"var(--color-primary, ".concat(colors.primary,")")}).toString();export var activeIconDisabled=css(icon,{color:"var(--color-primary, ".concat(colors.primary,")"),opacity:0.3}).toString();export var radio=css({display:'none'});export var content=css({flexGrow:1,color:'var(--color-text-high-emphasis)'});export var itemRow=css({alignContent:'stretch',alignItems:'baseline'}).toString();export var itemRowDisabled=css({opacity:0.3});export var itemSpacer=css({marginLeft:16});export var itemColumn=css({display:'block',width:'50%','&:first-of-type':{paddingRight:variables.gap.small},'&:last-of-type':{textAlign:'right'}}).toString();
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React,{useCallback,useMemo,Fragment}from'react';import classNames from'classnames';import intersection from'lodash/intersection';import{Grid,ResponsiveContainer,SurroundPortals}from'@shopgate/engage/components';import{ROPIS,BOPIS,DIRECT_SHIP}from"../../constants";import{i18n}from"../../../core";import{isProductAvailable}from"../../helpers";import{ChangeLocationButton}from"../ChangeLocationButton";import{StockInfo}from"../StockInfo";import{FulfillmentSelectorImpossibleError}from"./FulfillmentSelectorImpossibleError";import{useFulfillmentSelectorState}from"./FulfillmentSelector.hooks";import{container,unavailable,locationName}from"./FulfillmentSelectorLocation.style";import{itemRow,itemColumn,itemSpacer}from"./FulfillmentSelectorItem.style";import{PRODUCT_FULFILLMENT_SELECTOR_LOCATION}from"../../constants/Portals";import{FulfillmentSelectorLocationMethodNotAvailable}from"./FulfillmentSelectorLocationMethodNotAvailable";import FulfillmentSelectorAlternativeLocation from"./FulfillmentSelectorAlternativeLocation";/**
|
|
2
|
-
* The FulfillmentSelectorLocation component
|
|
3
|
-
* @returns {JSX}
|
|
4
|
-
*/export function FulfillmentSelectorLocation(){var _useFulfillmentSelect=useFulfillmentSelectorState(),selection=_useFulfillmentSelect.selection,preferredLocation=_useFulfillmentSelect.preferredLocation,selectedLocation=_useFulfillmentSelect.selectedLocation,inventory=_useFulfillmentSelect.inventory,handleChange=_useFulfillmentSelect.handleChange,isReady=_useFulfillmentSelect.isReady,isROPISEnabled=_useFulfillmentSelect.isROPISEnabled,isBOPISEnabled=_useFulfillmentSelect.isBOPISEnabled,userFulfillmentMethod=_useFulfillmentSelect.userFulfillmentMethod,productFulfillmentMethods=_useFulfillmentSelect.productFulfillmentMethods,shopFulfillmentMethods=_useFulfillmentSelect.shopFulfillmentMethods,locationFulfillmentMethods=_useFulfillmentSelect.locationFulfillmentMethods,useLocationFulfillmentMethods=_useFulfillmentSelect.useLocationFulfillmentMethods,productId=_useFulfillmentSelect.productId;var usedLocation=selectedLocation||preferredLocation;var selected=[ROPIS,BOPIS].includes(selection);var isOrderable=isProductAvailable(usedLocation||{},inventory||{});var handleChangeLocation=useCallback(function(){if(selected){handleChange(userFulfillmentMethod,true);}},[handleChange,selected,userFulfillmentMethod]);var locationSupportsFulfillmentMethod=useMemo(function(){if(!useLocationFulfillmentMethods||!selected){return true;}return locationFulfillmentMethods.includes(userFulfillmentMethod);},[locationFulfillmentMethods,selected,useLocationFulfillmentMethods,userFulfillmentMethod]);var selectionAvailableForProduct=useMemo(function(){return intersection(shopFulfillmentMethods||[],productFulfillmentMethods||[]).filter(function(entry){return entry!==DIRECT_SHIP;}).includes(selection);},[shopFulfillmentMethods,productFulfillmentMethods,selection]);if(!isReady||preferredLocation&&!inventory){return null;}var isRopeMethodEnabled=isROPISEnabled||isBOPISEnabled||selectionAvailableForProduct;return React.createElement(Fragment,null,React.createElement(SurroundPortals,{portalName:PRODUCT_FULFILLMENT_SELECTOR_LOCATION,portalProps:{productId:productId,location:usedLocation,inventory:inventory}},isRopeMethodEnabled&&isOrderable&&usedLocation&&React.createElement(Grid,{className:classNames(itemRow,container),component:"div"},React.createElement(Grid,{component:"div"},React.createElement(ResponsiveContainer,{appAlways:true,breakpoint:"xs"},React.createElement(Grid.Item,{className:itemColumn,grow:1,shrink:0,component:"div"},React.createElement("div",{className:locationName},usedLocation.name)),React.createElement(Grid.Item,{className:itemColumn,grow:1,shrink:0,component:"div"},React.createElement(StockInfo,{productId:productId,location:usedLocation}))),React.createElement(ResponsiveContainer,{webOnly:true,breakpoint:">xs"},React.createElement("div",null,React.createElement("div",{className:locationName},usedLocation.name)),React.createElement("div",{className:itemSpacer},React.createElement(StockInfo,{productId:productId,location:usedLocation})))),selectionAvailableForProduct&&!locationSupportsFulfillmentMethod?React.createElement(FulfillmentSelectorLocationMethodNotAvailable,{method:userFulfillmentMethod}):null,React.createElement(ChangeLocationButton,{onClick:handleChangeLocation,disabled:!selected})),isRopeMethodEnabled&&selected&&!isOrderable&&React.createElement("div",{className:container},React.createElement("div",{className:locationName},(usedLocation===null||usedLocation===void 0?void 0:usedLocation.name)||''),React.createElement(FulfillmentSelectorImpossibleError,null),React.createElement(ChangeLocationButton,{onClick:handleChangeLocation})),false&&!isRopeMethodEnabled?React.createElement("div",{className:classNames(unavailable,container)},i18n.text('locations.no_available')):null),React.createElement(FulfillmentSelectorAlternativeLocation,{show:!!isRopeMethodEnabled&&!!usedLocation&&!!inventory&&!isOrderable,productId:productId}));}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{css}from'glamor';import{themeVariables,themeColors}from'@shopgate/pwa-common/helpers/config';export var container=css({fontSize:'0.75rem',padding:"0 ".concat(themeVariables.gap.big,"px ").concat(themeVariables.gap.small,"px ").concat(themeVariables.gap.big*3,"px"),marginTop:"-".concat(themeVariables.gap.small,"px"),flexDirection:'column'}).toString();export var alternativeLocation=css({fontSize:'0.825rem',padding:"0 ".concat(themeVariables.gap.big,"px ").concat(themeVariables.gap.small,"px ").concat(themeVariables.gap.big*3,"px")}).toString();export var unavailable=css({color:themeColors.dark,fontSize:'0.625rem',textTransform:'uppercase',letterSpacing:'0.05em',opacity:0.5}).toString();export var locationName=css({color:'var(--color-text-medium-emphasis)'});
|
package/locations/components/FulfillmentSelector/FulfillmentSelectorLocationMethodNotAvailable.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import React,{useMemo}from'react';import PropTypes from'prop-types';import{css}from'glamor';import{Availability}from'@shopgate/engage/components';import{i18n}from'@shopgate/engage/core';import{AVAILABILITY_STATE_ALERT}from'@shopgate/engage/product';import{ROPIS,BOPIS}from"../../constants";export var container=css({fontSize:'0.625rem'}).toString();/**
|
|
2
|
-
* @returns {JSX}
|
|
3
|
-
*/export function FulfillmentSelectorLocationMethodNotAvailable(_ref){var method=_ref.method;var label=useMemo(function(){if(method===ROPIS){return i18n.text('locations.fulfillment.error.ropis');}if(method===BOPIS){return i18n.text('locations.fulfillment.error.bopis');}return null;},[method]);if(!label){return null;}return React.createElement(Availability,{className:container,showWhenAvailable:true,text:label,state:AVAILABILITY_STATE_ALERT});}
|
|
@@ -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 from'react';import classNames from'classnames';import{i18n}from"../../../core";import{IN_STORE_PICKUP_ROPIS_LABEL}from"../../constants";import{itemRowDisabled}from"./FulfillmentSelectorItem.style";import{useFulfillmentSelectorState}from"./FulfillmentSelector.hooks";/**
|
|
2
|
-
* Renders the FulfillmentSelectorROPIS components.
|
|
3
|
-
* @returns {JSX}
|
|
4
|
-
*/export function FulfillmentSelectorROPIS(){var _useFulfillmentSelect=useFulfillmentSelectorState(),isROPISEnabled=_useFulfillmentSelect.isROPISEnabled,isReady=_useFulfillmentSelect.isReady;var classes=classNames(_defineProperty({},itemRowDisabled.toString(),!isReady||!isROPISEnabled));return React.createElement("div",{className:classes},i18n.text(IN_STORE_PICKUP_ROPIS_LABEL));}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{default as FulfillmentSelector}from"./FulfillmentSelector";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
var _excluded=["allowClose"];function _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded);var key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++){key=sourceSymbolKeys[i];if(excluded.indexOf(key)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key];}}return target;}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={};var sourceKeys=Object.keys(source);var key,i;for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;target[key]=source[key];}return target;}import*as React from'react';import PropTypes from'prop-types';import{FulfillmentProvider,openSheet}from"../../providers";import{FulfillmentSheetContent}from"./FulfillmentSheetContent";/**
|
|
2
|
-
* Renders the fulfillment sheet.
|
|
3
|
-
* @param {Object} props The component props.
|
|
4
|
-
* @param {boolean} props.allowClose Whether the sheet can be closed via a button
|
|
5
|
-
* @returns {JSX.Element}
|
|
6
|
-
*/export var FulfillmentSheet=function FulfillmentSheet(_ref){var _ref$allowClose=_ref.allowClose,allowClose=_ref$allowClose===void 0?true:_ref$allowClose,props=_objectWithoutProperties(_ref,_excluded);return React.createElement(FulfillmentProvider,props,React.createElement(FulfillmentSheetContent,{allowClose:allowClose}));};FulfillmentSheet.defaultProps={allowClose:true};FulfillmentSheet.open=openSheet;
|
|
@@ -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{themeConfig}from'@shopgate/pwa-common/helpers/config';import{responsiveMediaQuery}from'@shopgate/engage/styles';var variables=themeConfig.variables;export var sheet=css(_defineProperty({maxHeight:"calc(var(--vh-100, 100vh) - ".concat(variables.navigator.height,"px)")},responsiveMediaQuery('>sm',{webOnly:true}),{maxHeight:"calc(var(--vh-80, 80vh) - ".concat(variables.navigator.height,"px)")}));
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import*as React from'react';import PropTypes from'prop-types';import{FulfillmentContext}from"../../locations.context";import{STAGE_SELECT_STORE,STAGE_RESERVE_FORM,STAGE_RESPONSE_SUCCESS,STAGE_RESPONSE_ERROR,STAGE_FULFILLMENT_METHOD}from"../../constants";import SheetDrawer from"../../../components/SheetDrawer";import{StoreList}from"../StoreList";import{ReserveForm}from"../ReserveForm";import{ReservationSuccess,ReservationError}from"../ReservationResponses";import{FulfillmentPath}from"../FulfillmentPath";import{sheet}from"./FulfillmentSheet.style";/**
|
|
2
|
-
* Renders the content of the fulfillment sheet.
|
|
3
|
-
* @param {Object} props The component props.
|
|
4
|
-
* @param {boolean} props.allowClose Whether the sheet can be closed via a button
|
|
5
|
-
* @return {JSX.Element}
|
|
6
|
-
*/export var FulfillmentSheetContent=function FulfillmentSheetContent(_ref){var _ref$allowClose=_ref.allowClose,allowClose=_ref$allowClose===void 0?true:_ref$allowClose;var _React$useContext=React.useContext(FulfillmentContext),isStage=_React$useContext.isStage,title=_React$useContext.title,isOpen=_React$useContext.isOpen,handleClose=_React$useContext.handleClose,isLoading=_React$useContext.isLoading;return React.createElement(SheetDrawer,{isOpen:isOpen,title:title,onDidClose:handleClose,allowClose:allowClose,isLoading:isLoading},React.createElement("div",{className:sheet},isStage(STAGE_SELECT_STORE)&&React.createElement(StoreList,null),isStage(STAGE_RESERVE_FORM)&&React.createElement(ReserveForm,null),isStage(STAGE_RESPONSE_SUCCESS)&&React.createElement(ReservationSuccess,null),isStage(STAGE_RESPONSE_ERROR)&&React.createElement(ReservationError,null),isStage(STAGE_FULFILLMENT_METHOD)&&React.createElement(FulfillmentPath,null)));};FulfillmentSheetContent.defaultProps={allowClose:true};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{FulfillmentSheet}from"./FulfillmentSheet";
|
|
@@ -1,28 +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;}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,useState,useMemo,useEffect,useCallback}from'react';import classnames from'classnames';import moment from'moment';import PropTypes from'prop-types';import{connect}from'react-redux';import{css}from'glamor';import groupBy from'lodash/groupBy';import{SheetDrawer,Button}from'@shopgate/engage/components';import{i18n}from'@shopgate/engage/core';import{getActiveFulfillmentSlot}from'@shopgate/engage/cart/cart.selectors';import{makeGetFulfillmentSlotsForLocation,getPreferredLocation}from"../../selectors";import fetchFulfillmentSlots from"../../actions/fetchFulfillmentSlots";/**
|
|
2
|
-
* Map state to props.
|
|
3
|
-
* @returns {Function}
|
|
4
|
-
*/var makeMapStateToProps=function makeMapStateToProps(){var getFulfillmentSlotsForLocation=makeGetFulfillmentSlotsForLocation(function(state){var _getPreferredLocation;return((_getPreferredLocation=getPreferredLocation(state))===null||_getPreferredLocation===void 0?void 0:_getPreferredLocation.code)||null;});return function(state){var _getPreferredLocation2;return{fulfillmentSlot:getActiveFulfillmentSlot(state),locationCode:(_getPreferredLocation2=getPreferredLocation(state))===null||_getPreferredLocation2===void 0?void 0:_getPreferredLocation2.code,fulfillmentSlots:getFulfillmentSlotsForLocation(state)};};};/**
|
|
5
|
-
* Map dispatch to props.
|
|
6
|
-
* @param {Function} dispatch Dispatch
|
|
7
|
-
* @returns {Object}
|
|
8
|
-
*/var mapDispatchToProps=function mapDispatchToProps(dispatch){return{fetch:function fetch(locationCode){return dispatch(fetchFulfillmentSlots(locationCode));}};};var styles={root:css({position:'relative',display:'flex',flexDirection:'column',padding:16,paddingBottom:0}).toString(),title:css({fontSize:24,fontWeight:'500',marginBottom:8}).toString(),subtitle:css({fontSize:20,fontWeight:'500',marginBottom:8,marginTop:16}).toString(),row:css({display:'flex',flexDirection:'row',flexWrap:'wrap',marginLeft:-8,marginRight:-8}).toString(),button:css({position:'relative',cursor:'pointer',display:'flex',margin:8,justifyContent:'center',alignItems:'center',border:'1px solid var(--color-secondary)',borderRadius:4,background:'#fff',transition:'background, color 500ms',outline:'none'}).toString(),buttonActive:css({color:'#fff',background:'var(--color-secondary)'}).toString(),buttonDate:css({width:124,height:70,lineHeight:1.3}).toString(),buttonLabel:css({fontSize:20,textAlign:'center'}).toString(),buttonLabelSlot:css({padding:2,fontSize:16,textAlign:'center'}).toString(),buttonDisabled:css({cursor:'blocked',pointerEvents:'none',border:'1px solid #444'}).toString(),buttonStrikethrough:css({position:'absolute',background:'#444',left:0,right:0,height:2,transform:'rotate(-5deg)'}).toString(),buttonScheduleContainer:css({position:'sticky',bottom:'calc(-1 * env(safe-area-inset-bottom))',margin:-16,marginTop:8,background:'#fff',padding:16,paddingBottom:24}).toString(),buttonSchedule:css({'&&':{width:'100%'}}).toString()};/**
|
|
9
|
-
* Get Month day time.
|
|
10
|
-
* @param {string} time Time
|
|
11
|
-
* @return {string}
|
|
12
|
-
*/var getMonthDay=function getMonthDay(time){var momentTime=moment(time,'YYYY-MM-DD');return momentTime.format('L').replace(new RegExp("[^.]?".concat(momentTime.format('YYYY'),".?")),'');};/**
|
|
13
|
-
* Get Range for a time.
|
|
14
|
-
* @param {string} from From
|
|
15
|
-
* @param {string} to To
|
|
16
|
-
* @return {string}
|
|
17
|
-
*/var getRange=function getRange(from,to){var _from$split$map=from.split(':').map(function(x){return parseInt(x,10);}),_from$split$map2=_slicedToArray(_from$split$map,2),fromHours=_from$split$map2[0],fromMinutes=_from$split$map2[1];var fromMoment=moment().set({hours:fromHours,minutes:fromMinutes});var _to$split$map=to.split(':').map(function(x){return parseInt(x,10);}),_to$split$map2=_slicedToArray(_to$split$map,2),toHours=_to$split$map2[0],toMinutes=_to$split$map2[1];var toMoment=moment().set({hours:toHours,minutes:toMinutes});return"".concat(fromMoment.format('LT')," - ").concat(toMoment.format('LT'));};/** Ranges for different times */var MORNING_RANGE=[0,11];var AFTERNOON_RANGE=[12,17];var EVENING_RANGE=[18,23];var RANGES={morning:MORNING_RANGE,afternoon:AFTERNOON_RANGE,evening:EVENING_RANGE};/**
|
|
18
|
-
* @param {Object} props Props.
|
|
19
|
-
* @returns {JSX}
|
|
20
|
-
*/var FulfillmentSlotSheet=function FulfillmentSlotSheet(_ref){var isOpen=_ref.isOpen,onClose=_ref.onClose,onChange=_ref.onChange,fulfillmentSlots=_ref.fulfillmentSlots,locationCode=_ref.locationCode,fetch=_ref.fetch,allowClose=_ref.allowClose,fulfillmentSlot=_ref.fulfillmentSlot;// Group by date.
|
|
21
|
-
var groupedSlots=useMemo(function(){return groupBy(fulfillmentSlots,'date');},[fulfillmentSlots]);// Load slots when opening.
|
|
22
|
-
useEffect(function(){if(!isOpen){return;}fetch({locationCode:locationCode});},[fetch,isOpen,locationCode]);// Handle active selected date.
|
|
23
|
-
var _useState=useState(null),_useState2=_slicedToArray(_useState,2),selectedDate=_useState2[0],setSelectedDate=_useState2[1];useEffect(function(){if(!Object.keys(groupedSlots).length){return;}// Don't change if selected date is still available
|
|
24
|
-
if(groupedSlots[selectedDate]){return;}setSelectedDate(Object.keys(groupedSlots)[0]);/* eslint-disable react-hooks/exhaustive-deps */},[groupedSlots]);/* eslint-enable react-hooks/exhaustive-deps */ // Handle groups of time slots
|
|
25
|
-
var _useState3=useState(null),_useState4=_slicedToArray(_useState3,2),selectedSlot=_useState4[0],setSelectedSlot=_useState4[1];var _useState5=useState(null),_useState6=_slicedToArray(_useState5,2),slotGroups=_useState6[0],setSlotGroups=_useState6[1];useEffect(function(){if(!groupedSlots||!groupedSlots[selectedDate]){setSlotGroups(null);return;}var slotGroupsNew=Object.keys(RANGES).map(function(rangeName){var _RANGES$rangeName=_slicedToArray(RANGES[rangeName],2),start=_RANGES$rangeName[0],end=_RANGES$rangeName[1];return{name:rangeName,slots:groupedSlots[selectedDate].filter(function(slot){var _slot$from$split$map=slot.from.split(':').map(function(x){return parseInt(x,10);}),_slot$from$split$map2=_slicedToArray(_slot$from$split$map,1),startHour=_slot$from$split$map2[0];return startHour>=start&&startHour<=end;})};}).filter(function(group){return group.slots.length>0;});setSlotGroups(slotGroupsNew);},[selectedDate,groupedSlots]);useEffect(function(){var _groupedSlots$selecte,_groupedSlots$selecte2;if(!selectedDate||!groupedSlots||!groupedSlots[selectedDate]){setSelectedSlot(null);return;}// Only switch if not found.
|
|
26
|
-
if(groupedSlots[selectedDate].find(function(slot){return slot.id===selectedSlot;})){return;}// Select first active slot.
|
|
27
|
-
setSelectedSlot(((_groupedSlots$selecte=groupedSlots[selectedDate])===null||_groupedSlots$selecte===void 0?void 0:(_groupedSlots$selecte2=_groupedSlots$selecte.find(function(slot){return slot.status==='active';}))===null||_groupedSlots$selecte2===void 0?void 0:_groupedSlots$selecte2.id)||null);/* eslint-disable react-hooks/exhaustive-deps */},[selectedDate]);/* eslint-enable react-hooks/exhaustive-deps */ // When opening the selected values are set to active selected content.
|
|
28
|
-
useEffect(function(){if(!isOpen||!fulfillmentSlot||!fulfillmentSlot.date){return;}setSelectedDate(fulfillmentSlot.date);setSelectedSlot(fulfillmentSlot.id);},[fulfillmentSlot,isOpen]);var handleChange=useCallback(function(){onChange(fulfillmentSlots.find(function(slot){return slot.id===selectedSlot;}));},[fulfillmentSlots,onChange,selectedSlot]);return React.createElement(SheetDrawer,{isOpen:isOpen,title:i18n.text('locations.your_current_timeslot.dialog.title'),onDidClose:onClose,allowClose:allowClose},React.createElement("div",{className:styles.root},React.createElement("span",{className:styles.title},i18n.text('locations.your_current_timeslot.dialog.date')),React.createElement("div",{className:styles.row},Object.keys(groupedSlots).map(function(date){return React.createElement("button",{type:"button",key:date,className:classnames(styles.button,styles.buttonDate,_defineProperty({},styles.buttonActive,selectedDate===date)),onClick:function onClick(){return setSelectedDate(date);}},React.createElement("span",{className:styles.buttonLabel},moment(date,'YYYY-MM-DD').format('dddd'),' ',getMonthDay(date)));})),slotGroups&&slotGroups.map(function(group){return React.createElement(Fragment,{key:group.name},React.createElement("span",{className:styles.subtitle},i18n.text("locations.your_current_timeslot.dialog.".concat(group.name))),React.createElement("div",{className:styles.row},group.slots.map(function(slot){return React.createElement("button",{type:"button",key:"".concat(slot.from,"-").concat(slot.to),onClick:function onClick(){return setSelectedSlot(slot.id);},className:classnames(styles.button,_defineProperty(_defineProperty({},styles.buttonDisabled,slot.status!=='active'),styles.buttonActive,slot.id===selectedSlot))},React.createElement("span",{className:styles.buttonLabelSlot},getRange(slot.from,slot.to)),slot.status!=='active'?React.createElement("div",{className:styles.buttonStrikethrough}):null);})));}),React.createElement("div",{className:styles.buttonScheduleContainer},React.createElement(Button,{className:styles.buttonSchedule,type:"secondary",onClick:handleChange,disabled:!selectedDate||!selectedSlot},i18n.text('locations.your_current_timeslot.dialog.schedule')))));};FulfillmentSlotSheet.defaultProps={isOpen:false,locationCode:null,fulfillmentSlots:[],fulfillmentSlot:null,allowClose:true};export default connect(makeMapStateToProps,mapDispatchToProps)(FulfillmentSlotSheet);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{connect}from'react-redux';import{getFulfillmentSchedulingEnabled}from'@shopgate/engage/core';import setFulfillmentSlot from'@shopgate/pwa-common-commerce/cart/action-creators/setFulfillmentSlot';/**
|
|
2
|
-
* Creates the mapStateToProps connector function.
|
|
3
|
-
* @returns {Function}
|
|
4
|
-
*/var makeMapStateToProps=function makeMapStateToProps(){return function(state){return{isFulfillmentScheduling:getFulfillmentSchedulingEnabled(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={setFulfillmentSlot:setFulfillmentSlot};export default connect(makeMapStateToProps,mapDispatchToProps);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createContext}from'react';export default createContext(null);
|
|
@@ -1,9 +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,{useRef,useState,useCallback,useEffect}from'react';import PropTypes from'prop-types';import{UIEvents}from'@shopgate/pwa-core';import Dialog from"./FulfillmentSlotDialog";import connect from"./FulfillmentSlotProvider.connector";var EVENT_FORCE_OPEN='FULFILLMENT_SLOT_FORCE_OPEN';/**
|
|
2
|
-
* Force opens the fulfillment slot dialog and returns a promise.
|
|
3
|
-
* @returns {Promise}
|
|
4
|
-
*/export var forceOpenFulfillmentSlotDialog=function forceOpenFulfillmentSlotDialog(){return new Promise(function(resolve){UIEvents.emit(EVENT_FORCE_OPEN,{resolve:resolve});});};/**
|
|
5
|
-
* @param {Object} props Props.
|
|
6
|
-
* @returns {JSX}
|
|
7
|
-
*/var FulfillmentSlotProvider=function FulfillmentSlotProvider(_ref){var setFulfillmentSlot=_ref.setFulfillmentSlot,isFulfillmentScheduling=_ref.isFulfillmentScheduling;var promiseRef=useRef(null);// Handle sheet.
|
|
8
|
-
var _useState=useState(false),_useState2=_slicedToArray(_useState,2),isOpen=_useState2[0],setOpen=_useState2[1];var _useState3=useState(true),_useState4=_slicedToArray(_useState3,2),allowClose=_useState4[0],setAllowClose=_useState4[1];var handleClose=useCallback(function(){setOpen(false);setAllowClose(true);},[]);useEffect(function(){/** */var callback=function callback(_ref2){var resolve=_ref2.resolve;promiseRef.current={resolve:resolve};setAllowClose(true);setOpen(true);};UIEvents.addListener(EVENT_FORCE_OPEN,callback);return function(){return UIEvents.removeListener(EVENT_FORCE_OPEN,callback);};});var handleUpdate=useCallback(function(slot){var _promiseRef$current;setFulfillmentSlot(slot);if((_promiseRef$current=promiseRef.current)===null||_promiseRef$current===void 0?void 0:_promiseRef$current.resolve){setTimeout(function(){var _promiseRef$current2;// eslint-disable-next-line no-unused-expressions
|
|
9
|
-
(_promiseRef$current2=promiseRef.current)===null||_promiseRef$current2===void 0?void 0:_promiseRef$current2.resolve(slot);promiseRef.current=null;},10);}handleClose();},[handleClose,setFulfillmentSlot]);if(!isFulfillmentScheduling){return null;}return React.createElement(Dialog,{allowClose:allowClose,isOpen:isOpen,onClose:handleClose,onChange:handleUpdate});};FulfillmentSlotProvider.defaultProps={isFulfillmentScheduling:false};export default connect(FulfillmentSlotProvider);
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{connect}from'react-redux';import{getFulfillmentSchedulingEnabled}from'@shopgate/engage/core';import{getActiveFulfillmentSlot,checkActiveFulfillmentSlotBelongsToPreferredLocation}from'@shopgate/engage/cart/cart.selectors';import{getIsCartStateConfigurable}from"../../selectors";/**
|
|
2
|
-
* Creates the mapStateToProps connector function.
|
|
3
|
-
* @returns {Function}
|
|
4
|
-
*/var makeMapStateToProps=function makeMapStateToProps(){return function(state){return{isFulfillmentScheduling:getFulfillmentSchedulingEnabled(state),fulfillmentSlot:getActiveFulfillmentSlot(state),isFulfillmentSlotValid:checkActiveFulfillmentSlotBelongsToPreferredLocation(state),editable:getIsCartStateConfigurable(state)};};};export default connect(makeMapStateToProps);
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React,{Fragment,useCallback}from'react';import PropTypes from'prop-types';import{css}from'glamor';import FulfillmentSlotSwitcherDefault from"./FulfillmentSlotSwitcherDefault";import FulfillmentSlotSwitcherBar from"./FulfillmentSlotSwitcherBar";import connect from"./FulfillmentSlotSwitcher.connector";import{forceOpenFulfillmentSlotDialog}from"./FulfillmentSlotProvider";var styles={card:css({boxShadow:'0px 4px 2px rgba(0, 0, 0, 0.05)',marginBottom:16,' > div > div':{borderBottom:0},' > div':{borderRadius:5,margin:-1,background:'#fff',border:'1px solid #eaeaea'}}).toString()};/**
|
|
2
|
-
* @returns {JSX}
|
|
3
|
-
*/var FulfillmentSlotSwitcher=function FulfillmentSlotSwitcher(_ref){var fulfillmentSlot=_ref.fulfillmentSlot,renderBar=_ref.renderBar,isFulfillmentScheduling=_ref.isFulfillmentScheduling,isFulfillmentSlotValid=_ref.isFulfillmentSlotValid,standalone=_ref.standalone,card=_ref.card,editable=_ref.editable;// Handle sheet.
|
|
4
|
-
var handleOpen=useCallback(function(){forceOpenFulfillmentSlotDialog();},[]);if(!isFulfillmentScheduling){return null;}return React.createElement(Fragment,null,renderBar?React.createElement("div",{className:card?styles.card:undefined},React.createElement(FulfillmentSlotSwitcherBar,{fulfillmentSlot:isFulfillmentSlotValid?fulfillmentSlot:null,handleChange:handleOpen,standalone:standalone,editable:editable})):React.createElement(FulfillmentSlotSwitcherDefault,{fulfillmentSlot:isFulfillmentSlotValid?fulfillmentSlot:null,handleChange:handleOpen,standalone:standalone,editable:editable}));};FulfillmentSlotSwitcher.defaultProps={isFulfillmentScheduling:false,fulfillmentSlot:null,renderBar:false,editable:true,card:false,standalone:false,isFulfillmentSlotValid:true};export default connect(FulfillmentSlotSwitcher);
|
|
@@ -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,{useMemo}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"./FulfillmentSlotSwitcherBar.style";import{getTimeSlotDisplayText}from"./time";/**
|
|
2
|
-
* @returns {JSX}
|
|
3
|
-
*/var FulfillmentSlotSwitcherBar=function FulfillmentSlotSwitcherBar(_ref){var fulfillmentSlot=_ref.fulfillmentSlot,handleChange=_ref.handleChange,standalone=_ref.standalone,editable=_ref.editable;var displayTime=useMemo(function(){return getTimeSlotDisplayText(fulfillmentSlot);},[fulfillmentSlot]);return React.createElement("div",{className:wrapper},React.createElement("div",{className:classNames(inner,_defineProperty({},innerStandalone,standalone))},React.createElement("span",{className:heading},i18n.text('locations.your_current_timeslot.heading')),React.createElement("span",{className:name},displayTime),editable&&React.createElement(RippleButton,{onClick:handleChange,type:"secondary",className:button,flat:true},React.createElement(I18n.Text,{string:"locations.your_current_location.change"}))));};FulfillmentSlotSwitcherBar.defaultProps={fulfillmentSlot:null,standalone:false,editable:true};export default FulfillmentSlotSwitcherBar;
|
|
@@ -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,':after':{content:':'}}).toString();export var name=css({fontWeight:500}).toString();export var button=css({marginLeft:'auto',letterSpacing:'0.05em',padding:"".concat(variables.gap.xsmall*0.75,"px 0 !important"),' *':{fontSize:'0.875rem',textTransform:'initial',padding:'0 !important',color:'var(--color-text-high-emphasis)',fontWeight:500}}).toString();
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import React,{useMemo}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"./FulfillmentSlotSwitcherDefault.style";import{getTimeSlotDisplayText}from"./time";/**
|
|
2
|
-
* @returns {JSX}
|
|
3
|
-
*/var FulfillmentSlotSwitcherDefault=function FulfillmentSlotSwitcherDefault(_ref){var handleChange=_ref.handleChange,fulfillmentSlot=_ref.fulfillmentSlot,editable=_ref.editable;var displayTime=useMemo(function(){return getTimeSlotDisplayText(fulfillmentSlot);},[fulfillmentSlot]);return React.createElement("div",{className:wrapper},React.createElement("div",{className:heading},i18n.text('locations.your_current_timeslot.heading')),React.createElement("div",{className:name},React.createElement("span",null,displayTime),React.createElement(RippleButton,{onClick:handleChange,type:"secondary",className:button,disabled:!editable,flat:true},React.createElement(I18n.Text,{string:"locations.your_current_location.change"}))));};FulfillmentSlotSwitcherDefault.defaultProps={fulfillmentSlot:null,editable:true};export default FulfillmentSlotSwitcherDefault;
|
package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherDefault.style.js
DELETED
|
@@ -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 FulfillmentSlotSwitcher}from"./FulfillmentSlotSwitcher";export{forceOpenFulfillmentSlotDialog,default as FulfillmentSlotProvider}from"./FulfillmentSlotProvider";
|
|
@@ -1,5 +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 moment from'moment';import{i18n}from'@shopgate/engage/core';/**
|
|
2
|
-
* Creates a display string for the given slot.
|
|
3
|
-
* @param {Object} fulfillmentSlot Slot
|
|
4
|
-
* @returns {Object}
|
|
5
|
-
*/export var getTimeSlotDisplayText=function getTimeSlotDisplayText(fulfillmentSlot){if(!fulfillmentSlot||!(fulfillmentSlot===null||fulfillmentSlot===void 0?void 0:fulfillmentSlot.date)||!(fulfillmentSlot===null||fulfillmentSlot===void 0?void 0:fulfillmentSlot.from)){return i18n.text('locations.your_current_timeslot.not_set');}var momentDate=moment(fulfillmentSlot.date,'YYYY-MM-DD');var fromNow=momentDate.fromNow();var relativeString=momentDate.calendar(null,{sameDay:"[".concat(i18n.text('locations.your_current_timeslot.today'),"]"),nextDay:"[".concat(i18n.text('locations.your_current_timeslot.tomorrow'),"]"),nextWeek:'dddd',sameElse:function sameElse(){return"[".concat(fromNow,"]");}});var _fulfillmentSlot$from=fulfillmentSlot.from.split(':').map(function(x){return parseInt(x,10);}),_fulfillmentSlot$from2=_slicedToArray(_fulfillmentSlot$from,2),fromHours=_fulfillmentSlot$from2[0],fromMinutes=_fulfillmentSlot$from2[1];var from=moment().set({hours:fromHours,minutes:fromMinutes||0});var _fulfillmentSlot$to$s=fulfillmentSlot.to.split(':').map(function(x){return parseInt(x,10);}),_fulfillmentSlot$to$s2=_slicedToArray(_fulfillmentSlot$to$s,2),toHours=_fulfillmentSlot$to$s2[0],toMinutes=_fulfillmentSlot$to$s2[1];var to=moment().set({hours:toHours,minutes:toMinutes||0});return"".concat(relativeString," ").concat(from.format('LT')," - ").concat(to.format('LT'));};
|