@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
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var styled = require('styled-components');
|
|
4
|
+
var layout = require('../../constants/layout.js');
|
|
5
|
+
function _interopDefault(e) {
|
|
6
|
+
return e && e.__esModule ? e : {
|
|
7
|
+
default: e
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
11
|
+
"use strict";
|
|
12
|
+
const TABLE_LEFT_MARGIN = "0px";
|
|
13
|
+
const TREE_LEFT_MARGIN = "8px";
|
|
14
|
+
const Wrap = styled__default["default"].div``;
|
|
15
|
+
const Row = styled__default["default"].div`
|
|
16
|
+
display: grid;
|
|
17
|
+
grid-template-columns: 300px 1fr;
|
|
18
|
+
position: relative;
|
|
19
|
+
&:hover: {
|
|
20
|
+
background-color: #f9f9f9;
|
|
21
|
+
}
|
|
22
|
+
padding-left: ${TABLE_LEFT_MARGIN};
|
|
23
|
+
|
|
24
|
+
@media ${layout.BREAKPOINTS.MOBILE_AND_DOWN} {
|
|
25
|
+
grid-template-columns: 170px 1fr;
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
28
|
+
const Heading = styled__default["default"].div`
|
|
29
|
+
font-size: 20px;
|
|
30
|
+
line-height: 24px;
|
|
31
|
+
font-weight: 700;
|
|
32
|
+
color: #212427;
|
|
33
|
+
margin-bottom: 16px;
|
|
34
|
+
grid-column: 1 / 3;
|
|
35
|
+
`;
|
|
36
|
+
const SectionDivider = styled__default["default"].div`
|
|
37
|
+
height: 1px;
|
|
38
|
+
background-color: #dbdce1;
|
|
39
|
+
margin: 16px 0;
|
|
40
|
+
grid-column: 1 / 3;
|
|
41
|
+
`;
|
|
42
|
+
const Cell = styled__default["default"].div`
|
|
43
|
+
padding: 8px 28px 8px 0;
|
|
44
|
+
font-size: 14px;
|
|
45
|
+
line-height: 20px;
|
|
46
|
+
color: #50565e;
|
|
47
|
+
${({
|
|
48
|
+
$isChildRowFirstCell
|
|
49
|
+
}) => $isChildRowFirstCell && "margin-left: 24px;"}
|
|
50
|
+
`;
|
|
51
|
+
const Tree = styled__default["default"].div`
|
|
52
|
+
${({
|
|
53
|
+
$isLast
|
|
54
|
+
}) => $isLast ? "height: 18px" : "height: 100%"};
|
|
55
|
+
position: absolute;
|
|
56
|
+
top: 0;
|
|
57
|
+
left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});
|
|
58
|
+
width: 1px;
|
|
59
|
+
background-color: #c5c5c5;
|
|
60
|
+
display: flex;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
align-items: center;
|
|
63
|
+
z-index: 1;
|
|
64
|
+
`;
|
|
65
|
+
const Branch = styled__default["default"].div`
|
|
66
|
+
position: absolute;
|
|
67
|
+
left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});
|
|
68
|
+
top: 17px;
|
|
69
|
+
width: 11px;
|
|
70
|
+
height: 1px;
|
|
71
|
+
background-color: #c5c5c5;
|
|
72
|
+
`;
|
|
73
|
+
exports.Branch = Branch;
|
|
74
|
+
exports.Cell = Cell;
|
|
75
|
+
exports.Heading = Heading;
|
|
76
|
+
exports.Row = Row;
|
|
77
|
+
exports.SectionDivider = SectionDivider;
|
|
78
|
+
exports.Tree = Tree;
|
|
79
|
+
exports.Wrap = Wrap;
|
|
80
|
+
//# sourceMappingURL=ProductTechSpecs.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductTechSpecs.styles.js","sources":["../../../src/components/ProductTechSpecsV2/ProductTechSpecs.styles.tsx"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../constants/layout\";\n\nconst TABLE_LEFT_MARGIN = \"0px\";\nconst TREE_LEFT_MARGIN = \"8px\";\n\nexport const Wrap = styled.div``;\n\nexport const Row = styled.div`\n display: grid;\n grid-template-columns: 300px 1fr;\n position: relative;\n &:hover: {\n background-color: #f9f9f9;\n }\n padding-left: ${TABLE_LEFT_MARGIN};\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n grid-template-columns: 170px 1fr;\n }\n`;\n\nexport const Heading = styled.div`\n font-size: 20px;\n line-height: 24px;\n font-weight: 700;\n color: #212427;\n margin-bottom: 16px;\n grid-column: 1 / 3;\n`;\n\nexport const SectionDivider = styled.div`\n height: 1px;\n background-color: #dbdce1;\n margin: 16px 0;\n grid-column: 1 / 3;\n`;\n\nexport const Cell = styled.div<{\n // Cell is a child and its the first item on the row.\n $isChildRowFirstCell?: boolean;\n}>`\n padding: 8px 28px 8px 0;\n font-size: 14px;\n line-height: 20px;\n color: #50565e;\n ${({ $isChildRowFirstCell }) => $isChildRowFirstCell && \"margin-left: 24px;\"}\n`;\n\nexport const Tree = styled.div<{\n $isLast: boolean;\n}>`\n ${({ $isLast }) => ($isLast ? \"height: 18px\" : \"height: 100%\")};\n position: absolute;\n top: 0;\n left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});\n width: 1px;\n background-color: #c5c5c5;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 1;\n`;\n\nexport const Branch = styled.div`\n position: absolute;\n left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});\n top: 17px;\n width: 11px;\n height: 1px;\n background-color: #c5c5c5;\n`;\n"],"names":["TABLE_LEFT_MARGIN","TREE_LEFT_MARGIN","Wrap","styled","div","Row","BREAKPOINTS","MOBILE_AND_DOWN","Heading","SectionDivider","Cell","$isChildRowFirstCell","Tree","$isLast","Branch"],"mappings":";;;;;;;;;;;AAIA,MAAMA,iBAAoB,GAAA,KAAA;AAC1B,MAAMC,gBAAmB,GAAA,KAAA;AAElB,MAAMC,OAAOC,eAAAA,CAAAA,SAAAA,CAAO,CAAAC,GAAA,EAAA;AAEpB,MAAMC,MAAMF,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAORJ,iBAAiB;AAAA;AAAA,WAExBM,MAAAA,CAAAA,YAAYC,eAAe;AAAA;AAAA;AAAA,CAAA;AAK/B,MAAMC,UAAUL,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AASvB,MAAMK,iBAAiBN,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAO9B,MAAMM,OAAOP,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQvB,CAAC;EAAEO;CAAqB,KAAMA,wBAAwB,oBAAoB;AAAA,CAAA;AAGvE,MAAMC,OAAOT,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA,IAGvB,CAAC;EAAES;AAAA,CAAe,KAAAA,OAAA,GAAU,iBAAiB,cAAe;AAAA;AAAA;AAAA,eAGjDb,iBAAiB,MAAMC,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAS/C,MAAMa,SAASX,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA,eAEdJ,iBAAiB,MAAMC,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;;;;;;;"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { BREAKPOINTS } from '../../constants/layout.mjs';
|
|
3
|
+
"use strict";
|
|
4
|
+
const TABLE_LEFT_MARGIN = "0px";
|
|
5
|
+
const TREE_LEFT_MARGIN = "8px";
|
|
6
|
+
const Wrap = styled.div``;
|
|
7
|
+
const Row = styled.div`
|
|
8
|
+
display: grid;
|
|
9
|
+
grid-template-columns: 300px 1fr;
|
|
10
|
+
position: relative;
|
|
11
|
+
&:hover: {
|
|
12
|
+
background-color: #f9f9f9;
|
|
13
|
+
}
|
|
14
|
+
padding-left: ${TABLE_LEFT_MARGIN};
|
|
15
|
+
|
|
16
|
+
@media ${BREAKPOINTS.MOBILE_AND_DOWN} {
|
|
17
|
+
grid-template-columns: 170px 1fr;
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
const Heading = styled.div`
|
|
21
|
+
font-size: 20px;
|
|
22
|
+
line-height: 24px;
|
|
23
|
+
font-weight: 700;
|
|
24
|
+
color: #212427;
|
|
25
|
+
margin-bottom: 16px;
|
|
26
|
+
grid-column: 1 / 3;
|
|
27
|
+
`;
|
|
28
|
+
const SectionDivider = styled.div`
|
|
29
|
+
height: 1px;
|
|
30
|
+
background-color: #dbdce1;
|
|
31
|
+
margin: 16px 0;
|
|
32
|
+
grid-column: 1 / 3;
|
|
33
|
+
`;
|
|
34
|
+
const Cell = styled.div`
|
|
35
|
+
padding: 8px 28px 8px 0;
|
|
36
|
+
font-size: 14px;
|
|
37
|
+
line-height: 20px;
|
|
38
|
+
color: #50565e;
|
|
39
|
+
${({
|
|
40
|
+
$isChildRowFirstCell
|
|
41
|
+
}) => $isChildRowFirstCell && "margin-left: 24px;"}
|
|
42
|
+
`;
|
|
43
|
+
const Tree = styled.div`
|
|
44
|
+
${({
|
|
45
|
+
$isLast
|
|
46
|
+
}) => $isLast ? "height: 18px" : "height: 100%"};
|
|
47
|
+
position: absolute;
|
|
48
|
+
top: 0;
|
|
49
|
+
left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});
|
|
50
|
+
width: 1px;
|
|
51
|
+
background-color: #c5c5c5;
|
|
52
|
+
display: flex;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
align-items: center;
|
|
55
|
+
z-index: 1;
|
|
56
|
+
`;
|
|
57
|
+
const Branch = styled.div`
|
|
58
|
+
position: absolute;
|
|
59
|
+
left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});
|
|
60
|
+
top: 17px;
|
|
61
|
+
width: 11px;
|
|
62
|
+
height: 1px;
|
|
63
|
+
background-color: #c5c5c5;
|
|
64
|
+
`;
|
|
65
|
+
export { Branch, Cell, Heading, Row, SectionDivider, Tree, Wrap };
|
|
66
|
+
//# sourceMappingURL=ProductTechSpecs.styles.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductTechSpecs.styles.mjs","sources":["../../../src/components/ProductTechSpecsV2/ProductTechSpecs.styles.tsx"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../constants/layout\";\n\nconst TABLE_LEFT_MARGIN = \"0px\";\nconst TREE_LEFT_MARGIN = \"8px\";\n\nexport const Wrap = styled.div``;\n\nexport const Row = styled.div`\n display: grid;\n grid-template-columns: 300px 1fr;\n position: relative;\n &:hover: {\n background-color: #f9f9f9;\n }\n padding-left: ${TABLE_LEFT_MARGIN};\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n grid-template-columns: 170px 1fr;\n }\n`;\n\nexport const Heading = styled.div`\n font-size: 20px;\n line-height: 24px;\n font-weight: 700;\n color: #212427;\n margin-bottom: 16px;\n grid-column: 1 / 3;\n`;\n\nexport const SectionDivider = styled.div`\n height: 1px;\n background-color: #dbdce1;\n margin: 16px 0;\n grid-column: 1 / 3;\n`;\n\nexport const Cell = styled.div<{\n // Cell is a child and its the first item on the row.\n $isChildRowFirstCell?: boolean;\n}>`\n padding: 8px 28px 8px 0;\n font-size: 14px;\n line-height: 20px;\n color: #50565e;\n ${({ $isChildRowFirstCell }) => $isChildRowFirstCell && \"margin-left: 24px;\"}\n`;\n\nexport const Tree = styled.div<{\n $isLast: boolean;\n}>`\n ${({ $isLast }) => ($isLast ? \"height: 18px\" : \"height: 100%\")};\n position: absolute;\n top: 0;\n left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});\n width: 1px;\n background-color: #c5c5c5;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 1;\n`;\n\nexport const Branch = styled.div`\n position: absolute;\n left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});\n top: 17px;\n width: 11px;\n height: 1px;\n background-color: #c5c5c5;\n`;\n"],"names":["TABLE_LEFT_MARGIN","TREE_LEFT_MARGIN","Wrap","styled","div","Row","BREAKPOINTS","MOBILE_AND_DOWN","Heading","SectionDivider","Cell","$isChildRowFirstCell","Tree","$isLast","Branch"],"mappings":";;;AAIA,MAAMA,iBAAoB,GAAA,KAAA;AAC1B,MAAMC,gBAAmB,GAAA,KAAA;AAElB,MAAMC,OAAOC,MAAO,CAAAC,GAAA,EAAA;AAEpB,MAAMC,MAAMF,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAORJ,iBAAiB;AAAA;AAAA,WAExBM,YAAYC,eAAe;AAAA;AAAA;AAAA,CAAA;AAK/B,MAAMC,UAAUL,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AASvB,MAAMK,iBAAiBN,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAO9B,MAAMM,OAAOP,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQvB,CAAC;EAAEO;CAAqB,KAAMA,wBAAwB,oBAAoB;AAAA,CAAA;AAGvE,MAAMC,OAAOT,MAAO,CAAAC,GAAA;AAAA,IAGvB,CAAC;EAAES;AAAA,CAAe,KAAAA,OAAA,GAAU,iBAAiB,cAAe;AAAA;AAAA;AAAA,eAGjDb,iBAAiB,MAAMC,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAS/C,MAAMa,SAASX,MAAO,CAAAC,GAAA;AAAA;AAAA,eAEdJ,iBAAiB,MAAMC,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ProductTechSpecs } from "./ProductTechSpecs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -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 optionIcons = require('../../../constants/optionIcons.js');
|
|
6
6
|
var asset = require('../../../utils/asset.js');
|
|
7
7
|
require('../../ButtonGroup/index.js');
|
|
@@ -15,7 +15,7 @@ const ProductWizardOptions = function ProductWizardOptions2({
|
|
|
15
15
|
onlyIcons,
|
|
16
16
|
className
|
|
17
17
|
}) {
|
|
18
|
-
const getOptionIcon =
|
|
18
|
+
const getOptionIcon = React.useCallback((optionSlug, optionValueSlug) => {
|
|
19
19
|
const option = optionSlug.toLowerCase();
|
|
20
20
|
const value = optionValueSlug.toLowerCase();
|
|
21
21
|
const icon = optionIcons.OPTION_ICONS[option]?.[value];
|
|
@@ -24,7 +24,7 @@ const ProductWizardOptions = function ProductWizardOptions2({
|
|
|
24
24
|
}
|
|
25
25
|
return asset.imageSrc(icon);
|
|
26
26
|
}, []);
|
|
27
|
-
const getItemsWithIcons =
|
|
27
|
+
const getItemsWithIcons = React.useCallback(option => option.values.map(({
|
|
28
28
|
id,
|
|
29
29
|
title,
|
|
30
30
|
slug,
|
|
@@ -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/wizard/index.js');
|
|
6
6
|
require('../NormalisedImage/index.js');
|
|
7
7
|
require('../ProductWizardFootnotes/index.js');
|
|
@@ -43,7 +43,7 @@ const ProductWizard = function ProductWizard2({
|
|
|
43
43
|
updateQuantity,
|
|
44
44
|
translations
|
|
45
45
|
}) {
|
|
46
|
-
const addToCartBtnText =
|
|
46
|
+
const addToCartBtnText = React.useMemo(() => {
|
|
47
47
|
if (isVariantSoldOut) {
|
|
48
48
|
return translations.addToCartButton.soldOut;
|
|
49
49
|
}
|
|
@@ -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/payment-apple-pay.svg.js');
|
|
6
6
|
require('../../assets/icons/payment-card.svg.js');
|
|
7
7
|
require('../../assets/icons/payment-google-pay.svg.js');
|
|
@@ -77,7 +77,7 @@ const ProductWizardFootnotes = ({
|
|
|
77
77
|
availablePaymentMethods,
|
|
78
78
|
renderImage
|
|
79
79
|
}) => {
|
|
80
|
-
const limitErrorNode =
|
|
80
|
+
const limitErrorNode = React.useMemo(() => {
|
|
81
81
|
if (limitsDisabled) {
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
@@ -101,7 +101,7 @@ const ProductWizardFootnotes = ({
|
|
|
101
101
|
}
|
|
102
102
|
return void 0;
|
|
103
103
|
}, [limitsDisabled, requiresLogin, maxRelevantLimitAddToCartQuantity, showLimitError, translations.errors.limitedToBuy, translations.errors.limitReached, translations.errors.limitErrorPer]);
|
|
104
|
-
const getCardIcons =
|
|
104
|
+
const getCardIcons = React.useCallback(() => {
|
|
105
105
|
const hasPaymentMethods = availablePaymentMethods && Object.keys(availablePaymentMethods).filter(item => {
|
|
106
106
|
return !!availablePaymentMethods[item];
|
|
107
107
|
}).length > 0;
|
|
@@ -119,7 +119,7 @@ const ProductWizardFootnotes = ({
|
|
|
119
119
|
})
|
|
120
120
|
});
|
|
121
121
|
}, [availablePaymentMethods, renderImage]);
|
|
122
|
-
const footnotes =
|
|
122
|
+
const footnotes = React.useMemo(() => /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
123
123
|
children: [getCardIcons(), translations?.footnotes?.shipping?.loading ? /* @__PURE__ */jsxRuntime.jsx(ProductWizardFootnotes_styles.SkeletonFootnote, {
|
|
124
124
|
maxWidth: 120
|
|
125
125
|
}) : translations?.footnotes?.shipping?.value && /* @__PURE__ */jsxRuntime.jsxs(ProductWizardFootnotes_styles.IconTextWrap, {
|
|
@@ -144,7 +144,7 @@ const ProductWizardFootnotes = ({
|
|
|
144
144
|
})]
|
|
145
145
|
})]
|
|
146
146
|
}), [getCardIcons, translations.footnotes.shipping?.loading, translations.footnotes.shipping.value, translations.footnotes.warranty]);
|
|
147
|
-
const hasFootnotes =
|
|
147
|
+
const hasFootnotes = React.useMemo(() => !!footnotes.props.children.filter(child => !!child).length, [footnotes.props.children]);
|
|
148
148
|
if (!hasFootnotes && !enableLimitAndBackInStock && !limitErrorNode) {
|
|
149
149
|
return null;
|
|
150
150
|
}
|
|
@@ -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 theme = require('../../constants/theme.js');
|
|
6
6
|
"use strict";
|
|
7
7
|
const ProgressCircle = ({
|
|
@@ -13,9 +13,9 @@ const ProgressCircle = ({
|
|
|
13
13
|
backgroundColor = theme.theme.colors.white,
|
|
14
14
|
className
|
|
15
15
|
}) => {
|
|
16
|
-
const radius =
|
|
17
|
-
const circumference =
|
|
18
|
-
const strokeDashoffset =
|
|
16
|
+
const radius = React.useMemo(() => (diameter - strokeWidth) / 2, [diameter, strokeWidth]);
|
|
17
|
+
const circumference = React.useMemo(() => radius * 2 * Math.PI, [radius]);
|
|
18
|
+
const strokeDashoffset = React.useMemo(() => circumference - (value ? value / 100 : 0) * circumference, [circumference, value]);
|
|
19
19
|
return /* @__PURE__ */jsxRuntime.jsxs("svg", {
|
|
20
20
|
className,
|
|
21
21
|
width: diameter,
|
|
@@ -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('../Button/index.js');
|
|
6
6
|
var QuantityControls_styles = require('./QuantityControls.styles.js');
|
|
7
7
|
var CartButton = require('../Button/CartButton.js');
|
|
@@ -16,15 +16,15 @@ const QuantityControls = function QuantityControls2({
|
|
|
16
16
|
cartButton,
|
|
17
17
|
allowZero
|
|
18
18
|
}) {
|
|
19
|
-
const handleOnUpdateQuantity =
|
|
19
|
+
const handleOnUpdateQuantity = React.useCallback(e => {
|
|
20
20
|
const value = Math.max(0, parseInt(e.target.value) || 0);
|
|
21
21
|
onUpdateQuantity(value);
|
|
22
22
|
}, [onUpdateQuantity]);
|
|
23
|
-
const handleOnAddToCart =
|
|
23
|
+
const handleOnAddToCart = React.useCallback(() => {
|
|
24
24
|
if (!allowZero && quantity < 1) return;
|
|
25
25
|
onAddToCart?.();
|
|
26
26
|
}, [allowZero, onAddToCart, quantity]);
|
|
27
|
-
const cartButtonDisabled =
|
|
27
|
+
const cartButtonDisabled = React.useMemo(() => {
|
|
28
28
|
return disabled || !allowZero && quantity < 1 || cartButton?.disabled;
|
|
29
29
|
}, [allowZero, cartButton?.disabled, disabled, quantity]);
|
|
30
30
|
return /* @__PURE__ */jsxRuntime.jsxs(QuantityControls_styles.Wrap, {
|
|
@@ -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/addToCart.svg.js');
|
|
6
6
|
require('../../utils/money/index.js');
|
|
7
7
|
require('../ProductCardPopup/index.js');
|
|
@@ -30,10 +30,10 @@ const RelatedProducts = ({
|
|
|
30
30
|
renderImage,
|
|
31
31
|
translations
|
|
32
32
|
}) => {
|
|
33
|
-
const isLoading =
|
|
34
|
-
const [popupProduct, setPopupProduct] =
|
|
35
|
-
const isPopupOpen =
|
|
36
|
-
|
|
33
|
+
const isLoading = React.useMemo(() => categories === null, [categories]);
|
|
34
|
+
const [popupProduct, setPopupProduct] = React.useState(activePopupProduct);
|
|
35
|
+
const isPopupOpen = React.useMemo(() => !!activePopupProduct, [activePopupProduct]);
|
|
36
|
+
React.useEffect(() => {
|
|
37
37
|
if (activePopupProduct !== void 0) {
|
|
38
38
|
setPopupProduct(activePopupProduct);
|
|
39
39
|
}
|
package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.js
CHANGED
|
@@ -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 useHddRetentionCalculator = require('../../../hooks/useHddRetentionCalculator.js');
|
|
6
6
|
require('../assets/icons/access.png.js');
|
|
7
7
|
require('../assets/icons/network.png.js');
|
|
@@ -58,12 +58,12 @@ const ComputeResourceCalculator = ({
|
|
|
58
58
|
const {
|
|
59
59
|
formatMessage
|
|
60
60
|
} = useResourceCalculatorTranslation.useResourceCalculatorTranslation();
|
|
61
|
-
const defaultActiveDevice =
|
|
61
|
+
const defaultActiveDevice = React.useMemo(() => {
|
|
62
62
|
const foundDevice = ComputeResourceCalculator_constants.DEVICES.find(item => item.id === defaultActiveDeviceId);
|
|
63
63
|
return foundDevice || ComputeResourceCalculator_constants.DEVICES[0];
|
|
64
64
|
}, [defaultActiveDeviceId]);
|
|
65
|
-
const [device, setDevice] =
|
|
66
|
-
const supportedFeatures =
|
|
65
|
+
const [device, setDevice] = React.useState(defaultActiveDevice);
|
|
66
|
+
const supportedFeatures = React.useMemo(() => {
|
|
67
67
|
return {
|
|
68
68
|
[ComputeResourceCalculator_types.FeatureId.Network]: !!device.loadData?.Network,
|
|
69
69
|
[ComputeResourceCalculator_types.FeatureId.Protect]: !!device.loadData?.Protect,
|
|
@@ -71,7 +71,7 @@ const ComputeResourceCalculator = ({
|
|
|
71
71
|
[ComputeResourceCalculator_types.FeatureId.Access]: !!device.loadData?.Access
|
|
72
72
|
};
|
|
73
73
|
}, [device]);
|
|
74
|
-
const forcedFeatures =
|
|
74
|
+
const forcedFeatures = React.useMemo(() => {
|
|
75
75
|
return {
|
|
76
76
|
[ComputeResourceCalculator_types.FeatureId.Network]: !!device.settings?.forcedFeatures?.includes(ComputeResourceCalculator_types.FeatureId.Network),
|
|
77
77
|
[ComputeResourceCalculator_types.FeatureId.Protect]: !!device.settings?.forcedFeatures?.includes(ComputeResourceCalculator_types.FeatureId.Protect),
|
|
@@ -79,22 +79,22 @@ const ComputeResourceCalculator = ({
|
|
|
79
79
|
[ComputeResourceCalculator_types.FeatureId.Access]: !!device.settings?.forcedFeatures?.includes(ComputeResourceCalculator_types.FeatureId.Access)
|
|
80
80
|
};
|
|
81
81
|
}, [device]);
|
|
82
|
-
const [enabledFeatures, setEnabledFeatures] =
|
|
83
|
-
const handleToggleFeature =
|
|
82
|
+
const [enabledFeatures, setEnabledFeatures] = React.useState(getDefaultActiveFeatures(device));
|
|
83
|
+
const handleToggleFeature = React.useCallback(key => enabled => {
|
|
84
84
|
setEnabledFeatures({
|
|
85
85
|
...enabledFeatures,
|
|
86
86
|
[key]: enabled
|
|
87
87
|
});
|
|
88
88
|
}, [enabledFeatures, setEnabledFeatures]);
|
|
89
|
-
const enabledFeaturesCount =
|
|
90
|
-
const maxEnabledFeaturesReached =
|
|
89
|
+
const enabledFeaturesCount = React.useMemo(() => Object.values(enabledFeatures).filter(item => item).length, [enabledFeatures]);
|
|
90
|
+
const maxEnabledFeaturesReached = React.useMemo(() => {
|
|
91
91
|
const maxFeatures = device.settings?.maxFeatures;
|
|
92
92
|
if (!maxFeatures) {
|
|
93
93
|
return false;
|
|
94
94
|
}
|
|
95
95
|
return maxFeatures === enabledFeaturesCount;
|
|
96
96
|
}, [device.settings?.maxFeatures, enabledFeaturesCount]);
|
|
97
|
-
const maxFeaturesReachedNote =
|
|
97
|
+
const maxFeaturesReachedNote = React.useMemo(() => {
|
|
98
98
|
const maxFeatures = device.settings?.maxFeatures;
|
|
99
99
|
if (!maxFeatures) {
|
|
100
100
|
return "";
|
|
@@ -103,15 +103,15 @@ const ComputeResourceCalculator = ({
|
|
|
103
103
|
maxFeatures
|
|
104
104
|
});
|
|
105
105
|
}, [device.settings?.maxFeatures, formatMessage]);
|
|
106
|
-
const defaultNetworkInputState =
|
|
106
|
+
const defaultNetworkInputState = React.useMemo(() => ({
|
|
107
107
|
accessPoints: 0,
|
|
108
108
|
vpn: false,
|
|
109
109
|
detections: false,
|
|
110
110
|
adBlocking: false,
|
|
111
111
|
qos: false
|
|
112
112
|
}), []);
|
|
113
|
-
const [networkInputState, setNetworkInputState] =
|
|
114
|
-
const networkCard =
|
|
113
|
+
const [networkInputState, setNetworkInputState] = React.useState(defaultNetworkInputState);
|
|
114
|
+
const networkCard = React.useMemo(() => {
|
|
115
115
|
const isEnabled = enabledFeatures[ComputeResourceCalculator_types.FeatureId.Network];
|
|
116
116
|
return /* @__PURE__ */jsxRuntime.jsx(InputCard.InputCard, {
|
|
117
117
|
id: "computeResourceCalculator__inputCard__network",
|
|
@@ -186,14 +186,14 @@ const ComputeResourceCalculator = ({
|
|
|
186
186
|
}]
|
|
187
187
|
});
|
|
188
188
|
}, [networkInputState, setNetworkInputState, handleToggleFeature, enabledFeatures, supportedFeatures, maxEnabledFeaturesReached, maxFeaturesReachedNote, forcedFeatures, device.loadData.Network?.accessPoint.max, formatMessage]);
|
|
189
|
-
const defaultProtectInputState =
|
|
189
|
+
const defaultProtectInputState = React.useMemo(() => ({
|
|
190
190
|
cameraHd: 0,
|
|
191
191
|
camera2k: 0,
|
|
192
192
|
camera4k: 0,
|
|
193
193
|
daysOfStorage: 0
|
|
194
194
|
}), []);
|
|
195
|
-
const [protectInputState, setProtectInputState] =
|
|
196
|
-
const maxCameras =
|
|
195
|
+
const [protectInputState, setProtectInputState] = React.useState(defaultProtectInputState);
|
|
196
|
+
const maxCameras = React.useMemo(() => {
|
|
197
197
|
if (!device.loadData.Protect) {
|
|
198
198
|
return {
|
|
199
199
|
cameraHd: 0,
|
|
@@ -213,20 +213,20 @@ const ComputeResourceCalculator = ({
|
|
|
213
213
|
camera4k: device.loadData.Protect.camera4k.max
|
|
214
214
|
};
|
|
215
215
|
}, [device, enabledFeaturesCount]);
|
|
216
|
-
const maxHdds =
|
|
216
|
+
const maxHdds = React.useMemo(() => {
|
|
217
217
|
return device.settings?.hdd?.max || 0;
|
|
218
218
|
}, [device]);
|
|
219
|
-
const hddGigabyteOptions =
|
|
219
|
+
const hddGigabyteOptions = React.useMemo(() => {
|
|
220
220
|
const defaultGigabytes = [1e3, 8e3, 16e3, 24e3];
|
|
221
221
|
return device.settings?.hdd?.gigabyteOptions || defaultGigabytes;
|
|
222
222
|
}, [device.settings?.hdd?.gigabyteOptions]);
|
|
223
|
-
const getDefaultHddGigabyteOption =
|
|
223
|
+
const getDefaultHddGigabyteOption = React.useCallback(options => {
|
|
224
224
|
if (!options || options.includes(DEFAULT_HDD_GB_OPTION)) {
|
|
225
225
|
return DEFAULT_HDD_GB_OPTION;
|
|
226
226
|
}
|
|
227
227
|
return options[0];
|
|
228
228
|
}, []);
|
|
229
|
-
const getHddSizeLabel =
|
|
229
|
+
const getHddSizeLabel = React.useCallback(gigaBytes => {
|
|
230
230
|
if (gigaBytes === 0) {
|
|
231
231
|
return formatMessage("protect.noStorage");
|
|
232
232
|
}
|
|
@@ -235,17 +235,17 @@ const ComputeResourceCalculator = ({
|
|
|
235
235
|
}
|
|
236
236
|
return `${gigaBytes / 1e3}TB`;
|
|
237
237
|
}, [formatMessage]);
|
|
238
|
-
const [hddGigabytes, setHddGigabytes] =
|
|
239
|
-
const totalCameras =
|
|
238
|
+
const [hddGigabytes, setHddGigabytes] = React.useState(getDefaultHddGigabyteOption(device.settings?.hdd?.gigabyteOptions));
|
|
239
|
+
const totalCameras = React.useMemo(() => {
|
|
240
240
|
return protectInputState["cameraHd"] + protectInputState["camera2k"] + protectInputState["camera4k"];
|
|
241
241
|
}, [protectInputState]);
|
|
242
|
-
const parityDisks =
|
|
242
|
+
const parityDisks = React.useMemo(() => {
|
|
243
243
|
return device.settings?.hdd?.parityDisks || 0;
|
|
244
244
|
}, [device.settings?.hdd?.parityDisks]);
|
|
245
|
-
const hideHddSizeOptions =
|
|
245
|
+
const hideHddSizeOptions = React.useMemo(() => {
|
|
246
246
|
return maxHdds === 0;
|
|
247
247
|
}, [maxHdds]);
|
|
248
|
-
const hideRetentionCalculation =
|
|
248
|
+
const hideRetentionCalculation = React.useMemo(() => {
|
|
249
249
|
return hideHddSizeOptions || hddGigabytes === 0;
|
|
250
250
|
}, [hideHddSizeOptions, hddGigabytes]);
|
|
251
251
|
const {
|
|
@@ -264,7 +264,7 @@ const ComputeResourceCalculator = ({
|
|
|
264
264
|
hddTerabytes: hddGigabytes / 1e3,
|
|
265
265
|
format: RETENTION_TIME_FORMAT
|
|
266
266
|
});
|
|
267
|
-
const hddSlots =
|
|
267
|
+
const hddSlots = React.useMemo(() => {
|
|
268
268
|
const handleHddSlotClick = daysOfStorage => {
|
|
269
269
|
setProtectInputState({
|
|
270
270
|
...protectInputState,
|
|
@@ -287,7 +287,7 @@ const ComputeResourceCalculator = ({
|
|
|
287
287
|
})
|
|
288
288
|
});
|
|
289
289
|
}, [protectInputState, totalCameras, maxHdds, getRequiredHddsByRetention, retentionHddItems, parityDisks, minRetentionStorage, formatMessage, hddGigabytes, getHddSizeLabel]);
|
|
290
|
-
const handleUpdateCameraInputChange =
|
|
290
|
+
const handleUpdateCameraInputChange = React.useCallback((cameraType, newValue) => {
|
|
291
291
|
if (Object.values(maxCameras).some(max => max === 0)) {
|
|
292
292
|
return;
|
|
293
293
|
}
|
|
@@ -328,7 +328,7 @@ const ComputeResourceCalculator = ({
|
|
|
328
328
|
...evaluatedCameras
|
|
329
329
|
});
|
|
330
330
|
}, [protectInputState, maxCameras]);
|
|
331
|
-
const protectCard =
|
|
331
|
+
const protectCard = React.useMemo(() => {
|
|
332
332
|
const isActive = enabledFeatures[ComputeResourceCalculator_types.FeatureId.Protect];
|
|
333
333
|
const deviceSpecificNote = {
|
|
334
334
|
[ComputeResourceCalculator_types.DeviceId.CkG2Plus]: formatMessage("protect.CkG2PlusNote"),
|
|
@@ -416,12 +416,12 @@ const ComputeResourceCalculator = ({
|
|
|
416
416
|
}]
|
|
417
417
|
});
|
|
418
418
|
}, [protectInputState, setProtectInputState, enabledFeatures, handleToggleFeature, supportedFeatures, hideRetentionCalculation, hddSlots, getHddSizeLabel, hddGigabyteOptions, hideHddSizeOptions, maxCameras, maxEnabledFeaturesReached, maxFeaturesReachedNote, forcedFeatures, totalCameras, handleUpdateCameraInputChange, maxHdds, device.id, maxRetention, hddGigabytes, formatMessage]);
|
|
419
|
-
const defaultTalkInputState =
|
|
419
|
+
const defaultTalkInputState = React.useMemo(() => ({
|
|
420
420
|
phones: 0,
|
|
421
421
|
record: false
|
|
422
422
|
}), []);
|
|
423
|
-
const [talkInputState, setTalkInputState] =
|
|
424
|
-
const talkCard =
|
|
423
|
+
const [talkInputState, setTalkInputState] = React.useState(defaultTalkInputState);
|
|
424
|
+
const talkCard = React.useMemo(() => {
|
|
425
425
|
const isActive = enabledFeatures[ComputeResourceCalculator_types.FeatureId.Talk];
|
|
426
426
|
return /* @__PURE__ */jsxRuntime.jsx(InputCard.InputCard, {
|
|
427
427
|
id: "computeResourceCalculator__inputCard__talk",
|
|
@@ -460,11 +460,11 @@ const ComputeResourceCalculator = ({
|
|
|
460
460
|
}]
|
|
461
461
|
});
|
|
462
462
|
}, [talkInputState, setTalkInputState, enabledFeatures, handleToggleFeature, supportedFeatures, maxEnabledFeaturesReached, maxFeaturesReachedNote, forcedFeatures, device.loadData.Talk?.phone.max, formatMessage]);
|
|
463
|
-
const defaultAccessInputState =
|
|
463
|
+
const defaultAccessInputState = React.useMemo(() => ({
|
|
464
464
|
doors: 0
|
|
465
465
|
}), []);
|
|
466
|
-
const [accessInputState, setAccessInputState] =
|
|
467
|
-
const accessCard =
|
|
466
|
+
const [accessInputState, setAccessInputState] = React.useState(defaultAccessInputState);
|
|
467
|
+
const accessCard = React.useMemo(() => {
|
|
468
468
|
const isActive = enabledFeatures[ComputeResourceCalculator_types.FeatureId.Access];
|
|
469
469
|
return /* @__PURE__ */jsxRuntime.jsx(InputCard.InputCard, {
|
|
470
470
|
id: "computeResourceCalculator__inputCard__access",
|
|
@@ -492,11 +492,11 @@ const ComputeResourceCalculator = ({
|
|
|
492
492
|
}]
|
|
493
493
|
});
|
|
494
494
|
}, [accessInputState, setAccessInputState, enabledFeatures, handleToggleFeature, supportedFeatures, maxEnabledFeaturesReached, maxFeaturesReachedNote, forcedFeatures, device.loadData.Access?.door.max, formatMessage]);
|
|
495
|
-
const resetInputState =
|
|
495
|
+
const resetInputState = React.useCallback(deviceItem => {
|
|
496
496
|
setEnabledFeatures(getDefaultActiveFeatures(deviceItem));
|
|
497
497
|
setHddGigabytes(getDefaultHddGigabyteOption(deviceItem.settings?.hdd?.gigabyteOptions));
|
|
498
498
|
}, [getDefaultHddGigabyteOption]);
|
|
499
|
-
const selectDevice =
|
|
499
|
+
const selectDevice = React.useCallback(deviceItem => {
|
|
500
500
|
resetInputState(deviceItem);
|
|
501
501
|
setDevice(deviceItem);
|
|
502
502
|
}, [resetInputState]);
|
|
@@ -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 asset = require('../../../../../utils/asset.js');
|
|
@@ -28,15 +28,15 @@ const DeviceSelect = ({
|
|
|
28
28
|
const {
|
|
29
29
|
formatMessage
|
|
30
30
|
} = useResourceCalculatorTranslation.useResourceCalculatorTranslation();
|
|
31
|
-
const defaultCollapsedState =
|
|
31
|
+
const defaultCollapsedState = React.useMemo(() => {
|
|
32
32
|
const activeItemIndex = items.findIndex(item => item.active);
|
|
33
33
|
return !!collapseAt && activeItemIndex < collapseAt;
|
|
34
34
|
}, [collapseAt, items]);
|
|
35
|
-
const [isCollapsed, setIsCollapsed] =
|
|
36
|
-
const handleToggleCollapse =
|
|
35
|
+
const [isCollapsed, setIsCollapsed] = React.useState(defaultCollapsedState);
|
|
36
|
+
const handleToggleCollapse = React.useCallback(() => {
|
|
37
37
|
setIsCollapsed(!isCollapsed);
|
|
38
38
|
}, [isCollapsed]);
|
|
39
|
-
const mappedItems =
|
|
39
|
+
const mappedItems = React.useMemo(() => {
|
|
40
40
|
return items.map((item, i) => {
|
|
41
41
|
const isHidden = collapseAt !== void 0 && isCollapsed && i >= collapseAt;
|
|
42
42
|
return /* @__PURE__ */jsxRuntime.jsxs(DeviceSelect_styles.DeviceItem, {
|
|
@@ -69,9 +69,9 @@ const DeviceSelect = ({
|
|
|
69
69
|
}, item.id);
|
|
70
70
|
});
|
|
71
71
|
}, [items, isCollapsed, collapseAt, formatMessage]);
|
|
72
|
-
const scrollContainerRef =
|
|
72
|
+
const scrollContainerRef = React.useRef(null);
|
|
73
73
|
const isTablet = reactUse.useMedia(layout.BREAKPOINTS.TABLET_AND_DOWN, false);
|
|
74
|
-
const handleScrollToMax =
|
|
74
|
+
const handleScrollToMax = React.useCallback(scrollTo => {
|
|
75
75
|
if (scrollContainerRef.current) {
|
|
76
76
|
const left = scrollTo === "left" ? 0 : scrollContainerRef.current.scrollWidth;
|
|
77
77
|
scrollContainerRef.current.scrollTo({
|
|
@@ -80,11 +80,11 @@ const DeviceSelect = ({
|
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
}, [scrollContainerRef]);
|
|
83
|
-
const [showScrollBtn, setShowScrollBtn] =
|
|
83
|
+
const [showScrollBtn, setShowScrollBtn] = React.useState({
|
|
84
84
|
left: false,
|
|
85
85
|
right: false
|
|
86
86
|
});
|
|
87
|
-
const evaluateShowScrollBtn =
|
|
87
|
+
const evaluateShowScrollBtn = React.useCallback(() => {
|
|
88
88
|
if (!scrollContainerRef.current) {
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
@@ -103,10 +103,10 @@ const DeviceSelect = ({
|
|
|
103
103
|
right: evaluateScrollBtn("right")
|
|
104
104
|
});
|
|
105
105
|
}, [isTablet]);
|
|
106
|
-
|
|
106
|
+
React.useEffect(() => {
|
|
107
107
|
evaluateShowScrollBtn();
|
|
108
108
|
}, [isCollapsed, evaluateShowScrollBtn]);
|
|
109
|
-
|
|
109
|
+
React.useEffect(() => {
|
|
110
110
|
const scrollEl = scrollContainerRef.current;
|
|
111
111
|
if (scrollEl) {
|
|
112
112
|
scrollEl.addEventListener("scroll", evaluateShowScrollBtn);
|
|
@@ -117,7 +117,7 @@ const DeviceSelect = ({
|
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
119
|
}, [evaluateShowScrollBtn]);
|
|
120
|
-
const scrollHelperButtons =
|
|
120
|
+
const scrollHelperButtons = React.useMemo(() => {
|
|
121
121
|
if (!scrollContainerRef.current) {
|
|
122
122
|
return null;
|
|
123
123
|
}
|