@ubnt/store.core 9.53.0-alpha.4 → 9.53.0-alpha.6
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 +8 -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.js +1 -1
- package/lib/apis/smartcat.js.map +1 -1
- package/lib/apis/smartcat.mjs +1 -1
- package/lib/apis/smartcat.mjs.map +1 -1
- package/lib/assets/ai-360.jpg +0 -0
- package/lib/assets/ai-3602.jpg +0 -0
- package/lib/assets/ai-bullet.jpg +0 -0
- package/lib/assets/ai-bullet2.jpg +0 -0
- package/lib/assets/ai-dslr.jpg +0 -0
- package/lib/assets/ai-dslr2.jpg +0 -0
- package/lib/assets/building-bridge-xg.jpg +0 -0
- package/lib/assets/building-bridge-xg2.jpg +0 -0
- package/lib/assets/close2.svg +2 -3
- package/lib/assets/close3.svg +3 -2
- package/lib/assets/e7-audience.jpg +0 -0
- package/lib/assets/e7-audience2.jpg +0 -0
- package/lib/assets/flex.jpg +0 -0
- package/lib/assets/flex2.jpg +0 -0
- package/lib/assets/g4-instant.jpg +0 -0
- package/lib/assets/g4-instant2.jpg +0 -0
- package/lib/assets/g5-bullet.jpg +0 -0
- package/lib/assets/g5-bullet2.jpg +0 -0
- package/lib/assets/g5-dome.jpg +0 -0
- package/lib/assets/g5-dome2.jpg +0 -0
- package/lib/assets/g5-flex.jpg +0 -0
- package/lib/assets/g5-flex2.jpg +0 -0
- package/lib/assets/g5-ptz.jpg +0 -0
- package/lib/assets/g5-ptz2.jpg +0 -0
- package/lib/assets/g5-turret-ultra.jpg +0 -0
- package/lib/assets/g5-turret-ultra2.jpg +0 -0
- package/lib/assets/industrial.jpg +0 -0
- package/lib/assets/industrial2.jpg +0 -0
- package/lib/assets/intercom.jpg +0 -0
- package/lib/assets/intercom2.jpg +0 -0
- package/lib/assets/pause.svg +3 -3
- package/lib/assets/pause2.svg +3 -3
- package/lib/components/Accordion/Accordion.js +4 -4
- package/lib/components/Avatar/Avatar.js +2 -2
- package/lib/components/Button/Button.js +6 -6
- 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 +23 -23
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.mjs +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/close.svg.js +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/close.svg.mjs +2 -2
- 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/MobileLinksModal/MobileMenu.js +3 -3
- 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 +35 -35
- 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/HeaderContent/HeaderContent.js +13 -13
- package/lib/components/MicrositeHeader/components/SiteMap/SiteMap.js +2 -2
- package/lib/components/MicrositeHeader/components/SiteMapColumns/SiteMapColumns.js +15 -15
- package/lib/components/MicrositeHeader/components/VisualTopology/LinePaths.js +3 -3
- package/lib/components/MicrositeHeader/components/VisualTopology/VisualTopology.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 +13 -13
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.mjs +1 -1
- package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.js +1 -1
- package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.mjs +2 -2
- 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/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/ModelCompareV4/CompareTable/CompareTable.js +8 -8
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup.js +14 -14
- package/lib/components/ModelCompareV4/CompareTable/CompareTableOverflowScrollButton.js +3 -3
- package/lib/components/ModelCompareV4/CompareTable/PropertyValueGridItem.js +2 -2
- package/lib/components/ModelCompareV4/CompareTable/ScrollGroup/ScrollGroup.js +5 -5
- package/lib/components/ModelCompareV4/CompareTable/ScrollGroup/context.js +3 -3
- package/lib/components/ModelCompareV4/CompareTable/ScrollGroup/useScrollGroupItem.js +8 -8
- package/lib/components/ModelCompareV4/CompareTable/ScrollGroup/useScrollGroupSetScroll.js +2 -2
- package/lib/components/ModelCompareV4/CompareTable/ScrollGroup/useScrollGroupTo.js +2 -2
- package/lib/components/ModelCompareV4/CompareTable/StickyGrid/StickyGrid.js +7 -7
- package/lib/components/ModelCompareV4/CompareTable/StickyGrid/StickyGridBody.js +2 -2
- package/lib/components/ModelCompareV4/CompareTable/StickyGrid/StickyGridHeader.js +5 -5
- package/lib/components/ModelCompareV4/CompareTable/StickyGrid/StickyGridItem.js +2 -2
- package/lib/components/ModelCompareV4/CompareTable/StickyGrid/context.js +3 -3
- package/lib/components/ModelCompareV4/ModelCompareV4.js +5 -5
- package/lib/components/ModelCompareV4/ProductList/ProductList.js +11 -11
- package/lib/components/Pagination/Pagination.js +3 -3
- package/lib/components/PriceRangeSlider/PriceRangeSlider.js +16 -16
- package/lib/components/ProductCard/ProductCard.js +7 -7
- 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 +79 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.js.map +1 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.mjs +71 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.mjs.map +1 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.stories.d.ts +5 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.d.ts +11 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.js +80 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.js.map +1 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.mjs +66 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.mjs.map +1 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.types.d.ts +12 -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 +5 -5
- 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/ProgressBarChart/ProgressBarChart.js +7 -7
- 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 +20 -20
- package/lib/components/StorageSliders/StorageSliders.js +4 -4
- package/lib/components/TogglableStaticCompareTables/TogglableStaticCompareTable.js +8 -8
- 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 +21 -21
- package/lib/components/VideoPlayerNew/VideoPlayer.mjs +2 -2
- package/lib/components/VideoPlayerNew/assets/close.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/close.svg.mjs +2 -2
- package/lib/components/VideoPlayerNew/assets/pause.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/pause.svg.mjs +2 -2
- 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/options/colors/black.svg.js +5 -5
- package/lib/constants/icons/options/colors/index.js +3 -3
- package/lib/constants/icons/options/styles/black.svg.js +5 -5
- package/lib/constants/icons/options/styles/index.js +3 -3
- package/lib/constants/modelCompareData/assets/BuildingBridge/building-bridge-xg.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/BuildingBridge/building-bridge-xg.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Bullet/ai-bullet.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Bullet/ai-bullet.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Bullet/ai-dslr.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Bullet/ai-dslr.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Bullet/g5-bullet.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Bullet/g5-bullet.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Compact/g4-instant.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Compact/g4-instant.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Compact/g5-flex.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Compact/g5-flex.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DomeTurret/ai-360.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DomeTurret/ai-360.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DomeTurret/g5-dome.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DomeTurret/g5-dome.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DomeTurret/g5-turret-ultra.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DomeTurret/g5-turret-ultra.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DoorAccess/intercom.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/intercom.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/PTZ/g5-ptz.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/PTZ/g5-ptz.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Switching/flex.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Switching/flex.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Switching/industrial.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Switching/industrial.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/WiFi/e7-audience.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/WiFi/e7-audience.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/ai-bullet.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/ai-bullet.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/ai-dslr.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/ai-dslr.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/g5-bullet.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/g5-bullet.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/compact/g4-instant.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/compact/g4-instant.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/compact/g5-flex.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/compact/g5-flex.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-360.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-360.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/g5-dome.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/g5-dome.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/g5-turret-ultra.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/g5-turret-ultra.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/intercom.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/intercom.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/ptz/g5-ptz.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/ptz/g5-ptz.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/switches/utility/flex.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/switches/utility/flex.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/switches/utility/industrial.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/switches/utility/industrial.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/wifi/building-bridge/building-bridge-xg.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/wifi/building-bridge/building-bridge-xg.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/wifi/mega-capacity/e7-audience.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/wifi/mega-capacity/e7-audience.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/ai360.js +2 -2
- package/lib/constants/modelCompareData/data/products/ai360.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/aiBullet.js +2 -2
- package/lib/constants/modelCompareData/data/products/aiBullet.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/aiDslr.js +2 -2
- package/lib/constants/modelCompareData/data/products/aiDslr.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/buildingBridgeXG.js +2 -2
- package/lib/constants/modelCompareData/data/products/buildingBridgeXG.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/flex.js +2 -2
- package/lib/constants/modelCompareData/data/products/flex.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g4Instant.js +2 -2
- package/lib/constants/modelCompareData/data/products/g4Instant.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g5Bullet.js +2 -2
- package/lib/constants/modelCompareData/data/products/g5Bullet.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g5Dome.js +2 -2
- package/lib/constants/modelCompareData/data/products/g5Dome.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g5Flex.js +2 -2
- package/lib/constants/modelCompareData/data/products/g5Flex.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g5Ptz.js +2 -2
- package/lib/constants/modelCompareData/data/products/g5Ptz.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g5TurretUltra.js +2 -2
- package/lib/constants/modelCompareData/data/products/g5TurretUltra.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/industrial.js +2 -2
- package/lib/constants/modelCompareData/data/products/industrial.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/intercom.js +2 -2
- package/lib/constants/modelCompareData/data/products/intercom.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/shared-product-data/e7Audience.js +2 -2
- package/lib/constants/modelCompareData/data/products/shared-product-data/e7Audience.mjs +2 -2
- package/lib/constants/optionIcons.js +6 -6
- package/lib/constants/optionIcons.mjs +4 -4
- package/lib/contexts/MenuContext/context.js +35 -35
- 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/nextjs/ssr/registry.js +2 -2
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
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 layout = require('../../../constants/layout.js');
|
|
7
7
|
var GalleryItem_styles = require('./GalleryItem.styles.js');
|
|
8
8
|
"use strict";
|
|
9
|
-
const GalleryItem =
|
|
9
|
+
const GalleryItem = React.memo(function GalleryItem2({
|
|
10
10
|
item,
|
|
11
11
|
renderImage,
|
|
12
12
|
priority,
|
|
@@ -16,10 +16,10 @@ const GalleryItem = react.memo(function GalleryItem2({
|
|
|
16
16
|
couldBeNext = true,
|
|
17
17
|
objectFit = "cover"
|
|
18
18
|
}) {
|
|
19
|
-
const videoRef =
|
|
20
|
-
const isVideoHovering =
|
|
19
|
+
const videoRef = React.useRef(null);
|
|
20
|
+
const isVideoHovering = React.useRef(false);
|
|
21
21
|
const isMobile = reactUse.useMedia(layout.BREAKPOINTS.TABLET_AND_DOWN, false);
|
|
22
|
-
const handleMouseEnter =
|
|
22
|
+
const handleMouseEnter = React.useCallback(() => {
|
|
23
23
|
isVideoHovering.current = true;
|
|
24
24
|
if (!videoRef.current) {
|
|
25
25
|
return;
|
|
@@ -40,8 +40,8 @@ const GalleryItem = react.memo(function GalleryItem2({
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
}, []);
|
|
43
|
-
const [isVisible, setIsVisible] =
|
|
44
|
-
|
|
43
|
+
const [isVisible, setIsVisible] = React.useState(isActive);
|
|
44
|
+
React.useEffect(() => {
|
|
45
45
|
if (!isActive) {
|
|
46
46
|
window.setTimeout(() => {
|
|
47
47
|
setIsVisible(false);
|
|
@@ -52,7 +52,7 @@ const GalleryItem = react.memo(function GalleryItem2({
|
|
|
52
52
|
setIsVisible(true);
|
|
53
53
|
}
|
|
54
54
|
}, [isActive, isVisible]);
|
|
55
|
-
|
|
55
|
+
React.useEffect(() => {
|
|
56
56
|
if (!isVisible && videoRef.current) {
|
|
57
57
|
videoRef.current.pause();
|
|
58
58
|
videoRef.current.currentTime = 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('../../ScrollWrapper/index.js');
|
|
7
7
|
var Gallery_context = require('../Gallery.context.js');
|
|
@@ -18,26 +18,26 @@ const GalleryThumbnails = function GalleryThumbnails2({
|
|
|
18
18
|
visibleSlide,
|
|
19
19
|
jumpToSlide
|
|
20
20
|
} = Gallery_context.useGalleryControls();
|
|
21
|
-
const handleThumbnailClick =
|
|
21
|
+
const handleThumbnailClick = React.useCallback(index => {
|
|
22
22
|
if (expanded) {
|
|
23
23
|
onControl?.();
|
|
24
24
|
jumpToSlide(index);
|
|
25
25
|
}
|
|
26
26
|
}, [expanded, jumpToSlide, onControl]);
|
|
27
|
-
const [allowPointers, setAllowPointers] =
|
|
27
|
+
const [allowPointers, setAllowPointers] = React.useState(false);
|
|
28
28
|
reactUse.useDebounce(() => {
|
|
29
29
|
setAllowPointers(expanded);
|
|
30
30
|
}, GalleryThumbnails_styles.GALLERY_TRANSITION_MS, [expanded, visibleSlide]);
|
|
31
|
-
const wrapRef =
|
|
32
|
-
const [scrollOffset, setScrollOffset] =
|
|
33
|
-
const [containerWidth, setContainerWidth] =
|
|
34
|
-
const onScrollChange =
|
|
31
|
+
const wrapRef = React.useRef(null);
|
|
32
|
+
const [scrollOffset, setScrollOffset] = React.useState(0);
|
|
33
|
+
const [containerWidth, setContainerWidth] = React.useState(0);
|
|
34
|
+
const onScrollChange = React.useCallback(({
|
|
35
35
|
scrollX
|
|
36
36
|
}) => {
|
|
37
37
|
setScrollOffset(scrollX);
|
|
38
38
|
setContainerWidth(wrapRef.current?.offsetWidth ?? 0);
|
|
39
39
|
}, []);
|
|
40
|
-
|
|
40
|
+
React.useEffect(() => {
|
|
41
41
|
setScrollOffset(0);
|
|
42
42
|
setContainerWidth(wrapRef.current?.offsetWidth ?? 0);
|
|
43
43
|
}, [items]);
|
|
@@ -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('../../assets/icons/play-big.svg.js');
|
|
7
7
|
var layout = require('../../constants/layout.js');
|
|
@@ -27,11 +27,11 @@ const GridGallery = function GridGallery2({
|
|
|
27
27
|
onModalToggle
|
|
28
28
|
}) {
|
|
29
29
|
const isTablet = reactUse.useMedia(layout.BREAKPOINTS.TABLET_AND_DOWN, false);
|
|
30
|
-
const [activeModalId, setActiveModalId] =
|
|
31
|
-
|
|
30
|
+
const [activeModalId, setActiveModalId] = React.useState("");
|
|
31
|
+
React.useEffect(() => {
|
|
32
32
|
onModalToggle?.(activeModalId);
|
|
33
33
|
}, [onModalToggle, activeModalId]);
|
|
34
|
-
const getAssetAspectRatioType =
|
|
34
|
+
const getAssetAspectRatioType = React.useCallback(asset => {
|
|
35
35
|
const aspectHeightRatio = asset.height / asset.width;
|
|
36
36
|
const heightRatios = Object.values(GridGallery_styles.GRID_GALLERY_RATIOS).map(ratios => ratios.height);
|
|
37
37
|
const heightRatio = number.findClosestNumber(heightRatios, aspectHeightRatio);
|
|
@@ -42,7 +42,7 @@ const GridGallery = function GridGallery2({
|
|
|
42
42
|
}
|
|
43
43
|
return GridGallery_types.RatioType.OneThird;
|
|
44
44
|
}, []);
|
|
45
|
-
const parsedAssets =
|
|
45
|
+
const parsedAssets = React.useMemo(() => {
|
|
46
46
|
const parsed = assetsInitial.map(asset => {
|
|
47
47
|
const ratioType = getAssetAspectRatioType(asset);
|
|
48
48
|
return {
|
|
@@ -60,8 +60,8 @@ const GridGallery = function GridGallery2({
|
|
|
60
60
|
return asset;
|
|
61
61
|
});
|
|
62
62
|
}, [assetsInitial, getAssetAspectRatioType]);
|
|
63
|
-
const [assetRows, setAssetRows] =
|
|
64
|
-
const createAssetRows =
|
|
63
|
+
const [assetRows, setAssetRows] = React.useState([]);
|
|
64
|
+
const createAssetRows = React.useCallback(() => {
|
|
65
65
|
const fullRows = [];
|
|
66
66
|
const partialRows = [];
|
|
67
67
|
const availableAssets = [...parsedAssets];
|
|
@@ -123,7 +123,7 @@ const GridGallery = function GridGallery2({
|
|
|
123
123
|
}
|
|
124
124
|
setAssetRows(fullRows);
|
|
125
125
|
}, [parsedAssets]);
|
|
126
|
-
|
|
126
|
+
React.useEffect(() => {
|
|
127
127
|
createAssetRows();
|
|
128
128
|
}, [
|
|
129
129
|
// HACK: needed parsedAssets to retrigger the effect
|
|
@@ -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('../../../constants/icons/index.js');
|
|
7
7
|
var Header_styles = require('../../Header/Header.styles.js');
|
|
@@ -24,9 +24,9 @@ const GridModal = function CartModal({
|
|
|
24
24
|
height,
|
|
25
25
|
videoStartTime
|
|
26
26
|
}) {
|
|
27
|
-
const ref =
|
|
28
|
-
const refVideo =
|
|
29
|
-
const [offsetTop, setOffsetTop] =
|
|
27
|
+
const ref = React.useRef(null);
|
|
28
|
+
const refVideo = React.useRef(null);
|
|
29
|
+
const [offsetTop, setOffsetTop] = React.useState(0);
|
|
30
30
|
reactUse.useClickAway(ref, onClose, ["click"]);
|
|
31
31
|
reactUse.useLockBodyScroll(open);
|
|
32
32
|
reactUse.useKeyPressEvent("Escape", () => {
|
|
@@ -34,12 +34,12 @@ const GridModal = function CartModal({
|
|
|
34
34
|
onClose();
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
|
|
37
|
+
React.useEffect(() => {
|
|
38
38
|
if (open && refVideo.current && videoStartTime) {
|
|
39
39
|
refVideo.current.currentTime = videoStartTime;
|
|
40
40
|
}
|
|
41
41
|
}, [open, videoStartTime]);
|
|
42
|
-
|
|
42
|
+
React.useEffect(() => {
|
|
43
43
|
if (window.scrollY === 0) {
|
|
44
44
|
setOffsetTop(Header_styles.HEADER_HEIGHT);
|
|
45
45
|
}
|
|
@@ -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 url = require('../../../constants/url.js');
|
|
7
7
|
require('../../../contexts/MenuContext/mapping.js');
|
|
@@ -20,8 +20,8 @@ const AccountFrame = function AccountFrame2({
|
|
|
20
20
|
renderImage,
|
|
21
21
|
account
|
|
22
22
|
}) {
|
|
23
|
-
const ref =
|
|
24
|
-
const name =
|
|
23
|
+
const ref = React.useRef(null);
|
|
24
|
+
const name = React.useRef(null);
|
|
25
25
|
const {
|
|
26
26
|
formatMessage
|
|
27
27
|
} = useTranslation.useTranslation({
|
|
@@ -60,8 +60,8 @@ const AccountFrame = function AccountFrame2({
|
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
const isHovering = reactUse.useHoverDirty(name);
|
|
63
|
-
const [showPopover, setShowPopover] =
|
|
64
|
-
|
|
63
|
+
const [showPopover, setShowPopover] = React.useState(false);
|
|
64
|
+
React.useEffect(() => {
|
|
65
65
|
if (name.current) {
|
|
66
66
|
const displayPopover = name.current.offsetWidth < name.current.scrollWidth;
|
|
67
67
|
if (displayPopover && isHovering) {
|
|
@@ -71,7 +71,7 @@ const AccountFrame = function AccountFrame2({
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}, [isHovering]);
|
|
74
|
-
const handleClose =
|
|
74
|
+
const handleClose = React.useCallback(() => {
|
|
75
75
|
onClose();
|
|
76
76
|
}, [onClose]);
|
|
77
77
|
reactUse.useClickAway(ref, event => {
|
|
@@ -87,22 +87,22 @@ const AccountFrame = function AccountFrame2({
|
|
|
87
87
|
handleClose();
|
|
88
88
|
}
|
|
89
89
|
}, ["click"]);
|
|
90
|
-
const hasAccountEvents =
|
|
90
|
+
const hasAccountEvents = React.useMemo(() => {
|
|
91
91
|
return !!(account && (account.handleLogin || account.handleRegister || account.handleLogout));
|
|
92
92
|
}, [account]);
|
|
93
|
-
const handleLogout =
|
|
93
|
+
const handleLogout = React.useCallback(() => {
|
|
94
94
|
account?.handleLogout?.();
|
|
95
95
|
handleClose();
|
|
96
96
|
}, [handleClose, account]);
|
|
97
|
-
const handleUnifiSiteManager =
|
|
97
|
+
const handleUnifiSiteManager = React.useCallback(() => {
|
|
98
98
|
window.open(url.ExternalUrl.UNIFI_SITE_MANAGER);
|
|
99
99
|
handleClose();
|
|
100
100
|
}, [handleClose]);
|
|
101
|
-
const handleOrderHistoryClick =
|
|
101
|
+
const handleOrderHistoryClick = React.useCallback(() => {
|
|
102
102
|
account?.handleOrderHistory?.();
|
|
103
103
|
handleClose();
|
|
104
104
|
}, [account, handleClose]);
|
|
105
|
-
const onManageAccount =
|
|
105
|
+
const onManageAccount = React.useCallback(() => {
|
|
106
106
|
account?.handleManageAccount?.();
|
|
107
107
|
handleClose();
|
|
108
108
|
}, [account, handleClose]);
|
|
@@ -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 url = require('../../../../constants/url.js');
|
|
6
6
|
require('../../../../contexts/MenuContext/mapping.js');
|
|
7
7
|
require('../../../../hooks/index.js');
|
|
@@ -54,14 +54,14 @@ const AccountFrameMobile = function AccountFrameMobile2({
|
|
|
54
54
|
}).then(res => res.default)
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
|
-
const hasAccountEvents =
|
|
57
|
+
const hasAccountEvents = React.useMemo(() => {
|
|
58
58
|
return !!(account?.handleLogin && account.handleRegister && account.handleLogout);
|
|
59
59
|
}, [account]);
|
|
60
|
-
const handleUnifiSiteManager =
|
|
60
|
+
const handleUnifiSiteManager = React.useCallback(() => {
|
|
61
61
|
window.open(url.ExternalUrl.UNIFI_SITE_MANAGER);
|
|
62
62
|
onClose();
|
|
63
63
|
}, [onClose]);
|
|
64
|
-
const onCloseFn =
|
|
64
|
+
const onCloseFn = React.useCallback(fn => {
|
|
65
65
|
return () => {
|
|
66
66
|
fn?.();
|
|
67
67
|
onClose();
|
|
@@ -5,7 +5,7 @@ var AccountMenu$1 = require('@ubnt/ui-components/aria/AccountMenu');
|
|
|
5
5
|
var Avatar = require('@ubnt/ui-components/aria/Avatar');
|
|
6
6
|
var experimental = require('@ubnt/ui-components/aria/experimental');
|
|
7
7
|
var Button = require('@ubnt/ui-components/Button');
|
|
8
|
-
var
|
|
8
|
+
var React = require('react');
|
|
9
9
|
var reactUse = require('react-use');
|
|
10
10
|
require('../../../assets/icons/menu/icon-avatar-placeholder-dark.png.js');
|
|
11
11
|
require('../../../assets/icons/menu/icon-avatar-placeholder.png.js');
|
|
@@ -91,30 +91,30 @@ const AccountMenu = ({
|
|
|
91
91
|
[constants.Language.Tw]: () => Promise.resolve(en["default"])
|
|
92
92
|
}
|
|
93
93
|
});
|
|
94
|
-
const megaphoneHttpService =
|
|
94
|
+
const megaphoneHttpService = React.useMemo(() => {
|
|
95
95
|
if (megaphoneServiceUrl) {
|
|
96
96
|
return new megaphone_http_service["default"](megaphoneServiceUrl);
|
|
97
97
|
}
|
|
98
98
|
return null;
|
|
99
99
|
}, [megaphoneServiceUrl]);
|
|
100
|
-
const hasAccountEvents =
|
|
100
|
+
const hasAccountEvents = React.useMemo(() => {
|
|
101
101
|
return !!(account && (account.handleLogin || account.handleRegister || account.handleLogout));
|
|
102
102
|
}, [account]);
|
|
103
|
-
const handleLogout =
|
|
103
|
+
const handleLogout = React.useCallback(() => {
|
|
104
104
|
account?.handleLogout?.();
|
|
105
105
|
}, [account]);
|
|
106
|
-
const handleUnifiSiteManager =
|
|
106
|
+
const handleUnifiSiteManager = React.useCallback(() => {
|
|
107
107
|
window.open(url.ExternalUrl.UNIFI_SITE_MANAGER);
|
|
108
108
|
}, []);
|
|
109
|
-
const handleOrderHistoryClick =
|
|
109
|
+
const handleOrderHistoryClick = React.useCallback(() => {
|
|
110
110
|
account?.handleOrderHistory?.();
|
|
111
111
|
}, [account]);
|
|
112
|
-
const onManageAccount =
|
|
112
|
+
const onManageAccount = React.useCallback(() => {
|
|
113
113
|
account?.handleManageAccount?.();
|
|
114
114
|
}, [account]);
|
|
115
|
-
const [announcements, setAnnouncements] =
|
|
116
|
-
const [, setIsAnnouncementsLoading] =
|
|
117
|
-
|
|
115
|
+
const [announcements, setAnnouncements] = React.useState([]);
|
|
116
|
+
const [, setIsAnnouncementsLoading] = React.useState(false);
|
|
117
|
+
React.useEffect(() => {
|
|
118
118
|
if (!megaphoneHttpService) {
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
@@ -123,12 +123,12 @@ const AccountMenu = ({
|
|
|
123
123
|
data
|
|
124
124
|
}) => setAnnouncements(data ?? [])).catch(e => console.error(e)).finally(() => setIsAnnouncementsLoading(false));
|
|
125
125
|
}, [megaphoneHttpService]);
|
|
126
|
-
const unreadAnnouncements =
|
|
126
|
+
const unreadAnnouncements = React.useMemo(() => {
|
|
127
127
|
return announcements.filter(({
|
|
128
128
|
isRead
|
|
129
129
|
}) => !isRead);
|
|
130
130
|
}, [announcements]);
|
|
131
|
-
const markAsRead =
|
|
131
|
+
const markAsRead = React.useCallback(async announcement => {
|
|
132
132
|
if (!megaphoneHttpService) {
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
@@ -140,7 +140,7 @@ const AccountMenu = ({
|
|
|
140
140
|
setAnnouncements([...filtered, announcement]);
|
|
141
141
|
});
|
|
142
142
|
}, [announcements, megaphoneHttpService]);
|
|
143
|
-
const getAnnouncementButtons =
|
|
143
|
+
const getAnnouncementButtons = React.useCallback((announcement, markAsRead2, onExternalClick) => {
|
|
144
144
|
return [/* @__PURE__ */jsxRuntime.jsx(Button.Button, {
|
|
145
145
|
variant: "inline",
|
|
146
146
|
type: "button",
|
|
@@ -155,7 +155,7 @@ const AccountMenu = ({
|
|
|
155
155
|
children: formatMessage("Show Me")
|
|
156
156
|
}, `btn-show-me-${announcement.announcementId}`)];
|
|
157
157
|
}, [formatMessage]);
|
|
158
|
-
const mappedAnnouncements =
|
|
158
|
+
const mappedAnnouncements = React.useMemo(() => {
|
|
159
159
|
return (unreadAnnouncements ?? [])?.map(announcement => ({
|
|
160
160
|
...announcement,
|
|
161
161
|
id: announcement.announcementId,
|
|
@@ -176,7 +176,7 @@ const AccountMenu = ({
|
|
|
176
176
|
animateIn,
|
|
177
177
|
animateOut
|
|
178
178
|
} = Avatar.useAnnouncementAnimation(START_KEY, "userAvatar" /* UserAvatar */);
|
|
179
|
-
|
|
179
|
+
React.useEffect(() => {
|
|
180
180
|
if (announcements?.length) {
|
|
181
181
|
animateIn();
|
|
182
182
|
return;
|
|
@@ -186,10 +186,10 @@ const AccountMenu = ({
|
|
|
186
186
|
}
|
|
187
187
|
animateOut();
|
|
188
188
|
}, [animateIn, animateOut, announcements, display]);
|
|
189
|
-
const showOrderHistory =
|
|
190
|
-
const showLogin =
|
|
191
|
-
const showUiAccount =
|
|
192
|
-
const unifiSiteManagerButtonVariant =
|
|
189
|
+
const showOrderHistory = React.useMemo(() => !!(account?.customer && account?.handleOrderHistory), [account?.customer, account?.handleOrderHistory]);
|
|
190
|
+
const showLogin = React.useMemo(() => !!(!account?.customer && account?.handleLogin), [account?.customer, account?.handleLogin]);
|
|
191
|
+
const showUiAccount = React.useMemo(() => !!(!hasAccountEvents || account?.customer && !account?.handleManageAccount), [account?.customer, account?.handleManageAccount, hasAccountEvents]);
|
|
192
|
+
const unifiSiteManagerButtonVariant = React.useMemo(() => {
|
|
193
193
|
if (showOrderHistory || showLogin || showUiAccount) {
|
|
194
194
|
return "tertiary";
|
|
195
195
|
}
|
|
@@ -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('../../../../assets/icons/cartEmpty.svg.js');
|
|
7
7
|
require('../../../StaticModal/index.js');
|
|
@@ -24,8 +24,8 @@ const EmptyCartModal = function EmptyCartModal2({
|
|
|
24
24
|
open,
|
|
25
25
|
onClose
|
|
26
26
|
}) {
|
|
27
|
-
const ref =
|
|
28
|
-
const handleClose =
|
|
27
|
+
const ref = React.useRef(null);
|
|
28
|
+
const handleClose = React.useCallback(() => {
|
|
29
29
|
onClose();
|
|
30
30
|
}, [onClose]);
|
|
31
31
|
reactUse.useClickAway(ref, () => handleClose(), ["click"]);
|
|
@@ -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/cart.svg.js');
|
|
6
6
|
require('../../../constants/icons/index.js');
|
|
7
7
|
require('../../StyleableSvgImage/index.js');
|
|
@@ -27,16 +27,16 @@ const CartModal = function CartModal2({
|
|
|
27
27
|
onClose,
|
|
28
28
|
cart
|
|
29
29
|
}) {
|
|
30
|
-
const handleReviewClick =
|
|
30
|
+
const handleReviewClick = React.useCallback(() => {
|
|
31
31
|
onClose();
|
|
32
32
|
cart?.onReview();
|
|
33
33
|
}, [cart, onClose]);
|
|
34
|
-
const bodyItemsRef =
|
|
35
|
-
const [bodyItemsGradient, setBodyItemsGradient] =
|
|
34
|
+
const bodyItemsRef = React.useRef(null);
|
|
35
|
+
const [bodyItemsGradient, setBodyItemsGradient] = React.useState({
|
|
36
36
|
top: false,
|
|
37
37
|
bottom: false
|
|
38
38
|
});
|
|
39
|
-
|
|
39
|
+
React.useEffect(() => {
|
|
40
40
|
const el = bodyItemsRef.current;
|
|
41
41
|
if (!el) return;
|
|
42
42
|
const handleSetBodyItemsGradient = () => {
|
|
@@ -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('../../../CustomImage/index.js');
|
|
7
7
|
require('../../../StyleableSvgImage/index.js');
|
|
@@ -23,11 +23,11 @@ const CartModalItem = function CartModalItem2({
|
|
|
23
23
|
item,
|
|
24
24
|
translations
|
|
25
25
|
}) {
|
|
26
|
-
const inputRef =
|
|
27
|
-
const controlsDisableIncrease =
|
|
26
|
+
const inputRef = React.useRef(null);
|
|
27
|
+
const controlsDisableIncrease = React.useMemo(() => {
|
|
28
28
|
return item.controls?.quantityMax ? item.quantity >= item.controls.quantityMax : false;
|
|
29
29
|
}, [item.controls.quantityMax, item.quantity]);
|
|
30
|
-
const onQuantityInputChange =
|
|
30
|
+
const onQuantityInputChange = React.useCallback(e => {
|
|
31
31
|
const value = parseInt(e.target.value);
|
|
32
32
|
const newQuantity = Math.max(0, Math.min(!isNaN(value) ? value : item.quantity, item.controls?.quantityMax ?? Infinity));
|
|
33
33
|
item.controls?.onQuantityChange(newQuantity);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var LineLoader = require('@ubnt/ui-components/LineLoader');
|
|
5
5
|
var merge = require('lodash/merge');
|
|
6
|
-
var
|
|
6
|
+
var React = require('react');
|
|
7
7
|
var reactUse = require('react-use');
|
|
8
8
|
require('../../constants/icons/index.js');
|
|
9
9
|
var layout = require('../../constants/layout.js');
|
|
@@ -65,7 +65,7 @@ var _externalAssets_TKrekyEi__default = /*#__PURE__*/_interopDefault(_externalAs
|
|
|
65
65
|
var logoUnifi__default = /*#__PURE__*/_interopDefault(logoUnifi);
|
|
66
66
|
var globe__default = /*#__PURE__*/_interopDefault(globe);
|
|
67
67
|
"use strict";
|
|
68
|
-
const GlobalHeader =
|
|
68
|
+
const GlobalHeader = React.memo(function GlobalHeader2({
|
|
69
69
|
className,
|
|
70
70
|
motif: propMotif,
|
|
71
71
|
translations: initialTranslations,
|
|
@@ -91,7 +91,7 @@ const GlobalHeader = react.memo(function GlobalHeader2({
|
|
|
91
91
|
accountMenu
|
|
92
92
|
}) {
|
|
93
93
|
const isMobile = reactUse.useMedia(layout.BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN, false);
|
|
94
|
-
const translations =
|
|
94
|
+
const translations = React.useMemo(() => {
|
|
95
95
|
return merge__default["default"](Header_types.defaultHeaderTranslations, initialTranslations);
|
|
96
96
|
}, [initialTranslations]);
|
|
97
97
|
const {
|
|
@@ -152,20 +152,20 @@ const GlobalHeader = react.memo(function GlobalHeader2({
|
|
|
152
152
|
}).then(res => res.default)
|
|
153
153
|
}
|
|
154
154
|
});
|
|
155
|
-
|
|
155
|
+
React.useEffect(() => {
|
|
156
156
|
setMotif(propMotif);
|
|
157
157
|
}, [propMotif, setMotif]);
|
|
158
|
-
const [initialActiveModalDone, setInitialActiveModalDone] =
|
|
159
|
-
|
|
158
|
+
const [initialActiveModalDone, setInitialActiveModalDone] = React.useState(false);
|
|
159
|
+
React.useEffect(() => {
|
|
160
160
|
if (!initialActiveModal || initialActiveModalDone) return;
|
|
161
161
|
setActiveModal(initialActiveModal);
|
|
162
162
|
setInitialActiveModalDone(true);
|
|
163
163
|
}, [initialActiveModal, initialActiveModalDone, setActiveModal]);
|
|
164
|
-
|
|
164
|
+
React.useEffect(() => {
|
|
165
165
|
if (activeModal === prevActiveModal) return;
|
|
166
166
|
onActiveModal?.(activeModal, prevActiveModal);
|
|
167
167
|
}, [activeModal, onActiveModal, prevActiveModal]);
|
|
168
|
-
const handleModalOpen =
|
|
168
|
+
const handleModalOpen = React.useCallback((e, id) => {
|
|
169
169
|
e?.stopPropagation();
|
|
170
170
|
if (activeModal != id) {
|
|
171
171
|
onModalOpen?.();
|
|
@@ -180,14 +180,14 @@ const GlobalHeader = react.memo(function GlobalHeader2({
|
|
|
180
180
|
}
|
|
181
181
|
setActiveModal(!id || activeModal === id ? null : id);
|
|
182
182
|
}, [activeModal, onCartClick, setActiveModal, onModalOpen, createSiteUrl]);
|
|
183
|
-
const handleModalClose =
|
|
183
|
+
const handleModalClose = React.useCallback(() => {
|
|
184
184
|
setActiveModal(null);
|
|
185
185
|
}, [setActiveModal]);
|
|
186
186
|
reactUse.useKeyPressEvent("Escape", handleModalClose);
|
|
187
|
-
const cartQuantity =
|
|
187
|
+
const cartQuantity = React.useMemo(() => {
|
|
188
188
|
return cart?.items.reduce((sum, item) => sum + item.quantity, 0) ?? 0;
|
|
189
189
|
}, [cart?.items]);
|
|
190
|
-
const handleHamburgerClick =
|
|
190
|
+
const handleHamburgerClick = React.useCallback(() => {
|
|
191
191
|
if (!isMobile) return;
|
|
192
192
|
if (activeModal === types.ModalId.MobileMenu) {
|
|
193
193
|
setActiveModal(null);
|
|
@@ -195,19 +195,19 @@ const GlobalHeader = react.memo(function GlobalHeader2({
|
|
|
195
195
|
setActiveModal(types.ModalId.MobileMenu);
|
|
196
196
|
}
|
|
197
197
|
}, [activeModal, isMobile, setActiveModal]);
|
|
198
|
-
const headerBarMotif =
|
|
198
|
+
const headerBarMotif = React.useMemo(() => {
|
|
199
199
|
if (activeModal === types.ModalId.Search) {
|
|
200
200
|
return "dark";
|
|
201
201
|
}
|
|
202
202
|
return motif;
|
|
203
203
|
}, [activeModal, motif]);
|
|
204
|
-
const [showTouchMicrositeMenu, setShowTouchMicrositeMenu] =
|
|
205
|
-
const logoRef =
|
|
204
|
+
const [showTouchMicrositeMenu, setShowTouchMicrositeMenu] = React.useState(false);
|
|
205
|
+
const logoRef = React.useRef(null);
|
|
206
206
|
const logoHover = reactUse.useHoverDirty(logoRef);
|
|
207
|
-
const showMicrositeMenu =
|
|
207
|
+
const showMicrositeMenu = React.useMemo(() => {
|
|
208
208
|
return logoHover || showTouchMicrositeMenu;
|
|
209
209
|
}, [logoHover, showTouchMicrositeMenu]);
|
|
210
|
-
const onLogoAnchorTouchEnd =
|
|
210
|
+
const onLogoAnchorTouchEnd = React.useCallback(ev => {
|
|
211
211
|
if (!micrositeMenu && !embedConfig?.homeLinkClickHandler) return;
|
|
212
212
|
ev.preventDefault();
|
|
213
213
|
if (embedConfig?.homeLinkClickHandler) {
|
|
@@ -216,8 +216,8 @@ const GlobalHeader = react.memo(function GlobalHeader2({
|
|
|
216
216
|
}
|
|
217
217
|
setShowTouchMicrositeMenu(show => !show);
|
|
218
218
|
}, [embedConfig, micrositeMenu]);
|
|
219
|
-
const wrapRef =
|
|
220
|
-
|
|
219
|
+
const wrapRef = React.useRef(null);
|
|
220
|
+
React.useEffect(() => {
|
|
221
221
|
if (!wrapRef.current) {
|
|
222
222
|
setNavigationOutOfView(true);
|
|
223
223
|
return;
|
|
@@ -231,7 +231,7 @@ const GlobalHeader = react.memo(function GlobalHeader2({
|
|
|
231
231
|
const {
|
|
232
232
|
y: scrollY
|
|
233
233
|
} = reactUse.useWindowScroll();
|
|
234
|
-
const sticky =
|
|
234
|
+
const sticky = React.useMemo(() => {
|
|
235
235
|
return (
|
|
236
236
|
// Set as sticky if mobile menu is open
|
|
237
237
|
activeModal === types.ModalId.MobileMenu ||
|
|
@@ -239,13 +239,13 @@ const GlobalHeader = react.memo(function GlobalHeader2({
|
|
|
239
239
|
stickyInitial && scrollY > 0
|
|
240
240
|
);
|
|
241
241
|
}, [activeModal, scrollY, stickyInitial]);
|
|
242
|
-
const showEmptyCartModal =
|
|
242
|
+
const showEmptyCartModal = React.useMemo(() => {
|
|
243
243
|
return activeModal === types.ModalId.Cart && !onCartClick && !cart?.items.length;
|
|
244
244
|
}, [activeModal, cart?.items.length, onCartClick]);
|
|
245
|
-
const showFullCartModal =
|
|
245
|
+
const showFullCartModal = React.useMemo(() => {
|
|
246
246
|
return activeModal === types.ModalId.Cart && !onCartClick && !!cart?.items.length;
|
|
247
247
|
}, [activeModal, cart?.items.length, onCartClick]);
|
|
248
|
-
const overlayShowForModal =
|
|
248
|
+
const overlayShowForModal = React.useMemo(() => {
|
|
249
249
|
const overlayModals = [types.ModalId.Search, types.ModalId.Cart];
|
|
250
250
|
if (!activeModal || !overlayModals.includes(activeModal)) {
|
|
251
251
|
return null;
|
|
@@ -255,7 +255,7 @@ const GlobalHeader = react.memo(function GlobalHeader2({
|
|
|
255
255
|
}
|
|
256
256
|
return activeModal;
|
|
257
257
|
}, [activeModal, showFullCartModal]);
|
|
258
|
-
const storeLink =
|
|
258
|
+
const storeLink = React.useMemo(() => {
|
|
259
259
|
const storeLinkSearchParams = (() => {
|
|
260
260
|
let category;
|
|
261
261
|
switch (activeNavigationSection.type) {
|
|
@@ -282,12 +282,12 @@ const GlobalHeader = react.memo(function GlobalHeader2({
|
|
|
282
282
|
})();
|
|
283
283
|
return createSiteUrl([mapping.SiteId.Store, "/", storeLinkSearchParams]);
|
|
284
284
|
}, [activeNavigationSection, createSiteUrl]);
|
|
285
|
-
const handleStoreSearchClick =
|
|
285
|
+
const handleStoreSearchClick = React.useCallback(() => {
|
|
286
286
|
trackStoreSearchClick?.();
|
|
287
287
|
}, [trackStoreSearchClick]);
|
|
288
|
-
const headerWrapRef =
|
|
289
|
-
const [headerWrapScrollTop, setHeaderWrapScrollTop] =
|
|
290
|
-
|
|
288
|
+
const headerWrapRef = React.useRef(null);
|
|
289
|
+
const [headerWrapScrollTop, setHeaderWrapScrollTop] = React.useState(0);
|
|
290
|
+
React.useEffect(() => {
|
|
291
291
|
if (!stickyCarousel) return;
|
|
292
292
|
if (sticky) {
|
|
293
293
|
setHeaderWrapScrollTop(0);
|
|
@@ -300,7 +300,7 @@ const GlobalHeader = react.memo(function GlobalHeader2({
|
|
|
300
300
|
// HACK: needed scrollY to retrigger the effect
|
|
301
301
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
302
302
|
scrollY, sticky, stickyCarousel]);
|
|
303
|
-
const avatarHtml =
|
|
303
|
+
const avatarHtml = React.useMemo(() => {
|
|
304
304
|
if (embedConfig?.hideAvatarIcon) {
|
|
305
305
|
return null;
|
|
306
306
|
}
|
|
@@ -323,12 +323,12 @@ const GlobalHeader = react.memo(function GlobalHeader2({
|
|
|
323
323
|
})
|
|
324
324
|
});
|
|
325
325
|
}, [account?.loading, embedConfig?.hideAvatarIcon, handleModalOpen, motif]);
|
|
326
|
-
const accountItem =
|
|
326
|
+
const accountItem = React.useMemo(() => {
|
|
327
327
|
if (!accountMenu) {
|
|
328
328
|
return avatarHtml;
|
|
329
329
|
}
|
|
330
|
-
if (
|
|
331
|
-
return
|
|
330
|
+
if (React.isValidElement(accountMenu)) {
|
|
331
|
+
return React.cloneElement(accountMenu, {
|
|
332
332
|
/**
|
|
333
333
|
* We are setting state to null to close all other modals because
|
|
334
334
|
* the AccountMenu open state is not controlled by the Header component
|
|
@@ -339,8 +339,8 @@ const GlobalHeader = react.memo(function GlobalHeader2({
|
|
|
339
339
|
}
|
|
340
340
|
return accountMenu;
|
|
341
341
|
}, [accountMenu, avatarHtml, handleModalClose]);
|
|
342
|
-
const [documentPaddingRight, setDocumentPaddingRight] =
|
|
343
|
-
|
|
342
|
+
const [documentPaddingRight, setDocumentPaddingRight] = React.useState(null);
|
|
343
|
+
React.useEffect(() => {
|
|
344
344
|
const mutationCallback = mutationsList => {
|
|
345
345
|
for (const mutation of mutationsList) {
|
|
346
346
|
if (mutation.type === "attributes" && mutation.attributeName === "style") {
|
|
@@ -360,7 +360,7 @@ const GlobalHeader = react.memo(function GlobalHeader2({
|
|
|
360
360
|
observer.disconnect();
|
|
361
361
|
};
|
|
362
362
|
}, []);
|
|
363
|
-
const stickyPadding =
|
|
363
|
+
const stickyPadding = React.useMemo(() => {
|
|
364
364
|
if (sticky && documentPaddingRight) {
|
|
365
365
|
return documentPaddingRight;
|
|
366
366
|
}
|