@shopgate/engage 7.27.3-alpha.16 → 7.27.3-alpha.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,75 +0,0 @@
|
|
|
1
|
-
import{logger,isDev}from'@shopgate/engage/core/helpers';import{DATA_IGNORED}from"./constants";/**
|
|
2
|
-
* Determines if an element is visually present in the DOM.
|
|
3
|
-
* Checks for display, visibility, opacity, and transform-based hiding.
|
|
4
|
-
*
|
|
5
|
-
* @param {HTMLElement} el The element to evaluate.
|
|
6
|
-
* @returns {boolean} True if the element is visually visible; false otherwise.
|
|
7
|
-
*/export var isElementVisible=function isElementVisible(el){if(!el||!(el instanceof HTMLElement))return false;var style=window.getComputedStyle(el);if(style.display==='none'||style.visibility==='hidden'||parseFloat(style.opacity)===0)return false;var transform=style.transform;if(transform&&transform!=='none'){var match=transform.match(/translateY\((-?\d+)(px)?\)/);if(match){var translateY=parseInt(match[1],10);if(translateY>window.innerHeight)return false;}}return true;};/**
|
|
8
|
-
* Finds the widest nested element inside a given container that has a background color
|
|
9
|
-
* explicitly set via CSS (ignores transparent, inherited, or unset values), and returns
|
|
10
|
-
* that background color.
|
|
11
|
-
*
|
|
12
|
-
* @param {HTMLElement} container The parent element to search within. Must be an actual DOM node.
|
|
13
|
-
* @returns {string|null} The detected background color (e.g., "rgb(255, 0, 0)")
|
|
14
|
-
*/export var getElementBackgroundColor=function getElementBackgroundColor(container){if(!container){return null;}var widestElement=null;var maxWidth=-Infinity;/**
|
|
15
|
-
* Recursively traverses the DOM tree starting from the given node,
|
|
16
|
-
* tracking the widest element that has a background color explicitly set via CSS.
|
|
17
|
-
*
|
|
18
|
-
* @param {HTMLElement} node The DOM node to begin traversal from.
|
|
19
|
-
*/function walk(node){if(!(node instanceof HTMLElement))return;var style=window.getComputedStyle(node);var bgColor=style.backgroundColor;var isStyledColor=bgColor&&!['transparent','rgba(0, 0, 0, 0)','inherit','initial','unset'].includes(bgColor);var rect=node.getBoundingClientRect();if(isElementVisible(node)&&isStyledColor&&rect.width>maxWidth){maxWidth=rect.width;widestElement=node;}Array.from(node.children).forEach(walk);}walk(container);if(widestElement){var result=window.getComputedStyle(widestElement).backgroundColor;return result;}return null;};/**
|
|
20
|
-
* Checks if any of the provided class names reference the custom property in any loaded stylesheet.
|
|
21
|
-
*
|
|
22
|
-
* @param {string[]} classList Array of class names to check.
|
|
23
|
-
* @param {string} customProp The custom property to search for in the stylesheets.
|
|
24
|
-
* @returns {boolean} True if any class rule uses the custom property.
|
|
25
|
-
*/var classNamesUseCustomProp=function classNamesUseCustomProp(classList,customProp){var allRules=Array.from(document.styleSheets).filter(function(sheet){try{return sheet.cssRules;}catch(e){return false;// Skip cross-origin or restricted stylesheets
|
|
26
|
-
}}).flatMap(function(sheet){return Array.from(sheet.cssRules||[]);});// eslint-disable-next-line no-restricted-syntax
|
|
27
|
-
var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=allRules[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var rule=_step.value;// eslint-disable-next-line no-continue
|
|
28
|
-
if(!rule.selectorText||!rule.cssText.includes("var(".concat(customProp,")")))continue;// eslint-disable-next-line no-restricted-syntax
|
|
29
|
-
var _iteratorNormalCompletion2=true;var _didIteratorError2=false;var _iteratorError2=undefined;try{for(var _iterator2=classList[Symbol.iterator](),_step2;!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=true){var className=_step2.value;if(rule.selectorText.includes(".".concat(className))){return true;}}}catch(err){_didIteratorError2=true;_iteratorError2=err;}finally{try{if(!_iteratorNormalCompletion2&&_iterator2["return"]!=null){_iterator2["return"]();}}finally{if(_didIteratorError2){throw _iteratorError2;}}}}}catch(err){_didIteratorError=true;_iteratorError=err;}finally{try{if(!_iteratorNormalCompletion&&_iterator["return"]!=null){_iterator["return"]();}}finally{if(_didIteratorError){throw _iteratorError;}}}return false;};/**
|
|
30
|
-
* Checks if a single element uses the custom property via inline styles or class-based rules.
|
|
31
|
-
*
|
|
32
|
-
* @param {HTMLElement} el The element to check.
|
|
33
|
-
* @param {string} customProp The CSS custom property to search for.
|
|
34
|
-
* @returns {boolean} True if the element uses the custom property.
|
|
35
|
-
*/var elementUsesCustomProp=function elementUsesCustomProp(el,customProp){var _el$getAttribute;if(!(el instanceof Element))return false;var styleAttr=(_el$getAttribute=el.getAttribute)===null||_el$getAttribute===void 0?void 0:_el$getAttribute.call(el,'style');if(styleAttr&&styleAttr.includes("var(".concat(customProp,")"))){return true;}var classList=Array.from(el.classList||[]);return classList.length>0&&classNamesUseCustomProp(classList,customProp);};/**
|
|
36
|
-
* Checks if an element or any of its descendants use the custom property.
|
|
37
|
-
*
|
|
38
|
-
* @param {HTMLElement} el The root element to inspect.
|
|
39
|
-
* @param {string} customProp The CSS custom property to look for.
|
|
40
|
-
* @returns {boolean} True if the element or any descendant uses the custom property.
|
|
41
|
-
*/var elementOrDescendantsUseCustomProp=function elementOrDescendantsUseCustomProp(el,customProp){// Check if the element itself uses the custom property
|
|
42
|
-
if(elementUsesCustomProp(el,customProp))return true;var descendants=el.querySelectorAll('*');// eslint-disable-next-line no-restricted-syntax
|
|
43
|
-
var _iteratorNormalCompletion3=true;var _didIteratorError3=false;var _iteratorError3=undefined;try{for(var _iterator3=descendants[Symbol.iterator](),_step3;!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=true){var node=_step3.value;// eslint-disable-next-line no-continue
|
|
44
|
-
if(!(node instanceof Element))continue;if(elementUsesCustomProp(node,customProp))return true;}}catch(err){_didIteratorError3=true;_iteratorError3=err;}finally{try{if(!_iteratorNormalCompletion3&&_iterator3["return"]!=null){_iterator3["return"]();}}finally{if(_didIteratorError3){throw _iteratorError3;}}}return false;};/**
|
|
45
|
-
* Returns footer entries that do NOT have safe area insets applied,
|
|
46
|
-
* either on themselves or in any of their descendants.
|
|
47
|
-
*
|
|
48
|
-
* @param {HTMLElement[]} footerElements The footer elements to check.
|
|
49
|
-
* @returns {HTMLElement[]} An array of direct children that do not use safe area insets.
|
|
50
|
-
*/var getFooterEntriesWithoutSafeAreaInsets=function getFooterEntriesWithoutSafeAreaInsets(footerElements){return footerElements.filter(function(child){return!elementOrDescendantsUseCustomProp(child,'--safe-area-inset-bottom');});};/**
|
|
51
|
-
* Searches for footer elements that do not have safe area insets applied, and adds a fallback.
|
|
52
|
-
* @param {HTMLElement} footerEl The footer element whose children are to be checked.
|
|
53
|
-
*/export var handleSafeAreaInsets=function handleSafeAreaInsets(footerEl){if(!footerEl||!(footerEl instanceof HTMLElement)){return;}var directChildren=Array.from(footerEl.children);// Filter out elements that where already handled before
|
|
54
|
-
var childrenToInspect=directChildren.filter(function(child){return child.getAttribute('data-has-safe-area-inset')!=='true';}).filter(function(child){return child.getAttribute(DATA_IGNORED)!=='true';});// Detect footer elements without safe area insets
|
|
55
|
-
var childrenWithoutInsets=getFooterEntriesWithoutSafeAreaInsets(childrenToInspect);// Apply fallback and mark the elements as handled
|
|
56
|
-
childrenWithoutInsets.forEach(function(child){child.style.setProperty('padding-bottom','var(--safe-area-inset-bottom)');child.style.setProperty('background-color',getElementBackgroundColor(child));child.setAttribute('data-has-safe-area-inset','true');});if(isDev&&childrenWithoutInsets.length>0){logger.warn('Footer elements without safe area insets detected. Please use the "--safe-area-inset-bottom" CSS custom property for bottom insets.',childrenWithoutInsets);}// Mark all other elements which already had insets as handled
|
|
57
|
-
directChildren.filter(function(child){return childrenWithoutInsets.indexOf(child)===-1;}).forEach(function(child){if(!child.hasAttribute('data-has-safe-area-inset')){child.setAttribute('data-has-safe-area-inset','true');}});};var style=document.documentElement.style;/**
|
|
58
|
-
* Update the footer height custom property
|
|
59
|
-
* @param {number} height height
|
|
60
|
-
*/export var updateFooterHeight=function updateFooterHeight(height){// The TabBar is positioned with `position: fixed`, so it doesn’t contribute to the measured
|
|
61
|
-
// height of the Footer. Additionally, it’s sometimes animated in/out, which makes dynamic
|
|
62
|
-
// measurement via JavaScript more complex and error-prone.
|
|
63
|
-
//
|
|
64
|
-
// To simplify everything, we include the --tabbar-height CSS custom property to the calculation
|
|
65
|
-
// of the --footer-height value.
|
|
66
|
-
var footerHeight="max(".concat(height,"px, var(--tabbar-height, 0px))");if(style.getPropertyValue('--footer-height')!==footerHeight){style.setProperty('--footer-height',footerHeight);}// The View component wraps every app page and applies a bottom offset to centrally manage
|
|
67
|
-
// safe area insets across screens.
|
|
68
|
-
//
|
|
69
|
-
// If the measured footer height is > 0px, it means the footer is rendering content that already
|
|
70
|
-
// accounts for the safe area, so no additional offset is needed.
|
|
71
|
-
//
|
|
72
|
-
// If the measured footer height is 0px, the footer is either empty or only contains the tab bar
|
|
73
|
-
// (which is measured via the CSS variable --footer-height). In that case, we still need to apply
|
|
74
|
-
// an offset equal to the larger of the bottom safe area inset or the tab bar height.
|
|
75
|
-
var pageContentOffset=height===0?'max(var(--footer-height), var(--safe-area-inset-bottom))':'0px';if(style.getPropertyValue('--page-content-offset-bottom')!==pageContentOffset){style.setProperty('--page-content-offset-bottom',pageContentOffset);}};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import _camelCase from"lodash/camelCase";import React,{memo}from'react';import PropTypes from'prop-types';import classNames from'classnames';import Select from'@shopgate/pwa-ui-shared/Form/Select';import SelectContextChoices from'@shopgate/pwa-ui-shared/Form/SelectContextChoices';import ResponsiveContainer from"../../ResponsiveContainer/ResponsiveContainer";import FormHelper from"./FormHelper";/**
|
|
2
|
-
* Takes an element and renders it, if the type matches
|
|
3
|
-
* @param {Object} props Component props.
|
|
4
|
-
* @param {Object} props.element The data of the element to be rendered
|
|
5
|
-
* @returns {JSX}
|
|
6
|
-
*/var ElementMultiSelect=function ElementMultiSelect(props){var element=props.element,errorText=props.errorText,name=props.name,value=props.value,visible=props.visible,formName=props.formName;if(!visible){return null;}var values=[].concat(value).filter(Boolean);return React.createElement("div",{className:classNames(_camelCase(name),'engage__form-multi-select','formBuilderField',{validationError:!!errorText})},React.createElement(ResponsiveContainer,{appAlways:true,breakpoint:"xs"},React.createElement(Select,{name:name,required:element===null||element===void 0?void 0:element.required,label:element.label,placeholder:element.placeholder,value:values,options:element.options,onChange:element.handleChange,errorText:errorText,isControlled:true,translateErrorText:false,showErrorText:false,disabled:element.disabled,multiple:true,"aria-invalid":!!errorText,"aria-describedby":errorText.length>0?"ariaError-".concat(name):null})),React.createElement(ResponsiveContainer,{webOnly:true,breakpoint:">xs"},React.createElement(SelectContextChoices,{label:element.label,placeholder:element.placeholder,value:values,options:element.options,onChange:element.handleChange,errorText:errorText,showErrorText:false})),React.createElement(FormHelper,{errorText:errorText,element:element,formName:formName,elementName:name}));};ElementMultiSelect.defaultProps={value:'',visible:true};export default memo(ElementMultiSelect);
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import _isEqual from"lodash/isEqual";import _upperCase from"lodash/upperCase";import _camelCase from"lodash/camelCase";function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _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 PropTypes from'prop-types';import classnames from'classnames';import{i18n}from'@shopgate/engage/core/helpers';import{parsePhoneNumber}from'react-phone-number-input';import PhoneInputCountrySelect from'react-phone-number-input/mobile';import PhoneInput from'react-phone-number-input/input-mobile';import{getCountries}from'react-phone-number-input/input';import en from'react-phone-number-input/locale/en';import de from'react-phone-number-input/locale/de';import es from'react-phone-number-input/locale/es';import fr from'react-phone-number-input/locale/fr';import pt from'react-phone-number-input/locale/pt';import flags from'react-phone-number-input/flags';import{useCountriesNames}from'@shopgate/engage/i18n';import{css}from'glamor';import{themeConfig}from'@shopgate/engage';import Label from'@shopgate/pwa-ui-shared/TextField/components/Label';import FormHelper from"./FormHelper";var variables=themeConfig.variables,colors=themeConfig.colors;var styles={formField:css({width:'100%',marginBottom:'0px !important'}).toString(),phoneField:css({position:'relative',width:'100%',paddingTop:variables.gap.big*0.75,paddingBottom:variables.gap.big*1.25,' input.PhoneInputInput':{outline:'none',fontSize:'1rem',lineHeight:'1.1875rem',borderRadius:0,paddingBottom:variables.gap.xsmall*1.5,borderBottom:"1px solid ".concat(colors.shade12),'&:focus':{borderBottom:"2px solid ".concat(colors.primary),paddingBottom:variables.gap.xsmall*1.5-1}}}),phoneFieldError:css({' input.PhoneInputInput':{borderBottom:"2px solid var(--color-state-alert, ".concat(colors.error,")"),paddingBottom:variables.gap.xsmall*1.5-1}}).toString(),phoneFieldErrorText:css({position:'absolute',width:'100%',bottom:'-10px',fontSize:'0.75rem',lineHeight:0.875,color:"var(--color-state-alert, ".concat(colors.error,")"),overflow:'hidden',whiteSpace:'nowrap',textOverflow:'ellipsis',marginLeft:'38px'})};var builtInCountries=getCountries();var locales={en:en,de:de,es:es,fr:fr,pt:pt};/**
|
|
2
|
-
* Renders the reserve form phone input maybe with country selection.
|
|
3
|
-
* @param {Object} props The component props.
|
|
4
|
-
* @returns {JSX.Element}
|
|
5
|
-
*/var UnwrappedElementPhoneNumber=React.memo(function(props){var element=props.element,name=props.name,errorText=props.errorText,value=props.value,visible=props.visible,formName=props.formName;var label=element.label,handleChange=element.handleChange,_element$disabled=element.disabled,disabled=_element$disabled===void 0?false:_element$disabled,_element$required=element.required,required=_element$required===void 0?false:_element$required,_element$config=element.config,_element$config2=_element$config===void 0?{}:_element$config,_element$config2$supp=_element$config2.supportedCountries,supportedCountries=_element$config2$supp===void 0?[]:_element$config2$supp,_element$config2$coun=_element$config2.countrySortOrder,countrySortOrder=_element$config2$coun===void 0?[]:_element$config2$coun,_element$config2$user=_element$config2.userLocation,userLocation=_element$config2$user===void 0?{}:_element$config2$user;var _React$useState=React.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isFocused=_React$useState2[0],setIsFocused=_React$useState2[1];// Maps available countries to correct format.
|
|
6
|
-
var countries=React.useMemo(function(){if(supportedCountries.length===0){return builtInCountries;}return supportedCountries.map(function(country){var pieces=country.split('_');return _upperCase(pieces[0]);});},[supportedCountries]);var countriesNames=useCountriesNames(countries,locales);// Get labels for supported countries.
|
|
7
|
-
var labels=React.useMemo(function(){var output={};if(!countries){return output;}countries.forEach(function(key){var pieces=key.split('_');output[pieces[0]]=countriesNames[key];});return output;},[countries,countriesNames]);var defaultCountry=React.useMemo(function(){var country;if(value){// Try to parse the value to determine a country
|
|
8
|
-
var phoneNumber=parsePhoneNumber(value||'');if(phoneNumber&&phoneNumber.country){country=phoneNumber.country;}}if(!country&&userLocation){// Take the country from the user location if present
|
|
9
|
-
country=userLocation.country;}if(!country){// If no country could be determined yet, take the country from the language
|
|
10
|
-
var _i18n$getLang$split=i18n.getLang().split('-');var _i18n$getLang$split2=_slicedToArray(_i18n$getLang$split,2);country=_i18n$getLang$split2[1];}// Check if the determined country is included inside the available countries
|
|
11
|
-
if(!countries.includes(country)){if((countrySortOrder===null||countrySortOrder===void 0?void 0:countrySortOrder.length)&&countries.includes(countrySortOrder[0])){// Take first country if the sort order list if present
|
|
12
|
-
var _countrySortOrder=_slicedToArray(countrySortOrder,1);country=_countrySortOrder[0];}else{// Take first country from the list
|
|
13
|
-
var _countries=_slicedToArray(countries,1);country=_countries[0];}}return country;},[countries,countrySortOrder,userLocation,value]);var countryOptionsOrder=React.useMemo(function(){/**
|
|
14
|
-
* To avoid component errors remove countries from the sort order array that are not part
|
|
15
|
-
* of the counties array.
|
|
16
|
-
*/var sanitizedCountrySortOrder=countrySortOrder.filter(function(countryCode){return countries.includes(countryCode);});var countryListsEqual=_isEqual([].concat(countries).sort(),[].concat(sanitizedCountrySortOrder).sort());/**
|
|
17
|
-
* When list with supported countries has the same entries as the country sort order, we don't
|
|
18
|
-
* need to add a separator to the countryOptionsOrder array since the country picker lists
|
|
19
|
-
* will not show a section with unordered countries.
|
|
20
|
-
*/return sanitizedCountrySortOrder.length?[].concat(sanitizedCountrySortOrder,countryListsEqual?[]:['|']):[];},[countries,countrySortOrder]);var hasCountrySelect=React.useMemo(function(){return countries.length>1;},[countries.length]);var handleChangeWrapped=React.useCallback(function(phoneValue){handleChange(phoneValue,{target:{name:name}});},[handleChange,name]);var phoneClasses=classnames('textField',_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({simpleInput:!hasCountrySelect},_camelCase(name),true),"phonePicker",true),"phonePickerError",!!errorText),"validationError",!!errorText),"phonePickerFocused",isFocused),styles.phoneField,true),styles.phoneFieldError,!!errorText));if(!visible){return null;}var Component=hasCountrySelect?PhoneInputCountrySelect:PhoneInput;return React.createElement("div",{className:classnames('formBuilderField','engage__form-phone-number',{validationError:!!errorText})},React.createElement("div",{className:phoneClasses},React.createElement(Label,{label:label,isFocused:isFocused,isFloating:isFocused||!!value}),React.createElement(Component,_extends({defaultCountry:defaultCountry,name:name,value:value||'',onChange:handleChangeWrapped,onFocus:function onFocus(){return setIsFocused(true);},onBlur:function onBlur(){return setIsFocused(false);},disabled:disabled,required:required,"aria-invalid":!!errorText,"aria-describedby":errorText.length>0?"ariaError-".concat(name):null},hasCountrySelect?{countryOptionsOrder:countryOptionsOrder,addInternationalOption:false,flags:flags,countries:countries,labels:labels}:{className:'PhoneInputInput'}))),React.createElement(FormHelper,{errorText:errorText,element:element,formName:formName,elementName:name}));});UnwrappedElementPhoneNumber.defaultProps={value:'',visible:true};export default UnwrappedElementPhoneNumber;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from'react';import PropTypes from'prop-types';import ErrorTextCmp from'@shopgate/pwa-ui-shared/FormElement/components/ErrorText';import{SurroundPortals}from'@shopgate/engage/components';import{sanitizePortalName}from"./helpers/common";/**
|
|
2
|
-
* Component for error texts
|
|
3
|
-
* @param {Object} props Component props.
|
|
4
|
-
* @returns {JSX.Element}
|
|
5
|
-
*/var FormHelper=function FormHelper(_ref){var errorText=_ref.errorText,element=_ref.element,formName=_ref.formName,elementName=_ref.elementName;return React.createElement("div",{className:"formHelper"},React.createElement(SurroundPortals,{portalName:"".concat(sanitizePortalName(formName),".").concat(sanitizePortalName(element.id),".formHelper"),portalProps:{formName:formName,element:element,errorText:errorText}},!!errorText&&React.createElement(ErrorTextCmp,{errorText:errorText,translate:false,elementName:elementName,ariaHidden:true})));};FormHelper.defaultProps={errorText:null,elementName:null};export default FormHelper;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Takes a string and converts it to a part to be used in a portal name
|
|
3
|
-
* @package FormBuilder
|
|
4
|
-
* @param {string} s The string to be sanitized
|
|
5
|
-
* @return {string}
|
|
6
|
-
*/export var sanitizePortalName=function sanitizePortalName(s){return s.replace(/[\\._]/,'-');};
|
|
@@ -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{themeConfig}from'@shopgate/engage';import{responsiveMediaQuery}from'@shopgate/engage/styles';var colors=themeConfig.colors;export var TWO_COLUMN_LAYOUT=_defineProperty({},responsiveMediaQuery('>=md',{webOnly:false}),{display:'flex',flexDirection:'row',flexWrap:'wrap',margin:-8,marginTop:16,marginBottom:8,'>div':{flex:'1 1 50%',padding:'0 8px',maxWidth:'50%'},'>.phonePicker':{marginLeft:8,marginRight:8,flexBasis:'calc(50% - 16px)'}});export var OUTLINED_FORM_FIELDS={' .formHelper':{minHeight:32,' .errorText':{position:'relative',textOverflow:'unset',whiteSpace:'unset',lineHeight:'15px',bottom:'unset',padding:'8px 8px 8px 16px'}},' .formBuilderField':{' .textField, .formElement:not(.radioGroup):not(.checkbox), .phonePicker':{marginBottom:'unset',paddingBottom:'unset'}},' .radioGroup + .formHelper, .checkbox + .formHelper':{minHeight:16},' .checkbox':{paddingBottom:0},' .textField, .formElement:not(.radioGroup):not(.checkbox), .phonePicker':{paddingBottom:8,background:"var(--color-background-accent, ".concat(colors.shade8,")"),padding:0,marginBottom:32,borderTopLeftRadius:4,borderTopRightRadius:4,borderBottom:"1px solid ".concat(colors.shade12)},' .phonePickerError':{borderBottom:"2px solid var(--color-state-alert, ".concat(colors.error,")")},' .phonePickerFocused:not(.phonePickerError)':{borderBottom:'2px solid var(--color-primary)'},' .formElement:not(.radioGroup) label':{paddingLeft:24,color:'var(--color-text-low-emphasis)',transform:'translate3d(0, -18px, 0) scale3d(0.75, 0.75, 0.75)'},' .textField label':{paddingLeft:17,color:'var(--color-text-low-emphasis)','.floating':{transform:'translate3d(3px, -18px, 0) scale3d(0.75, 0.75, 0.75)'}},' .formElement:not(.radioGroup) select, .formElement .info-field':{paddingLeft:16,color:'var(--color-text-high-emphasis)'},' .formElement:not(.radioGroup):not(.checkbox) svg':{marginTop:8,right:8},' .formElement:not(.radioGroup) .placeholder':{paddingLeft:20,color:'var(--color-text-low-emphasis)'},' .formElement.disabled, .textField.disabled':{' input, select, svg':{opacity:0.28},' .label':{opacity:0.6}},' .textField input':{paddingLeft:16,color:'var(--color-text-high-emphasis)'},' .underline':{marginBottom:0,borderBottom:'none'},' .errorText':{bottom:-20,paddingLeft:16},' .phonePicker':{paddingTop:24,paddingBottom:2},' .textField.phonePicker:not(.simpleInput) .label':{paddingLeft:70,'&.floating':{paddingLeft:0}},' .textField.phonePicker:not(.simpleInput) input':{paddingLeft:0},' .phonePicker > .PhoneInputInput':{paddingLeft:16,width:'100%'},' .phonePicker .PhoneInputInput':{borderBottom:'none',color:'var(--color-text-high-emphasis)','&:focus':{borderBottom:'none'},'::placeholder':{color:'var(--color-text-low-emphasis)'}},' .phonePicker .errorText':{marginLeft:-8},' .PhoneInputCountryIcon':{marginBottom:8,marginLeft:16},' .PhoneInputCountrySelectArrow':{marginRight:6,marginLeft:10,marginBottom:8},' .placeholder':{color:colors.shade12}};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{connect}from'react-redux';import{hasWebBridge,makeGetShopSettingByKey,SHOP_SETTING_SHOW_SHOP_LOGO_IN_APP,SHOP_SETTING_SHOW_SHOP_LOGO_IN_WEB}from'@shopgate/engage/core';/**
|
|
2
|
-
* Creates the mapStateToProps connector function.
|
|
3
|
-
* @returns {Function}
|
|
4
|
-
*/var makeMapStateToProps=function makeMapStateToProps(){var getShowShopLogoInApp=makeGetShopSettingByKey(SHOP_SETTING_SHOW_SHOP_LOGO_IN_APP);var getShowShopLogoInWeb=makeGetShopSettingByKey(SHOP_SETTING_SHOW_SHOP_LOGO_IN_WEB);return function(state){return{showLogo:hasWebBridge()?getShowShopLogoInWeb(state):getShowShopLogoInApp(state)};};};export default connect(makeMapStateToProps);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React,{useCallback}from'react';import PropTypes from'prop-types';import compose from'lodash/fp/compose';import Glow from'@shopgate/pwa-ui-shared/Glow';import{getItemClass}from"./style";/**
|
|
2
|
-
* A delay in ms after that the closeMenu callback gets triggered.
|
|
3
|
-
* @type {number}
|
|
4
|
-
*/var CLOSE_DELAY=250;/**
|
|
5
|
-
* The Context Menu Item component.
|
|
6
|
-
* @param {Object} props The component props.
|
|
7
|
-
* @returns {JSX.Element}
|
|
8
|
-
*/var Item=function Item(_ref){var children=_ref.children,closeMenu=_ref.closeMenu,onClick=_ref.onClick;var handleClick=compose(onClick,function(){return setTimeout(closeMenu,CLOSE_DELAY);});var handleKeyPress=useCallback(function(event){if(event.key==='Enter'||event.key===' '){event.preventDefault();handleClick(event);}},[handleClick]);return React.createElement(Glow,null,React.createElement("div",{className:getItemClass(),onClick:handleClick,role:"button","data-test-id":"contextMenuButton",onKeyDown:handleKeyPress,tabIndex:0},children));};Item.defaultProps={children:null,closeMenu:function closeMenu(){},onClick:function onClick(){}};export default Item;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{css}from'glamor';import Color from'color';import{themeConfig}from'@shopgate/pwa-common/helpers/config';import{getCSSCustomProp}from'@shopgate/engage/styles';/**
|
|
2
|
-
* Get the item class.
|
|
3
|
-
* @returns {string}
|
|
4
|
-
*/export var getItemClass=function getItemClass(){var background=themeConfig.colors.shade8;var customPropColor=getCSSCustomProp('--color-primary');if(customPropColor){background=Color(customPropColor).alpha(0.04);}return css({position:'relative',whiteSpace:'nowrap',padding:"".concat(themeConfig.variables.gap.big*0.875,"px ").concat(themeConfig.variables.gap.big*1.375,"px"),lineHeight:1,zIndex:1,cursor:'pointer',':hover':{background:background}}).toString();};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
function _typeof(obj){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}function _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 _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;}function _callSuper(_this,derived,args){function isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(e){return false;}}derived=_getPrototypeOf(derived);return _possibleConstructorReturn(_this,isNativeReflectConstruct()?Reflect.construct(derived,args||[],_getPrototypeOf(_this).constructor):derived.apply(_this,args));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import React,{Component}from'react';import PropTypes from'prop-types';import clamp from'lodash/clamp';import styles from"./style";/**
|
|
2
|
-
* The Context Menu Position component.
|
|
3
|
-
*/var Position=/*#__PURE__*/function(_Component){/**
|
|
4
|
-
* The Constructor.
|
|
5
|
-
* @param {Object} props The component props.
|
|
6
|
-
*/function Position(props){var _this2;_classCallCheck(this,Position);_this2=_callSuper(this,Position,[props]);_this2.elementRef=null;return _this2;}/**
|
|
7
|
-
* Calculate and apply the correct menu position after mounting.
|
|
8
|
-
*/_inherits(Position,_Component);return _createClass(Position,[{key:"componentDidMount",value:function componentDidMount(){var offset=this.props.offset;// Get ref to the actual child DOM element and calculate bounding rect.
|
|
9
|
-
var _this$elementRef$chil=_slicedToArray(this.elementRef.childNodes,1),child=_this$elementRef$chil[0];var bounds=child.getBoundingClientRect();// Get window dimensions
|
|
10
|
-
var width=window.innerWidth;var height=window.innerHeight;// Get the outer gap from styles
|
|
11
|
-
var gap=styles.outerGap;// Calculate clamped menu position
|
|
12
|
-
var left=clamp(offset.left,0,width-bounds.width-gap*2);var top=clamp(offset.top-gap,0,height-bounds.height-gap*2);// Assign position directly w/o re-rendering the component
|
|
13
|
-
this.elementRef.style.left="".concat(left,"px");this.elementRef.style.top="".concat(top,"px");}/**
|
|
14
|
-
* Renders the component.
|
|
15
|
-
* @returns {JSX}
|
|
16
|
-
*/},{key:"render",value:function render(){var _this3=this;return React.createElement("div",{ref:function ref(_ref){_this3.elementRef=_ref;},className:styles.container},this.props.children);}}]);}(Component);_defineProperty(Position,"defaultProps",{children:null,offset:{top:0,left:0}});export default Position;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var outerGap=themeConfig.variables.gap.small;var container=css({position:'absolute',margin:outerGap}).toString();export default{container:container,outerGap:outerGap};
|
package/components/Menu/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
function _typeof(obj){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;}function _callSuper(_this,derived,args){function isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(e){return false;}}derived=_getPrototypeOf(derived);return _possibleConstructorReturn(_this,isNativeReflectConstruct()?Reflect.construct(derived,args||[],_getPrototypeOf(_this).constructor):derived.apply(_this,args));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import React,{Component,Children}from'react';import PropTypes from'prop-types';import{ConnectedReactPortal}from'@shopgate/engage/components';import Backdrop from'@shopgate/pwa-common/components/Backdrop';import Position from"./components/Position";import Item from"./components/Item";import styles from"./style";/**
|
|
2
|
-
* The Menu component.
|
|
3
|
-
*/var Menu=/*#__PURE__*/function(_Component){function Menu(){var _this2;_classCallCheck(this,Menu);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this2=_callSuper(this,Menu,[].concat(args));/**
|
|
4
|
-
* Handles any menu toggling interactions.
|
|
5
|
-
* @param {Object} [e] Event
|
|
6
|
-
*/_defineProperty(_this2,"handleMenuToggle",function(e){var _this2$props$contextR;if(e){e.preventDefault();e.stopPropagation();}if((_this2$props$contextR=_this2.props.contextRef)===null||_this2$props$contextR===void 0?void 0:_this2$props$contextR.current){_this2.props.onClose();}});return _this2;}_inherits(Menu,_Component);return _createClass(Menu,[{key:"offset",get:/**
|
|
7
|
-
* Gets the offset of the DOM element.
|
|
8
|
-
* @returns {Object}
|
|
9
|
-
*/function get(){var _this$props$contextRe;if((_this$props$contextRe=this.props.contextRef)===null||_this$props$contextRe===void 0?void 0:_this$props$contextRe.current){var bounds=this.props.contextRef.current.getBoundingClientRect();return{height:bounds.height,width:bounds.width,left:bounds.left,right:bounds.right,bottom:bounds.bottom,top:bounds.top+bounds.height};}return{top:0,left:0};}},{key:"render",value:/**
|
|
10
|
-
* Renders the component.
|
|
11
|
-
* @returns {JSX}
|
|
12
|
-
*/function render(){var _this$props=this.props,children=_this$props.children,isOpen=_this$props.isOpen,onClose=_this$props.onClose;return React.createElement(ConnectedReactPortal,{isOpened:isOpen},React.createElement("div",{className:styles.overlay},React.createElement(Backdrop,{isVisible:true,level:0,opacity:0,onClick:onClose}),React.createElement(Position,{offset:this.offset},React.createElement("div",{className:styles.menu},Children.map(children,function(child){if(!child){return null;}return React.cloneElement(child,{closeMenu:onClose});})))));}}]);}(Component);_defineProperty(Menu,"Item",Item);_defineProperty(Menu,"defaultProps",{children:null,contextRef:null,isOpen:false,onClose:function onClose(){}});export default Menu;
|
package/components/Menu/style.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var container=css({position:'relative'}).toString();var button=css({display:'block',fontSize:'1.5rem',outline:0,padding:0}).toString();var disabled=css({cursor:'none'}).toString();var overlay=css({position:'fixed',top:0,right:0,bottom:0,left:0,zIndex:10}).toString();var menu=css({position:'absolute',top:0,left:0,padding:"".concat(themeConfig.variables.gap.small,"px 0"),minWidth:130,background:themeConfig.colors.light,borderRadius:2,boxShadow:themeConfig.shadows.contextMenu}).toString();export default{container:container,button:button,menu:menu,overlay:overlay,disabled:disabled};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{hot}from'react-hot-loader/root';import*as React from'react';import PropTypes from'prop-types';import classnames from'classnames';import{i18n,errorBehavior}from'@shopgate/engage/core/helpers';import StopIcon from'@shopgate/pwa-ui-shared/icons/StopIcon';import InfoIcon from'@shopgate/pwa-ui-shared/icons/InfoIcon';import WarningIcon from'@shopgate/pwa-ui-shared/icons/WarningIcon';import*as styles from"./MessageBar.style";var iconMapping={info:InfoIcon,warning:WarningIcon,error:StopIcon};/**
|
|
2
|
-
* The MessageBar component.
|
|
3
|
-
* @param {Object} props The component props.
|
|
4
|
-
* @property {Array} props.messages The message content.
|
|
5
|
-
* @property {Object} props.classNames Styling.
|
|
6
|
-
* @property {boolean} props.raised whether to use specific styling.
|
|
7
|
-
* @property {boolean} props.showIcons whether to show icons.
|
|
8
|
-
* @return {JSX.Element}
|
|
9
|
-
*/var MessageBar=function MessageBar(_ref){var messages=_ref.messages,classNames=_ref.classNames,raised=_ref.raised,showIcons=_ref.showIcons;var containerClass=React.useMemo(function(){if(raised){return classnames(styles.containerRaised,classNames.containerRaised);}return classnames(styles.container,classNames.container);},[classNames.container,classNames.containerRaised,raised]);return React.createElement("div",{className:containerClass,role:messages.length>0?'alert':null},messages.map(function(item){var _item$type=item.type,type=_item$type===void 0?'info':_item$type,message=item.message,_item$messageParams=item.messageParams,messageParams=_item$messageParams===void 0?null:_item$messageParams,_item$additionalParam=item.additionalParams,additionalParams=_item$additionalParam===void 0?null:_item$additionalParam,_item$translated=item.translated,translated=_item$translated===void 0?false:_item$translated;var _item$icon=item.icon,Icon=_item$icon===void 0?null:_item$icon;if(Icon===null&&showIcons){Icon=iconMapping[type];}var messageOutput=!translated?errorBehavior.getErrorMessage(message,messageParams||additionalParams):message;return React.createElement("div",{key:"".concat(type,"-").concat(message),className:classnames(styles[type]?styles[type]():null,classNames.message,Icon?styles.withIcon:null),"aria-live":"assertive","aria-atomic":"true"},Icon&&React.createElement(Icon,{className:classnames(classNames.icon,styles.icon)}),React.createElement("span",{className:"sr-only"},"".concat(i18n.text("cart.message_type_".concat(type)),": ").concat(messageOutput)),React.createElement("span",{"aria-hidden":true,className:Icon?styles.messageToIcon:null},messageOutput));}));};MessageBar.defaultProps={classNames:{container:null,containerRaised:null,message:null,icon:null},raised:false,showIcons:false};export default hot(React.memo(MessageBar));
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}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 Color from'color';import{responsiveMediaQuery,getCSSCustomProp}from'@shopgate/engage/styles';import{themeColors,themeVariables}from'@shopgate/pwa-common/helpers/config';var containerBase=_defineProperty({background:themeColors.background,display:'flex',flexDirection:'column',flexShrink:0,overflow:'hidden'},responsiveMediaQuery('>xs',{webOnly:true}),{fontWeight:'normal',border:'none',borderRadius:'inherit',margin:themeVariables.gap.big,boxShadow:'none',background:'none'});export var container=css(containerBase).toString();export var containerRaised=css(containerBase,{borderRadius:'0 0 5px 5px',boxShadow:'0px 4px 4px rgba(0, 0, 0, 0.25)',zIndex:10}).toString();var messageBase=_defineProperty({padding:"".concat(themeVariables.gap.big,"px ").concat(themeVariables.gap.big,"px"),fontSize:'0.875rem',lineHeight:1.3,fontWeight:500,':not(:last-child)':{marginBottom:themeVariables.gap.small*0.5},' > svg':{fontSize:'1.5rem !important'}},responsiveMediaQuery('>xs',{webOnly:true}),{padding:"".concat(themeVariables.gap.small*1.5,"px ").concat(themeVariables.gap.big,"px"),fontWeight:'normal',border:'1px solid',borderRadius:4,':not(:last-child)':{marginBottom:themeVariables.gap.small}});/**
|
|
2
|
-
* @param {string|Object} sourceColor The source color.
|
|
3
|
-
* @param {string} [textColor] AN optional text color.
|
|
4
|
-
* @returns {Object}
|
|
5
|
-
*/var getMessageColors=function getMessageColors(sourceColor,textColor){var background=Color(sourceColor).fade(0.9);var color=textColor||'var(--color-text-height-emphasis)';var borderColor=sourceColor;return{background:background,color:color,borderColor:borderColor};};/**
|
|
6
|
-
* @returns {string}
|
|
7
|
-
*/export var info=function info(){return css(messageBase,_defineProperty({background:"var(--color-secondary, ".concat(themeColors.accent,")"),color:"var(--color-secondary-contrast, ".concat(themeColors.accentContrast,")")},responsiveMediaQuery('>xs',{webOnly:true}),_extends({},getMessageColors(getCSSCustomProp('--color-secondary')||themeColors.accent),{' > svg':{color:"var(--color-secondary, ".concat(themeColors.accent,")")}}))).toString();};/**
|
|
8
|
-
* @returns {string}
|
|
9
|
-
*/export var error=function error(){return css(messageBase,_defineProperty({background:themeColors.error,color:themeColors.light},responsiveMediaQuery('>xs',{webOnly:true}),_extends({},getMessageColors(themeColors.error),{' > svg':{color:themeColors.error}}))).toString();};/**
|
|
10
|
-
* @returns {string}
|
|
11
|
-
*/export var warning=function warning(){return css(messageBase,_defineProperty({background:themeColors.warning,color:themeColors.light},responsiveMediaQuery('>xs',{webOnly:true}),_extends({},getMessageColors(themeColors.warning),{' > svg':{color:themeColors.warning}}))).toString();};export var withIcon=css({display:'flex',minWidth:'100%',alignItems:'center'}).toString();export var icon=css({flexGrow:0,flexShrink:0}).toString();export var messageToIcon=css({flexGrow:1,paddingLeft:themeVariables.gap.big});
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React,{useMemo}from'react';import PropTypes from'prop-types';import{formatFloat}from"../QuantityInput/helper";/**
|
|
2
|
-
* @param {Object} props The component props.
|
|
3
|
-
* @returns {JSX}
|
|
4
|
-
*/var QuantityLabel=function QuantityLabel(_ref){var value=_ref.value,maxDecimals=_ref.maxDecimals,unit=_ref.unit,className=_ref.className;var output=useMemo(function(){var formatted=formatFloat(value,maxDecimals);return unit?"".concat(formatted," ").concat(unit):formatted;},[maxDecimals,unit,value]);return React.createElement("span",{className:className},output);};QuantityLabel.defaultProps={className:'',maxDecimals:2,unit:null};export default QuantityLabel;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{default}from"./QuantityLabel";
|
|
@@ -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;}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}import{hot}from'react-hot-loader/root';import React from'react';import PropTypes from'prop-types';import classNames from'classnames';import{css}from'glamor';import CheckedIcon from'@shopgate/pwa-ui-shared/icons/RadioCheckedIcon';import UncheckedIcon from'@shopgate/pwa-ui-shared/icons/RadioUncheckedIcon';import{Ripple}from'@shopgate/engage/components';import{useRadioGroup}from"../RadioGroup";var styles={root:css({display:'inline-flex',alignItems:'inherit',justifyContent:'inherit',position:'relative',borderRadius:'50%'}).toString(),input:css({top:0,left:0,margin:0,opacity:0,padding:0,position:'absolute',zIndex:1,width:'100%',height:'100%'}).toString(),radioContainer:css({display:'flex',position:'relative',width:24,height:24}).toString(),radio:css({height:'100%',width:'100%'}).toString(),radioChecked:css({color:'var(--color-primary)'}).toString(),radioDisabled:css({opacity:0.5,pointerEvents:'none'}).toString(),ripple:css({padding:12}).toString()};/**
|
|
2
|
-
* The Radio component
|
|
3
|
-
* @param {Object} props The component props
|
|
4
|
-
* @returns {JSX}
|
|
5
|
-
*/var Radio=function Radio(_ref){var classes=_ref.classes,nameProp=_ref.name,onChangeProp=_ref.onChange,checkedProp=_ref.checked,disabledProp=_ref.disabled,valueProp=_ref.value,attributes=_ref.attributes;var radioGroup=useRadioGroup();var name=nameProp;var checked=checkedProp;var onChange=onChangeProp;if(radioGroup){if(checked===null){checked=radioGroup.value===valueProp;}if(typeof radioGroup.name!=='undefined'){name=radioGroup.name;}if(typeof radioGroup.onChange!=='undefined'){onChange=radioGroup.onChange;}}return React.createElement("span",{className:classNames(styles.root,classes.root)},React.createElement(Ripple,{className:styles.ripple,color:"var(--color-primary)"},React.createElement("input",_extends({className:styles.input,type:"radio",name:name,value:valueProp,checked:checked,onChange:onChange,disabled:disabledProp,id:"".concat(name,"_").concat(valueProp)},attributes)),React.createElement("div",{className:classNames(styles.radioContainer,_defineProperty(_defineProperty({},styles.radioDisabled,disabledProp),classes.disabled,disabledProp))},checked&&React.createElement(CheckedIcon,{className:classNames(styles.radio,styles.radioChecked,classes.radioChecked,'checkedIcon')}),!checked&&React.createElement(UncheckedIcon,{className:classNames(styles.radio,classes.radioUnchecked,'uncheckedIcon')}))));};Radio.defaultProps={classes:{},checked:null,disabled:false,onChange:null,name:null,value:null,attributes:null};export default hot(Radio);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{default}from"./Radio";
|
|
@@ -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{hot}from'react-hot-loader/root';import React from'react';import PropTypes from'prop-types';import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';import classNames from'classnames';import Card from'@shopgate/pwa-ui-shared/Card';import{useRadioGroup}from"../RadioGroup";import Radio from"../Radio";var variables=themeConfig.variables;var styles={card:css({borderRadius:4,padding:'8px 8px 8px 4px',display:'flex',alignItems:'center'}).toString(),content:css({padding:"".concat(variables.gap.small,"px ").concat(variables.gap.small,"px ").concat(variables.gap.small,"px 0"),width:'100%'}).toString(),contentDisabled:css({opacity:0.5,pointerEvents:'none'}).toString(),radio:css({alignItems:'center'}).toString()};/**
|
|
2
|
-
* The default card component
|
|
3
|
-
* @param {Object} props The component props
|
|
4
|
-
* @returns {JSX}
|
|
5
|
-
*/var CardComponent=function CardComponent(_ref){var children=_ref.children,className=_ref.className;return React.createElement(Card,{className:classNames(styles.card,className)},children);};CardComponent.defaultProps={children:null,className:null};/**
|
|
6
|
-
* The RadioCard component
|
|
7
|
-
* @param {Object} props The component props
|
|
8
|
-
* @returns {JSX}
|
|
9
|
-
*/var RadioCard=function RadioCard(_ref2){var children=_ref2.children,nameProp=_ref2.name,onChange=_ref2.onChange,checked=_ref2.checked,disabledProp=_ref2.disabled,value=_ref2.value,attributes=_ref2.attributes,classes=_ref2.classes,RenderCard=_ref2.renderCard;var radioGroup=useRadioGroup();var name=nameProp;var disabled=disabledProp;if(radioGroup){if(typeof radioGroup.name!=='undefined'){name=radioGroup.name;}if(typeof radioGroup.disabled!=='undefined'){disabled=radioGroup.disabled;}}return React.createElement(RenderCard,{className:classes.root},React.createElement(Radio,{name:name,value:value,onChange:onChange,disabled:disabled,checked:checked,attributes:attributes,classes:{root:styles.radio}}),React.createElement("label",{htmlFor:"".concat(name,"_").concat(value),className:classNames(styles.content,_defineProperty(_defineProperty({},styles.contentDisabled,disabled),classes.disabled,disabled))},children));};RadioCard.defaultProps={children:null,checked:null,classes:{},disabled:false,onChange:null,name:null,value:null,attributes:null,renderCard:CardComponent};export default hot(RadioCard);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{default}from"./RadioCard";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import React from'react';var initialContext={};export default React.createContext(initialContext);
|
|
@@ -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;}import{hot}from'react-hot-loader/root';import React,{useState,useCallback,useEffect}from'react';import PropTypes from'prop-types';import{css}from'glamor';import classNames from'classnames';import RadioGroupContext from"./RadioGroup.context";var styles={root:css({display:'flex',flexDirection:'column'}).toString()};/**
|
|
2
|
-
* @param {Object} props The component props
|
|
3
|
-
* @returns {JSX}
|
|
4
|
-
*/var RadioGroup=function RadioGroup(_ref){var classes=_ref.classes,children=_ref.children,name=_ref.name,disabled=_ref.disabled,valueProp=_ref.value,defaultValue=_ref.defaultValue,onChange=_ref.onChange,Component=_ref.component;var _useState=useState(valueProp||defaultValue),_useState2=_slicedToArray(_useState,2),value=_useState2[0],setValue=_useState2[1];useEffect(function(){setValue(valueProp||defaultValue);},[defaultValue,valueProp]);var handleChange=useCallback(function(event){setValue(event.target.value);if(onChange){onChange(event,event.target.value);}},[onChange]);return React.createElement(RadioGroupContext.Provider,{value:{name:name,onChange:handleChange,value:value,disabled:disabled}},React.createElement(Component,{role:"radiogroup",className:classNames(styles.root,classes.root)},children));};RadioGroup.defaultProps={classes:{},children:null,defaultValue:null,disabled:false,value:null,onChange:null,component:'div'};export default hot(RadioGroup);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{default}from"./RadioGroup";export{default as useRadioGroup}from"./useRadioGroup";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import PropTypes from'prop-types';import{useResponsiveValue}from"./hooks";/**
|
|
2
|
-
* Renders a responsive container that allows to render based on width.
|
|
3
|
-
* @param {Object} props Component props.
|
|
4
|
-
* @returns {React.Node}
|
|
5
|
-
*/var ResponsiveContainer=function ResponsiveContainer(_ref){var breakpoint=_ref.breakpoint,webOnly=_ref.webOnly,webAlways=_ref.webAlways,appOnly=_ref.appOnly,appAlways=_ref.appAlways,children=_ref.children;var render=useResponsiveValue(breakpoint,{webOnly:webOnly,webAlways:webAlways,appOnly:appOnly,appAlways:appAlways});if(!render){return null;}return children;};ResponsiveContainer.propTypes={appAlways:PropTypes.bool,appOnly:PropTypes.bool,breakpoint:PropTypes.string,// eslint-disable-next-line react/forbid-prop-types
|
|
6
|
-
children:PropTypes.any,webAlways:PropTypes.bool,webOnly:PropTypes.bool};ResponsiveContainer.defaultProps={children:null,breakpoint:'>=xs',appAlways:false,webAlways:false,webOnly:false,appOnly:false};export default ResponsiveContainer;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// Ugly imports to avoid breaking tests due to circular dependencies
|
|
2
|
-
import{isIOSTheme}from'@shopgate/engage/core/helpers/isIOSTheme';import{hasWebBridge}from'@shopgate/engage/core/helpers/bridge';var iosThemeActive=isIOSTheme();/* eslint-disable extra-rules/no-single-line-objects */var breakpoints=[{name:'xs',from:0,to:600},{name:'sm',from:600,to:960},{name:'md',from:960,to:1280},{name:'lg',from:1280,to:1920},{name:'xl',from:1920,to:Number.MAX_VALUE}];/* eslint-enable extra-rules/no-single-line-objects */ /**
|
|
3
|
-
* Generates a media query for different breakpoints and platform.
|
|
4
|
-
* @param {Object} comparators Comparators.
|
|
5
|
-
* @param {string} breakpoint Breakpoint rule.
|
|
6
|
-
* @param {Object} params Parameters needed to generation.
|
|
7
|
-
* @returns {string}
|
|
8
|
-
*/export var parser=function parser(comparators,breakpoint){var _ref=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},_ref$appAlways=_ref.appAlways,appAlways=_ref$appAlways===void 0?false:_ref$appAlways,_ref$appOnly=_ref.appOnly,appOnly=_ref$appOnly===void 0?false:_ref$appOnly,_ref$webOnly=_ref.webOnly,webOnly=_ref$webOnly===void 0?false:_ref$webOnly,_ref$webAlways=_ref.webAlways,webAlways=_ref$webAlways===void 0?false:_ref$webAlways;// Parse breakpoint prop into the comparator and the breakpoint name.
|
|
9
|
-
var breakpointStart=breakpoint.search(/[a-zA-Z]/);var comparatorString=breakpoint.substring(0,breakpointStart===-1?0:breakpointStart);var breakpointString=breakpoint.substring(breakpointStart===-1?0:breakpointStart);// Get configuration.
|
|
10
|
-
var comparator=comparators[comparatorString];var config=breakpoints.find(function(b){return b.name===breakpointString;});// Web / App config.
|
|
11
|
-
// Handle iOS theme as app for now so that media queries in shared components only work for app
|
|
12
|
-
var isWeb=hasWebBridge()&&!iosThemeActive;// Always mode.
|
|
13
|
-
if(webAlways&&isWeb||appAlways&&!isWeb){return true;}// Return media query that never evaluates for now.
|
|
14
|
-
if(appOnly&&isWeb||webOnly&&!isWeb){return false;}return comparator(config.from,config.to,window.innerWidth);};export default breakpoints;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{parser}from"./breakpoints";var comparators={'>=':function _(from,to,width){return width>=from;},'>':function _(from,to,width){return width>=to;},'<':function _(from,to,width){return width<from;},'<=':function _(from,to,width){return width<to;},'':function _(from,to,width){return width>=from&&width<to;}};/**
|
|
2
|
-
* Tests if responsive condition applies.
|
|
3
|
-
* @param {string} breakpoint Breakpoint rule.
|
|
4
|
-
* @param {Object} params Parameters needed to generation.
|
|
5
|
-
* @returns {string}
|
|
6
|
-
*/export var responsiveCondition=function responsiveCondition(breakpoint){var params=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var parsed=parser(comparators,breakpoint,params);return parsed;};
|
|
@@ -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;}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}import{useState,useMemo,useEffect}from'react';import{addListener}from"./listener";import{parser}from"./breakpoints";var comparators={'>=':function _(from,to,width){return width>=from;},'>':function _(from,to,width){return width>=to;},'<':function _(from,to,width){return width<from;},'<=':function _(from,to,width){return width<to;},'':function _(from,to,width){return width>=from&&width<to;}};/**
|
|
2
|
-
* Custom hook to determine the visibility or value based on the current active breakpoint
|
|
3
|
-
* and provided conditions.
|
|
4
|
-
* It listens for changes in the viewport or platform breakpoints and returns a value.
|
|
5
|
-
*
|
|
6
|
-
* @param {string} [breakpoint=">=xs"] - The breakpoint condition to match (e.g., '>=md', '<lg').
|
|
7
|
-
* @param {Object} [options={}] - Additional options for customizing behavior.
|
|
8
|
-
* @param {*} [options.valueMatch=true] - Return value when the provided conditions match.
|
|
9
|
-
* @param {*} [options.valueMiss=false] - Return value when the provided conditions do not match.
|
|
10
|
-
* @param {boolean} [options.webOnly=false] If true, the hook will only match in PWA website mode.
|
|
11
|
-
* @param {boolean} [options.webAlways=false] If true, the hook will always match in PWA website
|
|
12
|
-
* mode regardless of the breakpoint.
|
|
13
|
-
* @param {boolean} [options.appOnly=false] If true, the hook will only match in PWA app mode.
|
|
14
|
-
* @param {boolean} [options.appAlways=false] If true, the hook will always match in PWA app mode,
|
|
15
|
-
* regardless of the breakpoint.
|
|
16
|
-
* @returns {boolean}
|
|
17
|
-
*/export var useResponsiveValue=function useResponsiveValue(){var breakpoint=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'>=xs';var options=arguments.length>1?arguments[1]:undefined;var _valueMatch$valueMiss=_extends({valueMatch:true,valueMiss:false,appAlways:false,appOnly:false,webAlways:false,webOnly:false},options),webOnly=_valueMatch$valueMiss.webOnly,webAlways=_valueMatch$valueMiss.webAlways,appOnly=_valueMatch$valueMiss.appOnly,appAlways=_valueMatch$valueMiss.appAlways,valueMiss=_valueMatch$valueMiss.valueMiss,valueMatch=_valueMatch$valueMiss.valueMatch;// Active breakpoint used for triggering rerenders on resize.
|
|
18
|
-
var _useState=useState(null),_useState2=_slicedToArray(_useState,2),activeBreakpoint=_useState2[0],setActiveBreakpoint=_useState2[1];// Calculate if we have a match for the conditions
|
|
19
|
-
/* eslint-disable react-hooks/exhaustive-deps */var isMatch=useMemo(function(){var parsed=parser(comparators,breakpoint,{breakpoint:breakpoint,webOnly:webOnly,webAlways:webAlways,appOnly:appOnly,appAlways:appAlways});return parsed;},[activeBreakpoint,breakpoint]);/* eslint-enable react-hooks/exhaustive-deps */ // Watch for resize changes.
|
|
20
|
-
useEffect(function(){return addListener(function(newBreakpoint){setActiveBreakpoint(newBreakpoint);});},[]);return isMatch?valueMatch:valueMiss;};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{default}from"./ResponsiveContainer";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import debounce from'lodash/debounce';import breakpoints from"./breakpoints";var listeners=[];/**
|
|
2
|
-
* Adds a new listener to breakpoint changes.
|
|
3
|
-
* @param {Function} cb The callback that shall be triggered.
|
|
4
|
-
* @returns {Function}
|
|
5
|
-
*/export var addListener=function addListener(cb){listeners.push(cb);return function(){listeners=listeners.filter(function(a){return a!==cb;});};};/**
|
|
6
|
-
* Calculates the active breakpoint.
|
|
7
|
-
* @returns {Object}
|
|
8
|
-
*/var getActiveBreakpoint=function getActiveBreakpoint(){return breakpoints.find(function(bp){return bp.from<=document.documentElement.clientWidth&&bp.to>=document.documentElement.clientWidth;});};var activeBreakpoint=getActiveBreakpoint();/**
|
|
9
|
-
* Handles any event that might cause a breakpoint change.
|
|
10
|
-
*/var handleEvent=function handleEvent(){var newBreakpoint=getActiveBreakpoint();if(activeBreakpoint.name!==newBreakpoint.name){activeBreakpoint=newBreakpoint;listeners.forEach(function(listener){return listener(newBreakpoint);});}};window.addEventListener('resize',debounce(handleEvent,200));window.addEventListener('orientationchange',handleEvent);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{parser}from"./breakpoints";var comparators={'>=':function _(from){return"@media (min-width: ".concat(from,"px)");},'>':function _(from,to){return"@media (min-width: ".concat(to,"px)");},'<':function _(from){return"@media (max-width: ".concat(from+1,"px)");},'<=':function _(from,to){return"@media (max-width: ".concat(to-1,"px)");},'':function _(from,to){return"@media (min-width: ".concat(from,"px) and (max-width: ").concat(to,"px)");}};/**
|
|
2
|
-
* Generates a media query for different breakpoints and platform.
|
|
3
|
-
* @param {string} breakpoint Breakpoint rule.
|
|
4
|
-
* @param {Object} params Parameters needed to generation.
|
|
5
|
-
* @returns {string}
|
|
6
|
-
*/export var responsiveMediaQuery=function responsiveMediaQuery(breakpoint){var params=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var parsed=parser(comparators,breakpoint,params);// Return media query that never evaluates for now.
|
|
7
|
-
if(!parsed){return'@media (height: 0)';}// Return media query that evaluates always.
|
|
8
|
-
if(parsed===true){return'@media (min-height: 0)';}return parsed;};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{useContext}from'react';import SideNavigationContext from"./SideNavigationProvider.context";/**
|
|
2
|
-
* Returns the value of the side navigation provider state.
|
|
3
|
-
* @returns {Object}
|
|
4
|
-
*/export var useSideNavigation=function useSideNavigation(){return useContext(SideNavigationContext);};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from'react';import{hot}from'react-hot-loader/root';import SideNavigationProvider from"./SideNavigationProvider";import SideNavigationContent from"./SideNavigationContent";/**
|
|
2
|
-
* The SideNavigation component
|
|
3
|
-
* @returns {JSX}
|
|
4
|
-
*/var SideNavigation=function SideNavigation(_ref){var maxCategoryNesting=_ref.maxCategoryNesting,routePatternBlacklist=_ref.routePatternBlacklist,classNames=_ref.classNames;return React.createElement(SideNavigationProvider,{maxCategoryNesting:maxCategoryNesting,routePatternBlacklist:routePatternBlacklist},React.createElement(SideNavigationContent,{classNames:classNames}));};SideNavigation.defaultProps={maxCategoryNesting:3,routePatternBlacklist:[],classNames:null};export default hot(SideNavigation);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{connect}from'react-redux';import{fetchCategoryOrRootCategories}from'@shopgate/engage/category';import{makeGetAreRootCategoriesFetching,makeGetSubcategoriesByCategoryId}from"./selectors";/**
|
|
2
|
-
* Creates the mapStateToProps connector function.
|
|
3
|
-
* @returns {Function}
|
|
4
|
-
*/var makeMapStateToProps=function makeMapStateToProps(){var getAreRootCategoriesFetching=makeGetAreRootCategoriesFetching();var getSubcategoriesByCategoryId=makeGetSubcategoriesByCategoryId();return function(state,_ref){var categoryId=_ref.categoryId;return{rootCategoriesFetching:getAreRootCategoriesFetching(state),subcategories:getSubcategoriesByCategoryId(state,{categoryId:categoryId})};};};/**
|
|
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=function mapDispatchToProps(dispatch){return{fetchCategory:function fetchCategory(id){return dispatch(fetchCategoryOrRootCategories(id));}};};export default connect(makeMapStateToProps,mapDispatchToProps);
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React,{useEffect}from'react';import{LoadingIndicator}from'@shopgate/pwa-ui-shared';import SideNavigationCategoriesItemChildren from"./SideNavigationCategoriesItemChildren";import connect from"./SideNavigationCategories.connector";import{list,loadingIndicator}from"./SideNavigationCategories.style";import{item}from"./SideNavigationItem.style";/**
|
|
2
|
-
* The SideNavigationCategories component
|
|
3
|
-
* @returns {JSX}
|
|
4
|
-
*/var SideNavigationCategories=function SideNavigationCategories(_ref){var categoryId=_ref.categoryId,subcategories=_ref.subcategories,fetchCategory=_ref.fetchCategory,rootCategoriesFetching=_ref.rootCategoriesFetching;useEffect(function(){if(!subcategories){fetchCategory(categoryId);}},[categoryId,fetchCategory,subcategories]);if(!subcategories&&rootCategoriesFetching){return React.createElement("li",{className:item},React.createElement(LoadingIndicator,{className:loadingIndicator}));}if(!subcategories||Array.isArray(subcategories)&&subcategories.length===0){return null;}return React.createElement("li",{className:list},React.createElement(SideNavigationCategoriesItemChildren,{level:0,subcategories:subcategories}));};SideNavigationCategories.defaultProps={subcategories:null,categoryId:null,rootCategoriesFetching:false};export default connect(SideNavigationCategories);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var colors=themeConfig.colors;export var list=css({borderBottom:"1px solid ".concat(colors.shade7)});export var loadingIndicator=css({padding:0,margin:'auto'}).toString();
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{connect}from'react-redux';import _fetchCategory from'@shopgate/pwa-common-commerce/category/actions/getCategory';import{getCategory}from'@shopgate/pwa-common-commerce/category/selectors';import{makeGetSubcategoriesByCategoryId,makeGetAreChildCategoriesFetching}from"./selectors";/**
|
|
2
|
-
* Creates the mapStateToProps connector function.
|
|
3
|
-
* @returns {Function}
|
|
4
|
-
*/var makeMapStateToProps=function makeMapStateToProps(){var getSubcategoriesByCategoryId=makeGetSubcategoriesByCategoryId();var getAreChildCategoriesFetching=makeGetAreChildCategoriesFetching();return function(state,_ref){var categoryId=_ref.categoryId;return{category:getCategory(state,{categoryId:categoryId}),subcategories:getSubcategoriesByCategoryId(state,{categoryId:categoryId}),subcategoriesFetching:getAreChildCategoriesFetching(state,{categoryId:categoryId})};};};/**
|
|
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=function mapDispatchToProps(dispatch){return{fetchCategory:function fetchCategory(id){return dispatch(_fetchCategory(id));}};};export default connect(makeMapStateToProps,mapDispatchToProps);
|
|
@@ -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 React,{useState,useCallback,useMemo,useEffect}from'react';import ArrowDrop from'@shopgate/pwa-ui-shared/icons/ArrowDropIcon';import{bin2hex}from'@shopgate/pwa-common/helpers/data';import{CATEGORY_PATH}from'@shopgate/pwa-common-commerce/category/constants';import{ProgressBar}from'@shopgate/pwa-ui-shared';// eslint-disable-next-line import/no-cycle
|
|
2
|
-
import SideNavigationCategoriesItemChildren from"./SideNavigationCategoriesItemChildren";import SideNavigationItem from"./SideNavigationItem";import connect from"./SideNavigationCategoriesItem.connector";import{chevronButton,chevronUp,chevronDown,progressBar,open}from"./SideNavigationCategoriesItem.style";import{useSideNavigation}from"./SideNavigation.hooks";/**
|
|
3
|
-
* The SideNavigationCategoriesItem component
|
|
4
|
-
* @returns {JSX}
|
|
5
|
-
*/var SideNavigationCategoriesItem=function SideNavigationCategoriesItem(_ref){var categoryId=_ref.categoryId,category=_ref.category,subcategories=_ref.subcategories,subcategoriesFetching=_ref.subcategoriesFetching,fetchCategory=_ref.fetchCategory,level=_ref.level;var _useState=useState(false),_useState2=_slicedToArray(_useState,2),isOpen=_useState2[0],setIsOpen=_useState2[1];var _useState3=useState(false),_useState4=_slicedToArray(_useState3,2),isLoading=_useState4[0],setIsLoading=_useState4[1];var _useSideNavigation=useSideNavigation(),maxCategoryNesting=_useSideNavigation.maxCategoryNesting,activeCategoryId=_useSideNavigation.activeCategoryId;var hasSubcategories=useMemo(function(){return category.childrenCount!==0;},[category.childrenCount]);var maxNestingReached=useMemo(function(){return level+1===maxCategoryNesting;},[level,maxCategoryNesting]);var handleClick=useCallback(function(){setIsOpen(!isOpen);if(hasSubcategories&&!subcategories){setIsLoading(true);fetchCategory(categoryId);}},[categoryId,fetchCategory,hasSubcategories,isOpen,subcategories]);useEffect(function(){if(isLoading&&(subcategories||!subcategoriesFetching)){setIsLoading(false);}},[isLoading,subcategories,subcategoriesFetching]);var buttonRight=useMemo(function(){if(!maxNestingReached&&hasSubcategories){return React.createElement("button",{type:"button",onClick:handleClick,className:chevronButton},React.createElement(ArrowDrop,{className:(isOpen&&subcategories?chevronUp:chevronDown).toString()}));}return null;},[handleClick,hasSubcategories,isOpen,maxNestingReached,subcategories]);if(!category){return null;}return React.createElement(SideNavigationItem,{href:"".concat(CATEGORY_PATH,"/").concat(bin2hex(categoryId)),label:category.name,level:level,buttonRight:buttonRight,forceActive:activeCategoryId===categoryId,className:level===0&&isOpen?open:null},isLoading&&React.createElement("div",{className:progressBar},React.createElement(ProgressBar,null)),!maxNestingReached&&isOpen&&hasSubcategories&&subcategories&&React.createElement(SideNavigationCategoriesItemChildren,{subcategories:subcategories,level:level+1}));};SideNavigationCategoriesItem.defaultProps={subcategories:null,subcategoriesFetching:false,categoryId:null,level:0};export default connect(SideNavigationCategoriesItem);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var variables=themeConfig.variables;export var chevronButton=css({flexShrink:0,outline:0,margin:"0 -".concat(variables.gap.big,"px 0 ").concat(variables.gap.small,"px"),fontSize:'1.6em',color:'#373D41',position:'relative'});export var chevron=css({transformOrigin:'center center',transition:'transform 250ms cubic-bezier(0.25, 0.1, 0.25, 1)'});export var chevronDown=css(chevron,{transform:'rotateZ(0deg)'});export var chevronUp=css(chevron,{transform:'rotateZ(180deg)'});export var progressBar=css({position:'absolute',overflow:'hidden',width:'100%',bottom:0,height:3});export var open=css({// borderRight: '2px solid var(--color-primary)',
|
|
2
|
-
}).toString();export var loadingIndicator=css({position:'absolute',padding:0,top:'50%',marginTop:'-50%',paddingTop:1,right:3}).toString();
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from'react';// eslint-disable-next-line import/no-cycle
|
|
2
|
-
import SideNavigationCategoriesItem from"./SideNavigationCategoriesItem";/**
|
|
3
|
-
* The SideNavigationCategoriesItemChildren component
|
|
4
|
-
* @returns {JSX}
|
|
5
|
-
*/var SideNavigationCategoriesItemChildren=function SideNavigationCategoriesItemChildren(_ref){var subcategories=_ref.subcategories,level=_ref.level;return React.createElement("ul",null,subcategories.map(function(category){return React.createElement(SideNavigationCategoriesItem,{key:category.id,level:level,categoryId:category.id});}));};export default SideNavigationCategoriesItemChildren;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import React,{useMemo}from'react';import{INDEX_PATH}from'@shopgate/pwa-common/constants/RoutePaths';import SideNavigationCategories from"./SideNavigationCategories";import SideNavigationLinks from"./SideNavigationLinks";import SideNavigationItem from"./SideNavigationItem";import{useSideNavigation}from"./SideNavigation.hooks";import{container}from"./SideNavigationContent.style";/**
|
|
2
|
-
* @returns {JSX}
|
|
3
|
-
*/var SideNavigationContent=function SideNavigationContent(_ref){var classNames=_ref.classNames;var _useSideNavigation=useSideNavigation(),isVisible=_useSideNavigation.isVisible;var wrapperClass=useMemo(function(){if(!classNames){return'';}var _classNames$visible=classNames.visible,visible=_classNames$visible===void 0?'':_classNames$visible,_classNames$hidden=classNames.hidden,hidden=_classNames$hidden===void 0?'':_classNames$hidden;return isVisible?visible:hidden;},[classNames,isVisible]);return React.createElement("div",{className:wrapperClass},isVisible&&React.createElement("nav",{className:container},React.createElement("ul",null,React.createElement(SideNavigationItem,{href:INDEX_PATH,label:"navigation.home"}),React.createElement(SideNavigationCategories,null),React.createElement(SideNavigationLinks,null))));};SideNavigationContent.defaultProps={classNames:null};export default SideNavigationContent;
|
|
@@ -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,{useMemo,memo}from'react';import classNames from'classnames';import Link from'@shopgate/pwa-common/components/Link';import{i18n}from'@shopgate/engage/core';import{getIndentation,item,itemActive,link,linkActive,list}from"./SideNavigationItem.style";import{useSideNavigation}from"./SideNavigation.hooks";/**
|
|
2
|
-
* SideNavigationItem component
|
|
3
|
-
* @returns {JSX}
|
|
4
|
-
*/var SideNavigationItem=function SideNavigationItem(_ref){var level=_ref.level,href=_ref.href,label=_ref.label,buttonRight=_ref.buttonRight,children=_ref.children,forceActive=_ref.forceActive,forceInactive=_ref.forceInactive,className=_ref.className,onClick=_ref.onClick;var _useSideNavigation=useSideNavigation(),currentPathname=_useSideNavigation.currentPathname;var isActive=useMemo(function(){return!forceInactive&&(currentPathname===href||forceActive);},[currentPathname,forceActive,forceInactive,href]);return React.createElement("li",{className:classNames(list,className)},React.createElement("div",{className:classNames(item,_defineProperty({},itemActive,isActive))},href?React.createElement(Link,{tag:"a",href:href,className:classNames(link,getIndentation(level),_defineProperty({},linkActive,isActive))},i18n.text(label)):React.createElement("button",{type:"button",className:classNames(link,getIndentation(level),_defineProperty({},linkActive,isActive)),onClick:onClick},i18n.text(label)),buttonRight),children);};SideNavigationItem.defaultProps={buttonRight:null,children:null,forceActive:false,forceInactive:false,level:0,href:null,className:null,onClick:function onClick(){}};export default memo(SideNavigationItem);
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var variables=themeConfig.variables;/**
|
|
2
|
-
* @param {number} level The indentation level
|
|
3
|
-
* @returns {string}
|
|
4
|
-
*/export var getIndentation=function getIndentation(){var level=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;return css({paddingLeft:level*variables.gap.big}).toString();};export var list=css({position:'relative'}).toString();export var item=css({alignItems:'center',display:'flex',textAlign:'left',outline:0,padding:variables.gap.big,position:'relative',width:'100%',lineHeight:'1.45em'}).toString();export var itemActive=css({background:'var(--color-side-navigation-active-background)'}).toString();export var link=css({flexGrow:1,textAlign:'left',outline:0,color:'var(--color-text-high-emphasis)',':hover':{color:'var(--color-primary)'}}).toString();export var linkActive=css({color:'var(--color-primary) !important'}).toString();
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React,{Fragment}from'react';import{FAVORITES_PATH}from'@shopgate/pwa-common-commerce/favorites/constants';import{CART_PATH}from'@shopgate/pwa-common-commerce/cart/constants';import{LOGIN_PATH}from'@shopgate/pwa-common/constants/RoutePaths';import appConfig from'@shopgate/pwa-common/helpers/config';import{useSideNavigation}from"./SideNavigation.hooks";import SideNavigationItem from"./SideNavigationItem";import SideNavigationNestedItem from"./SideNavigationNestedItem";import SideNavigationLinksQuicklinks from"./SideNavigationLinksQuicklinks";import SideNavigationLinksLegal from"./SideNavigationLinksLegal";import{PROFILE_PATH,WISH_LIST_PATH,ORDERS_PATH}from"../../account";/**
|
|
2
|
-
* SideNavigationLinks component
|
|
3
|
-
* @returns {JSX}
|
|
4
|
-
*/var SideNavigationLinks=function SideNavigationLinks(){var _useSideNavigation=useSideNavigation(),isLoggedIn=_useSideNavigation.isLoggedIn,logout=_useSideNavigation.logout,currentPathname=_useSideNavigation.currentPathname;var isAccountActive=currentPathname===PROFILE_PATH||currentPathname===ORDERS_PATH||currentPathname===WISH_LIST_PATH;return React.createElement(Fragment,null,React.createElement(SideNavigationItem,{href:CART_PATH,label:"navigation.cart"}),!isLoggedIn&&appConfig.hasFavorites?React.createElement(SideNavigationItem,{href:FAVORITES_PATH,label:"navigation.favorites"}):null,isLoggedIn&&React.createElement(SideNavigationNestedItem,{href:PROFILE_PATH,label:"navigation.your_account",forceActive:isAccountActive,level:0},React.createElement("ul",null,React.createElement(SideNavigationItem,{level:1,href:PROFILE_PATH,label:"titles.profile"}),React.createElement(SideNavigationItem,{level:1,href:ORDERS_PATH,label:"titles.order_history"}),appConfig.hasFavorites?React.createElement(SideNavigationItem,{level:1,href:WISH_LIST_PATH,label:"titles.favorites"}):null)),React.createElement(SideNavigationLinksQuicklinks,null),React.createElement(SideNavigationLinksLegal,null),isLoggedIn?React.createElement(SideNavigationItem,{onClick:logout,label:"navigation.logout"}):React.createElement(SideNavigationItem,{href:LOGIN_PATH,label:"navigation.login_register"}));};export default SideNavigationLinks;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{connect}from'react-redux';import{makeGetMenu,makeGetIsFetchingMenu}from'@shopgate/engage/core';import{LEGAL_MENU}from'@shopgate/pwa-common/constants/MenuIDs';/**
|
|
2
|
-
* Creates the mapStateToProps connector function.
|
|
3
|
-
* @returns {Function}
|
|
4
|
-
*/var makeMapStateToProps=function makeMapStateToProps(){var getMenu=makeGetMenu(LEGAL_MENU);var getIsFetchingMenu=makeGetIsFetchingMenu(LEGAL_MENU);return function(state){return{links:getMenu(state),isFetching:getIsFetchingMenu(state)};};};export default connect(makeMapStateToProps);
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from'react';import SideNavigationItem from"./SideNavigationItem";import connect from"./SideNavigationLinksLegal.connector";/**
|
|
2
|
-
*
|
|
3
|
-
* @param {Object} props The component props
|
|
4
|
-
* @returns {JSX}
|
|
5
|
-
*/var SideNavigationLinksLegal=function SideNavigationLinksLegal(_ref){var links=_ref.links;if(!links){return null;}return links.map(function(_ref2){var label=_ref2.label,url=_ref2.url;return React.createElement(SideNavigationItem,{key:url,href:url,label:label});});};SideNavigationLinksLegal.defaultProps={links:null,isFetching:false};export default connect(SideNavigationLinksLegal);
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{connect}from'react-redux';import{makeGetMenu,makeGetIsFetchingMenu}from'@shopgate/engage/core';import{QUICKLINKS_MENU}from'@shopgate/pwa-common/constants/MenuIDs';/**
|
|
2
|
-
* Creates the mapStateToProps connector function.
|
|
3
|
-
* @returns {Function}
|
|
4
|
-
*/var makeMapStateToProps=function makeMapStateToProps(){var getMenu=makeGetMenu(QUICKLINKS_MENU);var getIsFetchingMenu=makeGetIsFetchingMenu(QUICKLINKS_MENU);return function(state){return{links:getMenu(state),isFetching:getIsFetchingMenu(state)};};};export default connect(makeMapStateToProps);
|