@shopgate/engage 7.12.7-beta.1 → 7.20.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/a11y/components/Section/index.js +2 -2
- package/a11y/components/VisuallyHidden/index.js +8 -0
- package/a11y/components/index.js +1 -0
- package/a11y/constants/index.js +1 -0
- package/a11y/helpers/index.js +1 -0
- package/a11y/index.js +1 -4
- package/account/actions/addContacts.js +2 -2
- package/account/actions/deleteContact.js +2 -2
- package/account/actions/deleteCustomer.js +2 -2
- package/account/actions/fetchContacts.js +2 -2
- package/account/actions/fetchCustomer.js +2 -2
- package/account/actions/updateContact.js +2 -2
- package/account/actions/updateCustomer.js +2 -2
- package/account/components/Account/Account.js +1 -1
- package/account/components/Account/Account.style.js +1 -1
- package/account/components/Profile/Profile.provider.js +3 -3
- package/account/components/ProfileContact/ProfileContact.js +1 -1
- package/account/reducers/index.js +1 -1
- package/app-rating/action-creators/appStart.js +3 -3
- package/app-rating/action-creators/ordersPlaced.js +3 -3
- package/app-rating/action-creators/popup.js +4 -4
- package/app-rating/action-creators/timer.js +3 -3
- package/app-rating/actions/showModal.js +6 -6
- package/app-rating/constants/index.js +2 -2
- package/app-rating/reducers/index.js +2 -2
- package/app-rating/subscriptions/index.js +4 -4
- package/back-in-stock/actions/index.js +14 -0
- package/back-in-stock/components/BackInStockButton/connector.js +1 -0
- package/back-in-stock/components/BackInStockButton/index.js +14 -0
- package/back-in-stock/components/BackInStockButton/style.js +1 -0
- package/back-in-stock/components/CharacteristicsButton/connector.js +3 -0
- package/back-in-stock/components/CharacteristicsButton/index.js +8 -0
- package/back-in-stock/components/ProductInfoBackInStockButton/connector.js +3 -0
- package/back-in-stock/components/ProductInfoBackInStockButton/index.js +10 -0
- package/back-in-stock/components/Subscriptions/components/List/index.js +4 -0
- package/back-in-stock/components/Subscriptions/components/Subscription/index.js +7 -0
- package/back-in-stock/components/Subscriptions/index.js +4 -0
- package/back-in-stock/components/index.js +1 -0
- package/back-in-stock/constants/Actions.js +1 -0
- package/back-in-stock/constants/Common.js +1 -0
- package/back-in-stock/constants/Pipelines.js +1 -0
- package/back-in-stock/constants/Portals.js +9 -0
- package/back-in-stock/constants/index.js +1 -0
- package/back-in-stock/hooks/index.js +4 -0
- package/back-in-stock/providers/BackInStockSubscriptionsProvider.connector.js +7 -0
- package/back-in-stock/providers/BackInStockSubscriptionsProvider.js +5 -0
- package/back-in-stock/providers/index.js +1 -0
- package/back-in-stock/reducers/index.js +5 -0
- package/back-in-stock/selectors/index.js +43 -0
- package/back-in-stock/streams/index.js +1 -0
- package/back-in-stock/subscriptions/index.js +11 -0
- package/cart/cart.helpers.js +9 -2
- package/cart/components/CartItem/CartItemCoupon.js +10 -6
- package/cart/components/CartItem/CartItemCouponCode.js +2 -2
- package/cart/components/CartItem/CartItemCouponDelete.js +1 -1
- package/cart/components/CartItem/CartItemCouponFreeShipping.js +1 -1
- package/cart/components/CartItem/CartItemCouponIcon.js +2 -2
- package/cart/components/CartItem/CartItemCouponLayout.style.js +5 -1
- package/cart/components/CartItem/CartItemCouponTitle.js +2 -2
- package/cart/components/CartItem/CartItemProductLayout.js +4 -2
- package/cart/components/CartItem/CartItemProductLayoutWide.style.js +1 -1
- package/cart/components/CartItem/CartItemProductTitle.js +2 -2
- package/cart/components/CartItem/CartItemQuantityPicker.js +26 -14
- package/cart/components/CartItem/CartItemSubstitution.js +1 -1
- package/cart/components/CartItems/CartItemCardReservation.js +1 -1
- package/cart/components/CartItems/CartItemGroupReservation.js +1 -1
- package/cart/components/CartSummaryWide/CartSummaryWideCheckoutButton.style.js +1 -1
- package/cart/components/PaymentBar/PaymentBar.js +1 -1
- package/cart/components/PaymentBar/PaymentBarCheckoutButton.style.js +1 -1
- package/cart/components/PaymentBar/PaymentBarPromotionCouponMessages.js +1 -1
- package/cart/index.js +3 -2
- package/cart/streams/index.js +1 -0
- package/category/actions/index.js +1 -0
- package/category/components/CategoryList/index.js +7 -0
- package/category/components/CategoryList/style.js +1 -0
- package/category/components/index.js +1 -1
- package/category/constants/index.js +1 -0
- package/category/helpers/index.js +1 -0
- package/category/index.js +1 -6
- package/category/selectors/index.js +2 -0
- package/category/streams/index.js +1 -1
- package/checkout/actions/errorCheckout.js +1 -1
- package/checkout/actions/fetchCheckoutOrder.js +1 -1
- package/checkout/actions/fetchPaymentMethods.js +1 -1
- package/checkout/actions/initializeCheckout.js +1 -1
- package/checkout/actions/prepareCheckout.js +2 -2
- package/checkout/actions/submitCheckoutOrder.js +1 -1
- package/checkout/actions/updateCheckoutOrder.js +1 -1
- package/checkout/components/Checkout/CheckoutPickupContactForm.config.js +1 -1
- package/checkout/components/Checkout/CheckoutSectionMessages.js +1 -1
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmation.js +1 -1
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmationBilledTo.js +1 -1
- package/checkout/components/GuestCheckout/GuestCheckoutPickupNotes.config.js +1 -1
- package/checkout/components/PaymentMethodButton/PaymentMethodButton.js +1 -1
- package/checkout/components/ShippingMethods/ShippingMethods.js +4 -4
- package/checkout/components/index.js +1 -1
- package/checkout/constants/index.js +1 -1
- package/checkout/index.js +3 -4
- package/checkout/paymentMethods/index.js +2 -2
- package/checkout/paymentMethods/paypal/PaypalButtonApp.js +1 -1
- package/checkout/paymentMethods/paypal/PaypalButtonWeb.js +1 -1
- package/checkout/paymentMethods/paypal/PaypalPayButton.js +1 -1
- package/checkout/paymentMethods/paypal/PaypalProvider.js +1 -1
- package/checkout/paymentMethods/stripe/StripeButton.js +2 -2
- package/checkout/paymentMethods/stripe/StripeCreditCard.js +3 -3
- package/checkout/paymentMethods/stripe/StripeProvider.js +8 -8
- package/checkout/paymentMethods/stripe/sdk.js +3 -2
- package/checkout/providers/AddressBookProvider.js +1 -1
- package/checkout/providers/CheckoutProvider.js +8 -8
- package/components/ChipLayout/index.js +38 -0
- package/components/ChipLayout/spec.js +5 -0
- package/components/ChipLayout/style.js +5 -0
- package/components/ConditionalWrapper/ConditionalWrapper.js +7 -2
- package/components/Footer/Footer.js +7 -7
- package/components/Form/Builder/Builder.js +50 -29
- package/components/Form/Builder/ElementCheckbox.js +1 -1
- package/components/Form/Builder/ElementMultiSelect.js +1 -1
- package/components/Form/Builder/ElementPhoneNumber.js +3 -3
- package/components/Form/Builder/ElementRadio.js +1 -1
- package/components/Form/Builder/ElementSelect.js +1 -1
- package/components/Form/Builder/ElementText.js +3 -3
- package/components/Form/Builder/classes/ActionListener.constants.js +2 -2
- package/components/Form/Builder/classes/ActionListener.js +73 -16
- package/components/Form/Builder/helpers/buildFormElements.js +2 -2
- package/components/Form/Form.js +8 -5
- package/components/IntersectionVisibility/index.js +14 -7
- package/components/Logo/connector.js +4 -0
- package/components/Logo/index.js +4 -0
- package/components/Logo/spec.js +1 -0
- package/components/Logo/style.js +1 -0
- package/components/Menu/components/Position/index.js +5 -5
- package/components/Menu/index.js +9 -9
- package/components/MessageBar/MessageBar.js +1 -1
- package/components/MessageBar/index.js +1 -1
- package/components/NavigationHandler/index.js +4 -4
- package/components/NavigationHandler/spec.js +1 -1
- package/components/Picker/components/Button/index.js +1 -1
- package/components/Picker/components/List/index.js +2 -2
- package/components/Picker/components/Modal/index.js +7 -7
- package/components/Picker/index.js +18 -9
- package/components/PickerUtilize/components/Button/index.js +5 -0
- package/components/PickerUtilize/components/Button/style.js +1 -0
- package/components/PickerUtilize/index.js +17 -0
- package/components/PickerUtilize/spec.js +1 -0
- package/components/PickerUtilize/style.js +1 -0
- package/components/QuantityInput/QuantityInput.js +5 -4
- package/components/Radio/Radio.js +1 -1
- package/components/RadioCard/RadioCard.js +1 -1
- package/components/RangeSlider/components/Handle/index.js +1 -1
- package/components/RangeSlider/index.js +36 -24
- package/components/ResponsiveContainer/ResponsiveContainer.js +2 -6
- package/components/ResponsiveContainer/breakpoints.js +2 -1
- package/components/ResponsiveContainer/hooks.js +20 -0
- package/components/ScrollHeader/index.js +2 -2
- package/components/ScrollHeader/style.js +1 -1
- package/components/SheetList/components/Item/index.js +5 -5
- package/components/SheetList/index.js +4 -4
- package/components/SideNavigation/SideNavigationCategories.connector.js +2 -2
- package/components/SnackBarContainer/index.js +5 -0
- package/components/Switch/index.js +12 -0
- package/components/Switch/style.js +1 -0
- package/components/Tabs/components/TabIndicator.js +2 -2
- package/components/Tabs/components/Tabs.js +1 -1
- package/components/TimeBoundary/index.js +8 -6
- package/components/VideoPlayer/index.js +9 -6
- package/components/View/components/Above/index.js +1 -1
- package/components/View/components/Below/index.js +1 -1
- package/components/View/components/Content/index.js +18 -11
- package/components/View/index.js +1 -1
- package/components/View/provider.js +22 -5
- package/components/index.js +2 -2
- package/core/action-creators/app.js +5 -0
- package/core/action-creators/appPermissions.js +9 -0
- package/core/action-creators/index.js +1 -1
- package/core/actions/getGeolocation.js +2 -2
- package/core/actions/grantAppTrackingTransparencyPermission.js +6 -0
- package/core/actions/grantCameraPermissions.js +1 -1
- package/core/actions/grantGeolocationPermissions.js +1 -1
- package/core/actions/grantPermissions.js +13 -6
- package/core/actions/grantPushPermissions.js +22 -0
- package/core/actions/index.js +7 -0
- package/core/actions/requestAppPermission.js +12 -0
- package/core/actions/requestAppPermissionStatus.js +12 -0
- package/core/classes/GeolocationRequest.js +2 -3
- package/core/classes/GeolocationRequestApp.js +6 -6
- package/core/classes/GeolocationRequestBrowser.js +2 -2
- package/core/classes/index.js +1 -0
- package/core/collections/AppInitialization.js +49 -0
- package/core/collections/index.js +1 -0
- package/core/commands/analyticsSetConsent.js +11 -0
- package/core/commands/index.js +1 -0
- package/core/config/ThemeConfigResolver.js +2 -2
- package/core/config/config.action-creators.js +1 -1
- package/core/config/config.actions.js +1 -1
- package/core/config/config.reducers.js +1 -1
- package/core/config/config.subscriptions.js +2 -2
- package/core/config/index.js +1 -1
- package/core/constants/actionTypes.js +1 -0
- package/core/constants/appFeatures.js +1 -0
- package/core/constants/index.js +6 -1
- package/core/contexts/index.js +1 -0
- package/core/helpers/appFeatures.js +15 -0
- package/core/helpers/appPermissions.js +43 -6
- package/core/helpers/baseUrl.js +14 -0
- package/core/helpers/environment.js +4 -0
- package/core/helpers/getFullImageSource.js +1 -1
- package/core/helpers/i18n.js +5 -3
- package/core/helpers/index.js +7 -0
- package/core/hocs/index.js +1 -0
- package/core/hocs/withCurrentProduct.js +6 -6
- package/core/hocs/withTheme.js +2 -2
- package/core/hooks/index.js +1 -0
- package/core/hooks/useAsyncMemo.js +1 -1
- package/core/hooks/useFormState.js +1 -1
- package/core/hooks/useScrollTo.js +1 -1
- package/core/hooks/useTheme.js +2 -2
- package/core/index.js +5 -52
- package/core/initialization/index.js +4 -2
- package/core/providers/AppProvider.js +10 -8
- package/core/providers/index.js +1 -0
- package/core/reducers/app.js +6 -0
- package/core/reducers/index.js +1 -1
- package/core/reducers/merchantSettings.js +1 -1
- package/core/reducers/shopSettings.js +1 -1
- package/core/selectors/app.js +9 -0
- package/core/selectors/index.js +6 -1
- package/core/streams/app.js +8 -0
- package/core/streams/appPermissions.js +19 -0
- package/core/streams/index.js +4 -0
- package/core/subscriptions/app.js +7 -0
- package/favorites/components/Item/Item.js +7 -7
- package/favorites/components/List/List.js +18 -7
- package/favorites/components/List/ListAccordionLabel.js +4 -0
- package/favorites/components/List/ListContent.js +8 -0
- package/favorites/components/List/ListItemWrapper.js +6 -0
- package/favorites/components/List/styles.js +1 -0
- package/favorites/components/Lists/Lists.js +5 -5
- package/favorites/components/Lists/ListsModal.js +3 -2
- package/favorites/constants/index.js +1 -0
- package/filter/actions/index.js +1 -0
- package/filter/components/PriceSlider/index.js +9 -9
- package/filter/components/PriceSlider/style.js +1 -3
- package/filter/components/index.js +1 -0
- package/filter/constants/index.js +1 -1
- package/filter/helpers/buildFilterParamsForFetchFiltersRequest.js +9 -0
- package/filter/helpers/buildInitialFilters.js +1 -1
- package/filter/helpers/buildUpdatedFilters.js +1 -1
- package/filter/helpers/index.js +1 -0
- package/filter/helpers/translateFilterLabel.js +6 -0
- package/filter/index.js +2 -7
- package/filter/providers/SortProvider.helpers.js +1 -1
- package/filter/selectors/index.js +1 -1
- package/filter/streams/index.js +1 -0
- package/i18n/locale/cs-cz/countries.json +255 -0
- package/i18n/locale/de-de/countries.json +26 -28
- package/i18n/locale/el-gr/countries.json +255 -0
- package/i18n/locale/en-us/countries.json +12 -14
- package/i18n/locale/es-es/countries.json +65 -67
- package/i18n/locale/fi-fi/countries.json +255 -0
- package/i18n/locale/fr-fr/countries.json +85 -87
- package/i18n/locale/hu-hu/countries.json +255 -0
- package/i18n/locale/it-it/countries.json +11 -13
- package/i18n/locale/nl-nl/countries.json +42 -44
- package/i18n/locale/pl-pl/countries.json +255 -0
- package/i18n/locale/pt-pt/countries.json +128 -130
- package/i18n/locale/ro-ro/countries.json +255 -0
- package/i18n/locale/sv-se/countries.json +255 -0
- package/locations/action-creators/receiveInventories.js +3 -5
- package/locations/actions/fetchFulfillmentSlots.js +1 -1
- package/locations/actions/fetchProductLocations.js +2 -2
- package/locations/actions/setUserGeolocation.js +1 -1
- package/locations/actions/setUserSearchGeolocation.js +1 -1
- package/locations/components/Cart/CartContextMenuChangeFulfillmentContent.js +1 -1
- package/locations/components/FulfillmentPath/FulfillmentPath.js +1 -1
- package/locations/components/FulfillmentPath/FulfillmentPathItem.js +2 -2
- package/locations/components/FulfillmentSelector/FulfillmentSelectorAddToCart.js +2 -2
- package/locations/components/FulfillmentSelector/FulfillmentSelectorAlternativeLocation.js +1 -1
- package/locations/components/FulfillmentSheet/FulfillmentSheet.js +2 -2
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotDialog.js +1 -1
- package/locations/components/ReserveForm/ReserveForm.js +1 -1
- package/locations/components/ReserveForm/ReserveFormPhone.js +1 -1
- package/locations/components/StockInfo/StockInfo.defaultSettings.js +1 -1
- package/locations/components/StoreFinder/StoreFinderMap.style.js +2 -2
- package/locations/components/StoreList/StoreListSearch.js +5 -3
- package/locations/locations.streams.js +1 -1
- package/locations/providers/FulfillmentProvider.js +4 -4
- package/locations/providers/StoreFinderProvider.js +1 -1
- package/locations/reducers/storage.js +3 -3
- package/locations/selectors/index.js +2 -2
- package/locations/subscriptions.js +13 -13
- package/login/components/ForgotPassword/ForgotPassword.js +1 -1
- package/orders/actions/cancelOrder.js +1 -1
- package/orders/actions/fetchOrderDetails.js +1 -1
- package/orders/constants/status.js +2 -2
- package/orders/index.js +1 -1
- package/orders/providers/OrderDetailsPrivateProvider.js +1 -1
- package/orders/providers/OrderDetailsProvider.js +3 -3
- package/package.json +8 -8
- package/page/actions/index.js +1 -0
- package/page/components/index.js +1 -0
- package/page/constants/index.js +1 -0
- package/page/index.js +2 -4
- package/page/selectors/index.js +7 -0
- package/product/collections/index.js +1 -0
- package/product/components/Availability/Availability.connector.js +4 -5
- package/product/components/Availability/Availability.js +3 -3
- package/product/components/Characteristics/Characteristic/components/Sheet/index.js +20 -0
- package/product/components/Characteristics/Characteristic/components/SheetItem/index.js +10 -0
- package/product/components/Characteristics/Characteristic/components/SheetItem/style.js +1 -0
- package/product/components/Characteristics/Characteristic/index.js +18 -0
- package/product/components/Characteristics/Characteristic/style.js +1 -0
- package/product/components/Characteristics/Swatch/index.js +12 -0
- package/product/components/Characteristics/Swatch/style.js +1 -0
- package/product/components/Characteristics/index.js +12 -0
- package/product/components/Characteristics/transition.js +1 -0
- package/product/components/Description/index.js +2 -2
- package/product/components/EffectivityDates/helpers.js +3 -3
- package/product/components/EffectivityDates/index.js +1 -1
- package/product/components/Header/PriceStriked/connector.js +9 -0
- package/product/components/Header/PriceStriked/index.js +5 -0
- package/product/components/Header/PriceStriked/style.js +1 -0
- package/product/components/Header/Shipping/components/Label/index.js +6 -0
- package/product/components/Header/Shipping/components/Label/style.js +1 -0
- package/product/components/Header/Shipping/connector.js +9 -0
- package/product/components/Header/Shipping/index.js +5 -0
- package/product/components/Header/Shipping/mock.js +1 -0
- package/product/components/Header/Shipping/spec.js +5 -0
- package/product/components/Header/Shipping/style.js +1 -0
- package/product/components/Header/Tiers/components/Tier/index.js +6 -0
- package/product/components/Header/Tiers/components/Tier/spec.js +1 -0
- package/product/components/Header/Tiers/connector.js +10 -0
- package/product/components/Header/Tiers/index.js +5 -0
- package/product/components/Header/Tiers/spec.js +1 -0
- package/product/components/Header/Tiers/style.js +1 -0
- package/product/components/Header/index.js +1 -0
- package/product/components/MapPriceHint/index.js +1 -1
- package/product/components/Media/FeaturedMedia.js +1 -1
- package/product/components/MediaSlider/index.js +1 -1
- package/product/components/Options/components/Content/connector.js +10 -0
- package/product/components/Options/components/Content/index.js +16 -0
- package/product/components/Options/components/Content/spec.js +2 -0
- package/product/components/Options/components/Option/index.js +4 -0
- package/product/components/Options/components/TextOption/components/OptionInfo/index.js +9 -0
- package/product/components/Options/components/TextOption/components/OptionInfo/spec.js +1 -0
- package/product/components/Options/components/TextOption/components/OptionInfo/style.js +1 -0
- package/product/components/Options/components/TextOption/index.js +22 -0
- package/product/components/Options/components/TextOption/style.js +1 -0
- package/product/components/Options/index.js +5 -0
- package/product/components/OrderQuantityHint/index.js +3 -2
- package/product/components/OrderQuantityHint/style.js +1 -1
- package/product/components/PriceDifference/index.js +1 -1
- package/product/components/ProductCard/index.js +2 -2
- package/product/components/ProductCharacteristics/helpers/index.js +1 -1
- package/product/components/ProductCharacteristics/index.js +28 -12
- package/product/components/ProductDiscountBadge/spec.js +1 -1
- package/product/components/ProductGridPrice/index.js +2 -2
- package/product/components/ProductImage/index.js +15 -12
- package/product/components/ProductList/components/Item/index.js +5 -0
- package/product/components/ProductList/components/Item/style.js +2 -0
- package/product/components/ProductList/components/Iterator/index.js +5 -0
- package/product/components/ProductList/components/Iterator/style.js +1 -0
- package/product/components/ProductList/components/Layout/index.js +5 -0
- package/product/components/ProductList/components/Layout/style.js +1 -0
- package/product/components/ProductList/index.js +5 -0
- package/product/components/ProductProperties/Content.js +1 -1
- package/product/components/ProductProperties/GroupedProperties.js +1 -1
- package/product/components/ProductProperties/ListsHTML.js +1 -1
- package/product/components/ProductProperties/ProductProperties.js +1 -1
- package/product/components/ProductProperties/RowHTML.js +1 -1
- package/product/components/ProductProperties/Wrapper.js +1 -1
- package/product/components/ProductProperties/style.js +1 -1
- package/product/components/ProductSlider/index.js +4 -0
- package/product/components/ProductSlider/spec.js +1 -0
- package/product/components/ProductSlider/style.js +1 -0
- package/product/components/QuantityPicker/hooks.js +5 -0
- package/product/components/QuantityPicker/index.js +2 -2
- package/product/components/Rating/connector.js +9 -0
- package/product/components/Rating/index.js +7 -0
- package/product/components/Rating/mock.js +5 -0
- package/product/components/Rating/spec.js +5 -0
- package/product/components/Rating/style.js +1 -0
- package/product/components/Swatch/SwatchContent.js +1 -1
- package/product/components/UnitQuantityPicker/CartUnitQuantityPicker.js +2 -2
- package/product/components/UnitQuantityPicker/ProductUnitQuantityPicker.js +3 -2
- package/product/components/UnitQuantityPicker/UnitQuantityPicker.js +6 -3
- package/product/components/UnitQuantityPicker/UnitQuantityPickerWithSection.js +7 -0
- package/product/components/UnitQuantityPicker/index.js +1 -1
- package/product/components/index.js +1 -0
- package/product/constants/index.js +1 -1
- package/product/contexts/index.js +1 -0
- package/product/helpers/index.js +2 -2
- package/product/helpers/redirects.js +1 -1
- package/product/hocs/index.js +1 -0
- package/product/hooks/index.js +1 -0
- package/product/index.js +4 -11
- package/product/providers/Product/connector.js +5 -0
- package/product/providers/Product/index.js +4 -0
- package/product/providers/index.js +1 -0
- package/product/selectors/product.js +24 -3
- package/product/selectors/variants.js +2 -2
- package/product/streams/index.js +1 -0
- package/push-opt-in/action-creators/index.js +1 -0
- package/push-opt-in/action-creators/optInTrigger.js +23 -0
- package/push-opt-in/action-creators/pushOptIn.js +7 -0
- package/push-opt-in/actions/index.js +1 -0
- package/push-opt-in/actions/pushOptInModal.js +8 -0
- package/push-opt-in/components/PushOptInModal/connector.js +9 -0
- package/push-opt-in/components/PushOptInModal/index.js +9 -0
- package/push-opt-in/components/PushOptInModal/push-opt-in.svg +62 -0
- package/push-opt-in/components/PushOptInModal/style.js +1 -0
- package/push-opt-in/components/index.js +1 -0
- package/push-opt-in/constants/index.js +1 -0
- package/push-opt-in/constants/optInModal.js +1 -0
- package/push-opt-in/constants/optInTrigger.js +1 -0
- package/push-opt-in/reducers/index.js +1 -0
- package/push-opt-in/reducers/optInModal.js +6 -0
- package/push-opt-in/reducers/optInTrigger.js +6 -0
- package/push-opt-in/selectors/index.js +1 -0
- package/push-opt-in/selectors/optInModal.js +8 -0
- package/push-opt-in/selectors/optInTrigger.js +5 -0
- package/push-opt-in/subscriptions/index.js +1 -0
- package/push-opt-in/subscriptions/optInTrigger.js +12 -0
- package/registration/components/index.js +1 -0
- package/registration/index.js +1 -1
- package/registration/providers/GuestRegistrationProvider.actions.js +2 -2
- package/registration/providers/GuestRegistrationProvider.js +3 -3
- package/registration/providers/RegistrationProvider.actions.js +3 -3
- package/registration/providers/RegistrationProvider.js +2 -2
- package/registration/subscriptions/index.js +1 -1
- package/reviews/actions/index.js +1 -0
- package/reviews/components/Reviews/components/Header/components/ReviewsExcerpt/index.js +1 -1
- package/reviews/components/Reviews/components/Header/components/ReviewsExcerpt/style.js +1 -2
- package/reviews/components/Reviews/components/List/index.js +3 -3
- package/reviews/components/Reviews/components/List/spec.js +1 -1
- package/reviews/components/Reviews/components/RatingCount/index.js +1 -1
- package/reviews/components/Reviews/components/RatingCount/style.js +1 -2
- package/reviews/components/Reviews/components/ReviewsInfo/index.js +1 -2
- package/reviews/components/Reviews/spec.js +1 -1
- package/reviews/components/index.js +1 -0
- package/reviews/constants/index.js +1 -0
- package/reviews/index.js +3 -7
- package/reviews/selectors/index.js +1 -0
- package/reviews/streams/index.js +1 -0
- package/scanner/action-creators/index.js +1 -0
- package/scanner/actions/index.js +1 -0
- package/scanner/classes/index.js +1 -0
- package/scanner/constants/index.js +1 -0
- package/scanner/helpers/index.js +1 -0
- package/scanner/index.js +1 -6
- package/scanner/streams/index.js +1 -0
- package/search/actions/index.js +1 -0
- package/search/constants/index.js +1 -0
- package/search/helpers/index.js +1 -0
- package/search/index.js +1 -6
- package/search/selectors/index.js +1 -0
- package/search/streams/index.js +1 -0
- package/styles/helpers/index.js +1 -0
- package/styles/helpers/initCSSCustomProperties.js +3 -3
- package/styles/helpers/loadCustomStyles.js +2 -2
- package/styles/helpers/setPageBackgroundColor.js +2 -1
- package/styles/helpers/setPageContentWidth.js +2 -1
- package/styles/index.js +1 -1
- package/tracking/action-creators/cookieConsent.js +24 -0
- package/tracking/action-creators/index.js +1 -4
- package/tracking/actions/cookieConsent.js +21 -0
- package/tracking/actions/index.js +1 -0
- package/tracking/components/CookieConsentModal/connector.js +6 -0
- package/tracking/components/CookieConsentModal/index.js +9 -0
- package/tracking/components/CookieConsentModal/style.js +1 -0
- package/tracking/components/CookieConsentModal/tracking-opt-in.svg +18 -0
- package/tracking/components/PrivacySettings/connector.js +6 -0
- package/tracking/components/PrivacySettings/index.js +4 -0
- package/tracking/components/PrivacySettings/style.js +1 -0
- package/tracking/components/index.js +1 -1
- package/tracking/constants/index.js +1 -1
- package/tracking/reducers/cookieConsentModal.js +6 -0
- package/tracking/reducers/cookieSettings.js +6 -0
- package/tracking/reducers/index.js +1 -0
- package/tracking/selectors/cookieConsent.js +35 -0
- package/tracking/selectors/index.js +1 -4
- package/tracking/streams/cookieConsent.js +46 -0
- package/tracking/streams/index.js +1 -1
- package/tracking/subscriptions/analytics.js +11 -0
- package/tracking/subscriptions/cookieConsent.js +13 -0
- package/tracking/subscriptions/index.js +1 -4
- package/components/MessageBar/MessageBar.types.js +0 -0
- package/components/MessageBar/style.js +0 -1
- package/i18n/locale/ru-ru/countries.json +0 -251
- package/product/components/Availability/Availability.types.js +0 -1
- package/product/components/QuantityPicker/helpers.js +0 -5
- package/tracking/components/CookieConsent/CookieConsent.connector.js +0 -4
- package/tracking/components/CookieConsent/CookieConsent.js +0 -4
- package/tracking/components/CookieConsent/CookieConsentButtons.js +0 -3
- package/tracking/components/CookieConsent/CookieConsentCheckboxes.js +0 -3
- package/tracking/components/CookieConsent/CookieConsentContent.js +0 -4
- package/tracking/components/CookieConsent/CookieConsentMessage.js +0 -4
- package/tracking/components/CookieConsent/index.js +0 -1
- package/tracking/helpers/index.js +0 -7
- package/tracking/hooks/index.js +0 -4
- package/tracking/index.js +0 -1
- package/tracking/providers/CookieConsentProvider.connector.js +0 -4
- package/tracking/providers/CookieConsentProvider.js +0 -8
- /package/{tracking/providers/CookieConsentProvider.context.js → back-in-stock/providers/BackInStockSubscriptionsProvider.context.js} +0 -0
- /package/page/{NotFound.js → components/NotFound.js} +0 -0
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"AU": "Австралия",
|
|
3
|
-
"AT": "Австрия",
|
|
4
|
-
"AZ": "Азербайджан",
|
|
5
|
-
"AX": "Аландские о-ва",
|
|
6
|
-
"AL": "Албания",
|
|
7
|
-
"DZ": "Алжир",
|
|
8
|
-
"AS": "Американское Самоа",
|
|
9
|
-
"AI": "Ангилья",
|
|
10
|
-
"AO": "Ангола",
|
|
11
|
-
"AD": "Андорра",
|
|
12
|
-
"AQ": "Антарктида",
|
|
13
|
-
"AG": "Антигуа и Барбуда",
|
|
14
|
-
"AR": "Аргентина",
|
|
15
|
-
"AM": "Армения",
|
|
16
|
-
"AW": "Аруба",
|
|
17
|
-
"AF": "Афганистан",
|
|
18
|
-
"BS": "Багамы",
|
|
19
|
-
"BD": "Бангладеш",
|
|
20
|
-
"BB": "Барбадос",
|
|
21
|
-
"BH": "Бахрейн",
|
|
22
|
-
"BY": "Беларусь",
|
|
23
|
-
"BZ": "Белиз",
|
|
24
|
-
"BE": "Бельгия",
|
|
25
|
-
"BJ": "Бенин",
|
|
26
|
-
"BM": "Бермудские о-ва",
|
|
27
|
-
"BG": "Болгария",
|
|
28
|
-
"BO": "Боливия",
|
|
29
|
-
"BQ": "Бонэйр, Синт-Эстатиус и Саба",
|
|
30
|
-
"BA": "Босния и Герцеговина",
|
|
31
|
-
"BW": "Ботсвана",
|
|
32
|
-
"BR": "Бразилия",
|
|
33
|
-
"IO": "Британская территория в Индийском океане",
|
|
34
|
-
"BN": "Бруней-Даруссалам",
|
|
35
|
-
"BF": "Буркина-Фасо",
|
|
36
|
-
"BI": "Бурунди",
|
|
37
|
-
"BT": "Бутан",
|
|
38
|
-
"VU": "Вануату",
|
|
39
|
-
"VA": "Ватикан",
|
|
40
|
-
"GB": "Великобритания",
|
|
41
|
-
"HU": "Венгрия",
|
|
42
|
-
"VE": "Венесуэла",
|
|
43
|
-
"VG": "Виргинские о-ва (Великобритания)",
|
|
44
|
-
"VI": "Виргинские о-ва (США)",
|
|
45
|
-
"UM": "Внешние малые о-ва (США)",
|
|
46
|
-
"TL": "Восточный Тимор",
|
|
47
|
-
"VN": "Вьетнам",
|
|
48
|
-
"GA": "Габон",
|
|
49
|
-
"HT": "Гаити",
|
|
50
|
-
"GY": "Гайана",
|
|
51
|
-
"GM": "Гамбия",
|
|
52
|
-
"GH": "Гана",
|
|
53
|
-
"GP": "Гваделупа",
|
|
54
|
-
"GT": "Гватемала",
|
|
55
|
-
"GN": "Гвинея",
|
|
56
|
-
"GW": "Гвинея-Бисау",
|
|
57
|
-
"DE": "Германия",
|
|
58
|
-
"GG": "Гернси",
|
|
59
|
-
"GI": "Гибралтар",
|
|
60
|
-
"HN": "Гондурас",
|
|
61
|
-
"HK": "Гонконг (САР)",
|
|
62
|
-
"GD": "Гренада",
|
|
63
|
-
"GL": "Гренландия",
|
|
64
|
-
"GR": "Греция",
|
|
65
|
-
"GE": "Грузия",
|
|
66
|
-
"GU": "Гуам",
|
|
67
|
-
"DK": "Дания",
|
|
68
|
-
"JE": "Джерси",
|
|
69
|
-
"DJ": "Джибути",
|
|
70
|
-
"DM": "Доминика",
|
|
71
|
-
"DO": "Доминиканская Республика",
|
|
72
|
-
"EG": "Египет",
|
|
73
|
-
"ZM": "Замбия",
|
|
74
|
-
"EH": "Западная Сахара",
|
|
75
|
-
"ZW": "Зимбабве",
|
|
76
|
-
"IL": "Израиль",
|
|
77
|
-
"IN": "Индия",
|
|
78
|
-
"ID": "Индонезия",
|
|
79
|
-
"JO": "Иордания",
|
|
80
|
-
"IQ": "Ирак",
|
|
81
|
-
"IR": "Иран",
|
|
82
|
-
"IE": "Ирландия",
|
|
83
|
-
"IS": "Исландия",
|
|
84
|
-
"ES": "Испания",
|
|
85
|
-
"IT": "Италия",
|
|
86
|
-
"YE": "Йемен",
|
|
87
|
-
"CV": "Кабо-Верде",
|
|
88
|
-
"KZ": "Казахстан",
|
|
89
|
-
"KH": "Камбоджа",
|
|
90
|
-
"CM": "Камерун",
|
|
91
|
-
"CA": "Канада",
|
|
92
|
-
"QA": "Катар",
|
|
93
|
-
"KE": "Кения",
|
|
94
|
-
"CY": "Кипр",
|
|
95
|
-
"KG": "Киргизия",
|
|
96
|
-
"KI": "Кирибати",
|
|
97
|
-
"CN": "Китай",
|
|
98
|
-
"KP": "КНДР",
|
|
99
|
-
"CC": "Кокосовые о-ва",
|
|
100
|
-
"CO": "Колумбия",
|
|
101
|
-
"KM": "Коморы",
|
|
102
|
-
"CG": "Конго - Браззавиль",
|
|
103
|
-
"CD": "Конго - Киншаса",
|
|
104
|
-
"CR": "Коста-Рика",
|
|
105
|
-
"CI": "Кот-д’Ивуар",
|
|
106
|
-
"CU": "Куба",
|
|
107
|
-
"KW": "Кувейт",
|
|
108
|
-
"CW": "Кюрасао",
|
|
109
|
-
"LA": "Лаос",
|
|
110
|
-
"LV": "Латвия",
|
|
111
|
-
"LS": "Лесото",
|
|
112
|
-
"LR": "Либерия",
|
|
113
|
-
"LB": "Ливан",
|
|
114
|
-
"LY": "Ливия",
|
|
115
|
-
"LT": "Литва",
|
|
116
|
-
"LI": "Лихтенштейн",
|
|
117
|
-
"LU": "Люксембург",
|
|
118
|
-
"MU": "Маврикий",
|
|
119
|
-
"MR": "Мавритания",
|
|
120
|
-
"MG": "Мадагаскар",
|
|
121
|
-
"YT": "Майотта",
|
|
122
|
-
"MO": "Макао (САР)",
|
|
123
|
-
"MW": "Малави",
|
|
124
|
-
"MY": "Малайзия",
|
|
125
|
-
"ML": "Мали",
|
|
126
|
-
"MV": "Мальдивы",
|
|
127
|
-
"MT": "Мальта",
|
|
128
|
-
"MA": "Марокко",
|
|
129
|
-
"MQ": "Мартиника",
|
|
130
|
-
"MH": "Маршалловы Острова",
|
|
131
|
-
"MX": "Мексика",
|
|
132
|
-
"MZ": "Мозамбик",
|
|
133
|
-
"MD": "Молдова",
|
|
134
|
-
"MC": "Монако",
|
|
135
|
-
"MN": "Монголия",
|
|
136
|
-
"MS": "Монтсеррат",
|
|
137
|
-
"MM": "Мьянма (Бирма)",
|
|
138
|
-
"NA": "Намибия",
|
|
139
|
-
"NR": "Науру",
|
|
140
|
-
"NP": "Непал",
|
|
141
|
-
"NE": "Нигер",
|
|
142
|
-
"NG": "Нигерия",
|
|
143
|
-
"NL": "Нидерланды",
|
|
144
|
-
"NI": "Никарагуа",
|
|
145
|
-
"NU": "Ниуэ",
|
|
146
|
-
"NZ": "Новая Зеландия",
|
|
147
|
-
"NC": "Новая Каледония",
|
|
148
|
-
"NO": "Норвегия",
|
|
149
|
-
"BV": "о-в Буве",
|
|
150
|
-
"IM": "о-в Мэн",
|
|
151
|
-
"NF": "о-в Норфолк",
|
|
152
|
-
"CX": "о-в Рождества",
|
|
153
|
-
"SH": "о-в Св. Елены",
|
|
154
|
-
"PN": "о-ва Питкэрн",
|
|
155
|
-
"TC": "о-ва Тёркс и Кайкос",
|
|
156
|
-
"HM": "о-ва Херд и Макдональд",
|
|
157
|
-
"AE": "ОАЭ",
|
|
158
|
-
"OM": "Оман",
|
|
159
|
-
"KY": "Острова Кайман",
|
|
160
|
-
"CK": "Острова Кука",
|
|
161
|
-
"PK": "Пакистан",
|
|
162
|
-
"PW": "Палау",
|
|
163
|
-
"PS": "Палестинские территории",
|
|
164
|
-
"PA": "Панама",
|
|
165
|
-
"PG": "Папуа — Новая Гвинея",
|
|
166
|
-
"PY": "Парагвай",
|
|
167
|
-
"PE": "Перу",
|
|
168
|
-
"PL": "Польша",
|
|
169
|
-
"PT": "Португалия",
|
|
170
|
-
"PR": "Пуэрто-Рико",
|
|
171
|
-
"KR": "Республика Корея",
|
|
172
|
-
"RE": "Реюньон",
|
|
173
|
-
"RU": "Россия",
|
|
174
|
-
"RW": "Руанда",
|
|
175
|
-
"RO": "Румыния",
|
|
176
|
-
"SV": "Сальвадор",
|
|
177
|
-
"WS": "Самоа",
|
|
178
|
-
"SM": "Сан-Марино",
|
|
179
|
-
"ST": "Сан-Томе и Принсипи",
|
|
180
|
-
"SA": "Саудовская Аравия",
|
|
181
|
-
"MK": "Северная Македония",
|
|
182
|
-
"MP": "Северные Марианские о-ва",
|
|
183
|
-
"SC": "Сейшельские Острова",
|
|
184
|
-
"BL": "Сен-Бартелеми",
|
|
185
|
-
"MF": "Сен-Мартен",
|
|
186
|
-
"PM": "Сен-Пьер и Микелон",
|
|
187
|
-
"SN": "Сенегал",
|
|
188
|
-
"VC": "Сент-Винсент и Гренадины",
|
|
189
|
-
"KN": "Сент-Китс и Невис",
|
|
190
|
-
"LC": "Сент-Люсия",
|
|
191
|
-
"RS": "Сербия",
|
|
192
|
-
"SG": "Сингапур",
|
|
193
|
-
"SX": "Синт-Мартен",
|
|
194
|
-
"SY": "Сирия",
|
|
195
|
-
"SK": "Словакия",
|
|
196
|
-
"SI": "Словения",
|
|
197
|
-
"US": "Соединенные Штаты",
|
|
198
|
-
"SB": "Соломоновы Острова",
|
|
199
|
-
"SO": "Сомали",
|
|
200
|
-
"SD": "Судан",
|
|
201
|
-
"SR": "Суринам",
|
|
202
|
-
"SL": "Сьерра-Леоне",
|
|
203
|
-
"TJ": "Таджикистан",
|
|
204
|
-
"TH": "Таиланд",
|
|
205
|
-
"TW": "Тайвань",
|
|
206
|
-
"TZ": "Танзания",
|
|
207
|
-
"TG": "Того",
|
|
208
|
-
"TK": "Токелау",
|
|
209
|
-
"TO": "Тонга",
|
|
210
|
-
"TT": "Тринидад и Тобаго",
|
|
211
|
-
"TV": "Тувалу",
|
|
212
|
-
"TN": "Тунис",
|
|
213
|
-
"TM": "Туркменистан",
|
|
214
|
-
"TR": "Турция",
|
|
215
|
-
"UG": "Уганда",
|
|
216
|
-
"UZ": "Узбекистан",
|
|
217
|
-
"UA": "Украина",
|
|
218
|
-
"WF": "Уоллис и Футуна",
|
|
219
|
-
"UY": "Уругвай",
|
|
220
|
-
"FO": "Фарерские о-ва",
|
|
221
|
-
"FM": "Федеративные Штаты Микронезии",
|
|
222
|
-
"FJ": "Фиджи",
|
|
223
|
-
"PH": "Филиппины",
|
|
224
|
-
"FI": "Финляндия",
|
|
225
|
-
"FK": "Фолклендские о-ва",
|
|
226
|
-
"FR": "Франция",
|
|
227
|
-
"GF": "Французская Гвиана",
|
|
228
|
-
"PF": "Французская Полинезия",
|
|
229
|
-
"TF": "Французские Южные территории",
|
|
230
|
-
"HR": "Хорватия",
|
|
231
|
-
"CF": "Центрально-Африканская Республика",
|
|
232
|
-
"TD": "Чад",
|
|
233
|
-
"ME": "Черногория",
|
|
234
|
-
"CZ": "Чехия",
|
|
235
|
-
"CL": "Чили",
|
|
236
|
-
"CH": "Швейцария",
|
|
237
|
-
"SE": "Швеция",
|
|
238
|
-
"SJ": "Шпицберген и Ян-Майен",
|
|
239
|
-
"LK": "Шри-Ланка",
|
|
240
|
-
"EC": "Эквадор",
|
|
241
|
-
"GQ": "Экваториальная Гвинея",
|
|
242
|
-
"ER": "Эритрея",
|
|
243
|
-
"SZ": "Эсватини",
|
|
244
|
-
"EE": "Эстония",
|
|
245
|
-
"ET": "Эфиопия",
|
|
246
|
-
"GS": "Южная Георгия и Южные Сандвичевы о-ва",
|
|
247
|
-
"ZA": "Южно-Африканская Республика",
|
|
248
|
-
"SS": "Южный Судан",
|
|
249
|
-
"JM": "Ямайка",
|
|
250
|
-
"JP": "Япония"
|
|
251
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{AVAILABILITY_STATE_OK,AVAILABILITY_STATE_WARNING,AVAILABILITY_STATE_ALERT}from'@shopgate/pwa-common-commerce/product/constants';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{useWidgetSettings}from"../../../core";/**
|
|
2
|
-
* @param {Object} [productStock={}] product.stock object
|
|
3
|
-
* @returns {Object}
|
|
4
|
-
*/export var getQuantityRange=function getQuantityRange(){var productStock=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var settings=useWidgetSettings('@shopgate/engage/product/QuantityPicker');var min=settings.minOrderQuantity;if(productStock.minOrderQuantity>0){min=productStock.minOrderQuantity;}var max=settings.maxOrderQuantity;if(productStock.maxOrderQuantity>0){max=Math.min(Math.max(min,settings.maxOrderQuantity),productStock.maxOrderQuantity);}// Normalize min if max is finally less then min
|
|
5
|
-
min=Math.min(min,max);return{min:min,max:max};};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{connect}from'react-redux';import{hasCookieConsent}from"../../selectors";/**
|
|
2
|
-
* Creates the mapStateToProps connector function.
|
|
3
|
-
* @returns {Function}
|
|
4
|
-
*/var makeMapStateToProps=function makeMapStateToProps(){return function(state){return{hasCookieConsent:hasCookieConsent(state)};};};export default connect(makeMapStateToProps);
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from'react';import PropTypes from'prop-types';import CookieConsentProvider from"../../providers/CookieConsentProvider";import CookieConsentContent from"./CookieConsentContent";import connect from"./CookieConsent.connector";/**
|
|
2
|
-
* The CookieConsent component
|
|
3
|
-
* @returns {JSX}
|
|
4
|
-
*/var CookieConsent=function CookieConsent(_ref){var hasCookieConsent=_ref.hasCookieConsent;if(!hasCookieConsent){return null;}return React.createElement(CookieConsentProvider,null,React.createElement(CookieConsentContent,null));};CookieConsent.defaultProps={hasCookieConsent:false};export default connect(CookieConsent);
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import React from'react';import classNames from'classnames';import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';import{responsiveMediaQuery}from'@shopgate/engage/styles';import{RippleButton,I18n}from'@shopgate/engage/components';import{useCookieConsent}from"../../hooks";var variables=themeConfig.variables;var styles={container:css(_defineProperty({display:'flex',justifyContent:'flex-end'},responsiveMediaQuery('<sm'),{justifyContent:'flex-start'})).toString(),button:css({borderRadius:'6px !important',margin:"0 ".concat(variables.gap.small,"px"),fontSize:'.875rem !important',whiteSpace:'nowrap'}).toString(),buttonSecondary:css(_defineProperty({},responsiveMediaQuery('<sm'),{marginLeft:0,paddingLeft:0,' > div':{paddingLeft:0}})).toString(),buttonPrimary:css({minWidth:'150px !important'}).toString(),labelSelected:css({color:'var(--color-text-medium-emphasis)'}).toString()};/**
|
|
2
|
-
* @returns {JSX}
|
|
3
|
-
*/var CookieConsentButtons=function CookieConsentButtons(){var _useCookieConsent=useCookieConsent(),onClickSecondary=_useCookieConsent.onClickSecondary,onClickPrimary=_useCookieConsent.onClickPrimary,buttonLabels=_useCookieConsent.buttonLabels;return React.createElement("div",{className:styles.container},React.createElement(RippleButton,{className:classNames(styles.button,styles.buttonSecondary),flat:true,onClick:onClickSecondary},React.createElement(I18n.Text,{string:buttonLabels.secondary,className:styles.labelSelected})),React.createElement(RippleButton,{className:classNames(styles.button,styles.buttonPrimary),type:"secondary",onClick:onClickPrimary},React.createElement(I18n.Text,{string:buttonLabels.primary})));};export default CookieConsentButtons;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import React from'react';import{css}from'glamor';import classNames from'classnames';import{Checkbox}from'@shopgate/pwa-ui-shared';import{themeConfig}from'@shopgate/pwa-common/helpers/config';import{i18n}from'@shopgate/engage/core';import{useCookieConsent}from"../../hooks";var variables=themeConfig.variables,colors=themeConfig.colors;var styles={container:css({display:'flex',alignItems:'center'}),label:css({fontWeight:500,marginRight:variables.gap.big}).toString(),checkboxContainer:css({display:'flex',padding:"0 ".concat(variables.gap.small,"px"),alignItems:'center',' > svg':{maxWidth:'inherit'}}).toString(),checkbox:css({marginLeft:variables.gap.xsmall,cursor:'pointer'}).toString(),checked:css({color:'var(--color-primary)'}).toString(),unchecked:css({color:colors.shade6}).toString(),disabled:css({opacity:0.5,color:colors.shade6,cursor:'not-allowed'}).toString()};/**
|
|
2
|
-
* @returns {JSX}
|
|
3
|
-
*/var CookieConsentCheckboxes=function CookieConsentCheckboxes(){var _useCookieConsent=useCookieConsent(),allowAnalytics=_useCookieConsent.allowAnalytics,onClickAllowAnalytics=_useCookieConsent.onClickAllowAnalytics;return React.createElement("div",{className:styles.container},React.createElement("span",{className:styles.label},"".concat(i18n.text('tracking.cookieConsent.preferences'),":")),React.createElement(Checkbox,{checked:true,disabled:true,className:styles.checkboxContainer,checkedClassName:classNames(styles.disabled,styles.checkbox),label:i18n.text('tracking.cookieConsent.needed'),labelPosition:"left"}),React.createElement(Checkbox,{checked:allowAnalytics,className:styles.checkboxContainer,checkedClassName:classNames(styles.checkbox,styles.checked),unCheckedClassName:classNames(styles.checkbox,styles.unchecked),onCheck:onClickAllowAnalytics,label:i18n.text('tracking.cookieConsent.analytics'),labelPosition:"left"}));};export default CookieConsentCheckboxes;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var _css;function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance");}function _iterableToArrayLimit(arr,i){var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import React,{useState}from'react';import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';import{responsiveMediaQuery}from'@shopgate/engage/styles';import Transition from'react-transition-group/Transition';import{useCookieConsent}from"../../hooks";import CookieConsentMessage from"./CookieConsentMessage";import CookieConsentButtons from"./CookieConsentButtons";import CookieConsentCheckboxes from"./CookieConsentCheckboxes";var variables=themeConfig.variables,colors=themeConfig.colors;var containerPadding=12;var styles={container:css({fontSize:'.875rem',position:'fixed',background:'var(--color-background-accent)',borderTop:"1px solid ".concat(colors.shade7),bottom:0,zIndex:10000,width:'100%',display:'flex',justifyContent:'center',padding:"".concat(containerPadding,"px ").concat(containerPadding,"px calc(var(--safe-area-inset-bottom) + ").concat(containerPadding,"px) ").concat(variables.gap.big,"px"),userSelect:'none'}),content:css((_css={display:'grid',gridTemplateColumns:'auto 1fr',gridTemplateRows:'auto auto',gridTemplateAreas:"\n \"message buttons\"\n \"checkboxes buttons\"\n ",rowGap:12,width:'100%'},_defineProperty(_css,responsiveMediaQuery('>=sm',{webOnly:true}),{width:'calc(var(--page-content-width) + 208px)'}),_defineProperty(_css,responsiveMediaQuery('<sm'),{gridTemplateColumns:'auto',gridTemplateRows:'auto auto auto',gridTemplateAreas:"\n \"message\"\n \"checkboxes\"\n \"buttons\"\n "}),_css)),message:css({gridArea:'message'}),buttons:css(_defineProperty({gridArea:'buttons'},responsiveMediaQuery('>=sm'),{justifySelf:'end'})),checkboxes:css({gridArea:'checkboxes'})};var transitionDuration=500;var defaultTransitionStyle={transition:"opacity ".concat(transitionDuration,"ms ease-in-out"),opacity:1};var transitionStyles={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}};/**
|
|
2
|
-
* The CookieConsentContent component
|
|
3
|
-
* @returns {JSX}
|
|
4
|
-
*/var CookieConsentContent=function CookieConsentContent(){var _useCookieConsent=useCookieConsent(),isVisible=_useCookieConsent.isVisible;var _useState=useState(isVisible),_useState2=_slicedToArray(_useState,1),wasVisible=_useState2[0];if(!wasVisible){return null;}return React.createElement(Transition,{"in":isVisible,unmountOnExit:true,timeout:transitionDuration},function(state){return React.createElement("div",{className:styles.container,style:_extends({},defaultTransitionStyle,{},transitionStyles[state])},React.createElement("div",{className:styles.content},React.createElement("div",{className:styles.message},React.createElement(CookieConsentMessage,null)),React.createElement("div",{className:styles.buttons},React.createElement(CookieConsentButtons,null)),React.createElement("div",{className:styles.checkboxes},React.createElement(CookieConsentCheckboxes,null))));});};export default CookieConsentContent;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React,{Fragment}from'react';import{i18n}from'@shopgate/engage/core/helpers/i18n';import{TextLink,I18n}from'@shopgate/engage/components';import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';import{useCookieConsent}from"../../hooks";var variables=themeConfig.variables;var styles={container:css({}),message:css({paddingRight:variables.gap.xsmall}).toString(),link:css({textDecoration:'underline'}).toString()};/**
|
|
2
|
-
* The CookieConsentMessage component
|
|
3
|
-
* @returns {JSX}
|
|
4
|
-
*/var CookieConsentMessage=function CookieConsentMessage(){var _useCookieConsent=useCookieConsent(),privacyPolicyLink=_useCookieConsent.privacyPolicyLink;return React.createElement("div",{className:styles.container},React.createElement(I18n.Text,{string:"tracking.cookieConsent.message",className:styles.message}),privacyPolicyLink&&React.createElement(Fragment,null,React.createElement(TextLink,{className:styles.link,href:privacyPolicyLink},i18n.text('tracking.cookieConsent.learnMore')),"."));};export default CookieConsentMessage;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{default as CookieConsent}from"./CookieConsent";
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{COOKIE_CONSENT_COOKIE_NAME_STATUS,COOKIE_CONSENT_COOKIE_NAME_PREFS,COOKIE_CONSENT_STATUS_ALLOW,COOKIE_CONSENT_PREF_ANALYTICS}from"../constants";/**
|
|
2
|
-
* @param {string} name The cookie name
|
|
3
|
-
* @returns {string}
|
|
4
|
-
*/var getCookieValue=function getCookieValue(name){var b=document.cookie.match("(^|;)\\s*".concat(name,"\\s*=\\s*([^;]+)"));return b?b.pop():'';};/**
|
|
5
|
-
* Checks if tracking is allowed
|
|
6
|
-
* @returns {bool}
|
|
7
|
-
*/export var isTrackingAllowed=function isTrackingAllowed(){var status=getCookieValue(COOKIE_CONSENT_COOKIE_NAME_STATUS);var prefs=getCookieValue(COOKIE_CONSENT_COOKIE_NAME_PREFS);if(status!==COOKIE_CONSENT_STATUS_ALLOW){return false;}try{prefs=JSON.parse(decodeURIComponent(prefs));if(!Array.isArray(prefs)){prefs=[];}}catch(e){prefs=[];}return prefs.includes(COOKIE_CONSENT_PREF_ANALYTICS);};
|
package/tracking/hooks/index.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from'react';import CookieConsent from"../providers/CookieConsentProvider.context";/**
|
|
2
|
-
* Returns the value of the cookie consent provider state.
|
|
3
|
-
* @returns {Object}
|
|
4
|
-
*/export var useCookieConsent=function useCookieConsent(){return React.useContext(CookieConsent);};
|
package/tracking/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{CookieConsent}from"./components";export{initializeTracking$}from"./streams";
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{connect}from'react-redux';import{initTracking}from"../action-creators";import{hasCookieConsent,hasStrictCookieConsent,makeGetPrivacyPolicyLink}from"../selectors";/**
|
|
2
|
-
* Creates the mapStateToProps connector function.
|
|
3
|
-
* @returns {Function}
|
|
4
|
-
*/var makeMapStateToProps=function makeMapStateToProps(){var getPrivacyPolicyLink=makeGetPrivacyPolicyLink();return function(state){return{privacyPolicyLink:getPrivacyPolicyLink(state),hasCookieConsent:hasCookieConsent(state),hasStrictCookieConsent:hasStrictCookieConsent(state)};};};var mapDispatchToProps={initTracking:initTracking};export default connect(makeMapStateToProps,mapDispatchToProps);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance");}function _iterableToArrayLimit(arr,i){var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}import React,{useMemo,useCallback,useState,useLayoutEffect}from'react';import PropTypes from'prop-types';import{useCookies}from'react-cookie';import{i18n}from'@shopgate/engage/core';import{COOKIE_CONSENT_COOKIE_NAME_STATUS,COOKIE_CONSENT_COOKIE_NAME_PREFS,COOKIE_CONSENT_STATUS_ALLOW,COOKIE_CONSENT_STATUS_DENY,COOKIE_CONSENT_PREF_NEEDED,COOKIE_CONSENT_PREF_ANALYTICS}from"../constants";import Context from"./CookieConsentProvider.context";import connect from"./CookieConsentProvider.connector";/**
|
|
2
|
-
* @returns {JSX}
|
|
3
|
-
*/var CookieConsentProvider=function CookieConsentProvider(_ref){var privacyPolicyLink=_ref.privacyPolicyLink,hasCookieConsent=_ref.hasCookieConsent,hasStrictCookieConsent=_ref.hasStrictCookieConsent,initTracking=_ref.initTracking,children=_ref.children;var _useCookies=useCookies([COOKIE_CONSENT_COOKIE_NAME_STATUS,COOKIE_CONSENT_COOKIE_NAME_PREFS]),_useCookies2=_slicedToArray(_useCookies,2),cookies=_useCookies2[0],setCookie=_useCookies2[1];var _useState=useState(hasCookieConsent&&![COOKIE_CONSENT_STATUS_ALLOW,COOKIE_CONSENT_STATUS_DENY].includes(cookies[COOKIE_CONSENT_COOKIE_NAME_STATUS])),_useState2=_slicedToArray(_useState,2),isVisible=_useState2[0],setIsVisible=_useState2[1];var _useState3=useState(false),_useState4=_slicedToArray(_useState3,2),allowAnalytics=_useState4[0],setAllowAnalytics=_useState4[1];var _useState5=useState(0),_useState6=_slicedToArray(_useState5,2),fadeOutDelay=_useState6[0],setFadeOutDelay=_useState6[1];useLayoutEffect(function(){var status=cookies[COOKIE_CONSENT_COOKIE_NAME_STATUS];if([COOKIE_CONSENT_STATUS_ALLOW,COOKIE_CONSENT_STATUS_DENY].includes(status)){setTimeout(function(){setIsVisible(false);},fadeOutDelay);}},[cookies,fadeOutDelay]);var saveCookies=useCallback(function(){var allowed=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;var analyticsAllowed=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var status=allowed?COOKIE_CONSENT_STATUS_ALLOW:COOKIE_CONSENT_STATUS_DENY;var prefs=[COOKIE_CONSENT_PREF_NEEDED].concat(analyticsAllowed?[COOKIE_CONSENT_PREF_ANALYTICS]:[]);var expires=new Date();expires.setFullYear(expires.getFullYear()+1);setCookie(COOKIE_CONSENT_COOKIE_NAME_STATUS,status,{expires:expires});setCookie(COOKIE_CONSENT_COOKIE_NAME_PREFS,prefs,{expires:expires});if(analyticsAllowed){// Initialize the tracking if allowed
|
|
4
|
-
initTracking();}},[initTracking,setCookie]);var onClickPrimary=useCallback(function(){if(hasStrictCookieConsent){// In strict mode the button saves the current configuration
|
|
5
|
-
saveCookies(true,allowAnalytics);return;}// In normal mode analytics are accepted
|
|
6
|
-
setAllowAnalytics(true);// Removal of the banner needs to be postponed, so that the user can see the added checkmark
|
|
7
|
-
setFadeOutDelay(1000);saveCookies(true,true);},[allowAnalytics,hasStrictCookieConsent,saveCookies]);var onClickSecondary=useCallback(function(){var strict=hasStrictCookieConsent;// In strict mode the button denies cookies
|
|
8
|
-
saveCookies(!strict,strict?false:allowAnalytics);},[allowAnalytics,hasStrictCookieConsent,saveCookies]);var onClickAllowAnalytics=useCallback(function(){setAllowAnalytics(!allowAnalytics);},[allowAnalytics]);var buttonLabels=useMemo(function(){if(hasStrictCookieConsent){return{secondary:i18n.text('tracking.cookieConsent.decline'),primary:i18n.text('tracking.cookieConsent.save')};}return{secondary:i18n.text('tracking.cookieConsent.allowSelected'),primary:i18n.text('tracking.cookieConsent.allowAll')};},[hasStrictCookieConsent]);var value=useMemo(function(){return{isVisible:isVisible,allowAnalytics:allowAnalytics,privacyPolicyLink:privacyPolicyLink,buttonLabels:buttonLabels,onClickPrimary:onClickPrimary,onClickSecondary:onClickSecondary,onClickAllowAnalytics:onClickAllowAnalytics};},[isVisible,allowAnalytics,privacyPolicyLink,buttonLabels,onClickPrimary,onClickSecondary,onClickAllowAnalytics]);return React.createElement(Context.Provider,{value:value},children);};CookieConsentProvider.defaultProps={children:null,privacyPolicyLink:null,hasCookieConsent:false,hasStrictCookieConsent:false};export default connect(CookieConsentProvider);
|
|
File without changes
|
|
File without changes
|