@shopgate/engage 7.27.3-alpha.17 → 7.27.3-alpha.18
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/action-creators/index.js +9 -0
- package/a11y/components/FocusTrap/index.js +1 -0
- 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/ModalStateTracker/index.js +14 -0
- 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/constants/index.js +1 -0
- package/a11y/helpers/index.js +1 -0
- package/a11y/hooks/index.js +37 -0
- package/a11y/index.js +1 -4
- package/a11y/reducers/index.js +6 -0
- package/a11y/selectors/index.js +8 -0
- package/a11y/styles.js +2 -0
- package/account/actions/addContacts.js +4 -0
- package/account/actions/deleteContact.js +5 -0
- package/account/actions/deleteCustomer.js +4 -0
- package/account/actions/fetchContacts.js +4 -0
- package/account/actions/fetchCustomer.js +4 -0
- package/account/actions/updateContact.js +4 -0
- package/account/actions/updateCustomer.js +4 -0
- package/account/components/Account/Account.connector.js +5 -0
- package/account/components/Account/Account.js +4 -0
- package/account/components/Account/Account.style.js +1 -0
- package/account/components/Account/index.js +1 -0
- package/account/components/Profile/Profile.config.js +11 -0
- package/account/components/Profile/Profile.constraints.js +1 -0
- package/account/components/Profile/Profile.js +1 -0
- package/account/components/Profile/Profile.provider.js +22 -0
- package/account/components/Profile/ProfileAddressBook.js +6 -0
- package/account/components/Profile/ProfileAddressCard.js +3 -0
- package/account/components/Profile/ProfileForm.js +3 -0
- package/account/components/Profile/ProfileHeader.js +3 -0
- package/account/components/Profile/index.js +1 -0
- package/account/components/ProfileContact/ProfileContact.config.js +11 -0
- package/account/components/ProfileContact/ProfileContact.constraints.js +5 -0
- package/account/components/ProfileContact/ProfileContact.js +13 -0
- package/account/components/ProfileContact/index.js +1 -0
- package/account/components/index.js +1 -0
- package/account/constants/actions.js +1 -0
- package/account/constants/index.js +1 -1
- package/account/constants/pipelines.js +1 -0
- package/account/helper/form.js +61 -0
- package/account/index.js +1 -1
- package/account/reducers/index.js +6 -0
- package/account/selectors/contacts.js +7 -0
- package/account/selectors/customer.js +7 -0
- package/app-rating/actions/showModal.js +3 -3
- package/app-rating/helpers/index.js +1 -1
- package/app-rating/subscriptions/index.js +11 -6
- 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 +5 -3
- package/back-in-stock/streams/index.js +1 -1
- package/back-in-stock/subscriptions/index.js +2 -2
- package/cart/cart.constants.js +1 -0
- package/cart/cart.context.js +1 -0
- package/cart/cart.helpers.js +15 -0
- package/cart/cart.hooks.js +4 -0
- package/cart/cart.selectors.js +34 -0
- package/cart/cart.types.js +1 -0
- package/cart/components/CartHeaderWide/CartHeaderWide.js +3 -0
- package/cart/components/CartHeaderWide/CartHeaderWide.style.js +1 -0
- package/cart/components/CartHeaderWide/index.js +1 -0
- package/cart/components/CartItem/CartItem.hooks.js +7 -0
- package/cart/components/CartItem/CartItem.js +7 -0
- package/cart/components/CartItem/CartItem.style.js +1 -0
- package/cart/components/CartItem/CartItemCoupon.connector.js +7 -0
- package/cart/components/CartItem/CartItemCoupon.js +20 -0
- package/cart/components/CartItem/CartItemCoupon.style.js +5 -0
- package/cart/components/CartItem/CartItemCoupon.types.js +0 -0
- package/cart/components/CartItem/CartItemCouponCode.js +5 -0
- package/cart/components/CartItem/CartItemCouponDelete.js +5 -0
- package/cart/components/CartItem/CartItemCouponDelete.style.js +1 -0
- package/cart/components/CartItem/CartItemCouponFreeShipping.js +5 -0
- package/cart/components/CartItem/CartItemCouponIcon.js +4 -0
- package/cart/components/CartItem/CartItemCouponLayout.js +6 -0
- package/cart/components/CartItem/CartItemCouponLayout.style.js +5 -0
- package/cart/components/CartItem/CartItemCouponPrice.js +5 -0
- package/cart/components/CartItem/CartItemCouponPrice.style.js +1 -0
- package/cart/components/CartItem/CartItemCouponTitle.js +5 -0
- package/cart/components/CartItem/CartItemCouponTitle.style.js +1 -0
- package/cart/components/CartItem/CartItemProduct.js +5 -0
- package/cart/components/CartItem/CartItemProduct.style.js +1 -0
- package/cart/components/CartItem/CartItemProductLayout.js +6 -0
- package/cart/components/CartItem/CartItemProductLayout.style.js +1 -0
- package/cart/components/CartItem/CartItemProductLayoutWide.js +4 -0
- package/cart/components/CartItem/CartItemProductLayoutWide.style.js +1 -0
- package/cart/components/CartItem/CartItemProductLayoutWideFulfillmentLabel.js +4 -0
- package/cart/components/CartItem/CartItemProductLayoutWideFulfillmentLabel.style.js +1 -0
- package/cart/components/CartItem/CartItemProductLayoutWideOrderDetails.js +3 -0
- package/cart/components/CartItem/CartItemProductLayoutWideRemoveItem.js +4 -0
- package/cart/components/CartItem/CartItemProductLayoutWideRemoveItem.style.js +1 -0
- package/cart/components/CartItem/CartItemProductOrderDetails.js +3 -0
- package/cart/components/CartItem/CartItemProductOrderDetails.style.js +1 -0
- package/cart/components/CartItem/CartItemProductPriceCaption.js +4 -0
- package/cart/components/CartItem/CartItemProductPriceCaption.style.js +1 -0
- package/cart/components/CartItem/CartItemProductPriceList.js +5 -0
- package/cart/components/CartItem/CartItemProductPriceListPromotion.js +10 -0
- package/cart/components/CartItem/CartItemProductProvider.connector.js +9 -0
- package/cart/components/CartItem/CartItemProductProvider.context.js +1 -0
- package/cart/components/CartItem/CartItemProductProvider.js +12 -0
- package/cart/components/CartItem/CartItemProductProvider.types.js +1 -0
- package/cart/components/CartItem/CartItemProductProviderLegacy.js +22 -0
- package/cart/components/CartItem/CartItemProductTitle.js +7 -0
- package/cart/components/CartItem/CartItemProductTitle.style.js +1 -0
- package/cart/components/CartItem/CartItemProvider.connector.js +3 -0
- package/cart/components/CartItem/CartItemProvider.context.js +1 -0
- package/cart/components/CartItem/CartItemProvider.js +5 -0
- package/cart/components/CartItem/CartItemQuantityPicker.js +38 -0
- package/cart/components/CartItem/CartItemQuantityPicker.style.js +1 -0
- package/cart/components/CartItem/CartItemSubstitution.connector.js +5 -0
- package/cart/components/CartItem/CartItemSubstitution.js +5 -0
- package/cart/components/CartItem/CartItemSubstitution.style.js +1 -0
- package/cart/components/CartItem/index.js +1 -0
- package/cart/components/CartItems/CartItem.connector.js +4 -0
- package/cart/components/CartItems/CartItemCard.js +5 -0
- package/cart/components/CartItems/CartItemCard.style.js +1 -0
- package/cart/components/CartItems/CartItemCardReservation.js +5 -0
- package/cart/components/CartItems/CartItemCardReservationAccordion.js +4 -0
- package/cart/components/CartItems/CartItemCardReservationLabel.js +5 -0
- package/cart/components/CartItems/CartItemCardReservationLabelChangeStore.js +3 -0
- package/cart/components/CartItems/CartItemCardReservationLabelChangeStore.style.js +1 -0
- package/cart/components/CartItems/CartItemGroup.js +5 -0
- package/cart/components/CartItems/CartItemGroup.style.js +1 -0
- package/cart/components/CartItems/CartItemGroupReservation.js +5 -0
- package/cart/components/CartItems/CartItemGroupReservationLabel.js +5 -0
- package/cart/components/CartItems/CartItemGroupShipping.js +4 -0
- package/cart/components/CartItems/CartItems.js +5 -0
- package/cart/components/CartItems/CartItems.style.js +1 -0
- package/cart/components/CartItems/CartItemsHeaderWide.connector.js +3 -0
- package/cart/components/CartItems/CartItemsHeaderWide.js +3 -0
- package/cart/components/CartItems/CartItemsHeaderWide.style.js +1 -0
- package/cart/components/CartItems/CartItemsSubscription.connector.js +5 -0
- package/cart/components/CartItems/CartItemsSubstitution.js +5 -0
- package/cart/components/CartItems/index.js +1 -0
- package/cart/components/CartSummaryWide/CartSummaryWide.connector.js +4 -0
- package/cart/components/CartSummaryWide/CartSummaryWide.js +4 -0
- package/cart/components/CartSummaryWide/CartSummaryWide.style.js +1 -0
- package/cart/components/CartSummaryWide/CartSummaryWideCheckoutButton.connector.js +5 -0
- package/cart/components/CartSummaryWide/CartSummaryWideCheckoutButton.js +4 -0
- package/cart/components/CartSummaryWide/CartSummaryWideCheckoutButton.style.js +1 -0
- package/cart/components/CartSummaryWide/CartSummaryWideFooter.js +3 -0
- package/cart/components/CartSummaryWide/index.js +1 -0
- package/cart/components/PaymentBar/PaymentBar.js +5 -0
- package/cart/components/PaymentBar/PaymentBarAppliedPromotions.connector.js +5 -0
- package/cart/components/PaymentBar/PaymentBarAppliedPromotions.js +3 -0
- package/cart/components/PaymentBar/PaymentBarCheckoutButton.connector.js +5 -0
- package/cart/components/PaymentBar/PaymentBarCheckoutButton.js +5 -0
- package/cart/components/PaymentBar/PaymentBarCheckoutButton.style.js +1 -0
- package/cart/components/PaymentBar/PaymentBarContent.js +4 -0
- package/cart/components/PaymentBar/PaymentBarContent.style.js +1 -0
- package/cart/components/PaymentBar/PaymentBarDiscounts.connector.js +5 -0
- package/cart/components/PaymentBar/PaymentBarDiscounts.js +4 -0
- package/cart/components/PaymentBar/PaymentBarGrandTotal.connector.js +5 -0
- package/cart/components/PaymentBar/PaymentBarGrandTotal.js +4 -0
- package/cart/components/PaymentBar/PaymentBarPromotionCouponMessages.js +4 -0
- package/cart/components/PaymentBar/PaymentBarPromotionCoupons.connector.js +8 -0
- package/cart/components/PaymentBar/PaymentBarPromotionCoupons.js +3 -0
- package/cart/components/PaymentBar/PaymentBarPromotionalText.js +4 -0
- package/cart/components/PaymentBar/PaymentBarReserveButton.connector.js +1 -0
- package/cart/components/PaymentBar/PaymentBarReserveButton.js +7 -0
- package/cart/components/PaymentBar/PaymentBarShippingCost.connector.js +5 -0
- package/cart/components/PaymentBar/PaymentBarShippingCost.js +3 -0
- package/cart/components/PaymentBar/PaymentBarSubTotal.connector.js +5 -0
- package/cart/components/PaymentBar/PaymentBarSubTotal.js +3 -0
- package/cart/components/PaymentBar/PaymentBarTax.connector.js +5 -0
- package/cart/components/PaymentBar/PaymentBarTax.js +4 -0
- package/cart/components/PaymentBar/index.js +1 -0
- package/cart/components/Substitution/connector.js +5 -0
- package/cart/components/Substitution/index.js +9 -0
- package/cart/components/Substitution/style.js +1 -0
- package/cart/components/SupplementalContent/SupplementalContent.connector.js +4 -0
- package/cart/components/SupplementalContent/SupplementalContent.js +5 -0
- package/cart/components/SupplementalContent/SupplementalContent.styles.js +1 -0
- package/cart/components/SupplementalContent/index.js +1 -0
- package/cart/index.js +10 -5
- package/cart/streams/index.js +1 -0
- package/category/actions/index.js +1 -0
- package/category/components/CategoryImage/connector.js +5 -0
- package/category/components/CategoryImage/index.js +5 -0
- package/category/components/CategoryList/index.js +2 -2
- package/category/components/CategoryList/style.js +1 -1
- package/category/components/index.js +1 -0
- package/category/constants/index.js +1 -0
- package/category/helpers/index.js +1 -0
- package/category/index.js +1 -7
- package/category/selectors/index.js +2 -0
- package/category/streams/index.js +1 -0
- package/checkout/action-creators/addCheckoutCampaign.js +5 -0
- package/checkout/action-creators/clearCheckoutCampaign.js +5 -0
- package/checkout/action-creators/clearCheckoutOrder.js +4 -0
- package/checkout/action-creators/index.js +1 -0
- package/checkout/action-creators/validationErrorsCheckout.js +5 -0
- package/checkout/actions/errorCheckout.js +17 -0
- package/checkout/actions/fetchCheckoutOrder.js +4 -0
- package/checkout/actions/fetchPaymentMethods.js +4 -0
- package/checkout/actions/index.js +1 -0
- package/checkout/actions/initializeCheckout.js +4 -0
- package/checkout/actions/prepareCheckout.js +8 -0
- package/checkout/actions/submitCheckoutOrder.js +5 -0
- package/checkout/actions/updateCheckoutOrder.js +5 -0
- package/checkout/components/AddressBook/AddressBook.js +5 -0
- package/checkout/components/AddressBook/AddressList.js +9 -0
- package/checkout/components/AddressBook/index.js +1 -0
- package/checkout/components/AddressBookContact/AddressBookContact.js +5 -0
- package/checkout/components/AddressBookContact/index.js +1 -0
- package/checkout/components/Checkout/Checkout.js +4 -0
- package/checkout/components/Checkout/CheckoutActions.js +4 -0
- package/checkout/components/Checkout/CheckoutAddress.js +6 -0
- package/checkout/components/Checkout/CheckoutHeader.js +4 -0
- package/checkout/components/Checkout/CheckoutPickupContactForm.config.js +8 -0
- package/checkout/components/Checkout/CheckoutPickupContactForm.js +4 -0
- package/checkout/components/Checkout/CheckoutSection.js +4 -0
- package/checkout/components/Checkout/CheckoutSectionInfo.js +4 -0
- package/checkout/components/Checkout/CheckoutSectionMessages.js +4 -0
- package/checkout/components/Checkout/CheckoutSummary.js +4 -0
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmation.connector.js +3 -0
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmation.js +7 -0
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationBilledTo.js +4 -0
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationOrderContact.js +4 -0
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationOrderSummary.js +4 -0
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationPickUpContact.js +4 -0
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationPickupNotes.js +4 -0
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationSection.js +4 -0
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationShippedTo.js +4 -0
- package/checkout/components/CheckoutConfirmation/index.js +1 -0
- package/checkout/components/GuestCheckout/GuestCheckout.js +4 -0
- package/checkout/components/GuestCheckout/GuestCheckoutOptIn.config.js +4 -0
- package/checkout/components/GuestCheckout/GuestCheckoutOptIn.js +3 -0
- package/checkout/components/GuestCheckout/GuestCheckoutPickup.js +4 -0
- package/checkout/components/GuestCheckout/GuestCheckoutPickupNotes.config.js +4 -0
- package/checkout/components/GuestCheckout/GuestCheckoutPickupNotes.js +4 -0
- package/checkout/components/PaymentMethodButton/PaymentMethodButton.js +5 -0
- package/checkout/components/PaymentMethodButton/index.js +1 -0
- package/checkout/components/ResponsiveBackButton/ResponsiveBackButton.js +4 -0
- package/checkout/components/ResponsiveBackButton/ResponsiveBackButton.style.js +1 -0
- package/checkout/components/ResponsiveBackButton/index.js +1 -0
- package/checkout/components/ShippingMethods/ShippingMethod.js +5 -0
- package/checkout/components/ShippingMethods/ShippingMethods.js +23 -0
- package/checkout/components/ShippingMethods/connector.js +7 -0
- package/checkout/components/ShippingMethods/index.js +1 -0
- package/checkout/components/SupplementalContent/SupplementalContent.connector.js +4 -0
- package/checkout/components/SupplementalContent/SupplementalContent.js +5 -0
- package/checkout/components/SupplementalContent/SupplementalContent.styles.js +1 -0
- package/checkout/components/SupplementalContent/index.js +1 -0
- package/checkout/components/index.js +1 -0
- package/checkout/constants/actionTypes.js +1 -0
- package/checkout/constants/errorCodes.js +1 -0
- package/checkout/constants/index.js +1 -0
- package/checkout/constants/routes.js +1 -0
- package/checkout/helpers/index.js +34 -0
- package/checkout/hooks/common.js +7 -0
- package/checkout/index.js +6 -5
- package/checkout/paymentMethods/context.js +1 -0
- package/checkout/paymentMethods/index.js +28 -0
- package/checkout/paymentMethods/paypal/PaypalButton.js +5 -0
- package/checkout/paymentMethods/paypal/PaypalButtonApp.js +4 -0
- package/checkout/paymentMethods/paypal/PaypalButtonWeb.js +8 -0
- package/checkout/paymentMethods/paypal/PaypalPayButton.js +12 -0
- package/checkout/paymentMethods/paypal/PaypalProvider.js +6 -0
- package/checkout/paymentMethods/paypal/index.js +1 -0
- package/checkout/paymentMethods/paypal/paypal_logo.png +0 -0
- package/checkout/paymentMethods/paypal/sdk.js +9 -0
- package/checkout/paymentMethods/stripe/StripeButton.connector.js +6 -0
- package/checkout/paymentMethods/stripe/StripeButton.js +5 -0
- package/checkout/paymentMethods/stripe/StripeCreditCard.js +10 -0
- package/checkout/paymentMethods/stripe/StripePayButton.js +6 -0
- package/checkout/paymentMethods/stripe/StripeProvider.connector.js +6 -0
- package/checkout/paymentMethods/stripe/StripeProvider.context.js +1 -0
- package/checkout/paymentMethods/stripe/StripeProvider.js +33 -0
- package/checkout/paymentMethods/stripe/applepay.svg +84 -0
- package/checkout/paymentMethods/stripe/googlepay.png +0 -0
- package/checkout/paymentMethods/stripe/index.js +1 -0
- package/checkout/paymentMethods/stripe/sdk.js +9 -0
- package/checkout/providers/AddressBookProvider.context.js +1 -0
- package/checkout/providers/AddressBookProvider.js +11 -0
- package/checkout/providers/CheckoutProvider.connector.js +7 -0
- package/checkout/providers/CheckoutProvider.constraints.js +1 -0
- package/checkout/providers/CheckoutProvider.context.js +1 -0
- package/checkout/providers/CheckoutProvider.js +28 -0
- package/checkout/reducers/index.js +6 -0
- package/checkout/selectors/campaign.js +5 -0
- package/checkout/selectors/guestCheckout.js +5 -0
- package/checkout/selectors/order.js +59 -0
- package/checkout/selectors/payment.js +17 -0
- package/checkout/selectors/route.js +4 -0
- package/checkout/streams/index.js +1 -0
- package/checkout/subscriptions/index.js +3 -0
- package/components/BrandingColorBanner/BrandingColorBanner.js +5 -0
- package/components/BrandingColorBanner/index.js +1 -0
- package/components/ChipLayout/index.js +7 -7
- package/components/ChipLayout/spec.js +1 -1
- package/components/ChipLayout/style.js +2 -2
- package/components/ConditionalWrapper/ConditionalWrapper.js +10 -0
- package/components/ConditionalWrapper/index.js +1 -5
- package/components/ConnectedReactPortal/index.js +13 -0
- package/components/Footer/Footer.js +4 -23
- package/components/Footer/Footer.style.js +1 -7
- package/components/Footer/constants.js +1 -0
- package/components/Footer/helpers.js +75 -0
- package/components/Form/Builder/Builder.constants.js +1 -1
- package/components/Form/Builder/Builder.js +53 -37
- package/components/Form/Builder/ElementCheckbox.js +2 -2
- package/components/Form/Builder/ElementMultiSelect.js +6 -0
- package/components/Form/Builder/ElementPhoneNumber.js +20 -0
- 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/FormHelper.js +5 -0
- package/components/Form/Builder/classes/ActionListener.constants.js +2 -2
- package/components/Form/Builder/classes/ActionListener.js +72 -15
- 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/Builder/helpers/common.js +6 -0
- package/components/Form/Builder/stylePresets.js +1 -0
- package/components/Form/Form.js +11 -8
- package/components/Form/index.js +1 -1
- package/components/IntersectionVisibility/index.js +13 -6
- package/components/Logo/connector.js +4 -0
- package/components/Logo/index.js +2 -2
- package/components/Logo/spec.js +1 -1
- package/components/Logo/style.js +1 -1
- package/components/Menu/components/Item/index.js +8 -0
- package/components/Menu/components/Item/style.js +4 -0
- package/components/Menu/components/Position/index.js +16 -0
- package/components/Menu/components/Position/style.js +1 -0
- package/components/Menu/index.js +12 -0
- package/components/Menu/style.js +1 -0
- package/components/MessageBar/MessageBar.js +9 -0
- package/components/MessageBar/MessageBar.style.js +11 -0
- package/components/MessageBar/index.js +1 -7
- 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 +19 -10
- package/components/Picker/spec.js +2 -2
- package/components/PickerUtilize/components/Button/index.js +1 -1
- package/components/PickerUtilize/index.js +8 -6
- package/components/PickerUtilize/spec.js +2 -1
- package/components/QuantityInput/QuantityInput.js +5 -4
- package/components/QuantityLabel/QuantityLabel.js +4 -0
- package/components/QuantityLabel/index.js +1 -0
- package/components/Radio/Radio.js +5 -0
- package/components/Radio/index.js +1 -0
- package/components/RadioCard/RadioCard.js +9 -0
- package/components/RadioCard/index.js +1 -0
- package/components/RadioGroup/RadioGroup.context.js +1 -0
- package/components/RadioGroup/RadioGroup.js +4 -0
- package/components/RadioGroup/index.js +1 -0
- package/components/RadioGroup/useRadioGroup.js +4 -0
- 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 +35 -23
- package/components/RangeSlider/spec.js +4 -4
- package/components/ResponsiveContainer/ResponsiveContainer.js +6 -0
- package/components/ResponsiveContainer/breakpoints.js +14 -0
- package/components/ResponsiveContainer/condition.js +6 -0
- package/components/ResponsiveContainer/hooks.js +20 -0
- package/components/ResponsiveContainer/index.js +1 -0
- package/components/ResponsiveContainer/listener.js +10 -0
- package/components/ResponsiveContainer/mediaQuery.js +8 -0
- package/components/ScrollHeader/index.js +22 -5
- package/components/ScrollHeader/style.js +1 -1
- package/components/SheetDrawer/index.js +4 -3
- 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/SideNavigation/SideNavigation.hooks.js +4 -0
- package/components/SideNavigation/SideNavigation.js +4 -0
- package/components/SideNavigation/SideNavigationCategories.connector.js +8 -0
- package/components/SideNavigation/SideNavigationCategories.js +4 -0
- package/components/SideNavigation/SideNavigationCategories.style.js +1 -0
- package/components/SideNavigation/SideNavigationCategoriesItem.connector.js +8 -0
- package/components/SideNavigation/SideNavigationCategoriesItem.js +5 -0
- package/components/SideNavigation/SideNavigationCategoriesItem.style.js +2 -0
- package/components/SideNavigation/SideNavigationCategoriesItemChildren.js +5 -0
- package/components/SideNavigation/SideNavigationContent.js +3 -0
- package/components/SideNavigation/SideNavigationContent.style.js +4 -0
- package/components/SideNavigation/SideNavigationItem.js +4 -0
- package/components/SideNavigation/SideNavigationItem.style.js +4 -0
- package/components/SideNavigation/SideNavigationLinks.js +4 -0
- package/components/SideNavigation/SideNavigationLinksLegal.connector.js +4 -0
- package/components/SideNavigation/SideNavigationLinksLegal.js +5 -0
- package/components/SideNavigation/SideNavigationLinksQuicklinks.connector.js +4 -0
- package/components/SideNavigation/SideNavigationLinksQuicklinks.js +5 -0
- package/components/SideNavigation/SideNavigationNestedItem.js +4 -0
- package/components/SideNavigation/SideNavigationProvider.connector.js +8 -0
- package/components/SideNavigation/SideNavigationProvider.context.js +1 -0
- package/components/SideNavigation/SideNavigationProvider.js +4 -0
- package/components/SideNavigation/index.js +1 -0
- package/components/SideNavigation/selectors.js +17 -0
- package/components/SnackBarContainer/index.js +1 -1
- package/components/Switch/index.js +1 -1
- package/components/Tabs/TabContext.js +7 -0
- package/components/Tabs/components/Tab.js +11 -0
- package/components/Tabs/components/Tab.style.js +1 -0
- package/components/Tabs/components/TabIndicator.js +5 -0
- package/components/Tabs/components/TabIndicator.style.js +1 -0
- package/components/Tabs/components/TabPanel.js +5 -0
- package/components/Tabs/components/Tabs.js +11 -0
- package/components/Tabs/components/Tabs.style.js +2 -0
- package/components/Tabs/debounce.js +11 -0
- package/components/Tabs/index.js +1 -0
- package/components/Tabs/ownerDocument.js +4 -0
- package/components/Tabs/ownerWindow.js +4 -0
- package/components/Tabs/useEventCallback.js +6 -0
- package/components/TextLink/TextLink.js +5 -0
- package/components/TextLink/TextLink.style.js +1 -0
- package/components/TimeBoundary/index.js +10 -8
- package/components/TimeBoundary/spec.js +3 -3
- package/components/Toggle/index.js +5 -0
- package/components/Toggle/style.js +1 -0
- package/components/VideoPlayer/index.js +9 -6
- 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 +24 -7
- package/components/View/style.js +1 -6
- package/components/index.js +4 -4
- package/core/action-creators/appPermissions.js +1 -1
- package/core/action-creators/index.js +1 -1
- package/core/action-creators/merchantSettings.js +5 -0
- package/core/action-creators/optIns.js +37 -0
- package/core/action-creators/shopSettings.js +9 -0
- package/core/actions/getGeolocation.js +2 -2
- package/core/actions/grantAppTrackingTransparencyPermission.js +3 -1
- package/core/actions/grantGeolocationPermissions.js +6 -2
- package/core/actions/grantPermissions.js +16 -4
- package/core/actions/grantPushPermissions.js +4 -3
- package/core/actions/index.js +2 -2
- package/core/actions/requestAppPermission.js +7 -2
- package/core/actions/requestAppPermissionStatus.js +7 -2
- package/core/actions/updateStatusBarBackground.js +3 -3
- package/core/classes/GeolocationRequest.js +8 -4
- package/core/classes/GeolocationRequestApp.js +16 -0
- package/core/classes/GeolocationRequestBrowser.js +8 -0
- package/core/collections/AppInitialization.js +4 -6
- package/core/config/ThemeConfigResolver.js +3 -3
- package/core/config/config.action-creators.js +12 -0
- package/core/config/config.actions.js +3 -0
- package/core/config/config.constants.js +1 -0
- package/core/config/config.reducers.js +6 -0
- package/core/config/config.selectors.js +39 -0
- package/core/config/config.streams.js +1 -0
- package/core/config/config.subscriptions.js +4 -0
- package/core/config/config.types.js +0 -0
- package/core/config/index.js +1 -0
- package/core/constants/appFeatures.js +1 -1
- package/core/constants/deviceTypes.js +1 -0
- package/core/constants/geolocationRequest.js +1 -1
- package/core/constants/index.js +3 -3
- package/core/constants/merchantSettings.js +1 -0
- package/core/constants/optIns.js +1 -0
- package/core/constants/pipelines.js +1 -0
- package/core/constants/shopSettings.js +2 -0
- package/core/contexts/AppContext.js +1 -1
- package/core/contexts/ThemeResourcesContext.d.ts +60 -0
- package/core/contexts/ThemeResourcesContext.js +3 -0
- package/core/contexts/index.js +1 -0
- package/core/events/index.js +1 -0
- package/core/helpers/androidNavigationBar.js +12 -0
- package/core/helpers/appFeatures.js +21 -9
- package/core/helpers/appPermissions.js +58 -0
- package/core/helpers/baseUrl.js +1 -1
- package/core/helpers/bridge.js +4 -0
- package/core/helpers/deviceType.js +5 -0
- package/core/helpers/environment.js +4 -0
- package/core/helpers/errorBehavior.js +32 -0
- package/core/helpers/featureFlag.js +11 -0
- package/core/helpers/getFullImageSource.js +21 -2
- package/core/helpers/googleMaps.js +8 -0
- package/core/helpers/i18n.js +10 -5
- package/core/helpers/index.js +3 -3
- package/core/helpers/isIOSTheme.js +4 -0
- package/core/helpers/isTouchDevice.js +4 -0
- package/core/helpers/nl2br.js +1 -0
- package/core/helpers/scrollContainer.js +4 -0
- package/core/helpers/string.js +9 -0
- package/core/helpers/svgToDataUrl.js +9 -0
- package/core/helpers/updateLegacyNavigationBar.js +5 -2
- package/core/hocs/index.js +1 -0
- 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 +42 -3
- package/core/hocs/withThemeResources.js +16 -0
- package/core/hocs/withWidgetSettings.js +1 -1
- package/core/hocs/withWidgetStyles.js +1 -1
- package/core/hooks/events/index.js +1 -0
- package/core/hooks/events/useLongPress.d.ts +68 -0
- package/core/hooks/events/useLongPress.js +13 -0
- package/core/hooks/events/useScrollDirectionChange.d.ts +74 -0
- package/core/hooks/events/useScrollDirectionChange.js +18 -0
- package/core/hooks/html/useLoadImage.js +1 -1
- package/core/hooks/index.js +1 -0
- package/core/hooks/layout/index.js +1 -0
- package/core/hooks/layout/useElementSize.d.ts +46 -0
- package/core/hooks/layout/useElementSize.js +18 -0
- package/core/hooks/useAsyncMemo.js +12 -0
- package/core/hooks/useFormState.js +27 -0
- package/core/hooks/usePrevious.js +2 -0
- package/core/hooks/useScrollTo.js +5 -0
- package/core/hooks/useTheme.js +38 -2
- package/core/hooks/useThemeResources.js +21 -0
- package/core/hooks/useWidgetStyles.js +1 -1
- package/core/index.js +5 -11
- package/core/initialization/index.js +19 -4
- package/core/providers/AppProvider.js +9 -9
- package/core/providers/ThemeResourcesProvider.js +15 -0
- package/core/providers/index.js +1 -0
- package/core/reducers/index.js +1 -1
- package/core/reducers/merchantSettings.js +6 -0
- package/core/reducers/shopSettings.js +6 -0
- package/core/selectors/index.js +1 -1
- package/core/selectors/merchantSettings.js +10 -0
- package/core/selectors/shopSettings.js +25 -0
- package/core/streams/app.js +1 -1
- package/core/streams/index.js +1 -1
- package/core/streams/optIns.js +13 -0
- package/core/subscriptions/app.js +4 -3
- package/core/validation/index.js +1 -0
- package/core/validation/validation.hooks.js +4 -0
- package/core/validation/validation.js +12 -0
- package/development/action-creators/index.js +1 -0
- package/development/action-creators/settings.js +9 -0
- package/development/action-creators/storage.js +6 -0
- package/development/components/DevelopmentTools/DevelopmentTools.js +6 -0
- package/development/components/DevelopmentTools/Shortcuts.js +4 -0
- package/development/components/DevelopmentTools/hooks.js +8 -0
- package/development/components/DevelopmentTools/index.js +1 -0
- package/development/components/SimulatedInsets/SimulatedInsetBottom.js +7 -0
- package/development/components/SimulatedInsets/SimulatedInsetTop.js +12 -0
- package/development/components/SimulatedInsets/SimulatedInsets.js +6 -0
- package/development/components/SimulatedInsets/index.js +1 -0
- package/development/components/index.js +1 -0
- package/development/constants/actionTypes.js +1 -0
- package/development/constants/index.js +1 -0
- package/development/reducers/index.js +1 -0
- package/development/reducers/settings.js +10 -0
- package/development/reducers/storage.js +9 -0
- package/development/selectors/index.js +1 -0
- package/development/selectors/settings.js +21 -0
- package/development/selectors/storage.js +16 -0
- package/development/streams/index.js +1 -0
- package/development/streams/insets.js +4 -0
- package/development/subscriptions/index.js +6 -0
- package/favorites/components/CommentDialog/CommentDialog.js +12 -0
- package/favorites/components/CommentDialog/index.js +1 -0
- package/favorites/components/FavoriteButtonWide/FavoriteButtonWide.js +8 -0
- package/favorites/components/FavoriteButtonWide/index.js +1 -0
- package/favorites/components/Item/Item.js +13 -9
- package/favorites/components/Item/ItemCharacteristics.js +2 -2
- package/favorites/components/Item/ItemNotes.js +7 -0
- package/favorites/components/Item/ItemQuantity.js +7 -0
- package/favorites/components/ItemFulfillmentMethod/ItemFulfillmentMethod.js +4 -0
- package/favorites/components/ItemFulfillmentMethod/index.js +1 -0
- package/favorites/components/List/List.js +19 -15
- package/favorites/components/List/ListAccordionHeader.js +8 -0
- package/favorites/components/List/ListAccordionLabel.js +5 -0
- package/favorites/components/List/ListContent.js +8 -0
- package/favorites/components/List/ListItemWrapper.js +6 -0
- package/favorites/components/List/styles.js +1 -0
- package/favorites/components/ListChooser/ListChooser.js +2 -2
- package/favorites/components/ListChooser/ListChooserItem.js +4 -5
- package/favorites/components/Lists/Lists.js +17 -13
- package/favorites/components/Lists/ListsModal.js +3 -4
- package/favorites/components/RemoveButton/RemoveButton.js +2 -2
- package/favorites/constants/Portals.js +1 -2
- package/favorites/constants/index.js +1 -0
- package/favorites/index.js +2 -2
- package/filter/actions/index.js +1 -0
- package/filter/components/FilterItem/index.js +2 -2
- package/filter/components/FilterItem/spec.js +1 -1
- package/filter/components/FilterPageContent/components/ApplyButton/index.js +7 -0
- package/filter/components/FilterPageContent/components/ApplyButton/spec.js +1 -0
- package/filter/components/FilterPageContent/components/ApplyButton/style.js +1 -0
- package/filter/components/FilterPageContent/components/ResetButton/index.js +7 -0
- package/filter/components/FilterPageContent/components/ResetButton/spec.js +1 -0
- package/filter/components/FilterPageContent/components/ResetButton/style.js +1 -0
- package/filter/components/FilterPageContent/components/Selector/components/Selected/index.js +7 -0
- package/filter/components/FilterPageContent/components/Selector/components/Selected/spec.js +1 -0
- package/filter/components/FilterPageContent/components/Selector/components/Selected/style.js +1 -0
- package/filter/components/FilterPageContent/components/Selector/components/Toggle/index.js +7 -0
- package/filter/components/FilterPageContent/components/Selector/components/Toggle/spec.js +1 -0
- package/filter/components/FilterPageContent/components/Selector/components/Toggle/style.js +1 -0
- package/filter/components/FilterPageContent/components/Selector/components/ValueButton/index.js +7 -0
- package/filter/components/FilterPageContent/components/Selector/components/ValueButton/spec.js +1 -0
- package/filter/components/FilterPageContent/components/Selector/components/ValueButton/style.js +1 -0
- package/filter/components/FilterPageContent/components/Selector/index.js +19 -0
- package/filter/components/FilterPageContent/components/Selector/spec.js +1 -0
- package/filter/components/FilterPageContent/components/Selector/style.js +1 -0
- package/filter/components/FilterPageContent/index.js +6 -0
- package/filter/components/FilterPageContentWithProvider/index.js +16 -0
- 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/components/index.js +1 -0
- package/filter/constants/index.js +1 -0
- package/filter/constants/sort.js +11 -0
- package/filter/helpers/buildFilterParamsForFetchFiltersRequest.js +2 -2
- package/filter/helpers/buildInitialFilters.js +2 -2
- package/filter/helpers/buildUpdatedFilters.js +2 -2
- package/filter/helpers/index.js +1 -0
- package/filter/helpers/translateFilterLabel.js +3 -3
- package/filter/hocs/index.js +1 -0
- package/filter/hocs/withSort.js +16 -0
- package/filter/hooks/filterPage.js +5 -0
- package/filter/hooks/index.js +4 -0
- package/filter/index.js +2 -7
- package/filter/providers/FilterPageProvider.context.js +54 -0
- package/filter/providers/FilterPageProvider.js +98 -0
- package/filter/providers/SortProvider.connector.js +3 -0
- package/filter/providers/SortProvider.context.js +1 -0
- package/filter/providers/SortProvider.helpers.js +8 -0
- package/filter/providers/SortProvider.js +6 -0
- package/filter/providers/index.js +1 -0
- package/filter/selectors/index.js +17 -0
- package/filter/streams/index.js +1 -0
- package/i18n/countries.helpers.js +6 -0
- package/i18n/countries.hooks.js +6 -0
- package/i18n/index.js +1 -0
- package/i18n/locale/cs-cz/countries.json +255 -0
- package/i18n/locale/de-de/countries.json +255 -0
- package/i18n/locale/el-gr/countries.json +255 -0
- package/i18n/locale/en-us/countries.json +255 -0
- package/i18n/locale/es-es/countries.json +255 -0
- package/i18n/locale/fi-fi/countries.json +255 -0
- package/i18n/locale/fr-fr/countries.json +255 -0
- package/i18n/locale/hu-hu/countries.json +255 -0
- package/i18n/locale/it-it/countries.json +255 -0
- package/i18n/locale/nl-nl/countries.json +255 -0
- package/i18n/locale/pl-pl/countries.json +255 -0
- package/i18n/locale/pt-pt/countries.json +255 -0
- package/i18n/locale/ro-ro/countries.json +255 -0
- package/i18n/locale/sv-se/countries.json +255 -0
- package/locations/action-creators/errorInventories.js +7 -0
- package/locations/action-creators/errorLocations.js +6 -0
- package/locations/action-creators/errorProductInventories.js +7 -0
- package/locations/action-creators/errorProductLocations.js +6 -0
- package/locations/action-creators/index.js +1 -0
- package/locations/action-creators/provideProductAlternativeLocation.js +5 -0
- package/locations/action-creators/receiveInventories.js +5 -0
- package/locations/action-creators/receiveLocations.js +6 -0
- package/locations/action-creators/receiveProductInventories.js +7 -0
- package/locations/action-creators/receiveProductLocations.js +7 -0
- package/locations/action-creators/requestInventories.js +6 -0
- package/locations/action-creators/requestLocations.js +5 -0
- package/locations/action-creators/requestProductInventories.js +6 -0
- package/locations/action-creators/requestProductLocations.js +5 -0
- package/locations/action-creators/selectGlobalLocation.js +5 -0
- package/locations/action-creators/selectLocation.js +6 -0
- package/locations/action-creators/setStoreFinderSearchRadius.js +5 -0
- package/locations/action-creators/setUserGeolocation.js +5 -0
- package/locations/action-creators/setUserSearchCountryCode.js +7 -0
- package/locations/action-creators/setUserSearchGeolocation.js +8 -0
- package/locations/action-creators/setUserSearchPostalCode.js +7 -0
- package/locations/action-creators/storeFormInput.js +5 -0
- package/locations/action-creators/storeFulfillmentMethod.js +5 -0
- package/locations/action-creators/submitReservationError.js +5 -0
- package/locations/action-creators/submitReservationRequest.js +5 -0
- package/locations/action-creators/submitReservationSuccess.js +5 -0
- package/locations/actions/fetchDefaultLocation.js +4 -0
- package/locations/actions/fetchFulfillmentSlots.js +6 -0
- package/locations/actions/fetchInventories.js +6 -0
- package/locations/actions/fetchLocations.js +19 -0
- package/locations/actions/fetchProductInventories.js +7 -0
- package/locations/actions/fetchProductLocations.js +12 -0
- package/locations/actions/index.js +5 -0
- package/locations/actions/sendDefaultLocationCode.js +6 -0
- package/locations/actions/setUserGeolocation.js +1 -0
- package/locations/actions/setUserSearchGeolocation.js +1 -0
- package/locations/actions/submitReservation.js +5 -0
- package/locations/assets/leaflet.css +765 -0
- package/locations/components/Cart/CartChangeFulfillmentMethod.connector.js +4 -0
- package/locations/components/Cart/CartChangeFulfillmentMethod.js +8 -0
- package/locations/components/Cart/CartChangeFulfillmentMethod.types.js +0 -0
- package/locations/components/Cart/CartContextMenuChangeFulfillment.js +6 -0
- package/locations/components/Cart/CartContextMenuChangeFulfillmentContent.js +5 -0
- package/locations/components/Cart/CartContextMenuChangeFulfillmentContent.style.js +1 -0
- package/locations/components/Cart/CartContextMenuItemChangeFulfillment.connector.js +4 -0
- package/locations/components/Cart/CartContextMenuItemChangeFulfillment.js +6 -0
- package/locations/components/Cart/CartContextMenuItemChangeLocation.js +7 -0
- package/locations/components/Cart/CartItemProductChangeLocation.connector.js +5 -0
- package/locations/components/Cart/CartItemProductChangeLocation.js +11 -0
- package/locations/components/Cart/CartItemProductChangeLocation.types.js +0 -0
- package/locations/components/Cart/index.js +1 -0
- package/locations/components/ChangeLocationButton/ChangeLocationButton.js +4 -0
- package/locations/components/ChangeLocationButton/ChangeLocationButton.style.js +2 -0
- package/locations/components/ChangeLocationButton/index.js +1 -0
- package/locations/components/FulfillmentPath/FulfillmentPath.js +4 -0
- package/locations/components/FulfillmentPath/FulfillmentPath.style.js +2 -0
- package/locations/components/FulfillmentPath/FulfillmentPathItem.js +6 -0
- package/locations/components/FulfillmentPath/index.js +1 -0
- package/locations/components/FulfillmentPathSelector/FulfillmentPathSelector.js +14 -0
- package/locations/components/FulfillmentPathSelector/FulfillmentPathSelector.style.js +1 -0
- package/locations/components/FulfillmentPathSelector/index.js +1 -0
- package/locations/components/FulfillmentSelector/FulfillmentSelector.connector.js +9 -0
- package/locations/components/FulfillmentSelector/FulfillmentSelector.context.js +1 -0
- package/locations/components/FulfillmentSelector/FulfillmentSelector.hooks.js +3 -0
- package/locations/components/FulfillmentSelector/FulfillmentSelector.js +20 -0
- package/locations/components/FulfillmentSelector/FulfillmentSelector.style.js +1 -0
- package/locations/components/FulfillmentSelector/FulfillmentSelector.types.js +1 -0
- package/locations/components/FulfillmentSelector/FulfillmentSelectorAddToCart.js +10 -0
- package/locations/components/FulfillmentSelector/FulfillmentSelectorAlternativeLocation.js +8 -0
- package/locations/components/FulfillmentSelector/FulfillmentSelectorBOPIS.js +4 -0
- package/locations/components/FulfillmentSelector/FulfillmentSelectorDirectShip.js +5 -0
- package/locations/components/FulfillmentSelector/FulfillmentSelectorHeader.js +4 -0
- package/locations/components/FulfillmentSelector/FulfillmentSelectorHeader.style.js +1 -0
- package/locations/components/FulfillmentSelector/FulfillmentSelectorImpossibleError.js +4 -0
- package/locations/components/FulfillmentSelector/FulfillmentSelectorImpossibleError.style.js +1 -0
- package/locations/components/FulfillmentSelector/FulfillmentSelectorItem.js +8 -0
- package/locations/components/FulfillmentSelector/FulfillmentSelectorItem.style.js +1 -0
- package/locations/components/FulfillmentSelector/FulfillmentSelectorLocation.js +4 -0
- package/locations/components/FulfillmentSelector/FulfillmentSelectorLocation.style.js +1 -0
- package/locations/components/FulfillmentSelector/FulfillmentSelectorLocationMethodNotAvailable.js +3 -0
- package/locations/components/FulfillmentSelector/FulfillmentSelectorROPIS.js +4 -0
- package/locations/components/FulfillmentSelector/index.js +1 -0
- package/locations/components/FulfillmentSheet/FulfillmentSheet.js +6 -0
- package/locations/components/FulfillmentSheet/FulfillmentSheet.style.js +1 -0
- package/locations/components/FulfillmentSheet/FulfillmentSheetContent.js +6 -0
- package/locations/components/FulfillmentSheet/index.js +1 -0
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotDialog.js +28 -0
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotProvider.connector.js +8 -0
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotProvider.context.js +1 -0
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotProvider.js +9 -0
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcher.connector.js +4 -0
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcher.js +4 -0
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherBar.js +3 -0
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherBar.style.js +1 -0
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherDefault.js +3 -0
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherDefault.style.js +1 -0
- package/locations/components/FulfillmentSlotSwitcher/index.js +1 -0
- package/locations/components/FulfillmentSlotSwitcher/time.js +5 -0
- package/locations/components/GlobalLocationSelector/GlobalLocationSelector.js +16 -0
- package/locations/components/GlobalLocationSelector/index.js +1 -0
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcher.connector.js +8 -0
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcher.js +3 -0
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherBar.js +3 -0
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherBar.style.js +1 -0
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherDefault.js +3 -0
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherDefault.style.js +1 -0
- package/locations/components/GlobalLocationSwitcher/index.js +1 -0
- package/locations/components/ReservationResponses/ReservationError.js +4 -0
- package/locations/components/ReservationResponses/ReservationResponse.style.js +1 -0
- package/locations/components/ReservationResponses/ReservationSuccess.js +4 -0
- package/locations/components/ReservationResponses/index.js +1 -0
- package/locations/components/ReserveForm/ReserveForm.constraints.js +1 -0
- package/locations/components/ReserveForm/ReserveForm.js +10 -0
- package/locations/components/ReserveForm/ReserveForm.style.js +1 -0
- package/locations/components/ReserveForm/ReserveFormPhone.connector.js +3 -0
- package/locations/components/ReserveForm/ReserveFormPhone.js +5 -0
- package/locations/components/ReserveForm/ReserveFormPhone.types.js +0 -0
- package/locations/components/ReserveForm/index.js +1 -0
- package/locations/components/StockInfo/StockInfo.defaultSettings.js +1 -0
- package/locations/components/StockInfo/StockInfo.js +8 -0
- package/locations/components/StockInfo/StockInfoInventory.js +9 -0
- package/locations/components/StockInfo/index.js +1 -0
- package/locations/components/StockInfoLists/index.js +9 -0
- package/locations/components/StoreDetails/components/FindMoreStores.js +4 -0
- package/locations/components/StoreDetails/components/GetDirectionsButton.js +7 -0
- package/locations/components/StoreDetails/components/StoreDetails.js +5 -0
- package/locations/components/StoreDetails/components/StoreFinderMap.js +20 -0
- package/locations/components/StoreDetails/components/StoreFinderMap.style.js +1 -0
- package/locations/components/StoreDetails/components/StoreLocationMap.js +4 -0
- package/locations/components/StoreDetails/components/StoresNearby.js +4 -0
- package/locations/components/StoreDetails/components/StoresNearbyListItem.js +9 -0
- package/locations/components/StoreDetails/index.js +4 -0
- package/locations/components/StoreFinder/Store.context.js +1 -0
- package/locations/components/StoreFinder/StoreFinder.js +3 -0
- package/locations/components/StoreFinder/StoreFinder.style.js +1 -0
- package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.connector.js +4 -0
- package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.js +4 -0
- package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.style.js +1 -0
- package/locations/components/StoreFinder/StoreFinderLocation.js +3 -0
- package/locations/components/StoreFinder/StoreFinderLocation.style.js +1 -0
- package/locations/components/StoreFinder/StoreFinderLocationDetails.js +3 -0
- package/locations/components/StoreFinder/StoreFinderLocationDetails.style.js +1 -0
- package/locations/components/StoreFinder/StoreFinderLocationHeader.js +3 -0
- package/locations/components/StoreFinder/StoreFinderLocationHeader.style.js +1 -0
- package/locations/components/StoreFinder/StoreFinderLocationHeaderPhoneNumber.js +4 -0
- package/locations/components/StoreFinder/StoreFinderLocations.js +5 -0
- package/locations/components/StoreFinder/StoreFinderLocations.style.js +1 -0
- package/locations/components/StoreFinder/StoreFinderSearch.js +3 -0
- package/locations/components/StoreFinder/StoreFinderSearch.style.js +1 -0
- package/locations/components/StoreFinder/StoreFinderSelectLocationButton.js +5 -0
- package/locations/components/StoreFinder/StoreFinderStoreInfoButton.js +8 -0
- package/locations/components/StoreFinder/index.js +1 -0
- package/locations/components/StoreList/Store.context.js +1 -0
- package/locations/components/StoreList/Store.style.js +1 -0
- package/locations/components/StoreList/StoreAddress.js +7 -0
- package/locations/components/StoreList/StoreAddressShort.js +7 -0
- package/locations/components/StoreList/StoreCard.js +4 -0
- package/locations/components/StoreList/StoreDetails.js +4 -0
- package/locations/components/StoreList/StoreDetailsLine.js +8 -0
- package/locations/components/StoreList/StoreDistance.js +7 -0
- package/locations/components/StoreList/StoreHeader.js +4 -0
- package/locations/components/StoreList/StoreHoursToday.js +7 -0
- package/locations/components/StoreList/StoreList.js +4 -0
- package/locations/components/StoreList/StoreListLocations.js +4 -0
- package/locations/components/StoreList/StoreListProduct.js +4 -0
- package/locations/components/StoreList/StoreListProduct.style.js +1 -0
- package/locations/components/StoreList/StoreListProductInfo.js +4 -0
- package/locations/components/StoreList/StoreListProductName.js +4 -0
- package/locations/components/StoreList/StoreListSearch.connector.js +7 -0
- package/locations/components/StoreList/StoreListSearch.js +23 -0
- package/locations/components/StoreList/StoreListSearch.style.js +1 -0
- package/locations/components/StoreList/StoreListSearchRadius.connector.js +7 -0
- package/locations/components/StoreList/StoreListSearchRadius.js +4 -0
- package/locations/components/StoreList/StoreListSearchRadius.style.js +1 -0
- package/locations/components/StoreList/StoreOpeningHours.js +7 -0
- package/locations/components/StoreList/StoreOpeningHoursLine.js +7 -0
- package/locations/components/StoreList/StorePhoneNumber.js +6 -0
- package/locations/components/StoreList/StoreSelectLocationButton.js +4 -0
- package/locations/components/StoreList/index.js +1 -0
- package/locations/components/index.js +1 -0
- package/locations/constants/ActionTypes.js +10 -0
- package/locations/constants/Pipelines.js +1 -0
- package/locations/constants/Portals.js +2 -0
- package/locations/constants/Stages.js +1 -0
- package/locations/constants/index.js +7 -0
- package/locations/constants/routes.js +1 -0
- package/locations/helpers/createOrder.js +28 -0
- package/locations/helpers/formatDistance.js +9 -0
- package/locations/helpers/getAvailabilitySettings.js +12 -0
- package/locations/helpers/index.js +1 -0
- package/locations/helpers/productInventory.js +7 -0
- package/locations/helpers/showInventoryInLists.js +7 -0
- package/locations/index.js +9 -0
- package/locations/locations.context.js +1 -0
- package/locations/locations.hooks.js +4 -0
- package/locations/locations.streams.js +1 -0
- package/locations/locations.types.js +1 -0
- package/locations/providers/FulfillmentProvider.connector.js +10 -0
- package/locations/providers/FulfillmentProvider.js +49 -0
- package/locations/providers/FulfillmentProvider.types.js +1 -0
- package/locations/providers/StoreDetailsContext.js +1 -0
- package/locations/providers/StoreDetailsProvider.js +4 -0
- package/locations/providers/StoreFinder.connector.js +3 -0
- package/locations/providers/StoreFinderProvider.js +7 -0
- package/locations/providers/index.js +1 -0
- package/locations/reducers/index.js +1 -0
- package/locations/reducers/storage.js +24 -0
- package/locations/reducers/storeFinderSearch.js +6 -0
- package/locations/reducers/user.js +5 -0
- package/locations/reducers/userFormInput.js +8 -0
- package/locations/reducers/userSearch.js +6 -0
- package/locations/selectors/index.js +145 -0
- package/locations/subscriptions.js +27 -0
- package/login/action-creators/index.js +1 -0
- package/login/action-creators/resetPassword.js +14 -0
- package/login/actions/index.js +1 -0
- package/login/actions/resetPassword.js +5 -0
- package/login/components/ForgotPassword/ForgotPassword.connector.js +5 -0
- package/login/components/ForgotPassword/ForgotPassword.js +5 -0
- package/login/components/ForgotPassword/ForgotPassword.style.js +1 -0
- package/login/components/ForgotPassword/index.js +1 -0
- package/login/constants/actions.js +1 -0
- package/login/constants/index.js +1 -0
- package/login/constants/pipelines.js +1 -0
- package/login/constants/routes.js +1 -0
- package/login/index.js +1 -0
- package/orders/action-creators/index.js +1 -0
- package/orders/action-creators/orderDetails.js +22 -0
- package/orders/action-creators/orders.js +21 -0
- package/orders/actions/cancelOrder.js +8 -0
- package/orders/actions/fetchOrderDetails.js +10 -0
- package/orders/actions/fetchOrderHistory.js +7 -0
- package/orders/actions/index.js +1 -0
- package/orders/components/OrderDetails/OrderDetails.js +4 -0
- package/orders/components/OrderDetails/OrderDetailsAuthenticate.js +3 -0
- package/orders/components/OrderDetails/OrderDetailsAuthenticate.style.js +1 -0
- package/orders/components/OrderDetails/OrderDetailsAuthenticateForm.config.js +8 -0
- package/orders/components/OrderDetails/OrderDetailsContent.js +3 -0
- package/orders/components/OrderDetails/OrderDetailsContent.style.js +1 -0
- package/orders/components/OrderDetails/OrderDetailsOrder.js +4 -0
- package/orders/components/OrderDetails/OrderDetailsOrder.style.js +1 -0
- package/orders/components/OrderDetails/OrderDetailsOrderHeader.js +4 -0
- package/orders/components/OrderDetails/OrderDetailsOrderHeader.style.js +1 -0
- package/orders/components/OrderDetails/OrderDetailsOrderPickupLocation.connector.js +3 -0
- package/orders/components/OrderDetails/OrderDetailsOrderPickupLocation.js +4 -0
- package/orders/components/OrderDetails/OrderDetailsOrderPickupLocation.style.js +1 -0
- package/orders/components/OrderDetails/index.js +1 -0
- package/orders/components/OrderHistory/OrderHistory.js +4 -0
- package/orders/components/OrderHistory/OrderHistory.style.js +1 -0
- package/orders/components/OrderHistory/OrderHistoryList.js +9 -0
- package/orders/components/OrderHistory/OrderHistoryList.style.js +1 -0
- package/orders/components/OrderHistory/OrderHistoryLoader.js +4 -0
- package/orders/components/OrderHistory/OrderHistoryTable.js +9 -0
- package/orders/components/OrderHistory/OrderHistoryTable.style.js +1 -0
- package/orders/components/OrderHistory/index.js +1 -0
- package/orders/components/index.js +1 -0
- package/orders/constants/actionTypes.js +1 -0
- package/orders/constants/index.js +1 -0
- package/orders/constants/pipelines.js +1 -0
- package/orders/constants/routes.js +1 -0
- package/orders/constants/status.js +12 -0
- package/orders/helpers/index.js +1 -0
- package/orders/helpers/orderDetails.js +5 -0
- package/orders/helpers/orderStatus.js +15 -0
- package/orders/hooks/index.js +7 -0
- package/orders/index.js +1 -1
- package/orders/providers/OrderDetailsPrivateProvider.connector.js +11 -0
- package/orders/providers/OrderDetailsPrivateProvider.js +5 -0
- package/orders/providers/OrderDetailsProvider.connector.js +11 -0
- package/orders/providers/OrderDetailsProvider.constraints.js +1 -0
- package/orders/providers/OrderDetailsProvider.context.js +1 -0
- package/orders/providers/OrderDetailsProvider.js +11 -0
- package/orders/providers/OrderHistoryProvider.connector.js +9 -0
- package/orders/providers/OrderHistoryProvider.context.js +1 -0
- package/orders/providers/OrderHistoryProvider.js +4 -0
- package/orders/reducers/index.js +1 -0
- package/orders/reducers/orders.js +7 -0
- package/orders/reducers/ordersById.js +7 -0
- package/orders/reducers/ordersByNumber.js +7 -0
- package/orders/selectors/index.js +27 -0
- package/orders/subscriptions/index.js +4 -0
- package/package.json +26 -18
- package/page/actions/index.js +1 -0
- package/page/components/NotFound.js +3 -0
- package/page/components/index.js +1 -0
- package/page/index.js +2 -4
- package/page/selectors/index.js +7 -0
- package/product/collections/index.js +1 -0
- package/product/components/Availability/Availability.connector.js +5 -0
- package/product/components/Availability/Availability.js +6 -0
- package/product/components/Availability/Availability.style.js +1 -0
- package/product/components/Availability/index.js +1 -0
- package/product/components/Characteristics/Characteristic/components/Sheet/index.js +16 -4
- package/product/components/Characteristics/Characteristic/components/SheetItem/index.js +8 -3
- package/product/components/Characteristics/Characteristic/components/SheetItem/style.js +1 -1
- package/product/components/Characteristics/Characteristic/index.js +15 -6
- package/product/components/Characteristics/Characteristic/style.js +1 -1
- package/product/components/Characteristics/Swatch/index.js +8 -6
- package/product/components/Characteristics/index.js +10 -3
- package/product/components/Characteristics/transition.js +1 -1
- package/product/components/Description/index.js +5 -6
- 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 +2 -5
- 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/Header/index.js +1 -0
- 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 +19 -7
- package/product/components/Options/components/TextOption/style.js +1 -1
- package/product/components/Options/index.js +2 -2
- package/product/components/OrderQuantityHint/index.js +3 -2
- 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/PriceInfo/PriceInfo.connector.js +4 -0
- package/product/components/PriceInfo/PriceInfo.js +4 -0
- package/product/components/PriceInfo/index.js +1 -0
- package/product/components/ProductBadges/index.js +2 -2
- package/product/components/ProductCard/index.js +12 -3
- 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 +30 -16
- 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/ProductImagePlaceholder.js +5 -0
- package/product/components/ProductImage/connector.js +5 -0
- package/product/components/ProductImage/index.js +17 -13
- 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/ProductName/ProductName.js +4 -0
- package/product/components/ProductName/ProductNameContent.js +4 -0
- package/product/components/ProductName/index.js +1 -0
- 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/ListsHTML.js +5 -0
- package/product/components/ProductProperties/ProductProperties.js +2 -2
- package/product/components/ProductProperties/Row.js +1 -1
- package/product/components/ProductProperties/RowHTML.js +5 -0
- package/product/components/ProductProperties/Rows.js +2 -2
- package/product/components/ProductProperties/Wrapper.js +1 -1
- package/product/components/ProductProperties/helpers/getGroupsFromProperties.js +7 -2
- package/product/components/ProductProperties/style.js +1 -1
- package/product/components/ProductSlider/index.js +3 -2
- package/product/components/ProductSlider/spec.js +1 -1
- package/product/components/ProductVariants/VariantAvailability.connector.js +5 -0
- package/product/components/ProductVariants/VariantAvailability.js +5 -0
- package/product/components/ProductVariants/index.js +1 -0
- package/product/components/QuantityPicker/hooks.js +5 -0
- package/product/components/QuantityPicker/index.js +4 -3
- 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/CartUnitQuantityPicker.js +4 -0
- package/product/components/UnitQuantityPicker/ProductUnitQuantityPicker.js +3 -6
- package/product/components/UnitQuantityPicker/UnitQuantityPicker.js +11 -13
- package/product/components/UnitQuantityPicker/UnitQuantityPickerWithSection.js +5 -2
- package/product/components/UnitQuantityPicker/index.js +1 -1
- package/product/components/UnitQuantityPicker/styles.js +1 -0
- package/product/components/context.js +1 -1
- package/product/components/index.js +1 -0
- package/product/constants/index.js +2 -1
- package/product/contexts/index.js +1 -0
- package/product/helpers/index.js +2 -2
- package/product/helpers/redirects.js +2 -2
- package/product/hocs/index.js +1 -0
- package/product/hocs/withMapPricing.js +4 -4
- package/product/hocs/withPriceCalculation.js +2 -2
- package/product/hocs/withProduct.js +6 -0
- package/product/hocs/withProductListEntry.js +1 -1
- package/product/hocs/withProductListEntryProduct.js +12 -0
- package/product/hocs/withProductListType.js +1 -1
- package/product/hooks/index.js +1 -0
- package/product/hooks/useLoadProductImage.js +1 -1
- package/product/index.js +4 -11
- package/product/product.types.js +0 -0
- package/product/{components/ProductProvider → providers/Product}/index.js +1 -1
- package/product/providers/ProductListEntry/context.js +1 -1
- package/product/providers/ProductListEntry/index.js +1 -1
- package/product/providers/ProductListType/context.js +2 -1
- package/product/providers/ProductListType/index.js +2 -1
- package/product/providers/index.js +1 -0
- package/product/selectors/product.js +75 -6
- package/product/selectors/variants.js +4 -1
- package/product/streams/index.js +1 -0
- package/push-opt-in/action-creators/pushOptIn.js +2 -1
- package/push-opt-in/actions/pushOptInModal.js +3 -3
- package/push-opt-in/components/PushOptInModal/index.js +3 -6
- 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 +5 -2
- package/push-opt-in/selectors/optInTrigger.js +4 -2
- package/push-opt-in/subscriptions/index.js +1 -1
- package/push-opt-in/subscriptions/optInTracking.js +4 -0
- package/push-opt-in/subscriptions/optInTrigger.js +6 -6
- package/registration/action-creators/index.js +18 -0
- package/registration/actions/index.js +1 -0
- package/registration/actions/submitRegistration.js +4 -0
- package/registration/components/GuestRegistration/GuestRegistration.js +4 -0
- package/registration/components/GuestRegistration/GuestRegistrationContent.js +4 -0
- package/registration/components/GuestRegistration/GuestRegistrationFormPickup.config.js +8 -0
- package/registration/components/GuestRegistration/GuestRegistrationFormPickup.js +4 -0
- package/registration/components/Registration/Registration.js +4 -0
- package/registration/components/Registration/RegistrationContent.js +4 -0
- package/registration/components/Registration/RegistrationContent.style.js +2 -0
- package/registration/components/Registration/RegistrationFormActions.js +5 -0
- package/registration/components/Registration/RegistrationFormBase.config.js +4 -0
- package/registration/components/Registration/RegistrationFormBase.js +4 -0
- package/registration/components/Registration/RegistrationFormBilling.config.js +5 -0
- package/registration/components/Registration/RegistrationFormBilling.js +5 -0
- package/registration/components/Registration/RegistrationFormExtra.config.js +5 -0
- package/registration/components/Registration/RegistrationFormExtra.js +5 -0
- package/registration/components/Registration/RegistrationFormShipping.config.js +5 -0
- package/registration/components/Registration/RegistrationFormShipping.js +5 -0
- package/registration/components/Registration/RegistrationFormToggle.js +4 -0
- package/registration/components/index.js +1 -0
- package/registration/constants/actionTypes.js +1 -0
- package/registration/constants/index.js +1 -0
- package/registration/constants/pipelines.js +1 -0
- package/registration/hooks/index.js +5 -0
- package/registration/index.js +2 -0
- package/registration/providers/GuestRegistrationProvider.actions.js +4 -0
- package/registration/providers/GuestRegistrationProvider.connector.js +7 -0
- package/registration/providers/GuestRegistrationProvider.constraints.js +18 -0
- package/registration/providers/GuestRegistrationProvider.context.js +1 -0
- package/registration/providers/GuestRegistrationProvider.js +22 -0
- package/registration/providers/RegistrationProvider.actions.js +8 -0
- package/registration/providers/RegistrationProvider.connector.js +6 -0
- package/registration/providers/RegistrationProvider.constraints.js +27 -0
- package/registration/providers/RegistrationProvider.context.js +1 -0
- package/registration/providers/RegistrationProvider.js +17 -0
- package/registration/streams/index.js +4 -0
- package/registration/subscriptions/index.js +5 -0
- package/reviews/actions/index.js +1 -0
- package/reviews/components/Reviews/components/AllReviewsLink/index.js +1 -1
- package/reviews/components/Reviews/components/Header/components/AverageRating/index.js +8 -6
- 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 +6 -4
- 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 +3 -4
- package/reviews/components/Reviews/connector.js +2 -6
- package/reviews/components/Reviews/index.js +1 -1
- package/reviews/components/Reviews/mock.js +2 -6
- package/reviews/components/Reviews/spec.js +4 -3
- package/reviews/components/index.js +1 -0
- package/reviews/constants/index.js +1 -0
- package/reviews/index.js +3 -6
- package/reviews/selectors/index.js +1 -0
- package/reviews/streams/index.js +1 -0
- package/scanner/action-creators/index.js +1 -0
- package/scanner/actions/index.js +1 -0
- package/scanner/classes/index.js +1 -0
- package/scanner/constants/index.js +1 -0
- package/scanner/helpers/index.js +1 -0
- package/scanner/index.js +1 -6
- package/scanner/streams/index.js +1 -0
- package/search/actions/index.js +1 -0
- package/search/constants/index.js +1 -0
- package/search/helpers/index.js +1 -0
- package/search/index.js +1 -6
- package/search/selectors/index.js +1 -0
- package/search/streams/index.js +1 -0
- package/styles/helpers/cssCustomProperties.js +16 -0
- package/styles/helpers/index.js +1 -0
- package/styles/helpers/initCSSCustomProperties.js +10 -0
- package/styles/helpers/loadCustomStyles.js +6 -0
- package/styles/helpers/setPageBackgroundColor.js +5 -0
- package/styles/helpers/setPageContentWidth.js +5 -0
- package/styles/helpers/setViewportHeight.js +3 -0
- package/styles/helpers/toggleBodyScroll.js +5 -0
- package/styles/helpers/updatePageInsets.js +15 -0
- package/styles/index.js +1 -0
- package/styles/reset/form.js +8 -0
- package/styles/reset/index.js +1 -0
- package/styles/reset/media.js +1 -0
- package/styles/reset/root.js +3 -0
- package/styles/reset/table.js +1 -0
- package/styles/reset/typography.js +1 -0
- package/tracking/action-creators/cookieConsent.js +2 -2
- package/tracking/actions/cookieConsent.js +17 -5
- package/tracking/components/CookieConsentModal/connector.js +3 -5
- package/tracking/components/CookieConsentModal/index.js +3 -6
- package/tracking/components/CookieConsentModal/tracking-opt-in.svg +14 -14
- package/tracking/components/PrivacySettings/connector.js +3 -5
- package/tracking/components/PrivacySettings/index.js +2 -2
- package/tracking/helpers/index.js +1 -0
- package/tracking/selectors/cookieConsent.js +10 -5
- package/tracking/streams/cookieConsent.js +10 -3
- package/tracking/subscriptions/analytics.js +5 -4
- package/tracking/subscriptions/cookieConsent.js +6 -10
- package/types.js +0 -0
- package/user/index.js +2 -2
- package/user/selectors/data.js +10 -0
- package/components/MessageBar/spec.js +0 -1
- package/components/MessageBar/style.js +0 -2
- package/favorites/constants/constants.js +0 -1
- package/product/components/Characteristics/Characteristic/components/VariantAvailability/connector.js +0 -9
- package/product/components/Characteristics/Characteristic/components/VariantAvailability/index.js +0 -5
- package/product/components/QuantityPicker/helpers.js +0 -5
- /package/product/components/{Characteristics/Characteristic/components/VariantAvailability/style.js → ProductVariants/VariantAvailability.style.js} +0 -0
- /package/product/{components/ProductProvider → providers/Product}/connector.js +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import*as React from'react';import PropTypes from'prop-types';import{hot}from'react-hot-loader/root';import{createPortal}from'react-dom';import PaymentBarContent from"./PaymentBarContent";/**
|
|
2
|
+
* The cart payment bar component.
|
|
3
|
+
* @param {Object} props The component props.
|
|
4
|
+
* @returns {JSX}
|
|
5
|
+
*/function PaymentBar(_ref){var visible=_ref.visible,showSeparator=_ref.showSeparator;var domElement=document.getElementById('AppFooter');if(!visible||!domElement){return null;}return createPortal(React.createElement(PaymentBarContent,{showSeparator:showSeparator}),domElement);}PaymentBar.defaultProps={visible:true,showSeparator:false};export default hot(PaymentBar);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{connect}from'react-redux';import{getAppliedPromotionsWithoutCoupons}from"../../cart.selectors";/**
|
|
2
|
+
* Maps the contents of the state to the component props.
|
|
3
|
+
* @param {Object} state The current application state.
|
|
4
|
+
* @return {Object} The extended component props.
|
|
5
|
+
*/var mapStateToProps=function mapStateToProps(state){return{promotions:getAppliedPromotionsWithoutCoupons(state)};};export default connect(mapStateToProps);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React,{useContext}from'react';import PropTypes from'prop-types';import CartTotalLine from'@shopgate/pwa-ui-shared/CartTotalLine';import{i18n}from'@shopgate/engage/core';import{CartContext}from"../../cart.context";import PaymentBarPromotionalText from"./PaymentBarPromotionalText";import{spacer}from"./PaymentBarContent.style";import connect from"./PaymentBarAppliedPromotions.connector";/**
|
|
2
|
+
* @returns {JSX}
|
|
3
|
+
*/var PaymentBarAppliedPromotions=function PaymentBarAppliedPromotions(_ref){var promotions=_ref.promotions,className=_ref.className,showSeparator=_ref.showSeparator;var _useContext=useContext(CartContext),isLoading=_useContext.isLoading,currency=_useContext.currency,hasPromotionCoupons=_useContext.hasPromotionCoupons;return promotions.map(function(promotion){var discount=promotion.discount,code=promotion.code,name=promotion.name,promotionalText=promotion.promotionalText;var amount=discount.absoluteAmount;return React.createElement(CartTotalLine,{key:"promotion-".concat(code,"-").concat(amount),isDisabled:isLoading,className:className},React.createElement(CartTotalLine.Label,{label:i18n.text('cart.promotion_label',{label:name}),showSeparator:showSeparator,suffix:React.createElement(PaymentBarPromotionalText,{text:promotionalText})}),React.createElement(CartTotalLine.Amount,{amount:amount,currency:currency}),hasPromotionCoupons&&React.createElement(CartTotalLine.Spacer,{className:spacer}));});};PaymentBarAppliedPromotions.defaultProps={className:null,showSeparator:true};export default connect(PaymentBarAppliedPromotions);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{connect}from'react-redux';import{getOrderableStatus}from'@shopgate/pwa-common-commerce/cart/selectors';/**
|
|
2
|
+
* Maps the contents of the state to the component props.
|
|
3
|
+
* @param {Object} state The current application state.
|
|
4
|
+
* @return {Object} The extended component props.
|
|
5
|
+
*/var mapStateToProps=function mapStateToProps(state){return{isOrderable:getOrderableStatus(state)};};export default connect(mapStateToProps);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React,{useContext,useMemo}from'react';import I18n from'@shopgate/pwa-common/components/I18n';import Link from'@shopgate/pwa-common/components/Link';import{SurroundPortals}from'@shopgate/engage/components';import{CART_CHECKOUT_BUTTON}from'@shopgate/pwa-common-commerce/cart/constants/Portals';import RippleButton from'@shopgate/pwa-ui-shared/RippleButton';import{CHECKOUT_PATH}from'@shopgate/pwa-common/constants/RoutePaths';import PropTypes from'prop-types';import{CartContext}from"../../cart.context";import connect from"./PaymentBarCheckoutButton.connector";import{button,disabledButton}from"./PaymentBarCheckoutButton.style";/**
|
|
2
|
+
* Renders the cart payment bar checkout button.
|
|
3
|
+
* @param {boolean} isOrderable Whether the cart is orderable.
|
|
4
|
+
* @return {JSX.Element}
|
|
5
|
+
*/var PaymentBarCheckoutButton=function PaymentBarCheckoutButton(_ref){var isOrderable=_ref.isOrderable;var _useContext=useContext(CartContext),isLoading=_useContext.isLoading;var isActive=useMemo(function(){return isOrderable&&!isLoading;},[isLoading,isOrderable]);return React.createElement(SurroundPortals,{portalName:CART_CHECKOUT_BUTTON,portalProps:{isActive:isActive}},React.createElement(Link,{href:CHECKOUT_PATH,disabled:!isActive,tabIndex:0,role:"button","aria-disabled":!isActive},React.createElement(RippleButton,{disabled:!isActive,type:"regular",className:isActive?button:disabledButton},React.createElement(I18n.Text,{string:"cart.checkout"}))));};PaymentBarCheckoutButton.defaultProps={isOrderable:true};export default connect(PaymentBarCheckoutButton);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var colors=themeConfig.colors;export var button=css({width:'100%',background:"var(--color-button-cta, ".concat(colors.cta,")"),color:"var(--color-button-cta-contrast, ".concat(colors.ctaContrast,")!important")}).toString();export var disabledButton=css({width:'100%',background:colors.shade7,color:"".concat(colors.shade4,"!important")}).toString();
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import*as React from'react';import PropTypes from'prop-types';import classNames from'classnames';import Grid from'@shopgate/pwa-common/components/Grid';import{SurroundPortals}from'@shopgate/engage/components';import{CART_PAYMENT_BAR,CART_PAYMENT_BAR_TOTALS}from'@shopgate/pwa-common-commerce/cart/constants/Portals';import PaymentBarShippingCost from"./PaymentBarShippingCost";import PaymentBarDiscounts from"./PaymentBarDiscounts";import PaymentBarTax from"./PaymentBarTax";import PaymentBarSubTotal from"./PaymentBarSubTotal";import PaymentBarGrandTotal from"./PaymentBarGrandTotal";import PaymentBarCheckoutButton from"./PaymentBarCheckoutButton";import PaymentBarPromotionCoupons from"./PaymentBarPromotionCoupons";import PaymentBarAppliedPromotions from"./PaymentBarAppliedPromotions";import{wrapper,container,checkoutButtonContainer,checkoutButton}from"./PaymentBarContent.style";/**
|
|
2
|
+
* The PaymentBarContent component.
|
|
3
|
+
* @returns {JSX}
|
|
4
|
+
*/function PaymentBarContent(_ref){var showSeparator=_ref.showSeparator;return React.createElement("div",{className:classNames(wrapper,'theme__cart__payment-bar')},React.createElement(SurroundPortals,{portalName:CART_PAYMENT_BAR},React.createElement(Grid,{className:container},React.createElement(SurroundPortals,{portalName:CART_PAYMENT_BAR_TOTALS},React.createElement(PaymentBarSubTotal,{showSeparator:showSeparator}),React.createElement(PaymentBarAppliedPromotions,{showSeparator:showSeparator}),React.createElement(PaymentBarPromotionCoupons,{showSeparator:showSeparator}),React.createElement(PaymentBarDiscounts,{showSeparator:showSeparator}),React.createElement(PaymentBarShippingCost,{showSeparator:showSeparator}),React.createElement(PaymentBarTax,{showSeparator:showSeparator}),React.createElement(PaymentBarGrandTotal,{showSeparator:showSeparator}))),React.createElement("div",{className:checkoutButtonContainer},React.createElement("div",{className:checkoutButton},React.createElement(PaymentBarCheckoutButton,null)))));}PaymentBarContent.defaultProps={showSeparator:true};export default PaymentBarContent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{css}from'glamor';import{isIOSTheme}from'@shopgate/engage/core';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var colors=themeConfig.colors,variables=themeConfig.variables,shadows=themeConfig.shadows;export var wrapper=css({background:colors.light,boxShadow:shadows.cart.paymentBar,position:'relative',zIndex:2,paddingBottom:'var(--safe-area-inset-bottom)'});export var container=css({padding:isIOSTheme()?variables.gap.small:variables.gap.big,paddingBottom:0,lineHeight:1.45,flexWrap:'wrap',flexDirection:'column',minWidth:'auto'}).toString();export var checkoutButton=css({display:'flex',justifyContent:'flex-end',flexDirection:'column'});export var checkoutButtonContainer=css({background:colors.light,alignItems:'center',padding:isIOSTheme()?variables.gap.small:variables.gap.big,position:'relative',zIndex:2});export var spacer=css({width:isIOSTheme()?27:32,order:1,flexShrink:0}).toString();
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{connect}from'react-redux';import{getDiscounts}from'@shopgate/pwa-common-commerce/cart/selectors';/**
|
|
2
|
+
* Maps the contents of the state to the component props.
|
|
3
|
+
* @param {Object} state The current application state.
|
|
4
|
+
* @return {Object} The extended component props.
|
|
5
|
+
*/var mapStateToProps=function mapStateToProps(state){return{discounts:getDiscounts(state)};};export default connect(mapStateToProps);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import*as React from'react';import{SurroundPortals}from'@shopgate/engage/components';import{CART_PAYMENT_BAR_TOTALS_DISCOUNTS}from'@shopgate/pwa-common-commerce/cart';import CartTotalLine from'@shopgate/pwa-ui-shared/CartTotalLine';import{CartContext}from"../../cart.context";import{spacer}from"./PaymentBarContent.style";import connect from"./PaymentBarDiscounts.connector";/**
|
|
2
|
+
* The Discounts component.
|
|
3
|
+
* @returns {JSX}
|
|
4
|
+
*/function PaymentBarDiscounts(_ref){var discounts=_ref.discounts,showSeparator=_ref.showSeparator,className=_ref.className;var _React$useContext=React.useContext(CartContext),currency=_React$useContext.currency,isLoading=_React$useContext.isLoading,hasPromotionCoupons=_React$useContext.hasPromotionCoupons;if(!discounts){return null;}return React.createElement(SurroundPortals,{portalName:CART_PAYMENT_BAR_TOTALS_DISCOUNTS},discounts.map(function(_ref2){var label=_ref2.label,amount=_ref2.amount;return React.createElement(CartTotalLine,{key:"discount-".concat(label,"-").concat(amount),type:"discount",isDisabled:isLoading,className:className},React.createElement(CartTotalLine.Label,{label:label?'cart.discount_with_label':'cart.discount',labelParams:{label:label},showSeparator:showSeparator}),React.createElement(CartTotalLine.Amount,{amount:-amount,currency:currency}),hasPromotionCoupons&&React.createElement(CartTotalLine.Spacer,{className:spacer}));}));}PaymentBarDiscounts.defaultProps={discounts:null,className:null,showSeparator:true};export default connect(PaymentBarDiscounts);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{connect}from'react-redux';import{getGrandTotal}from'@shopgate/pwa-common-commerce/cart/selectors';/**
|
|
2
|
+
* Maps the contents of the state to the component props.
|
|
3
|
+
* @param {Object} state The current application state.
|
|
4
|
+
* @return {Object} The extended component props.
|
|
5
|
+
*/var mapStateToProps=function mapStateToProps(state){return{amount:getGrandTotal(state)};};export default connect(mapStateToProps);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import*as React from'react';import{SurroundPortals}from'@shopgate/engage/components';import{CART_PAYMENT_BAR_TOTALS_GRAND_TOTAL}from'@shopgate/pwa-common-commerce/cart/constants/Portals';import CartTotalLine from'@shopgate/pwa-ui-shared/CartTotalLine';import{CartContext}from"../../cart.context";import{spacer}from"./PaymentBarContent.style";import connect from"./PaymentBarGrandTotal.connector";/**
|
|
2
|
+
* The GrandTotal component.
|
|
3
|
+
* @returns {JSX}
|
|
4
|
+
*/function PaymentBarGrandTotal(_ref){var amount=_ref.amount,label=_ref.label,showSeparator=_ref.showSeparator,className=_ref.className;var _React$useContext=React.useContext(CartContext),hideTotal=_React$useContext.config.hideTotal,isLoading=_React$useContext.isLoading,currency=_React$useContext.currency,hasPromotionCoupons=_React$useContext.hasPromotionCoupons;if(hideTotal){return null;}return React.createElement(SurroundPortals,{portalName:CART_PAYMENT_BAR_TOTALS_GRAND_TOTAL},React.createElement(CartTotalLine,{isDisabled:isLoading,type:"grandTotal",className:className},React.createElement(CartTotalLine.Label,{label:label,showSeparator:showSeparator}),React.createElement(CartTotalLine.Amount,{amount:amount,currency:currency}),hasPromotionCoupons&&React.createElement(CartTotalLine.Spacer,{className:spacer})));}PaymentBarGrandTotal.defaultProps={className:null,showSeparator:true,label:'cart.total'};export default connect(PaymentBarGrandTotal);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import React,{Fragment,useContext}from'react';import PropTypes from'prop-types';import classNames from'classnames';import{css}from'glamor';import CartTotalLine from'@shopgate/pwa-ui-shared/CartTotalLine';import{errorBehavior}from'@shopgate/engage/core';import{responsiveMediaQuery}from'@shopgate/engage/styles';import{CartContext}from"../../cart.context";import{spacer}from"./PaymentBarContent.style";var styles={line:css(_defineProperty({justifyContent:'start'},responsiveMediaQuery('<=xs',{appAlways:true}),{fontSize:'0.75rem',paddingBottom:3})).toString(),message:css({order:2}).toString(),error:css({color:'var(--color-state-alert)'}).toString(),warning:css({color:'var(--color-state-warning)'}).toString(),info:css({color:'var(--color-state-ok)'}).toString(),loading:css({opacity:0.4}).toString()};/**
|
|
2
|
+
* @param {Object} props The components props
|
|
3
|
+
* @returns {JSX}
|
|
4
|
+
*/var PaymentBarPromotionCouponMessages=function PaymentBarPromotionCouponMessages(_ref){var messages=_ref.messages;var _useContext=useContext(CartContext),isLoading=_useContext.isLoading;if(!messages.length){return null;}return messages.map(function(_ref2){var message=_ref2.message,additionalParams=_ref2.additionalParams,type=_ref2.type;return React.createElement(CartTotalLine,{className:styles.line,key:message},React.createElement(Fragment,null,React.createElement(CartTotalLine.Spacer,{className:spacer}),React.createElement("div",{className:classNames(styles.message,_defineProperty(_defineProperty(_defineProperty(_defineProperty({},styles.loading,isLoading),styles.error,type==='error'),styles.warning,type==='warning'),styles.info,type==='info'))},errorBehavior.getErrorMessage(message,additionalParams))));});};PaymentBarPromotionCouponMessages.defaultProps={messages:[]};export default PaymentBarPromotionCouponMessages;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{connect}from'react-redux';import{getPromotionCoupons,deleteCouponsFromCart}from'@shopgate/engage/cart';/**
|
|
2
|
+
* Maps the contents of the state to the component props.
|
|
3
|
+
* @param {Object} state The current application state.
|
|
4
|
+
* @return {Object} The extended component props.
|
|
5
|
+
*/var mapStateToProps=function mapStateToProps(state){return{coupons:getPromotionCoupons(state)};};/**
|
|
6
|
+
* @param {Function} dispatch The redux dispatch function.
|
|
7
|
+
* @return {Object} The extended component props.
|
|
8
|
+
*/var mapDispatchToProps=function mapDispatchToProps(dispatch){return{deleteCoupon:function deleteCoupon(couponCode){return dispatch(deleteCouponsFromCart([couponCode]));}};};export default connect(mapStateToProps,mapDispatchToProps);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import React,{useContext,Fragment}from'react';import PropTypes from'prop-types';import{css}from'glamor';import classNames from'classnames';import CartTotalLine from'@shopgate/pwa-ui-shared/CartTotalLine';import{i18n}from'@shopgate/engage/core';import{CrossIcon}from'@shopgate/engage/components';import{responsiveMediaQuery}from'@shopgate/engage/styles';import PaymentBarPromotionCouponMessages from"./PaymentBarPromotionCouponMessages";import{CartContext}from"../../cart.context";import PaymentBarPromotionalText from"./PaymentBarPromotionalText";import{spacer}from"./PaymentBarContent.style";import connect from"./PaymentBarPromotionCoupons.connector";var styles={icon:css(_defineProperty({backgroundColor:'#898989',color:'#fff',borderRadius:32,padding:4,cursor:'pointer',fontSize:'0.75rem',display:'inline-flex'},responsiveMediaQuery('<=xs',{appAlways:true}),{padding:3})).toString(),withMessages:css({paddingBottom:'0px !important'}).toString()};/**
|
|
2
|
+
* @returns {JSX}
|
|
3
|
+
*/var PaymentBarPromotionCoupons=function PaymentBarPromotionCoupons(_ref){var coupons=_ref.coupons,className=_ref.className,deleteCoupon=_ref.deleteCoupon,showSeparator=_ref.showSeparator;var _useContext=useContext(CartContext),isLoading=_useContext.isLoading,currency=_useContext.currency;return coupons.map(function(coupon){var code=coupon.code,promotion=coupon.promotion,messages=coupon.messages;var _ref2=promotion||{},_ref2$discount=_ref2.discount,discount=_ref2$discount===void 0?{}:_ref2$discount,promotionalText=_ref2.promotionalText;var amount=discount.absoluteAmount;var hasError=false;if(Array.isArray(messages)&&messages.length){hasError=!!messages.find(function(_ref3){var type=_ref3.type;return type==='error';});}return React.createElement(Fragment,{key:"promotion-coupon-".concat(code,"-").concat(amount)},React.createElement(CartTotalLine,{isDisabled:isLoading,className:classNames(className,_defineProperty({},styles.withMessages,!!messages.length))},React.createElement(CartTotalLine.Label,{label:i18n.text('cart.coupon_label',{label:code}),showSeparator:showSeparator,suffix:!hasError?React.createElement(PaymentBarPromotionalText,{text:promotionalText}):null}),amount&&React.createElement(CartTotalLine.Amount,{amount:amount,currency:currency}),React.createElement(CartTotalLine.Spacer,{className:spacer},React.createElement("div",{className:styles.icon,onClick:function onClick(){deleteCoupon(code);},onKeyDown:function onKeyDown(){deleteCoupon(code);},role:"button",tabIndex:0},React.createElement(CrossIcon,null)))),React.createElement(PaymentBarPromotionCouponMessages,{messages:messages}),hasError&&React.createElement(PaymentBarPromotionalText,{text:promotionalText,renderIcon:false}));});};PaymentBarPromotionCoupons.defaultProps={className:null,showSeparator:true};export default connect(PaymentBarPromotionCoupons);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import React,{Fragment,useCallback,useContext}from'react';import PropTypes from'prop-types';import{css}from'glamor';import{connect}from'react-redux';import classNames from'classnames';import{nl2br,showModal as showModalAction}from'@shopgate/engage/core';import{InfoIcon}from'@shopgate/engage/components';import{responsiveMediaQuery}from'@shopgate/engage/styles';import{themeConfig}from'@shopgate/pwa-common/helpers/config';import CartTotalLine from'@shopgate/pwa-ui-shared/CartTotalLine';import{spacer}from"./PaymentBarContent.style";import{CartContext}from"../../cart.context";var mapDispatchToProps={showModal:showModalAction};var variables=themeConfig.variables;var styles={textWrapper:css({padding:"".concat(variables.gap.xsmall,"px 0"),color:'var(--color-state-alert)',order:3}).toString(),line:css(_defineProperty({justifyContent:'start'},responsiveMediaQuery('<=xs',{appAlways:true}),{fontSize:'0.75rem',paddingBottom:3,verticalAlign:'text-bottom'})).toString(),message:css({order:2}).toString(),iconWrapper:css(_defineProperty({cursor:'pointer',color:'var(--color-primary)',fontSize:'1.5rem',display:'inline-flex',verticalAlign:'bottom',paddingBottom:1},responsiveMediaQuery('<=xs',{appAlways:true}),{fontSize:'1.375rem',paddingBottom:0})).toString(),icon:css({display:'inline'}).toString(),loading:css({opacity:0.5}).toString()};/**
|
|
2
|
+
* @param {Object} props The component props
|
|
3
|
+
* @returns {JSX}
|
|
4
|
+
*/var PaymentBarPromotionalText=function PaymentBarPromotionalText(_ref){var text=_ref.text,showModal=_ref.showModal,renderIcon=_ref.renderIcon;var _useContext=useContext(CartContext),isLoading=_useContext.isLoading;var showText=useCallback(function(){showModal({message:text,title:null,confirm:null,dismiss:'modal.ok'});},[showModal,text]);if(!text){return null;}if(!renderIcon){return React.createElement(CartTotalLine,{className:styles.line},React.createElement(Fragment,null,React.createElement("div",{className:classNames(styles.textWrapper,_defineProperty({},styles.loading,isLoading)),dangerouslySetInnerHTML:{__html:nl2br(text)}}),React.createElement(CartTotalLine.Spacer,{className:spacer})));}return React.createElement("span",{onClick:showText,onKeyDown:showText,className:classNames(styles.iconWrapper,_defineProperty({},styles.loading,isLoading)),role:"button",tabIndex:0},React.createElement(InfoIcon,{className:styles.icon}));};PaymentBarPromotionalText.defaultProps={text:null,renderIcon:true};export default connect(null,mapDispatchToProps)(PaymentBarPromotionalText);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{connect}from'react-redux';import{historyReset}from'@shopgate/pwa-common/actions/router';var mapDispatchToProps={historyReset:historyReset};export default connect(null,mapDispatchToProps);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import*as React from'react';import{I18n,SurroundPortals,RippleButton}from'@shopgate/engage/components';import{CART_CHECKOUT_BUTTON}from'@shopgate/pwa-common-commerce/cart/constants/Portals';import{FulfillmentSheet,STAGE_RESERVE_FORM}from"../../../locations";import{CartContext}from"../../cart.context";import{button,disabledButton}from"./PaymentBarCheckoutButton.style";import connect from"./PaymentBarReserveButton.connector";/**
|
|
2
|
+
* The reserve button component.
|
|
3
|
+
* @param {Object} props The component props.
|
|
4
|
+
* @return {JSX}
|
|
5
|
+
*/function PaymentBarReserveButton(_ref){var historyReset=_ref.historyReset;var _React$useContext=React.useContext(CartContext),orderable=_React$useContext.flags.orderable;/**
|
|
6
|
+
* Handles the click on the button.
|
|
7
|
+
*/function handleClick(){FulfillmentSheet.open({stage:STAGE_RESERVE_FORM,callback:function callback(l,p,orderSuccess){if(orderSuccess===true){historyReset();}}});}return React.createElement(SurroundPortals,{portalName:CART_CHECKOUT_BUTTON,portalProps:{isActive:orderable}},React.createElement(RippleButton,{onClick:handleClick,disabled:!orderable,type:"regular",className:orderable?button:disabledButton},React.createElement(I18n.Text,{string:"cart.reserve"})));}export default connect(PaymentBarReserveButton);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{connect}from'react-redux';import{getShippingCost}from'@shopgate/pwa-common-commerce/cart/selectors';/**
|
|
2
|
+
* Maps the contents of the state to the component props.
|
|
3
|
+
* @param {Object} state The current application state.
|
|
4
|
+
* @return {Object} The extended component props.
|
|
5
|
+
*/var mapStateToProps=function mapStateToProps(state){return{shippingCost:getShippingCost(state)};};export default connect(mapStateToProps);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import*as React from'react';import{SurroundPortals}from'@shopgate/engage/components';import{CART_PAYMENT_BAR_TOTALS_SHIPPING,getShippingLine}from'@shopgate/pwa-common-commerce/cart';import CartTotalLine from'@shopgate/pwa-ui-shared/CartTotalLine';import{CartContext}from"../../cart.context";import{spacer}from"./PaymentBarContent.style";import connect from"./PaymentBarShippingCost.connector";/**
|
|
2
|
+
* @returns {JSX}
|
|
3
|
+
*/function PaymentBarShippingCost(_ref){var shippingCost=_ref.shippingCost,showSeparator=_ref.showSeparator,className=_ref.className;var _React$useContext=React.useContext(CartContext),currency=_React$useContext.currency,isLoading=_React$useContext.isLoading,isUserLoggedIn=_React$useContext.isUserLoggedIn,config=_React$useContext.config,hasPromotionCoupons=_React$useContext.hasPromotionCoupons;var shippingLine=React.useMemo(function(){return getShippingLine(config,isUserLoggedIn,shippingCost);},[config,isUserLoggedIn,shippingCost]);return React.createElement(SurroundPortals,{portalName:CART_PAYMENT_BAR_TOTALS_SHIPPING},shippingLine&&React.createElement(CartTotalLine,{isDisabled:isLoading,type:"shipping",className:className},React.createElement(CartTotalLine.Label,{label:shippingLine.label,showSeparator:showSeparator!==null?showSeparator:!!shippingLine.amount}),React.createElement(CartTotalLine.Amount,{amount:shippingLine.amount,currency:currency}),React.createElement(CartTotalLine.Hint,{hint:shippingLine.hint}),hasPromotionCoupons&&React.createElement(CartTotalLine.Spacer,{className:spacer})));}PaymentBarShippingCost.defaultProps={className:null,showSeparator:true,shippingCost:null};export default connect(PaymentBarShippingCost);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{connect}from'react-redux';import{getSubTotal}from'@shopgate/pwa-common-commerce/cart/selectors';/**
|
|
2
|
+
* Maps the contents of the state to the component props.
|
|
3
|
+
* @param {Object} state The current application state.
|
|
4
|
+
* @return {Object} The extended component props.
|
|
5
|
+
*/var mapStateToProps=function mapStateToProps(state){return{amount:getSubTotal(state)};};export default connect(mapStateToProps);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import*as React from'react';import{SurroundPortals}from'@shopgate/engage/components';import{CART_PAYMENT_BAR_TOTALS_SUB_TOTAL}from'@shopgate/pwa-common-commerce/cart/constants/Portals';import CartTotalLine from'@shopgate/pwa-ui-shared/CartTotalLine';import{CartContext}from"../../cart.context";import{spacer}from"./PaymentBarContent.style";import connect from"./PaymentBarSubTotal.connector";/**
|
|
2
|
+
* @returns {JSX}
|
|
3
|
+
*/function PaymentBarSubTotal(_ref){var amount=_ref.amount,label=_ref.label,showSeparator=_ref.showSeparator,className=_ref.className;var _React$useContext=React.useContext(CartContext),currency=_React$useContext.currency,isLoading=_React$useContext.isLoading,hasPromotionCoupons=_React$useContext.hasPromotionCoupons;return React.createElement(SurroundPortals,{portalName:CART_PAYMENT_BAR_TOTALS_SUB_TOTAL},amount&&React.createElement(CartTotalLine,{isDisabled:isLoading,type:"subTotal",className:className},React.createElement(CartTotalLine.Label,{label:label,showSeparator:showSeparator}),React.createElement(CartTotalLine.Amount,{amount:amount,currency:currency}),hasPromotionCoupons&&React.createElement(CartTotalLine.Spacer,{className:spacer})));}PaymentBarSubTotal.defaultProps={className:null,showSeparator:true,label:'cart.subtotal'};export default connect(PaymentBarSubTotal);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{connect}from'react-redux';import{getTax}from'@shopgate/pwa-common-commerce/cart/selectors';/**
|
|
2
|
+
* Maps the contents of the state to the component props.
|
|
3
|
+
* @param {Object} state The current application state.
|
|
4
|
+
* @return {Object} The extended component props.
|
|
5
|
+
*/var mapStateToProps=function mapStateToProps(state){return{taxData:getTax(state)};};export default connect(mapStateToProps);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import*as React from'react';import{SurroundPortals}from'@shopgate/engage/components';import{CART_PAYMENT_BAR_TOTALS_TAX,getTaxLine}from'@shopgate/pwa-common-commerce/cart';import CartTotalLine from'@shopgate/pwa-ui-shared/CartTotalLine';import{CartContext}from"../../cart.context";import{spacer}from"./PaymentBarContent.style";import connect from"./PaymentBarTax.connector";/**
|
|
2
|
+
* The Tax component.
|
|
3
|
+
* @returns {JSX}
|
|
4
|
+
*/function PaymentBarTax(_ref){var taxData=_ref.taxData,showSeparator=_ref.showSeparator,className=_ref.className;var _React$useContext=React.useContext(CartContext),currency=_React$useContext.currency,isLoading=_React$useContext.isLoading,config=_React$useContext.config,hasPromotionCoupons=_React$useContext.hasPromotionCoupons;if(!taxData){return null;}var taxLine=getTaxLine(config,taxData);if(!taxLine){return null;}return React.createElement(SurroundPortals,{portalName:CART_PAYMENT_BAR_TOTALS_TAX},React.createElement(CartTotalLine,{isDisabled:isLoading,type:"tax",className:className},React.createElement(CartTotalLine.Label,{label:taxLine.label,showSeparator:showSeparator}),React.createElement(CartTotalLine.Amount,{amount:taxLine.amount,currency:currency}),React.createElement(CartTotalLine.Hint,{hint:taxLine.hint}),hasPromotionCoupons&&React.createElement(CartTotalLine.Spacer,{className:spacer})));}PaymentBarTax.defaultProps={taxData:null,className:null,showSeparator:true};export default connect(PaymentBarTax);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{default as PaymentBar}from"./PaymentBar";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{connect}from'react-redux';import{getSubstitutionPreferencesEnabled}from'@shopgate/engage/core/selectors/merchantSettings';/**
|
|
2
|
+
* Maps the current application state to the component props.
|
|
3
|
+
* @param {Object} state The current application state.
|
|
4
|
+
* @return {Object} The populated component props.
|
|
5
|
+
*/var mapStateToProps=function mapStateToProps(state){return{substitutionPreferencesEnabled:getSubstitutionPreferencesEnabled(state)};};export default connect(mapStateToProps);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from'react';import PropTypes from'prop-types';import classNames from'classnames';import{Toggle}from'@shopgate/engage/components';import{root,checkbox,rightSpace,text}from"./style";import connect from"./connector";/**
|
|
2
|
+
* Renders the cart reservation card label.
|
|
3
|
+
* @param {Object} props The component props.
|
|
4
|
+
* @returns {JSX.Element}
|
|
5
|
+
*/var Substitution=function Substitution(_ref){var id=_ref.id,onChange=_ref.onChange,checked=_ref.checked,className=_ref.className,label=_ref.label,disabled=_ref.disabled;return React.createElement("div",{className:classNames(root,className)},React.createElement("label",{"aria-hidden":true,className:text,htmlFor:id,id:"".concat(id,"-label")},label),React.createElement("div",{className:rightSpace},React.createElement(Toggle,{className:checkbox,checked:checked,id:id,onChange:onChange,disabled:disabled})));};Substitution.defaultProps={className:undefined,disabled:false,checked:false};/**
|
|
6
|
+
* Gate component for Substitution.
|
|
7
|
+
* @param {Object} props The component props.
|
|
8
|
+
* @returns {JSX}
|
|
9
|
+
*/var Wrapper=function Wrapper(_ref2){var substitutionPreferencesEnabled=_ref2.substitutionPreferencesEnabled,children=_ref2.children;return substitutionPreferencesEnabled?children:null;};Wrapper.propTypes={substitutionPreferencesEnabled:PropTypes.bool.isRequired};var ConnectedWrapper=connect(Wrapper);export{ConnectedWrapper as SubstitutionWrapper};export default Substitution;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import{css}from'glamor';import{themeVariables}from'@shopgate/pwa-common/helpers/config';import{responsiveMediaQuery}from'@shopgate/engage/styles';var gap=themeVariables.gap;export var root=css({padding:gap.big,display:'flex',flexDirection:'row',justifyContent:'flex-end',alignItems:'baseline',flex:1}).toString();export var checkbox=css({marginLeft:8}).toString();export var text=css({flexGrow:0}).toString();export var rightSpace=css(_defineProperty({flex:1,display:'flex',justifyContent:'flex-end',alignItems:'baseline',flexGrow:0},responsiveMediaQuery('>xs',{webOnly:true}),{flex:0})).toString();
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{connect}from'react-redux';import{makeGetShopSettingByKey,SHOP_SETTING_CART_SUPPLEMENTAL_CONTENT}from'@shopgate/engage/core';/**
|
|
2
|
+
* Creates the mapStateToProps connector function.
|
|
3
|
+
* @returns {Function}
|
|
4
|
+
*/var makeMapStateToProps=function makeMapStateToProps(){var getShopSettingsByKey=makeGetShopSettingByKey(SHOP_SETTING_CART_SUPPLEMENTAL_CONTENT);return function(state,props){return{text:getShopSettingsByKey(state,props)};};};export default connect(makeMapStateToProps);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from'react';import classNames from'classnames';import PropTypes from'prop-types';import{wrapper}from"./SupplementalContent.styles";import connect from"./SupplementalContent.connector";/**
|
|
2
|
+
* The SupplementalContent component
|
|
3
|
+
* @param {Object} props The component props
|
|
4
|
+
* @returns {JSX}
|
|
5
|
+
*/var SupplementalContent=function SupplementalContent(_ref){var text=_ref.text,className=_ref.className;if(!text){return null;}/* eslint-disable react/no-danger */return React.createElement("div",{className:classNames(wrapper,className),dangerouslySetInnerHTML:{__html:text}});/* eslint-enable react/no-danger */};SupplementalContent.defaultProps={text:null,className:null};export default connect(SupplementalContent);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var variables=themeConfig.variables;export var wrapper=css({display:'block',color:'var(--color-text-low-emphasis)',fontSize:12,lineHeight:'unset',padding:"".concat(variables.gap.big,"px 0"),'> *:first-child':{marginTop:0},' ol, ul':{margin:"".concat(variables.gap.small,"px 0"),paddingLeft:variables.gap.xbig},' ol':{listStyle:'decimal'},' ul':{listStyle:'disc'},' a':{textDecoration:'underline',color:'var(--color-primary)'}}).toString();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{default as SupplementalContent}from"./SupplementalContent";
|
package/cart/index.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/** @module cart */ // ACTIONS
|
|
2
|
-
export{default as addCouponsToCart}from'@shopgate/pwa-common-commerce/cart/actions/addCouponsToCart';export{default as addProductsToCart}from'@shopgate/pwa-common-commerce/cart/actions/addProductsToCart';export{default as deleteCouponsFromCart}from'@shopgate/pwa-common-commerce/cart/actions/deleteCouponsFromCart';export{default as deleteProductsFromCart}from'@shopgate/pwa-common-commerce/cart/actions/deleteProductsFromCart';export{default as fetchCart}from'@shopgate/pwa-common-commerce/cart/actions/fetchCart';export{default as updateProductsInCart}from'@shopgate/pwa-common-commerce/cart/actions/updateProductsInCart';//
|
|
3
|
-
export
|
|
4
|
-
export*from'@shopgate/pwa-common-commerce/cart/
|
|
5
|
-
export*from'@shopgate/pwa-common-commerce/cart/
|
|
6
|
-
export*from'@shopgate/pwa-common-commerce/cart/
|
|
2
|
+
export{default as addCouponsToCart}from'@shopgate/pwa-common-commerce/cart/actions/addCouponsToCart';export{default as addProductsToCart}from'@shopgate/pwa-common-commerce/cart/actions/addProductsToCart';export{default as deleteCouponsFromCart}from'@shopgate/pwa-common-commerce/cart/actions/deleteCouponsFromCart';export{default as deleteProductsFromCart}from'@shopgate/pwa-common-commerce/cart/actions/deleteProductsFromCart';export{default as fetchCart}from'@shopgate/pwa-common-commerce/cart/actions/fetchCart';export{default as updateProductsInCart}from'@shopgate/pwa-common-commerce/cart/actions/updateProductsInCart';// ACTION CREATORS
|
|
3
|
+
export{default as setCouponFieldError}from'@shopgate/pwa-common-commerce/cart/action-creators/setCouponFieldError';export{default as setCouponFieldValue}from'@shopgate/pwa-common-commerce/cart/action-creators/setCouponFieldValue';// CONSTANTS
|
|
4
|
+
export*from'@shopgate/pwa-common-commerce/cart/constants/index';export*from'@shopgate/pwa-common-commerce/cart/constants/PipelineErrors';export*from'@shopgate/pwa-common-commerce/cart/constants/Pipelines';export*from'@shopgate/pwa-common-commerce/cart/constants/Portals';export{FLAG_ORDERABLE,FLAG_COUPONS,FLAG_TAX_INCLUDED,FLAG_MULTI_LINE_RESERVE,CART_MAX_ITEMS,CART_INPUT_AUTO_SCROLL_DELAY}from"./cart.constants";// HELPERS
|
|
5
|
+
export*from'@shopgate/pwa-common-commerce/cart/helpers';export*from'@shopgate/pwa-common-commerce/cart/helpers/config';export{default as createPipelineErrorList}from'@shopgate/pwa-common-commerce/cart/helpers/createPipelineErrorList';export*from'@shopgate/pwa-common-commerce/cart/helpers/shipping';export*from'@shopgate/pwa-common-commerce/cart/helpers/tax';export{sortCartItems}from"./cart.helpers";// SELECTORS
|
|
6
|
+
export*from'@shopgate/pwa-common-commerce/cart/selectors';export{makeIsAddToCartButtonDisabled,getAppliedPromotionsWithoutCoupons,getPromotionCoupons,hasLineItemPromotions,hasDirectShipItems,isDirectShipOnly}from"./cart.selectors";// STREAMS
|
|
7
|
+
// eslint-disable-next-line import/export
|
|
8
|
+
export*from"./streams";// CONTEXTS
|
|
9
|
+
export{CartContext}from"./cart.context";// COMPONENTS
|
|
10
|
+
export{PaymentBar}from"./components/PaymentBar";export{CartItemGroup,CartItems}from"./components/CartItems";export{CartItem}from"./components/CartItem";export{CartHeaderWide}from"./components/CartHeaderWide";export{default as CartSummaryWide}from"./components/CartSummaryWide/CartSummaryWide";export{SupplementalContent}from"./components/SupplementalContent";export{default as CartItemsSubstitution}from"./components/CartItems/CartItemsSubstitution";// HOOKS
|
|
11
|
+
export{useCartContext}from"./cart.hooks";// TYPES
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from'@shopgate/pwa-common-commerce/cart/streams';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{default as fetchCategory}from'@shopgate/pwa-common-commerce/category/actions/fetchCategory';export{default as fetchCategoryOrRootCategories}from'@shopgate/pwa-common-commerce/category/actions/fetchCategoryOrRootCategories';export{default as fetchCategoryChildren}from'@shopgate/pwa-common-commerce/category/actions/fetchCategoryChildren';export{default as fetchCategoryProducts}from'@shopgate/pwa-common-commerce/category/actions/fetchCategoryProducts';export{default as fetchRootCategories}from'@shopgate/pwa-common-commerce/category/actions/fetchRootCategories';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{connect}from'react-redux';import{getCategoryImagePlaceholder}from'@shopgate/engage/core';/**
|
|
2
|
+
* Maps the current application state to the component props.
|
|
3
|
+
* @param {Object} state The current application state.
|
|
4
|
+
* @return {Object} The populated component props.
|
|
5
|
+
*/var mapStateToProps=function mapStateToProps(state){return{placeholderSrc:getCategoryImagePlaceholder(state)};};export default connect(mapStateToProps);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance");}function _iterableToArrayLimit(arr,i){var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}import React,{useState,useCallback}from'react';import PropTypes from'prop-types';import{Image}from'@shopgate/engage/components';import connect from"./connector";/**
|
|
2
|
+
* The CategoryImage component
|
|
3
|
+
* @param {Object} props The component props.
|
|
4
|
+
* @returns {JSX}
|
|
5
|
+
*/var CategoryImage=function CategoryImage(_ref){var className=_ref.className,src=_ref.src,placeholderSrc=_ref.placeholderSrc;var _useState=useState(!src),_useState2=_slicedToArray(_useState,2),showPlaceholder=_useState2[0],setShowPlaceholder=_useState2[1];var onImageError=useCallback(function(){setShowPlaceholder(true);},[setShowPlaceholder]);if(!showPlaceholder){return React.createElement(Image,{className:className,src:src,onError:onImageError});}if(!placeholderSrc){return null;}return React.createElement(Image,{key:"placeholder",className:className,src:placeholderSrc});};CategoryImage.defaultProps={src:null,placeholderSrc:null,className:null};export default connect(CategoryImage);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from'react';import PropTypes from'prop-types';import{bin2hex}from'@shopgate/pwa-common/helpers/data';import{CATEGORY_PATH}from'@shopgate/pwa-common-commerce/category/constants';import Portal from'@shopgate/pwa-common/components/Portal';import{Placeholder}from'@shopgate/pwa-ui-shared';import{CATEGORY_ITEM}from'@shopgate/pwa-common-commerce/category/constants/Portals';import{i18n}from'@shopgate/engage/core';import{getShowAllProductsFilters}from'@shopgate/engage/category';import{SheetList}from
|
|
1
|
+
import React from'react';import PropTypes from'prop-types';import classNames from'classnames';import{bin2hex}from'@shopgate/pwa-common/helpers/data';import{CATEGORY_PATH}from'@shopgate/pwa-common-commerce/category/constants';import Portal from'@shopgate/pwa-common/components/Portal';import{Placeholder}from'@shopgate/pwa-ui-shared';import{CATEGORY_ITEM}from'@shopgate/pwa-common-commerce/category/constants/Portals';import{i18n}from'@shopgate/engage/core';import{getShowAllProductsFilters}from'@shopgate/engage/category';import{SheetList,TextLink}from'@shopgate/engage/components';import CategoryImage from"../CategoryImage";import styles from"./style";/**
|
|
2
2
|
* The CategoryList component.
|
|
3
3
|
* @param {Object} props The component props.
|
|
4
4
|
* @param {Array} props.categories The categories to display.
|
|
5
5
|
* @param {Array} props.categories The number of rows to prerender.
|
|
6
6
|
* @returns {JSX}
|
|
7
|
-
*/var CategoryList=function CategoryList(_ref){var categories=_ref.categories,parentCategory=_ref.parentCategory,prerender=_ref.prerender,showAllProducts=_ref.showAllProducts;if(!categories||!categories.length){if(prerender===0){return null;}return
|
|
7
|
+
*/var CategoryList=function CategoryList(_ref){var categories=_ref.categories,parentCategory=_ref.parentCategory,prerender=_ref.prerender,showAllProducts=_ref.showAllProducts,showImages=_ref.showImages;if(!categories||!categories.length){if(prerender===0){return null;}return React.createElement(SheetList,{className:classNames(styles.sheet,'engage__category__category-list')},Array(Math.min(prerender,8)).fill('').map(function(val,index){var key="placeholder-".concat(index);return React.createElement(Placeholder,{height:20,key:key,left:0,top:18,width:220});}));}var filters=getShowAllProductsFilters(parentCategory);return React.createElement(SheetList,{className:classNames(styles.sheet,'engage__category__category-list')},showAllProducts?React.createElement("div",{className:classNames(styles.showAllProducts,'engage__category__category-show-all-products')},React.createElement(Portal,{key:parentCategory.id,name:"category.show-all-products",props:{categoryId:parentCategory.id}},React.createElement(SheetList.Item,{link:"".concat(CATEGORY_PATH,"/").concat(bin2hex(parentCategory.id),"/all"),title:i18n.text('category.showAllProducts.label'),linkState:{categoryName:parentCategory.name,categoryId:parentCategory.id,filters:filters},testId:"showAllProducts",linkComponent:TextLink}))):null,categories.map(function(category){return React.createElement(Portal,{key:category.id,name:CATEGORY_ITEM,props:{categoryId:category.id}},React.createElement(SheetList.Item,{link:"".concat(CATEGORY_PATH,"/").concat(bin2hex(category.id)),title:category.name,description:category.description,linkState:{categoryId:category.id,title:category.name},testId:category.name,rightComponent:showImages?React.createElement(CategoryImage,{className:styles.image,src:category.imageUrl}):null,linkComponent:TextLink}));}));};CategoryList.defaultProps={categories:null,parentCategory:null,prerender:0,showAllProducts:false,showImages:false};export default CategoryList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var colors=themeConfig.colors;var sheet=css({background:colors.light}).toString();var showAllProducts=css({fontWeight:700}).toString();export default{sheet:sheet,showAllProducts:showAllProducts};
|
|
1
|
+
import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var colors=themeConfig.colors;var sheet=css({background:colors.light}).toString();var showAllProducts=css({fontWeight:700}).toString();var image=css({display:'none',background:'red',borderRadius:20}).toString();export default{sheet:sheet,showAllProducts:showAllProducts,image:image};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{default as CategoryImage}from"./CategoryImage";export{default as CategoryList}from"./CategoryList";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from'@shopgate/pwa-common-commerce/category/constants/index';export*from'@shopgate/pwa-common-commerce/category/constants/Pipelines';export*from'@shopgate/pwa-common-commerce/category/constants/Portals';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from'@shopgate/pwa-common-commerce/category/helpers';
|
package/category/index.js
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
/** @module category */
|
|
2
|
-
export{default as fetchCategory}from'@shopgate/pwa-common-commerce/category/actions/fetchCategory';export{default as fetchCategoryOrRootCategories}from'@shopgate/pwa-common-commerce/category/actions/fetchCategoryOrRootCategories';export{default as fetchCategoryChildren}from'@shopgate/pwa-common-commerce/category/actions/fetchCategoryChildren';export{default as fetchCategoryProducts}from'@shopgate/pwa-common-commerce/category/actions/fetchCategoryProducts';export{default as fetchRootCategories}from'@shopgate/pwa-common-commerce/category/actions/fetchRootCategories';// CONSTANTS
|
|
3
|
-
export*from'@shopgate/pwa-common-commerce/category/constants/index';export*from'@shopgate/pwa-common-commerce/category/constants/Pipelines';export*from'@shopgate/pwa-common-commerce/category/constants/Portals';// SELECTORS
|
|
4
|
-
export*from'@shopgate/pwa-common-commerce/category/selectors';// STREAMS
|
|
5
|
-
export*from'@shopgate/pwa-common-commerce/category/streams';// HELPERS
|
|
6
|
-
export*from'@shopgate/pwa-common-commerce/category/helpers';// COMPONENTS
|
|
7
|
-
export{default as CategoryList}from"./components/CategoryList";
|
|
1
|
+
/** @module category */ /* eslint-disable import/export */export*from"./actions";export*from"./components";export*from"./constants";export*from"./helpers";export*from"./selectors";export*from"./streams";/* eslint-enable import/export */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{preferredLocationDidUpdate$,preferredLocationDidUpdateGlobalNotOnCategory$,preferredLocationDidUpdateGlobalOnCategory$}from'@shopgate/engage/locations/locations.streams';import{categoryDidBackEnter$,categoryFiltersDidUpdate$}from'@shopgate/pwa-common-commerce/category/streams';export*from'@shopgate/pwa-common-commerce/category/streams';export var categoryProductsNeedUpdate$=preferredLocationDidUpdate$.merge(preferredLocationDidUpdateGlobalNotOnCategory$).switchMap(function(){return categoryDidBackEnter$.first();}).merge(categoryFiltersDidUpdate$).merge(preferredLocationDidUpdateGlobalOnCategory$);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{ADD_CHECKOUT_CAMPAIGN}from"../constants/actionTypes";/**
|
|
2
|
+
* Creates the dispatched ADD_CHECKOUT_CAMPAIGN action object.
|
|
3
|
+
* @param {Object} data The campaign data
|
|
4
|
+
* @returns {Object} The dispatched action object.
|
|
5
|
+
*/export var addCheckoutCampaign=function addCheckoutCampaign(){var data=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return{type:ADD_CHECKOUT_CAMPAIGN,data:data};};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{CLEAR_CHECKOUT_CAMPAIGN}from"../constants/actionTypes";/**
|
|
2
|
+
* Creates the dispatched CLEAR_CHECKOUT_CAMPAIGN action object.
|
|
3
|
+
* @param {Object} data The received client information data.
|
|
4
|
+
* @returns {Object} The dispatched action object.
|
|
5
|
+
*/export var clearCheckoutCampaign=function clearCheckoutCampaign(){return{type:CLEAR_CHECKOUT_CAMPAIGN};};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{CLEAR_CHECKOUT_ORDER}from"../constants/actionTypes";/**
|
|
2
|
+
* Creates the dispatched CLEAR_CHECKOUT_ORDER action object.
|
|
3
|
+
* @returns {Object} The dispatched action object.
|
|
4
|
+
*/export var clearCheckoutOrder=function clearCheckoutOrder(){return{type:CLEAR_CHECKOUT_ORDER};};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{addCheckoutCampaign}from"./addCheckoutCampaign";export{clearCheckoutCampaign}from"./clearCheckoutCampaign";export{clearCheckoutOrder}from"./clearCheckoutOrder";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{VALIDATION_ERRORS_CHECKOUT}from"../constants/actionTypes";/**
|
|
2
|
+
* Creates the dispatched VALIDATION_ERRORS_CHECKOUT action object.
|
|
3
|
+
* @param {Array} errors An array of validation errors
|
|
4
|
+
* @returns {Object} The dispatched action object.
|
|
5
|
+
*/export var validationErrorsCheckout=function validationErrorsCheckout(errors){return{type:VALIDATION_ERRORS_CHECKOUT,errors:errors};};
|
|
@@ -0,0 +1,17 @@
|
|
|
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{showModal,historyResetTo,historyPop,INDEX_PATH}from'@shopgate/engage/core';import{CART_PATH}from'@shopgate/engage/cart';import{MODAL_PIPELINE_ERROR}from'@shopgate/pwa-common/constants/ModalTypes';import{getRouterStackIndex,makeGetPrevRouteIndexByPattern}from'@shopgate/pwa-common/selectors/router';import*as Sentry from'@sentry/browser';var getPrevRouteIndexByPatternCart=makeGetPrevRouteIndexByPattern(CART_PATH);/**
|
|
2
|
+
* Redirects the user to the cart
|
|
3
|
+
* @param {Function} dispatch The Redux dispatch function
|
|
4
|
+
* @param {Function} getState he Redux getState function
|
|
5
|
+
*/var gotoCart=function gotoCart(dispatch,getState){var state=getState();var currentRouteIndex=getRouterStackIndex(state);var nextRouteIndex=getPrevRouteIndexByPatternCart(state);if(nextRouteIndex!==-1){var steps=currentRouteIndex-nextRouteIndex;// Navigate back to a previous history entry if possible
|
|
6
|
+
dispatch(historyPop({steps:steps}));}else{// Reset the history stack to the desired page when there is no old page within the stack
|
|
7
|
+
dispatch(historyResetTo(CART_PATH));}};/**
|
|
8
|
+
* Handles checkout errors.
|
|
9
|
+
* @param {string} message Message shown to the user.
|
|
10
|
+
* @param {string} pipeline Pipeline name.
|
|
11
|
+
* @param {Object} error Error.
|
|
12
|
+
* @param {boolean} redirect Whether it should redirect.
|
|
13
|
+
* @param {Array} gotoCartErrorCodes A list of error codes which should redirect to the cart
|
|
14
|
+
* @return {Object}
|
|
15
|
+
*/export var errorCheckout=function errorCheckout(message,pipeline,error,redirect){var gotoCartErrorCodes=arguments.length>4&&arguments[4]!==undefined?arguments[4]:[];return function(dispatch,getState){var subCode;if(error===null||error===void 0?void 0:error.errors){var _error$errors2=_slicedToArray(error.errors,1),first=_error$errors2[0];subCode=first.code;}var errorObject={code:error.code||'NOT SET',message:JSON.stringify(error,null,2)};// Go back to homepage and inform shopper.
|
|
16
|
+
if(redirect){dispatch(historyResetTo(INDEX_PATH));}else if(['shopgate.checkout.initialize'].includes(pipeline)||gotoCartErrorCodes.includes(subCode)){gotoCart(dispatch,getState);}dispatch(showModal({type:MODAL_PIPELINE_ERROR,title:null,confirm:null,dismiss:'modal.ok',message:message,params:{pipeline:pipeline,message:JSON.stringify(errorObject,null,2)}}));// Log to sentry.
|
|
17
|
+
Sentry.withScope(function(scope){scope.setLevel(Sentry.Severity.Critical);scope.setExtra('origin','checkout');Sentry.captureException(errorObject);});return{needsPayment:false,success:false};};};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import _regeneratorRuntime from"@babel/runtime/regenerator";function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}import{PipelineRequest}from'@shopgate/engage/core';import{FETCH_CHECKOUT_ORDER,FETCH_CHECKOUT_ORDER_SUCCESS,FETCH_CHECKOUT_ORDER_ERROR}from"../constants/actionTypes";import{ERROR_CODE_CHECKOUT_GENERIC}from"../constants/errorCodes";/**
|
|
2
|
+
* Starts entering the checkout process for the customer.
|
|
3
|
+
* @returns {Function}
|
|
4
|
+
*/export var fetchCheckoutOrder=function fetchCheckoutOrder(){return(/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(dispatch){var pipelineRequest,_ref3,order;return _regeneratorRuntime.wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:dispatch({type:FETCH_CHECKOUT_ORDER});pipelineRequest=new PipelineRequest('shopgate.checkout.getOrder');_context.prev=2;_context.next=5;return pipelineRequest.setErrorBlacklist([ERROR_CODE_CHECKOUT_GENERIC]).dispatch();case 5:_ref3=_context.sent;order=_ref3.order;dispatch({type:FETCH_CHECKOUT_ORDER_SUCCESS,order:order});return _context.abrupt("return",order);case 11:_context.prev=11;_context.t0=_context["catch"](2);dispatch({type:FETCH_CHECKOUT_ORDER_ERROR,error:_context.t0});return _context.abrupt("return",null);case 15:case"end":return _context.stop();}},_callee,null,[[2,11]]);}));return function(_x){return _ref.apply(this,arguments);};}());};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import _regeneratorRuntime from"@babel/runtime/regenerator";function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}import{PipelineRequest}from'@shopgate/engage/core';import{FETCH_PAYMENT_METHODS,FETCH_PAYMENT_METHODS_SUCCESS,FETCH_PAYMENT_METHODS_ERROR}from"../constants/actionTypes";/**
|
|
2
|
+
* Starts entering the checkout process for the customer.
|
|
3
|
+
* @returns {Function}
|
|
4
|
+
*/export var fetchPaymentMethods=function fetchPaymentMethods(){return(/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(dispatch){var pipelineRequest,_ref3,paymentMethods;return _regeneratorRuntime.wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:dispatch({type:FETCH_PAYMENT_METHODS});pipelineRequest=new PipelineRequest('shopgate.checkout.getPaymentMethods');_context.prev=2;_context.next=5;return pipelineRequest.dispatch();case 5:_ref3=_context.sent;paymentMethods=_ref3.paymentMethods;dispatch({type:FETCH_PAYMENT_METHODS_SUCCESS,paymentMethods:paymentMethods});_context.next=13;break;case 10:_context.prev=10;_context.t0=_context["catch"](2);dispatch({type:FETCH_PAYMENT_METHODS_ERROR,error:_context.t0});case 13:case"end":return _context.stop();}},_callee,null,[[2,10]]);}));return function(_x){return _ref.apply(this,arguments);};}());};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{errorCheckout}from"./errorCheckout";export{fetchCheckoutOrder}from"./fetchCheckoutOrder";export{fetchPaymentMethods}from"./fetchPaymentMethods";export{initializeCheckout}from"./initializeCheckout";export{prepareCheckout}from"./prepareCheckout";export{submitCheckoutOrder}from"./submitCheckoutOrder";export{updateCheckoutOrder}from"./updateCheckoutOrder";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import _regeneratorRuntime from"@babel/runtime/regenerator";function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}import{PipelineRequest,EUNKNOWN}from'@shopgate/engage/core';import{INITIALIZE_CHECKOUT,INITIALIZE_CHECKOUT_SUCCESS,INITIALIZE_CHECKOUT_ERROR}from"../constants/actionTypes";/**
|
|
2
|
+
* Starts entering the checkout process for the customer.
|
|
3
|
+
* @returns {Function}
|
|
4
|
+
*/export var initializeCheckout=function initializeCheckout(){return(/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(dispatch){var pipelineError;return _regeneratorRuntime.wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:dispatch({type:INITIALIZE_CHECKOUT});_context.prev=1;_context.next=4;return new PipelineRequest('shopgate.checkout.initialize').setErrorBlacklist([EUNKNOWN]).dispatch();case 4:dispatch({type:INITIALIZE_CHECKOUT_SUCCESS});_context.next=11;break;case 7:_context.prev=7;_context.t0=_context["catch"](1);pipelineError=_context.t0;dispatch({type:INITIALIZE_CHECKOUT_ERROR,error:_context.t0});case 11:if(!pipelineError){_context.next=13;break;}throw pipelineError;case 13:case"end":return _context.stop();}},_callee,null,[[1,7]]);}));return function(_x){return _ref.apply(this,arguments);};}());};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import _regeneratorRuntime from"@babel/runtime/regenerator";function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}import*as Sentry from'@sentry/browser';import{getNeedsPaymentForOrder,getDefaultPaymentMethod,getPaymentMethods}from"../selectors/payment";import{getCheckoutOrder}from"../selectors/order";import{initializeCheckout}from"./initializeCheckout";import{fetchCheckoutOrder}from"./fetchCheckoutOrder";import{updateCheckoutOrder}from"./updateCheckoutOrder";import{fetchPaymentMethods}from"./fetchPaymentMethods";import{errorCheckout}from"./errorCheckout";/**
|
|
2
|
+
* Starts entering the checkout process for the customer.
|
|
3
|
+
* @returns {Function}
|
|
4
|
+
*/export var prepareCheckout=function prepareCheckout(_ref){var _ref$initializeOrder=_ref.initializeOrder,initializeOrder=_ref$initializeOrder===void 0?true:_ref$initializeOrder,_ref$initializePaymen=_ref.initializePayment,initializePayment=_ref$initializePaymen===void 0?true:_ref$initializePaymen;return(/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(dispatch,getState){var _order$paymentTransac,_order$paymentTransac2;var defaultPaymentMethod,needsPayment,order,paymentMethods,paymentAlreadyInitialized;return _regeneratorRuntime.wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:if(!initializeOrder){_context.next=9;break;}_context.prev=1;_context.next=4;return dispatch(initializeCheckout());case 4:_context.next=9;break;case 6:_context.prev=6;_context.t0=_context["catch"](1);return _context.abrupt("return",dispatch(errorCheckout('checkout.errors.checkCart','shopgate.checkout.initialize',_context.t0)));case 9:_context.next=11;return Promise.all([dispatch(fetchCheckoutOrder()),dispatch(fetchPaymentMethods())]);case 11:// If payment is needed we create a new payment transaction.
|
|
5
|
+
needsPayment=getNeedsPaymentForOrder(getState());if(!needsPayment){_context.next=16;break;}// Pick payment method.
|
|
6
|
+
defaultPaymentMethod=getDefaultPaymentMethod(getState());if(defaultPaymentMethod){_context.next=16;break;}return _context.abrupt("return",dispatch(errorCheckout('checkout.errors.missingPaymentMethod','shopgate.checkout.getPaymentMethods',{message:'No payment method found.'})));case 16:// Test if order is available in store.
|
|
7
|
+
order=getCheckoutOrder(getState());if(order){_context.next=19;break;}return _context.abrupt("return",dispatch(errorCheckout('checkout.errors.genericInitialize','shopgate.checkout.initialize',{message:'No order received from API'})));case 19:// Put logging info to sentry.
|
|
8
|
+
Sentry.configureScope(function(scope){scope.setTag('checkout_order_id',order.id);scope.addBreadcrumb({category:'checkout',message:"Initialize checkout with order id ".concat(order.id),level:'info'});});paymentMethods=getPaymentMethods(getState());paymentAlreadyInitialized=!!(order===null||order===void 0?void 0:(_order$paymentTransac=order.paymentTransactions)===null||_order$paymentTransac===void 0?void 0:(_order$paymentTransac2=_order$paymentTransac[0])===null||_order$paymentTransac2===void 0?void 0:_order$paymentTransac2.paymentMethod);if(!(needsPayment&&initializePayment&&!paymentAlreadyInitialized&&paymentMethods.length===1)){_context.next=33;break;}_context.prev=23;_context.next=26;return dispatch(updateCheckoutOrder({paymentTransactions:[{paymentMethod:{code:defaultPaymentMethod.code}}]}));case 26:_context.next=28;return dispatch(fetchCheckoutOrder());case 28:_context.next=33;break;case 30:_context.prev=30;_context.t1=_context["catch"](23);return _context.abrupt("return",{success:false,needsPayment:false});case 33:return _context.abrupt("return",{needsPayment:needsPayment,success:true});case 34:case"end":return _context.stop();}},_callee,null,[[1,6],[23,30]]);}));return function(_x,_x2){return _ref2.apply(this,arguments);};}());};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import _regeneratorRuntime from"@babel/runtime/regenerator";function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}import{PipelineRequest,LoadingProvider}from'@shopgate/engage/core';import{CHECKOUT_PATTERN}from"../constants/routes";import{SUBMIT_CHECKOUT_ORDER,SUBMIT_CHECKOUT_ORDER_SUCCESS,SUBMIT_CHECKOUT_ORDER_ERROR}from"../constants/actionTypes";import{ERROR_CODE_CHECKOUT_GENERIC}from"../constants/errorCodes";import{errorCheckout}from"./errorCheckout";/**
|
|
2
|
+
* Completes the checkout order by fulfilling with checkout params for each transaction.
|
|
3
|
+
* @param {Object} payload The action input.
|
|
4
|
+
* @returns {Function}
|
|
5
|
+
*/export var submitCheckoutOrder=function submitCheckoutOrder(payload){return(/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(dispatch){var pipelineError,pipelineOutput;return _regeneratorRuntime.wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:LoadingProvider.setLoading(CHECKOUT_PATTERN);dispatch({type:SUBMIT_CHECKOUT_ORDER,payload:payload});_context.prev=2;_context.next=5;return new PipelineRequest('shopgate.checkout.submit').setInput(payload).setErrorBlacklist([ERROR_CODE_CHECKOUT_GENERIC]).dispatch();case 5:pipelineOutput=_context.sent;dispatch({type:SUBMIT_CHECKOUT_ORDER_SUCCESS});_context.next=14;break;case 9:_context.prev=9;_context.t0=_context["catch"](2);pipelineError=_context.t0;dispatch(errorCheckout('checkout.errors.genericSubmit','shopgate.checkout.submit',_context.t0,false,[1001,1003]));dispatch({type:SUBMIT_CHECKOUT_ORDER_ERROR});case 14:LoadingProvider.unsetLoading(CHECKOUT_PATTERN);if(!pipelineError){_context.next=17;break;}throw pipelineError;case 17:return _context.abrupt("return",pipelineOutput);case 18:case"end":return _context.stop();}},_callee,null,[[2,9]]);}));return function(_x){return _ref.apply(this,arguments);};}());};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import _regeneratorRuntime from"@babel/runtime/regenerator";function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}import{PipelineRequest,EVALIDATION}from'@shopgate/engage/core';import{UPDATE_CHECKOUT_ORDER,UPDATE_CHECKOUT_ORDER_SUCCESS,UPDATE_CHECKOUT_ORDER_ERROR}from"../constants/actionTypes";import{validationErrorsCheckout}from"../action-creators/validationErrorsCheckout";import{ERROR_CODE_CHECKOUT_GENERIC}from"../constants/errorCodes";import{errorCheckout}from"./errorCheckout";/**
|
|
2
|
+
* Starts entering the checkout process for the customer.
|
|
3
|
+
* @param {Object} payload Order payload.
|
|
4
|
+
* @returns {Function}
|
|
5
|
+
*/export var updateCheckoutOrder=function updateCheckoutOrder(payload){return(/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(dispatch){var pipelineError;return _regeneratorRuntime.wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:dispatch({type:UPDATE_CHECKOUT_ORDER});_context.prev=1;_context.next=4;return new PipelineRequest('shopgate.checkout.updateOrder').setInput(payload).setErrorBlacklist([ERROR_CODE_CHECKOUT_GENERIC,EVALIDATION]).dispatch();case 4:dispatch({type:UPDATE_CHECKOUT_ORDER_SUCCESS});_context.next=11;break;case 7:_context.prev=7;_context.t0=_context["catch"](1);pipelineError=_context.t0;if(_context.t0.code===EVALIDATION){dispatch(validationErrorsCheckout(_context.t0.errors));}else{dispatch(errorCheckout('checkout.errors.genericUpdate','shopgate.checkout.updateOrder',_context.t0,false));dispatch({type:UPDATE_CHECKOUT_ORDER_ERROR});}case 11:if(!pipelineError){_context.next=13;break;}throw pipelineError;case 13:case"end":return _context.stop();}},_callee,null,[[1,7]]);}));return function(_x){return _ref.apply(this,arguments);};}());};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from'react';import ProfileProvider from"../../../account/components/Profile/Profile.provider";import AddressBookProvider from"../../providers/AddressBookProvider";import AddressList from"./AddressList";/**
|
|
2
|
+
* The AddressBook components
|
|
3
|
+
* @param {Object} props The component props
|
|
4
|
+
* @returns {JSX}
|
|
5
|
+
*/var AddressBook=function AddressBook(){return React.createElement(AddressBookProvider,null,React.createElement(ProfileProvider,null,React.createElement(AddressList,null)));};export default AddressBook;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import React,{useMemo}from'react';import{connect}from'react-redux';import PropTypes from'prop-types';import{css}from'glamor';import{getCheckoutBillingAddress,getCheckoutShippingAddress}from'@shopgate/engage/checkout/selectors/order';import{i18n,historyPush}from'@shopgate/engage/core';import{responsiveMediaQuery}from'@shopgate/engage/styles';import{RippleButton,ResponsiveContainer}from'@shopgate/engage/components';import{ResponsiveBackButton}from"../ResponsiveBackButton";import AddressCard from"../../../account/components/Profile/ProfileAddressCard";import{useProfileContext}from"../../../account/components/Profile/Profile.provider";import{useAddressBook}from"../../hooks/common";import{ADDRESS_TYPE_SHIPPING,ADDRESS_TYPE_BILLING,CHECKOUT_ADDRESS_BOOK_CONTACT_PATTERN}from"../../constants";/**
|
|
2
|
+
* @param {Object} state State.
|
|
3
|
+
* @returns {Object}
|
|
4
|
+
*/var mapStateToProps=function mapStateToProps(state){return{shippingAddress:getCheckoutShippingAddress(state),billingAddress:getCheckoutBillingAddress(state)};};/**
|
|
5
|
+
* @param {Object} dispatch Dispatch
|
|
6
|
+
* @returns {Object}
|
|
7
|
+
*/var mapDispatchToProps=function mapDispatchToProps(dispatch){return{push:function push(props){return dispatch(historyPush(props));}};};var styles={title:css({color:'var(--color-text-high-emphasis)',lineHeight:2.5,fontSize:17,fontWeight:'600'}).toString(),container:css({display:'flex',flexDirection:'row',flexWrap:'wrap',margin:-4,padding:16}).toString(),headline:css({padding:16,fontSize:'2.125rem',fontWeight:'normal',margin:0,lineHeight:'2.25rem'}).toString(),button:css({'&&':_defineProperty({marginTop:8,marginRight:16,backgroundColor:'var(--color-primary)',borderRadius:5,fontSize:14,textTransform:'none',padding:0},responsiveMediaQuery('<md',{webOnly:false}),{width:'100%',marginRight:0})}).toString(),ripple:css({padding:'8px 16px'}).toString(),actions:css(_defineProperty({display:'flex',justifyContent:'flex-end',flexDirection:'row',padding:'0 16px 16px'},responsiveMediaQuery('<md',{webOnly:false}),{flex:1})).toString()};/**
|
|
8
|
+
* @returns {JSX}
|
|
9
|
+
*/var AddressList=function AddressList(_ref){var push=_ref.push,shippingAddress=_ref.shippingAddress,billingAddress=_ref.billingAddress;var _useProfileContext=useProfileContext(),contacts=_useProfileContext.contacts,_deleteContact=_useProfileContext.deleteContact,_editContact=_useProfileContext.editContact;var _useAddressBook=useAddressBook(),type=_useAddressBook.type,updateOrderWithContact=_useAddressBook.updateOrderWithContact;var title=useMemo(function(){if([ADDRESS_TYPE_SHIPPING,ADDRESS_TYPE_BILLING].includes(type)){return i18n.text("titles.checkout_addresses_".concat(type));}return'';},[type]);var selectedContactId=useMemo(function(){if(type===ADDRESS_TYPE_SHIPPING){return(shippingAddress===null||shippingAddress===void 0?void 0:shippingAddress.customerContactId)||null;}if(type===ADDRESS_TYPE_BILLING){return(billingAddress===null||billingAddress===void 0?void 0:billingAddress.customerContactId)||null;}return null;},[billingAddress,shippingAddress,type]);return React.createElement("div",null,React.createElement(ResponsiveContainer,{webOnly:true,breakpoint:">xs"},React.createElement(ResponsiveBackButton,null),React.createElement("h1",{className:styles.headline},title)),React.createElement("div",{className:styles.container},contacts&&contacts.map(function(contact){return React.createElement(AddressCard,{key:contact.id,contact:contact,selected:contact.id===selectedContactId,selectContact:function selectContact(){return updateOrderWithContact(contact.id);},deleteContact:function deleteContact(){return _deleteContact(contact.id);},editContact:function editContact(){return _editContact(contact);}});})),React.createElement("div",{className:styles.actions},React.createElement(RippleButton,{className:styles.button,rippleClassName:styles.ripple,type:"primary",onClick:function onClick(){return push({pathname:"".concat(CHECKOUT_ADDRESS_BOOK_CONTACT_PATTERN).replace(':type',type)});}},i18n.text('account.profile.address_book.add'))));};AddressList.defaultProps={shippingAddress:null,billingAddress:null};export default connect(mapStateToProps,mapDispatchToProps)(AddressList);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{default}from"./AddressBook";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React,{Fragment,useMemo}from'react';import{css}from'glamor';import{i18n,useRoute}from'@shopgate/engage/core';import{ResponsiveContainer}from'@shopgate/engage/components';import{ResponsiveBackButton}from"../ResponsiveBackButton";import ProfileContact from"../../../account/components/ProfileContact";import AddressBookProvider from"../../providers/AddressBookProvider";import{ADDRESS_TYPE_BILLING}from"../../constants";var styles={headline:css({padding:16,fontSize:'2.125rem',fontWeight:'normal',margin:0,lineHeight:'2.25rem'}).toString()};/**
|
|
2
|
+
* AddressBookContact
|
|
3
|
+
* @param {Object} props The component props
|
|
4
|
+
* @returns {JSX}
|
|
5
|
+
*/var AddressBookContact=function AddressBookContact(){var _useRoute=useRoute(),contact=_useRoute.state.contact,_useRoute$params$type=_useRoute.params.type,type=_useRoute$params$type===void 0?ADDRESS_TYPE_BILLING:_useRoute$params$type;var title=useMemo(function(){var mode=contact?'edit':'add';return i18n.text("titles.checkout_addresses_".concat(mode,"_").concat(type));},[contact,type]);return React.createElement(Fragment,null,React.createElement(ResponsiveContainer,{webOnly:true,breakpoint:">xs"},React.createElement(ResponsiveBackButton,null),React.createElement("h1",{className:styles.headline},title)),React.createElement(AddressBookProvider,null,React.createElement(ProfileContact,null)));};export default AddressBookContact;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{default}from"./AddressBookContact";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import React from'react';import{css}from'glamor';import{useRoute}from'@shopgate/engage/core';import{ResponsiveContainer}from'@shopgate/engage/components';import{responsiveMediaQuery}from'@shopgate/engage/styles';import{CHECKOUT_PATTERN}from"../../constants/routes";import ProfileProvider from"../../../account/components/Profile/Profile.provider";import CheckoutProvider from"../../providers/CheckoutProvider";import PaymentMethodProvider from"../../paymentMethods";import{ADDRESS_TYPE_BILLING,ADDRESS_TYPE_SHIPPING}from"../../constants";import{ShippingMethods}from"../ShippingMethods";import PickupContactForm from"./CheckoutPickupContactForm";import Address from"./CheckoutAddress";import Summary from"./CheckoutSummary";import Actions from"./CheckoutActions";import Header from"./CheckoutHeader";var styles={root:css({display:'flex',flexDirection:'row'}),main:css(_defineProperty({flex:1,paddingTop:16},responsiveMediaQuery('>=md',{webOnly:true}),{paddingRight:16})),side:css(_defineProperty({},responsiveMediaQuery('>=md',{webOnly:true}),{marginTop:16,flex:0.6}))};/**
|
|
2
|
+
* The Cart component.
|
|
3
|
+
* @returns {JSX}
|
|
4
|
+
*/var Checkout=function Checkout(){var _useRoute=useRoute(),id=_useRoute.id;return React.createElement(CheckoutProvider,{pathPattern:CHECKOUT_PATTERN,routeId:id},React.createElement(Header,null),React.createElement("div",{className:styles.root},React.createElement("div",{className:styles.main},React.createElement(ProfileProvider,{isCheckout:true},React.createElement(Address,{type:ADDRESS_TYPE_BILLING}),React.createElement(Address,{type:ADDRESS_TYPE_SHIPPING})),React.createElement(PickupContactForm,null),React.createElement(ShippingMethods,null),React.createElement(PaymentMethodProvider,null),React.createElement(ResponsiveContainer,{breakpoint:"<md",appAlways:true},React.createElement(Summary,null)),React.createElement(Actions,null)),React.createElement("div",{className:styles.side},React.createElement(ResponsiveContainer,{breakpoint:">=md",webOnly:true},React.createElement(Summary,null)))));};export default Checkout;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from'react';import{css}from'glamor';import{i18n}from'@shopgate/engage/core';import{RippleButton,SurroundPortals}from'@shopgate/engage/components';import{useCheckoutContext}from"../../hooks/common";import{SupplementalContent}from"../SupplementalContent";import{CHECKOUT_ACTIONS}from"../../constants";var styles={root:css({padding:16,paddingTop:0,display:'flex',flexDirection:'column',flex:'0 0 auto'}).toString()};/**
|
|
2
|
+
* PickupContactForm
|
|
3
|
+
* @returns {JSX}
|
|
4
|
+
*/var Actions=function Actions(){var _useCheckoutContext=useCheckoutContext(),handleSubmitOrder=_useCheckoutContext.handleSubmitOrder,handleValidation=_useCheckoutContext.handleValidation,PaymentButton=_useCheckoutContext.paymentButton,isButtonLocked=_useCheckoutContext.isButtonLocked;var originalButton=React.createElement(RippleButton,{type:"secondary",onClick:handleSubmitOrder,disabled:isButtonLocked},i18n.text('checkout.submit_order'));return React.createElement(SurroundPortals,{portalName:CHECKOUT_ACTIONS},React.createElement("div",{className:styles.root},PaymentButton?React.createElement(PaymentButton,{onSubmit:handleSubmitOrder,onValidate:handleValidation,disabled:isButtonLocked},originalButton):originalButton,React.createElement(SupplementalContent,null)));};export default Actions;
|