@shopgate/engage 7.30.0-alpha.1 → 7.30.0-alpha.11
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 +13 -3
- package/a11y/components/FocusTrap/index.js +2 -1
- package/a11y/components/LiveMessage/index.js +26 -2
- package/a11y/components/LiveMessage/styles.js +12 -1
- package/a11y/components/LiveMessenger/constants.js +3 -1
- package/a11y/components/LiveMessenger/helpers.js +24 -3
- package/a11y/components/LiveMessenger/index.js +65 -4
- package/a11y/components/ModalStateTracker/index.js +20 -2
- package/a11y/components/Navigation/index.js +44 -2
- package/a11y/components/Navigation/style.js +12 -1
- package/a11y/components/Section/index.js +71 -4
- package/a11y/components/VisuallyHidden/index.js +26 -2
- package/a11y/components/index.js +7 -1
- package/a11y/constants/index.js +3 -1
- package/a11y/helpers/index.js +1 -1
- package/a11y/hooks/index.js +49 -6
- package/a11y/index.js +5 -1
- package/a11y/reducers/index.js +37 -2
- package/a11y/selectors/index.js +9 -3
- package/a11y/styles.js +16 -2
- package/account/actions/addContacts.js +31 -2
- package/account/actions/deleteContact.js +25 -2
- package/account/actions/deleteCustomer.js +24 -2
- package/account/actions/fetchContacts.js +26 -2
- package/account/actions/fetchCustomer.js +27 -2
- package/account/actions/updateContact.js +32 -2
- package/account/actions/updateCustomer.js +27 -2
- package/account/components/Account/Account.connector.js +9 -2
- package/account/components/Account/Account.js +75 -2
- package/account/components/Account/Account.style.js +31 -1
- package/account/components/Account/index.js +1 -1
- package/account/components/Profile/Profile.config.js +35 -2
- package/account/components/Profile/Profile.constraints.js +25 -1
- package/account/components/Profile/Profile.js +27 -1
- package/account/components/Profile/Profile.provider.js +228 -14
- package/account/components/Profile/ProfileAddressBook.js +98 -3
- package/account/components/Profile/ProfileAddressCard.js +179 -2
- package/account/components/Profile/ProfileForm.js +135 -2
- package/account/components/Profile/ProfileHeader.js +38 -2
- package/account/components/Profile/index.js +1 -1
- package/account/components/ProfileContact/ProfileContact.config.js +106 -2
- package/account/components/ProfileContact/ProfileContact.constraints.js +62 -2
- package/account/components/ProfileContact/ProfileContact.js +196 -5
- package/account/components/ProfileContact/index.js +1 -1
- package/account/components/index.js +1 -1
- package/account/constants/actions.js +24 -1
- package/account/constants/index.js +3 -1
- package/account/constants/pipelines.js +1 -1
- package/account/constants/routes.js +6 -1
- package/account/helper/form.js +215 -24
- package/account/index.js +2 -1
- package/account/reducers/index.js +65 -2
- package/account/selectors/contacts.js +6 -2
- package/account/selectors/customer.js +6 -2
- package/app-rating/action-creators/appStart.js +13 -3
- package/app-rating/action-creators/ordersPlaced.js +13 -3
- package/app-rating/action-creators/popup.js +20 -4
- package/app-rating/action-creators/timer.js +13 -3
- package/app-rating/actions/showModal.js +110 -9
- package/app-rating/constants/index.js +14 -2
- package/app-rating/helpers/index.js +23 -2
- package/app-rating/reducers/index.js +102 -2
- package/app-rating/selectors/appRating.js +2 -1
- package/app-rating/subscriptions/index.js +133 -23
- package/back-in-stock/actions/index.js +86 -4
- package/back-in-stock/components/BackInStockButton/connector.js +8 -1
- package/back-in-stock/components/BackInStockButton/index.js +107 -3
- package/back-in-stock/components/BackInStockButton/style.js +43 -1
- package/back-in-stock/components/CharacteristicsButton/connector.js +21 -2
- package/back-in-stock/components/CharacteristicsButton/index.js +30 -2
- package/back-in-stock/components/ProductInfoBackInStockButton/connector.js +17 -2
- package/back-in-stock/components/ProductInfoBackInStockButton/index.js +40 -2
- package/back-in-stock/components/Subscriptions/components/List/index.js +62 -2
- package/back-in-stock/components/Subscriptions/components/Subscription/index.js +174 -3
- package/back-in-stock/components/Subscriptions/index.js +11 -2
- package/back-in-stock/components/index.js +4 -1
- package/back-in-stock/constants/Actions.js +9 -1
- package/back-in-stock/constants/Common.js +1 -1
- package/back-in-stock/constants/Pipelines.js +3 -1
- package/back-in-stock/constants/Portals.js +18 -4
- package/back-in-stock/constants/index.js +4 -1
- package/back-in-stock/hooks/index.js +6 -2
- package/back-in-stock/providers/BackInStockSubscriptionsProvider.connector.js +21 -3
- package/back-in-stock/providers/BackInStockSubscriptionsProvider.context.js +3 -1
- package/back-in-stock/providers/BackInStockSubscriptionsProvider.js +51 -3
- package/back-in-stock/providers/index.js +2 -1
- package/back-in-stock/reducers/index.js +92 -2
- package/back-in-stock/selectors/index.js +97 -19
- package/back-in-stock/streams/index.js +13 -1
- package/back-in-stock/subscriptions/index.js +46 -3
- package/cart/cart.constants.js +6 -1
- package/cart/cart.context.js +40 -1
- package/cart/cart.helpers.js +125 -6
- package/cart/cart.hooks.js +13 -3
- package/cart/cart.selectors.js +113 -10
- package/cart/cart.types.js +47 -1
- package/cart/components/CartHeaderWide/CartHeaderWide.js +12 -2
- package/cart/components/CartHeaderWide/CartHeaderWide.style.js +10 -1
- package/cart/components/CartHeaderWide/index.js +1 -1
- package/cart/components/CartItem/CartItem.hooks.js +10 -3
- package/cart/components/CartItem/CartItem.js +59 -2
- package/cart/components/CartItem/CartItem.style.js +23 -1
- package/cart/components/CartItem/CartItemCoupon.connector.js +26 -5
- package/cart/components/CartItem/CartItemCoupon.js +167 -18
- package/cart/components/CartItem/CartItemCoupon.style.js +30 -2
- package/cart/components/CartItem/CartItemCoupon.types.js +21 -0
- package/cart/components/CartItem/CartItemCouponCode.js +17 -2
- package/cart/components/CartItem/CartItemCouponDelete.js +21 -2
- package/cart/components/CartItem/CartItemCouponDelete.style.js +7 -1
- package/cart/components/CartItem/CartItemCouponFreeShipping.js +20 -2
- package/cart/components/CartItem/CartItemCouponIcon.js +24 -2
- package/cart/components/CartItem/CartItemCouponLayout.js +81 -3
- package/cart/components/CartItem/CartItemCouponLayout.style.js +29 -5
- package/cart/components/CartItem/CartItemCouponPrice.js +37 -3
- package/cart/components/CartItem/CartItemCouponPrice.style.js +10 -1
- package/cart/components/CartItem/CartItemCouponTitle.js +20 -2
- package/cart/components/CartItem/CartItemCouponTitle.style.js +7 -1
- package/cart/components/CartItem/CartItemProduct.js +59 -3
- package/cart/components/CartItem/CartItemProduct.style.js +5 -1
- package/cart/components/CartItem/CartItemProductLayout.js +169 -4
- package/cart/components/CartItem/CartItemProductLayout.style.js +94 -1
- package/cart/components/CartItem/CartItemProductLayoutWide.js +139 -3
- package/cart/components/CartItem/CartItemProductLayoutWide.style.js +113 -1
- package/cart/components/CartItem/CartItemProductLayoutWideFulfillmentLabel.js +27 -4
- package/cart/components/CartItem/CartItemProductLayoutWideFulfillmentLabel.style.js +10 -1
- package/cart/components/CartItem/CartItemProductLayoutWideOrderDetails.js +39 -3
- package/cart/components/CartItem/CartItemProductLayoutWideRemoveItem.js +25 -4
- package/cart/components/CartItem/CartItemProductLayoutWideRemoveItem.style.js +16 -1
- package/cart/components/CartItem/CartItemProductOrderDetails.js +83 -3
- package/cart/components/CartItem/CartItemProductOrderDetails.style.js +28 -1
- package/cart/components/CartItem/CartItemProductPriceCaption.js +42 -4
- package/cart/components/CartItem/CartItemProductPriceCaption.style.js +11 -1
- package/cart/components/CartItem/CartItemProductPriceList.js +95 -4
- package/cart/components/CartItem/CartItemProductPriceListPromotion.js +178 -5
- package/cart/components/CartItem/CartItemProductProvider.connector.js +46 -5
- package/cart/components/CartItem/CartItemProductProvider.context.js +3 -1
- package/cart/components/CartItem/CartItemProductProvider.js +140 -6
- package/cart/components/CartItem/CartItemProductProvider.types.js +36 -1
- package/cart/components/CartItem/CartItemProductProviderLegacy.js +75 -7
- package/cart/components/CartItem/CartItemProductTitle.js +104 -2
- package/cart/components/CartItem/CartItemProductTitle.style.js +28 -1
- package/cart/components/CartItem/CartItemProvider.connector.js +24 -2
- package/cart/components/CartItem/CartItemProvider.context.js +3 -1
- package/cart/components/CartItem/CartItemProvider.js +67 -3
- package/cart/components/CartItem/CartItemQuantityPicker.js +145 -31
- package/cart/components/CartItem/CartItemQuantityPicker.style.js +18 -1
- package/cart/components/CartItem/CartItemSubstitution.connector.js +12 -2
- package/cart/components/CartItem/CartItemSubstitution.js +44 -3
- package/cart/components/CartItem/CartItemSubstitution.style.js +9 -1
- package/cart/components/CartItem/index.js +3 -1
- package/cart/components/CartItems/CartItem.connector.js +12 -2
- package/cart/components/CartItems/CartItemCard.js +40 -3
- package/cart/components/CartItems/CartItemCard.style.js +52 -1
- package/cart/components/CartItems/CartItemCardReservation.js +69 -3
- package/cart/components/CartItems/CartItemCardReservationAccordion.js +51 -4
- package/cart/components/CartItems/CartItemCardReservationLabel.js +57 -4
- package/cart/components/CartItems/CartItemCardReservationLabelChangeStore.js +36 -2
- package/cart/components/CartItems/CartItemCardReservationLabelChangeStore.style.js +12 -1
- package/cart/components/CartItems/CartItemGroup.js +34 -3
- package/cart/components/CartItems/CartItemGroup.style.js +39 -1
- package/cart/components/CartItems/CartItemGroupReservation.js +64 -4
- package/cart/components/CartItems/CartItemGroupReservationLabel.js +35 -4
- package/cart/components/CartItems/CartItemGroupShipping.js +23 -2
- package/cart/components/CartItems/CartItems.js +105 -3
- package/cart/components/CartItems/CartItems.style.js +21 -1
- package/cart/components/CartItems/CartItemsHeaderWide.connector.js +20 -2
- package/cart/components/CartItems/CartItemsHeaderWide.js +78 -3
- package/cart/components/CartItems/CartItemsHeaderWide.style.js +60 -1
- package/cart/components/CartItems/CartItemsSubscription.connector.js +9 -2
- package/cart/components/CartItems/CartItemsSubstitution.js +49 -2
- package/cart/components/CartItems/index.js +2 -1
- package/cart/components/CartSummaryWide/CartSummaryWide.connector.js +13 -2
- package/cart/components/CartSummaryWide/CartSummaryWide.js +50 -2
- package/cart/components/CartSummaryWide/CartSummaryWide.style.js +37 -1
- package/cart/components/CartSummaryWide/CartSummaryWideCheckoutButton.connector.js +9 -2
- package/cart/components/CartSummaryWide/CartSummaryWideCheckoutButton.js +52 -3
- package/cart/components/CartSummaryWide/CartSummaryWideCheckoutButton.style.js +21 -1
- package/cart/components/CartSummaryWide/CartSummaryWideFooter.js +19 -2
- package/cart/components/CartSummaryWide/index.js +1 -1
- package/cart/components/PaymentBar/PaymentBar.js +25 -2
- package/cart/components/PaymentBar/PaymentBarAppliedPromotions.connector.js +9 -2
- package/cart/components/PaymentBar/PaymentBarAppliedPromotions.js +57 -2
- package/cart/components/PaymentBar/PaymentBarCheckoutButton.connector.js +9 -2
- package/cart/components/PaymentBar/PaymentBarCheckoutButton.js +46 -2
- package/cart/components/PaymentBar/PaymentBarCheckoutButton.style.js +15 -1
- package/cart/components/PaymentBar/PaymentBarContent.js +60 -2
- package/cart/components/PaymentBar/PaymentBarContent.style.js +40 -1
- package/cart/components/PaymentBar/PaymentBarDiscounts.connector.js +9 -2
- package/cart/components/PaymentBar/PaymentBarDiscounts.js +60 -3
- package/cart/components/PaymentBar/PaymentBarGrandTotal.connector.js +9 -2
- package/cart/components/PaymentBar/PaymentBarGrandTotal.js +59 -3
- package/cart/components/PaymentBar/PaymentBarPromotionCouponMessages.js +73 -2
- package/cart/components/PaymentBar/PaymentBarPromotionCoupons.connector.js +15 -3
- package/cart/components/PaymentBar/PaymentBarPromotionCoupons.js +111 -2
- package/cart/components/PaymentBar/PaymentBarPromotionalText.js +116 -2
- package/cart/components/PaymentBar/PaymentBarReserveButton.connector.js +6 -1
- package/cart/components/PaymentBar/PaymentBarReserveButton.js +53 -4
- package/cart/components/PaymentBar/PaymentBarShippingCost.connector.js +9 -2
- package/cart/components/PaymentBar/PaymentBarShippingCost.js +57 -3
- package/cart/components/PaymentBar/PaymentBarSubTotal.connector.js +9 -2
- package/cart/components/PaymentBar/PaymentBarSubTotal.js +54 -3
- package/cart/components/PaymentBar/PaymentBarTax.connector.js +9 -2
- package/cart/components/PaymentBar/PaymentBarTax.js +61 -3
- package/cart/components/PaymentBar/index.js +1 -1
- package/cart/components/Substitution/connector.js +9 -2
- package/cart/components/Substitution/index.js +55 -3
- package/cart/components/Substitution/style.js +32 -1
- package/cart/components/SupplementalContent/SupplementalContent.connector.js +12 -2
- package/cart/components/SupplementalContent/SupplementalContent.js +31 -2
- package/cart/components/SupplementalContent/SupplementalContent.styles.js +29 -1
- package/cart/components/SupplementalContent/index.js +1 -1
- package/cart/index.js +54 -10
- package/cart/streams/index.js +1 -1
- package/category/actions/index.js +5 -1
- package/category/components/CategoryImage/connector.js +9 -2
- package/category/components/CategoryImage/index.js +38 -2
- package/category/components/CategoryList/index.js +100 -2
- package/category/components/CategoryList/style.js +20 -1
- package/category/components/index.js +2 -1
- package/category/constants/index.js +3 -1
- package/category/helpers/index.js +1 -1
- package/category/index.js +10 -1
- package/category/selectors/index.js +1 -1
- package/category/streams/index.js +5 -1
- package/checkout/action-creators/addCheckoutCampaign.js +8 -2
- package/checkout/action-creators/clearCheckoutCampaign.js +7 -2
- package/checkout/action-creators/clearCheckoutOrder.js +7 -2
- package/checkout/action-creators/index.js +3 -1
- package/checkout/action-creators/validationErrorsCheckout.js +8 -2
- package/checkout/actions/errorCheckout.js +69 -7
- package/checkout/actions/fetchCheckoutOrder.js +28 -2
- package/checkout/actions/fetchPaymentMethods.js +25 -2
- package/checkout/actions/index.js +7 -1
- package/checkout/actions/initializeCheckout.js +26 -2
- package/checkout/actions/prepareCheckout.js +84 -6
- package/checkout/actions/submitCheckoutOrder.js +34 -2
- package/checkout/actions/updateCheckoutOrder.js +33 -2
- package/checkout/components/AddressBook/AddressBook.js +14 -2
- package/checkout/components/AddressBook/AddressList.js +149 -4
- package/checkout/components/AddressBook/index.js +1 -1
- package/checkout/components/AddressBookContact/AddressBookContact.js +48 -2
- package/checkout/components/AddressBookContact/index.js +1 -1
- package/checkout/components/Checkout/Checkout.js +78 -2
- package/checkout/components/Checkout/CheckoutActions.js +47 -2
- package/checkout/components/Checkout/CheckoutAddress.js +133 -3
- package/checkout/components/Checkout/CheckoutHeader.js +60 -2
- package/checkout/components/Checkout/CheckoutPickupContactForm.config.js +62 -2
- package/checkout/components/Checkout/CheckoutPickupContactForm.js +94 -2
- package/checkout/components/Checkout/CheckoutSection.js +168 -2
- package/checkout/components/Checkout/CheckoutSectionInfo.js +75 -2
- package/checkout/components/Checkout/CheckoutSectionMessages.js +56 -2
- package/checkout/components/Checkout/CheckoutSummary.js +72 -2
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmation.connector.js +13 -2
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmation.js +257 -5
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationBilledTo.js +59 -2
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationOrderContact.js +54 -2
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationOrderSummary.js +62 -2
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationPickUpContact.js +60 -2
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationPickupNotes.js +24 -2
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationSection.js +179 -2
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationShippedTo.js +49 -2
- package/checkout/components/CheckoutConfirmation/index.js +6 -1
- package/checkout/components/GuestCheckout/GuestCheckout.js +75 -2
- package/checkout/components/GuestCheckout/GuestCheckoutOptIn.config.js +13 -2
- package/checkout/components/GuestCheckout/GuestCheckoutOptIn.js +68 -2
- package/checkout/components/GuestCheckout/GuestCheckoutPickup.js +54 -2
- package/checkout/components/GuestCheckout/GuestCheckoutPickupNotes.config.js +13 -2
- package/checkout/components/GuestCheckout/GuestCheckoutPickupNotes.js +57 -2
- package/checkout/components/PaymentMethodButton/PaymentMethodButton.js +61 -2
- package/checkout/components/PaymentMethodButton/index.js +1 -1
- package/checkout/components/ResponsiveBackButton/ResponsiveBackButton.js +43 -2
- package/checkout/components/ResponsiveBackButton/ResponsiveBackButton.style.js +25 -1
- package/checkout/components/ResponsiveBackButton/index.js +1 -1
- package/checkout/components/ShippingMethods/ShippingMethod.js +73 -2
- package/checkout/components/ShippingMethods/ShippingMethods.js +208 -12
- package/checkout/components/ShippingMethods/connector.js +12 -3
- package/checkout/components/ShippingMethods/index.js +1 -1
- package/checkout/components/SupplementalContent/SupplementalContent.connector.js +12 -2
- package/checkout/components/SupplementalContent/SupplementalContent.js +31 -2
- package/checkout/components/SupplementalContent/SupplementalContent.styles.js +29 -1
- package/checkout/components/SupplementalContent/index.js +1 -1
- package/checkout/components/index.js +7 -1
- package/checkout/constants/actionTypes.js +19 -1
- package/checkout/constants/errorCodes.js +1 -1
- package/checkout/constants/index.js +11 -1
- package/checkout/constants/routes.js +8 -1
- package/checkout/helpers/index.js +221 -10
- package/checkout/hooks/common.js +11 -3
- package/checkout/index.js +25 -6
- package/checkout/paymentMethods/context.js +2 -1
- package/checkout/paymentMethods/index.js +188 -19
- package/checkout/paymentMethods/paypal/PaypalButton.js +19 -2
- package/checkout/paymentMethods/paypal/PaypalButtonApp.js +52 -2
- package/checkout/paymentMethods/paypal/PaypalButtonWeb.js +91 -5
- package/checkout/paymentMethods/paypal/PaypalPayButton.js +124 -10
- package/checkout/paymentMethods/paypal/PaypalProvider.js +41 -4
- package/checkout/paymentMethods/paypal/index.js +13 -1
- package/checkout/paymentMethods/paypal/sdk.js +50 -3
- package/checkout/paymentMethods/stripe/StripeButton.connector.js +13 -3
- package/checkout/paymentMethods/stripe/StripeButton.js +96 -2
- package/checkout/paymentMethods/stripe/StripeCreditCard.js +183 -5
- package/checkout/paymentMethods/stripe/StripePayButton.js +58 -4
- package/checkout/paymentMethods/stripe/StripeProvider.connector.js +13 -3
- package/checkout/paymentMethods/stripe/StripeProvider.context.js +3 -1
- package/checkout/paymentMethods/stripe/StripeProvider.js +180 -18
- package/checkout/paymentMethods/stripe/index.js +11 -1
- package/checkout/paymentMethods/stripe/sdk.js +40 -4
- package/checkout/providers/AddressBookProvider.context.js +3 -1
- package/checkout/providers/AddressBookProvider.js +168 -4
- package/checkout/providers/CheckoutProvider.connector.js +48 -3
- package/checkout/providers/CheckoutProvider.constraints.js +34 -1
- package/checkout/providers/CheckoutProvider.context.js +3 -1
- package/checkout/providers/CheckoutProvider.js +460 -23
- package/checkout/reducers/index.js +89 -2
- package/checkout/selectors/campaign.js +20 -2
- package/checkout/selectors/guestCheckout.js +11 -3
- package/checkout/selectors/order.js +146 -17
- package/checkout/selectors/payment.js +23 -5
- package/checkout/selectors/route.js +13 -2
- package/checkout/streams/index.js +13 -1
- package/checkout/subscriptions/index.js +53 -2
- package/components/BrandingColorBanner/BrandingColorBanner.js +22 -2
- package/components/BrandingColorBanner/index.js +1 -1
- package/components/ChipLayout/index.js +167 -20
- package/components/ChipLayout/spec.js +38 -2
- package/components/ChipLayout/style.js +48 -2
- package/components/ConditionalWrapper/ConditionalWrapper.js +29 -3
- package/components/ConditionalWrapper/index.js +1 -1
- package/components/ConnectedReactPortal/index.js +27 -12
- package/components/Footer/Footer.js +66 -2
- package/components/Footer/Footer.style.js +11 -1
- package/components/Footer/constants.js +2 -1
- package/components/Footer/helpers.js +168 -36
- package/components/Footer/index.js +1 -1
- package/components/Form/Builder/Builder.constants.js +13 -1
- package/components/Form/Builder/Builder.js +309 -59
- package/components/Form/Builder/ElementCheckbox.js +48 -2
- package/components/Form/Builder/ElementMultiSelect.js +74 -2
- package/components/Form/Builder/ElementPhoneNumber.js +235 -12
- package/components/Form/Builder/ElementRadio.js +55 -2
- package/components/Form/Builder/ElementSelect.js +62 -2
- package/components/Form/Builder/ElementText.js +69 -3
- package/components/Form/Builder/FormHelper.js +36 -2
- package/components/Form/Builder/classes/ActionListener.constants.js +22 -2
- package/components/Form/Builder/classes/ActionListener.js +390 -43
- package/components/Form/Builder/helpers/buildCountryList.js +30 -6
- package/components/Form/Builder/helpers/buildFormDefaults.js +35 -6
- package/components/Form/Builder/helpers/buildFormElements.js +68 -10
- package/components/Form/Builder/helpers/buildProvinceList.js +19 -2
- package/components/Form/Builder/helpers/buildValidationErrorList.js +7 -2
- package/components/Form/Builder/helpers/common.js +3 -1
- package/components/Form/Builder/helpers/iso-3166-2.js +4943 -1
- package/components/Form/Builder/index.js +1 -1
- package/components/Form/Builder/stylePresets.js +153 -1
- package/components/Form/Form.js +64 -13
- package/components/Form/index.js +4 -1
- package/components/IntersectionVisibility/index.js +86 -14
- package/components/Logo/connector.js +13 -2
- package/components/Logo/index.js +37 -2
- package/components/Logo/spec.js +12 -1
- package/components/Logo/style.js +22 -1
- package/components/Menu/components/Item/index.js +43 -3
- package/components/Menu/components/Item/style.js +25 -2
- package/components/Menu/components/Position/index.js +69 -10
- package/components/Menu/components/Position/style.js +11 -1
- package/components/Menu/index.js +87 -9
- package/components/Menu/style.js +39 -1
- package/components/MessageBar/MessageBar.js +76 -2
- package/components/MessageBar/MessageBar.style.js +121 -5
- package/components/MessageBar/index.js +1 -1
- package/components/NavigationHandler/connector.js +17 -2
- package/components/NavigationHandler/index.js +49 -6
- package/components/NavigationHandler/spec.js +84 -1
- package/components/NullComponent/index.js +4 -1
- package/components/Picker/components/Button/index.js +27 -2
- package/components/Picker/components/Button/style.js +19 -1
- package/components/Picker/components/List/index.js +55 -2
- package/components/Picker/components/List/style.js +17 -1
- package/components/Picker/components/Modal/index.js +72 -7
- package/components/Picker/components/Modal/style.js +78 -1
- package/components/Picker/index.js +178 -21
- package/components/Picker/spec.js +85 -2
- package/components/PickerUtilize/components/Button/index.js +29 -2
- package/components/PickerUtilize/components/Button/style.js +42 -1
- package/components/PickerUtilize/index.js +103 -11
- package/components/PickerUtilize/spec.js +33 -2
- package/components/PickerUtilize/style.js +10 -1
- package/components/QuantityInput/QuantityInput.js +121 -7
- package/components/QuantityInput/helper.js +25 -4
- package/components/QuantityInput/index.js +1 -1
- package/components/QuantityLabel/QuantityLabel.js +28 -2
- package/components/QuantityLabel/index.js +1 -1
- package/components/Radio/Radio.js +119 -2
- package/components/Radio/index.js +1 -1
- package/components/RadioCard/RadioCard.js +108 -3
- package/components/RadioCard/index.js +1 -1
- package/components/RadioGroup/RadioGroup.context.js +3 -1
- package/components/RadioGroup/RadioGroup.js +60 -2
- package/components/RadioGroup/index.js +2 -1
- package/components/RadioGroup/useRadioGroup.js +8 -2
- package/components/RangeSlider/components/Handle/index.js +39 -2
- package/components/RangeSlider/components/Handle/style.js +15 -1
- package/components/RangeSlider/helper.js +48 -8
- package/components/RangeSlider/index.js +260 -40
- package/components/RangeSlider/spec.js +175 -23
- package/components/RangeSlider/style.js +18 -1
- package/components/ResponsiveContainer/ResponsiveContainer.js +42 -3
- package/components/ResponsiveContainer/breakpoints.js +62 -8
- package/components/ResponsiveContainer/condition.js +15 -2
- package/components/ResponsiveContainer/hooks.js +54 -5
- package/components/ResponsiveContainer/index.js +1 -1
- package/components/ResponsiveContainer/listener.js +29 -4
- package/components/ResponsiveContainer/mediaQuery.js +24 -4
- package/components/ScrollHeader/index.js +76 -2
- package/components/ScrollHeader/style.js +25 -1
- package/components/SheetDrawer/index.js +19 -3
- package/components/SheetList/components/Item/index.js +155 -7
- package/components/SheetList/components/Item/spec.js +111 -4
- package/components/SheetList/components/Item/style.js +76 -1
- package/components/SheetList/index.js +73 -5
- package/components/SheetList/spec.js +44 -1
- package/components/SheetList/style.js +36 -1
- package/components/SideNavigation/SideNavigation.hooks.js +6 -2
- package/components/SideNavigation/SideNavigation.js +31 -4
- package/components/SideNavigation/SideNavigationCategories.connector.js +25 -3
- package/components/SideNavigation/SideNavigationCategories.js +54 -4
- package/components/SideNavigation/SideNavigationCategories.style.js +12 -1
- package/components/SideNavigation/SideNavigationCategoriesItem.connector.js +31 -3
- package/components/SideNavigation/SideNavigationCategoriesItem.js +92 -5
- package/components/SideNavigation/SideNavigationCategoriesItem.style.js +41 -2
- package/components/SideNavigation/SideNavigationCategoriesItemChildren.js +23 -5
- package/components/SideNavigation/SideNavigationContent.js +49 -3
- package/components/SideNavigation/SideNavigationContent.style.js +6 -2
- package/components/SideNavigation/SideNavigationItem.js +73 -4
- package/components/SideNavigation/SideNavigationItem.style.js +39 -2
- package/components/SideNavigation/SideNavigationLinks.js +58 -2
- package/components/SideNavigation/SideNavigationLinksLegal.connector.js +15 -2
- package/components/SideNavigation/SideNavigationLinksLegal.js +30 -5
- package/components/SideNavigation/SideNavigationLinksQuicklinks.connector.js +15 -2
- package/components/SideNavigation/SideNavigationLinksQuicklinks.js +28 -3
- package/components/SideNavigation/SideNavigationNestedItem.js +55 -3
- package/components/SideNavigation/SideNavigationProvider.connector.js +20 -3
- package/components/SideNavigation/SideNavigationProvider.context.js +3 -1
- package/components/SideNavigation/SideNavigationProvider.js +74 -3
- package/components/SideNavigation/index.js +1 -1
- package/components/SideNavigation/selectors.js +28 -11
- package/components/SnackBarContainer/index.js +21 -3
- package/components/Switch/index.js +46 -2
- package/components/Switch/style.js +46 -1
- package/components/Tabs/TabContext.js +24 -3
- package/components/Tabs/components/Tab.js +67 -4
- package/components/Tabs/components/Tab.style.js +32 -1
- package/components/Tabs/components/TabIndicator.js +19 -2
- package/components/Tabs/components/TabIndicator.style.js +13 -1
- package/components/Tabs/components/TabPanel.js +26 -2
- package/components/Tabs/components/Tabs.js +142 -6
- package/components/Tabs/components/Tabs.style.js +19 -2
- package/components/Tabs/debounce.js +18 -3
- package/components/Tabs/index.js +3 -1
- package/components/Tabs/ownerDocument.js +4 -1
- package/components/Tabs/ownerWindow.js +8 -2
- package/components/Tabs/useEventCallback.js +12 -2
- package/components/TextLink/TextLink.js +20 -2
- package/components/TextLink/TextLink.style.js +10 -1
- package/components/TimeBoundary/index.js +78 -10
- package/components/TimeBoundary/spec.js +83 -6
- package/components/Toggle/index.js +41 -2
- package/components/Toggle/style.js +63 -1
- package/components/Typography/Typography.js +186 -4
- package/components/Typography/index.js +1 -1
- package/components/VideoPlayer/index.js +110 -10
- package/components/View/components/Above/index.js +27 -2
- package/components/View/components/Below/index.js +27 -2
- package/components/View/components/Content/components/ParallaxProvider/index.js +61 -7
- package/components/View/components/Content/index.js +214 -21
- package/components/View/components/Content/style.js +41 -3
- package/components/View/context.js +16 -1
- package/components/View/index.js +75 -4
- package/components/View/provider.js +152 -23
- package/components/View/style.js +12 -1
- package/components/constants.js +5 -1
- package/components/index.js +199 -9
- package/core/action-creators/app.js +7 -2
- package/core/action-creators/appPermissions.js +14 -2
- package/core/action-creators/index.js +5 -1
- package/core/action-creators/merchantSettings.js +8 -2
- package/core/action-creators/optIns.js +71 -7
- package/core/action-creators/shopSettings.js +15 -3
- package/core/actions/getGeolocation.js +24 -2
- package/core/actions/grantAppTrackingTransparencyPermission.js +15 -2
- package/core/actions/grantCameraPermissions.js +23 -2
- package/core/actions/grantGeolocationPermissions.js +28 -2
- package/core/actions/grantPermissions.js +152 -8
- package/core/actions/grantPushPermissions.js +28 -2
- package/core/actions/index.js +40 -7
- package/core/actions/requestAppPermission.js +37 -4
- package/core/actions/requestAppPermissionStatus.js +34 -4
- package/core/actions/updateStatusBarBackground.js +19 -2
- package/core/classes/GeolocationRequest.js +33 -5
- package/core/classes/GeolocationRequestApp.js +78 -8
- package/core/classes/GeolocationRequestBrowser.js +41 -3
- package/core/classes/index.js +15 -1
- package/core/collections/AppInitialization.js +53 -8
- package/core/collections/index.js +9 -1
- package/core/commands/analyticsSetConsent.js +13 -3
- package/core/commands/index.js +28 -1
- package/core/config/ThemeConfigResolver.js +133 -18
- package/core/config/config.action-creators.js +21 -4
- package/core/config/config.actions.js +23 -2
- package/core/config/config.constants.js +5 -1
- package/core/config/config.reducers.js +29 -2
- package/core/config/config.selectors.js +86 -13
- package/core/config/config.streams.js +17 -1
- package/core/config/config.subscriptions.js +16 -2
- package/core/config/config.types.js +19 -0
- package/core/config/getPageConfig.js +14 -2
- package/core/config/getPageSettings.js +25 -6
- package/core/config/getThemeAssets.js +10 -2
- package/core/config/getThemeColors.js +10 -2
- package/core/config/getThemeConfig.js +7 -2
- package/core/config/getThemeSettings.js +10 -2
- package/core/config/getThemeStyles.js +10 -2
- package/core/config/getWidgetConfig.js +19 -2
- package/core/config/getWidgetSettings.js +20 -5
- package/core/config/index.js +16 -1
- package/core/config/isBeta.js +7 -2
- package/core/constants/actionTypes.js +2 -1
- package/core/constants/appFeatures.js +3 -1
- package/core/constants/deviceTypes.js +2 -1
- package/core/constants/geolocationRequest.js +5 -1
- package/core/constants/index.js +44 -8
- package/core/constants/merchantSettings.js +11 -1
- package/core/constants/optIns.js +4 -1
- package/core/constants/pipelines.js +3 -1
- package/core/constants/shopSettings.js +27 -2
- package/core/contexts/AppContext.js +2 -1
- package/core/contexts/ThemeResourcesContext.js +13 -2
- package/core/contexts/index.js +3 -1
- package/core/events/index.js +1 -1
- package/core/helpers/androidNavigationBar.js +32 -4
- package/core/helpers/appFeatures.js +54 -13
- package/core/helpers/appPermissions.js +159 -15
- package/core/helpers/baseUrl.js +10 -3
- package/core/helpers/bridge.js +11 -2
- package/core/helpers/deviceType.js +8 -3
- package/core/helpers/environment.js +6 -2
- package/core/helpers/errorBehavior.js +152 -10
- package/core/helpers/featureFlag.js +32 -5
- package/core/helpers/getFullImageSource.js +83 -8
- package/core/helpers/getImageFormat.js +9 -2
- package/core/helpers/googleMaps.js +9 -2
- package/core/helpers/i18n.js +70 -7
- package/core/helpers/index.js +53 -4
- package/core/helpers/isIOSTheme.js +7 -1
- package/core/helpers/isTouchDevice.js +9 -1
- package/core/helpers/nl2br.js +5 -1
- package/core/helpers/scrollContainer.js +6 -2
- package/core/helpers/string.js +6 -2
- package/core/helpers/svgToDataUrl.js +18 -4
- package/core/helpers/updateLegacyNavigationBar.js +78 -5
- package/core/hocs/index.js +10 -1
- package/core/hocs/withApp.js +19 -3
- package/core/hocs/withCurrentProduct.js +38 -4
- package/core/hocs/withForwardedRef.js +21 -3
- package/core/hocs/withNavigation.js +37 -4
- package/core/hocs/withRoute.js +32 -4
- package/core/hocs/withTheme.js +38 -5
- package/core/hocs/withThemeResources.js +36 -4
- package/core/hocs/withWidgetSettings.js +20 -3
- package/core/hocs/withWidgetStyles.js +20 -3
- package/core/hooks/events/appEvents.d.ts +83 -0
- package/core/hooks/events/appEvents.js +125 -0
- package/core/hooks/events/index.js +4 -1
- package/core/hooks/events/useLongPress.js +47 -4
- package/core/hooks/events/usePressHandler.js +33 -5
- package/core/hooks/events/useScrollDirectionChange.js +86 -11
- package/core/hooks/html/index.js +1 -1
- package/core/hooks/html/useLoadImage.js +14 -2
- package/core/hooks/index.js +18 -1
- package/core/hooks/layout/index.js +1 -1
- package/core/hooks/layout/useElementSize.js +83 -7
- package/core/hooks/useApp.js +9 -2
- package/core/hooks/useAsyncMemo.js +27 -4
- package/core/hooks/useCurrentProduct.js +15 -3
- package/core/hooks/useFormState.js +146 -11
- package/core/hooks/useLocalStorage.d.ts +8 -0
- package/core/hooks/useLocalStorage.js +38 -0
- package/core/hooks/useNavigation.js +13 -2
- package/core/hooks/usePageConfig.js +11 -2
- package/core/hooks/usePageSettings.js +11 -2
- package/core/hooks/usePrevious.js +10 -2
- package/core/hooks/useRoute.js +9 -2
- package/core/hooks/useScrollTo.js +35 -2
- package/core/hooks/useTheme.js +13 -3
- package/core/hooks/useThemeResources.js +35 -7
- package/core/hooks/useWidgetConfig.js +11 -2
- package/core/hooks/useWidgetSettings.js +11 -2
- package/core/hooks/useWidgetStyles.js +13 -2
- package/core/index.js +35 -5
- package/core/initialization/index.js +146 -12
- package/core/providers/AppProvider.js +78 -10
- package/core/providers/ThemeResourcesProvider.js +36 -4
- package/core/providers/index.js +6 -1
- package/core/reducers/app.js +30 -2
- package/core/reducers/index.js +10 -1
- package/core/reducers/merchantSettings.js +38 -2
- package/core/reducers/shopSettings.js +52 -2
- package/core/router/helpers.js +36 -6
- package/core/selectors/app.js +9 -3
- package/core/selectors/index.js +20 -6
- package/core/selectors/merchantSettings.js +24 -4
- package/core/selectors/shopSettings.js +61 -10
- package/core/streams/app.js +36 -6
- package/core/streams/appPermissions.js +38 -7
- package/core/streams/index.js +15 -4
- package/core/streams/optIns.js +26 -5
- package/core/subscriptions/app.js +37 -6
- package/core/validation/index.js +2 -1
- package/core/validation/validation.hooks.js +31 -2
- package/core/validation/validation.js +52 -6
- package/development/action-creators/index.js +2 -1
- package/development/action-creators/settings.js +22 -4
- package/development/action-creators/storage.js +8 -2
- package/development/components/ClientInformation/ClientInformation.js +75 -3
- package/development/components/ClientInformation/actions.js +9 -2
- package/development/components/ClientInformation/index.js +1 -1
- package/development/components/DevelopmentSettings/DevelopmentSettings.js +60 -4
- package/development/components/DevelopmentSettings/index.js +1 -1
- package/development/components/DevelopmentTools/DevelopmentTools.js +22 -2
- package/development/components/DevelopmentTools/Shortcuts.js +16 -2
- package/development/components/DevelopmentTools/hooks.js +27 -3
- package/development/components/DevelopmentTools/index.js +1 -1
- package/development/components/SimulatedInsets/SimulatedInsetBottom.js +53 -2
- package/development/components/SimulatedInsets/SimulatedInsetTop.js +102 -5
- package/development/components/SimulatedInsets/SimulatedInsets.js +37 -2
- package/development/components/SimulatedInsets/index.js +1 -1
- package/development/components/index.js +2 -1
- package/development/constants/actionTypes.js +4 -1
- package/development/constants/index.js +1 -1
- package/development/reducers/index.js +7 -1
- package/development/reducers/settings.js +46 -3
- package/development/reducers/storage.js +35 -3
- package/development/selectors/index.js +2 -1
- package/development/selectors/settings.js +56 -11
- package/development/selectors/storage.js +15 -5
- package/development/streams/index.js +1 -1
- package/development/streams/insets.js +8 -2
- package/development/subscriptions/index.js +17 -4
- package/favorites/components/CommentDialog/CommentDialog.js +147 -6
- package/favorites/components/CommentDialog/index.js +1 -1
- package/favorites/components/FavoriteButtonWide/FavoriteButtonWide.js +76 -4
- package/favorites/components/FavoriteButtonWide/index.js +1 -1
- package/favorites/components/Item/Item.js +380 -9
- package/favorites/components/Item/ItemCharacteristics.js +34 -2
- package/favorites/components/Item/ItemNotes.js +99 -3
- package/favorites/components/Item/ItemQuantity.js +52 -3
- package/favorites/components/Item/index.js +1 -1
- package/favorites/components/ItemFulfillmentMethod/ItemFulfillmentMethod.js +31 -2
- package/favorites/components/ItemFulfillmentMethod/index.js +1 -1
- package/favorites/components/List/List.js +121 -8
- package/favorites/components/List/ListAccordionHeader.js +30 -2
- package/favorites/components/List/ListAccordionLabel.js +14 -2
- package/favorites/components/List/ListContent.js +72 -3
- package/favorites/components/List/ListItemWrapper.js +43 -2
- package/favorites/components/List/index.js +1 -1
- package/favorites/components/List/styles.js +35 -1
- package/favorites/components/ListChooser/ListChooser.js +60 -4
- package/favorites/components/ListChooser/ListChooserItem.js +52 -3
- package/favorites/components/ListChooser/index.js +1 -1
- package/favorites/components/Lists/Lists.js +287 -18
- package/favorites/components/Lists/ListsModal.js +78 -4
- package/favorites/components/Lists/index.js +1 -1
- package/favorites/components/RemoveButton/RemoveButton.js +40 -2
- package/favorites/components/RemoveButton/index.js +1 -1
- package/favorites/constants/Portals.js +7 -1
- package/favorites/constants/index.js +2 -1
- package/favorites/index.js +20 -5
- package/filter/actions/index.js +1 -1
- package/filter/components/FilterItem/index.js +14 -2
- package/filter/components/FilterItem/spec.js +14 -1
- package/filter/components/FilterItem/style.js +9 -1
- package/filter/components/FilterPageContent/components/ApplyButton/index.js +50 -2
- package/filter/components/FilterPageContent/components/ApplyButton/spec.js +46 -1
- package/filter/components/FilterPageContent/components/ApplyButton/style.js +11 -1
- package/filter/components/FilterPageContent/components/ResetButton/index.js +36 -2
- package/filter/components/FilterPageContent/components/ResetButton/spec.js +29 -1
- package/filter/components/FilterPageContent/components/ResetButton/style.js +6 -1
- package/filter/components/FilterPageContent/components/Selector/components/Selected/index.js +55 -4
- package/filter/components/FilterPageContent/components/Selector/components/Selected/spec.js +26 -1
- package/filter/components/FilterPageContent/components/Selector/components/Selected/style.js +19 -1
- package/filter/components/FilterPageContent/components/Selector/components/Toggle/index.js +57 -5
- package/filter/components/FilterPageContent/components/Selector/components/Toggle/spec.js +34 -1
- package/filter/components/FilterPageContent/components/Selector/components/Toggle/style.js +30 -1
- package/filter/components/FilterPageContent/components/Selector/components/ValueButton/index.js +60 -5
- package/filter/components/FilterPageContent/components/Selector/components/ValueButton/spec.js +32 -1
- package/filter/components/FilterPageContent/components/Selector/components/ValueButton/style.js +23 -1
- package/filter/components/FilterPageContent/components/Selector/index.js +160 -16
- package/filter/components/FilterPageContent/components/Selector/spec.js +33 -1
- package/filter/components/FilterPageContent/components/Selector/style.js +8 -1
- package/filter/components/FilterPageContent/index.js +74 -2
- package/filter/components/FilterPageContentWithProvider/index.js +36 -3
- package/filter/components/PriceSlider/components/Label/index.js +154 -7
- package/filter/components/PriceSlider/components/Label/spec.js +17 -1
- package/filter/components/PriceSlider/index.js +97 -10
- package/filter/components/PriceSlider/spec.js +25 -1
- package/filter/components/PriceSlider/style.js +95 -1
- package/filter/components/index.js +2 -1
- package/filter/constants/index.js +4 -1
- package/filter/constants/sort.js +30 -5
- package/filter/helpers/buildFilterParamsForFetchFiltersRequest.js +44 -6
- package/filter/helpers/buildInitialFilters.js +26 -2
- package/filter/helpers/buildUpdatedFilters.js +27 -5
- package/filter/helpers/index.js +4 -1
- package/filter/helpers/translateFilterLabel.js +7 -2
- package/filter/hocs/index.js +1 -1
- package/filter/hocs/withSort.js +33 -4
- package/filter/hooks/filterPage.js +6 -2
- package/filter/hooks/index.js +7 -2
- package/filter/index.js +12 -2
- package/filter/providers/FilterPageProvider.context.js +42 -9
- package/filter/providers/FilterPageProvider.js +231 -46
- package/filter/providers/SortProvider.connector.js +27 -2
- package/filter/providers/SortProvider.context.js +3 -1
- package/filter/providers/SortProvider.helpers.js +25 -4
- package/filter/providers/SortProvider.js +72 -4
- package/filter/providers/index.js +2 -1
- package/filter/selectors/index.js +59 -10
- package/filter/streams/index.js +1 -1
- package/i18n/countries.helpers.js +24 -2
- package/i18n/countries.hooks.js +10 -6
- package/i18n/index.js +1 -1
- package/index.js +4 -1
- package/locations/action-creators/errorInventories.js +11 -2
- package/locations/action-creators/errorLocations.js +10 -2
- package/locations/action-creators/errorProductInventories.js +11 -2
- package/locations/action-creators/errorProductLocations.js +10 -2
- package/locations/action-creators/index.js +25 -1
- package/locations/action-creators/provideProductAlternativeLocation.js +9 -2
- package/locations/action-creators/receiveInventories.js +9 -2
- package/locations/action-creators/receiveLocations.js +10 -2
- package/locations/action-creators/receiveProductInventories.js +11 -2
- package/locations/action-creators/receiveProductLocations.js +11 -2
- package/locations/action-creators/requestInventories.js +10 -2
- package/locations/action-creators/requestLocations.js +9 -2
- package/locations/action-creators/requestProductInventories.js +10 -2
- package/locations/action-creators/requestProductLocations.js +9 -2
- package/locations/action-creators/selectGlobalLocation.js +9 -2
- package/locations/action-creators/selectLocation.js +32 -2
- package/locations/action-creators/sendDefaultLocationCode.js +23 -4
- package/locations/action-creators/setStoreFinderSearchRadius.js +9 -2
- package/locations/action-creators/setUserGeolocation.js +10 -2
- package/locations/action-creators/setUserSearchCountryCode.js +24 -6
- package/locations/action-creators/setUserSearchGeolocation.js +12 -2
- package/locations/action-creators/setUserSearchPostalCode.js +24 -6
- package/locations/action-creators/storeFormInput.js +9 -2
- package/locations/action-creators/storeFulfillmentMethod.js +9 -2
- package/locations/action-creators/submitReservationError.js +11 -2
- package/locations/action-creators/submitReservationRequest.js +11 -2
- package/locations/action-creators/submitReservationSuccess.js +11 -2
- package/locations/actions/fetchDefaultLocation.js +22 -2
- package/locations/actions/fetchFulfillmentSlots.js +34 -2
- package/locations/actions/fetchInventories.js +39 -2
- package/locations/actions/fetchLocations.js +49 -2
- package/locations/actions/fetchProductInventories.js +28 -2
- package/locations/actions/fetchProductLocations.js +38 -2
- package/locations/actions/index.js +18 -2
- package/locations/actions/sendDefaultLocationCode.js +18 -2
- package/locations/actions/setUserGeolocation.js +22 -1
- package/locations/actions/setUserSearchGeolocation.js +19 -1
- package/locations/actions/submitReservation.js +35 -2
- package/locations/components/Cart/CartChangeFulfillmentMethod.connector.js +15 -3
- package/locations/components/Cart/CartChangeFulfillmentMethod.js +57 -7
- package/locations/components/Cart/CartChangeFulfillmentMethod.types.js +14 -0
- package/locations/components/Cart/CartContextMenuChangeFulfillment.js +36 -5
- package/locations/components/Cart/CartContextMenuChangeFulfillmentContent.js +50 -2
- package/locations/components/Cart/CartContextMenuChangeFulfillmentContent.style.js +24 -1
- package/locations/components/Cart/CartContextMenuItemChangeFulfillment.connector.js +12 -2
- package/locations/components/Cart/CartContextMenuItemChangeFulfillment.js +29 -2
- package/locations/components/Cart/CartContextMenuItemChangeLocation.js +34 -6
- package/locations/components/Cart/CartItemProductChangeLocation.connector.js +29 -3
- package/locations/components/Cart/CartItemProductChangeLocation.js +77 -9
- package/locations/components/Cart/CartItemProductChangeLocation.types.js +11 -0
- package/locations/components/Cart/index.js +5 -1
- package/locations/components/ChangeLocationButton/ChangeLocationButton.js +39 -4
- package/locations/components/ChangeLocationButton/ChangeLocationButton.style.js +17 -2
- package/locations/components/ChangeLocationButton/index.js +1 -1
- package/locations/components/FulfillmentPath/FulfillmentPath.js +72 -2
- package/locations/components/FulfillmentPath/FulfillmentPath.style.js +35 -2
- package/locations/components/FulfillmentPath/FulfillmentPathItem.js +32 -5
- package/locations/components/FulfillmentPath/index.js +1 -1
- package/locations/components/FulfillmentPathSelector/FulfillmentPathSelector.js +81 -7
- package/locations/components/FulfillmentPathSelector/FulfillmentPathSelector.style.js +4 -1
- package/locations/components/FulfillmentPathSelector/index.js +1 -1
- package/locations/components/FulfillmentSelector/FulfillmentSelector.connector.js +85 -8
- package/locations/components/FulfillmentSelector/FulfillmentSelector.context.js +27 -1
- package/locations/components/FulfillmentSelector/FulfillmentSelector.hooks.js +12 -3
- package/locations/components/FulfillmentSelector/FulfillmentSelector.js +202 -18
- package/locations/components/FulfillmentSelector/FulfillmentSelector.style.js +8 -1
- package/locations/components/FulfillmentSelector/FulfillmentSelector.types.js +72 -1
- package/locations/components/FulfillmentSelector/FulfillmentSelectorAddToCart.js +79 -8
- package/locations/components/FulfillmentSelector/FulfillmentSelectorAlternativeLocation.js +119 -3
- package/locations/components/FulfillmentSelector/FulfillmentSelectorBOPIS.js +24 -3
- package/locations/components/FulfillmentSelector/FulfillmentSelectorDirectShip.js +54 -4
- package/locations/components/FulfillmentSelector/FulfillmentSelectorHeader.js +16 -3
- package/locations/components/FulfillmentSelector/FulfillmentSelectorHeader.style.js +9 -1
- package/locations/components/FulfillmentSelector/FulfillmentSelectorImpossibleError.js +41 -2
- package/locations/components/FulfillmentSelector/FulfillmentSelectorImpossibleError.style.js +4 -1
- package/locations/components/FulfillmentSelector/FulfillmentSelectorItem.js +76 -5
- package/locations/components/FulfillmentSelector/FulfillmentSelectorItem.style.js +60 -1
- package/locations/components/FulfillmentSelector/FulfillmentSelectorLocation.js +131 -2
- package/locations/components/FulfillmentSelector/FulfillmentSelectorLocation.style.js +22 -1
- package/locations/components/FulfillmentSelector/FulfillmentSelectorLocationMethodNotAvailable.js +36 -2
- package/locations/components/FulfillmentSelector/FulfillmentSelectorROPIS.js +23 -2
- package/locations/components/FulfillmentSelector/index.js +1 -1
- package/locations/components/FulfillmentSheet/FulfillmentSheet.js +21 -2
- package/locations/components/FulfillmentSheet/FulfillmentSheet.style.js +14 -1
- package/locations/components/FulfillmentSheet/FulfillmentSheetContent.js +39 -2
- package/locations/components/FulfillmentSheet/index.js +1 -1
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotDialog.js +303 -14
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotProvider.connector.js +16 -3
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotProvider.context.js +2 -1
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotProvider.js +69 -5
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcher.connector.js +14 -2
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcher.js +67 -3
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherBar.js +48 -2
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherBar.style.js +42 -1
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherDefault.js +43 -2
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherDefault.style.js +27 -1
- package/locations/components/FulfillmentSlotSwitcher/index.js +2 -1
- package/locations/components/FulfillmentSlotSwitcher/time.js +31 -2
- package/locations/components/GlobalLocationSelector/GlobalLocationSelector.js +79 -6
- package/locations/components/GlobalLocationSelector/index.js +1 -1
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcher.connector.js +20 -3
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcher.js +66 -4
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherBar.js +45 -2
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherBar.style.js +39 -1
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherDefault.js +35 -2
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherDefault.style.js +27 -1
- package/locations/components/GlobalLocationSwitcher/index.js +1 -1
- package/locations/components/ReservationResponses/ReservationError.js +19 -2
- package/locations/components/ReservationResponses/ReservationResponse.style.js +28 -1
- package/locations/components/ReservationResponses/ReservationSuccess.js +29 -2
- package/locations/components/ReservationResponses/index.js +2 -1
- package/locations/components/ReserveForm/ReserveForm.constraints.js +33 -1
- package/locations/components/ReserveForm/ReserveForm.js +206 -6
- package/locations/components/ReserveForm/ReserveForm.style.js +77 -1
- package/locations/components/ReserveForm/ReserveFormPhone.connector.js +16 -3
- package/locations/components/ReserveForm/ReserveFormPhone.js +139 -3
- package/locations/components/ReserveForm/ReserveFormPhone.types.js +13 -0
- package/locations/components/ReserveForm/index.js +1 -1
- package/locations/components/StockInfo/StockInfo.defaultSettings.js +49 -1
- package/locations/components/StockInfo/StockInfo.js +78 -3
- package/locations/components/StockInfo/StockInfoInventory.js +39 -2
- package/locations/components/StockInfo/index.js +1 -1
- package/locations/components/StockInfoLists/index.js +84 -3
- package/locations/components/StoreDetails/components/FindMoreStores.js +92 -2
- package/locations/components/StoreDetails/components/GetDirectionsButton.js +50 -3
- package/locations/components/StoreDetails/components/StoreDetails.js +211 -3
- package/locations/components/StoreDetails/components/StoreFinderMap.js +122 -7
- package/locations/components/StoreDetails/components/StoreFinderMap.style.js +14 -1
- package/locations/components/StoreDetails/components/StoreLocationMap.js +33 -2
- package/locations/components/StoreDetails/components/StoresNearby.js +40 -2
- package/locations/components/StoreDetails/components/StoresNearbyListItem.js +150 -3
- package/locations/components/StoreDetails/index.js +24 -2
- package/locations/components/StoreFinder/Store.context.js +7 -1
- package/locations/components/StoreFinder/StoreFinder.js +28 -2
- package/locations/components/StoreFinder/StoreFinder.style.js +25 -1
- package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.connector.js +14 -2
- package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.js +38 -2
- package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.style.js +12 -1
- package/locations/components/StoreFinder/StoreFinderLocation.js +33 -3
- package/locations/components/StoreFinder/StoreFinderLocation.style.js +10 -1
- package/locations/components/StoreFinder/StoreFinderLocationDetails.js +33 -2
- package/locations/components/StoreFinder/StoreFinderLocationDetails.style.js +15 -1
- package/locations/components/StoreFinder/StoreFinderLocationHeader.js +73 -2
- package/locations/components/StoreFinder/StoreFinderLocationHeader.style.js +74 -1
- package/locations/components/StoreFinder/StoreFinderLocationHeaderPhoneNumber.js +34 -2
- package/locations/components/StoreFinder/StoreFinderLocations.js +33 -2
- package/locations/components/StoreFinder/StoreFinderLocations.style.js +26 -1
- package/locations/components/StoreFinder/StoreFinderSearch.js +14 -2
- package/locations/components/StoreFinder/StoreFinderSearch.style.js +5 -1
- package/locations/components/StoreFinder/StoreFinderSelectLocationButton.js +32 -2
- package/locations/components/StoreFinder/StoreFinderStoreInfoButton.js +62 -3
- package/locations/components/StoreFinder/index.js +1 -1
- package/locations/components/StoreList/Store.context.js +6 -1
- package/locations/components/StoreList/Store.style.js +121 -1
- package/locations/components/StoreList/StoreAddress.js +63 -2
- package/locations/components/StoreList/StoreAddressShort.js +57 -2
- package/locations/components/StoreList/StoreCard.js +18 -2
- package/locations/components/StoreList/StoreDetails.js +33 -2
- package/locations/components/StoreList/StoreDetailsLine.js +34 -2
- package/locations/components/StoreList/StoreDistance.js +26 -2
- package/locations/components/StoreList/StoreHeader.js +74 -2
- package/locations/components/StoreList/StoreHoursToday.js +33 -2
- package/locations/components/StoreList/StoreList.js +12 -2
- package/locations/components/StoreList/StoreListLocations.js +43 -2
- package/locations/components/StoreList/StoreListProduct.js +46 -2
- package/locations/components/StoreList/StoreListProduct.style.js +43 -1
- package/locations/components/StoreList/StoreListProductInfo.js +37 -2
- package/locations/components/StoreList/StoreListProductName.js +27 -2
- package/locations/components/StoreList/StoreListSearch.connector.js +21 -3
- package/locations/components/StoreList/StoreListSearch.js +179 -10
- package/locations/components/StoreList/StoreListSearch.style.js +84 -1
- package/locations/components/StoreList/StoreListSearchRadius.connector.js +21 -3
- package/locations/components/StoreList/StoreListSearchRadius.js +65 -2
- package/locations/components/StoreList/StoreListSearchRadius.style.js +3 -1
- package/locations/components/StoreList/StoreOpeningHours.js +46 -2
- package/locations/components/StoreList/StoreOpeningHoursLine.js +33 -2
- package/locations/components/StoreList/StorePhoneNumber.js +38 -2
- package/locations/components/StoreList/StoreSelectLocationButton.js +48 -2
- package/locations/components/StoreList/index.js +4 -1
- package/locations/components/index.js +12 -1
- package/locations/constants/ActionTypes.js +46 -8
- package/locations/constants/Pipelines.js +5 -1
- package/locations/constants/Portals.js +31 -2
- package/locations/constants/Stages.js +5 -1
- package/locations/constants/index.js +28 -6
- package/locations/constants/routes.js +3 -1
- package/locations/helpers/createOrder.js +154 -7
- package/locations/helpers/formatDistance.js +43 -5
- package/locations/helpers/getAvailabilitySettings.js +39 -7
- package/locations/helpers/index.js +4 -1
- package/locations/helpers/productInventory.js +21 -2
- package/locations/helpers/showInventoryInLists.js +30 -4
- package/locations/index.js +40 -7
- package/locations/locations.context.js +78 -1
- package/locations/locations.hooks.js +8 -2
- package/locations/locations.streams.js +174 -2
- package/locations/locations.types.js +170 -1
- package/locations/providers/FulfillmentProvider.connector.js +65 -7
- package/locations/providers/FulfillmentProvider.js +459 -36
- package/locations/providers/FulfillmentProvider.types.js +50 -1
- package/locations/providers/StoreDetailsContext.js +2 -1
- package/locations/providers/StoreDetailsProvider.js +54 -4
- package/locations/providers/StoreFinder.connector.js +22 -2
- package/locations/providers/StoreFinderProvider.js +76 -7
- package/locations/providers/index.js +4 -1
- package/locations/reducers/index.js +18 -1
- package/locations/reducers/storage.js +153 -21
- package/locations/reducers/storeFinderSearch.js +27 -2
- package/locations/reducers/user.js +21 -2
- package/locations/reducers/userFormInput.js +22 -7
- package/locations/reducers/userSearch.js +36 -2
- package/locations/selectors/index.js +429 -42
- package/locations/subscriptions.js +363 -15
- package/login/action-creators/index.js +1 -1
- package/login/action-creators/resetPassword.js +23 -4
- package/login/actions/index.js +1 -1
- package/login/actions/resetPassword.js +22 -2
- package/login/components/ForgotPassword/ForgotPassword.connector.js +11 -2
- package/login/components/ForgotPassword/ForgotPassword.js +109 -2
- package/login/components/ForgotPassword/ForgotPassword.style.js +88 -1
- package/login/components/ForgotPassword/index.js +1 -1
- package/login/constants/actions.js +3 -1
- package/login/constants/index.js +3 -1
- package/login/constants/pipelines.js +1 -1
- package/login/constants/routes.js +1 -1
- package/login/index.js +3 -1
- package/market/index.js +9 -3
- package/orders/action-creators/index.js +2 -1
- package/orders/action-creators/orderDetails.js +27 -5
- package/orders/action-creators/orders.js +36 -6
- package/orders/actions/cancelOrder.js +43 -2
- package/orders/actions/fetchOrderDetails.js +19 -2
- package/orders/actions/fetchOrderHistory.js +23 -2
- package/orders/actions/index.js +3 -1
- package/orders/components/OrderDetails/OrderDetails.js +29 -2
- package/orders/components/OrderDetails/OrderDetailsAuthenticate.js +111 -2
- package/orders/components/OrderDetails/OrderDetailsAuthenticate.style.js +33 -1
- package/orders/components/OrderDetails/OrderDetailsAuthenticateForm.config.js +28 -2
- package/orders/components/OrderDetails/OrderDetailsContent.js +26 -2
- package/orders/components/OrderDetails/OrderDetailsContent.style.js +18 -1
- package/orders/components/OrderDetails/OrderDetailsOrder.js +83 -2
- package/orders/components/OrderDetails/OrderDetailsOrder.style.js +62 -1
- package/orders/components/OrderDetails/OrderDetailsOrderHeader.js +73 -2
- package/orders/components/OrderDetails/OrderDetailsOrderHeader.style.js +42 -1
- package/orders/components/OrderDetails/OrderDetailsOrderPickupLocation.connector.js +22 -2
- package/orders/components/OrderDetails/OrderDetailsOrderPickupLocation.js +59 -2
- package/orders/components/OrderDetails/OrderDetailsOrderPickupLocation.style.js +7 -1
- package/orders/components/OrderDetails/index.js +1 -1
- package/orders/components/OrderHistory/OrderHistory.js +44 -2
- package/orders/components/OrderHistory/OrderHistory.style.js +7 -1
- package/orders/components/OrderHistory/OrderHistoryList.js +62 -3
- package/orders/components/OrderHistory/OrderHistoryList.style.js +36 -1
- package/orders/components/OrderHistory/OrderHistoryLoader.js +40 -2
- package/orders/components/OrderHistory/OrderHistoryTable.js +71 -3
- package/orders/components/OrderHistory/OrderHistoryTable.style.js +25 -1
- package/orders/components/OrderHistory/index.js +1 -1
- package/orders/components/index.js +1 -1
- package/orders/constants/actionTypes.js +8 -1
- package/orders/constants/index.js +4 -1
- package/orders/constants/pipelines.js +3 -1
- package/orders/constants/routes.js +3 -1
- package/orders/constants/status.js +52 -5
- package/orders/helpers/index.js +1 -1
- package/orders/helpers/orderDetails.js +5 -2
- package/orders/helpers/orderStatus.js +23 -4
- package/orders/hooks/index.js +11 -3
- package/orders/index.js +8 -2
- package/orders/providers/OrderDetailsPrivateProvider.connector.js +34 -4
- package/orders/providers/OrderDetailsPrivateProvider.js +65 -3
- package/orders/providers/OrderDetailsProvider.connector.js +36 -4
- package/orders/providers/OrderDetailsProvider.constraints.js +21 -1
- package/orders/providers/OrderDetailsProvider.context.js +3 -1
- package/orders/providers/OrderDetailsProvider.js +172 -6
- package/orders/providers/OrderHistoryProvider.connector.js +19 -3
- package/orders/providers/OrderHistoryProvider.context.js +3 -1
- package/orders/providers/OrderHistoryProvider.js +36 -2
- package/orders/reducers/index.js +9 -1
- package/orders/reducers/orders.js +45 -3
- package/orders/reducers/ordersById.js +59 -3
- package/orders/reducers/ordersByNumber.js +71 -3
- package/orders/selectors/index.js +29 -8
- package/orders/subscriptions/index.js +17 -2
- package/package.json +12 -14
- package/page/action-creators/index.js +39 -5
- package/page/actions/index.js +1 -1
- package/page/components/NotFound.js +77 -2
- package/page/components/ResponsiveWidgetImage/ResponsiveWidgetImage.js +170 -9
- package/page/components/ResponsiveWidgetImage/index.js +1 -1
- package/page/components/WidgetHeadline/WidgetHeadline.js +68 -4
- package/page/components/WidgetHeadline/index.js +1 -1
- package/page/components/WidgetRichText/WidgetRichText.js +84 -2
- package/page/components/WidgetRichText/index.js +1 -1
- package/page/components/WidgetVideo/WidgetVideo.js +159 -0
- package/page/components/WidgetVideo/index.js +1 -0
- package/page/components/Widgets/Overlay.js +252 -27
- package/page/components/Widgets/Tooltip.js +196 -17
- package/page/components/Widgets/Widget.js +134 -7
- package/page/components/Widgets/WidgetContext.js +10 -3
- package/page/components/Widgets/WidgetProvider.js +39 -2
- package/page/components/Widgets/Widgets.js +85 -6
- package/page/components/Widgets/WidgetsPreviewContext.js +13 -3
- package/page/components/Widgets/WidgetsPreviewProvider.js +31 -2
- package/page/components/Widgets/constants.js +5 -2
- package/page/components/Widgets/events.js +33 -6
- package/page/components/Widgets/helpers.js +37 -7
- package/page/components/Widgets/hooks.js +178 -27
- package/page/components/Widgets/index.js +2 -1
- package/page/components/index.js +4 -1
- package/page/constants/actionTypes.js +3 -1
- package/page/constants/index.js +20 -3
- package/page/helpers/index.d.ts +14 -0
- package/page/helpers/index.js +66 -8
- package/page/hooks/index.js +128 -25
- package/page/index.js +6 -1
- package/page/reducers/index.js +126 -7
- package/page/selectors/index.js +177 -14
- package/page/subscriptions/index.js +7 -2
- package/page/widgets/Button/Button.js +57 -2
- package/page/widgets/Button/index.js +1 -1
- package/page/widgets/CategoryList/CategoryList.js +40 -2
- package/page/widgets/CategoryList/hooks.js +63 -6
- package/page/widgets/CategoryList/index.js +1 -1
- package/page/widgets/CategoryList/selectors.js +11 -3
- package/page/widgets/HTML/HTML.js +92 -3
- package/page/widgets/HTML/hooks.js +22 -4
- package/page/widgets/HTML/index.js +1 -1
- package/page/widgets/Headline/Headline.js +20 -2
- package/page/widgets/Headline/index.js +1 -1
- package/page/widgets/HeroBanner/HeroBanner.js +97 -2
- package/page/widgets/HeroBanner/hooks.js +49 -8
- package/page/widgets/HeroBanner/index.js +1 -1
- package/page/widgets/Image/Image.js +44 -2
- package/page/widgets/Image/hooks.js +48 -4
- package/page/widgets/Image/index.js +1 -1
- package/page/widgets/ImageRow/ImageRow.js +113 -2
- package/page/widgets/ImageRow/hooks.js +63 -4
- package/page/widgets/ImageRow/index.js +1 -1
- package/page/widgets/ImageSlider/ImageSlider.js +53 -2
- package/page/widgets/ImageSlider/hooks.js +146 -11
- package/page/widgets/ImageSlider/index.js +1 -1
- package/page/widgets/NestedCategoryFilter/NestedCategoryFilter.js +164 -0
- package/page/widgets/NestedCategoryFilter/components/Picker/components/Sheet/index.js +59 -0
- package/page/widgets/NestedCategoryFilter/components/Picker/components/SheetItem/index.js +60 -0
- package/page/widgets/NestedCategoryFilter/components/Picker/index.js +124 -0
- package/page/widgets/NestedCategoryFilter/hooks.js +35 -0
- package/page/widgets/NestedCategoryFilter/index.js +1 -0
- package/page/widgets/Placeholder/Placeholder.js +53 -2
- package/page/widgets/Placeholder/hooks.js +11 -4
- package/page/widgets/Placeholder/index.js +1 -1
- package/page/widgets/ProductList/ProductList.js +81 -3
- package/page/widgets/ProductList/hooks.js +50 -5
- package/page/widgets/ProductList/index.js +1 -1
- package/page/widgets/ProductSlider/ProductSlider.js +64 -3
- package/page/widgets/ProductSlider/hooks.js +71 -5
- package/page/widgets/ProductSlider/index.js +1 -1
- package/page/widgets/RichText/RichText.js +28 -2
- package/page/widgets/RichText/hooks.js +19 -4
- package/page/widgets/RichText/index.js +1 -1
- package/page/widgets/Video/Video.js +30 -0
- package/page/widgets/Video/hooks.js +52 -0
- package/page/widgets/Video/index.js +1 -0
- package/page/widgets/index.js +14 -1
- package/page/widgets/widgets.json +6 -0
- package/product/collections/index.js +1 -1
- package/product/components/Availability/Availability.connector.js +24 -3
- package/product/components/Availability/Availability.js +48 -3
- package/product/components/Availability/Availability.style.js +10 -1
- package/product/components/Availability/index.js +1 -1
- package/product/components/Characteristics/Characteristic/components/Sheet/index.js +178 -16
- package/product/components/Characteristics/Characteristic/components/SheetItem/index.js +94 -8
- package/product/components/Characteristics/Characteristic/components/SheetItem/style.js +69 -1
- package/product/components/Characteristics/Characteristic/index.js +177 -16
- package/product/components/Characteristics/Characteristic/style.js +40 -1
- package/product/components/Characteristics/Swatch/index.js +104 -9
- package/product/components/Characteristics/Swatch/style.js +28 -1
- package/product/components/Characteristics/index.js +87 -10
- package/product/components/Characteristics/transition.js +14 -1
- package/product/components/Description/connector.js +23 -3
- package/product/components/Description/index.js +53 -2
- package/product/components/Description/style.js +41 -1
- package/product/components/EffectivityDates/connector.js +18 -3
- package/product/components/EffectivityDates/constants.js +2 -1
- package/product/components/EffectivityDates/helpers.js +78 -5
- package/product/components/EffectivityDates/index.js +84 -2
- package/product/components/EffectivityDates/style.js +10 -1
- package/product/components/FilterBar/FilterBarProvider.connector.js +22 -3
- package/product/components/FilterBar/FilterBarProvider.context.js +8 -2
- package/product/components/FilterBar/FilterBarProvider.js +41 -3
- package/product/components/FilterBar/components/Content/actions/openFilterRoute.js +41 -2
- package/product/components/FilterBar/components/Content/components/FilterButton/index.js +39 -2
- package/product/components/FilterBar/components/Content/components/FilterButton/style.js +42 -1
- package/product/components/FilterBar/components/Content/components/FilterChips/connector.js +16 -3
- package/product/components/FilterBar/components/Content/components/FilterChips/index.js +157 -8
- package/product/components/FilterBar/components/Content/components/FilterChips/style.js +14 -1
- package/product/components/FilterBar/components/Content/components/Sort/components/Item/index.js +19 -2
- package/product/components/FilterBar/components/Content/components/Sort/components/Item/style.js +7 -1
- package/product/components/FilterBar/components/Content/components/Sort/index.js +33 -2
- package/product/components/FilterBar/components/Content/components/Sort/style.js +76 -1
- package/product/components/FilterBar/components/Content/index.js +49 -2
- package/product/components/FilterBar/components/Content/spec.js +136 -6
- package/product/components/FilterBar/components/Content/style.js +4 -1
- package/product/components/FilterBar/components/FilterModal/FilterModal.js +68 -2
- package/product/components/FilterBar/components/FilterModal/FilterModalContent.js +57 -2
- package/product/components/FilterBar/components/FilterModal/FilterModalTitle.js +70 -2
- package/product/components/FilterBar/components/FilterModal/index.js +1 -1
- package/product/components/FilterBar/index.js +56 -2
- package/product/components/FilterBar/mock.js +67 -4
- package/product/components/FilterBar/selectors.js +6 -2
- package/product/components/FilterBar/style.js +4 -1
- package/product/components/Header/PriceStriked/connector.js +20 -3
- package/product/components/Header/PriceStriked/index.js +55 -2
- package/product/components/Header/PriceStriked/style.js +26 -1
- package/product/components/Header/Shipping/components/Label/index.js +33 -3
- package/product/components/Header/Shipping/components/Label/style.js +11 -1
- package/product/components/Header/Shipping/connector.js +20 -3
- package/product/components/Header/Shipping/index.js +36 -2
- package/product/components/Header/Shipping/mock.js +38 -1
- package/product/components/Header/Shipping/spec.js +33 -2
- package/product/components/Header/Shipping/style.js +14 -1
- package/product/components/Header/Tiers/components/Tier/index.js +38 -4
- package/product/components/Header/Tiers/components/Tier/spec.js +48 -1
- package/product/components/Header/Tiers/connector.js +20 -3
- package/product/components/Header/Tiers/index.js +38 -2
- package/product/components/Header/Tiers/spec.js +64 -1
- package/product/components/Header/Tiers/style.js +17 -1
- package/product/components/Header/index.js +3 -1
- package/product/components/MapPriceHint/connector.js +14 -2
- package/product/components/MapPriceHint/helpers.js +26 -4
- package/product/components/MapPriceHint/index.js +47 -2
- package/product/components/Media/FeaturedMedia.js +31 -2
- package/product/components/Media/FeaturedVideo.js +10 -3
- package/product/components/Media/MediaImage.js +61 -2
- package/product/components/Media/MediaPlaceholder.js +25 -2
- package/product/components/Media/helpers.js +31 -2
- package/product/components/Media/index.js +2 -1
- package/product/components/Media/props.js +13 -1
- package/product/components/Media/style.js +41 -1
- package/product/components/MediaSlider/components/MediaImage/index.js +26 -2
- package/product/components/MediaSlider/components/MediaVideo/connector.js +9 -2
- package/product/components/MediaSlider/components/MediaVideo/index.js +41 -2
- package/product/components/MediaSlider/connector.js +28 -3
- package/product/components/MediaSlider/constants.js +12 -2
- package/product/components/MediaSlider/index.js +81 -3
- package/product/components/MediaSlider/style.js +32 -1
- package/product/components/Options/components/Content/connector.js +24 -3
- package/product/components/Options/components/Content/index.js +99 -9
- package/product/components/Options/components/Content/spec.js +73 -2
- package/product/components/Options/components/Option/index.js +42 -2
- package/product/components/Options/components/TextOption/components/OptionInfo/index.js +74 -3
- package/product/components/Options/components/TextOption/components/OptionInfo/spec.js +63 -1
- package/product/components/Options/components/TextOption/components/OptionInfo/style.js +23 -1
- package/product/components/Options/components/TextOption/index.js +170 -20
- package/product/components/Options/components/TextOption/style.js +37 -1
- package/product/components/Options/index.js +31 -3
- package/product/components/OrderQuantityHint/index.js +75 -3
- package/product/components/OrderQuantityHint/style.js +6 -1
- package/product/components/PriceDifference/index.js +31 -2
- package/product/components/PriceDifference/style.js +18 -1
- package/product/components/PriceInfo/PriceInfo.connector.js +13 -2
- package/product/components/PriceInfo/PriceInfo.js +81 -3
- package/product/components/PriceInfo/index.js +1 -1
- package/product/components/ProductBadges/index.js +60 -2
- package/product/components/ProductCard/index.js +122 -3
- package/product/components/ProductCard/style.js +18 -1
- package/product/components/ProductCharacteristics/connector.js +33 -4
- package/product/components/ProductCharacteristics/context.js +2 -1
- package/product/components/ProductCharacteristics/helpers/index.js +139 -21
- package/product/components/ProductCharacteristics/index.js +286 -34
- package/product/components/ProductDiscountBadge/connector.js +9 -2
- package/product/components/ProductDiscountBadge/index.js +51 -2
- package/product/components/ProductDiscountBadge/mock.js +35 -3
- package/product/components/ProductDiscountBadge/spec.js +55 -2
- package/product/components/ProductDiscountBadge/style.js +31 -1
- package/product/components/ProductFilters/index.js +73 -4
- package/product/components/ProductFilters/style.js +23 -1
- package/product/components/ProductGrid/components/Item/components/ItemDetails/index.js +82 -2
- package/product/components/ProductGrid/components/Item/components/ItemDetails/spec.js +73 -1
- package/product/components/ProductGrid/components/Item/components/ItemDiscount/index.js +43 -2
- package/product/components/ProductGrid/components/Item/components/ItemFavoritesButton/index.js +51 -2
- package/product/components/ProductGrid/components/Item/components/ItemFavoritesButton/spec.js +33 -1
- package/product/components/ProductGrid/components/Item/components/ItemImage/index.js +36 -2
- package/product/components/ProductGrid/components/Item/components/ItemImage/spec.js +16 -1
- package/product/components/ProductGrid/components/Item/components/ItemName/index.js +56 -2
- package/product/components/ProductGrid/components/Item/components/ItemName/spec.js +20 -1
- package/product/components/ProductGrid/components/Item/components/ItemPrice/index.js +35 -2
- package/product/components/ProductGrid/components/Item/components/ItemPrice/spec.js +37 -1
- package/product/components/ProductGrid/components/Item/index.js +89 -2
- package/product/components/ProductGrid/components/Iterator/index.js +39 -2
- package/product/components/ProductGrid/components/Layout/index.js +44 -2
- package/product/components/ProductGrid/index.js +84 -2
- package/product/components/ProductGrid/spec.js +52 -1
- package/product/components/ProductGridPrice/index.js +54 -2
- package/product/components/ProductGridPrice/style.js +21 -1
- package/product/components/ProductImage/ProductImagePlaceholder.js +57 -2
- package/product/components/ProductImage/connector.js +9 -2
- package/product/components/ProductImage/index.js +165 -17
- package/product/components/ProductImage/spec.js +83 -1
- package/product/components/ProductImage/style.js +52 -2
- package/product/components/ProductList/components/Item/index.js +204 -2
- package/product/components/ProductList/components/Item/style.js +66 -2
- package/product/components/ProductList/components/Iterator/index.js +45 -2
- package/product/components/ProductList/components/Iterator/style.js +15 -1
- package/product/components/ProductList/components/Layout/index.js +21 -2
- package/product/components/ProductList/components/Layout/style.js +11 -1
- package/product/components/ProductList/index.js +68 -2
- package/product/components/ProductName/ProductName.js +63 -2
- package/product/components/ProductName/ProductNameContent.js +31 -2
- package/product/components/ProductName/index.js +1 -1
- package/product/components/ProductProperties/Content.js +42 -4
- package/product/components/ProductProperties/Group.js +21 -2
- package/product/components/ProductProperties/GroupedProperties.js +32 -2
- package/product/components/ProductProperties/Lists.js +25 -2
- package/product/components/ProductProperties/ListsHTML.js +42 -2
- package/product/components/ProductProperties/ProductProperties.js +25 -2
- package/product/components/ProductProperties/Row.js +40 -2
- package/product/components/ProductProperties/RowHTML.js +42 -2
- package/product/components/ProductProperties/Rows.js +28 -2
- package/product/components/ProductProperties/Wrapper.js +31 -2
- package/product/components/ProductProperties/connector.js +12 -2
- package/product/components/ProductProperties/helpers/getGroupsFromProperties.js +44 -7
- package/product/components/ProductProperties/helpers/getPropertiesBySubgroup.js +6 -1
- package/product/components/ProductProperties/helpers/getPropertiesWithoutSubgroup.js +6 -1
- package/product/components/ProductProperties/helpers/getSubgroupsFromProperties.js +13 -1
- package/product/components/ProductProperties/style.js +44 -1
- package/product/components/ProductSlider/index.js +77 -3
- package/product/components/ProductSlider/spec.js +39 -1
- package/product/components/ProductSlider/style.js +8 -1
- package/product/components/ProductVariants/VariantAvailability.connector.js +9 -2
- package/product/components/ProductVariants/VariantAvailability.js +34 -2
- package/product/components/ProductVariants/VariantAvailability.style.js +5 -1
- package/product/components/ProductVariants/index.js +1 -1
- package/product/components/QuantityPicker/hooks.js +24 -3
- package/product/components/QuantityPicker/index.js +103 -10
- package/product/components/Rating/connector.js +20 -3
- package/product/components/Rating/index.js +61 -3
- package/product/components/Rating/mock.js +10 -1
- package/product/components/Rating/spec.js +54 -2
- package/product/components/Rating/style.js +12 -1
- package/product/components/RelationsSlider/RelationsSheet.connector.js +15 -3
- package/product/components/RelationsSlider/RelationsSheet.js +59 -2
- package/product/components/RelationsSlider/RelationsSlider.connector.js +29 -4
- package/product/components/RelationsSlider/RelationsSlider.js +33 -2
- package/product/components/RelationsSlider/RelationsSliderContent.js +75 -2
- package/product/components/RelationsSlider/constants.js +1 -1
- package/product/components/RelationsSlider/index.js +1 -1
- package/product/components/RelationsSlider/style.js +56 -1
- package/product/components/Swatch/Swatch.js +31 -2
- package/product/components/Swatch/SwatchContent.js +54 -2
- package/product/components/Swatch/VariantSwatch.js +35 -2
- package/product/components/Swatch/index.js +2 -1
- package/product/components/Swatch/style.js +27 -1
- package/product/components/Swatches/Swatches.js +54 -2
- package/product/components/Swatches/connector.js +12 -2
- package/product/components/Swatches/index.js +1 -1
- package/product/components/Swatches/style.js +9 -1
- package/product/components/UnitQuantityPicker/CartUnitQuantityPicker.js +41 -2
- package/product/components/UnitQuantityPicker/ProductUnitQuantityPicker.connector.js +18 -3
- package/product/components/UnitQuantityPicker/ProductUnitQuantityPicker.js +119 -3
- package/product/components/UnitQuantityPicker/UnitQuantityPicker.js +329 -9
- package/product/components/UnitQuantityPicker/UnitQuantityPickerWithSection.js +83 -3
- package/product/components/UnitQuantityPicker/helper.js +25 -4
- package/product/components/UnitQuantityPicker/index.js +4 -1
- package/product/components/UnitQuantityPicker/styles.js +7 -1
- package/product/components/context.js +3 -1
- package/product/components/index.js +32 -1
- package/product/constants/index.js +13 -2
- package/product/contexts/index.js +1 -1
- package/product/helpers/index.js +85 -6
- package/product/helpers/redirects.js +49 -3
- package/product/hocs/index.js +6 -1
- package/product/hocs/withMapPricing.js +60 -5
- package/product/hocs/withPriceCalculation.js +27 -5
- package/product/hocs/withProduct.js +9 -2
- package/product/hocs/withProductListEntry.js +19 -3
- package/product/hocs/withProductListEntryProduct.js +32 -4
- package/product/hocs/withProductListType.js +19 -3
- package/product/hocs/withProductStock.js +9 -2
- package/product/hooks/index.js +3 -1
- package/product/hooks/useLoadProductImage.js +19 -2
- package/product/hooks/useProductListEntry.js +11 -3
- package/product/hooks/useProductListType.js +11 -3
- package/product/index.js +48 -6
- package/product/product.types.js +38 -0
- package/product/providers/Product/connector.js +13 -2
- package/product/providers/Product/index.js +33 -2
- package/product/providers/ProductListEntry/context.js +13 -2
- package/product/providers/ProductListEntry/index.js +30 -2
- package/product/providers/ProductListType/context.js +21 -4
- package/product/providers/ProductListType/index.js +29 -2
- package/product/providers/index.js +3 -1
- package/product/selectors/helpers/filterProperties.js +29 -5
- package/product/selectors/helpers/index.js +2 -1
- package/product/selectors/helpers/wrapMemoizedSelector.js +8 -1
- package/product/selectors/media.js +25 -8
- package/product/selectors/price.js +23 -4
- package/product/selectors/product.js +190 -25
- package/product/selectors/relations.js +47 -7
- package/product/selectors/variants.js +77 -5
- package/product/streams/index.js +1 -1
- package/push-opt-in/action-creators/index.js +2 -1
- package/push-opt-in/action-creators/optInTrigger.js +43 -8
- package/push-opt-in/action-creators/pushOptIn.js +14 -3
- package/push-opt-in/actions/index.js +1 -1
- package/push-opt-in/actions/pushOptInModal.js +31 -3
- package/push-opt-in/components/PushOptInModal/connector.js +17 -3
- package/push-opt-in/components/PushOptInModal/index.js +102 -3
- package/push-opt-in/components/PushOptInModal/style.js +53 -1
- package/push-opt-in/components/index.js +1 -1
- package/push-opt-in/constants/index.js +2 -1
- package/push-opt-in/constants/optInModal.js +2 -1
- package/push-opt-in/constants/optInTrigger.js +9 -1
- package/push-opt-in/reducers/index.js +7 -1
- package/push-opt-in/reducers/optInModal.js +31 -2
- package/push-opt-in/reducers/optInTrigger.js +83 -2
- package/push-opt-in/selectors/index.js +2 -1
- package/push-opt-in/selectors/optInModal.js +13 -4
- package/push-opt-in/selectors/optInTrigger.js +38 -3
- package/push-opt-in/subscriptions/index.js +6 -1
- package/push-opt-in/subscriptions/optInTracking.js +103 -2
- package/push-opt-in/subscriptions/optInTrigger.js +109 -6
- package/registration/action-creators/index.js +30 -5
- package/registration/actions/index.js +1 -1
- package/registration/actions/submitRegistration.js +25 -2
- package/registration/components/GuestRegistration/GuestRegistration.js +23 -2
- package/registration/components/GuestRegistration/GuestRegistrationContent.js +63 -2
- package/registration/components/GuestRegistration/GuestRegistrationFormPickup.config.js +58 -2
- package/registration/components/GuestRegistration/GuestRegistrationFormPickup.js +84 -2
- package/registration/components/Registration/Registration.js +17 -2
- package/registration/components/Registration/RegistrationContent.js +34 -2
- package/registration/components/Registration/RegistrationContent.style.js +58 -2
- package/registration/components/Registration/RegistrationFormActions.js +43 -2
- package/registration/components/Registration/RegistrationFormBase.config.js +38 -2
- package/registration/components/Registration/RegistrationFormBase.js +38 -2
- package/registration/components/Registration/RegistrationFormBilling.config.js +93 -2
- package/registration/components/Registration/RegistrationFormBilling.js +65 -2
- package/registration/components/Registration/RegistrationFormExtra.config.js +28 -2
- package/registration/components/Registration/RegistrationFormExtra.js +52 -2
- package/registration/components/Registration/RegistrationFormShipping.config.js +82 -2
- package/registration/components/Registration/RegistrationFormShipping.js +58 -2
- package/registration/components/Registration/RegistrationFormToggle.js +55 -2
- package/registration/components/index.js +2 -1
- package/registration/constants/actionTypes.js +4 -1
- package/registration/constants/index.js +8 -1
- package/registration/constants/pipelines.js +1 -1
- package/registration/hooks/index.js +8 -3
- package/registration/index.js +2 -1
- package/registration/providers/GuestRegistrationProvider.actions.js +101 -2
- package/registration/providers/GuestRegistrationProvider.connector.js +44 -3
- package/registration/providers/GuestRegistrationProvider.constraints.js +144 -6
- package/registration/providers/GuestRegistrationProvider.context.js +3 -1
- package/registration/providers/GuestRegistrationProvider.js +348 -17
- package/registration/providers/RegistrationProvider.actions.js +105 -3
- package/registration/providers/RegistrationProvider.connector.js +27 -3
- package/registration/providers/RegistrationProvider.constraints.js +128 -7
- package/registration/providers/RegistrationProvider.context.js +3 -1
- package/registration/providers/RegistrationProvider.js +252 -13
- package/registration/streams/index.js +8 -2
- package/registration/subscriptions/index.js +40 -4
- package/reviews/actions/index.js +5 -1
- package/reviews/components/Reviews/components/AllReviewsLink/connector.js +19 -3
- package/reviews/components/Reviews/components/AllReviewsLink/index.js +34 -2
- package/reviews/components/Reviews/components/AllReviewsLink/style.js +15 -2
- package/reviews/components/Reviews/components/Header/components/AverageRating/index.js +47 -3
- package/reviews/components/Reviews/components/Header/components/AverageRating/style.js +9 -1
- package/reviews/components/Reviews/components/Header/components/NoReviews/index.js +32 -2
- package/reviews/components/Reviews/components/Header/components/NoReviews/style.js +18 -1
- package/reviews/components/Reviews/components/Header/components/ReviewsExcerpt/index.js +49 -2
- package/reviews/components/Reviews/components/Header/components/ReviewsExcerpt/style.js +27 -1
- package/reviews/components/Reviews/components/Header/components/WriteReviewLink/index.js +26 -2
- package/reviews/components/Reviews/components/Header/components/WriteReviewLink/spec.js +32 -2
- package/reviews/components/Reviews/components/Header/connector.js +10 -2
- package/reviews/components/Reviews/components/Header/index.js +39 -2
- package/reviews/components/Reviews/components/Header/spec.js +56 -2
- package/reviews/components/Reviews/components/List/components/Info/components/Author/index.js +24 -2
- package/reviews/components/Reviews/components/List/components/Info/components/ReviewDate/index.js +17 -2
- package/reviews/components/Reviews/components/List/components/Info/index.js +27 -3
- package/reviews/components/Reviews/components/List/components/Info/style.js +9 -1
- package/reviews/components/Reviews/components/List/components/Rating/index.js +21 -2
- package/reviews/components/Reviews/components/List/components/Rating/style.js +14 -1
- package/reviews/components/Reviews/components/List/components/Review/index.js +25 -2
- package/reviews/components/Reviews/components/List/components/Text/index.js +22 -2
- package/reviews/components/Reviews/components/List/components/Text/style.js +6 -1
- package/reviews/components/Reviews/components/List/components/Title/index.js +17 -2
- package/reviews/components/Reviews/components/List/components/Title/style.js +5 -1
- package/reviews/components/Reviews/components/List/index.js +58 -3
- package/reviews/components/Reviews/components/List/spec.js +69 -1
- package/reviews/components/Reviews/components/List/style.js +11 -1
- package/reviews/components/Reviews/components/RatingCount/index.js +27 -2
- package/reviews/components/Reviews/components/RatingCount/spec.js +18 -1
- package/reviews/components/Reviews/components/RatingCount/style.js +20 -1
- package/reviews/components/Reviews/components/ReviewsInfo/index.js +47 -2
- package/reviews/components/Reviews/connector.js +14 -2
- package/reviews/components/Reviews/index.js +45 -2
- package/reviews/components/Reviews/mock.js +83 -7
- package/reviews/components/Reviews/spec.js +69 -4
- package/reviews/components/Reviews/style.js +11 -1
- package/reviews/components/index.js +1 -1
- package/reviews/constants/index.js +3 -1
- package/reviews/index.js +11 -2
- package/reviews/selectors/index.js +1 -1
- package/reviews/streams/index.js +1 -1
- package/scanner/action-creators/index.js +3 -1
- package/scanner/actions/index.js +4 -1
- package/scanner/classes/index.js +1 -1
- package/scanner/constants/index.js +3 -1
- package/scanner/helpers/index.js +1 -1
- package/scanner/index.js +10 -1
- package/scanner/streams/index.js +1 -1
- package/search/actions/index.js +2 -1
- package/search/constants/index.js +3 -1
- package/search/helpers/index.js +3 -1
- package/search/index.js +9 -1
- package/search/selectors/index.js +1 -1
- package/search/streams/index.js +1 -1
- package/styles/helpers/color.js +19 -8
- package/styles/helpers/cssCustomProperties.js +35 -4
- package/styles/helpers/index.js +11 -1
- package/styles/helpers/initCSSCustomProperties.js +70 -4
- package/styles/helpers/loadCustomStyles.js +31 -3
- package/styles/helpers/setPageBackgroundColor.js +18 -3
- package/styles/helpers/setPageContentWidth.js +7 -2
- package/styles/helpers/setViewportHeight.js +11 -2
- package/styles/helpers/toggleBodyScroll.js +48 -2
- package/styles/helpers/updatePageInsets.js +38 -2
- package/styles/index.js +3 -1
- package/styles/reset/form.js +50 -4
- package/styles/reset/index.js +5 -1
- package/styles/reset/media.js +20 -1
- package/styles/reset/root.js +59 -3
- package/styles/reset/table.js +8 -1
- package/styles/reset/typography.js +24 -1
- package/styles/theme/createTheme/createBreakpoints.js +100 -15
- package/styles/theme/createTheme/createPalette.js +54 -2
- package/styles/theme/createTheme/createSpacing.js +38 -5
- package/styles/theme/createTheme/createTypography.js +74 -5
- package/styles/theme/createTheme/index.js +26 -2
- package/styles/theme/createTheme/transitions.js +81 -15
- package/styles/theme/createTheme/zIndex.js +7 -1
- package/styles/theme/hooks/index.js +4 -1
- package/styles/theme/hooks/useActiveBreakpoint.js +7 -2
- package/styles/theme/hooks/useMediaQuery.js +40 -7
- package/styles/theme/hooks/useResponsiveValue.js +23 -4
- package/styles/theme/hooks/useTheme.js +7 -2
- package/styles/theme/index.js +3 -1
- package/styles/theme/providers/ActiveBreakpointProvider.js +59 -6
- package/styles/theme/providers/ThemeProvider.js +22 -2
- package/styles/tss/index.js +21 -3
- package/tracking/action-creators/cookieConsent.js +41 -5
- package/tracking/action-creators/index.js +1 -1
- package/tracking/actions/cookieConsent.js +89 -10
- package/tracking/actions/index.js +1 -1
- package/tracking/components/CookieConsentModal/connector.js +23 -3
- package/tracking/components/CookieConsentModal/index.js +142 -3
- package/tracking/components/CookieConsentModal/style.js +59 -1
- package/tracking/components/PrivacySettings/connector.js +23 -3
- package/tracking/components/PrivacySettings/index.js +154 -2
- package/tracking/components/PrivacySettings/style.js +45 -1
- package/tracking/components/index.js +2 -1
- package/tracking/constants/index.js +5 -1
- package/tracking/helpers/index.js +1 -1
- package/tracking/reducers/cookieConsentModal.js +28 -2
- package/tracking/reducers/cookieSettings.js +23 -2
- package/tracking/reducers/index.js +7 -1
- package/tracking/selectors/cookieConsent.js +69 -11
- package/tracking/selectors/index.js +2 -1
- package/tracking/streams/cookieConsent.js +101 -14
- package/tracking/streams/index.js +1 -1
- package/tracking/subscriptions/analytics.js +194 -7
- package/tracking/subscriptions/cookieConsent.js +62 -8
- package/tracking/subscriptions/index.js +6 -1
- package/user/index.js +25 -6
- package/user/selectors/data.js +15 -3
- package/user/selectors/login.js +15 -3
- package/types.js +0 -0
|
@@ -1,12 +1,44 @@
|
|
|
1
|
-
|
|
1
|
+
import { availabilityTypes, AVAILABILITY_TYPE_NOT_AVAILABLE, AVAILABILITY_TYPE_AVAILABLE, AVAILABILITY_TYPE_COMING_SOON } from "../../product/constants";
|
|
2
|
+
|
|
3
|
+
/**
|
|
2
4
|
* Takes the location stock info settings and finds the matching settings for the given inventory.
|
|
3
5
|
* @param {Object} settings The settings find a match in.
|
|
4
6
|
* @param {Object|null} location The location object.
|
|
5
7
|
* @param {Object|null} productInventory The product inventory.
|
|
6
8
|
* @returns {Object}
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
*/
|
|
10
|
+
export default (settings, location, productInventory) => {
|
|
11
|
+
if (location?.isComingSoon) {
|
|
12
|
+
return settings[AVAILABILITY_TYPE_COMING_SOON];
|
|
13
|
+
}
|
|
14
|
+
if (!productInventory) {
|
|
15
|
+
return {};
|
|
16
|
+
}
|
|
17
|
+
const {
|
|
18
|
+
isAvailable = false,
|
|
19
|
+
visible = 0
|
|
20
|
+
} = productInventory;
|
|
21
|
+
if (isAvailable === false) {
|
|
22
|
+
return settings[AVAILABILITY_TYPE_NOT_AVAILABLE];
|
|
23
|
+
}
|
|
24
|
+
if (visible === null) {
|
|
25
|
+
return {
|
|
26
|
+
...settings[AVAILABILITY_TYPE_AVAILABLE],
|
|
27
|
+
availabilityText: 'locations.stock_info.available'
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Filter by inventory blind and visible inventory (must match both).
|
|
32
|
+
const matchingTypes = availabilityTypes.filter(type => !settings[type].comingSoon).filter(type =>
|
|
33
|
+
// When inventory blind is set in the current availability setting, then this should also
|
|
34
|
+
// account for the inventory blind from the given store. Ignore inventory blind otherwise.
|
|
35
|
+
!settings[type].includeInventoryBlind || settings[type].includeInventoryBlind && !!visible).filter(type =>
|
|
36
|
+
// Don't filter, when inventoryBlind filter is already active
|
|
37
|
+
settings[type].includeInventoryBlind ||
|
|
38
|
+
// Also, inventory must be truthy or 0, or otherwise there is nothing to search for.
|
|
39
|
+
visible >= settings[type].visibleInventoryFrom && (settings[type].visibleInventoryTo === null || visible <= settings[type].visibleInventoryTo));
|
|
40
|
+
if (matchingTypes.length > 0) {
|
|
41
|
+
return settings[matchingTypes[0]];
|
|
42
|
+
}
|
|
43
|
+
return {};
|
|
44
|
+
};
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
export{default as createOrder}from"./createOrder";
|
|
1
|
+
export { default as createOrder } from "./createOrder";
|
|
2
|
+
export { default as getAvailabilitySettings } from "./getAvailabilitySettings";
|
|
3
|
+
export { isProductAvailable } from "./productInventory";
|
|
4
|
+
export * from "./showInventoryInLists";
|
|
@@ -3,5 +3,24 @@
|
|
|
3
3
|
* @param {Object} location The location to check.
|
|
4
4
|
* @param {Object} inventory The location inventory to check.
|
|
5
5
|
* @returns {boolean}
|
|
6
|
-
*/
|
|
7
|
-
|
|
6
|
+
*/
|
|
7
|
+
export function isProductAvailable(location = {}, inventory = {}) {
|
|
8
|
+
const {
|
|
9
|
+
isComingSoon
|
|
10
|
+
} = location || {};
|
|
11
|
+
const {
|
|
12
|
+
isAvailable = false,
|
|
13
|
+
visible = 0
|
|
14
|
+
} = inventory || {};
|
|
15
|
+
if (isComingSoon) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
if (isAvailable === false) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
if (visible === null) {
|
|
22
|
+
// Blind mode
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
return visible > 0;
|
|
26
|
+
}
|
|
@@ -1,7 +1,33 @@
|
|
|
1
|
-
import{setABFeatureFlag,isFeatureEnabled}from'@shopgate/engage/core';
|
|
1
|
+
import { setABFeatureFlag, isFeatureEnabled } from '@shopgate/engage/core';
|
|
2
|
+
import appConfig from '@shopgate/pwa-common/helpers/config';
|
|
3
|
+
import { getProductListShowInventory } from "../../core/selectors";
|
|
4
|
+
const STORE_KEY = 'showInventoryInLists.v1';
|
|
5
|
+
let enabled = null;
|
|
6
|
+
|
|
7
|
+
/**
|
|
2
8
|
* @param {Object} state state
|
|
3
9
|
* @returns {boolean}
|
|
4
|
-
*/
|
|
5
|
-
|
|
10
|
+
*/
|
|
11
|
+
export function showInventoryInLists(state) {
|
|
12
|
+
const config = getProductListShowInventory(state);
|
|
13
|
+
if (!config) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
if (enabled === null) {
|
|
17
|
+
// activate feature for x percent of user
|
|
18
|
+
const percentage = appConfig?.featureFlagPercentages?.showInventoryInLists || 100;
|
|
19
|
+
enabled = isFeatureEnabled(STORE_KEY, percentage);
|
|
20
|
+
}
|
|
21
|
+
return enabled;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
6
25
|
* @param {Object} state state
|
|
7
|
-
*/
|
|
26
|
+
*/
|
|
27
|
+
export function setShowInventoryInLists(state) {
|
|
28
|
+
const config = getProductListShowInventory(state);
|
|
29
|
+
if (!config) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
setABFeatureFlag(STORE_KEY);
|
|
33
|
+
}
|
package/locations/index.js
CHANGED
|
@@ -1,9 +1,42 @@
|
|
|
1
1
|
// ACTIONS
|
|
2
|
-
export{fetchProductLocations}from"./actions"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
export { fetchProductLocations } from "./actions";
|
|
3
|
+
|
|
4
|
+
// COMPONENTS
|
|
5
|
+
export { FulfillmentSelector, FulfillmentSheet, FulfillmentPathSelector, StoreList, StoreAddress, StoreOpeningHours, StorePhoneNumber, CartItemProductChangeLocation, CartChangeFulfillmentMethod, CartContextMenuItemChangeLocation, CartContextMenuItemChangeFulfillment, CartContextMenuChangeFulfillment, GlobalLocationSelector, GlobalLocationSwitcher, FulfillmentSlotSwitcher, StoreFinder, StockInfoLists } from "./components";
|
|
6
|
+
|
|
7
|
+
// CONSTANTS
|
|
8
|
+
export { PRODUCT_FULFILLMENT_SELECTOR, PRODUCT_LOCATION_STOCK_INFO, DIRECT_SHIP, DIRECT_SHIP_LABEL, IN_STORE_PICKUP_BOPIS_LABEL, IN_STORE_PICKUP_ROPIS_LABEL, ROPIS, BOPIS, DEFAULT_ROPE_FULFILLMENT_METHOD, QUICK_RESERVE, MULTI_LINE_RESERVE, STAGE_SELECT_STORE, STAGE_RESERVE_FORM, STAGE_RESPONSE_SUCCESS, STAGE_RESPONSE_ERROR, STAGE_FULFILLMENT_METHOD, STORE_FINDER_PATTERN } from "./constants";
|
|
9
|
+
|
|
10
|
+
// SELECTORS
|
|
11
|
+
export * from "./selectors";
|
|
12
|
+
|
|
13
|
+
// STREAMS
|
|
14
|
+
export { submitReservationSuccess$, preferredLocationDidUpdate$, preferredLocationDidUpdateGlobal$, preferredLocationDidUpdateGlobalNotOnCategory$, preferredLocationDidUpdateGlobalOnCategory$, preferredLocationDidUpdateGlobalNotOnSearch$, preferredLocationDidUpdateGlobalOnSearch$, sendDefaultLocationCodeSuccess$ } from "./locations.streams";
|
|
15
|
+
|
|
16
|
+
// HOOKS
|
|
17
|
+
export { useFulfillmentState } from "./locations.hooks";
|
|
18
|
+
|
|
19
|
+
// TYPES
|
|
20
|
+
export
|
|
21
|
+
/** @typedef {import('./locations.types').LocationAddress} */
|
|
22
|
+
/** @typedef {import('./locations.types').Location} */
|
|
23
|
+
/** @typedef {import('./locations.types').LocationsByIdState} */
|
|
24
|
+
/** @typedef {import('./locations.types').LocationsByProductIdState} */
|
|
25
|
+
/** @typedef {import('./locations.types').FulfillmentPath} */
|
|
26
|
+
/** @typedef {import('./locations.types').UserLocationState} */
|
|
27
|
+
/** @typedef {import('./locations.types').ReservationFormValues} */
|
|
28
|
+
/** @typedef {import('./locations.types').UserLocationFulfillmentMethod} */
|
|
29
|
+
/** @typedef {import('./locations.types').UserLocationLocationCode} */
|
|
30
|
+
/** @typedef {import('./locations.types').UserFormInputState} */
|
|
31
|
+
/** @typedef {import('./locations.types').LocationsState} */
|
|
32
|
+
/** @typedef {import('./locations.types').SheetStage} */
|
|
33
|
+
/** @typedef {import('./locations.types').SheetCallbackFn} */
|
|
34
|
+
/** @typedef {import('./locations.types').SheetOpenParams} */
|
|
35
|
+
/** @typedef {import('./locations.types').ReservationResponse} */
|
|
36
|
+
/** @typedef {import('./locations.types').LocationOperationHours} */
|
|
37
|
+
/** @typedef {import('./locations.types').LocationAware} */
|
|
38
|
+
/** @typedef {import('./locations.types').OptionalLocationAware} */
|
|
39
|
+
{} from "./locations.types";
|
|
40
|
+
|
|
8
41
|
// CONTEXT
|
|
9
|
-
export{FulfillmentContext}from"./locations.context";
|
|
42
|
+
export { FulfillmentContext } from "./locations.context";
|
|
@@ -1 +1,78 @@
|
|
|
1
|
-
import{createContext}from'react';
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
import { STAGE_SELECT_STORE } from "./constants";
|
|
3
|
+
/* eslint-disable max-len */
|
|
4
|
+
/** @typedef {import('@shopgate/engage/locations/locations.types').Location} Location */
|
|
5
|
+
/** @typedef {import('@shopgate/engage/locations/locations.types').ReservationFormValues} ReservationFormValues */
|
|
6
|
+
/** @typedef {import('@shopgate/engage/locations/locations.types').SheetStage} SheetStage */
|
|
7
|
+
/** @typedef {import('@shopgate/engage/locations/locations.types').FulfillmentPath} FulfillmentPath */
|
|
8
|
+
/** @typedef {import('@shopgate/engage/locations/locations.types').SheetOpenParams} SheetOpenParams */
|
|
9
|
+
/** @typedef {import('@shopgate/engage/locations/locations.types').SheetCallbackFn} SheetCallbackFn */
|
|
10
|
+
/** @typedef {import('../product/product.types').Product} Product */
|
|
11
|
+
/** @typedef {import('../core/config/config.types').ShopSettings} ShopSettings */
|
|
12
|
+
/* eslint-enable max-len */
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @typedef {Object} FulfillmentContextProps
|
|
16
|
+
* @property {function(Location): Promise<void>} selectLocation
|
|
17
|
+
* @property {function(Location): void} selectStoreFinderLocation
|
|
18
|
+
* @property {(method: string, cartItem: Object<string, any>) => void} changeFulfillment
|
|
19
|
+
* @property {function(ReservationFormValues): Promise<void>} sendReservation
|
|
20
|
+
* @property {function(SheetStage): boolean} isStage
|
|
21
|
+
* @property {function(SheetOpenParams): void} handleOpen
|
|
22
|
+
* @property {(isLoading: boolean) => void} setIsLoading
|
|
23
|
+
* @property {SheetCallbackFn} handleClose
|
|
24
|
+
* @property {Location|null} location
|
|
25
|
+
* @property {Location|null} storeFinderLocation
|
|
26
|
+
* @property {Location[]|null} locations
|
|
27
|
+
* @property {string[]|null} orderNumbers
|
|
28
|
+
* @property {Product|null} baseProduct
|
|
29
|
+
* @property {Product|null} product
|
|
30
|
+
* @property {ReservationFormValues|null} userInput
|
|
31
|
+
* @property {SheetStage|null} stage
|
|
32
|
+
* @property {string|null} title
|
|
33
|
+
* @property {FulfillmentPath|null} fulfillmentPath
|
|
34
|
+
* @property {string[]|null} fulfillmentMethods
|
|
35
|
+
* @property {string[]|null} enabledFulfillmentMethods
|
|
36
|
+
* @property {ShopSettings|null} shopSettings
|
|
37
|
+
* @property {boolean} isOpen
|
|
38
|
+
* @property {string[]|null} errors
|
|
39
|
+
* @property {boolean} [noLocationSelection]
|
|
40
|
+
* @property {boolean} [isStoreFinder]
|
|
41
|
+
* @property {boolean} [isLoading]
|
|
42
|
+
* @property {Object} [meta]
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
export const FulfillmentContext = /*#__PURE__*/createContext(/** @type {FulfillmentContextProps} */{
|
|
46
|
+
selectLocation: () => Promise.resolve(),
|
|
47
|
+
selectStoreFinderLocation: () => {},
|
|
48
|
+
changeFulfillment: () => {},
|
|
49
|
+
sendReservation: () => Promise.resolve(),
|
|
50
|
+
isStage: () => false,
|
|
51
|
+
handleOpen: () => {},
|
|
52
|
+
handleClose: () => {},
|
|
53
|
+
setIsLoading: () => {},
|
|
54
|
+
location: null,
|
|
55
|
+
storeFinderLocation: null,
|
|
56
|
+
locations: [],
|
|
57
|
+
orderNumbers: [],
|
|
58
|
+
baseProduct: null,
|
|
59
|
+
product: null,
|
|
60
|
+
userInput: null,
|
|
61
|
+
stage: STAGE_SELECT_STORE,
|
|
62
|
+
title: null,
|
|
63
|
+
fulfillmentPath: null,
|
|
64
|
+
fulfillmentMethods: null,
|
|
65
|
+
enabledFulfillmentMethods: null,
|
|
66
|
+
shopSettings: null,
|
|
67
|
+
isOpen: false,
|
|
68
|
+
errors: null,
|
|
69
|
+
noLocationSelection: false,
|
|
70
|
+
isStoreFinder: false,
|
|
71
|
+
isLoading: false
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @typedef {Object} StoreFinderContextProps
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
export const StoreFinderContext = /*#__PURE__*/createContext(/** @type {StoreFinderContextProps} */{});
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import*as React from'react';
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { FulfillmentContext } from "./locations.context";
|
|
3
|
+
|
|
4
|
+
/**
|
|
2
5
|
* Returns the fulfillment context state.
|
|
3
6
|
* @returns {Object} The fulfillment context state.
|
|
4
|
-
*/
|
|
7
|
+
*/
|
|
8
|
+
export function useFulfillmentState() {
|
|
9
|
+
return React.useContext(FulfillmentContext);
|
|
10
|
+
}
|
|
@@ -1,3 +1,175 @@
|
|
|
1
|
-
|
|
1
|
+
import { main$ } from '@shopgate/pwa-common/streams';
|
|
2
|
+
import { Observable } from 'rxjs/Observable';
|
|
3
|
+
import { cartReceived$ } from '@shopgate/pwa-common-commerce/cart/streams';
|
|
4
|
+
import { makeGetRoutePattern, getCurrentState, getCurrentRoute } from '@shopgate/pwa-common/selectors/router';
|
|
5
|
+
import { routeWillEnter$ } from '@shopgate/pwa-common/streams/router';
|
|
6
|
+
import { ITEM_PATTERN } from '@shopgate/pwa-common-commerce/product/constants';
|
|
7
|
+
import { getProductDataById } from '@shopgate/pwa-common-commerce/product/selectors/product';
|
|
8
|
+
import { SEARCH_PATTERN } from '@shopgate/pwa-common-commerce/search/constants';
|
|
9
|
+
import { CATEGORY_PATTERN } from '@shopgate/pwa-common-commerce/category/constants';
|
|
10
|
+
import { FAVORITES_PATH } from '@shopgate/pwa-common-commerce/favorites/constants';
|
|
11
|
+
import { SUBMIT_RESERVATION_SUCCESS, RECEIVE_PRODUCT_LOCATIONS, RECEIVE_LOCATIONS, SET_USER_SEARCH_COUNTRY_CODE, SET_USER_SEARCH_POSTAL_CODE, SET_USER_SEARCH_GEOLOCATION, SET_STORE_FINDER_SEARCH_RADIUS, SELECT_GLOBAL_LOCATION, STORE_FINDER_PATTERN, PROVIDE_PRODUCT_ALTERNATIVE_LOCATION, SELECT_LOCATION, STORE_DETAILS_PATTERN, SEND_SET_DEFAULT_LOCATION_CODE_SUCCESS } from "./constants";
|
|
12
|
+
import { RECEIVE_ORDER_DETAILS } from "../orders/constants";
|
|
13
|
+
import { WISH_LIST_PATH } from "../account/constants";
|
|
14
|
+
export const submitReservationSuccess$ = main$.filter(({
|
|
15
|
+
action
|
|
16
|
+
}) => action.type === SUBMIT_RESERVATION_SUCCESS);
|
|
17
|
+
export const receiveProductLocations$ = main$.filter(({
|
|
18
|
+
action
|
|
19
|
+
}) => action.type === RECEIVE_PRODUCT_LOCATIONS);
|
|
20
|
+
export const receiveOrderDetails$ = main$.filter(({
|
|
21
|
+
action
|
|
22
|
+
}) => action.type === RECEIVE_ORDER_DETAILS);
|
|
23
|
+
export const cartReceivedWithROPE$ = cartReceived$.filter(({
|
|
24
|
+
action: {
|
|
25
|
+
cart: {
|
|
26
|
+
cartItems = []
|
|
27
|
+
} = {}
|
|
28
|
+
}
|
|
29
|
+
}) => cartItems.some(item => item?.fulfillment?.location?.code));
|
|
30
|
+
export const userSearchChanged$ = main$.filter(({
|
|
31
|
+
action
|
|
32
|
+
}) => action.type === SET_USER_SEARCH_COUNTRY_CODE || action.type === SET_USER_SEARCH_POSTAL_CODE || action.type === SET_USER_SEARCH_GEOLOCATION || action.type === SET_STORE_FINDER_SEARCH_RADIUS);
|
|
33
|
+
export const fulfillmentLocationsReceivedFromProduct$ = receiveProductLocations$.switchMap(data => {
|
|
34
|
+
const {
|
|
35
|
+
action: {
|
|
36
|
+
locations
|
|
37
|
+
}
|
|
38
|
+
} = data;
|
|
39
|
+
const locationCodes = locations.map(({
|
|
40
|
+
code
|
|
41
|
+
}) => code);
|
|
42
|
+
return Observable.of({
|
|
43
|
+
...data,
|
|
44
|
+
locationCodes
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
export const fulfillmentLocationsReceivedFromCart$ = cartReceivedWithROPE$.switchMap(data => {
|
|
48
|
+
const {
|
|
49
|
+
action: {
|
|
50
|
+
cart: {
|
|
51
|
+
cartItems = []
|
|
52
|
+
} = {}
|
|
53
|
+
}
|
|
54
|
+
} = data;
|
|
55
|
+
let locationCodes = cartItems.map(item => item?.fulfillment?.location?.code).filter(Boolean);
|
|
56
|
+
locationCodes = Array.from(new Set(locationCodes));
|
|
57
|
+
return Observable.of({
|
|
58
|
+
...data,
|
|
59
|
+
locationCodes
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
export const fulfillmentLocationsReceivedFromOrder$ = receiveOrderDetails$.filter(({
|
|
63
|
+
action: {
|
|
64
|
+
order: {
|
|
65
|
+
lineItems = []
|
|
66
|
+
} = {}
|
|
67
|
+
}
|
|
68
|
+
}) => lineItems.some(item => item.fulfillmentLocationCode)).switchMap(data => {
|
|
69
|
+
const {
|
|
70
|
+
action: {
|
|
71
|
+
order: {
|
|
72
|
+
lineItems = []
|
|
73
|
+
} = {}
|
|
74
|
+
}
|
|
75
|
+
} = data;
|
|
76
|
+
let locationCodes = lineItems.map(item => item?.fulfillmentLocationCode).filter(Boolean);
|
|
77
|
+
locationCodes = Array.from(new Set(locationCodes));
|
|
78
|
+
return Observable.of({
|
|
79
|
+
...data,
|
|
80
|
+
locationCodes
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
export const fulfillmentLocationsReceived$ = fulfillmentLocationsReceivedFromCart$.merge(fulfillmentLocationsReceivedFromOrder$).merge(fulfillmentLocationsReceivedFromProduct$);
|
|
84
|
+
export const preferredLocationDidUpdateGlobal$ = main$.filter(({
|
|
85
|
+
action
|
|
86
|
+
}) => action.type === SELECT_GLOBAL_LOCATION);
|
|
87
|
+
export const preferredLocationDidUpdateGlobalOnWishlist$ = preferredLocationDidUpdateGlobal$.filter(({
|
|
88
|
+
getState
|
|
89
|
+
}) => {
|
|
90
|
+
const {
|
|
91
|
+
pattern
|
|
92
|
+
} = getCurrentRoute(getState());
|
|
93
|
+
return pattern === FAVORITES_PATH || pattern === WISH_LIST_PATH;
|
|
94
|
+
});
|
|
95
|
+
export const preferredLocationDidUpdateGlobalOnSearch$ = preferredLocationDidUpdateGlobal$.filter(({
|
|
96
|
+
getState
|
|
97
|
+
}) => {
|
|
98
|
+
const {
|
|
99
|
+
pattern
|
|
100
|
+
} = getCurrentRoute(getState());
|
|
101
|
+
return pattern === SEARCH_PATTERN;
|
|
102
|
+
});
|
|
103
|
+
export const preferredLocationDidUpdateGlobalNotOnSearch$ = preferredLocationDidUpdateGlobal$.filter(({
|
|
104
|
+
getState
|
|
105
|
+
}) => {
|
|
106
|
+
const {
|
|
107
|
+
pattern
|
|
108
|
+
} = getCurrentRoute(getState());
|
|
109
|
+
return pattern !== SEARCH_PATTERN;
|
|
110
|
+
});
|
|
111
|
+
export const preferredLocationDidUpdateGlobalOnCategory$ = preferredLocationDidUpdateGlobal$.filter(({
|
|
112
|
+
getState
|
|
113
|
+
}) => {
|
|
114
|
+
const {
|
|
115
|
+
pattern
|
|
116
|
+
} = getCurrentRoute(getState());
|
|
117
|
+
return pattern === CATEGORY_PATTERN;
|
|
118
|
+
});
|
|
119
|
+
export const preferredLocationDidUpdateGlobalNotOnCategory$ = preferredLocationDidUpdateGlobal$.filter(({
|
|
120
|
+
getState
|
|
121
|
+
}) => {
|
|
122
|
+
const {
|
|
123
|
+
pattern
|
|
124
|
+
} = getCurrentRoute(getState());
|
|
125
|
+
return pattern !== CATEGORY_PATTERN;
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
/**
|
|
2
129
|
* Emits when users select a new location
|
|
3
|
-
*/
|
|
130
|
+
*/
|
|
131
|
+
export const preferredLocationDidUpdate$ = main$.filter(({
|
|
132
|
+
action
|
|
133
|
+
}) => action.type === SELECT_LOCATION);
|
|
134
|
+
export const storeFinderWillEnter$ = routeWillEnter$.filter(({
|
|
135
|
+
action
|
|
136
|
+
}) => action.route.pattern === STORE_FINDER_PATTERN);
|
|
137
|
+
export const receiveLocations$ = main$.filter(({
|
|
138
|
+
action
|
|
139
|
+
}) => action.type === RECEIVE_LOCATIONS);
|
|
140
|
+
export const provideAlternativeLocation$ = main$.filter(({
|
|
141
|
+
action
|
|
142
|
+
}) => action.type === PROVIDE_PRODUCT_ALTERNATIVE_LOCATION);
|
|
143
|
+
export const preferredLocationDidUpdateOnPDP$ = preferredLocationDidUpdateGlobal$.filter(({
|
|
144
|
+
getState
|
|
145
|
+
}) => {
|
|
146
|
+
const getRoutePattern = makeGetRoutePattern();
|
|
147
|
+
const routePattern = getRoutePattern(getState());
|
|
148
|
+
return routePattern === ITEM_PATTERN;
|
|
149
|
+
}).switchMap(({
|
|
150
|
+
dispatch,
|
|
151
|
+
getState,
|
|
152
|
+
action
|
|
153
|
+
}) => {
|
|
154
|
+
const state = getState();
|
|
155
|
+
const {
|
|
156
|
+
productId
|
|
157
|
+
} = getCurrentState(state);
|
|
158
|
+
const productData = getProductDataById(state, {
|
|
159
|
+
productId
|
|
160
|
+
});
|
|
161
|
+
return Observable.of({
|
|
162
|
+
action: {
|
|
163
|
+
...action,
|
|
164
|
+
productData
|
|
165
|
+
},
|
|
166
|
+
dispatch,
|
|
167
|
+
getState
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
export const storeDetailPageWillEnter$ = routeWillEnter$.filter(({
|
|
171
|
+
action
|
|
172
|
+
}) => action.route.pattern === STORE_DETAILS_PATTERN);
|
|
173
|
+
export const sendDefaultLocationCodeSuccess$ = main$.filter(({
|
|
174
|
+
action
|
|
175
|
+
}) => action.type === SEND_SET_DEFAULT_LOCATION_CODE_SUCCESS);
|
|
@@ -1 +1,170 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} LocationType
|
|
3
|
+
* @property {string} code
|
|
4
|
+
* @property {string} name
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @typedef {Object} LocationOperationHours
|
|
9
|
+
* @property {string|null} sun
|
|
10
|
+
* @property {string|null} mon
|
|
11
|
+
* @property {string|null} tue
|
|
12
|
+
* @property {string|null} wed
|
|
13
|
+
* @property {string|null} thu
|
|
14
|
+
* @property {string|null} fri
|
|
15
|
+
* @property {string|null} sat
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @typedef {Object} LocationProductInventory
|
|
20
|
+
* @property {boolean} isAvailable
|
|
21
|
+
* @property {number|null} visible
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @typedef {Object} LocationAddress
|
|
26
|
+
* @property {string} code
|
|
27
|
+
* @property {string} name
|
|
28
|
+
* @property {string} street
|
|
29
|
+
* @property {string|null} street2
|
|
30
|
+
* @property {string|null} street3
|
|
31
|
+
* @property {string|null} street4
|
|
32
|
+
* @property {string} postalCode
|
|
33
|
+
* @property {string} city
|
|
34
|
+
* @property {string} region
|
|
35
|
+
* @property {string} country
|
|
36
|
+
* @property {string} [phoneNumber]
|
|
37
|
+
* @property {string} [faxNumber]
|
|
38
|
+
* @property {string} [emailAddress]
|
|
39
|
+
* @property {boolean} isPrimary
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @typedef {Object} Location
|
|
44
|
+
* @property {string|null} code
|
|
45
|
+
* @property {string|null} name
|
|
46
|
+
* @property {string} [status]
|
|
47
|
+
* @property {string[]} [supportedFulfillmentMethods]
|
|
48
|
+
* @property {number} [latitude]
|
|
49
|
+
* @property {number} [longitude]
|
|
50
|
+
* @property {string} [timeZone]
|
|
51
|
+
* @property {string} [localeCode]
|
|
52
|
+
* @property {boolean} [isComingSoon]
|
|
53
|
+
* @property {boolean} [isDefault]
|
|
54
|
+
* @property {LocationType} [type]
|
|
55
|
+
* @property {LocationOperationHours} [operationHours]
|
|
56
|
+
* @property {LocationAddress} [address]
|
|
57
|
+
* @property {LocationAddress[]} [addresses]
|
|
58
|
+
* @property {LocationProductInventory} [productInventory]
|
|
59
|
+
* @property {number} [distance]
|
|
60
|
+
* @property {string} [unitSystem]
|
|
61
|
+
* @property {Object} [inventory]
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @typedef {Object} LocationAware
|
|
66
|
+
* @property {Location} location
|
|
67
|
+
* @property {string|null} [fulfillmentMethod]
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @typedef {Object} OptionalLocationAware
|
|
72
|
+
* @property {Location|null} [location]
|
|
73
|
+
* @property {string|null} [fulfillmentMethod]
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @typedef {Object} ProductLocations
|
|
78
|
+
* @property {boolean} isFetching
|
|
79
|
+
* @property {number} expires
|
|
80
|
+
* @property {Location[]} locations
|
|
81
|
+
*/
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @typedef {Object<string, Location>} LocationsByIdState
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @typedef {Object<string, ProductLocations>} LocationsByProductIdState
|
|
89
|
+
*/
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @typedef {Object} UserLocationState
|
|
93
|
+
* @property {string|null} code
|
|
94
|
+
* @property {string|null} name
|
|
95
|
+
* @property {string|null} productCode
|
|
96
|
+
* @property {number|null} visibleInventory
|
|
97
|
+
* @property {string|null} addressCode
|
|
98
|
+
* @property {string|null} fulfillmentMethod
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* @typedef {Object} ReservationFormValues
|
|
103
|
+
* @property {string} [firstName]
|
|
104
|
+
* @property {string} [lastName]
|
|
105
|
+
* @property {string} [cellPhone]
|
|
106
|
+
* @property {string} [email]
|
|
107
|
+
* @property {string} [firstName2]
|
|
108
|
+
* @property {string} [lastName2]
|
|
109
|
+
* @property {string} [cellPhone2]
|
|
110
|
+
* @property {string} [email2]
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @typedef {Object<string, string|null>} UserFormInputState
|
|
115
|
+
*/
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @typedef {(
|
|
119
|
+
* typeof import('./constants').QUICK_RESERVE |
|
|
120
|
+
* typeof import('./constants').MULTI_LINE_RESERVE
|
|
121
|
+
* )} FulfillmentPath
|
|
122
|
+
*/
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @callback SheetCallbackFn
|
|
126
|
+
* @param {import('../../locations.types').Location | null} location
|
|
127
|
+
* @param {string | null} productId
|
|
128
|
+
* @param {boolean | null} orderSuccess
|
|
129
|
+
* @returns {void}
|
|
130
|
+
*/
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @typedef {(typeof DIRECT_SHIP | typeof ROPIS| typeof BOPIS)} UserLocationFulfillmentMethod
|
|
134
|
+
*/
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @typedef {string | null} UserLocationLocationCode
|
|
138
|
+
*/
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @typedef {Object} LocationsState
|
|
142
|
+
* @property {LocationsByIdState|{}} locationsById
|
|
143
|
+
* @property {LocationsByProductIdState|{}} locationsByProductId
|
|
144
|
+
* @property {UserLocationState|{}} userLocation
|
|
145
|
+
* @property {ReservationFormValues} userFormInput
|
|
146
|
+
* @property {string} userSearchQuery
|
|
147
|
+
*/
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @typedef {(
|
|
151
|
+
* typeof import('./constants').STAGE_SELECT_STORE |
|
|
152
|
+
* typeof import('./constants').STAGE_RESERVE_FORM |
|
|
153
|
+
* typeof import('./constants').STAGE_RESPONSE_SUCCESS |
|
|
154
|
+
* typeof import('./constants').STAGE_RESPONSE_ERROR
|
|
155
|
+
* )} SheetStage
|
|
156
|
+
*/
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* @typedef {Object} SheetOpenParams
|
|
160
|
+
* @property {SheetCallbackFn} [callback]
|
|
161
|
+
* @property {SheetStage} [stage]
|
|
162
|
+
* @property {FulfillmentPath} [fulfillmentPath]
|
|
163
|
+
* @property {boolean} [changeOnly]
|
|
164
|
+
*/
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* @typedef {Object} ReservationResponse
|
|
168
|
+
* @property {string[]|null} orderNumbers
|
|
169
|
+
* @property {string[]|null} errors
|
|
170
|
+
*/
|