@ubnt/store.core 9.29.0-alpha.1 → 9.29.0-alpha.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/CHANGELOG.md +43 -0
- package/lib/_virtual/_virtual_multi-entry.js +14 -12
- package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
- package/lib/_virtual/_virtual_multi-entry.mjs +14 -12
- package/lib/_virtual/_virtual_multi-entry.mjs.map +1 -1
- package/lib/apis/smartcat.d.ts +18 -3
- package/lib/apis/smartcat.js +6 -6
- package/lib/apis/smartcat.js.map +1 -1
- package/lib/apis/smartcat.mjs +6 -6
- package/lib/apis/smartcat.mjs.map +1 -1
- package/lib/assets/attention.svg +5 -5
- package/lib/assets/attention2.svg +5 -5
- package/lib/assets/ucgMax.jpg +0 -0
- package/lib/assets/ucgMax2.jpg +0 -0
- package/lib/assets/ucgUltra.jpg +0 -0
- package/lib/assets/ucgUltra2.jpg +0 -0
- package/lib/assets/udmPro.jpg +0 -0
- package/lib/assets/udmPro2.jpg +0 -0
- package/lib/assets/udmProMax.jpg +0 -0
- package/lib/assets/udmProMax2.jpg +0 -0
- package/lib/assets/udmProSpecial.jpg +0 -0
- package/lib/assets/udmProSpecial2.jpg +0 -0
- package/lib/assets/unasDrive.svg +3 -0
- package/lib/components/Accordion/Accordion.js +4 -4
- package/lib/components/Avatar/Avatar.js +2 -2
- package/lib/components/Button/Button.js +5 -5
- package/lib/components/Button/CartButton.js +2 -2
- package/lib/components/CardSection/Card/Card.js +6 -6
- package/lib/components/CardSection/CardSection.js +2 -2
- package/lib/components/CartIcon/CartIcon.js +2 -2
- package/lib/components/Checkbox/Checkbox.js +4 -4
- package/lib/components/CloserLookSection/CloserLookSection.js +11 -11
- package/lib/components/CloserLookSection/RecommendedAddons/RecommendedAddons.js +5 -5
- package/lib/components/Container/Container.js +2 -2
- package/lib/components/CustomImage/CustomImage.js +12 -12
- package/lib/components/Explore/Explore.js +5 -5
- package/lib/components/FeaturesSection_deprecated/Features/Features.js +2 -2
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.js +22 -22
- package/lib/components/Footer/Footer.js +2 -2
- package/lib/components/Footer/hooks/useFooterContent.js +5 -5
- package/lib/components/Gallery/Gallery.context.js +17 -17
- package/lib/components/Gallery/Gallery.js +9 -9
- package/lib/components/Gallery/GalleryControls/GalleryControls.js +4 -4
- package/lib/components/Gallery/GalleryItem/GalleryItem.js +8 -8
- package/lib/components/Gallery/GalleryThumbnails/GalleryThumbnails.js +8 -8
- package/lib/components/GridGallery/GridGallery.js +8 -8
- package/lib/components/GridGallery/GridModal/GridModal.js +6 -6
- package/lib/components/Header/AccountFrame/AccountFrame.js +11 -11
- package/lib/components/Header/AccountFrame/Mobile/Mobile.js +4 -4
- package/lib/components/Header/AccountMenu/AccountMenu.js +19 -19
- package/lib/components/Header/CartModal/Empty/Empty.js +3 -3
- package/lib/components/Header/CartModalV2/CartModal.js +5 -5
- package/lib/components/Header/CartModalV2/Item/Item.js +4 -4
- package/lib/components/Header/Header.js +34 -34
- package/lib/components/Header/IsolatedHeader.js +7 -7
- package/lib/components/Header/LanguageFrame/LanguageFrame.js +6 -6
- package/lib/components/Header/Navigation/Carousel/Carousel.js +5 -5
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.js +12 -12
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.js +6 -6
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js +6 -6
- package/lib/components/Header/Overlay/Overlay.js +3 -3
- package/lib/components/Header/ProHeader/ProHeader.js +53 -50
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +24 -21
- package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
- package/lib/components/Hero/Hero.js +5 -5
- package/lib/components/HeroVideo/HeroVideo.js +5 -5
- package/lib/components/ImageCarousel/ImageCarousel.js +29 -29
- package/lib/components/ImageSequence/ImageSequence.js +8 -8
- package/lib/components/LandingPage/Cards/Card/Card.js +4 -4
- package/lib/components/LandingPage/Cards/Cards.js +10 -10
- package/lib/components/LandingPage/LandingPage.js +2 -2
- package/lib/components/LandingPagePro/LandingPagePro.js +13 -13
- package/lib/components/LandingPageSearch/LandingPageSearch.js +2 -2
- package/lib/components/LandingPageSearch/Modal/Modal.js +9 -9
- package/lib/components/LandingPageSidebar/LandingPageSidebar.js +12 -12
- package/lib/components/LayoutRenderer/LayoutRenderer.js +8 -8
- package/lib/components/MeetUniFiVideoPlayer/EpisodeCard/EpisodeCard.js +7 -7
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.js +18 -18
- package/lib/components/MicrositeColumnFeatureProgressBar/MicrositeColumnFeatureProgressBar.js +2 -2
- package/lib/components/MicrositeFeatureChecklist/MicrositeFeatureChecklist.js +3 -3
- package/lib/components/MicrositeFeatureProgressBar/MicrositeFeatureProgressBar.js +3 -3
- package/lib/components/MicrositeHeader/MicrositeHeader.js +4 -4
- package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.js +4 -4
- package/lib/components/MicrositeHeader/components/Navigation/Navigation.js +9 -9
- package/lib/components/MicrositeHero/MicrositeHero.js +18 -18
- package/lib/components/MicrositeIntroductionBlock/MicrositeIntroductionBlock.js +4 -4
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.js +9 -9
- package/lib/components/MicrositeProductGrid/MicrositeProductGrid.js +8 -8
- package/lib/components/MicrositeProductLearnMoreBlock/MicrositeProductLearnMoreBlockWrap.js +2 -2
- package/lib/components/MicrositeSubSubNavigation/MicrositeSubSubNavigation.js +3 -3
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +12 -12
- package/lib/components/Microsites/MicrositePageContext.js +2 -2
- package/lib/components/Microsites/MicrositeProductPage.js +3 -3
- package/lib/components/Microsites/context/MicrositeProductPageContext.js +3 -3
- package/lib/components/MobileModal/MobileModal.js +4 -4
- package/lib/components/Modal/Modal.js +3 -3
- package/lib/components/ModelCompareV3/ModelCompareOverflowScrollButton.js +3 -3
- package/lib/components/ModelCompareV3/ModelComparePropertyValueGridItem.js +2 -2
- package/lib/components/ModelCompareV3/ModelCompareV3.js +14 -14
- package/lib/components/ModelCompareV3/ModelCompareV3.types.d.ts +3 -2
- package/lib/components/ModelCompareV3/ProductGroupsGrid.js +3 -3
- package/lib/components/ModelCompareV3/ScrollGroup/ScrollGroup.js +5 -5
- package/lib/components/ModelCompareV3/ScrollGroup/context.js +3 -3
- package/lib/components/ModelCompareV3/ScrollGroup/useScrollGroupItem.js +8 -8
- package/lib/components/ModelCompareV3/ScrollGroup/useScrollGroupSetScroll.js +2 -2
- package/lib/components/ModelCompareV3/ScrollGroup/useScrollGroupTo.js +2 -2
- package/lib/components/ModelCompareV3/StickyGrid/StickyGrid.js +7 -7
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridBody.js +2 -2
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridHeader.js +5 -5
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridItem.js +2 -2
- package/lib/components/ModelCompareV3/StickyGrid/context.js +3 -3
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgMax.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgUltra.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgUltra.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/ucgMax.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/ucgMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/ucgUltra.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/ucgUltra.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/XgsPon/{uispFiberOltXgs.jpg.js → fiberOltXgs.jpg.js} +2 -2
- package/lib/components/ModelCompareV3/assets/XgsPon/fiberOltXgs.jpg.js.map +1 -0
- package/lib/components/ModelCompareV3/assets/XgsPon/fiberOltXgs.jpg.mjs +3 -0
- package/lib/components/ModelCompareV3/assets/XgsPon/fiberOltXgs.jpg.mjs.map +1 -0
- package/lib/components/ModelCompareV3/data/BaseStation.js +3 -2
- package/lib/components/ModelCompareV3/data/BaseStation.js.map +1 -1
- package/lib/components/ModelCompareV3/data/BaseStation.mjs +3 -2
- package/lib/components/ModelCompareV3/data/BaseStation.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/CloudGateways.js +15 -15
- package/lib/components/ModelCompareV3/data/CloudGateways.mjs +10 -10
- package/lib/components/ModelCompareV3/data/WaveMLO.js +3 -4
- package/lib/components/ModelCompareV3/data/WaveMLO.js.map +1 -1
- package/lib/components/ModelCompareV3/data/WaveMLO.mjs +3 -4
- package/lib/components/ModelCompareV3/data/WaveMLO.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/XgsPon.js +2 -2
- package/lib/components/ModelCompareV3/data/XgsPon.js.map +1 -1
- package/lib/components/ModelCompareV3/data/XgsPon.mjs +2 -2
- package/lib/components/ModelCompareV3/data/XgsPon.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/{uispFiberOltXgs.d.ts → fiberOltXgs.d.ts} +1 -1
- package/lib/components/ModelCompareV3/data/products/{uispFiberOltXgs.js → fiberOltXgs.js} +8 -8
- package/lib/components/ModelCompareV3/data/products/fiberOltXgs.js.map +1 -0
- package/lib/components/ModelCompareV3/data/products/{uispFiberOltXgs.mjs → fiberOltXgs.mjs} +8 -8
- package/lib/components/ModelCompareV3/data/products/fiberOltXgs.mjs.map +1 -0
- package/lib/components/ModelCompareV3/data/products/ucgMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/waveAp.js +3 -3
- package/lib/components/ModelCompareV3/data/products/waveAp.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/waveAp.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/waveAp.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/waveApGen2.js +2 -2
- package/lib/components/ModelCompareV3/data/products/waveApGen2.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/waveApGen2.mjs +2 -2
- package/lib/components/ModelCompareV3/data/products/waveApGen2.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/waveApMicro.js +5 -5
- package/lib/components/ModelCompareV3/data/products/waveApMicro.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/waveApMicro.mjs +5 -5
- package/lib/components/ModelCompareV3/data/products/waveApMicro.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/waveFiberOlt.js +2 -13
- package/lib/components/ModelCompareV3/data/products/waveFiberOlt.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/waveFiberOlt.mjs +2 -13
- package/lib/components/ModelCompareV3/data/products/waveFiberOlt.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/waveFiberOnu.js +3 -4
- package/lib/components/ModelCompareV3/data/products/waveFiberOnu.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/waveFiberOnu.mjs +3 -4
- package/lib/components/ModelCompareV3/data/products/waveFiberOnu.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/waveMLO5.js +4 -12
- package/lib/components/ModelCompareV3/data/products/waveMLO5.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/waveMLO5.mjs +4 -12
- package/lib/components/ModelCompareV3/data/products/waveMLO5.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/waveMLO6.js +5 -11
- package/lib/components/ModelCompareV3/data/products/waveMLO6.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/waveMLO6.mjs +5 -11
- package/lib/components/ModelCompareV3/data/products/waveMLO6.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/properties/index.d.ts +2 -1
- package/lib/components/ModelCompareV3/data/properties/index.js +4 -2
- package/lib/components/ModelCompareV3/data/properties/index.js.map +1 -1
- package/lib/components/ModelCompareV3/data/properties/index.mjs +2 -1
- package/lib/components/ModelCompareV3/data/properties/index.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/properties/{bandwidthPuncturing.d.ts → linkPuncturing.d.ts} +1 -1
- package/lib/components/ModelCompareV3/data/properties/{bandwidthPuncturing.js → linkPuncturing.js} +5 -5
- package/lib/components/ModelCompareV3/data/properties/linkPuncturing.js.map +1 -0
- package/lib/components/ModelCompareV3/data/properties/linkPuncturing.mjs +10 -0
- package/lib/components/ModelCompareV3/data/properties/linkPuncturing.mjs.map +1 -0
- package/lib/components/ModelCompareV3/data/properties/maxTotalThroughput.d.ts +2 -0
- package/lib/components/ModelCompareV3/data/properties/maxTotalThroughput.js +18 -0
- package/lib/components/ModelCompareV3/data/properties/maxTotalThroughput.js.map +1 -0
- package/lib/components/ModelCompareV3/data/properties/maxTotalThroughput.mjs +10 -0
- package/lib/components/ModelCompareV3/data/properties/maxTotalThroughput.mjs.map +1 -0
- package/lib/components/ModelCompareV3/translations/en.json.js +11 -11
- package/lib/components/ModelCompareV3/translations/en.json.mjs +11 -11
- package/lib/components/ModelCompareV3/translations/useModelCompareTranslation.d.ts +2 -2
- package/lib/components/Pagination/Pagination.js +3 -3
- package/lib/components/PriceRangeSlider/PriceRangeSlider.js +16 -16
- package/lib/components/ProductCard/ProductCard.js +8 -8
- package/lib/components/ProductCardPopup/ProductCardPopup.js +8 -8
- package/lib/components/ProductCompare/ProductCompare.js +7 -7
- package/lib/components/ProductDetails/ProductDetails.js +5 -5
- package/lib/components/ProductGrid/ProductGrid.js +10 -10
- package/lib/components/ProductKeyFeatures/ProductKeyFeatures.js +3 -3
- package/lib/components/ProductSectionTabs/ProductSectionTabs.js +2 -2
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.d.ts +2 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.js +84 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.js.map +1 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.mjs +76 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.mjs.map +1 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.d.ts +12 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.js +82 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.js.map +1 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.mjs +68 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.mjs.map +1 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.types.d.ts +17 -0
- package/lib/components/ProductTechSpecsV2/index.d.ts +1 -0
- package/lib/components/ProductTechSpecsV2/index.js +6 -0
- package/lib/components/ProductTechSpecsV2/index.js.map +1 -0
- package/lib/components/ProductTechSpecsV2/index.mjs +3 -0
- package/lib/components/ProductTechSpecsV2/index.mjs.map +1 -0
- package/lib/components/ProductWizard/Options/Options.js +3 -3
- package/lib/components/ProductWizard/ProductWizard.js +2 -2
- package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.js +5 -5
- package/lib/components/ProgressCircle/ProgressCircle.js +4 -4
- package/lib/components/QuantityControls/QuantityControls.js +4 -4
- package/lib/components/RelatedProducts/RelatedProducts.js +5 -5
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.js +36 -36
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.js +12 -12
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +6 -6
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CheckboxSection.js +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.js +4 -4
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/SliderSection.js +3 -3
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js +8 -8
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.js +6 -6
- package/lib/components/ResourceCalculatorV1/PoeCalculator/PoeCalculator.js +9 -9
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerConfigurator.js +10 -10
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js +15 -15
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/RecommendedPoeSwitches.js +2 -2
- package/lib/components/ResourceCalculatorV1/ResourceCalculator.js +6 -6
- package/lib/components/ReverseLoopingVideo/ReverseLoopingVideo.js +5 -5
- package/lib/components/ScrollWrapper/ScrollWrapper.js +17 -17
- package/lib/components/Search/Input/Input.js +4 -4
- package/lib/components/Search/Modal/Modal.js +3 -3
- package/lib/components/StorageSliders/Slider/Slider.js +3 -3
- package/lib/components/StorageSliders/StorageSliders.context.js +19 -19
- package/lib/components/StorageSliders/StorageSliders.js +4 -4
- package/lib/components/Tooltip/Tooltip.js +5 -5
- package/lib/components/VariantSelector/Variant/Compatibility/Compatibility.js +7 -7
- package/lib/components/VariantSelector/Variant/Variant.js +40 -40
- package/lib/components/VariantSelector/VariantSelector.js +16 -16
- package/lib/components/VideoPlayerNew/VideoPlayer.js +19 -19
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +2 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/index.mjs +2 -0
- package/lib/components/index.mjs.map +1 -1
- package/lib/constants/icons/menu/index.d.ts +1 -0
- package/lib/constants/icons/menu/index.js +9 -0
- package/lib/constants/icons/menu/index.js.map +1 -1
- package/lib/constants/icons/menu/index.mjs +2 -0
- package/lib/constants/icons/menu/index.mjs.map +1 -1
- package/lib/constants/icons/menu/unasDrive.svg.js +27 -0
- package/lib/constants/icons/menu/unasDrive.svg.js.map +1 -0
- package/lib/constants/icons/menu/unasDrive.svg.mjs +3 -0
- package/lib/constants/icons/menu/unasDrive.svg.mjs.map +1 -0
- package/lib/constants/proStoreCategories/mapping/filters.d.ts +15 -0
- package/lib/constants/proStoreCategories/mapping/filters.js +15 -0
- package/lib/constants/proStoreCategories/mapping/filters.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/filters.mjs +15 -0
- package/lib/constants/proStoreCategories/mapping/filters.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.d.ts +1 -1
- package/lib/constants/proStoreCategories/mapping/index.js +32 -34
- package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.mjs +32 -34
- package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/mapping.d.ts +4 -0
- package/lib/constants/proStoreCategories/mapping/redirects.js +9 -1
- package/lib/constants/proStoreCategories/mapping/redirects.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/redirects.mjs +9 -1
- package/lib/constants/proStoreCategories/mapping/redirects.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.d.ts +2 -4
- package/lib/constants/proStoreCategories/mapping/unifi.js +2 -4
- package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.mjs +2 -4
- package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.js +2 -1
- package/lib/constants/proStoreCategories/translations/ar.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.mjs +2 -1
- package/lib/constants/proStoreCategories/translations/ar.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.js +2 -1
- package/lib/constants/proStoreCategories/translations/de.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.mjs +2 -1
- package/lib/constants/proStoreCategories/translations/de.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.js +2 -1
- package/lib/constants/proStoreCategories/translations/el.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.mjs +2 -1
- package/lib/constants/proStoreCategories/translations/el.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.js +1 -3
- package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs +2 -3
- package/lib/constants/proStoreCategories/translations/en.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.js +2 -1
- package/lib/constants/proStoreCategories/translations/es.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.mjs +2 -1
- package/lib/constants/proStoreCategories/translations/es.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.js +2 -1
- package/lib/constants/proStoreCategories/translations/fr.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.mjs +2 -1
- package/lib/constants/proStoreCategories/translations/fr.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.js +2 -1
- package/lib/constants/proStoreCategories/translations/it.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.mjs +2 -1
- package/lib/constants/proStoreCategories/translations/it.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.js +2 -1
- package/lib/constants/proStoreCategories/translations/ja.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.mjs +2 -1
- package/lib/constants/proStoreCategories/translations/ja.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js +2 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs +2 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +2 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +2 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +2 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +2 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs.map +1 -1
- package/lib/constants/proStoreFilters/mapping.d.ts +39 -3
- package/lib/constants/proStoreFilters/mapping.js +104 -6
- package/lib/constants/proStoreFilters/mapping.js.map +1 -1
- package/lib/constants/proStoreFilters/mapping.mjs +104 -6
- package/lib/constants/proStoreFilters/mapping.mjs.map +1 -1
- package/lib/contexts/MenuContext/context.js +32 -32
- package/lib/contexts/MenuContext/mapping.js +12 -0
- package/lib/contexts/MenuContext/mapping.js.map +1 -1
- package/lib/contexts/MenuContext/mapping.mjs +11 -0
- package/lib/contexts/MenuContext/mapping.mjs.map +1 -1
- package/lib/contexts/MicrositeMenuContext/context.js +9 -9
- package/lib/helpers/proStoreCategories.js +2 -2
- package/lib/hooks/useHasTouch.js +3 -3
- package/lib/hooks/useHddRetentionCalculator.js +5 -5
- package/lib/hooks/useHorizontalScroll.js +2 -2
- package/lib/hooks/useLockBodyScrollCustom.js +3 -3
- package/lib/hooks/useScrollToY.js +2 -2
- package/lib/hooks/useTestMediaElementVolumeSetter.js +3 -3
- package/lib/hooks/useTranslation.js +6 -6
- package/lib/utils/address.js +1 -1
- package/lib/utils/address.js.map +1 -1
- package/lib/utils/address.mjs +1 -1
- package/lib/utils/address.mjs.map +1 -1
- package/package.json +1 -1
- package/lib/components/ModelCompareV3/assets/XgsPon/uispFiberOltXgs.jpg.js.map +0 -1
- package/lib/components/ModelCompareV3/assets/XgsPon/uispFiberOltXgs.jpg.mjs +0 -3
- package/lib/components/ModelCompareV3/assets/XgsPon/uispFiberOltXgs.jpg.mjs.map +0 -1
- package/lib/components/ModelCompareV3/data/products/uispFiberOltXgs.js.map +0 -1
- package/lib/components/ModelCompareV3/data/products/uispFiberOltXgs.mjs.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/bandwidthPuncturing.js.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/bandwidthPuncturing.mjs +0 -10
- package/lib/components/ModelCompareV3/data/properties/bandwidthPuncturing.mjs.map +0 -1
- /package/lib/assets/{uispFiberOltXgs.jpg → fiberOltXgs.jpg} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
var reactUse = require('react-use');
|
|
6
6
|
require('../../../../contexts/MenuContext/index.js');
|
|
7
7
|
require('../../../../contexts/MenuContext/mapping.js');
|
|
@@ -66,8 +66,8 @@ const NavigationMicrositeMenu = ({
|
|
|
66
66
|
}).then(res => res.default)
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
|
-
const wrapRef =
|
|
70
|
-
const parseMenuItems =
|
|
69
|
+
const wrapRef = React.useRef(null);
|
|
70
|
+
const parseMenuItems = React.useCallback(items => {
|
|
71
71
|
return items.map(item => {
|
|
72
72
|
let url, active;
|
|
73
73
|
if (typeof item.url === "string") {
|
|
@@ -86,39 +86,39 @@ const NavigationMicrositeMenu = ({
|
|
|
86
86
|
};
|
|
87
87
|
});
|
|
88
88
|
}, [context$1, createSiteUrl, isPathnameActive]);
|
|
89
|
-
const menuItems =
|
|
89
|
+
const menuItems = React.useMemo(() => {
|
|
90
90
|
return {
|
|
91
91
|
primary: parseMenuItems(mapping.MICROSITE_NAVIGATION_MAPPING.primary),
|
|
92
92
|
secondary: parseMenuItems(mapping.MICROSITE_NAVIGATION_MAPPING.secondary)
|
|
93
93
|
};
|
|
94
94
|
}, [parseMenuItems]);
|
|
95
|
-
const [isClosing, setIsClosing] =
|
|
95
|
+
const [isClosing, setIsClosing] = React.useState(false);
|
|
96
96
|
reactUse.useDebounce(() => {
|
|
97
97
|
if (isClosing) {
|
|
98
98
|
setIsClosing(false);
|
|
99
99
|
}
|
|
100
100
|
}, MicrositeMenu_styles.TRANSITION_DURATION_MS, [isClosing]);
|
|
101
|
-
const handleClose =
|
|
101
|
+
const handleClose = React.useCallback(() => {
|
|
102
102
|
setIsClosing(true);
|
|
103
103
|
onClose?.();
|
|
104
104
|
}, [onClose]);
|
|
105
105
|
const {
|
|
106
106
|
y: scrollY
|
|
107
107
|
} = reactUse.useWindowScroll();
|
|
108
|
-
const isInView =
|
|
108
|
+
const isInView = React.useMemo(() => {
|
|
109
109
|
if (!visible) {
|
|
110
110
|
return false;
|
|
111
111
|
}
|
|
112
112
|
return scrollY < (stickyHeader ? 0 : Header_styles.HEADER_HEIGHT) + MicrositeMenu_styles.HEADER_NAVIGATION_MICROSITE_MENU_HEIGHT;
|
|
113
113
|
}, [stickyHeader, scrollY, visible]);
|
|
114
|
-
|
|
114
|
+
React.useEffect(() => {
|
|
115
115
|
if (isInView) {
|
|
116
116
|
handleClose();
|
|
117
117
|
}
|
|
118
118
|
}, [handleClose, isInView]);
|
|
119
119
|
const wrapHover = reactUse.useHoverDirty(wrapRef);
|
|
120
120
|
const hasTouch = useHasTouch.useHasTouch();
|
|
121
|
-
const slideInView =
|
|
121
|
+
const slideInView = React.useMemo(() => {
|
|
122
122
|
if (
|
|
123
123
|
// Menu is closing
|
|
124
124
|
isClosing ||
|
|
@@ -129,7 +129,7 @@ const NavigationMicrositeMenu = ({
|
|
|
129
129
|
const hasHover = !hasTouch && wrapHover;
|
|
130
130
|
return show || hasHover;
|
|
131
131
|
}, [hasTouch, isClosing, isInView, show, wrapHover]);
|
|
132
|
-
const renderMenuItems =
|
|
132
|
+
const renderMenuItems = React.useCallback(parsedMenuItems => {
|
|
133
133
|
return parsedMenuItems.map(item => /* @__PURE__ */jsxRuntime.jsx(MicrositeMenu_styles.ListItem, {
|
|
134
134
|
children: /* @__PURE__ */jsxRuntime.jsx(MicrositeMenu_styles.Button, {
|
|
135
135
|
anchor: true,
|
|
@@ -146,8 +146,8 @@ const NavigationMicrositeMenu = ({
|
|
|
146
146
|
})
|
|
147
147
|
}, item.id));
|
|
148
148
|
}, [formatMessage, handleClose, motif, onMenuItemLinkClick]);
|
|
149
|
-
const [noTransition, setNoTransition] =
|
|
150
|
-
|
|
149
|
+
const [noTransition, setNoTransition] = React.useState(false);
|
|
150
|
+
React.useEffect(() => {
|
|
151
151
|
setNoTransition(true);
|
|
152
152
|
isInView;
|
|
153
153
|
}, [isInView]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
require('../../../../constants/icons/index.js');
|
|
6
6
|
require('../../../../contexts/MenuContext/index.js');
|
|
7
7
|
require('../../../../contexts/MenuContext/mapping.js');
|
|
@@ -80,11 +80,11 @@ const NavigationMobileMenu = function NavigationMobileMenu2({
|
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
const motif = "dark";
|
|
83
|
-
const [expandedSectionItemId, setExpandedSectionItemId] =
|
|
84
|
-
const toggleExpandedSectionItemId =
|
|
83
|
+
const [expandedSectionItemId, setExpandedSectionItemId] = React.useState(null);
|
|
84
|
+
const toggleExpandedSectionItemId = React.useCallback(itemId => {
|
|
85
85
|
setExpandedSectionItemId(expandedSectionItemId === itemId ? null : itemId);
|
|
86
86
|
}, [expandedSectionItemId]);
|
|
87
|
-
const micrositeSection =
|
|
87
|
+
const micrositeSection = React.useMemo(() => {
|
|
88
88
|
if (!hasMicrositeMenu) {
|
|
89
89
|
return [];
|
|
90
90
|
}
|
|
@@ -101,7 +101,7 @@ const NavigationMobileMenu = function NavigationMobileMenu2({
|
|
|
101
101
|
})
|
|
102
102
|
}];
|
|
103
103
|
}, [createSiteUrl, formatMessage, hasMicrositeMenu]);
|
|
104
|
-
const micrositeLinks =
|
|
104
|
+
const micrositeLinks = React.useMemo(() => {
|
|
105
105
|
if (!hasMicrositeMenu) {
|
|
106
106
|
return [];
|
|
107
107
|
}
|
|
@@ -116,7 +116,7 @@ const NavigationMobileMenu = function NavigationMobileMenu2({
|
|
|
116
116
|
}))
|
|
117
117
|
}];
|
|
118
118
|
}, [createSiteUrl, hasMicrositeMenu, translations.links]);
|
|
119
|
-
const sections =
|
|
119
|
+
const sections = React.useMemo(() => {
|
|
120
120
|
return [...micrositeSection, {
|
|
121
121
|
id: "main",
|
|
122
122
|
items: [...utils.filterOutUnrenderableItems(activeNavigationSection.items).map(item => ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
require('../../../../assets/icons/menu/icon-history.svg.js');
|
|
6
6
|
require('../../../../assets/icons/menu/icon-location-pin.svg.js');
|
|
7
7
|
require('../../../../constants/icons/index.js');
|
|
@@ -50,11 +50,11 @@ const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
|
50
50
|
const {
|
|
51
51
|
context: context$1
|
|
52
52
|
} = context.useMenu();
|
|
53
|
-
const [expandedSectionItemId, setExpandedSectionItemId] =
|
|
54
|
-
const toggleExpandedSectionItemId =
|
|
53
|
+
const [expandedSectionItemId, setExpandedSectionItemId] = React.useState(null);
|
|
54
|
+
const toggleExpandedSectionItemId = React.useCallback(itemId => {
|
|
55
55
|
setExpandedSectionItemId(expandedSectionItemId === itemId ? null : itemId);
|
|
56
56
|
}, [expandedSectionItemId]);
|
|
57
|
-
const sections =
|
|
57
|
+
const sections = React.useMemo(() => {
|
|
58
58
|
const extraSectionItems = [{
|
|
59
59
|
id: "support",
|
|
60
60
|
label: translations.support,
|
|
@@ -154,7 +154,7 @@ const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
|
154
154
|
items: [item]
|
|
155
155
|
})) : [])].filter(typeGuards.isNonNullish);
|
|
156
156
|
}, [translations.support, translations.social, translations.company, translations.training, translations.tools, translations.orderHistory, translations.purchasedProductHistory, translations.region, context$1, socialContent.items, handleOrderHistoryClick, handlePurchaseHistoryClick, categories.items, logo?.currentStore, handleStorePickerClick, hideExtraSection, footerContent]);
|
|
157
|
-
const renderSectionItemIcon =
|
|
157
|
+
const renderSectionItemIcon = React.useCallback(item => {
|
|
158
158
|
return item.icon && /* @__PURE__ */jsxRuntime.jsx(ProMobileMenu_styles.SectionItemIcon, {
|
|
159
159
|
children: /* @__PURE__ */jsxRuntime.jsx(StyleableSvgImage.StyleableSvgImage, {
|
|
160
160
|
src: item.icon.src,
|
|
@@ -163,7 +163,7 @@ const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
|
163
163
|
})
|
|
164
164
|
});
|
|
165
165
|
}, []);
|
|
166
|
-
const renderSectionItemButton =
|
|
166
|
+
const renderSectionItemButton = React.useCallback(item => {
|
|
167
167
|
const IconNode = "subItems" in item && renderSectionItemIcon(item);
|
|
168
168
|
const NewLabelNode = "isNew" in item && item.isNew ? /* @__PURE__ */jsxRuntime.jsx(MobileMenu_styles.NewLabel, {
|
|
169
169
|
children: translations.new
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
var reactUse = require('react-use');
|
|
6
6
|
var types = require('../../../contexts/MenuContext/types.js');
|
|
7
7
|
require('../../../hooks/index.js');
|
|
@@ -14,10 +14,10 @@ const HeaderOverlay = function HeaderOverlay2({
|
|
|
14
14
|
onClose
|
|
15
15
|
}) {
|
|
16
16
|
useLockBodyScrollCustom.useLockBodyScrollCustom(!!showForModal);
|
|
17
|
-
const canManualClose =
|
|
17
|
+
const canManualClose = React.useMemo(() => {
|
|
18
18
|
return showForModal !== types.ModalId.Cart;
|
|
19
19
|
}, [showForModal]);
|
|
20
|
-
const handleManualClose =
|
|
20
|
+
const handleManualClose = React.useCallback(() => {
|
|
21
21
|
if (!canManualClose) return;
|
|
22
22
|
onClose?.();
|
|
23
23
|
}, [canManualClose, onClose]);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var merge = require('lodash/merge');
|
|
5
|
-
var
|
|
5
|
+
var React = require('react');
|
|
6
6
|
var reactUse = require('react-use');
|
|
7
7
|
require('../../../assets/account/no-user-avatar.png.js');
|
|
8
8
|
require('../../../assets/icons/menu/icon-ea.svg.js');
|
|
@@ -78,7 +78,7 @@ const DEFAULT_PRODUCT_LINE_OPTIONS = [{
|
|
|
78
78
|
value: generated.ProductLine.Uisp,
|
|
79
79
|
label: "UISP"
|
|
80
80
|
}];
|
|
81
|
-
const ProHeader =
|
|
81
|
+
const ProHeader = React.memo(function ProHeader2({
|
|
82
82
|
className,
|
|
83
83
|
motif: defaultMotif,
|
|
84
84
|
cart,
|
|
@@ -110,11 +110,11 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
110
110
|
logo
|
|
111
111
|
}) {
|
|
112
112
|
const isMobile = reactUse.useMedia(PRO_HEADER_MOBILE_AND_DOWN, false);
|
|
113
|
-
const rootRef =
|
|
114
|
-
const wrapRef =
|
|
115
|
-
const containerRef =
|
|
116
|
-
const [searchInputEl, setSearchInputEl] =
|
|
117
|
-
const translations =
|
|
113
|
+
const rootRef = React.useRef(null);
|
|
114
|
+
const wrapRef = React.useRef(null);
|
|
115
|
+
const containerRef = React.useRef(null);
|
|
116
|
+
const [searchInputEl, setSearchInputEl] = React.useState(null);
|
|
117
|
+
const translations = React.useMemo(() => {
|
|
118
118
|
return merge__default["default"](Header_types.defaultHeaderTranslations, initialTranslations);
|
|
119
119
|
}, [initialTranslations]);
|
|
120
120
|
const {
|
|
@@ -163,11 +163,11 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
163
163
|
}).then(res => res.default)
|
|
164
164
|
}
|
|
165
165
|
});
|
|
166
|
-
const [isSearchFocused, setSearchFocused] =
|
|
167
|
-
|
|
166
|
+
const [isSearchFocused, setSearchFocused] = React.useState(false);
|
|
167
|
+
React.useEffect(() => {
|
|
168
168
|
setMotif(defaultMotif);
|
|
169
169
|
}, [defaultMotif, setMotif]);
|
|
170
|
-
const handleModalOpen =
|
|
170
|
+
const handleModalOpen = React.useCallback((e, id) => {
|
|
171
171
|
e.stopPropagation();
|
|
172
172
|
if (activeModal !== id) {
|
|
173
173
|
onModalOpen?.();
|
|
@@ -178,10 +178,10 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
178
178
|
}
|
|
179
179
|
setActiveModal(activeModal === id ? null : id);
|
|
180
180
|
}, [activeModal, onCartClick, setActiveModal, onModalOpen]);
|
|
181
|
-
const handleModalClose =
|
|
181
|
+
const handleModalClose = React.useCallback(() => {
|
|
182
182
|
setActiveModal(null);
|
|
183
183
|
}, [setActiveModal]);
|
|
184
|
-
const handleHamburgerClick =
|
|
184
|
+
const handleHamburgerClick = React.useCallback(() => {
|
|
185
185
|
if (activeModal === types.ModalId.ProMobileMenu) {
|
|
186
186
|
setActiveModal(null);
|
|
187
187
|
} else {
|
|
@@ -189,28 +189,45 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
189
189
|
}
|
|
190
190
|
handleMobileMenuClick?.();
|
|
191
191
|
}, [activeModal, handleMobileMenuClick, setActiveModal]);
|
|
192
|
-
const sticky =
|
|
192
|
+
const sticky = React.useMemo(() => {
|
|
193
193
|
return (
|
|
194
194
|
// Set as sticky if mobile menu is open
|
|
195
195
|
activeModal === types.ModalId.ProMobileMenu
|
|
196
196
|
);
|
|
197
197
|
}, [activeModal]);
|
|
198
|
+
const [canFocusSearch, setCanFocusSearch] = React.useState(false);
|
|
199
|
+
React.useEffect(() => {
|
|
200
|
+
if (activeModal !== types.ModalId.Search) {
|
|
201
|
+
setCanFocusSearch(false);
|
|
202
|
+
}
|
|
203
|
+
}, [activeModal]);
|
|
204
|
+
React.useEffect(() => {
|
|
205
|
+
if (!canFocusSearch || activeModal !== types.ModalId.Search || !searchInputEl) return;
|
|
206
|
+
const interval = setInterval(() => {
|
|
207
|
+
if (document.activeElement === searchInputEl) {
|
|
208
|
+
clearInterval(interval);
|
|
209
|
+
}
|
|
210
|
+
searchInputEl.focus();
|
|
211
|
+
setCanFocusSearch(false);
|
|
212
|
+
}, 0);
|
|
213
|
+
return () => clearInterval(interval);
|
|
214
|
+
}, [activeModal, canFocusSearch, searchInputEl]);
|
|
198
215
|
const isSearching = activeModal === types.ModalId.Search || !!searchValue;
|
|
199
|
-
const onClickAwayFromSearchModal =
|
|
216
|
+
const onClickAwayFromSearchModal = React.useCallback(() => {
|
|
200
217
|
if (searchValue) return;
|
|
201
218
|
if (activeModal === types.ModalId.Search) {
|
|
202
219
|
setActiveModal(null);
|
|
203
220
|
onSearchClick?.();
|
|
204
221
|
}
|
|
205
222
|
}, [activeModal, onSearchClick, searchValue, setActiveModal]);
|
|
206
|
-
const [initialSearchValueHandled, setInitialSearchValueHandled] =
|
|
207
|
-
|
|
223
|
+
const [initialSearchValueHandled, setInitialSearchValueHandled] = React.useState(false);
|
|
224
|
+
React.useEffect(() => {
|
|
208
225
|
if (!initialSearchValueHandled && searchValue) {
|
|
209
226
|
setActiveModal(types.ModalId.Search);
|
|
210
227
|
setInitialSearchValueHandled(true);
|
|
211
228
|
}
|
|
212
229
|
}, [initialSearchValueHandled, searchValue, setActiveModal]);
|
|
213
|
-
const blurSearchInput =
|
|
230
|
+
const blurSearchInput = React.useCallback(() => {
|
|
214
231
|
if (!searchInputEl || activeModal !== types.ModalId.Search) {
|
|
215
232
|
return;
|
|
216
233
|
}
|
|
@@ -223,30 +240,31 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
223
240
|
reactUse.useClickAway(rootRef, () => {
|
|
224
241
|
onClickAwayFromSearchModal();
|
|
225
242
|
}, ["click"]);
|
|
226
|
-
const handleSearchCancel =
|
|
243
|
+
const handleSearchCancel = React.useCallback(() => {
|
|
227
244
|
setActiveModal(null);
|
|
228
245
|
onSearch?.("");
|
|
229
246
|
}, [onSearch, setActiveModal]);
|
|
230
|
-
const
|
|
247
|
+
const handleSearchOnClear = React.useCallback(() => {
|
|
231
248
|
setActiveModal(types.ModalId.Search);
|
|
232
249
|
onSearch?.("");
|
|
233
250
|
}, [onSearch, setActiveModal]);
|
|
234
|
-
const
|
|
251
|
+
const handleSearchOnFocus = React.useCallback(() => {
|
|
235
252
|
setSearchFocused(true);
|
|
236
253
|
onSearchFocus?.();
|
|
237
254
|
}, [setSearchFocused, onSearchFocus]);
|
|
238
|
-
const
|
|
255
|
+
const handleSearchOnBlur = React.useCallback(() => {
|
|
239
256
|
setSearchFocused(false);
|
|
240
257
|
onSearchBlur?.();
|
|
241
258
|
}, [setSearchFocused, onSearchBlur]);
|
|
242
|
-
const handleOpenSearch =
|
|
259
|
+
const handleOpenSearch = React.useCallback(e => {
|
|
243
260
|
handleModalOpen(e, types.ModalId.Search);
|
|
244
261
|
onSearchClick?.();
|
|
262
|
+
setCanFocusSearch(true);
|
|
245
263
|
}, [handleModalOpen, onSearchClick]);
|
|
246
|
-
const handleSearchValueChange =
|
|
264
|
+
const handleSearchValueChange = React.useCallback(e => {
|
|
247
265
|
onSearch?.(e.target.value);
|
|
248
266
|
}, [onSearch]);
|
|
249
|
-
const searchPlaceholder =
|
|
267
|
+
const searchPlaceholder = React.useMemo(() => {
|
|
250
268
|
const defaultPlaceholder = translations.search.searchUniFiProducts;
|
|
251
269
|
switch (productLineValue) {
|
|
252
270
|
case generated.ProductLine.Uisp:
|
|
@@ -263,7 +281,7 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
263
281
|
}
|
|
264
282
|
}
|
|
265
283
|
}, [productLineValue, translations]);
|
|
266
|
-
const searchFocusWidth =
|
|
284
|
+
const searchFocusWidth = React.useMemo(() => {
|
|
267
285
|
switch (productLineValue) {
|
|
268
286
|
case generated.ProductLine.Amplifi:
|
|
269
287
|
return 164;
|
|
@@ -271,7 +289,7 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
271
289
|
return 160;
|
|
272
290
|
}
|
|
273
291
|
}, [productLineValue]);
|
|
274
|
-
|
|
292
|
+
React.useEffect(() => {
|
|
275
293
|
if (!embedConfig?.hideSearchOnTouchmove && !embedConfig?.blurSearchOnTouchmove) {
|
|
276
294
|
return;
|
|
277
295
|
}
|
|
@@ -280,28 +298,13 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
280
298
|
window.removeEventListener("touchmove", blurSearchInput);
|
|
281
299
|
};
|
|
282
300
|
}, [embedConfig?.hideSearchOnTouchmove, blurSearchInput, embedConfig?.blurSearchOnTouchmove]);
|
|
283
|
-
const
|
|
284
|
-
react.useEffect(() => {
|
|
285
|
-
setCanFocusSearch(activeModal === types.ModalId.Search);
|
|
286
|
-
}, [activeModal]);
|
|
287
|
-
react.useEffect(() => {
|
|
288
|
-
if (!canFocusSearch || activeModal !== types.ModalId.Search || !searchInputEl) return;
|
|
289
|
-
const interval = setInterval(() => {
|
|
290
|
-
if (document.activeElement === searchInputEl) {
|
|
291
|
-
clearInterval(interval);
|
|
292
|
-
}
|
|
293
|
-
searchInputEl.focus();
|
|
294
|
-
setCanFocusSearch(false);
|
|
295
|
-
}, 0);
|
|
296
|
-
return () => clearInterval(interval);
|
|
297
|
-
}, [activeModal, canFocusSearch, searchInputEl]);
|
|
298
|
-
const cartQuantity = react.useMemo(() => {
|
|
301
|
+
const cartQuantity = React.useMemo(() => {
|
|
299
302
|
return cart?.items.reduce((sum, item) => sum + item.quantity, 0) ?? 0;
|
|
300
303
|
}, [cart?.items]);
|
|
301
|
-
const homeLinkUrl =
|
|
304
|
+
const homeLinkUrl = React.useMemo(() => {
|
|
302
305
|
return logo?.url ?? createSiteUrl([mapping.SiteId.Ui, ""]);
|
|
303
306
|
}, [createSiteUrl, logo?.url]);
|
|
304
|
-
const homeLinkClickHandler =
|
|
307
|
+
const homeLinkClickHandler = React.useCallback(e => {
|
|
305
308
|
if (embedConfig?.homeLinkClickHandler) {
|
|
306
309
|
e.preventDefault();
|
|
307
310
|
embedConfig.homeLinkClickHandler();
|
|
@@ -309,7 +312,7 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
309
312
|
}
|
|
310
313
|
logo?.onClick?.(e, homeLinkUrl);
|
|
311
314
|
}, [embedConfig, homeLinkUrl, logo]);
|
|
312
|
-
|
|
315
|
+
React.useEffect(() => {
|
|
313
316
|
const containerEl = containerRef.current;
|
|
314
317
|
if (!containerEl) return;
|
|
315
318
|
const wrapEl = wrapRef.current;
|
|
@@ -328,14 +331,14 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
328
331
|
};
|
|
329
332
|
window.requestAnimationFrame(handle);
|
|
330
333
|
}, [isMobile]);
|
|
331
|
-
const handleAvatarClick =
|
|
334
|
+
const handleAvatarClick = React.useCallback(e => {
|
|
332
335
|
if (embedConfig?.avatarClickHandler) {
|
|
333
336
|
embedConfig.avatarClickHandler();
|
|
334
337
|
} else {
|
|
335
338
|
handleModalOpen(e, types.ModalId.Account);
|
|
336
339
|
}
|
|
337
340
|
}, [embedConfig, handleModalOpen]);
|
|
338
|
-
const avatarHtml =
|
|
341
|
+
const avatarHtml = React.useMemo(() => {
|
|
339
342
|
if (embedConfig?.hideAvatarIcon) {
|
|
340
343
|
return null;
|
|
341
344
|
}
|
|
@@ -414,10 +417,10 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
414
417
|
isSearchFocused: !!searchValue || isSearchFocused,
|
|
415
418
|
value: searchValue ?? "",
|
|
416
419
|
showCancel: !!searchValue,
|
|
417
|
-
onCancelClick:
|
|
420
|
+
onCancelClick: handleSearchOnClear,
|
|
418
421
|
width: searchInputWidth ?? 420,
|
|
419
|
-
onFocus:
|
|
420
|
-
onBlur:
|
|
422
|
+
onFocus: handleSearchOnFocus,
|
|
423
|
+
onBlur: handleSearchOnBlur,
|
|
421
424
|
focusedWidth: searchFocusWidth,
|
|
422
425
|
children: searchInputChildren
|
|
423
426
|
}), /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.SearchCancel, {
|