@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,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('./icons/index.js');
|
|
4
|
-
var
|
|
4
|
+
var _externalAssets_NxsKXHyJ = require("../assets/black.svg");
|
|
5
5
|
var _externalAssets_DxR_vr6$ = require("../assets/blackFabric.png");
|
|
6
6
|
var _externalAssets_D_2KPJKL = require("../assets/camo.png");
|
|
7
7
|
var _externalAssets_AeQRmq$G = require("../assets/concrete.png");
|
|
8
8
|
var _externalAssets_CoJwwvt7 = require("../assets/marble.png");
|
|
9
9
|
var _externalAssets_kQL$tT0V = require("../assets/wood.png");
|
|
10
|
-
var
|
|
10
|
+
var _externalAssets_WKvVtlSv = require("../assets/black.svg");
|
|
11
11
|
var _externalAssets_DTFMFQ51 = require("../assets/blue.svg");
|
|
12
12
|
var _externalAssets_Dh1AHi98 = require("../assets/white.svg");
|
|
13
13
|
var _externalAssets_B1Gj17va = require("../assets/darkGrey.svg");
|
|
@@ -18,13 +18,13 @@ function _interopDefault(e) {
|
|
|
18
18
|
default: e
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
var
|
|
21
|
+
var _externalAssets_NxsKXHyJ__default = /*#__PURE__*/_interopDefault(_externalAssets_NxsKXHyJ);
|
|
22
22
|
var _externalAssets_DxR_vr6$__default = /*#__PURE__*/_interopDefault(_externalAssets_DxR_vr6$);
|
|
23
23
|
var _externalAssets_D_2KPJKL__default = /*#__PURE__*/_interopDefault(_externalAssets_D_2KPJKL);
|
|
24
24
|
var _externalAssets_AeQRmq$G__default = /*#__PURE__*/_interopDefault(_externalAssets_AeQRmq$G);
|
|
25
25
|
var _externalAssets_CoJwwvt7__default = /*#__PURE__*/_interopDefault(_externalAssets_CoJwwvt7);
|
|
26
26
|
var _externalAssets_kQL$tT0V__default = /*#__PURE__*/_interopDefault(_externalAssets_kQL$tT0V);
|
|
27
|
-
var
|
|
27
|
+
var _externalAssets_WKvVtlSv__default = /*#__PURE__*/_interopDefault(_externalAssets_WKvVtlSv);
|
|
28
28
|
var _externalAssets_DTFMFQ51__default = /*#__PURE__*/_interopDefault(_externalAssets_DTFMFQ51);
|
|
29
29
|
var _externalAssets_Dh1AHi98__default = /*#__PURE__*/_interopDefault(_externalAssets_Dh1AHi98);
|
|
30
30
|
var _externalAssets_B1Gj17va__default = /*#__PURE__*/_interopDefault(_externalAssets_B1Gj17va);
|
|
@@ -53,7 +53,7 @@ var OptionColors = /* @__PURE__ */(OptionColors2 => {
|
|
|
53
53
|
return OptionColors2;
|
|
54
54
|
})(OptionColors || {});
|
|
55
55
|
const optionStyle = {
|
|
56
|
-
["black" /* black */]:
|
|
56
|
+
["black" /* black */]: _externalAssets_NxsKXHyJ__default["default"],
|
|
57
57
|
["black-fabric" /* blackFabric */]: _externalAssets_DxR_vr6$__default["default"],
|
|
58
58
|
["camo" /* camo */]: _externalAssets_D_2KPJKL__default["default"],
|
|
59
59
|
["concrete" /* concrete */]: _externalAssets_AeQRmq$G__default["default"],
|
|
@@ -62,7 +62,7 @@ const optionStyle = {
|
|
|
62
62
|
};
|
|
63
63
|
const optionColors = {
|
|
64
64
|
// Common
|
|
65
|
-
["black" /* black */]:
|
|
65
|
+
["black" /* black */]: _externalAssets_WKvVtlSv__default["default"],
|
|
66
66
|
["blue" /* blue */]: _externalAssets_DTFMFQ51__default["default"],
|
|
67
67
|
["white" /* white */]: _externalAssets_Dh1AHi98__default["default"],
|
|
68
68
|
// US English
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import './icons/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import _externalAssets_NxsKXHyJ__default from "../assets/black.svg";
|
|
3
3
|
import _externalAssets_DxR_vr6$__default from "../assets/blackFabric.png";
|
|
4
4
|
import _externalAssets_D_2KPJKL__default from "../assets/camo.png";
|
|
5
5
|
import _externalAssets_AeQRmq$G__default from "../assets/concrete.png";
|
|
6
6
|
import _externalAssets_CoJwwvt7__default from "../assets/marble.png";
|
|
7
7
|
import _externalAssets_kQL$tT0V__default from "../assets/wood.png";
|
|
8
|
-
import
|
|
8
|
+
import _externalAssets_WKvVtlSv__default from "../assets/black.svg";
|
|
9
9
|
import _externalAssets_DTFMFQ51__default from "../assets/blue.svg";
|
|
10
10
|
import _externalAssets_Dh1AHi98__default from "../assets/white.svg";
|
|
11
11
|
import _externalAssets_B1Gj17va__default from "../assets/darkGrey.svg";
|
|
@@ -34,7 +34,7 @@ var OptionColors = /* @__PURE__ */(OptionColors2 => {
|
|
|
34
34
|
return OptionColors2;
|
|
35
35
|
})(OptionColors || {});
|
|
36
36
|
const optionStyle = {
|
|
37
|
-
["black" /* black */]:
|
|
37
|
+
["black" /* black */]: _externalAssets_NxsKXHyJ__default,
|
|
38
38
|
["black-fabric" /* blackFabric */]: _externalAssets_DxR_vr6$__default,
|
|
39
39
|
["camo" /* camo */]: _externalAssets_D_2KPJKL__default,
|
|
40
40
|
["concrete" /* concrete */]: _externalAssets_AeQRmq$G__default,
|
|
@@ -43,7 +43,7 @@ const optionStyle = {
|
|
|
43
43
|
};
|
|
44
44
|
const optionColors = {
|
|
45
45
|
// Common
|
|
46
|
-
["black" /* black */]:
|
|
46
|
+
["black" /* black */]: _externalAssets_WKvVtlSv__default,
|
|
47
47
|
["blue" /* blue */]: _externalAssets_DTFMFQ51__default,
|
|
48
48
|
["white" /* white */]: _externalAssets_Dh1AHi98__default,
|
|
49
49
|
// US English
|
|
@@ -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 layout = require('../../constants/layout.js');
|
|
7
7
|
var useLockBodyScrollCustom = require('../../hooks/useLockBodyScrollCustom.js');
|
|
@@ -10,7 +10,7 @@ var mapping = require('./mapping.js');
|
|
|
10
10
|
var types = require('./types.js');
|
|
11
11
|
var utils = require('./utils.js');
|
|
12
12
|
"use strict";
|
|
13
|
-
const MenuContext =
|
|
13
|
+
const MenuContext = React.createContext(null);
|
|
14
14
|
const MenuContextProvider = ({
|
|
15
15
|
context,
|
|
16
16
|
pathname: currentPathname = "/",
|
|
@@ -24,33 +24,33 @@ const MenuContextProvider = ({
|
|
|
24
24
|
const isMobile = reactUse.useMedia(layout.BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN, false
|
|
25
25
|
// Fallback value for SSR
|
|
26
26
|
);
|
|
27
|
-
const getSiteConfig =
|
|
28
|
-
const currentSiteConfig =
|
|
27
|
+
const getSiteConfig = React.useCallback((siteId, storeIdOverride) => utils.getGlobalSiteConfig(globalSiteConfig, siteId, storeIdOverride ?? storeId), [globalSiteConfig, storeId]);
|
|
28
|
+
const currentSiteConfig = React.useMemo(
|
|
29
29
|
// Generic site doesn't have a site config
|
|
30
30
|
() => getSiteConfig(context), [context, getSiteConfig]);
|
|
31
|
-
const deployedLanguages =
|
|
31
|
+
const deployedLanguages = React.useMemo(() => {
|
|
32
32
|
return currentSiteConfig.languages ?? [
|
|
33
33
|
/** Left empty as that indicates given site doesn't implement multiple language AT ALL. For example store would
|
|
34
34
|
* have single language for now, but UISP doesn't have at all.
|
|
35
35
|
*/
|
|
36
36
|
];
|
|
37
37
|
}, [currentSiteConfig.languages]);
|
|
38
|
-
const isMultiLanguage =
|
|
38
|
+
const isMultiLanguage = React.useMemo(() => {
|
|
39
39
|
return deployedLanguages.length > 1;
|
|
40
40
|
}, [deployedLanguages]);
|
|
41
|
-
const isLongLanguage =
|
|
42
|
-
const [isSsr, setIsSsr] =
|
|
43
|
-
|
|
41
|
+
const isLongLanguage = React.useMemo(() => mapping.LONG_LANGUAGES.includes(language), [language]);
|
|
42
|
+
const [isSsr, setIsSsr] = React.useState(hasSsrCapability);
|
|
43
|
+
React.useEffect(() => {
|
|
44
44
|
setIsSsr(false);
|
|
45
45
|
}, []);
|
|
46
|
-
const storeBaseUrl =
|
|
47
|
-
const [motif, setMotif] =
|
|
48
|
-
const handleSetMotif =
|
|
46
|
+
const storeBaseUrl = React.useMemo(() => getSiteConfig(mapping.SiteId.Store).baseUrl, [getSiteConfig]);
|
|
47
|
+
const [motif, setMotif] = React.useState("light");
|
|
48
|
+
const handleSetMotif = React.useCallback(motif2 => {
|
|
49
49
|
if (["light", "dark"].includes(motif2)) {
|
|
50
50
|
setMotif(motif2);
|
|
51
51
|
}
|
|
52
52
|
}, []);
|
|
53
|
-
const isMicrositeContext =
|
|
53
|
+
const isMicrositeContext = React.useMemo(() => {
|
|
54
54
|
switch (context) {
|
|
55
55
|
case null:
|
|
56
56
|
case void 0:
|
|
@@ -79,33 +79,33 @@ const MenuContextProvider = ({
|
|
|
79
79
|
const [{
|
|
80
80
|
activeModal,
|
|
81
81
|
prevActiveModal
|
|
82
|
-
}, _setActiveModal] =
|
|
82
|
+
}, _setActiveModal] = React.useState({
|
|
83
83
|
activeModal: null,
|
|
84
84
|
prevActiveModal: null
|
|
85
85
|
});
|
|
86
|
-
const setActiveModal =
|
|
86
|
+
const setActiveModal = React.useCallback(id => {
|
|
87
87
|
_setActiveModal({
|
|
88
88
|
activeModal: id,
|
|
89
89
|
prevActiveModal: activeModal
|
|
90
90
|
});
|
|
91
91
|
}, [activeModal]);
|
|
92
|
-
|
|
92
|
+
React.useEffect(() => {
|
|
93
93
|
if (!isMobile && activeModal && [types.ModalId.MobileMenu, types.ModalId.ProMobileMenu].includes(activeModal)) {
|
|
94
94
|
setActiveModal(null);
|
|
95
95
|
}
|
|
96
96
|
}, [activeModal, isMobile, setActiveModal]);
|
|
97
97
|
useLockBodyScrollCustom.useLockBodyScrollCustom(!!activeModal && [types.ModalId.MobileMenu, types.ModalId.ProMobileMenu].includes(activeModal));
|
|
98
|
-
const currentCollectionPath =
|
|
98
|
+
const currentCollectionPath = React.useMemo(() => {
|
|
99
99
|
const url = new URL(currentPathname, storeBaseUrl);
|
|
100
100
|
const matches = /(\/collections\/[\w-]+)/i.exec(url.pathname);
|
|
101
101
|
return matches?.[1];
|
|
102
102
|
}, [storeBaseUrl, currentPathname]);
|
|
103
|
-
const currentProductPath =
|
|
103
|
+
const currentProductPath = React.useMemo(() => {
|
|
104
104
|
const url = new URL(currentPathname, storeBaseUrl);
|
|
105
105
|
const matches = /((\/collections\/.+)?\/products\/[\w-]+)/i.exec(url.pathname);
|
|
106
106
|
return matches?.[1];
|
|
107
107
|
}, [storeBaseUrl, currentPathname]);
|
|
108
|
-
const isPathnameActive =
|
|
108
|
+
const isPathnameActive = React.useCallback(pathname => {
|
|
109
109
|
if (mapping.GENERIC_SITE_IDS.includes(context)) {
|
|
110
110
|
return false;
|
|
111
111
|
}
|
|
@@ -116,14 +116,14 @@ const MenuContextProvider = ({
|
|
|
116
116
|
}
|
|
117
117
|
return !!currentCollectionPath && utils.isPartOfUrlPathname(pathname, currentCollectionPath) || !!currentProductPath && utils.isPartOfUrlPathname(pathname, currentProductPath);
|
|
118
118
|
}, [context, isMicrositeContext, currentCollectionPath, currentProductPath, currentPathname]);
|
|
119
|
-
const isSiteUrlActive =
|
|
119
|
+
const isSiteUrlActive = React.useCallback(url => {
|
|
120
120
|
return isMicrositeContext &&
|
|
121
121
|
// While SiteId is considered a microsite we don't want url matching for it
|
|
122
122
|
!mapping.GENERIC_SITE_IDS.includes(context) && url && url[0] !== mapping.SiteId.Store && url[0] === context && utils.isPartOfUrlPathname(currentPathname, url[1]) && (
|
|
123
123
|
// If there's a hash in the SiteUrl, it should match the current hash for the item to be active
|
|
124
124
|
!url[3] || currentHash.replace(/^#/, "") === url[3]);
|
|
125
125
|
}, [context, currentHash, currentPathname, isMicrositeContext]);
|
|
126
|
-
const createSiteUrl =
|
|
126
|
+
const createSiteUrl = React.useCallback(siteUrl => {
|
|
127
127
|
const addSiteConfigReferenceSearchParams = !mapping.GENERIC_SITE_IDS.includes(context);
|
|
128
128
|
const [siteId] = siteUrl;
|
|
129
129
|
const targetSiteConfig = getSiteConfig(siteId);
|
|
@@ -136,7 +136,7 @@ const MenuContextProvider = ({
|
|
|
136
136
|
context
|
|
137
137
|
});
|
|
138
138
|
}, [context, getSiteConfig, storeId, language]);
|
|
139
|
-
const parseSubSubRecursiveItems =
|
|
139
|
+
const parseSubSubRecursiveItems = React.useCallback(subSubItem => {
|
|
140
140
|
const nestedSubSubItems = "items" in subSubItem && subSubItem.items ? subSubItem.items.map(parseSubSubRecursiveItems).filter(el => !!el) : [];
|
|
141
141
|
const url = isMicrositeContext && subSubItem.url ? createSiteUrl(subSubItem.url) :
|
|
142
142
|
// TODO: maybe need to improve to get first "available" child not the first form array, not sure if the
|
|
@@ -163,10 +163,10 @@ const MenuContextProvider = ({
|
|
|
163
163
|
items: nestedSubSubItems
|
|
164
164
|
};
|
|
165
165
|
}, [isMicrositeContext, createSiteUrl, isSiteUrlActive]);
|
|
166
|
-
const parseSubSubMenuItems =
|
|
166
|
+
const parseSubSubMenuItems = React.useCallback(subItem => {
|
|
167
167
|
return ("items" in subItem ? subItem.items : []).map(parseSubSubRecursiveItems).filter(el => !!el);
|
|
168
168
|
}, [parseSubSubRecursiveItems]);
|
|
169
|
-
const parseSubMenuItem =
|
|
169
|
+
const parseSubMenuItem = React.useCallback(subItem => {
|
|
170
170
|
const subItemUrl = utils.getSubItemUrl(subItem, isSiteUrlActive);
|
|
171
171
|
const url = subItemUrl ? new URL(createSiteUrl(subItemUrl)) : null;
|
|
172
172
|
if (!url) {
|
|
@@ -194,7 +194,7 @@ const MenuContextProvider = ({
|
|
|
194
194
|
items: subSubItems
|
|
195
195
|
};
|
|
196
196
|
}, [isSiteUrlActive, createSiteUrl, parseSubSubMenuItems]);
|
|
197
|
-
const parseMenuItem =
|
|
197
|
+
const parseMenuItem = React.useCallback(item => {
|
|
198
198
|
const subItems = item.items.map(parseSubMenuItem).filter(subItem => !!subItem);
|
|
199
199
|
let itemActive = false;
|
|
200
200
|
if (isMicrositeContext &&
|
|
@@ -214,8 +214,8 @@ const MenuContextProvider = ({
|
|
|
214
214
|
possible: subItems.length === 0 || subItems.some(item2 => item2.possible)
|
|
215
215
|
};
|
|
216
216
|
}, [parseSubMenuItem, isMicrositeContext, context, currentPathname, createSiteUrl, storeBaseUrl]);
|
|
217
|
-
const parseItemsFn =
|
|
218
|
-
const parseSection =
|
|
217
|
+
const parseItemsFn = React.useCallback(items => items.map(parseMenuItem), [parseMenuItem]);
|
|
218
|
+
const parseSection = React.useCallback(sectionType => {
|
|
219
219
|
const section = mapping.NAVIGATION_MAPPING[sectionType];
|
|
220
220
|
const parsedItems = parseItemsFn(section.items ?? []);
|
|
221
221
|
const url = section.url ? createSiteUrl(section.url) : null;
|
|
@@ -234,7 +234,7 @@ const MenuContextProvider = ({
|
|
|
234
234
|
items: parsedItems
|
|
235
235
|
};
|
|
236
236
|
}, [createSiteUrl, storeBaseUrl, parseItemsFn]);
|
|
237
|
-
const navigation =
|
|
237
|
+
const navigation = React.useMemo(() => {
|
|
238
238
|
const primary = parseSection("primary");
|
|
239
239
|
const secondary = parseSection("secondary");
|
|
240
240
|
if (secondary.active) {
|
|
@@ -247,7 +247,7 @@ const MenuContextProvider = ({
|
|
|
247
247
|
secondary
|
|
248
248
|
};
|
|
249
249
|
}, [parseSection]);
|
|
250
|
-
const activeNavigationSectionType =
|
|
250
|
+
const activeNavigationSectionType = React.useMemo(() => {
|
|
251
251
|
if (navigation.primary.active) {
|
|
252
252
|
return "primary";
|
|
253
253
|
}
|
|
@@ -256,23 +256,23 @@ const MenuContextProvider = ({
|
|
|
256
256
|
}
|
|
257
257
|
return [mapping.SiteId.Uisp, mapping.SiteId.ExpertsUisp].includes(context) ? "secondary" : "primary";
|
|
258
258
|
}, [context, navigation.primary.active, navigation.secondary.active]);
|
|
259
|
-
const activeNavigationSection =
|
|
259
|
+
const activeNavigationSection = React.useMemo(() => {
|
|
260
260
|
return navigation[activeNavigationSectionType];
|
|
261
261
|
}, [activeNavigationSectionType, navigation]);
|
|
262
|
-
const inactiveNavigationSection =
|
|
262
|
+
const inactiveNavigationSection = React.useMemo(() => {
|
|
263
263
|
const inactiveType = activeNavigationSectionType === "primary" ? "secondary" : "primary";
|
|
264
264
|
return navigation[inactiveType];
|
|
265
265
|
}, [activeNavigationSectionType, navigation]);
|
|
266
|
-
const motifFinal =
|
|
266
|
+
const motifFinal = React.useMemo(() => {
|
|
267
267
|
if (activeModal === types.ModalId.MobileMenu) {
|
|
268
268
|
return "dark";
|
|
269
269
|
}
|
|
270
270
|
return motif;
|
|
271
271
|
}, [activeModal, motif]);
|
|
272
|
-
const [navigationOutOfView, setNavigationOutOfView] =
|
|
272
|
+
const [navigationOutOfView, setNavigationOutOfView] = React.useState(
|
|
273
273
|
// Default ref.current is null so by default it's not visible
|
|
274
274
|
true);
|
|
275
|
-
const value =
|
|
275
|
+
const value = React.useMemo(() => ({
|
|
276
276
|
// Unrelated util to help aid with SSR in various places in app
|
|
277
277
|
isSsr,
|
|
278
278
|
storeId,
|
|
@@ -302,7 +302,7 @@ const MenuContextProvider = ({
|
|
|
302
302
|
});
|
|
303
303
|
};
|
|
304
304
|
function useMenu() {
|
|
305
|
-
const context =
|
|
305
|
+
const context = React.useContext(MenuContext);
|
|
306
306
|
if (context === null) {
|
|
307
307
|
throw new Error("useMenu must be used within a MenuContextProvider");
|
|
308
308
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
require('../MenuContext/index.js');
|
|
6
6
|
var mapping = require('../MenuContext/mapping.js');
|
|
7
7
|
var utils = require('../MenuContext/utils.js');
|
|
8
8
|
var mapping$1 = require('./mapping.js');
|
|
9
9
|
var context = require('../MenuContext/context.js');
|
|
10
10
|
"use strict";
|
|
11
|
-
const MicrositeMenuContext =
|
|
11
|
+
const MicrositeMenuContext = React.createContext(null);
|
|
12
12
|
const MicrositeMenuContextProvider = ({
|
|
13
13
|
context: context$1,
|
|
14
14
|
pathname: currentPathname = "/",
|
|
@@ -19,8 +19,8 @@ const MicrositeMenuContextProvider = ({
|
|
|
19
19
|
const {
|
|
20
20
|
createSiteUrl
|
|
21
21
|
} = context.useMenu();
|
|
22
|
-
const isUIContext =
|
|
23
|
-
const isSiteUrlActive =
|
|
22
|
+
const isUIContext = React.useMemo(() => context$1 === mapping.SiteId.Ui, [context$1]);
|
|
23
|
+
const isSiteUrlActive = React.useCallback(url => {
|
|
24
24
|
return (
|
|
25
25
|
// Do not check for active items if not in UI context
|
|
26
26
|
isUIContext &&
|
|
@@ -32,7 +32,7 @@ const MicrositeMenuContextProvider = ({
|
|
|
32
32
|
!url[3] || currentHash.replace(/^#/, "") === url[3])
|
|
33
33
|
);
|
|
34
34
|
}, [context$1, currentHash, currentPathname, isUIContext]);
|
|
35
|
-
const parseMenuItem =
|
|
35
|
+
const parseMenuItem = React.useCallback(item => {
|
|
36
36
|
const childItems = item?.items?.map(parseMenuItem).filter(item2 => !!item2);
|
|
37
37
|
const active =
|
|
38
38
|
// If any child is active, the parent is active
|
|
@@ -56,10 +56,10 @@ const MicrositeMenuContextProvider = ({
|
|
|
56
56
|
url
|
|
57
57
|
};
|
|
58
58
|
}, [createSiteUrl, currentPathname, isSiteUrlActive]);
|
|
59
|
-
const menu =
|
|
59
|
+
const menu = React.useMemo(() => {
|
|
60
60
|
return parseMenuItem(mapping$1.MICROSITE_HEADER_MAPPING);
|
|
61
61
|
}, [parseMenuItem]);
|
|
62
|
-
const [activeModalState, setActiveModalState] =
|
|
62
|
+
const [activeModalState, setActiveModalState] = React.useState({
|
|
63
63
|
activeModal: null,
|
|
64
64
|
prevActiveModal: null
|
|
65
65
|
});
|
|
@@ -67,7 +67,7 @@ const MicrositeMenuContextProvider = ({
|
|
|
67
67
|
activeModal,
|
|
68
68
|
prevActiveModal
|
|
69
69
|
} = activeModalState;
|
|
70
|
-
const setActiveModal =
|
|
70
|
+
const setActiveModal = React.useCallback(id => {
|
|
71
71
|
setActiveModalState({
|
|
72
72
|
activeModal: id,
|
|
73
73
|
prevActiveModal: activeModal
|
|
@@ -85,7 +85,7 @@ const MicrositeMenuContextProvider = ({
|
|
|
85
85
|
});
|
|
86
86
|
};
|
|
87
87
|
function useMicrositeMenu() {
|
|
88
|
-
const context =
|
|
88
|
+
const context = React.useContext(MicrositeMenuContext);
|
|
89
89
|
if (context === null) {
|
|
90
90
|
throw new Error("useMicrositeMenu must be used within a MicrositeMenuContextProvider");
|
|
91
91
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
4
|
require('../constants/proStoreCategories/index.js');
|
|
5
5
|
require('../constants/proStoreCategories/translations/index.js');
|
|
6
6
|
require('../contexts/MenuContext/index.js');
|
|
@@ -120,7 +120,7 @@ const useTranslatedCategories = (isStore, storeId) => {
|
|
|
120
120
|
const {
|
|
121
121
|
language
|
|
122
122
|
} = context.useMenu();
|
|
123
|
-
return
|
|
123
|
+
return React.useMemo(() => {
|
|
124
124
|
return getLocalizedCategories(language, isStore, storeId);
|
|
125
125
|
}, [isStore, storeId, language]);
|
|
126
126
|
};
|
package/lib/hooks/useHasTouch.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
4
|
"use strict";
|
|
5
5
|
const useHasTouch = () => {
|
|
6
|
-
const [hasTouch, setHasTouch] =
|
|
7
|
-
|
|
6
|
+
const [hasTouch, setHasTouch] = React.useState(typeof document !== "undefined" && "ontouchstart" in document.documentElement || typeof window !== "undefined" && window.navigator.maxTouchPoints > 0);
|
|
7
|
+
React.useEffect(() => {
|
|
8
8
|
let lastTouchTime = 0;
|
|
9
9
|
function disableTouch() {
|
|
10
10
|
if (Date.now() - lastTouchTime < 500) return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
4
|
"use strict";
|
|
5
5
|
const calculateTotalCameraRetentionLoad = cameras => {
|
|
6
6
|
const cameraRetentionLoad = {
|
|
@@ -67,16 +67,16 @@ const getMaxRetention = inputs => {
|
|
|
67
67
|
return lastItem?.value || 0;
|
|
68
68
|
};
|
|
69
69
|
const useRetentionCalculator = config => {
|
|
70
|
-
const maxRetention =
|
|
70
|
+
const maxRetention = React.useMemo(() => {
|
|
71
71
|
return getMaxRetention(config);
|
|
72
72
|
}, [config]);
|
|
73
|
-
const retentionHddItems =
|
|
73
|
+
const retentionHddItems = React.useMemo(() => {
|
|
74
74
|
return getRetentionHddItems(config);
|
|
75
75
|
}, [config]);
|
|
76
|
-
const getRequiredHddsByRetention =
|
|
76
|
+
const getRequiredHddsByRetention = React.useCallback(retention => {
|
|
77
77
|
return getRequiredHddCountByTime(config, retention);
|
|
78
78
|
}, [config]);
|
|
79
|
-
const minRetentionStorage =
|
|
79
|
+
const minRetentionStorage = React.useMemo(() => {
|
|
80
80
|
return retentionHddItems.find((item, i) => {
|
|
81
81
|
return item.value > 0 && i + 1 >= config.parityDisks * 2;
|
|
82
82
|
})?.value || 0;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
4
|
"use strict";
|
|
5
5
|
function useHorizontalScroll(ref, enabled = true) {
|
|
6
|
-
|
|
6
|
+
React.useEffect(() => {
|
|
7
7
|
if (!enabled) return;
|
|
8
8
|
if (!ref?.current) return;
|
|
9
9
|
const element = ref.current;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
4
|
"use strict";
|
|
5
5
|
const LOCK_SCROLL_CLASS = "lock-scroll";
|
|
6
6
|
const updateElsClassList = (els, type) => {
|
|
@@ -11,8 +11,8 @@ const updateElsClassList = (els, type) => {
|
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
const useLockBodyScrollCustom = isLocked => {
|
|
14
|
-
const getEls =
|
|
15
|
-
|
|
14
|
+
const getEls = React.useCallback(() => [document.documentElement, document.body, document.getElementById("__next")], []);
|
|
15
|
+
React.useEffect(() => {
|
|
16
16
|
if (isLocked) {
|
|
17
17
|
updateElsClassList(getEls(), "add");
|
|
18
18
|
} else {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
4
|
"use strict";
|
|
5
5
|
const useScrollToY = () => {
|
|
6
|
-
const rafRef =
|
|
6
|
+
const rafRef = React.useRef(0);
|
|
7
7
|
const cancelScrollToY = () => {
|
|
8
8
|
window.cancelAnimationFrame(rafRef.current);
|
|
9
9
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
4
|
"use strict";
|
|
5
5
|
const testMediaElementVolumeSetterAsync = () => {
|
|
6
6
|
const timeoutPromise = new Promise(resolve => setTimeout(resolve, 500, false));
|
|
@@ -17,8 +17,8 @@ const testMediaElementVolumeSetterAsync = () => {
|
|
|
17
17
|
return Promise.race([promise, timeoutPromise]);
|
|
18
18
|
};
|
|
19
19
|
const useTestMediaElementVolumeSetter = () => {
|
|
20
|
-
const [isSupported, setIsSupported] =
|
|
21
|
-
|
|
20
|
+
const [isSupported, setIsSupported] = React.useState(null);
|
|
21
|
+
React.useEffect(() => {
|
|
22
22
|
testMediaElementVolumeSetterAsync().then(setIsSupported).catch(e => console.error("Cannot detect", e));
|
|
23
23
|
}, []);
|
|
24
24
|
return isSupported;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var intl = require('@formatjs/intl');
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
require('../contexts/MenuContext/index.js');
|
|
6
6
|
var mapping = require('../contexts/MenuContext/mapping.js');
|
|
7
7
|
var context = require('../contexts/MenuContext/context.js');
|
|
@@ -11,8 +11,8 @@ const useTranslationRaw = ({
|
|
|
11
11
|
defaultTranslation,
|
|
12
12
|
additionalTranslations
|
|
13
13
|
}) => {
|
|
14
|
-
const [activeTranslation, setActiveTranslation] =
|
|
15
|
-
|
|
14
|
+
const [activeTranslation, setActiveTranslation] = React.useState(defaultTranslation);
|
|
15
|
+
React.useEffect(() => {
|
|
16
16
|
const loadTranslations = async () => {
|
|
17
17
|
try {
|
|
18
18
|
if (language === mapping.DEFAULT_LANGUAGE) {
|
|
@@ -30,14 +30,14 @@ const useTranslationRaw = ({
|
|
|
30
30
|
};
|
|
31
31
|
loadTranslations();
|
|
32
32
|
}, [language, additionalTranslations, defaultTranslation]);
|
|
33
|
-
const intl$1 =
|
|
33
|
+
const intl$1 = React.useMemo(() => {
|
|
34
34
|
const cache = intl.createIntlCache();
|
|
35
35
|
return intl.createIntl({
|
|
36
36
|
locale: language,
|
|
37
37
|
messages: activeTranslation
|
|
38
38
|
}, cache);
|
|
39
39
|
}, [language, activeTranslation]);
|
|
40
|
-
const formatMessage =
|
|
40
|
+
const formatMessage = React.useCallback((id, values) => intl$1.formatMessage({
|
|
41
41
|
id,
|
|
42
42
|
defaultMessage: defaultTranslation[id]
|
|
43
43
|
}, values), [intl$1, defaultTranslation]);
|
|
@@ -50,7 +50,7 @@ const useTranslation = options => {
|
|
|
50
50
|
const {
|
|
51
51
|
language
|
|
52
52
|
} = context.useMenu();
|
|
53
|
-
const optionsExtended =
|
|
53
|
+
const optionsExtended = React.useMemo(() => ({
|
|
54
54
|
...options,
|
|
55
55
|
language
|
|
56
56
|
}), [options, language]);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
var constants = require('./constants.js');
|
|
6
6
|
"use strict";
|
|
7
|
-
const UiComponentsSsrStyleRegistryPagesRouter =
|
|
7
|
+
const UiComponentsSsrStyleRegistryPagesRouter = React.memo(function UiComponentsSsrStyleRegistryPagesRouter2() {
|
|
8
8
|
const injections = globalThis[constants.SSR_INJECT_ID];
|
|
9
9
|
const injectionsExist = !!injections && Array.isArray(injections) && !!injections.length;
|
|
10
10
|
return /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, {
|