@ubnt/store.core 9.19.1 → 9.20.0-alpha.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 +199 -3
- package/lib/_virtual/_virtual_multi-entry.js +27 -12
- package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
- package/lib/_virtual/_virtual_multi-entry.mjs +14 -10
- package/lib/_virtual/_virtual_multi-entry.mjs.map +1 -1
- package/lib/assets/attention.svg +5 -5
- package/lib/assets/attention2.svg +5 -5
- package/lib/assets/close2.svg +2 -3
- package/lib/assets/close3.svg +3 -2
- package/lib/assets/efg.png +0 -0
- package/lib/assets/icon-location-pin.svg +5 -0
- package/lib/assets/icons/menu/icon-location-pin.svg.js +27 -0
- package/lib/assets/icons/menu/icon-location-pin.svg.js.map +1 -0
- package/lib/assets/icons/menu/icon-location-pin.svg.mjs +3 -0
- package/lib/assets/icons/menu/icon-location-pin.svg.mjs.map +1 -0
- package/lib/assets/minus4.svg +8 -8
- package/lib/assets/minus5.svg +8 -8
- package/lib/assets/plus5.svg +9 -9
- package/lib/assets/plus6.svg +9 -9
- package/lib/assets/ucg-max.png +0 -0
- package/lib/assets/ucgMax.jpg +0 -0
- package/lib/assets/ucgMax2.jpg +0 -0
- package/lib/assets/ucgUltra.jpg +0 -0
- package/lib/assets/ucgUltra2.jpg +0 -0
- package/lib/assets/udmPro.jpg +0 -0
- package/lib/assets/udmPro2.jpg +0 -0
- package/lib/components/CategoryTabs/CategoryTabs.styles.d.ts +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.js +2 -3
- package/lib/components/CategoryTabs/CategoryTabs.styles.js.map +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs +2 -3
- package/lib/components/CategoryTabs/CategoryTabs.styles.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 +4 -3
- package/lib/components/Container/Container.js.map +1 -1
- package/lib/components/Container/Container.mjs +5 -4
- package/lib/components/Container/Container.mjs.map +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.js +1 -1
- 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/Header/AccountMenu/AccountMenu.js +11 -1
- package/lib/components/Header/AccountMenu/AccountMenu.js.map +1 -1
- package/lib/components/Header/AccountMenu/AccountMenu.mjs +13 -3
- package/lib/components/Header/AccountMenu/AccountMenu.mjs.map +1 -1
- package/lib/components/Header/Header.js +6 -6
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/Header.mjs +6 -6
- 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 +12 -4
- package/lib/components/Header/Header.types.js +2 -1
- package/lib/components/Header/Header.types.js.map +1 -1
- package/lib/components/Header/Header.types.mjs +2 -1
- package/lib/components/Header/Header.types.mjs.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.d.ts +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.js +3 -3
- package/lib/components/Header/MenuItem/MenuItem.styles.js.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.mjs +3 -3
- package/lib/components/Header/MenuItem/MenuItem.styles.mjs.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.types.d.ts +1 -0
- 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/ProMenu/ProMenu.d.ts +2 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.js +103 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.js.map +1 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.mjs +81 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.mjs.map +1 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.d.ts +23 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.js +121 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.js.map +1 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.mjs +106 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.mjs.map +1 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.types.d.ts +12 -0
- package/lib/components/Header/Navigation/ProMenu/index.d.ts +1 -0
- package/lib/components/Header/Navigation/ProMenu/index.js +6 -0
- package/lib/components/{ResourceCalculatorV1/components → Header/Navigation/ProMenu}/index.js.map +1 -1
- package/lib/components/Header/Navigation/ProMenu/index.mjs +3 -0
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.d.ts +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js +92 -95
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs +92 -95
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.d.ts +9 -0
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js +15 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs +13 -2
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.types.d.ts +10 -4
- package/lib/components/Header/ProHeader/ProHeader.d.ts +3 -4
- package/lib/components/Header/ProHeader/ProHeader.js +247 -120
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +249 -124
- package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +4 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.js +23 -17
- package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs +21 -18
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
- package/lib/components/Header/translations/ar.json.js +4 -1
- package/lib/components/Header/translations/ar.json.js.map +1 -1
- package/lib/components/Header/translations/ar.json.mjs +4 -2
- package/lib/components/Header/translations/ar.json.mjs.map +1 -1
- package/lib/components/Header/translations/de.json.js +4 -1
- package/lib/components/Header/translations/de.json.js.map +1 -1
- package/lib/components/Header/translations/de.json.mjs +4 -2
- package/lib/components/Header/translations/de.json.mjs.map +1 -1
- package/lib/components/Header/translations/el.json.js +4 -1
- package/lib/components/Header/translations/el.json.js.map +1 -1
- package/lib/components/Header/translations/el.json.mjs +4 -2
- package/lib/components/Header/translations/el.json.mjs.map +1 -1
- package/lib/components/Header/translations/en.json.js +4 -1
- package/lib/components/Header/translations/en.json.js.map +1 -1
- package/lib/components/Header/translations/en.json.mjs +4 -2
- package/lib/components/Header/translations/en.json.mjs.map +1 -1
- package/lib/components/Header/translations/es.json.js +4 -1
- package/lib/components/Header/translations/es.json.js.map +1 -1
- package/lib/components/Header/translations/es.json.mjs +4 -2
- package/lib/components/Header/translations/es.json.mjs.map +1 -1
- package/lib/components/Header/translations/fr.json.js +4 -1
- package/lib/components/Header/translations/fr.json.js.map +1 -1
- package/lib/components/Header/translations/fr.json.mjs +4 -2
- package/lib/components/Header/translations/fr.json.mjs.map +1 -1
- package/lib/components/Header/translations/it.json.js +4 -1
- package/lib/components/Header/translations/it.json.js.map +1 -1
- package/lib/components/Header/translations/it.json.mjs +4 -2
- package/lib/components/Header/translations/it.json.mjs.map +1 -1
- package/lib/components/Header/translations/ja.json.js +4 -1
- package/lib/components/Header/translations/ja.json.js.map +1 -1
- package/lib/components/Header/translations/ja.json.mjs +4 -2
- package/lib/components/Header/translations/ja.json.mjs.map +1 -1
- package/lib/components/Header/translations/pt-BR.json.js +4 -1
- package/lib/components/Header/translations/pt-BR.json.js.map +1 -1
- package/lib/components/Header/translations/pt-BR.json.mjs +4 -2
- package/lib/components/Header/translations/pt-BR.json.mjs.map +1 -1
- package/lib/components/Header/translations/zh-Hans.json.js +4 -1
- package/lib/components/Header/translations/zh-Hans.json.js.map +1 -1
- package/lib/components/Header/translations/zh-Hans.json.mjs +4 -2
- package/lib/components/Header/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/components/Header/translations/zh-Hant-TW.json.js +4 -1
- package/lib/components/Header/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/components/Header/translations/zh-Hant-TW.json.mjs +4 -2
- package/lib/components/Header/translations/zh-Hant-TW.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/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.d.ts +1 -1
- package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.js +3 -1
- package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.js.map +1 -0
- package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.mjs +3 -1
- package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.mjs.map +1 -0
- package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.styles.d.ts +1 -0
- package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.styles.js +10 -7
- package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.js.map +1 -0
- package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.styles.mjs +10 -7
- package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.mjs.map +1 -0
- package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.types.d.ts +1 -0
- package/lib/components/HowToUseSection/HowToUseSection.styles.d.ts +2 -2
- package/lib/components/LandingPagePro/LandingPagePro.d.ts +3 -0
- 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/MicrositeSectionWrap/MicrositeSectionWrap.styles.d.ts +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgMax.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgUltra.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgUltra.jpg.mjs +2 -2
- 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/ucgMax.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/ucgMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/ucgUltra.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/ucgUltra.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/data/CloudGateways.js +9 -9
- package/lib/components/ModelCompareV3/data/CloudGateways.mjs +6 -6
- package/lib/components/ModelCompareV3/data/products/ucgMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs +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/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js +313 -17
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs +311 -17
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.d.ts +3 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.js +2 -0
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.mjs +2 -0
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.js +120 -34
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.mjs +120 -34
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.d.ts +16 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.js +54 -12
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.mjs +50 -11
- 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 +2 -0
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.mjs +2 -0
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.js +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.mjs +2 -2
- 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/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 +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 +4 -4
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs +4 -4
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs.map +1 -1
- 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/ResourceCalculator.js +1 -2
- package/lib/components/ResourceCalculatorV1/ResourceCalculator.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ResourceCalculator.mjs +1 -2
- package/lib/components/ResourceCalculatorV1/ResourceCalculator.mjs.map +1 -1
- package/lib/{assets/icons/menu/icon-globe.svg.js → components/ResourceCalculatorV1/assets/consoles/efg.png.js} +6 -6
- package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.js.map +1 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.mjs +3 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.mjs.map +1 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.js +27 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.js.map +1 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.mjs +3 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.mjs.map +1 -0
- package/lib/components/ResourceCalculatorV1/translations/en.json.js +6 -4
- package/lib/components/ResourceCalculatorV1/translations/en.json.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/translations/en.json.mjs +6 -4
- package/lib/components/ResourceCalculatorV1/translations/en.json.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/translations/useResourceCalculatorTranslation.d.ts +2 -2
- package/lib/components/VideoPlayerNew/VideoPlayer.js +1 -1
- 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/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 +1 -0
- package/lib/constants/proStoreCategories/mapping/index.js +54 -49
- package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.mjs +54 -49
- package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.d.ts +2 -1
- package/lib/constants/proStoreCategories/mapping/unifi.js +1 -0
- package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.mjs +1 -0
- package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.js +3 -0
- package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs +3 -1
- 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/theme.js +4 -0
- package/lib/constants/theme.js.map +1 -1
- package/lib/constants/theme.mjs +4 -0
- package/lib/constants/theme.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/helpers/index.d.ts +1 -0
- package/lib/helpers/index.js +11 -0
- package/lib/helpers/index.js.map +1 -1
- package/lib/helpers/index.mjs +1 -0
- package/lib/helpers/index.mjs.map +1 -1
- package/lib/helpers/product.d.ts +87 -0
- package/lib/helpers/product.js +346 -0
- package/lib/helpers/product.js.map +1 -0
- package/lib/helpers/product.mjs +335 -0
- package/lib/helpers/product.mjs.map +1 -0
- package/lib/helpers/ux.d.ts +9 -1
- package/lib/helpers/ux.js +15 -0
- package/lib/helpers/ux.js.map +1 -1
- package/lib/helpers/ux.mjs +15 -1
- package/lib/helpers/ux.mjs.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +2 -0
- package/lib/types/index.js.map +1 -1
- package/lib/types/index.mjs +1 -0
- package/lib/types/index.mjs.map +1 -1
- package/lib/types/product.d.ts +87 -0
- package/lib/types/product.js +14 -0
- package/lib/types/product.js.map +1 -0
- package/lib/types/product.mjs +13 -0
- package/lib/types/product.mjs.map +1 -0
- package/lib/utils/array.d.ts +4 -0
- package/lib/utils/array.js +10 -0
- package/lib/utils/array.js.map +1 -1
- package/lib/utils/array.mjs +10 -1
- package/lib/utils/array.mjs.map +1 -1
- package/lib/utils/money/allocators/fixedAmount.d.ts +26 -0
- package/lib/utils/money/allocators/fixedAmount.js +52 -0
- package/lib/utils/money/allocators/fixedAmount.js.map +1 -0
- package/lib/utils/money/allocators/fixedAmount.mjs +50 -0
- package/lib/utils/money/allocators/fixedAmount.mjs.map +1 -0
- package/lib/utils/money/allocators/index.d.ts +2 -0
- package/lib/utils/money/allocators/index.js +8 -0
- package/lib/utils/money/allocators/index.js.map +1 -0
- package/lib/utils/money/allocators/index.mjs +4 -0
- package/lib/utils/money/allocators/index.mjs.map +1 -0
- package/lib/utils/money/allocators/productAmount.d.ts +13 -0
- package/lib/utils/money/allocators/productAmount.js +98 -0
- package/lib/utils/money/allocators/productAmount.js.map +1 -0
- package/lib/utils/money/allocators/productAmount.mjs +96 -0
- package/lib/utils/money/allocators/productAmount.mjs.map +1 -0
- package/lib/utils/money/constants.d.ts +56 -25
- package/lib/utils/money/constants.js +72 -7
- package/lib/utils/money/constants.js.map +1 -1
- package/lib/utils/money/constants.mjs +70 -7
- package/lib/utils/money/constants.mjs.map +1 -1
- package/lib/utils/money/exchangeRate.d.ts +31 -0
- package/lib/utils/money/exchangeRate.js +27 -0
- package/lib/utils/money/exchangeRate.js.map +1 -0
- package/lib/utils/money/exchangeRate.mjs +23 -0
- package/lib/utils/money/exchangeRate.mjs.map +1 -0
- package/lib/utils/money/format.d.ts +10 -5
- package/lib/utils/money/format.js +22 -14
- package/lib/utils/money/format.js.map +1 -1
- package/lib/utils/money/format.mjs +23 -16
- package/lib/utils/money/format.mjs.map +1 -1
- package/lib/utils/money/index.d.ts +4 -1
- package/lib/utils/money/index.js +26 -8
- package/lib/utils/money/index.js.map +1 -1
- package/lib/utils/money/index.mjs +8 -4
- package/lib/utils/money/index.mjs.map +1 -1
- package/lib/utils/money/misc.d.ts +68 -28
- package/lib/utils/money/misc.js +35 -64
- package/lib/utils/money/misc.js.map +1 -1
- package/lib/utils/money/misc.mjs +32 -43
- package/lib/utils/money/misc.mjs.map +1 -1
- package/lib/utils/money/misc.private.d.ts +23 -0
- package/lib/utils/money/misc.private.js +46 -0
- package/lib/utils/money/misc.private.js.map +1 -0
- package/lib/utils/money/misc.private.mjs +21 -0
- package/lib/utils/money/misc.private.mjs.map +1 -0
- package/lib/utils/money/shipping.d.ts +5 -0
- package/lib/utils/money/shipping.js +8 -0
- package/lib/utils/money/shipping.js.map +1 -0
- package/lib/utils/money/shipping.mjs +6 -0
- package/lib/utils/money/shipping.mjs.map +1 -0
- package/lib/utils/money/tax.d.ts +38 -2
- package/lib/utils/money/tax.js +46 -10
- package/lib/utils/money/tax.js.map +1 -1
- package/lib/utils/money/tax.mjs +42 -11
- package/lib/utils/money/tax.mjs.map +1 -1
- package/lib/utils/money/tax.private.d.ts +17 -0
- package/lib/utils/money/tax.private.js +65 -0
- package/lib/utils/money/tax.private.js.map +1 -0
- package/lib/utils/money/tax.private.mjs +60 -0
- package/lib/utils/money/tax.private.mjs.map +1 -0
- package/lib/utils/money/types.d.ts +78 -3
- 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/productSort.d.ts +41 -0
- package/lib/utils/productSort.js +67 -0
- package/lib/utils/productSort.js.map +1 -0
- package/lib/utils/productSort.mjs +60 -0
- package/lib/utils/productSort.mjs.map +1 -0
- package/package.json +1 -1
- package/lib/assets/icons/menu/icon-globe.svg.js.map +0 -1
- package/lib/assets/icons/menu/icon-globe.svg.mjs +0 -3
- package/lib/assets/icons/menu/icon-globe.svg.mjs.map +0 -1
- package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.js.map +0 -1
- package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.mjs.map +0 -1
- package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.js.map +0 -1
- package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.mjs.map +0 -1
- package/lib/components/ResourceCalculatorV1/components/index.d.ts +0 -1
- package/lib/components/ResourceCalculatorV1/components/index.js +0 -5
- package/lib/components/ResourceCalculatorV1/components/index.mjs +0 -3
- package/lib/utils/validations.d.ts +0 -15
- package/lib/utils/validations.js +0 -23
- package/lib/utils/validations.js.map +0 -1
- package/lib/utils/validations.mjs +0 -21
- package/lib/utils/validations.mjs.map +0 -1
- /package/lib/components/{ResourceCalculatorV1/components → Header/Navigation/ProMenu}/index.mjs.map +0 -0
- /package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/index.d.ts +0 -0
- /package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/index.js +0 -0
- /package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/index.js.map +0 -0
- /package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/index.mjs +0 -0
- /package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/index.mjs.map +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { LineLoader } from '@ubnt/ui-components/LineLoader';
|
|
3
3
|
import merge from 'lodash/merge';
|
|
4
4
|
import { memo, useRef, useState, useMemo, useEffect, useCallback } from 'react';
|
|
5
|
-
import { useMedia, useClickAway } from 'react-use';
|
|
5
|
+
import { useMedia, useHoverDirty, useEffectOnce, useClickAway } from 'react-use';
|
|
6
6
|
import '../../../assets/account/no-user-avatar.png.mjs';
|
|
7
7
|
import '../../../assets/icons/menu/icon-ea.svg.mjs';
|
|
8
8
|
import '../../../assets/icons/menu/icon-history.svg.mjs';
|
|
@@ -11,22 +11,27 @@ import { BREAKPOINTS } from '../../../constants/layout.mjs';
|
|
|
11
11
|
import '../../../contexts/MenuContext/index.mjs';
|
|
12
12
|
import { SiteId } from '../../../contexts/MenuContext/mapping.mjs';
|
|
13
13
|
import { ModalId } from '../../../contexts/MenuContext/types.mjs';
|
|
14
|
+
import { getTrueSize } from '../../../helpers/ux.mjs';
|
|
14
15
|
import '../../../hooks/index.mjs';
|
|
16
|
+
import { useHasTouch } from '../../../hooks/useHasTouch.mjs';
|
|
15
17
|
import '../../../types/index.mjs';
|
|
16
18
|
import { imageSrc } from '../../../utils/asset.mjs';
|
|
17
19
|
import { checkUnreachable } from '../../../utils/errors.mjs';
|
|
18
20
|
import '../../MobileModal/index.mjs';
|
|
21
|
+
import '../../ScrollWrapper/index.mjs';
|
|
19
22
|
import '../../StyleableSvgImage/index.mjs';
|
|
20
23
|
import '../../Tooltip/index.mjs';
|
|
21
24
|
import '../AccountFrame/index.mjs';
|
|
22
25
|
import '../AccountFrame/Mobile/index.mjs';
|
|
23
|
-
import { SkeletonCircleLoader, HEADER_ICON_SIZE, SvgIcon, HeaderWrap, Container, Anchor, SiteTitleWrap, LogoIconWrap, CartIcon, ModalWrap, ModalInnerWrap } from '../Header.styles.mjs';
|
|
26
|
+
import { SkeletonCircleLoader, HEADER_ICON_SIZE, SvgIcon, HeaderWrap, Container, Anchor, SiteTitleWrap, LogoIconWrap, MenuItemLabel, CartIcon, ModalWrap, ModalInnerWrap } from '../Header.styles.mjs';
|
|
24
27
|
import { defaultHeaderTranslations } from '../Header.types.mjs';
|
|
25
28
|
import '../LanguageFrame/index.mjs';
|
|
26
29
|
import '../LanguageFrame/Mobile/index.mjs';
|
|
30
|
+
import '../MenuItem/index.mjs';
|
|
31
|
+
import '../Navigation/ProMenu/index.mjs';
|
|
27
32
|
import '../Navigation/ProMobileMenu/index.mjs';
|
|
28
33
|
import '../translations/index.mjs';
|
|
29
|
-
import { ProIconWrap, AvatarWrap, ProHeaderWrap, Header, Wrap, LeftWrap, BreakpointsWrap, CountryButton, CenterWrap, Search, ProductLineSelectorWrap, ProductLineSelectorItem, RightWrap, ProIconInnerFillWrap, VerticalDivider, SearchTabWrap } from './ProHeader.styles.mjs';
|
|
34
|
+
import { WRAP_GAP, ProIconWrap, AvatarWrap, ProHeaderWrap, Header, Wrap, LeftWrap, BreakpointsWrap, CountryButton, CenterWrap, Search, InlineCategoryWrap, CATEGORY_ITEMS_GAP, ProductLineSelectorWrap, ProductLineSelectorItem, RightWrap, ProIconInnerFillWrap, VerticalDivider, SearchTabWrap } from './ProHeader.styles.mjs';
|
|
30
35
|
import { ProductLine } from '../../../types/generated.mjs';
|
|
31
36
|
import { useMenu } from '../../../contexts/MenuContext/context.mjs';
|
|
32
37
|
import { useTranslation } from '../../../hooks/useTranslation.mjs';
|
|
@@ -36,6 +41,10 @@ import NoUserAvatar__default from "../../../assets/no-user-avatar.png";
|
|
|
36
41
|
import _externalAssets_CtJIOg_A__default from "../../../assets/account.svg";
|
|
37
42
|
import { StyleableSvgImage } from '../../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
38
43
|
import _externalAssets_BPYvPCPi__default from "../../../assets/logo.svg";
|
|
44
|
+
import _externalAssets_TKrekyEi__default from "../../../assets/logoUisp.svg";
|
|
45
|
+
import _externalAssets_BH7iT_0Q__default from "../../../assets/logoUnifi.svg";
|
|
46
|
+
import { ScrollWrapper } from '../../ScrollWrapper/ScrollWrapper.mjs';
|
|
47
|
+
import { MenuItem } from '../MenuItem/MenuItem.mjs';
|
|
39
48
|
import _externalAssets_g50k1DIN__default from "../../../assets/search.svg";
|
|
40
49
|
import { Tooltip } from '../../Tooltip/Tooltip.mjs';
|
|
41
50
|
import _externalAssets_DJH57LL8__default from "../../../assets/globe.svg";
|
|
@@ -49,8 +58,11 @@ import { LanguageFrame } from '../LanguageFrame/LanguageFrame.mjs';
|
|
|
49
58
|
import { AccountFrameMobile } from '../AccountFrame/Mobile/Mobile.mjs';
|
|
50
59
|
import { AccountFrame } from '../AccountFrame/AccountFrame.mjs';
|
|
51
60
|
import { NavigationProMobileMenu } from '../Navigation/ProMobileMenu/ProMobileMenu.mjs';
|
|
61
|
+
import { NavigationProMenu } from '../Navigation/ProMenu/ProMenu.mjs';
|
|
52
62
|
"use strict";
|
|
53
|
-
const
|
|
63
|
+
const MOBILE_BREAKPOINT_UP = BREAKPOINTS.TABLET_UP;
|
|
64
|
+
const MOBILE_BREAKPOINT_AND_DOWN = BREAKPOINTS.TABLET_AND_DOWN;
|
|
65
|
+
const DEFAULT_PRODUCT_LINE_OPTIONS = [{
|
|
54
66
|
value: ProductLine.Unifi,
|
|
55
67
|
label: "UniFi"
|
|
56
68
|
}, {
|
|
@@ -76,17 +88,22 @@ const ProHeader = memo(function ProHeader2({
|
|
|
76
88
|
handleProductLineChange,
|
|
77
89
|
handleMobileMenuClick,
|
|
78
90
|
productLineValue,
|
|
91
|
+
categories,
|
|
92
|
+
useInlineCategories,
|
|
79
93
|
embedConfig,
|
|
80
94
|
onSearchFocus,
|
|
81
95
|
onSearchBlur,
|
|
82
96
|
onSearchClick,
|
|
83
|
-
productLineOptions =
|
|
97
|
+
productLineOptions = DEFAULT_PRODUCT_LINE_OPTIONS,
|
|
84
98
|
accountMenu,
|
|
85
99
|
onLanguageChange
|
|
86
100
|
}) {
|
|
87
|
-
const isMobile = useMedia(
|
|
101
|
+
const isMobile = useMedia(MOBILE_BREAKPOINT_AND_DOWN, false);
|
|
88
102
|
const rootRef = useRef(null);
|
|
103
|
+
const wrapRef = useRef(null);
|
|
104
|
+
const containerRef = useRef(null);
|
|
89
105
|
const [searchInputRef, setSearchInputRef] = useState(null);
|
|
106
|
+
const [desktopSearchInputRef, setDesktopSearchInputRef] = useState(null);
|
|
90
107
|
const translations = useMemo(() => {
|
|
91
108
|
return merge(defaultHeaderTranslations, initialTranslations);
|
|
92
109
|
}, [initialTranslations]);
|
|
@@ -148,12 +165,24 @@ const ProHeader = memo(function ProHeader2({
|
|
|
148
165
|
activeModal === ModalId.ProMobileMenu
|
|
149
166
|
);
|
|
150
167
|
}, [activeModal]);
|
|
168
|
+
const [showTouchProMenu, setShowTouchProMenu] = useState(false);
|
|
169
|
+
const logoRef = useRef(null);
|
|
170
|
+
const logoHover = useHoverDirty(logoRef);
|
|
171
|
+
const showProMenu = useMemo(() => {
|
|
172
|
+
return logoHover || showTouchProMenu;
|
|
173
|
+
}, [logoHover, showTouchProMenu]);
|
|
151
174
|
const onClickAwayFromSearchModal = useCallback(() => {
|
|
175
|
+
if (useInlineCategories && !!searchValue && !isMobile) return;
|
|
152
176
|
if (activeModal === ModalId.Search) {
|
|
153
177
|
setActiveModal(null);
|
|
154
178
|
onSearchClick?.();
|
|
155
179
|
}
|
|
156
|
-
}, [activeModal, onSearchClick, setActiveModal]);
|
|
180
|
+
}, [activeModal, isMobile, onSearchClick, searchValue, setActiveModal, useInlineCategories]);
|
|
181
|
+
useEffectOnce(() => {
|
|
182
|
+
if (searchValue) {
|
|
183
|
+
setActiveModal(ModalId.Search);
|
|
184
|
+
}
|
|
185
|
+
});
|
|
157
186
|
const blurSearchInput = useCallback(() => {
|
|
158
187
|
if (!searchInputRef || activeModal !== ModalId.Search) {
|
|
159
188
|
return;
|
|
@@ -187,8 +216,19 @@ const ProHeader = memo(function ProHeader2({
|
|
|
187
216
|
}, 0);
|
|
188
217
|
}
|
|
189
218
|
}, [handleModalOpen, onSearchClick, searchInputRef]);
|
|
219
|
+
useEffect(() => {
|
|
220
|
+
if (!useInlineCategories || activeModal !== ModalId.Search || isMobile) return;
|
|
221
|
+
if (desktopSearchInputRef) {
|
|
222
|
+
const interval = setInterval(() => {
|
|
223
|
+
if (document.activeElement === desktopSearchInputRef) {
|
|
224
|
+
clearInterval(interval);
|
|
225
|
+
}
|
|
226
|
+
desktopSearchInputRef.focus();
|
|
227
|
+
}, 0);
|
|
228
|
+
}
|
|
229
|
+
}, [activeModal, desktopSearchInputRef, isMobile, useInlineCategories]);
|
|
190
230
|
const handleSearchValueChange = useCallback(e => {
|
|
191
|
-
onSearch
|
|
231
|
+
onSearch?.(e.target.value);
|
|
192
232
|
}, [onSearch]);
|
|
193
233
|
const searchPlaceholder = useMemo(() => {
|
|
194
234
|
const defaultPlaceholder = translations.search.searchUniFiProducts;
|
|
@@ -212,7 +252,7 @@ const ProHeader = memo(function ProHeader2({
|
|
|
212
252
|
case ProductLine.Amplifi:
|
|
213
253
|
return 164;
|
|
214
254
|
default:
|
|
215
|
-
return
|
|
255
|
+
return 160;
|
|
216
256
|
}
|
|
217
257
|
}, [productLineValue]);
|
|
218
258
|
useEffect(() => {
|
|
@@ -227,12 +267,39 @@ const ProHeader = memo(function ProHeader2({
|
|
|
227
267
|
const cartQuantity = useMemo(() => {
|
|
228
268
|
return cart?.items.reduce((sum, item) => sum + item.quantity, 0) ?? 0;
|
|
229
269
|
}, [cart?.items]);
|
|
230
|
-
const
|
|
270
|
+
const hasTouch = useHasTouch();
|
|
271
|
+
const logoSiteUrl = useMemo(() => {
|
|
272
|
+
if (useInlineCategories) {
|
|
273
|
+
return createSiteUrl([SiteId.Store, "/"]);
|
|
274
|
+
}
|
|
275
|
+
return createSiteUrl([SiteId.Ui, "/"]);
|
|
276
|
+
}, [createSiteUrl, useInlineCategories]);
|
|
277
|
+
const onLogoAnchorClick = useCallback(e => {
|
|
231
278
|
if (embedConfig?.homeLinkClickHandler) {
|
|
232
279
|
e.preventDefault();
|
|
233
280
|
embedConfig.homeLinkClickHandler();
|
|
234
281
|
}
|
|
235
|
-
|
|
282
|
+
if (useInlineCategories && !showProMenu && !hasTouch) {
|
|
283
|
+
e.preventDefault();
|
|
284
|
+
setShowTouchProMenu(true);
|
|
285
|
+
}
|
|
286
|
+
}, [embedConfig, useInlineCategories, hasTouch, showProMenu]);
|
|
287
|
+
useEffect(() => {
|
|
288
|
+
if (!useInlineCategories) return;
|
|
289
|
+
const containerEl = containerRef.current;
|
|
290
|
+
if (!containerEl) return;
|
|
291
|
+
const wrapEl = wrapRef.current;
|
|
292
|
+
if (!wrapEl) return;
|
|
293
|
+
const [leftEl, centerEl, rightEl] = Array.from(wrapEl.children);
|
|
294
|
+
if (!leftEl || !centerEl || !rightEl) return;
|
|
295
|
+
const handle = () => {
|
|
296
|
+
centerEl.style.maxWidth = containerEl.offsetWidth - getTrueSize(leftEl).width - getTrueSize(rightEl).width - WRAP_GAP * 2 -
|
|
297
|
+
// Remove extra 2 pixels just to be sure there's no overflow
|
|
298
|
+
2 + "px";
|
|
299
|
+
window.requestAnimationFrame(handle);
|
|
300
|
+
};
|
|
301
|
+
window.requestAnimationFrame(handle);
|
|
302
|
+
}, [useInlineCategories]);
|
|
236
303
|
const handleAvatarClick = useCallback(e => {
|
|
237
304
|
if (embedConfig?.avatarClickHandler) {
|
|
238
305
|
embedConfig.avatarClickHandler();
|
|
@@ -269,12 +336,38 @@ const ProHeader = memo(function ProHeader2({
|
|
|
269
336
|
})
|
|
270
337
|
});
|
|
271
338
|
}, [embedConfig?.moveAvatarIconToLeft, account?.customer?.picture, account?.loading, embedConfig?.displayAvatarAsImage, embedConfig?.hideAvatarIcon, handleAvatarClick, motif]);
|
|
339
|
+
const logoIconHtml = useMemo(() => {
|
|
340
|
+
const defaultIcon = /* @__PURE__ */jsx(StyleableSvgImage, {
|
|
341
|
+
src: _externalAssets_BPYvPCPi__default,
|
|
342
|
+
width: 17.86,
|
|
343
|
+
height: 18
|
|
344
|
+
});
|
|
345
|
+
if (!useInlineCategories) {
|
|
346
|
+
return defaultIcon;
|
|
347
|
+
}
|
|
348
|
+
switch (productLineValue) {
|
|
349
|
+
case ProductLine.Unifi:
|
|
350
|
+
return /* @__PURE__ */jsx(StyleableSvgImage, {
|
|
351
|
+
src: _externalAssets_BH7iT_0Q__default,
|
|
352
|
+
width: 58.5,
|
|
353
|
+
height: 18
|
|
354
|
+
});
|
|
355
|
+
case ProductLine.Uisp:
|
|
356
|
+
return /* @__PURE__ */jsx(StyleableSvgImage, {
|
|
357
|
+
src: _externalAssets_TKrekyEi__default,
|
|
358
|
+
width: 56.5,
|
|
359
|
+
height: 18
|
|
360
|
+
});
|
|
361
|
+
default:
|
|
362
|
+
return defaultIcon;
|
|
363
|
+
}
|
|
364
|
+
}, [productLineValue, useInlineCategories]);
|
|
272
365
|
return /* @__PURE__ */jsxs(ProHeaderWrap, {
|
|
273
366
|
ref: rootRef,
|
|
274
367
|
$sticky: !!embedConfig,
|
|
275
368
|
$disableBlur: activeModal === ModalId.Language && isMobile,
|
|
276
|
-
children: [/* @__PURE__ */
|
|
277
|
-
children: /* @__PURE__ */jsxs(Header, {
|
|
369
|
+
children: [/* @__PURE__ */jsxs(HeaderWrap, {
|
|
370
|
+
children: [/* @__PURE__ */jsxs(Header, {
|
|
278
371
|
sticky: sticky || !!embedConfig,
|
|
279
372
|
isStickyEmbed: !!embedConfig,
|
|
280
373
|
className,
|
|
@@ -283,136 +376,162 @@ const ProHeader = memo(function ProHeader2({
|
|
|
283
376
|
size: embedConfig?.fullWidthHeader ? "full" : "desktop",
|
|
284
377
|
noVerticalMargin: true,
|
|
285
378
|
noPaddings: !!embedConfig?.fullWidthHeader,
|
|
379
|
+
ref: containerRef,
|
|
286
380
|
children: [/* @__PURE__ */jsxs(Wrap, {
|
|
287
|
-
|
|
381
|
+
ref: wrapRef,
|
|
382
|
+
children: [/* @__PURE__ */jsx(LeftWrap, {
|
|
288
383
|
$addSpaceOnDesktop: !!embedConfig?.fullWidthHeader,
|
|
289
|
-
children:
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
children: embedConfig
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
width: 17,
|
|
300
|
-
height: 20
|
|
384
|
+
children: activeModal !== ModalId.ProMobileMenu && /* @__PURE__ */jsxs(Fragment, {
|
|
385
|
+
children: [!embedConfig?.hideLogo && /* @__PURE__ */jsx(Anchor, {
|
|
386
|
+
href: logoSiteUrl,
|
|
387
|
+
onClick: onLogoAnchorClick,
|
|
388
|
+
children: embedConfig?.siteTitle ? /* @__PURE__ */jsx(SiteTitleWrap, {
|
|
389
|
+
children: embedConfig.siteTitle
|
|
390
|
+
}) : /* @__PURE__ */jsx(LogoIconWrap, {
|
|
391
|
+
motif,
|
|
392
|
+
ref: logoRef,
|
|
393
|
+
children: logoIconHtml
|
|
301
394
|
})
|
|
302
|
-
})
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
})
|
|
311
|
-
})
|
|
395
|
+
}), embedConfig?.moveAvatarIconToLeft && avatarHtml, !useInlineCategories && /* @__PURE__ */jsx(BreakpointsWrap, {
|
|
396
|
+
hideBreakpoint: MOBILE_BREAKPOINT_AND_DOWN,
|
|
397
|
+
children: currentCountryName && /* @__PURE__ */jsx(CountryButton, {
|
|
398
|
+
"data-test-id": "country-select-btn",
|
|
399
|
+
type: "button",
|
|
400
|
+
onClick: handleStorePickerClick,
|
|
401
|
+
children: currentCountryName
|
|
402
|
+
})
|
|
403
|
+
})]
|
|
404
|
+
})
|
|
312
405
|
}), /* @__PURE__ */jsxs(CenterWrap, {
|
|
313
|
-
|
|
406
|
+
hideBreakpoint: MOBILE_BREAKPOINT_AND_DOWN,
|
|
407
|
+
children: [!useInlineCategories || activeModal === ModalId.Search ? /* @__PURE__ */jsx(Search, {
|
|
408
|
+
setInputRef: setDesktopSearchInputRef,
|
|
314
409
|
onValueChange: handleSearchValueChange,
|
|
315
410
|
placeholder: searchPlaceholder,
|
|
316
411
|
isSearchFocused: !!searchValue || isSearchFocused,
|
|
317
412
|
value: searchValue || "",
|
|
318
413
|
showCancel: !!searchValue,
|
|
319
|
-
onCancelClick: () =>
|
|
320
|
-
onSearch && onSearch("");
|
|
321
|
-
},
|
|
414
|
+
onCancelClick: () => onSearch?.(""),
|
|
322
415
|
width: 420,
|
|
323
416
|
onFocus: handleSearchFocus,
|
|
324
417
|
onBlur: handleSearchBlur,
|
|
325
|
-
hideBreakpoint: BREAKPOINTS.MOBILE_AND_DOWN,
|
|
326
418
|
focusedWidth: searchFocusWidth
|
|
327
|
-
})
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
419
|
+
}) : /* @__PURE__ */jsx(InlineCategoryWrap, {
|
|
420
|
+
children: /* @__PURE__ */jsx(ScrollWrapper, {
|
|
421
|
+
direction: "horizontal",
|
|
422
|
+
align: "center",
|
|
423
|
+
scrollStepType: "scrollScreen",
|
|
424
|
+
fillType: "gradient",
|
|
425
|
+
gradientSize: WRAP_GAP * 4,
|
|
426
|
+
gap: CATEGORY_ITEMS_GAP,
|
|
427
|
+
activeIndex: categories.activeIndex,
|
|
428
|
+
items: categories.items.map((category, i) => ({
|
|
429
|
+
id: category.id,
|
|
430
|
+
render() {
|
|
431
|
+
const active = categories.activeIndex === i;
|
|
432
|
+
return /* @__PURE__ */jsx(MenuItem, {
|
|
433
|
+
"data-test-id": `inline-category${active ? "-selected" : ""}`,
|
|
434
|
+
as: "a",
|
|
435
|
+
href: category.url ?? "#",
|
|
436
|
+
onClick: category.onClick && category.url ? e => category.onClick?.(e, category.url) : void 0,
|
|
437
|
+
active,
|
|
438
|
+
motif,
|
|
439
|
+
children: /* @__PURE__ */jsx(MenuItemLabel, {
|
|
440
|
+
children: category.label
|
|
441
|
+
})
|
|
442
|
+
}, category.id);
|
|
443
|
+
}
|
|
444
|
+
})) ?? []
|
|
336
445
|
})
|
|
446
|
+
}), !useInlineCategories && /* @__PURE__ */jsx(ProductLineSelectorWrap, {
|
|
447
|
+
children: productLineOptions.map(option => /* @__PURE__ */jsx(ProductLineSelectorItem, {
|
|
448
|
+
onClick: () => handleProductLineChange?.(option.value),
|
|
449
|
+
$active: option.value === productLineValue,
|
|
450
|
+
"data-test-id": `product-line-selector-${option.value}`,
|
|
451
|
+
children: option.label
|
|
452
|
+
}, option.value))
|
|
337
453
|
})]
|
|
338
454
|
}), /* @__PURE__ */jsxs(RightWrap, {
|
|
339
455
|
$addSpaceOnDesktop: !!embedConfig?.fullWidthHeader,
|
|
340
|
-
children: [/* @__PURE__ */
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
456
|
+
children: [activeModal !== ModalId.ProMobileMenu && /* @__PURE__ */jsxs(Fragment, {
|
|
457
|
+
children: [/* @__PURE__ */jsx(ProIconWrap, {
|
|
458
|
+
"data-test-id": "search-btn",
|
|
459
|
+
hideBreakpoint: !useInlineCategories ? MOBILE_BREAKPOINT_UP : void 0,
|
|
460
|
+
motif,
|
|
461
|
+
onClick: handleShowSearchTab,
|
|
462
|
+
children: /* @__PURE__ */jsx(ProIconInnerFillWrap, {
|
|
463
|
+
$active: activeModal === ModalId.Search || !!searchValue,
|
|
464
|
+
$transparent: !!embedConfig || useInlineCategories && !isMobile,
|
|
465
|
+
children: /* @__PURE__ */jsx(SvgIcon, {
|
|
466
|
+
src: _externalAssets_g50k1DIN__default,
|
|
467
|
+
width: HEADER_ICON_SIZE,
|
|
468
|
+
height: HEADER_ICON_SIZE
|
|
469
|
+
})
|
|
470
|
+
})
|
|
471
|
+
}), cart && /* @__PURE__ */jsx(ProIconWrap, {
|
|
472
|
+
motif,
|
|
473
|
+
"data-test-id": "cart-btn",
|
|
474
|
+
onClick: e => cartQuantity > 0 && handleModalOpen(e, ModalId.Cart),
|
|
475
|
+
$isDefaultCursor: cartQuantity < 1,
|
|
476
|
+
children: cart?.loading ? /* @__PURE__ */jsx(SkeletonCircleLoader, {
|
|
477
|
+
diameter: HEADER_ICON_SIZE
|
|
478
|
+
}) : cartQuantity > 0 ? /* @__PURE__ */jsx(CartIcon, {
|
|
479
|
+
itemCount: cartQuantity,
|
|
480
|
+
motif,
|
|
481
|
+
width: HEADER_ICON_SIZE,
|
|
482
|
+
height: HEADER_ICON_SIZE
|
|
483
|
+
}) : /* @__PURE__ */jsx(Tooltip, {
|
|
484
|
+
description: translations.cart.empty,
|
|
485
|
+
motif: "light",
|
|
486
|
+
isInteractive: true,
|
|
487
|
+
position: "bottom",
|
|
488
|
+
style: {
|
|
489
|
+
height: `${HEADER_ICON_SIZE}px`
|
|
490
|
+
},
|
|
491
|
+
children: /* @__PURE__ */jsx(CartIcon, {
|
|
492
|
+
itemCount: cartQuantity,
|
|
493
|
+
motif,
|
|
494
|
+
width: HEADER_ICON_SIZE,
|
|
495
|
+
height: HEADER_ICON_SIZE
|
|
496
|
+
})
|
|
497
|
+
})
|
|
498
|
+
}), !embedConfig && !handlePurchaseHistoryClick && /* @__PURE__ */jsx(VerticalDivider, {
|
|
499
|
+
hideBreakpoint: MOBILE_BREAKPOINT_AND_DOWN
|
|
500
|
+
}), isMultiLanguage && !embedConfig?.hideLanguagePicker && /* @__PURE__ */jsx(ProIconWrap, {
|
|
501
|
+
motif,
|
|
502
|
+
"data-test-id": "language-picker-btn",
|
|
503
|
+
onClick: e => handleModalOpen(e, ModalId.Language),
|
|
347
504
|
children: /* @__PURE__ */jsx(SvgIcon, {
|
|
348
|
-
src:
|
|
505
|
+
src: _externalAssets_DJH57LL8__default,
|
|
349
506
|
width: HEADER_ICON_SIZE,
|
|
350
507
|
height: HEADER_ICON_SIZE
|
|
351
508
|
})
|
|
352
|
-
})
|
|
353
|
-
|
|
354
|
-
motif,
|
|
355
|
-
"data-test-id": "cart-btn",
|
|
356
|
-
onClick: e => cartQuantity > 0 && handleModalOpen(e, ModalId.Cart),
|
|
357
|
-
$isDefaultCursor: cartQuantity < 1,
|
|
358
|
-
children: cart?.loading ? /* @__PURE__ */jsx(SkeletonCircleLoader, {
|
|
359
|
-
diameter: HEADER_ICON_SIZE
|
|
360
|
-
}) : cartQuantity > 0 ? /* @__PURE__ */jsx(CartIcon, {
|
|
361
|
-
itemCount: cartQuantity,
|
|
509
|
+
}), handlePurchaseHistoryClick && /* @__PURE__ */jsx(ProIconWrap, {
|
|
510
|
+
hideBreakpoint: MOBILE_BREAKPOINT_AND_DOWN,
|
|
362
511
|
motif,
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
description: translations.cart.empty,
|
|
367
|
-
motif: "light",
|
|
368
|
-
isInteractive: true,
|
|
369
|
-
position: "bottom",
|
|
370
|
-
style: {
|
|
371
|
-
height: `${HEADER_ICON_SIZE}px`
|
|
372
|
-
},
|
|
373
|
-
children: /* @__PURE__ */jsx(CartIcon, {
|
|
374
|
-
itemCount: cartQuantity,
|
|
375
|
-
motif,
|
|
512
|
+
onClick: handlePurchaseHistoryClick,
|
|
513
|
+
children: /* @__PURE__ */jsx(SvgIcon, {
|
|
514
|
+
src: HistoryIcon__default,
|
|
376
515
|
width: HEADER_ICON_SIZE,
|
|
377
516
|
height: HEADER_ICON_SIZE
|
|
378
517
|
})
|
|
379
|
-
})
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
onClick: handlePurchaseHistoryClick,
|
|
395
|
-
children: /* @__PURE__ */jsx(SvgIcon, {
|
|
396
|
-
src: HistoryIcon__default,
|
|
397
|
-
width: HEADER_ICON_SIZE,
|
|
398
|
-
height: HEADER_ICON_SIZE
|
|
399
|
-
})
|
|
400
|
-
}), earlyAccess && /* @__PURE__ */jsx(ProIconWrap, {
|
|
401
|
-
hideBreakpoint: BREAKPOINTS.TABLET_AND_DOWN,
|
|
402
|
-
motif,
|
|
403
|
-
onClick: earlyAccess.onClick,
|
|
404
|
-
children: earlyAccess.loading ? /* @__PURE__ */jsx(SkeletonCircleLoader, {
|
|
405
|
-
diameter: HEADER_ICON_SIZE
|
|
406
|
-
}) : /* @__PURE__ */jsx(SvgIcon, {
|
|
407
|
-
src: EAIcon__default,
|
|
408
|
-
width: HEADER_ICON_SIZE,
|
|
409
|
-
height: HEADER_ICON_SIZE * 0.8,
|
|
410
|
-
renderedHeight: HEADER_ICON_SIZE * 0.8
|
|
411
|
-
})
|
|
412
|
-
}), !embedConfig?.moveAvatarIconToLeft ? !accountMenu ? avatarHtml : accountMenu : null, /* @__PURE__ */jsx(VerticalDivider, {
|
|
413
|
-
hideBreakpoint: BREAKPOINTS.TABLET_UP
|
|
518
|
+
}), earlyAccess && /* @__PURE__ */jsx(ProIconWrap, {
|
|
519
|
+
hideBreakpoint: MOBILE_BREAKPOINT_AND_DOWN,
|
|
520
|
+
motif,
|
|
521
|
+
onClick: earlyAccess.onClick,
|
|
522
|
+
children: earlyAccess.loading ? /* @__PURE__ */jsx(SkeletonCircleLoader, {
|
|
523
|
+
diameter: HEADER_ICON_SIZE
|
|
524
|
+
}) : /* @__PURE__ */jsx(SvgIcon, {
|
|
525
|
+
src: EAIcon__default,
|
|
526
|
+
width: HEADER_ICON_SIZE,
|
|
527
|
+
height: HEADER_ICON_SIZE * 0.8,
|
|
528
|
+
renderedHeight: HEADER_ICON_SIZE * 0.8
|
|
529
|
+
})
|
|
530
|
+
}), !embedConfig?.moveAvatarIconToLeft ? !accountMenu ? avatarHtml : accountMenu : null, /* @__PURE__ */jsx(VerticalDivider, {
|
|
531
|
+
hideBreakpoint: MOBILE_BREAKPOINT_UP
|
|
532
|
+
})]
|
|
414
533
|
}), /* @__PURE__ */jsx(ProIconWrap, {
|
|
415
|
-
hideBreakpoint:
|
|
534
|
+
hideBreakpoint: MOBILE_BREAKPOINT_UP,
|
|
416
535
|
motif,
|
|
417
536
|
onClick: handleHamburgerClick,
|
|
418
537
|
children: activeModal === ModalId.ProMobileMenu ? /* @__PURE__ */jsx(SvgIcon, {
|
|
@@ -486,13 +605,21 @@ const ProHeader = memo(function ProHeader2({
|
|
|
486
605
|
handleProductLineChange,
|
|
487
606
|
productLineValue,
|
|
488
607
|
productLineOptions,
|
|
489
|
-
|
|
608
|
+
categories,
|
|
609
|
+
hideExtraSection: !!embedConfig
|
|
490
610
|
})]
|
|
491
|
-
})
|
|
611
|
+
}), useInlineCategories && !embedConfig && !isMobile && /* @__PURE__ */jsx(NavigationProMenu, {
|
|
612
|
+
show: showProMenu,
|
|
613
|
+
currentCountryName,
|
|
614
|
+
handleStorePickerClick,
|
|
615
|
+
productLineValue,
|
|
616
|
+
productLineOptions,
|
|
617
|
+
onProductLineChange: handleProductLineChange
|
|
618
|
+
})]
|
|
492
619
|
}), /* @__PURE__ */jsx(SearchTabWrap, {
|
|
493
620
|
$show: activeModal === ModalId.Search,
|
|
494
621
|
$isStickyEmbed: !!embedConfig,
|
|
495
|
-
hideBreakpoint:
|
|
622
|
+
hideBreakpoint: MOBILE_BREAKPOINT_UP,
|
|
496
623
|
children: /* @__PURE__ */jsx(Search, {
|
|
497
624
|
setInputRef: setSearchInputRef,
|
|
498
625
|
onValueChange: handleSearchValueChange,
|
|
@@ -500,9 +627,7 @@ const ProHeader = memo(function ProHeader2({
|
|
|
500
627
|
isSearchFocused: !!searchValue || isSearchFocused,
|
|
501
628
|
value: searchValue || "",
|
|
502
629
|
showCancel: !!searchValue,
|
|
503
|
-
onCancelClick: () =>
|
|
504
|
-
onSearch && onSearch("");
|
|
505
|
-
},
|
|
630
|
+
onCancelClick: () => onSearch?.(""),
|
|
506
631
|
onFocus: handleSearchFocus,
|
|
507
632
|
onBlur: handleSearchBlur,
|
|
508
633
|
focusedWidth: searchFocusWidth
|