@ubnt/store.core 9.53.0-alpha.5 → 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 +4 -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/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/ai-turret.jpg +0 -0
- package/lib/assets/ai-turret2.jpg +0 -0
- package/lib/assets/building-bridge-xg.jpg +0 -0
- package/lib/assets/building-bridge-xg2.jpg +0 -0
- package/lib/assets/building-bridge.jpg +0 -0
- package/lib/assets/building-bridge2.jpg +0 -0
- package/lib/assets/close2.svg +2 -3
- package/lib/assets/close3.svg +3 -2
- 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/industrial.jpg +0 -0
- package/lib/assets/industrial2.jpg +0 -0
- package/lib/assets/interior-design.svg +2 -2
- package/lib/assets/interior-design2.svg +2 -2
- package/lib/assets/minus4.svg +8 -8
- package/lib/assets/minus5.svg +8 -8
- package/lib/assets/plus6.svg +9 -9
- package/lib/assets/plus7.svg +9 -9
- package/lib/assets/reader-lite.jpg +0 -0
- package/lib/assets/reader-lite2.jpg +0 -0
- 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 +12 -12
- package/lib/components/Microsites/MicrositePageContext.js +2 -2
- package/lib/components/Microsites/MicrositeProductPage.js +3 -3
- package/lib/components/Microsites/context/MicrositeProductPageContext.js +3 -3
- package/lib/components/MobileModal/MobileModal.js +4 -4
- package/lib/components/Modal/Modal.js +3 -3
- package/lib/components/ModelCompareV3/ModelCompareOverflowScrollButton.js +3 -3
- package/lib/components/ModelCompareV3/ModelComparePropertyValueGridItem.js +2 -2
- package/lib/components/ModelCompareV3/ModelCompareV3.js +14 -14
- package/lib/components/ModelCompareV3/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 +6 -6
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/SliderSection.js +3 -3
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/plus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/plus.svg.mjs +2 -2
- 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 +17 -17
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/plus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/plus.svg.mjs +2 -2
- 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 +20 -20
- package/lib/components/VideoPlayerNew/VideoPlayer.mjs +1 -1
- package/lib/components/VideoPlayerNew/assets/close.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/close.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/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/BuildingBridge/building-bridge.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/BuildingBridge/building-bridge.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/DomeTurret/ai-turret.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DomeTurret/ai-turret.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/DoorAccess/reader-lite.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/reader-lite.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/interior-design.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/interior-design.svg.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/dome-and-turret/ai-turret.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-turret.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/door-access/reader-lite.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/reader-lite.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/interior-design.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/interior-design.svg.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/building-bridge/building-bridge.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/wifi/building-bridge/building-bridge.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/data/button-groups/interiorDesign.js +1 -1
- package/lib/constants/modelCompareData/data/button-groups/interiorDesign.mjs +1 -1
- package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/InteriorDesign.js +1 -1
- package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/InteriorDesign.mjs +1 -1
- 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/aiTurret.js +2 -2
- package/lib/constants/modelCompareData/data/products/aiTurret.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/buildingBridge.js +2 -2
- package/lib/constants/modelCompareData/data/products/buildingBridge.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/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/industrial.js +2 -2
- package/lib/constants/modelCompareData/data/products/industrial.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/readerLite.js +2 -2
- package/lib/constants/modelCompareData/data/products/readerLite.mjs +2 -2
- 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,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 styled = require('styled-components');
|
|
6
6
|
var useModelCompareTranslation = require('../../constants/modelCompareData/translations/useModelCompareTranslation.js');
|
|
7
7
|
var theme = require('../../constants/theme.js');
|
|
@@ -20,10 +20,10 @@ const ProductGroupsGrid = ({
|
|
|
20
20
|
const {
|
|
21
21
|
formatMessage
|
|
22
22
|
} = useModelCompareTranslation.useModelCompareTranslation();
|
|
23
|
-
const allProductGroups =
|
|
23
|
+
const allProductGroups = React.useMemo(() => {
|
|
24
24
|
return products.map(p => p.productGroup ?? null);
|
|
25
25
|
}, [products]);
|
|
26
|
-
const groupGroups =
|
|
26
|
+
const groupGroups = React.useMemo(() => {
|
|
27
27
|
const result = [];
|
|
28
28
|
let current = {
|
|
29
29
|
productGroup: null,
|
|
@@ -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 context = require('./context.js');
|
|
6
6
|
"use strict";
|
|
7
7
|
function ScrollGroup({
|
|
@@ -10,15 +10,15 @@ function ScrollGroup({
|
|
|
10
10
|
onAddItem,
|
|
11
11
|
onResizeItem
|
|
12
12
|
}) {
|
|
13
|
-
const scrollGroupItemsRef =
|
|
14
|
-
const currentManualScrollMetaRef =
|
|
15
|
-
const registerItem =
|
|
13
|
+
const scrollGroupItemsRef = React.useRef([]);
|
|
14
|
+
const currentManualScrollMetaRef = React.useRef(null);
|
|
15
|
+
const registerItem = React.useCallback(item => {
|
|
16
16
|
scrollGroupItemsRef.current.push(item);
|
|
17
17
|
return () => {
|
|
18
18
|
scrollGroupItemsRef.current = scrollGroupItemsRef.current.filter(existingItem => existingItem !== item);
|
|
19
19
|
};
|
|
20
20
|
}, []);
|
|
21
|
-
const contextValue =
|
|
21
|
+
const contextValue = React.useMemo(() => ({
|
|
22
22
|
registerItem,
|
|
23
23
|
scrollGroupItemsRef,
|
|
24
24
|
currentManualScrollMetaRef,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
4
|
"use strict";
|
|
5
|
-
const ScrollGroupContext =
|
|
5
|
+
const ScrollGroupContext = React.createContext(null);
|
|
6
6
|
function useScrollGroupContext() {
|
|
7
|
-
const contextValue =
|
|
7
|
+
const contextValue = React.useContext(ScrollGroupContext);
|
|
8
8
|
if (!contextValue) {
|
|
9
9
|
throw new Error("Please wrap this component in <ScrollGroup />");
|
|
10
10
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
4
|
var context = require('./context.js');
|
|
5
5
|
var useScrollGroupSetScroll = require('./useScrollGroupSetScroll.js');
|
|
6
6
|
"use strict";
|
|
@@ -13,13 +13,13 @@ function useScrollGroupItem(item) {
|
|
|
13
13
|
onAddItem,
|
|
14
14
|
onResizeItem
|
|
15
15
|
} = context.useScrollGroupContext();
|
|
16
|
-
|
|
16
|
+
React.useEffect(() => {
|
|
17
17
|
const unregisterItem = registerItem(item);
|
|
18
18
|
return () => {
|
|
19
19
|
unregisterItem();
|
|
20
20
|
};
|
|
21
21
|
}, [item, registerItem]);
|
|
22
|
-
|
|
22
|
+
React.useEffect(() => {
|
|
23
23
|
const element = item.refObject.current;
|
|
24
24
|
if (element) {
|
|
25
25
|
const handler = event => {
|
|
@@ -32,18 +32,18 @@ function useScrollGroupItem(item) {
|
|
|
32
32
|
}
|
|
33
33
|
return void 0;
|
|
34
34
|
}, [item, item.refObject, onScrollItem]);
|
|
35
|
-
const onAddItemRef =
|
|
36
|
-
|
|
35
|
+
const onAddItemRef = React.useRef(onAddItem);
|
|
36
|
+
React.useEffect(() => {
|
|
37
37
|
onAddItemRef.current = onAddItem;
|
|
38
38
|
}, [onAddItem]);
|
|
39
|
-
|
|
39
|
+
React.useEffect(() => {
|
|
40
40
|
const element = item.refObject.current;
|
|
41
41
|
if (element) {
|
|
42
42
|
onAddItemRef.current?.(element);
|
|
43
43
|
}
|
|
44
44
|
return void 0;
|
|
45
45
|
}, [item, item.refObject, onAddItem]);
|
|
46
|
-
|
|
46
|
+
React.useEffect(() => {
|
|
47
47
|
const element = item.refObject.current;
|
|
48
48
|
if (!element) {
|
|
49
49
|
return void 0;
|
|
@@ -57,7 +57,7 @@ function useScrollGroupItem(item) {
|
|
|
57
57
|
};
|
|
58
58
|
}, [item.refObject, onResizeItem]);
|
|
59
59
|
const scrollAllTo = useScrollGroupSetScroll.useScrollGroupSetScroll();
|
|
60
|
-
|
|
60
|
+
React.useEffect(() => {
|
|
61
61
|
const thisElement = item.refObject.current;
|
|
62
62
|
if (!thisElement) {
|
|
63
63
|
return;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
4
|
var context = require('./context.js');
|
|
5
5
|
"use strict";
|
|
6
6
|
function useScrollGroupSetScroll() {
|
|
7
7
|
const {
|
|
8
8
|
scrollGroupItemsRef
|
|
9
9
|
} = context.useScrollGroupContext();
|
|
10
|
-
return
|
|
10
|
+
return React.useCallback(offset => {
|
|
11
11
|
scrollGroupItemsRef.current?.forEach(({
|
|
12
12
|
refObject
|
|
13
13
|
}) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
4
|
var context = require('./context.js');
|
|
5
5
|
var useScrollGroupSetScroll = require('./useScrollGroupSetScroll.js');
|
|
6
6
|
"use strict";
|
|
@@ -10,7 +10,7 @@ function useScrollGroupTo() {
|
|
|
10
10
|
currentManualScrollMetaRef
|
|
11
11
|
} = context.useScrollGroupContext();
|
|
12
12
|
const setGroupScroll = useScrollGroupSetScroll.useScrollGroupSetScroll();
|
|
13
|
-
return
|
|
13
|
+
return React.useCallback(offset => {
|
|
14
14
|
currentManualScrollMetaRef.current = {
|
|
15
15
|
target: offset
|
|
16
16
|
};
|
|
@@ -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 styled = require('styled-components');
|
|
6
6
|
require('../ScrollGroup/index.js');
|
|
7
7
|
var context$1 = require('./context.js');
|
|
@@ -20,10 +20,10 @@ function StickyGrid({
|
|
|
20
20
|
templateColumns,
|
|
21
21
|
gap
|
|
22
22
|
}) {
|
|
23
|
-
const wrapperRef =
|
|
24
|
-
const [isAtMinX, setIsAtMinX] =
|
|
25
|
-
const [isAtMaxX, setIsAtMaxX] =
|
|
26
|
-
const evaluateXEndpoints =
|
|
23
|
+
const wrapperRef = React.useRef(null);
|
|
24
|
+
const [isAtMinX, setIsAtMinX] = React.useState(true);
|
|
25
|
+
const [isAtMaxX, setIsAtMaxX] = React.useState(true);
|
|
26
|
+
const evaluateXEndpoints = React.useCallback(element => {
|
|
27
27
|
if (element.scrollLeft === 0) {
|
|
28
28
|
if (!isAtMinX) {
|
|
29
29
|
setIsAtMinX(true);
|
|
@@ -39,7 +39,7 @@ function StickyGrid({
|
|
|
39
39
|
setIsAtMaxX(false);
|
|
40
40
|
}
|
|
41
41
|
}, [isAtMaxX, isAtMinX]);
|
|
42
|
-
const value =
|
|
42
|
+
const value = React.useMemo(() => ({
|
|
43
43
|
templateColumns,
|
|
44
44
|
gap,
|
|
45
45
|
isAtMaxX,
|
|
@@ -69,7 +69,7 @@ function StickyGridProvider({
|
|
|
69
69
|
scrollGroupItemsRef
|
|
70
70
|
} = context.useScrollGroupContext();
|
|
71
71
|
return /* @__PURE__ */jsxRuntime.jsx(context$1.StickyGridContext.Provider, {
|
|
72
|
-
value:
|
|
72
|
+
value: React.useMemo(() => ({
|
|
73
73
|
...value,
|
|
74
74
|
scrollGroupItemsRef,
|
|
75
75
|
scrollTo
|
|
@@ -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 styled = require('styled-components');
|
|
6
6
|
require('../ScrollGroup/index.js');
|
|
7
7
|
var context = require('./context.js');
|
|
@@ -20,7 +20,7 @@ function StickyGridBody({
|
|
|
20
20
|
templateColumns,
|
|
21
21
|
gap
|
|
22
22
|
} = context.useStickyGrid();
|
|
23
|
-
const contentRef =
|
|
23
|
+
const contentRef = React.useRef(null);
|
|
24
24
|
useScrollGroupItem.useScrollGroupItem({
|
|
25
25
|
refObject: contentRef
|
|
26
26
|
});
|
|
@@ -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 styled = require('styled-components');
|
|
6
6
|
require('../ScrollGroup/index.js');
|
|
7
7
|
var context = require('./context.js');
|
|
@@ -23,13 +23,13 @@ function StickyGridHeader({
|
|
|
23
23
|
templateColumns,
|
|
24
24
|
gap
|
|
25
25
|
} = grid;
|
|
26
|
-
const wrapperRef =
|
|
27
|
-
const contentRef =
|
|
26
|
+
const wrapperRef = React.useRef(null);
|
|
27
|
+
const contentRef = React.useRef(null);
|
|
28
28
|
useScrollGroupItem.useScrollGroupItem({
|
|
29
29
|
refObject: contentRef
|
|
30
30
|
});
|
|
31
|
-
const [isStuck, setIsStuck] =
|
|
32
|
-
|
|
31
|
+
const [isStuck, setIsStuck] = React.useState(false);
|
|
32
|
+
React.useEffect(() => {
|
|
33
33
|
if (!wrapperRef.current) {
|
|
34
34
|
setIsStuck(false);
|
|
35
35
|
return;
|
|
@@ -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 styled = require('styled-components');
|
|
6
6
|
function _interopDefault(e) {
|
|
7
7
|
return e && e.__esModule ? e : {
|
|
@@ -14,7 +14,7 @@ function StickyGridItem({
|
|
|
14
14
|
stickX,
|
|
15
15
|
...props
|
|
16
16
|
}) {
|
|
17
|
-
const ref =
|
|
17
|
+
const ref = React.useRef(null);
|
|
18
18
|
return /* @__PURE__ */jsxRuntime.jsx(StyledStickyGridItem, {
|
|
19
19
|
ref,
|
|
20
20
|
...props,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
4
|
"use strict";
|
|
5
|
-
const StickyGridContext =
|
|
5
|
+
const StickyGridContext = React.createContext(null);
|
|
6
6
|
function useStickyGrid() {
|
|
7
|
-
const value =
|
|
7
|
+
const value = React.useContext(StickyGridContext);
|
|
8
8
|
if (!value) {
|
|
9
9
|
throw new Error("Please wrap this component in <StickyGrid />");
|
|
10
10
|
}
|
|
@@ -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 emptyColumn = require('../../../constants/modelCompareData/data/products/emptyColumn.js');
|
|
6
6
|
var useModelCompareTranslation = require('../../../constants/modelCompareData/translations/useModelCompareTranslation.js');
|
|
7
7
|
require('../../../contexts/MenuContext/index.js');
|
|
@@ -33,17 +33,17 @@ const CompareTable = ({
|
|
|
33
33
|
const isProductSelected = selectedProducts2.some(selectedProduct => selectedProduct.productId === product.id);
|
|
34
34
|
return isProductSelected;
|
|
35
35
|
};
|
|
36
|
-
const transformPropertyValues =
|
|
36
|
+
const transformPropertyValues = React.useCallback((propertyValues, formatMessage2) => propertyValues.map(propertyValue => ({
|
|
37
37
|
propertyId: propertyValue.propertyId,
|
|
38
38
|
value: propertyValue.value.type === "translation" ? {
|
|
39
39
|
type: "string",
|
|
40
40
|
value: formatMessage2(propertyValue.value.value)
|
|
41
41
|
} : propertyValue.value
|
|
42
42
|
})), []);
|
|
43
|
-
const parseFootnotes =
|
|
43
|
+
const parseFootnotes = React.useMemo(() => (footnotes, storeId2) => {
|
|
44
44
|
return footnotes?.map(footnote => typeof footnote === "string" ? footnote : footnote(storeId2)).filter(f => typeof f === "string") || [];
|
|
45
45
|
}, []);
|
|
46
|
-
const transformProductForCompare =
|
|
46
|
+
const transformProductForCompare = React.useMemo(() => (product, storeId2, formatMessage2, additionalProductData2) => ({
|
|
47
47
|
...product,
|
|
48
48
|
propertyValues: transformPropertyValues(product.propertyValues, formatMessage2),
|
|
49
49
|
...(additionalProductData2?.find(p => p.id === product.id) || {}),
|
|
@@ -51,13 +51,13 @@ const CompareTable = ({
|
|
|
51
51
|
}), [parseFootnotes, transformPropertyValues]
|
|
52
52
|
// Add other stable dependencies as needed
|
|
53
53
|
);
|
|
54
|
-
const mutatedProducts =
|
|
54
|
+
const mutatedProducts = React.useMemo(() => section.products.filter(product => filterProducts(product, selectedProducts)).map(product => transformProductForCompare(product, storeId, formatMessage, additionalProductData)), [additionalProductData, formatMessage, section.products, storeId, selectedProducts, transformProductForCompare]);
|
|
55
55
|
const products = mutatedProducts.filter((product1, i, arr) => arr.findIndex(product2 => product2.id === product1.id) === i);
|
|
56
|
-
const sortedProducts =
|
|
56
|
+
const sortedProducts = React.useMemo(() => {
|
|
57
57
|
const productOrder = selectedProducts.map(product => product.productId);
|
|
58
58
|
return products.sort((a, b) => productOrder.indexOf(a.id) - productOrder.indexOf(b.id));
|
|
59
59
|
}, [selectedProducts, products]);
|
|
60
|
-
const numberOfColumns =
|
|
60
|
+
const numberOfColumns = React.useMemo(() => getNumberOfColumns.getNumberOfColumns({
|
|
61
61
|
selectedProducts,
|
|
62
62
|
selectedProductsLimit
|
|
63
63
|
}), [selectedProducts, selectedProductsLimit]);
|
|
@@ -71,7 +71,7 @@ const CompareTable = ({
|
|
|
71
71
|
};
|
|
72
72
|
const emptyColumns = createEmptyGridItems(emptyColumn.emptyColumn);
|
|
73
73
|
const productsWithEmptyGridItems = [...sortedProducts, ...emptyColumns];
|
|
74
|
-
const properties =
|
|
74
|
+
const properties = React.useMemo(() => section.properties.map(property => ({
|
|
75
75
|
...property,
|
|
76
76
|
title: formatMessage(property.title),
|
|
77
77
|
tooltip: property.tooltip && formatMessage(property.tooltip)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var Tooltip = require('@ubnt/ui-components/Tooltip');
|
|
5
|
-
var
|
|
5
|
+
var React = require('react');
|
|
6
6
|
var reactUse = require('react-use');
|
|
7
7
|
var layout = require('../../../constants/layout.js');
|
|
8
8
|
require('../../../constants/modelCompareData/assets/close.svg.js');
|
|
@@ -71,31 +71,31 @@ const CompareTableMarkup = ({
|
|
|
71
71
|
const isSmallScreen = screenWidth < CompareTable_styles.MOBILE_BREAKPOINT;
|
|
72
72
|
const isGreaterThanDesktopWidth = screenWidth > layout.CONTAINER_WIDTH.DESKTOP;
|
|
73
73
|
const leftColumnWidth = isSmallScreen ? 0 : Math.min(screenWidth / 4, propertyColumnWidth);
|
|
74
|
-
const maxImageHeight =
|
|
74
|
+
const maxImageHeight = React.useMemo(() => {
|
|
75
75
|
return Math.max(...products.map(product => product.image.height));
|
|
76
76
|
}, [products]);
|
|
77
77
|
const stickOffset = headerStickOffset ? headerStickOffset({
|
|
78
78
|
maxImageHeight
|
|
79
79
|
}) : 0;
|
|
80
|
-
const numberOfColumns =
|
|
80
|
+
const numberOfColumns = React.useMemo(() =>
|
|
81
81
|
// TODO: is there a better way to write this?
|
|
82
82
|
selectedProducts && selectedProductsLimit && getNumberOfColumns.getNumberOfColumns({
|
|
83
83
|
selectedProducts,
|
|
84
84
|
selectedProductsLimit
|
|
85
85
|
}), [selectedProducts, selectedProductsLimit]);
|
|
86
|
-
const getTemplateColumnWidth =
|
|
86
|
+
const getTemplateColumnWidth = React.useCallback(() => {
|
|
87
87
|
if (isSmallScreen) return "100%";
|
|
88
88
|
if (isGreaterThanDesktopWidth) return "1fr";
|
|
89
89
|
return `${columnWidth}px`;
|
|
90
90
|
}, [isSmallScreen, columnWidth, isGreaterThanDesktopWidth]);
|
|
91
91
|
const templateColumns = `${leftColumnWidth}px repeat(${isStaticTable ? products.length : numberOfColumns}, ${getTemplateColumnWidth()})`;
|
|
92
|
-
const hasNotes =
|
|
92
|
+
const hasNotes = React.useMemo(() => {
|
|
93
93
|
return products.some(el => !!el.notes?.length);
|
|
94
94
|
}, [products]);
|
|
95
|
-
const hasFootnotes =
|
|
95
|
+
const hasFootnotes = React.useMemo(() => {
|
|
96
96
|
return products.some(el => el.footnotes?.length);
|
|
97
97
|
}, [products]);
|
|
98
|
-
const getComingSoonButtonText =
|
|
98
|
+
const getComingSoonButtonText = React.useCallback(product => {
|
|
99
99
|
const buttonText = product.comingSoonButtonText;
|
|
100
100
|
if (typeof buttonText === "string") {
|
|
101
101
|
return formatMessage(buttonText);
|
|
@@ -108,7 +108,7 @@ const CompareTableMarkup = ({
|
|
|
108
108
|
}
|
|
109
109
|
return formatMessage("Coming Soon");
|
|
110
110
|
}, [formatMessage, storeId]);
|
|
111
|
-
const renderButton =
|
|
111
|
+
const renderButton = React.useCallback(({
|
|
112
112
|
product,
|
|
113
113
|
index
|
|
114
114
|
}) => {
|
|
@@ -151,7 +151,7 @@ const CompareTableMarkup = ({
|
|
|
151
151
|
}
|
|
152
152
|
return createButton(formatMessage("Buy Now"), storeHref);
|
|
153
153
|
}, [createSiteUrl, formatMessage, getComingSoonButtonText, onLinkClick, showBuyButton, storeId]);
|
|
154
|
-
const renderBadges =
|
|
154
|
+
const renderBadges = React.useCallback(product => {
|
|
155
155
|
if (!showBadges) {
|
|
156
156
|
return null;
|
|
157
157
|
}
|
|
@@ -169,8 +169,8 @@ const CompareTableMarkup = ({
|
|
|
169
169
|
});
|
|
170
170
|
return null;
|
|
171
171
|
}, [formatMessage, showBadges]);
|
|
172
|
-
const moreThanOneProductIsSelected =
|
|
173
|
-
const renderProductHeader =
|
|
172
|
+
const moreThanOneProductIsSelected = React.useMemo(() => products.filter(product => product.id !== emptyColumn.emptyColumn.id).length > 1, [products]);
|
|
173
|
+
const renderProductHeader = React.useCallback(({
|
|
174
174
|
product,
|
|
175
175
|
setSelectedProducts: setSelectedProducts2,
|
|
176
176
|
index,
|
|
@@ -235,7 +235,7 @@ const CompareTableMarkup = ({
|
|
|
235
235
|
})
|
|
236
236
|
}, `${product.id}-${index}`);
|
|
237
237
|
}, [createSiteUrl, storeId, linkToStoreTitleClick, hasBeenObserved, isStaticTable, moreThanOneProductIsSelected, isSmallScreen, formatMessage, languageDirection, renderBadges, onLinkClick]);
|
|
238
|
-
const renderEmptyColumnHeader =
|
|
238
|
+
const renderEmptyColumnHeader = React.useCallback(({
|
|
239
239
|
product,
|
|
240
240
|
index
|
|
241
241
|
}) => {
|
|
@@ -292,7 +292,7 @@ const CompareTableMarkup = ({
|
|
|
292
292
|
index
|
|
293
293
|
}))]
|
|
294
294
|
}), /* @__PURE__ */jsxRuntime.jsxs(StickyGridBody.StickyGridBody, {
|
|
295
|
-
children: [properties.map((property, index) => /* @__PURE__ */jsxRuntime.jsxs(
|
|
295
|
+
children: [properties.map((property, index) => /* @__PURE__ */jsxRuntime.jsxs(React.Fragment, {
|
|
296
296
|
children: [/* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.PropertyTitleGridItem, {
|
|
297
297
|
stickX: true,
|
|
298
298
|
children: !!leftColumnWidth && /* @__PURE__ */jsxRuntime.jsxs(CompareTable_styles.PropertyTitleGridItemContent, {
|
|
@@ -303,7 +303,7 @@ const CompareTableMarkup = ({
|
|
|
303
303
|
src: property.icon
|
|
304
304
|
})
|
|
305
305
|
}), /* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.PropertyTitle, {
|
|
306
|
-
children: property.title.split("\n").map((part, i, arr) => /* @__PURE__ */jsxRuntime.jsxs(
|
|
306
|
+
children: property.title.split("\n").map((part, i, arr) => /* @__PURE__ */jsxRuntime.jsxs(React.Fragment, {
|
|
307
307
|
children: [part, i < arr.length - 1 && /* @__PURE__ */jsxRuntime.jsx("br", {})]
|
|
308
308
|
}, i))
|
|
309
309
|
}), property.tooltip && /* @__PURE__ */jsxRuntime.jsxs(CompareTable_styles.PropertyTooltip, {
|
|
@@ -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 styled = require('styled-components');
|
|
6
6
|
require('../../../constants/modelCompareData/assets/arrow-right.svg.js');
|
|
7
7
|
require('../../StyleableSvgImage/index.js');
|
|
@@ -30,7 +30,7 @@ function ModelCompareOverflowScrollButton({
|
|
|
30
30
|
scrollTo
|
|
31
31
|
} = context.useStickyGrid();
|
|
32
32
|
const icon = typeof arrowRightIcon__default["default"] === "string" ? arrowRightIcon__default["default"] : arrowRightIcon__default["default"].src;
|
|
33
|
-
const handleClick =
|
|
33
|
+
const handleClick = React.useCallback(() => {
|
|
34
34
|
const anyScrollItem = scrollGroupItemsRef.current?.[0]?.refObject.current;
|
|
35
35
|
if (!anyScrollItem) {
|
|
36
36
|
return;
|
|
@@ -46,7 +46,7 @@ function ModelCompareOverflowScrollButton({
|
|
|
46
46
|
behavior: "smooth"
|
|
47
47
|
});
|
|
48
48
|
}, [onClickColumnDiff, scrollGroupItemsRef, scrollTo, totalColumns, totalDeadSpace]);
|
|
49
|
-
const arrowOffset =
|
|
49
|
+
const arrowOffset = React.useMemo(() => {
|
|
50
50
|
if (isSmallScreen) {
|
|
51
51
|
return rotationDegrees < 180 ? -5 : 0;
|
|
52
52
|
}
|
|
@@ -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 styled = require('styled-components');
|
|
7
7
|
require('../../../constants/modelCompareData/assets/check.svg.js');
|
|
@@ -89,7 +89,7 @@ function PropertyValueComponent({
|
|
|
89
89
|
const {
|
|
90
90
|
languageDirection
|
|
91
91
|
} = context.useMenu();
|
|
92
|
-
const asterisks =
|
|
92
|
+
const asterisks = React.useMemo(() => {
|
|
93
93
|
if (!productProperty?.value.asterisk) {
|
|
94
94
|
return null;
|
|
95
95
|
}
|
|
@@ -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 context = require('./context.js');
|
|
6
6
|
"use strict";
|
|
7
7
|
function ScrollGroup({
|
|
@@ -10,15 +10,15 @@ function ScrollGroup({
|
|
|
10
10
|
onAddItem,
|
|
11
11
|
onResizeItem
|
|
12
12
|
}) {
|
|
13
|
-
const scrollGroupItemsRef =
|
|
14
|
-
const currentManualScrollMetaRef =
|
|
15
|
-
const registerItem =
|
|
13
|
+
const scrollGroupItemsRef = React.useRef([]);
|
|
14
|
+
const currentManualScrollMetaRef = React.useRef(null);
|
|
15
|
+
const registerItem = React.useCallback(item => {
|
|
16
16
|
scrollGroupItemsRef.current.push(item);
|
|
17
17
|
return () => {
|
|
18
18
|
scrollGroupItemsRef.current = scrollGroupItemsRef.current.filter(existingItem => existingItem !== item);
|
|
19
19
|
};
|
|
20
20
|
}, []);
|
|
21
|
-
const contextValue =
|
|
21
|
+
const contextValue = React.useMemo(() => ({
|
|
22
22
|
registerItem,
|
|
23
23
|
scrollGroupItemsRef,
|
|
24
24
|
currentManualScrollMetaRef,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
4
|
"use strict";
|
|
5
|
-
const ScrollGroupContext =
|
|
5
|
+
const ScrollGroupContext = React.createContext(null);
|
|
6
6
|
function useScrollGroupContext() {
|
|
7
|
-
const contextValue =
|
|
7
|
+
const contextValue = React.useContext(ScrollGroupContext);
|
|
8
8
|
if (!contextValue) {
|
|
9
9
|
throw new Error("Please wrap this component in <ScrollGroup />");
|
|
10
10
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
4
|
var context = require('./context.js');
|
|
5
5
|
var useScrollGroupSetScroll = require('./useScrollGroupSetScroll.js');
|
|
6
6
|
"use strict";
|
|
@@ -13,13 +13,13 @@ function useScrollGroupItem(item) {
|
|
|
13
13
|
onAddItem,
|
|
14
14
|
onResizeItem
|
|
15
15
|
} = context.useScrollGroupContext();
|
|
16
|
-
|
|
16
|
+
React.useEffect(() => {
|
|
17
17
|
const unregisterItem = registerItem(item);
|
|
18
18
|
return () => {
|
|
19
19
|
unregisterItem();
|
|
20
20
|
};
|
|
21
21
|
}, [item, registerItem]);
|
|
22
|
-
|
|
22
|
+
React.useEffect(() => {
|
|
23
23
|
const element = item.refObject.current;
|
|
24
24
|
if (element) {
|
|
25
25
|
const handler = event => {
|
|
@@ -32,18 +32,18 @@ function useScrollGroupItem(item) {
|
|
|
32
32
|
}
|
|
33
33
|
return void 0;
|
|
34
34
|
}, [item, item.refObject, onScrollItem]);
|
|
35
|
-
const onAddItemRef =
|
|
36
|
-
|
|
35
|
+
const onAddItemRef = React.useRef(onAddItem);
|
|
36
|
+
React.useEffect(() => {
|
|
37
37
|
onAddItemRef.current = onAddItem;
|
|
38
38
|
}, [onAddItem]);
|
|
39
|
-
|
|
39
|
+
React.useEffect(() => {
|
|
40
40
|
const element = item.refObject.current;
|
|
41
41
|
if (element) {
|
|
42
42
|
onAddItemRef.current?.(element);
|
|
43
43
|
}
|
|
44
44
|
return void 0;
|
|
45
45
|
}, [item, item.refObject, onAddItem]);
|
|
46
|
-
|
|
46
|
+
React.useEffect(() => {
|
|
47
47
|
const element = item.refObject.current;
|
|
48
48
|
if (!element) {
|
|
49
49
|
return void 0;
|
|
@@ -57,7 +57,7 @@ function useScrollGroupItem(item) {
|
|
|
57
57
|
};
|
|
58
58
|
}, [item.refObject, onResizeItem]);
|
|
59
59
|
const scrollAllTo = useScrollGroupSetScroll.useScrollGroupSetScroll();
|
|
60
|
-
|
|
60
|
+
React.useEffect(() => {
|
|
61
61
|
const thisElement = item.refObject.current;
|
|
62
62
|
if (!thisElement) {
|
|
63
63
|
return;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
4
|
var context = require('./context.js');
|
|
5
5
|
"use strict";
|
|
6
6
|
function useScrollGroupSetScroll() {
|
|
7
7
|
const {
|
|
8
8
|
scrollGroupItemsRef
|
|
9
9
|
} = context.useScrollGroupContext();
|
|
10
|
-
return
|
|
10
|
+
return React.useCallback(offset => {
|
|
11
11
|
scrollGroupItemsRef.current?.forEach(({
|
|
12
12
|
refObject
|
|
13
13
|
}) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
4
|
var context = require('./context.js');
|
|
5
5
|
var useScrollGroupSetScroll = require('./useScrollGroupSetScroll.js');
|
|
6
6
|
"use strict";
|
|
@@ -10,7 +10,7 @@ function useScrollGroupTo() {
|
|
|
10
10
|
currentManualScrollMetaRef
|
|
11
11
|
} = context.useScrollGroupContext();
|
|
12
12
|
const setGroupScroll = useScrollGroupSetScroll.useScrollGroupSetScroll();
|
|
13
|
-
return
|
|
13
|
+
return React.useCallback(offset => {
|
|
14
14
|
currentManualScrollMetaRef.current = {
|
|
15
15
|
target: offset
|
|
16
16
|
};
|
|
@@ -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 styled = require('styled-components');
|
|
6
6
|
require('../ScrollGroup/index.js');
|
|
7
7
|
var context$1 = require('./context.js');
|
|
@@ -20,10 +20,10 @@ function StickyGrid({
|
|
|
20
20
|
templateColumns,
|
|
21
21
|
gap
|
|
22
22
|
}) {
|
|
23
|
-
const wrapperRef =
|
|
24
|
-
const [isAtMinX, setIsAtMinX] =
|
|
25
|
-
const [isAtMaxX, setIsAtMaxX] =
|
|
26
|
-
const evaluateXEndpoints =
|
|
23
|
+
const wrapperRef = React.useRef(null);
|
|
24
|
+
const [isAtMinX, setIsAtMinX] = React.useState(true);
|
|
25
|
+
const [isAtMaxX, setIsAtMaxX] = React.useState(true);
|
|
26
|
+
const evaluateXEndpoints = React.useCallback(element => {
|
|
27
27
|
if (element.scrollLeft === 0) {
|
|
28
28
|
if (!isAtMinX) {
|
|
29
29
|
setIsAtMinX(true);
|
|
@@ -39,7 +39,7 @@ function StickyGrid({
|
|
|
39
39
|
setIsAtMaxX(false);
|
|
40
40
|
}
|
|
41
41
|
}, [isAtMaxX, isAtMinX]);
|
|
42
|
-
const value =
|
|
42
|
+
const value = React.useMemo(() => ({
|
|
43
43
|
templateColumns,
|
|
44
44
|
gap,
|
|
45
45
|
isAtMaxX,
|
|
@@ -69,7 +69,7 @@ function StickyGridProvider({
|
|
|
69
69
|
scrollGroupItemsRef
|
|
70
70
|
} = context.useScrollGroupContext();
|
|
71
71
|
return /* @__PURE__ */jsxRuntime.jsx(context$1.StickyGridContext.Provider, {
|
|
72
|
-
value:
|
|
72
|
+
value: React.useMemo(() => ({
|
|
73
73
|
...value,
|
|
74
74
|
scrollGroupItemsRef,
|
|
75
75
|
scrollTo
|