@ubnt/store.core 9.17.0-alpha.5 → 9.17.0
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 +2 -158
- package/lib/_virtual/_virtual_multi-entry.js +12 -27
- package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
- package/lib/_virtual/_virtual_multi-entry.mjs +10 -14
- package/lib/_virtual/_virtual_multi-entry.mjs.map +1 -1
- package/lib/apis/smartcat.js +1 -4
- package/lib/apis/smartcat.js.map +1 -1
- package/lib/apis/smartcat.mjs +1 -4
- package/lib/apis/smartcat.mjs.map +1 -1
- package/lib/assets/attention.svg +5 -5
- package/lib/assets/attention2.svg +5 -5
- package/lib/{components/ResourceCalculatorV1/assets/consoles/ucg-max.png.js → assets/icons/menu/icon-globe.svg.js} +6 -6
- package/lib/assets/icons/menu/icon-globe.svg.js.map +1 -0
- package/lib/assets/icons/menu/icon-globe.svg.mjs +3 -0
- package/lib/assets/icons/menu/icon-globe.svg.mjs.map +1 -0
- package/lib/assets/udmPro.jpg +0 -0
- package/lib/assets/udmPro2.jpg +0 -0
- package/lib/assets/udmProMax.jpg +0 -0
- package/lib/assets/udmProMax2.jpg +0 -0
- package/lib/assets/udmProSpecial.jpg +0 -0
- package/lib/assets/udmProSpecial2.jpg +0 -0
- package/lib/components/CategoryTabs/CategoryTabs.styles.d.ts +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.types.d.ts +1 -1
- package/lib/components/CloserLookSection/CloserLookSection.js.map +1 -1
- package/lib/components/CloserLookSection/CloserLookSection.mjs.map +1 -1
- package/lib/components/Compare/Compare.styles.d.ts +5 -5
- package/lib/components/Container/Container.d.ts +1 -1
- package/lib/components/Container/Container.js +3 -4
- package/lib/components/Container/Container.js.map +1 -1
- package/lib/components/Container/Container.mjs +4 -5
- package/lib/components/Container/Container.mjs.map +1 -1
- package/lib/components/CustomImage/CustomImage.js.map +1 -1
- package/lib/components/CustomImage/CustomImage.mjs.map +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.js.map +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.mjs.map +1 -1
- package/lib/components/Footer/hooks/useFooterContent.d.ts +3 -1
- package/lib/components/Footer/hooks/useFooterContent.js +8 -1
- package/lib/components/Footer/hooks/useFooterContent.js.map +1 -1
- package/lib/components/Footer/hooks/useFooterContent.mjs +8 -1
- package/lib/components/Footer/hooks/useFooterContent.mjs.map +1 -1
- package/lib/components/Footer/translations/ar.json.js +1 -1
- package/lib/components/Footer/translations/ar.json.mjs +1 -1
- package/lib/components/Footer/translations/de.json.js +1 -1
- package/lib/components/Footer/translations/de.json.mjs +1 -1
- package/lib/components/Footer/translations/el.json.js +1 -1
- package/lib/components/Footer/translations/el.json.mjs +1 -1
- package/lib/components/Footer/translations/en.json.js +1 -0
- package/lib/components/Footer/translations/en.json.js.map +1 -1
- package/lib/components/Footer/translations/en.json.mjs +1 -0
- package/lib/components/Footer/translations/en.json.mjs.map +1 -1
- package/lib/components/Footer/translations/es.json.js +1 -1
- package/lib/components/Footer/translations/es.json.mjs +1 -1
- package/lib/components/Footer/translations/fr.json.js +4 -4
- package/lib/components/Footer/translations/fr.json.mjs +4 -4
- package/lib/components/Footer/translations/it.json.js +1 -1
- package/lib/components/Footer/translations/it.json.mjs +1 -1
- package/lib/components/Footer/translations/ja.json.js +2 -2
- package/lib/components/Footer/translations/ja.json.mjs +2 -2
- package/lib/components/Footer/translations/pt-BR.json.js +1 -1
- package/lib/components/Footer/translations/pt-BR.json.mjs +1 -1
- package/lib/components/Footer/translations/zh-Hans.json.js +4 -4
- package/lib/components/Footer/translations/zh-Hans.json.mjs +4 -4
- package/lib/components/Footer/translations/zh-Hant-TW.json.js +1 -1
- package/lib/components/Footer/translations/zh-Hant-TW.json.mjs +1 -1
- package/lib/components/GridGallery/GridGallery.js.map +1 -1
- package/lib/components/GridGallery/GridGallery.mjs.map +1 -1
- package/lib/components/Header/AccountMenu/AccountMenu.js +12 -20
- package/lib/components/Header/AccountMenu/AccountMenu.js.map +1 -1
- package/lib/components/Header/AccountMenu/AccountMenu.mjs +14 -22
- package/lib/components/Header/AccountMenu/AccountMenu.mjs.map +1 -1
- package/lib/components/Header/AccountMenu/megaphone.http.service.js +1 -4
- package/lib/components/Header/AccountMenu/megaphone.http.service.js.map +1 -1
- package/lib/components/Header/AccountMenu/megaphone.http.service.mjs +1 -4
- package/lib/components/Header/AccountMenu/megaphone.http.service.mjs.map +1 -1
- package/lib/components/Header/CartModalV2/CartModal.js.map +1 -1
- package/lib/components/Header/CartModalV2/CartModal.mjs.map +1 -1
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/Header.mjs.map +1 -1
- package/lib/components/Header/Header.styles.d.ts +2 -2
- package/lib/components/Header/Header.types.d.ts +4 -8
- package/lib/components/Header/Header.types.js +1 -2
- package/lib/components/Header/Header.types.js.map +1 -1
- package/lib/components/Header/Header.types.mjs +1 -2
- package/lib/components/Header/Header.types.mjs.map +1 -1
- package/lib/components/Header/LanguageFrame/LanguageFrame.js.map +1 -1
- package/lib/components/Header/LanguageFrame/LanguageFrame.mjs.map +1 -1
- package/lib/components/Header/LanguageFrame/Mobile/Mobile.js.map +1 -1
- package/lib/components/Header/LanguageFrame/Mobile/Mobile.mjs.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.d.ts +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.js +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.js.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.mjs +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.mjs.map +1 -1
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.d.ts +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.d.ts +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.d.ts +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js +63 -85
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs +64 -86
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.d.ts +0 -6
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js +1 -11
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs +2 -10
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.types.d.ts +1 -5
- package/lib/components/Header/Overlay/Overlay.js.map +1 -1
- package/lib/components/Header/Overlay/Overlay.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.d.ts +4 -2
- package/lib/components/Header/ProHeader/ProHeader.js +36 -148
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +39 -149
- package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +1 -4
- package/lib/components/Header/ProHeader/ProHeader.styles.js +18 -20
- package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs +19 -18
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
- package/lib/components/Header/translations/en.json.js +1 -4
- package/lib/components/Header/translations/en.json.js.map +1 -1
- package/lib/components/Header/translations/en.json.mjs +2 -4
- package/lib/components/Header/translations/en.json.mjs.map +1 -1
- package/lib/components/Hero/Hero.styles.d.ts +2 -2
- package/lib/components/HeroFadeGallery/HeroFadeGallery.styles.d.ts +1 -1
- package/lib/components/HowToUseSection/HowToUseSection.styles.d.ts +2 -2
- package/lib/components/ImageSequence/ImageSequence.js.map +1 -1
- package/lib/components/ImageSequence/ImageSequence.mjs.map +1 -1
- package/lib/components/LandingPage/Cards/Card/Card.js.map +1 -1
- package/lib/components/LandingPage/Cards/Card/Card.mjs.map +1 -1
- package/lib/components/LandingPage/Cards/Cards.js.map +1 -1
- package/lib/components/LandingPage/Cards/Cards.mjs.map +1 -1
- package/lib/components/LandingPagePro/LandingPagePro.d.ts +0 -3
- package/lib/components/LandingPagePro/LandingPagePro.js +3 -3
- package/lib/components/LandingPagePro/LandingPagePro.js.map +1 -1
- package/lib/components/LandingPagePro/LandingPagePro.mjs +2 -2
- package/lib/components/LandingPagePro/LandingPagePro.mjs.map +1 -1
- package/lib/components/LandingPagePro/LandingPagePro.styles.d.ts +1 -1
- package/lib/components/LayoutRenderer/LayoutRenderer.styles.d.ts +1 -1
- package/lib/components/LayoutRendererV1/LayoutRenderer.styles.d.ts +3 -3
- package/lib/components/LayoutRendererV2/LayoutRenderer.styles.d.ts +3 -3
- package/lib/components/MicrositeIntroductionBlock/MicrositeIntroductionBlock.js.map +1 -1
- package/lib/components/MicrositeIntroductionBlock/MicrositeIntroductionBlock.mjs.map +1 -1
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.js.map +1 -1
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.mjs.map +1 -1
- package/lib/components/MicrositeProductGrid/MicrositeProductGrid.js.map +1 -1
- package/lib/components/MicrositeProductGrid/MicrositeProductGrid.mjs.map +1 -1
- package/lib/components/MicrositeSectionWrap/MicrositeSectionWrap.styles.d.ts +1 -1
- package/lib/components/Microsites/MicrositeProductPage.js +39 -0
- package/lib/components/Microsites/MicrositeProductPage.js.map +1 -1
- package/lib/components/Microsites/MicrositeProductPage.mjs +39 -0
- package/lib/components/Microsites/MicrositeProductPage.mjs.map +1 -1
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridHeader.js.map +1 -1
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridHeader.mjs.map +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/data/CloudGateways.js +9 -9
- package/lib/components/ModelCompareV3/data/CloudGateways.mjs +6 -6
- package/lib/components/ModelCompareV3/data/products/udmPro.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +1 -1
- package/lib/components/ProductCompare/ProductCompare.js.map +1 -1
- package/lib/components/ProductCompare/ProductCompare.mjs.map +1 -1
- package/lib/components/ProductSectionNavigation/ProductSectionNavigation.styles.d.ts +1 -1
- package/lib/components/ProductSectionNavigationV2/ProductSectionNavigation.styles.d.ts +1 -1
- package/lib/components/ProductTechSpecs/ProductTechSpecs.styles.d.ts +1 -1
- package/lib/components/QuantityControls/QuantityControls.js.map +1 -1
- package/lib/components/QuantityControls/QuantityControls.mjs.map +1 -1
- package/lib/components/RelatedProducts/RelatedProducts.js.map +1 -1
- package/lib/components/RelatedProducts/RelatedProducts.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js +17 -313
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs +17 -311
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.d.ts +2 -3
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.js +0 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.mjs +0 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.js +34 -120
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.mjs +34 -120
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.d.ts +2 -16
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.js +12 -54
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.mjs +11 -50
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/assets/ArrowLeftPrimary.svg.js +5 -5
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/assets/ArrowRightPrimary.svg.js +5 -5
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.js +0 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.mjs +0 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ResourceCalculator.js +2 -1
- package/lib/components/ResourceCalculatorV1/ResourceCalculator.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ResourceCalculator.mjs +2 -1
- package/lib/components/ResourceCalculatorV1/ResourceCalculator.mjs.map +1 -1
- package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/HorizontalOptionSelect.d.ts +1 -1
- package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/HorizontalOptionSelect.js +1 -3
- package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.js.map +1 -0
- package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/HorizontalOptionSelect.mjs +1 -3
- package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.mjs.map +1 -0
- package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/HorizontalOptionSelect.styles.d.ts +0 -1
- package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/HorizontalOptionSelect.styles.js +7 -10
- package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.js.map +1 -0
- package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/HorizontalOptionSelect.styles.mjs +7 -10
- package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.mjs.map +1 -0
- package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/HorizontalOptionSelect.types.d.ts +0 -1
- package/lib/components/ResourceCalculatorV1/components/index.d.ts +1 -0
- package/lib/components/ResourceCalculatorV1/components/index.js +5 -0
- package/lib/components/{Header/Navigation/ProMenu → ResourceCalculatorV1/components}/index.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/components/index.mjs +3 -0
- package/lib/components/ResourceCalculatorV1/translations/en.json.js +4 -6
- package/lib/components/ResourceCalculatorV1/translations/en.json.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/translations/en.json.mjs +4 -6
- package/lib/components/ResourceCalculatorV1/translations/en.json.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/translations/useResourceCalculatorTranslation.d.ts +2 -2
- package/lib/components/ReverseLoopingVideo/ReverseLoopingVideo.js.map +1 -1
- package/lib/components/ReverseLoopingVideo/ReverseLoopingVideo.mjs.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.js.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.mjs.map +1 -1
- package/lib/components/StorageSliders/Slider/Slider.js.map +1 -1
- package/lib/components/StorageSliders/Slider/Slider.mjs.map +1 -1
- package/lib/components/StorageSliders/StorageSliders.context.js.map +1 -1
- package/lib/components/StorageSliders/StorageSliders.context.mjs.map +1 -1
- package/lib/components/VariantSelector/Variant/Compatibility/Compatibility.js.map +1 -1
- package/lib/components/VariantSelector/Variant/Compatibility/Compatibility.mjs.map +1 -1
- package/lib/components/VariantSelector/Variant/Variant.js.map +1 -1
- package/lib/components/VariantSelector/Variant/Variant.mjs.map +1 -1
- package/lib/components/index.d.ts +0 -1
- package/lib/components/index.js +0 -2
- package/lib/components/index.js.map +1 -1
- package/lib/components/index.mjs +0 -2
- 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/optionIcons.js +6 -6
- package/lib/constants/optionIcons.mjs +4 -4
- package/lib/constants/proStoreCategories/mapping/index.d.ts +0 -1
- package/lib/constants/proStoreCategories/mapping/index.js +10 -15
- package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.mjs +10 -15
- package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.d.ts +1 -2
- package/lib/constants/proStoreCategories/mapping/unifi.js +0 -1
- package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.mjs +0 -1
- package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.js +0 -3
- package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs +1 -3
- package/lib/constants/proStoreCategories/translations/en.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.js +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.mjs +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +1 -1
- package/lib/constants/url.d.ts +2 -1
- package/lib/constants/url.js +1 -0
- package/lib/constants/url.js.map +1 -1
- package/lib/constants/url.mjs +1 -0
- package/lib/constants/url.mjs.map +1 -1
- package/lib/contexts/MenuContext/context.js +1 -1
- package/lib/contexts/MenuContext/context.js.map +1 -1
- package/lib/contexts/MenuContext/context.mjs +1 -1
- package/lib/contexts/MenuContext/context.mjs.map +1 -1
- package/lib/contexts/MenuContext/utils.js +1 -0
- package/lib/contexts/MenuContext/utils.js.map +1 -1
- package/lib/contexts/MenuContext/utils.mjs +1 -0
- package/lib/contexts/MenuContext/utils.mjs.map +1 -1
- package/lib/helpers/index.d.ts +0 -1
- package/lib/helpers/index.js +0 -11
- package/lib/helpers/index.js.map +1 -1
- package/lib/helpers/index.mjs +0 -1
- package/lib/helpers/index.mjs.map +1 -1
- package/lib/helpers/ux.d.ts +1 -9
- package/lib/helpers/ux.js +0 -15
- package/lib/helpers/ux.js.map +1 -1
- package/lib/helpers/ux.mjs +1 -15
- package/lib/helpers/ux.mjs.map +1 -1
- package/lib/hooks/useHasTouch.js.map +1 -1
- package/lib/hooks/useHasTouch.mjs.map +1 -1
- package/lib/hooks/useHorizontalScroll.js.map +1 -1
- package/lib/hooks/useHorizontalScroll.mjs.map +1 -1
- package/lib/types/index.d.ts +0 -1
- package/lib/types/index.js +0 -2
- package/lib/types/index.js.map +1 -1
- package/lib/types/index.mjs +0 -1
- package/lib/types/index.mjs.map +1 -1
- package/lib/utils/array.d.ts +0 -4
- package/lib/utils/array.js +0 -10
- package/lib/utils/array.js.map +1 -1
- package/lib/utils/array.mjs +1 -10
- package/lib/utils/array.mjs.map +1 -1
- package/lib/utils/money/constants.d.ts +25 -56
- package/lib/utils/money/constants.js +7 -72
- package/lib/utils/money/constants.js.map +1 -1
- package/lib/utils/money/constants.mjs +7 -70
- package/lib/utils/money/constants.mjs.map +1 -1
- package/lib/utils/money/format.d.ts +5 -10
- package/lib/utils/money/format.js +14 -22
- package/lib/utils/money/format.js.map +1 -1
- package/lib/utils/money/format.mjs +16 -23
- package/lib/utils/money/format.mjs.map +1 -1
- package/lib/utils/money/index.d.ts +1 -4
- package/lib/utils/money/index.js +8 -26
- package/lib/utils/money/index.js.map +1 -1
- package/lib/utils/money/index.mjs +4 -8
- package/lib/utils/money/index.mjs.map +1 -1
- package/lib/utils/money/misc.d.ts +28 -68
- package/lib/utils/money/misc.js +64 -35
- package/lib/utils/money/misc.js.map +1 -1
- package/lib/utils/money/misc.mjs +43 -32
- package/lib/utils/money/misc.mjs.map +1 -1
- package/lib/utils/money/tax.d.ts +2 -38
- package/lib/utils/money/tax.js +10 -46
- package/lib/utils/money/tax.js.map +1 -1
- package/lib/utils/money/tax.mjs +11 -42
- package/lib/utils/money/tax.mjs.map +1 -1
- package/lib/utils/money/types.d.ts +3 -78
- package/lib/utils/number.d.ts +1 -1
- package/lib/utils/number.js +1 -1
- package/lib/utils/number.js.map +1 -1
- package/lib/utils/number.mjs +1 -1
- package/lib/utils/number.mjs.map +1 -1
- package/lib/utils/validations/postalCodeSuperRefinement.js +3 -0
- package/lib/utils/validations/postalCodeSuperRefinement.js.map +1 -1
- package/lib/utils/validations/postalCodeSuperRefinement.mjs +3 -0
- package/lib/utils/validations/postalCodeSuperRefinement.mjs.map +1 -1
- package/lib/utils/validations/stateRegistrationNumberSuperRefinement.js +2 -0
- package/lib/utils/validations/stateRegistrationNumberSuperRefinement.js.map +1 -1
- package/lib/utils/validations/stateRegistrationNumberSuperRefinement.mjs +2 -0
- package/lib/utils/validations/stateRegistrationNumberSuperRefinement.mjs.map +1 -1
- package/lib/utils/validations/taxIdSuperRefinement.js +2 -0
- package/lib/utils/validations/taxIdSuperRefinement.js.map +1 -1
- package/lib/utils/validations/taxIdSuperRefinement.mjs +2 -0
- package/lib/utils/validations/taxIdSuperRefinement.mjs.map +1 -1
- package/lib/utils/validations.d.ts +15 -0
- package/lib/utils/validations.js +23 -0
- package/lib/utils/validations.js.map +1 -0
- package/lib/utils/validations.mjs +21 -0
- package/lib/utils/validations.mjs.map +1 -0
- package/lib/utils/variant.js.map +1 -1
- package/lib/utils/variant.mjs.map +1 -1
- package/lib/utils/wattage.js.map +1 -1
- package/lib/utils/wattage.mjs.map +1 -1
- package/package.json +1 -1
- package/lib/assets/efg.png +0 -0
- package/lib/assets/icon-location-pin.svg +0 -5
- package/lib/assets/icons/menu/icon-location-pin.svg.js +0 -27
- package/lib/assets/icons/menu/icon-location-pin.svg.js.map +0 -1
- package/lib/assets/icons/menu/icon-location-pin.svg.mjs +0 -3
- package/lib/assets/icons/menu/icon-location-pin.svg.mjs.map +0 -1
- package/lib/assets/ucg-max.png +0 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.d.ts +0 -2
- package/lib/components/Header/Navigation/ProMenu/ProMenu.js +0 -109
- package/lib/components/Header/Navigation/ProMenu/ProMenu.js.map +0 -1
- package/lib/components/Header/Navigation/ProMenu/ProMenu.mjs +0 -87
- package/lib/components/Header/Navigation/ProMenu/ProMenu.mjs.map +0 -1
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.d.ts +0 -24
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.js +0 -154
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.js.map +0 -1
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.mjs +0 -138
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.mjs.map +0 -1
- package/lib/components/Header/Navigation/ProMenu/ProMenu.types.d.ts +0 -13
- package/lib/components/Header/Navigation/ProMenu/index.d.ts +0 -1
- package/lib/components/Header/Navigation/ProMenu/index.js +0 -6
- package/lib/components/Header/Navigation/ProMenu/index.mjs +0 -3
- package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.js.map +0 -1
- package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.mjs.map +0 -1
- package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.js.map +0 -1
- package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.mjs.map +0 -1
- package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.js +0 -27
- package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.js.map +0 -1
- package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.mjs +0 -3
- package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.mjs.map +0 -1
- package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.js.map +0 -1
- package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.mjs +0 -3
- package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.mjs.map +0 -1
- package/lib/helpers/product.d.ts +0 -87
- package/lib/helpers/product.js +0 -346
- package/lib/helpers/product.js.map +0 -1
- package/lib/helpers/product.mjs +0 -335
- package/lib/helpers/product.mjs.map +0 -1
- package/lib/types/product.d.ts +0 -87
- package/lib/types/product.js +0 -14
- package/lib/types/product.js.map +0 -1
- package/lib/types/product.mjs +0 -13
- package/lib/types/product.mjs.map +0 -1
- package/lib/utils/money/allocators/fixedAmount.d.ts +0 -26
- package/lib/utils/money/allocators/fixedAmount.js +0 -55
- package/lib/utils/money/allocators/fixedAmount.js.map +0 -1
- package/lib/utils/money/allocators/fixedAmount.mjs +0 -53
- package/lib/utils/money/allocators/fixedAmount.mjs.map +0 -1
- package/lib/utils/money/allocators/index.d.ts +0 -2
- package/lib/utils/money/allocators/index.js +0 -8
- package/lib/utils/money/allocators/index.js.map +0 -1
- package/lib/utils/money/allocators/index.mjs +0 -4
- package/lib/utils/money/allocators/index.mjs.map +0 -1
- package/lib/utils/money/allocators/productAmount.d.ts +0 -13
- package/lib/utils/money/allocators/productAmount.js +0 -110
- package/lib/utils/money/allocators/productAmount.js.map +0 -1
- package/lib/utils/money/allocators/productAmount.mjs +0 -108
- package/lib/utils/money/allocators/productAmount.mjs.map +0 -1
- package/lib/utils/money/exchangeRate.d.ts +0 -31
- package/lib/utils/money/exchangeRate.js +0 -27
- package/lib/utils/money/exchangeRate.js.map +0 -1
- package/lib/utils/money/exchangeRate.mjs +0 -23
- package/lib/utils/money/exchangeRate.mjs.map +0 -1
- package/lib/utils/money/misc.private.d.ts +0 -23
- package/lib/utils/money/misc.private.js +0 -46
- package/lib/utils/money/misc.private.js.map +0 -1
- package/lib/utils/money/misc.private.mjs +0 -21
- package/lib/utils/money/misc.private.mjs.map +0 -1
- package/lib/utils/money/shipping.d.ts +0 -5
- package/lib/utils/money/shipping.js +0 -8
- package/lib/utils/money/shipping.js.map +0 -1
- package/lib/utils/money/shipping.mjs +0 -6
- package/lib/utils/money/shipping.mjs.map +0 -1
- package/lib/utils/money/tax.private.d.ts +0 -17
- package/lib/utils/money/tax.private.js +0 -65
- package/lib/utils/money/tax.private.js.map +0 -1
- package/lib/utils/money/tax.private.mjs +0 -60
- package/lib/utils/money/tax.private.mjs.map +0 -1
- package/lib/utils/productSort.d.ts +0 -41
- package/lib/utils/productSort.js +0 -66
- package/lib/utils/productSort.js.map +0 -1
- package/lib/utils/productSort.mjs +0 -59
- package/lib/utils/productSort.mjs.map +0 -1
- /package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/index.d.ts +0 -0
- /package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/index.js +0 -0
- /package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/index.js.map +0 -0
- /package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/index.mjs +0 -0
- /package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/index.mjs.map +0 -0
- /package/lib/components/{Header/Navigation/ProMenu → ResourceCalculatorV1/components}/index.mjs.map +0 -0
|
@@ -9,6 +9,7 @@ var ar = {
|
|
|
9
9
|
"footer.link.becomeTrainer": "كن مدربا",
|
|
10
10
|
"footer.link.calendar": "التقويم",
|
|
11
11
|
"footer.link.careers": "الوظائف",
|
|
12
|
+
"footer.link.compliance": "الامتثال",
|
|
12
13
|
"footer.link.contact": "اتصل بنا",
|
|
13
14
|
"footer.link.courses": "الدورات",
|
|
14
15
|
"footer.link.designCenter": "مركز UniFi للتصميم",
|
|
@@ -17,7 +18,6 @@ var ar = {
|
|
|
17
18
|
"footer.link.downloads": "تنزيلات",
|
|
18
19
|
"footer.link.investors": "المستثمرون",
|
|
19
20
|
"footer.link.legal": "القانونية",
|
|
20
|
-
"footer.link.stock": "أداة تحديد موقع الأسهم",
|
|
21
21
|
"footer.link.store": "متجر Ubiquiti",
|
|
22
22
|
"footer.link.terms.conditions": "الشروط والأحكام",
|
|
23
23
|
"footer.link.terms.cookie": "إعدادات ملفات تعريف الارتباط",
|
|
@@ -14,6 +14,7 @@ var de = {
|
|
|
14
14
|
"footer.link.becomeTrainer": "Trainer werden",
|
|
15
15
|
"footer.link.calendar": "Kalender",
|
|
16
16
|
"footer.link.careers": "Karriere",
|
|
17
|
+
"footer.link.compliance": "Einhaltung",
|
|
17
18
|
"footer.link.contact": "Kontakt",
|
|
18
19
|
"footer.link.courses": "Kursen",
|
|
19
20
|
"footer.link.designCenter": "UniFi Design Center",
|
|
@@ -22,7 +23,6 @@ var de = {
|
|
|
22
23
|
"footer.link.downloads": "Downloads",
|
|
23
24
|
"footer.link.investors": "Investor",
|
|
24
25
|
"footer.link.legal": "Rechtliches",
|
|
25
|
-
"footer.link.stock": "Lagerbestandsfinder-Tool",
|
|
26
26
|
"footer.link.store": "Ubiquiti Store",
|
|
27
27
|
"footer.link.terms.conditions": "Allgemeine Geschäftsbedingungen",
|
|
28
28
|
"footer.link.terms.cookie": "Cookie-Einstellungen",
|
|
@@ -9,6 +9,7 @@ var de = {
|
|
|
9
9
|
"footer.link.becomeTrainer": "Trainer werden",
|
|
10
10
|
"footer.link.calendar": "Kalender",
|
|
11
11
|
"footer.link.careers": "Karriere",
|
|
12
|
+
"footer.link.compliance": "Einhaltung",
|
|
12
13
|
"footer.link.contact": "Kontakt",
|
|
13
14
|
"footer.link.courses": "Kursen",
|
|
14
15
|
"footer.link.designCenter": "UniFi Design Center",
|
|
@@ -17,7 +18,6 @@ var de = {
|
|
|
17
18
|
"footer.link.downloads": "Downloads",
|
|
18
19
|
"footer.link.investors": "Investor",
|
|
19
20
|
"footer.link.legal": "Rechtliches",
|
|
20
|
-
"footer.link.stock": "Lagerbestandsfinder-Tool",
|
|
21
21
|
"footer.link.store": "Ubiquiti Store",
|
|
22
22
|
"footer.link.terms.conditions": "Allgemeine Geschäftsbedingungen",
|
|
23
23
|
"footer.link.terms.cookie": "Cookie-Einstellungen",
|
|
@@ -14,6 +14,7 @@ var el = {
|
|
|
14
14
|
"footer.link.becomeTrainer": "Γίνετε εκπαιδευτής",
|
|
15
15
|
"footer.link.calendar": "Ημερολόγιο",
|
|
16
16
|
"footer.link.careers": "Καριέρα",
|
|
17
|
+
"footer.link.compliance": "Συμμόρφωση",
|
|
17
18
|
"footer.link.contact": "Επικοινωνήστε Μαζί Μας",
|
|
18
19
|
"footer.link.courses": "Μαθήματα",
|
|
19
20
|
"footer.link.designCenter": "Κέντρο Σχεδιασμού UniFi",
|
|
@@ -22,7 +23,6 @@ var el = {
|
|
|
22
23
|
"footer.link.downloads": "Λήψεις",
|
|
23
24
|
"footer.link.investors": "Επενδυτές",
|
|
24
25
|
"footer.link.legal": "Νομική",
|
|
25
|
-
"footer.link.stock": "Εργαλείο Εντοπισμού Αποθεμάτων",
|
|
26
26
|
"footer.link.store": "Κατάστημα Ubiquiti",
|
|
27
27
|
"footer.link.terms.conditions": "Όροι και Προϋποθέσεις",
|
|
28
28
|
"footer.link.terms.cookie": "Ρυθμίσεις Cookies",
|
|
@@ -9,6 +9,7 @@ var el = {
|
|
|
9
9
|
"footer.link.becomeTrainer": "Γίνετε εκπαιδευτής",
|
|
10
10
|
"footer.link.calendar": "Ημερολόγιο",
|
|
11
11
|
"footer.link.careers": "Καριέρα",
|
|
12
|
+
"footer.link.compliance": "Συμμόρφωση",
|
|
12
13
|
"footer.link.contact": "Επικοινωνήστε Μαζί Μας",
|
|
13
14
|
"footer.link.courses": "Μαθήματα",
|
|
14
15
|
"footer.link.designCenter": "Κέντρο Σχεδιασμού UniFi",
|
|
@@ -17,7 +18,6 @@ var el = {
|
|
|
17
18
|
"footer.link.downloads": "Λήψεις",
|
|
18
19
|
"footer.link.investors": "Επενδυτές",
|
|
19
20
|
"footer.link.legal": "Νομική",
|
|
20
|
-
"footer.link.stock": "Εργαλείο Εντοπισμού Αποθεμάτων",
|
|
21
21
|
"footer.link.store": "Κατάστημα Ubiquiti",
|
|
22
22
|
"footer.link.terms.conditions": "Όροι και Προϋποθέσεις",
|
|
23
23
|
"footer.link.terms.cookie": "Ρυθμίσεις Cookies",
|
|
@@ -14,6 +14,7 @@ var EN_TRANSLATION = {
|
|
|
14
14
|
"footer.link.becomeTrainer": "Become a Trainer",
|
|
15
15
|
"footer.link.calendar": "Calendar",
|
|
16
16
|
"footer.link.careers": "Careers",
|
|
17
|
+
"footer.link.compliance": "Compliance",
|
|
17
18
|
"footer.link.contact": "Contact Us",
|
|
18
19
|
"footer.link.courses": "Courses",
|
|
19
20
|
"footer.link.designCenter": "UniFi Design Center",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -9,6 +9,7 @@ var EN_TRANSLATION = {
|
|
|
9
9
|
"footer.link.becomeTrainer": "Become a Trainer",
|
|
10
10
|
"footer.link.calendar": "Calendar",
|
|
11
11
|
"footer.link.careers": "Careers",
|
|
12
|
+
"footer.link.compliance": "Compliance",
|
|
12
13
|
"footer.link.contact": "Contact Us",
|
|
13
14
|
"footer.link.courses": "Courses",
|
|
14
15
|
"footer.link.designCenter": "UniFi Design Center",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -14,6 +14,7 @@ var es = {
|
|
|
14
14
|
"footer.link.becomeTrainer": "Conviértete en Entrenador",
|
|
15
15
|
"footer.link.calendar": "Calendario",
|
|
16
16
|
"footer.link.careers": "Carreras",
|
|
17
|
+
"footer.link.compliance": "Cumplimiento",
|
|
17
18
|
"footer.link.contact": "Contáctenos",
|
|
18
19
|
"footer.link.courses": "Cursos",
|
|
19
20
|
"footer.link.designCenter": "UniFi Design Center",
|
|
@@ -22,7 +23,6 @@ var es = {
|
|
|
22
23
|
"footer.link.downloads": "Descargas",
|
|
23
24
|
"footer.link.investors": "Inversores",
|
|
24
25
|
"footer.link.legal": "Legal",
|
|
25
|
-
"footer.link.stock": "Localizador de Inventario",
|
|
26
26
|
"footer.link.store": "Tienda Ubiquiti",
|
|
27
27
|
"footer.link.terms.conditions": "Términos y Condiciones",
|
|
28
28
|
"footer.link.terms.cookie": "Configuración de Cookies",
|
|
@@ -9,6 +9,7 @@ var es = {
|
|
|
9
9
|
"footer.link.becomeTrainer": "Conviértete en Entrenador",
|
|
10
10
|
"footer.link.calendar": "Calendario",
|
|
11
11
|
"footer.link.careers": "Carreras",
|
|
12
|
+
"footer.link.compliance": "Cumplimiento",
|
|
12
13
|
"footer.link.contact": "Contáctenos",
|
|
13
14
|
"footer.link.courses": "Cursos",
|
|
14
15
|
"footer.link.designCenter": "UniFi Design Center",
|
|
@@ -17,7 +18,6 @@ var es = {
|
|
|
17
18
|
"footer.link.downloads": "Descargas",
|
|
18
19
|
"footer.link.investors": "Inversores",
|
|
19
20
|
"footer.link.legal": "Legal",
|
|
20
|
-
"footer.link.stock": "Localizador de Inventario",
|
|
21
21
|
"footer.link.store": "Tienda Ubiquiti",
|
|
22
22
|
"footer.link.terms.conditions": "Términos y Condiciones",
|
|
23
23
|
"footer.link.terms.cookie": "Configuración de Cookies",
|
|
@@ -7,13 +7,14 @@ var fr = {
|
|
|
7
7
|
"footer.copyright": "Ubiquiti, Inc. Tous droits réservés.",
|
|
8
8
|
"footer.header.buy": "Achetez Maintenant",
|
|
9
9
|
"footer.header.company": "Entreprise",
|
|
10
|
-
"footer.header.social": "
|
|
10
|
+
"footer.header.social": "Social",
|
|
11
11
|
"footer.header.terms": "Termes",
|
|
12
12
|
"footer.header.tools": "Outils",
|
|
13
13
|
"footer.header.training": "Formation",
|
|
14
14
|
"footer.link.becomeTrainer": "Devenir Formateur",
|
|
15
15
|
"footer.link.calendar": "Calendrier",
|
|
16
16
|
"footer.link.careers": "Carrières",
|
|
17
|
+
"footer.link.compliance": "Conformité",
|
|
17
18
|
"footer.link.contact": "Contactez-Nous",
|
|
18
19
|
"footer.link.courses": "Cours",
|
|
19
20
|
"footer.link.designCenter": "Centre de Design d'UniFi",
|
|
@@ -22,7 +23,6 @@ var fr = {
|
|
|
22
23
|
"footer.link.downloads": "Téléchargements",
|
|
23
24
|
"footer.link.investors": "Investisseurs",
|
|
24
25
|
"footer.link.legal": "Juridique",
|
|
25
|
-
"footer.link.stock": "Outil de Localisation des Stocks",
|
|
26
26
|
"footer.link.store": "Boutique en Ligne",
|
|
27
27
|
"footer.link.terms.conditions": "Termes et Conditions",
|
|
28
28
|
"footer.link.terms.cookie": "Paramètres des Cookies",
|
|
@@ -32,8 +32,8 @@ var fr = {
|
|
|
32
32
|
"footer.link.terms.service": "Conditions d'Utilisation",
|
|
33
33
|
"footer.link.trainers": "Formateurs",
|
|
34
34
|
"footer.link.uisp": "UISP",
|
|
35
|
-
"footer.link.uispDesignCenter": "
|
|
36
|
-
"footer.link.wifiman": "
|
|
35
|
+
"footer.link.uispDesignCenter": "UISP Design Center",
|
|
36
|
+
"footer.link.wifiman": "WiFiman",
|
|
37
37
|
"footer.newsletter.email": "Courriel",
|
|
38
38
|
"footer.newsletter.error": "Une erreur s'est produite, veuillez réessayer plus tard.",
|
|
39
39
|
"footer.newsletter.error.invalidEmail": "Veuillez entrer une adresse e-mail valide.",
|
|
@@ -2,13 +2,14 @@ var fr = {
|
|
|
2
2
|
"footer.copyright": "Ubiquiti, Inc. Tous droits réservés.",
|
|
3
3
|
"footer.header.buy": "Achetez Maintenant",
|
|
4
4
|
"footer.header.company": "Entreprise",
|
|
5
|
-
"footer.header.social": "
|
|
5
|
+
"footer.header.social": "Social",
|
|
6
6
|
"footer.header.terms": "Termes",
|
|
7
7
|
"footer.header.tools": "Outils",
|
|
8
8
|
"footer.header.training": "Formation",
|
|
9
9
|
"footer.link.becomeTrainer": "Devenir Formateur",
|
|
10
10
|
"footer.link.calendar": "Calendrier",
|
|
11
11
|
"footer.link.careers": "Carrières",
|
|
12
|
+
"footer.link.compliance": "Conformité",
|
|
12
13
|
"footer.link.contact": "Contactez-Nous",
|
|
13
14
|
"footer.link.courses": "Cours",
|
|
14
15
|
"footer.link.designCenter": "Centre de Design d'UniFi",
|
|
@@ -17,7 +18,6 @@ var fr = {
|
|
|
17
18
|
"footer.link.downloads": "Téléchargements",
|
|
18
19
|
"footer.link.investors": "Investisseurs",
|
|
19
20
|
"footer.link.legal": "Juridique",
|
|
20
|
-
"footer.link.stock": "Outil de Localisation des Stocks",
|
|
21
21
|
"footer.link.store": "Boutique en Ligne",
|
|
22
22
|
"footer.link.terms.conditions": "Termes et Conditions",
|
|
23
23
|
"footer.link.terms.cookie": "Paramètres des Cookies",
|
|
@@ -27,8 +27,8 @@ var fr = {
|
|
|
27
27
|
"footer.link.terms.service": "Conditions d'Utilisation",
|
|
28
28
|
"footer.link.trainers": "Formateurs",
|
|
29
29
|
"footer.link.uisp": "UISP",
|
|
30
|
-
"footer.link.uispDesignCenter": "
|
|
31
|
-
"footer.link.wifiman": "
|
|
30
|
+
"footer.link.uispDesignCenter": "UISP Design Center",
|
|
31
|
+
"footer.link.wifiman": "WiFiman",
|
|
32
32
|
"footer.newsletter.email": "Courriel",
|
|
33
33
|
"footer.newsletter.error": "Une erreur s'est produite, veuillez réessayer plus tard.",
|
|
34
34
|
"footer.newsletter.error.invalidEmail": "Veuillez entrer une adresse e-mail valide.",
|
|
@@ -14,6 +14,7 @@ var it = {
|
|
|
14
14
|
"footer.link.becomeTrainer": "Diventa un formatore",
|
|
15
15
|
"footer.link.calendar": "Calendario",
|
|
16
16
|
"footer.link.careers": "Carriere",
|
|
17
|
+
"footer.link.compliance": "Conformità",
|
|
17
18
|
"footer.link.contact": "Contattaci",
|
|
18
19
|
"footer.link.courses": "Corsi",
|
|
19
20
|
"footer.link.designCenter": "UniFi Design Center",
|
|
@@ -22,7 +23,6 @@ var it = {
|
|
|
22
23
|
"footer.link.downloads": "Download",
|
|
23
24
|
"footer.link.investors": "Investitori",
|
|
24
25
|
"footer.link.legal": "Legale",
|
|
25
|
-
"footer.link.stock": "Strumento Stock Locator",
|
|
26
26
|
"footer.link.store": "Ubiquiti Store",
|
|
27
27
|
"footer.link.terms.conditions": "Termini e Condizioni",
|
|
28
28
|
"footer.link.terms.cookie": "Impostazioni dei cookie",
|
|
@@ -9,6 +9,7 @@ var it = {
|
|
|
9
9
|
"footer.link.becomeTrainer": "Diventa un formatore",
|
|
10
10
|
"footer.link.calendar": "Calendario",
|
|
11
11
|
"footer.link.careers": "Carriere",
|
|
12
|
+
"footer.link.compliance": "Conformità",
|
|
12
13
|
"footer.link.contact": "Contattaci",
|
|
13
14
|
"footer.link.courses": "Corsi",
|
|
14
15
|
"footer.link.designCenter": "UniFi Design Center",
|
|
@@ -17,7 +18,6 @@ var it = {
|
|
|
17
18
|
"footer.link.downloads": "Download",
|
|
18
19
|
"footer.link.investors": "Investitori",
|
|
19
20
|
"footer.link.legal": "Legale",
|
|
20
|
-
"footer.link.stock": "Strumento Stock Locator",
|
|
21
21
|
"footer.link.store": "Ubiquiti Store",
|
|
22
22
|
"footer.link.terms.conditions": "Termini e Condizioni",
|
|
23
23
|
"footer.link.terms.cookie": "Impostazioni dei cookie",
|
|
@@ -8,12 +8,13 @@ var ja = {
|
|
|
8
8
|
"footer.header.buy": "今すぐ購入",
|
|
9
9
|
"footer.header.company": "会社情報",
|
|
10
10
|
"footer.header.social": "ソーシャル",
|
|
11
|
-
"footer.header.terms": "
|
|
11
|
+
"footer.header.terms": "用語",
|
|
12
12
|
"footer.header.tools": "ツール",
|
|
13
13
|
"footer.header.training": "トレーニング情報",
|
|
14
14
|
"footer.link.becomeTrainer": "トレーナーになる",
|
|
15
15
|
"footer.link.calendar": "カレンダー",
|
|
16
16
|
"footer.link.careers": "採用情報",
|
|
17
|
+
"footer.link.compliance": "コンプライアンス",
|
|
17
18
|
"footer.link.contact": "お問い合わせ",
|
|
18
19
|
"footer.link.courses": "コース",
|
|
19
20
|
"footer.link.designCenter": "UniFi Design Center",
|
|
@@ -22,7 +23,6 @@ var ja = {
|
|
|
22
23
|
"footer.link.downloads": "ダウンロード",
|
|
23
24
|
"footer.link.investors": "IR情報",
|
|
24
25
|
"footer.link.legal": "リーガル情報",
|
|
25
|
-
"footer.link.stock": "販売代理店在庫",
|
|
26
26
|
"footer.link.store": "Ubiquiti 公式ストア",
|
|
27
27
|
"footer.link.terms.conditions": "利用規約",
|
|
28
28
|
"footer.link.terms.cookie": "クッキー設定",
|
|
@@ -3,12 +3,13 @@ var ja = {
|
|
|
3
3
|
"footer.header.buy": "今すぐ購入",
|
|
4
4
|
"footer.header.company": "会社情報",
|
|
5
5
|
"footer.header.social": "ソーシャル",
|
|
6
|
-
"footer.header.terms": "
|
|
6
|
+
"footer.header.terms": "用語",
|
|
7
7
|
"footer.header.tools": "ツール",
|
|
8
8
|
"footer.header.training": "トレーニング情報",
|
|
9
9
|
"footer.link.becomeTrainer": "トレーナーになる",
|
|
10
10
|
"footer.link.calendar": "カレンダー",
|
|
11
11
|
"footer.link.careers": "採用情報",
|
|
12
|
+
"footer.link.compliance": "コンプライアンス",
|
|
12
13
|
"footer.link.contact": "お問い合わせ",
|
|
13
14
|
"footer.link.courses": "コース",
|
|
14
15
|
"footer.link.designCenter": "UniFi Design Center",
|
|
@@ -17,7 +18,6 @@ var ja = {
|
|
|
17
18
|
"footer.link.downloads": "ダウンロード",
|
|
18
19
|
"footer.link.investors": "IR情報",
|
|
19
20
|
"footer.link.legal": "リーガル情報",
|
|
20
|
-
"footer.link.stock": "販売代理店在庫",
|
|
21
21
|
"footer.link.store": "Ubiquiti 公式ストア",
|
|
22
22
|
"footer.link.terms.conditions": "利用規約",
|
|
23
23
|
"footer.link.terms.cookie": "クッキー設定",
|
|
@@ -14,6 +14,7 @@ var ptBR = {
|
|
|
14
14
|
"footer.link.becomeTrainer": "Torne-se um Instrutor",
|
|
15
15
|
"footer.link.calendar": "Calendário",
|
|
16
16
|
"footer.link.careers": "Carreiras",
|
|
17
|
+
"footer.link.compliance": "Conformidade",
|
|
17
18
|
"footer.link.contact": "Contate-nos",
|
|
18
19
|
"footer.link.courses": "Cursos",
|
|
19
20
|
"footer.link.designCenter": "UniFi Design Center",
|
|
@@ -22,7 +23,6 @@ var ptBR = {
|
|
|
22
23
|
"footer.link.downloads": "Downloads",
|
|
23
24
|
"footer.link.investors": "Investidores",
|
|
24
25
|
"footer.link.legal": "Legal",
|
|
25
|
-
"footer.link.stock": "Localizador Estoque",
|
|
26
26
|
"footer.link.store": "Loja Ubiquiti",
|
|
27
27
|
"footer.link.terms.conditions": "Termos e Condições",
|
|
28
28
|
"footer.link.terms.cookie": "Configurações de Cookies",
|
|
@@ -9,6 +9,7 @@ var ptBR = {
|
|
|
9
9
|
"footer.link.becomeTrainer": "Torne-se um Instrutor",
|
|
10
10
|
"footer.link.calendar": "Calendário",
|
|
11
11
|
"footer.link.careers": "Carreiras",
|
|
12
|
+
"footer.link.compliance": "Conformidade",
|
|
12
13
|
"footer.link.contact": "Contate-nos",
|
|
13
14
|
"footer.link.courses": "Cursos",
|
|
14
15
|
"footer.link.designCenter": "UniFi Design Center",
|
|
@@ -17,7 +18,6 @@ var ptBR = {
|
|
|
17
18
|
"footer.link.downloads": "Downloads",
|
|
18
19
|
"footer.link.investors": "Investidores",
|
|
19
20
|
"footer.link.legal": "Legal",
|
|
20
|
-
"footer.link.stock": "Localizador Estoque",
|
|
21
21
|
"footer.link.store": "Loja Ubiquiti",
|
|
22
22
|
"footer.link.terms.conditions": "Termos e Condições",
|
|
23
23
|
"footer.link.terms.cookie": "Configurações de Cookies",
|
|
@@ -14,6 +14,7 @@ var zhHans = {
|
|
|
14
14
|
"footer.link.becomeTrainer": "成为培训师",
|
|
15
15
|
"footer.link.calendar": "培训日历",
|
|
16
16
|
"footer.link.careers": "工作机会",
|
|
17
|
+
"footer.link.compliance": "合规",
|
|
17
18
|
"footer.link.contact": "联系我们",
|
|
18
19
|
"footer.link.courses": "培训课程",
|
|
19
20
|
"footer.link.designCenter": "UniFi 设计中心",
|
|
@@ -21,8 +22,7 @@ var zhHans = {
|
|
|
21
22
|
"footer.link.distributor.find": "寻找分销商",
|
|
22
23
|
"footer.link.downloads": "下载",
|
|
23
24
|
"footer.link.investors": "投资者",
|
|
24
|
-
"footer.link.legal": "
|
|
25
|
-
"footer.link.stock": "库存定位工具",
|
|
25
|
+
"footer.link.legal": "法律条款",
|
|
26
26
|
"footer.link.store": "Ubiquiti 官方商城",
|
|
27
27
|
"footer.link.terms.conditions": "条款及条件",
|
|
28
28
|
"footer.link.terms.cookie": "Cookies 设置",
|
|
@@ -34,8 +34,8 @@ var zhHans = {
|
|
|
34
34
|
"footer.link.uisp": "UISP",
|
|
35
35
|
"footer.link.uispDesignCenter": "UISP 设计中心",
|
|
36
36
|
"footer.link.wifiman": "WiFiman",
|
|
37
|
-
"footer.newsletter.email": "
|
|
38
|
-
"footer.newsletter.error": "
|
|
37
|
+
"footer.newsletter.email": "邮箱",
|
|
38
|
+
"footer.newsletter.error": "发生错误,请稍后再试。",
|
|
39
39
|
"footer.newsletter.error.invalidEmail": "请输入有效的电子邮件地址。",
|
|
40
40
|
"footer.newsletter.error.missingEmail": "请输入有效的电子邮件地址。",
|
|
41
41
|
"footer.newsletter.error.tooManyRequests": "请求过多,请稍后再试。",
|
|
@@ -9,6 +9,7 @@ var zhHans = {
|
|
|
9
9
|
"footer.link.becomeTrainer": "成为培训师",
|
|
10
10
|
"footer.link.calendar": "培训日历",
|
|
11
11
|
"footer.link.careers": "工作机会",
|
|
12
|
+
"footer.link.compliance": "合规",
|
|
12
13
|
"footer.link.contact": "联系我们",
|
|
13
14
|
"footer.link.courses": "培训课程",
|
|
14
15
|
"footer.link.designCenter": "UniFi 设计中心",
|
|
@@ -16,8 +17,7 @@ var zhHans = {
|
|
|
16
17
|
"footer.link.distributor.find": "寻找分销商",
|
|
17
18
|
"footer.link.downloads": "下载",
|
|
18
19
|
"footer.link.investors": "投资者",
|
|
19
|
-
"footer.link.legal": "
|
|
20
|
-
"footer.link.stock": "库存定位工具",
|
|
20
|
+
"footer.link.legal": "法律条款",
|
|
21
21
|
"footer.link.store": "Ubiquiti 官方商城",
|
|
22
22
|
"footer.link.terms.conditions": "条款及条件",
|
|
23
23
|
"footer.link.terms.cookie": "Cookies 设置",
|
|
@@ -29,8 +29,8 @@ var zhHans = {
|
|
|
29
29
|
"footer.link.uisp": "UISP",
|
|
30
30
|
"footer.link.uispDesignCenter": "UISP 设计中心",
|
|
31
31
|
"footer.link.wifiman": "WiFiman",
|
|
32
|
-
"footer.newsletter.email": "
|
|
33
|
-
"footer.newsletter.error": "
|
|
32
|
+
"footer.newsletter.email": "邮箱",
|
|
33
|
+
"footer.newsletter.error": "发生错误,请稍后再试。",
|
|
34
34
|
"footer.newsletter.error.invalidEmail": "请输入有效的电子邮件地址。",
|
|
35
35
|
"footer.newsletter.error.missingEmail": "请输入有效的电子邮件地址。",
|
|
36
36
|
"footer.newsletter.error.tooManyRequests": "请求过多,请稍后再试。",
|
|
@@ -14,6 +14,7 @@ var zhHantTW = {
|
|
|
14
14
|
"footer.link.becomeTrainer": "成為一名訓練師",
|
|
15
15
|
"footer.link.calendar": "日曆",
|
|
16
16
|
"footer.link.careers": "職業",
|
|
17
|
+
"footer.link.compliance": "遵守",
|
|
17
18
|
"footer.link.contact": "聯絡我們",
|
|
18
19
|
"footer.link.courses": "課程",
|
|
19
20
|
"footer.link.designCenter": "UniFi 設計中心",
|
|
@@ -22,7 +23,6 @@ var zhHantTW = {
|
|
|
22
23
|
"footer.link.downloads": "下載",
|
|
23
24
|
"footer.link.investors": "投資者",
|
|
24
25
|
"footer.link.legal": "法律",
|
|
25
|
-
"footer.link.stock": "庫存定位工具",
|
|
26
26
|
"footer.link.store": "Ubiquiti 商店",
|
|
27
27
|
"footer.link.terms.conditions": "條款與條件",
|
|
28
28
|
"footer.link.terms.cookie": "Cookies設定",
|
|
@@ -9,6 +9,7 @@ var zhHantTW = {
|
|
|
9
9
|
"footer.link.becomeTrainer": "成為一名訓練師",
|
|
10
10
|
"footer.link.calendar": "日曆",
|
|
11
11
|
"footer.link.careers": "職業",
|
|
12
|
+
"footer.link.compliance": "遵守",
|
|
12
13
|
"footer.link.contact": "聯絡我們",
|
|
13
14
|
"footer.link.courses": "課程",
|
|
14
15
|
"footer.link.designCenter": "UniFi 設計中心",
|
|
@@ -17,7 +18,6 @@ var zhHantTW = {
|
|
|
17
18
|
"footer.link.downloads": "下載",
|
|
18
19
|
"footer.link.investors": "投資者",
|
|
19
20
|
"footer.link.legal": "法律",
|
|
20
|
-
"footer.link.stock": "庫存定位工具",
|
|
21
21
|
"footer.link.store": "Ubiquiti 商店",
|
|
22
22
|
"footer.link.terms.conditions": "條款與條件",
|
|
23
23
|
"footer.link.terms.cookie": "Cookies設定",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GridGallery.js","sources":["../../../src/components/GridGallery/GridGallery.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { useMedia } from \"react-use\";\n\nimport PlayIcon from \"../../assets/icons/play-big.svg\";\nimport { BREAKPOINTS } from \"../../constants/layout\";\nimport { findClosestNumber } from \"../../utils/number\";\nimport { StyleableSvgImage } from \"../StyleableSvgImage\";\nimport * as S from \"./GridGallery.styles\";\nimport type {\n GridGalleryAssetRow,\n GridGalleryParsedAsset,\n GridGalleryProps,\n} from \"./GridGallery.types\";\nimport { RatioType } from \"./GridGallery.types\";\nimport { GridModal } from \"./GridModal/GridModal\";\n\nexport const GridGallery = function GridGallery({\n className,\n renderImage,\n assets: assetsInitial,\n priority,\n onModalToggle,\n}: GridGalleryProps) {\n const isTablet = useMedia(BREAKPOINTS.TABLET_AND_DOWN, false);\n\n const [activeModalId, setActiveModalId] = useState<string>(\"\");\n useEffect(() => {\n onModalToggle?.(activeModalId);\n }, [onModalToggle, activeModalId]);\n\n // #############################################################################\n // Asset helpers\n // #############################################################################\n const getAssetAspectRatioType = useCallback(\n (asset: GridGalleryProps[\"assets\"][number]): RatioType => {\n // Get asset height ratio\n const aspectHeightRatio = asset.height / asset.width;\n\n // Find the closest height ratio the image uses\n const heightRatios = Object.values(S.GRID_GALLERY_RATIOS).map(\n (ratios) => ratios.height,\n );\n const heightRatio = findClosestNumber(heightRatios, aspectHeightRatio);\n\n // Reverse find the ratio type used\n for (const [ratioType, ratios] of Object.entries(S.GRID_GALLERY_RATIOS)) {\n if (ratios.height === heightRatio) {\n return ratioType as RatioType;\n }\n }\n\n // Default to square\n return RatioType.OneThird;\n },\n [],\n );\n\n // #############################################################################\n // Parse assets\n // #############################################################################\n const parsedAssets = useMemo((): GridGalleryParsedAsset[] => {\n // Parse items\n const parsed = assetsInitial.map((asset) => {\n const ratioType = getAssetAspectRatioType(asset);\n\n return {\n ...asset,\n ratioType,\n };\n });\n\n // Find how many non-OneWhole items there are\n const nonOneWholeCount = parsed.filter(\n (asset) => asset.ratioType !== RatioType.OneWhole,\n ).length;\n\n // If the count is odd, make the first video full size\n let setFirstVideoAsOneWhole = (nonOneWholeCount & 1) === 1;\n\n return parsed.map((asset) => {\n if (asset.isVideo && setFirstVideoAsOneWhole) {\n // Don't adjust other videos\n setFirstVideoAsOneWhole = false;\n // Set as one whole\n asset.ratioType = RatioType.OneWhole;\n }\n\n return asset;\n });\n }, [assetsInitial, getAssetAspectRatioType]);\n\n // #############################################################################\n // Asset rows\n // #############################################################################\n const [assetRows, setAssetRows] = useState<GridGalleryAssetRow[]>([]);\n\n const createAssetRows = useCallback(() => {\n // Rows that have all space filled\n const fullRows: GridGalleryAssetRow[] = [];\n // Rows with less items to fill the row\n const partialRows: GridGalleryAssetRow[] = [];\n\n // Clone assets for mutation\n const availableAssets = [...parsedAssets];\n\n // Find and splice helper\n const findAndSpliceByRatioType = (\n ratioType: GridGalleryParsedAsset[\"ratioType\"],\n // Finding a matching asset for a video\n forVideo?: boolean,\n ): GridGalleryParsedAsset | undefined => {\n const index = availableAssets.findIndex((asset) => {\n if (forVideo) {\n // Find any that is not full width\n return asset.ratioType !== RatioType.OneWhole;\n }\n\n // Match the aspect ratio\n return asset.ratioType === ratioType;\n });\n\n if (index === -1) return;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return availableAssets.splice(index, 1)[0]!;\n };\n\n // Assign rows until all assets are used\n while (availableAssets.length > 0) {\n // Group assets that can all fit the row\n const rowAssets: GridGalleryAssetRow[\"assets\"] = [];\n\n // Take and remove the first asset\n const asset = availableAssets.splice(0, 1)[0];\n if (!asset) break;\n\n // Check if can take more items\n switch (asset.ratioType) {\n case RatioType.OneThird:\n // Add next two one-third assets\n rowAssets.push(\n ...[\n findAndSpliceByRatioType(asset.ratioType, asset.isVideo),\n // Skip the second item if current asset is a video\n !asset.isVideo &&\n findAndSpliceByRatioType(asset.ratioType, asset.isVideo),\n ].filter((item): item is GridGalleryParsedAsset => !!item),\n );\n break;\n\n case RatioType.ThreeTwos:\n // Add one two-thirds item\n rowAssets.push(\n ...[\n findAndSpliceByRatioType(RatioType.TwoThirds, asset.isVideo),\n ].filter((item): item is GridGalleryParsedAsset => !!item),\n );\n break;\n\n case RatioType.TwoThirds:\n // Add one three-twos item\n rowAssets.push(\n ...[\n findAndSpliceByRatioType(RatioType.ThreeTwos, asset.isVideo),\n ].filter((item): item is GridGalleryParsedAsset => !!item),\n );\n break;\n\n case RatioType.OneWhole:\n default:\n // None\n break;\n }\n\n if (\n // Matching assets not found\n !rowAssets.length &&\n // Unless it's one whole which fills it alone\n asset.ratioType !== RatioType.OneWhole\n ) {\n // Add to partial rows\n partialRows.push({\n assets: [asset],\n partial: true,\n });\n } else {\n // Add to full rows\n // Counting 1+1 one-third items as full (can grow to one-half with css)\n fullRows.push({\n assets: [asset, ...rowAssets],\n partial: false,\n });\n }\n }\n\n // Combine partial rows as groups of two\n // Here can only reside 1xRow one-thirds or 1xRow two-thirds/three-twos(one of)\n // TODO future improvement is perhaps to not combine 2x three-twos and try for three-twos and one-third\n const partialRowAssets = partialRows.flatMap((row) => row.assets);\n\n for (let i = 0; i < partialRowAssets.length; i += 2) {\n const combinedRowAssets = [\n partialRowAssets[i],\n partialRowAssets[i + 1],\n ].filter((item): item is GridGalleryParsedAsset => !!item);\n\n if (combinedRowAssets.length) {\n fullRows.push({\n assets: combinedRowAssets,\n partial: true,\n });\n }\n }\n\n // Set the rows\n setAssetRows(fullRows);\n }, [parsedAssets]);\n\n // Create rows on assets change\n useEffect(() => {\n createAssetRows();\n\n // Added to make sure it stays in the effect\n parsedAssets;\n }, [parsedAssets, createAssetRows]);\n\n // #############################################################################\n // Render (Mobile)\n // #############################################################################\n if (isTablet) {\n return (\n <S.MobileGalleryOuterWrap>\n {assetsInitial\n // No videos on small devices\n .filter((asset) => !asset.isVideo)\n .map((asset, i) => (\n <S.MobileAssetWrap key={asset.src + i}>\n <S.MobileImage\n asset={asset}\n sizes=\"100%\"\n responsive\n renderImage={renderImage}\n />\n </S.MobileAssetWrap>\n ))}\n </S.MobileGalleryOuterWrap>\n );\n }\n\n // #############################################################################\n // Render (Desktop)\n // #############################################################################\n return (\n <S.Wrap className={className}>\n {assetRows.map((row, rowIndex) => (\n <S.ImagesRow key={rowIndex} $center={row.partial}>\n {row.assets.map((asset, assetIndex) => {\n const previewVideo = asset.childAssets?.find(\n (childAsset) => childAsset.isVideo,\n );\n const videoPoster = asset.childAssets?.find(\n (childAsset) => !childAsset.isVideo,\n );\n\n return (\n <S.ImageWrap\n key={`${asset.src}-${assetIndex}`}\n $ratioType={asset.ratioType}\n // ? This can be adjusted if the look is too weird/scaled\n $grow={row.assets.length !== 1}\n >\n {asset.isVideo ? (\n <>\n <S.Video\n width={asset.width}\n height={asset.height}\n autoPlay\n playsInline\n muted\n poster={videoPoster?.src}\n loop\n >\n <source src={asset.src} type=\"video/mp4\" />\n </S.Video>\n <S.VideoOverlay\n hasVideo={!!previewVideo}\n onClick={() =>\n !!previewVideo && setActiveModalId(asset.src)\n }\n >\n {!!previewVideo && (\n <StyleableSvgImage\n src={PlayIcon}\n width={48}\n height={48}\n />\n )}\n </S.VideoOverlay>\n {activeModalId === asset.src && previewVideo && (\n <GridModal\n onClose={() => setActiveModalId(\"\")}\n open\n src={previewVideo.src}\n width={previewVideo.width}\n height={previewVideo.height}\n videoStartTime={asset.videoStartTime}\n />\n )}\n </>\n ) : (\n <S.Image\n asset={asset}\n renderImage={renderImage}\n sizes=\"100%\"\n objectFit=\"cover\"\n layout=\"responsive\"\n responsive\n priority={priority}\n />\n )}\n </S.ImageWrap>\n );\n })}\n </S.ImagesRow>\n ))}\n </S.Wrap>\n );\n};\n"],"names":["GridGallery","GridGallery2","className","renderImage","assets","assetsInitial","priority","onModalToggle","isTablet","useMedia","BREAKPOINTS","TABLET_AND_DOWN","activeModalId","setActiveModalId","useState","useEffect","getAssetAspectRatioType","useCallback","asset","aspectHeightRatio","height","width","heightRatios","Object","values","S.GRID_GALLERY_RATIOS","map","ratios","heightRatio","findClosestNumber","ratioType","entries","RatioType","OneThird","parsedAssets","useMemo","parsed","nonOneWholeCount","filter","OneWhole","length","setFirstVideoAsOneWhole","isVideo","assetRows","setAssetRows","createAssetRows","fullRows","partialRows","availableAssets","findAndSpliceByRatioType","forVideo","index","findIndex","splice","rowAssets","push","item","ThreeTwos","TwoThirds","partial","partialRowAssets","flatMap","row","i","combinedRowAssets","S.MobileGalleryOuterWrap","children","jsx","S.MobileAssetWrap","S.MobileImage","MobileImage","sizes","responsive","src","S.Wrap","rowIndex","S.ImagesRow","ImagesRow","$center","assetIndex","previewVideo","childAssets","find","childAsset","videoPoster","S.ImageWrap","ImageWrap","$ratioType","$grow","jsxs","Fragment","S.Video","Video","autoPlay","playsInline","muted","poster","loop","type","S.VideoOverlay","VideoOverlay","hasVideo","onClick","StyleableSvgImage","PlayIcon","GridModal","onClose","open","videoStartTime","S.Image","Image","objectFit","layout"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgBa,MAAAA,WAAA,GAAc,SAASA,YAAYC,CAAA;EAC9CC,SAAA;EACAC,WAAA;EACAC,MAAQ,EAAAC,aAAA;EACRC,QAAA;EACAC;AACF,CAAqB,EAAA;EACnB,MAAMC,QAAW,GAAAC,QAAA,CAAAA,QAAA,CAASC,MAAY,CAAAA,WAAA,CAAAC,eAAA,EAAiB,KAAK,CAAA;EAE5D,MAAM,CAACC,aAAA,EAAeC,gBAAgB,CAAA,GAAIC,eAAiB,EAAE,CAAA;EAC7DC,KAAAA,CAAAA,SAAA,CAAU,MAAM;IACdR,aAAA,GAAgBK,aAAa,CAAA;EAAA,CAC5B,EAAA,CAACL,aAAe,EAAAK,aAAa,CAAC,CAAA;EAKjC,MAAMI,uBAA0B,GAAAC,KAAA,CAAAA,WAAA,CAC7BC,KAAyD,IAAA;IAElD,MAAAC,iBAAA,GAAoBD,KAAM,CAAAE,MAAA,GAASF,KAAM,CAAAG,KAAA;IAG/C,MAAMC,YAAe,GAAAC,MAAA,CAAOC,MAAO,CAAAC,kBAAAA,CAAAA,mBAAqB,CAAE,CAAAC,GAAA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b,UAAA,CAAAA,GAAA,CAACsC,SAAA,CAAAA,SAAA,EAAA;cACCC,OAAA,EAASA,CAAA,KAAM7F,gBAAA,CAAiB,EAAE,CAAA;cAClC8F,IAAI,EAAA,IAAA;cACJlC,KAAKO,YAAa,CAAAP,GAAA;cAClBpD,OAAO2D,YAAa,CAAA3D,KAAA;cACpBD,QAAQ4D,YAAa,CAAA5D,MAAA;cACrBwF,gBAAgB1F,KAAM,CAAA0F;YAAA,CACxB,CAAA;UAAA,CAEJ,CAEA,GAAA,eAAAzC,UAAA,CAAAA,GAAA,CAAC0C,kBAAE,CAAAC,KAAA,EAAF;YACC5F,KAAA;YACAf,WAAA;YACAoE,KAAM,EAAA,MAAA;YACNwC,SAAU,EAAA,OAAA;YACVC,MAAO,EAAA,YAAA;YACPxC,UAAU,EAAA,IAAA;YACVlE;UAAA,CACF;QAAA,CAAA,EApDM,GAAAY,KAAA,CAAMuD,GAAG,IAAIM,UAAU,EAAA,CAsDjC;MAEH,CAAA;KAAA,EAnEeJ,QAoElB,CACD;EACH,CAAA,CAAA;AAEJ,CAAA;"}
|
|
1
|
+
{"version":3,"file":"GridGallery.js","sources":["../../../src/components/GridGallery/GridGallery.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { useMedia } from \"react-use\";\n\nimport PlayIcon from \"../../assets/icons/play-big.svg\";\nimport { BREAKPOINTS } from \"../../constants/layout\";\nimport { findClosestNumber } from \"../../utils/number\";\nimport { StyleableSvgImage } from \"../StyleableSvgImage\";\nimport * as S from \"./GridGallery.styles\";\nimport type {\n GridGalleryAssetRow,\n GridGalleryParsedAsset,\n GridGalleryProps,\n} from \"./GridGallery.types\";\nimport { RatioType } from \"./GridGallery.types\";\nimport { GridModal } from \"./GridModal/GridModal\";\n\nexport const GridGallery = function GridGallery({\n className,\n renderImage,\n assets: assetsInitial,\n priority,\n onModalToggle,\n}: GridGalleryProps) {\n const isTablet = useMedia(BREAKPOINTS.TABLET_AND_DOWN, false);\n\n const [activeModalId, setActiveModalId] = useState<string>(\"\");\n useEffect(() => {\n onModalToggle?.(activeModalId);\n }, [onModalToggle, activeModalId]);\n\n // #############################################################################\n // Asset helpers\n // #############################################################################\n const getAssetAspectRatioType = useCallback(\n (asset: GridGalleryProps[\"assets\"][number]): RatioType => {\n // Get asset height ratio\n const aspectHeightRatio = asset.height / asset.width;\n\n // Find the closest height ratio the image uses\n const heightRatios = Object.values(S.GRID_GALLERY_RATIOS).map(\n (ratios) => ratios.height,\n );\n const heightRatio = findClosestNumber(heightRatios, aspectHeightRatio);\n\n // Reverse find the ratio type used\n for (const [ratioType, ratios] of Object.entries(S.GRID_GALLERY_RATIOS)) {\n if (ratios.height === heightRatio) {\n return ratioType as RatioType;\n }\n }\n\n // Default to square\n return RatioType.OneThird;\n },\n [],\n );\n\n // #############################################################################\n // Parse assets\n // #############################################################################\n const parsedAssets = useMemo((): GridGalleryParsedAsset[] => {\n // Parse items\n const parsed = assetsInitial.map((asset) => {\n const ratioType = getAssetAspectRatioType(asset);\n\n return {\n ...asset,\n ratioType,\n };\n });\n\n // Find how many non-OneWhole items there are\n const nonOneWholeCount = parsed.filter(\n (asset) => asset.ratioType !== RatioType.OneWhole,\n ).length;\n\n // If the count is odd, make the first video full size\n let setFirstVideoAsOneWhole = (nonOneWholeCount & 1) === 1;\n\n return parsed.map((asset) => {\n if (asset.isVideo && setFirstVideoAsOneWhole) {\n // Don't adjust other videos\n setFirstVideoAsOneWhole = false;\n // Set as one whole\n asset.ratioType = RatioType.OneWhole;\n }\n\n return asset;\n });\n }, [assetsInitial, getAssetAspectRatioType]);\n\n // #############################################################################\n // Asset rows\n // #############################################################################\n const [assetRows, setAssetRows] = useState<GridGalleryAssetRow[]>([]);\n\n const createAssetRows = useCallback(() => {\n // Rows that have all space filled\n const fullRows: GridGalleryAssetRow[] = [];\n // Rows with less items to fill the row\n const partialRows: GridGalleryAssetRow[] = [];\n\n // Clone assets for mutation\n const availableAssets = [...parsedAssets];\n\n // Find and splice helper\n const findAndSpliceByRatioType = (\n ratioType: GridGalleryParsedAsset[\"ratioType\"],\n // Finding a matching asset for a video\n forVideo?: boolean,\n ): GridGalleryParsedAsset | undefined => {\n const index = availableAssets.findIndex((asset) => {\n if (forVideo) {\n // Find any that is not full width\n return asset.ratioType !== RatioType.OneWhole;\n }\n\n // Match the aspect ratio\n return asset.ratioType === ratioType;\n });\n\n if (index === -1) return;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return availableAssets.splice(index, 1)[0]!;\n };\n\n // Assign rows until all assets are used\n while (availableAssets.length > 0) {\n // Group assets that can all fit the row\n const rowAssets: GridGalleryAssetRow[\"assets\"] = [];\n\n // Take and remove the first asset\n const asset = availableAssets.splice(0, 1)[0];\n if (!asset) break;\n\n // Check if can take more items\n switch (asset.ratioType) {\n case RatioType.OneThird:\n // Add next two one-third assets\n rowAssets.push(\n ...[\n findAndSpliceByRatioType(asset.ratioType, asset.isVideo),\n // Skip the second item if current asset is a video\n !asset.isVideo &&\n findAndSpliceByRatioType(asset.ratioType, asset.isVideo),\n ].filter((item): item is GridGalleryParsedAsset => !!item),\n );\n break;\n\n case RatioType.ThreeTwos:\n // Add one two-thirds item\n rowAssets.push(\n ...[\n findAndSpliceByRatioType(RatioType.TwoThirds, asset.isVideo),\n ].filter((item): item is GridGalleryParsedAsset => !!item),\n );\n break;\n\n case RatioType.TwoThirds:\n // Add one three-twos item\n rowAssets.push(\n ...[\n findAndSpliceByRatioType(RatioType.ThreeTwos, asset.isVideo),\n ].filter((item): item is GridGalleryParsedAsset => !!item),\n );\n break;\n\n case RatioType.OneWhole:\n default:\n // None\n break;\n }\n\n if (\n // Matching assets not found\n !rowAssets.length &&\n // Unless it's one whole which fills it alone\n asset.ratioType !== RatioType.OneWhole\n ) {\n // Add to partial rows\n partialRows.push({\n assets: [asset],\n partial: true,\n });\n } else {\n // Add to full rows\n // Counting 1+1 one-third items as full (can grow to one-half with css)\n fullRows.push({\n assets: [asset, ...rowAssets],\n partial: false,\n });\n }\n }\n\n // Combine partial rows as groups of two\n // Here can only reside 1xRow one-thirds or 1xRow two-thirds/three-twos(one of)\n // TODO future improvement is perhaps to not combine 2x three-twos and try for three-twos and one-third\n const partialRowAssets = partialRows.flatMap((row) => row.assets);\n\n for (let i = 0; i < partialRowAssets.length; i += 2) {\n const combinedRowAssets = [\n partialRowAssets[i],\n partialRowAssets[i + 1],\n ].filter((item): item is GridGalleryParsedAsset => !!item);\n\n if (combinedRowAssets.length) {\n fullRows.push({\n assets: combinedRowAssets,\n partial: true,\n });\n }\n }\n\n // Set the rows\n setAssetRows(fullRows);\n }, [parsedAssets]);\n\n // Create rows on assets change\n useEffect(() => {\n createAssetRows();\n\n // Added to make sure it stays in the effect\n parsedAssets;\n }, [parsedAssets, createAssetRows]);\n\n // #############################################################################\n // Render (Mobile)\n // #############################################################################\n if (isTablet) {\n return (\n <S.MobileGalleryOuterWrap>\n {assetsInitial\n // No videos on small devices\n .filter((asset) => !asset.isVideo)\n .map((asset, i) => (\n <S.MobileAssetWrap key={asset.src + i}>\n <S.MobileImage\n asset={asset}\n sizes=\"100%\"\n responsive\n renderImage={renderImage}\n />\n </S.MobileAssetWrap>\n ))}\n </S.MobileGalleryOuterWrap>\n );\n }\n\n // #############################################################################\n // Render (Desktop)\n // #############################################################################\n return (\n <S.Wrap className={className}>\n {assetRows.map((row, rowIndex) => (\n <S.ImagesRow key={rowIndex} $center={row.partial}>\n {row.assets.map((asset, assetIndex) => {\n const previewVideo = asset.childAssets?.find(\n (childAsset) => childAsset.isVideo,\n );\n const videoPoster = asset.childAssets?.find(\n (childAsset) => !childAsset.isVideo,\n );\n\n return (\n <S.ImageWrap\n key={`${asset.src}-${assetIndex}`}\n $ratioType={asset.ratioType}\n // ? This can be adjusted if the look is too weird/scaled\n $grow={row.assets.length !== 1}\n >\n {asset.isVideo ? (\n <>\n <S.Video\n width={asset.width}\n height={asset.height}\n autoPlay\n playsInline\n muted\n poster={videoPoster?.src}\n loop\n >\n <source src={asset.src} type=\"video/mp4\" />\n </S.Video>\n <S.VideoOverlay\n hasVideo={!!previewVideo}\n onClick={() =>\n !!previewVideo && setActiveModalId(asset.src)\n }\n >\n {!!previewVideo && (\n <StyleableSvgImage\n src={PlayIcon}\n width={48}\n height={48}\n />\n )}\n </S.VideoOverlay>\n {activeModalId === asset.src && previewVideo && (\n <GridModal\n onClose={() => setActiveModalId(\"\")}\n open\n src={previewVideo.src}\n width={previewVideo.width}\n height={previewVideo.height}\n videoStartTime={asset.videoStartTime}\n />\n )}\n </>\n ) : (\n <S.Image\n asset={asset}\n renderImage={renderImage}\n sizes=\"100%\"\n objectFit=\"cover\"\n layout=\"responsive\"\n responsive\n priority={priority}\n />\n )}\n </S.ImageWrap>\n );\n })}\n </S.ImagesRow>\n ))}\n </S.Wrap>\n );\n};\n"],"names":["GridGallery","GridGallery2","className","renderImage","assets","assetsInitial","priority","onModalToggle","isTablet","useMedia","BREAKPOINTS","TABLET_AND_DOWN","activeModalId","setActiveModalId","useState","useEffect","getAssetAspectRatioType","useCallback","asset","aspectHeightRatio","height","width","heightRatios","Object","values","S.GRID_GALLERY_RATIOS","map","ratios","heightRatio","findClosestNumber","ratioType","entries","RatioType","OneThird","parsedAssets","useMemo","parsed","nonOneWholeCount","filter","OneWhole","length","setFirstVideoAsOneWhole","isVideo","assetRows","setAssetRows","createAssetRows","fullRows","partialRows","availableAssets","findAndSpliceByRatioType","forVideo","index","findIndex","splice","rowAssets","push","item","ThreeTwos","TwoThirds","partial","partialRowAssets","flatMap","row","i","combinedRowAssets","S.MobileGalleryOuterWrap","children","jsx","S.MobileAssetWrap","S.MobileImage","MobileImage","sizes","responsive","src","S.Wrap","rowIndex","S.ImagesRow","ImagesRow","$center","assetIndex","previewVideo","childAssets","find","childAsset","videoPoster","S.ImageWrap","ImageWrap","$ratioType","$grow","jsxs","Fragment","S.Video","Video","autoPlay","playsInline","muted","poster","loop","type","S.VideoOverlay","VideoOverlay","hasVideo","onClick","StyleableSvgImage","P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