@ubnt/store.core 9.18.0-alpha.9 → 9.19.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 +3 -195
- 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/assets/close2.svg +2 -3
- package/lib/assets/close3.svg +3 -2
- 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/pause.svg +3 -3
- package/lib/assets/pause2.svg +3 -3
- 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/components/CategoryTabs/CategoryTabs.styles.d.ts +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.js +3 -2
- package/lib/components/CategoryTabs/CategoryTabs.styles.js.map +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs +3 -2
- 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 +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/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 +1 -11
- package/lib/components/Header/AccountMenu/AccountMenu.js.map +1 -1
- package/lib/components/Header/AccountMenu/AccountMenu.mjs +3 -13
- 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 +4 -12
- 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/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 +0 -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 +95 -92
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs +95 -92
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.d.ts +0 -9
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js +1 -15
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs +2 -13
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.types.d.ts +4 -10
- package/lib/components/Header/ProHeader/ProHeader.d.ts +4 -3
- package/lib/components/Header/ProHeader/ProHeader.js +120 -247
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +124 -249
- 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 +17 -23
- package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs +18 -21
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
- package/lib/components/Header/translations/ar.json.js +1 -4
- package/lib/components/Header/translations/ar.json.js.map +1 -1
- package/lib/components/Header/translations/ar.json.mjs +2 -4
- package/lib/components/Header/translations/ar.json.mjs.map +1 -1
- package/lib/components/Header/translations/de.json.js +1 -4
- package/lib/components/Header/translations/de.json.js.map +1 -1
- package/lib/components/Header/translations/de.json.mjs +2 -4
- package/lib/components/Header/translations/de.json.mjs.map +1 -1
- package/lib/components/Header/translations/el.json.js +1 -4
- package/lib/components/Header/translations/el.json.js.map +1 -1
- package/lib/components/Header/translations/el.json.mjs +2 -4
- package/lib/components/Header/translations/el.json.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/Header/translations/es.json.js +1 -4
- package/lib/components/Header/translations/es.json.js.map +1 -1
- package/lib/components/Header/translations/es.json.mjs +2 -4
- package/lib/components/Header/translations/es.json.mjs.map +1 -1
- package/lib/components/Header/translations/fr.json.js +1 -4
- package/lib/components/Header/translations/fr.json.js.map +1 -1
- package/lib/components/Header/translations/fr.json.mjs +2 -4
- package/lib/components/Header/translations/fr.json.mjs.map +1 -1
- package/lib/components/Header/translations/it.json.js +1 -4
- package/lib/components/Header/translations/it.json.js.map +1 -1
- package/lib/components/Header/translations/it.json.mjs +2 -4
- package/lib/components/Header/translations/it.json.mjs.map +1 -1
- package/lib/components/Header/translations/ja.json.js +1 -4
- package/lib/components/Header/translations/ja.json.js.map +1 -1
- package/lib/components/Header/translations/ja.json.mjs +2 -4
- package/lib/components/Header/translations/ja.json.mjs.map +1 -1
- package/lib/components/Header/translations/pt-BR.json.js +1 -4
- package/lib/components/Header/translations/pt-BR.json.js.map +1 -1
- package/lib/components/Header/translations/pt-BR.json.mjs +2 -4
- package/lib/components/Header/translations/pt-BR.json.mjs.map +1 -1
- package/lib/components/Header/translations/zh-Hans.json.js +1 -4
- package/lib/components/Header/translations/zh-Hans.json.js.map +1 -1
- package/lib/components/Header/translations/zh-Hans.json.mjs +2 -4
- package/lib/components/Header/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/components/Header/translations/zh-Hant-TW.json.js +1 -4
- package/lib/components/Header/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/components/Header/translations/zh-Hant-TW.json.mjs +2 -4
- 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/HowToUseSection/HowToUseSection.styles.d.ts +2 -2
- 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/MicrositeSectionWrap/MicrositeSectionWrap.styles.d.ts +1 -1
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +1 -1
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.mjs +1 -1
- package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.js +1 -1
- package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.mjs +2 -2
- package/lib/components/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/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/data/CloudGateways.js +6 -6
- package/lib/components/ModelCompareV3/data/CloudGateways.mjs +4 -4
- 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/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 +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 +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
- 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/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/VideoPlayerNew/VideoPlayer.js +2 -2
- package/lib/components/VideoPlayerNew/VideoPlayer.mjs +2 -2
- package/lib/components/VideoPlayerNew/assets/close.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/close.svg.mjs +2 -2
- package/lib/components/VideoPlayerNew/assets/pause.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/pause.svg.mjs +2 -2
- package/lib/components/index.d.ts +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/theme.js +0 -4
- package/lib/constants/theme.js.map +1 -1
- package/lib/constants/theme.mjs +0 -4
- 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 +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/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.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/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 -103
- package/lib/components/Header/Navigation/ProMenu/ProMenu.js.map +0 -1
- package/lib/components/Header/Navigation/ProMenu/ProMenu.mjs +0 -81
- package/lib/components/Header/Navigation/ProMenu/ProMenu.mjs.map +0 -1
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.d.ts +0 -23
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.js +0 -121
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.js.map +0 -1
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.mjs +0 -106
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.mjs.map +0 -1
- package/lib/components/Header/Navigation/ProMenu/ProMenu.types.d.ts +0 -12
- 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 -52
- package/lib/utils/money/allocators/fixedAmount.js.map +0 -1
- package/lib/utils/money/allocators/fixedAmount.mjs +0 -50
- 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 -98
- package/lib/utils/money/allocators/productAmount.js.map +0 -1
- package/lib/utils/money/allocators/productAmount.mjs +0 -96
- 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 -67
- package/lib/utils/productSort.js.map +0 -1
- package/lib/utils/productSort.mjs +0 -60
- 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
|
@@ -48,7 +48,6 @@ export declare const defaultHeaderTranslations: {
|
|
|
48
48
|
upsellTitle: string;
|
|
49
49
|
};
|
|
50
50
|
language: {};
|
|
51
|
-
region: string;
|
|
52
51
|
};
|
|
53
52
|
export interface HeaderAccountCustomer {
|
|
54
53
|
id: string;
|
|
@@ -214,14 +213,6 @@ export interface ProHeaderEarlyAccess {
|
|
|
214
213
|
loading?: boolean;
|
|
215
214
|
onClick: () => void;
|
|
216
215
|
}
|
|
217
|
-
export interface HeaderProductLineOption {
|
|
218
|
-
value: ProductLine;
|
|
219
|
-
label: string;
|
|
220
|
-
}
|
|
221
|
-
export interface ProHeaderCategories {
|
|
222
|
-
items: ProMobileMenuSectionItem[];
|
|
223
|
-
activeIndex: number;
|
|
224
|
-
}
|
|
225
216
|
export type ProHeaderProps = Pick<HeaderProps, "className" | "motif" | "cart" | "account" | "translations" | "onModalOpen" | "onCartClick" | "showLineLoader" | "accountMenu"> & {
|
|
226
217
|
/**
|
|
227
218
|
* Header customizations for embed context like WebView
|
|
@@ -232,7 +223,10 @@ export type ProHeaderProps = Pick<HeaderProps, "className" | "motif" | "cart" |
|
|
|
232
223
|
earlyAccess?: ProHeaderEarlyAccess;
|
|
233
224
|
handlePurchaseHistoryClick?: () => void;
|
|
234
225
|
handleOrderHistoryClick?: () => void;
|
|
235
|
-
productLineOptions?:
|
|
226
|
+
productLineOptions?: {
|
|
227
|
+
value: ProductLine;
|
|
228
|
+
label: string;
|
|
229
|
+
}[];
|
|
236
230
|
productLineValue?: ProductLine;
|
|
237
231
|
handleProductLineChange?: (type: ProductLine) => void;
|
|
238
232
|
handleMobileMenuClick?: () => void;
|
|
@@ -242,6 +236,4 @@ export type ProHeaderProps = Pick<HeaderProps, "className" | "motif" | "cart" |
|
|
|
242
236
|
onSearchFocus?: () => void;
|
|
243
237
|
onSearchBlur?: () => void;
|
|
244
238
|
onSearchClick?: () => void;
|
|
245
|
-
categories: ProHeaderCategories;
|
|
246
|
-
useInlineCategories?: boolean;
|
|
247
239
|
};
|
|
@@ -43,8 +43,7 @@ const defaultHeaderTranslations = {
|
|
|
43
43
|
itemsTitle: "Your Cart",
|
|
44
44
|
upsellTitle: "Usually bought together"
|
|
45
45
|
},
|
|
46
|
-
language: {}
|
|
47
|
-
region: "Region"
|
|
46
|
+
language: {}
|
|
48
47
|
};
|
|
49
48
|
exports.defaultHeaderTranslations = defaultHeaderTranslations;
|
|
50
49
|
//# sourceMappingURL=Header.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.types.js","sources":["../../../src/components/Header/Header.types.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\n\nimport type { Language } from \"../../contexts/MenuContext/mapping\";\nimport type {\n ModalId,\n ParsedNavigationItem,\n ParsedNavigationSubItem,\n ParsedNavigationSubSubItem,\n} from \"../../contexts/MenuContext/types\";\nimport type { Nullish, ProductLine } from \"../../types\";\nimport type {\n CustomImageAsset,\n RenderImageFn,\n} from \"../CustomImage/CustomImage.types\";\nimport type { NavigationMicrositeMenuProps } from \"./Navigation/MicrositeMenu/MicrositeMenu.types\";\nimport type { ProMobileMenuSectionItem } from \"./Navigation/ProMobileMenu/ProMobileMenu.types\";\n\nexport const defaultHeaderTranslations = {\n new: \"New\",\n support: \"Support\",\n purchasedProductHistory: \"Purchased Product History\",\n orderHistory: \"Order History\",\n earlyAccess: \"Early Access\",\n store: \"Store\",\n links: \"Links\",\n company: \"Company\",\n social: \"Social\",\n tools: \"Tools\",\n training: \"Training\",\n continueShopping: \"Continue Shopping\",\n search: {\n placeholder: \"Search...\",\n noMatchesFound: \"Sorry, we couldn't find any matches.\",\n seeAllResults: \"See all results\",\n searchUniFiProducts: \"Search UniFi products\",\n searchUISPProducts: \"Search UISP products\",\n searchAmpliFiProducts: \"Search AmpliFi products\",\n },\n account: {\n login: \"Log In\",\n signUp: \"Sign Up\",\n signOut: \"Sign Out\",\n uiAccount: \"UI Account\",\n unifiSiteManager: \"UniFi Site Manager\",\n manageAccount: \"Manage Account\",\n orderHistory: \"Orders & Addresses\",\n },\n cart: {\n VATincluded: \"VAT Incl.\",\n includesVat: \"Includes VAT of\",\n discount: \"Discount\",\n empty: \"Your cart is empty\",\n review: \"Checkout\",\n shipping: \"Shipping\",\n subtotal: \"Subtotal\",\n total: \"Total price:\",\n itemsTitle: \"Your Cart\",\n upsellTitle: \"Usually bought together\",\n },\n language: {},\n region: \"Region\",\n};\n\nexport interface HeaderAccountCustomer {\n id: string;\n email: string;\n displayName: string;\n picture?: string | null;\n}\n\nexport interface HeaderAccount {\n loading?: boolean;\n customer?: Nullish<HeaderAccountCustomer>;\n handleLogin?: () => void;\n handleLogout?: () => void;\n handleRegister?: () => void;\n handleManageAccount?: () => void;\n handleOrderHistory?: () => void;\n renderStorePicker?: (onClose: () => void) => JSX.Element;\n}\n\nexport interface HeaderSearch {\n /** Trigger search */\n onSearch: (formattedQuerySearchTerm: string) => void;\n loading?: boolean;\n totalItemsCount: number;\n items: Array<{\n id: string;\n url: string;\n image?: CustomImageAsset | null;\n title: string;\n family?: string | null;\n }>;\n}\n\nexport interface HeaderCartItemControls {\n loading?: boolean;\n quantityMax?: number;\n onQuantityChange: (newQuantity: number) => void;\n}\n\nexport interface HeaderCartItem {\n id: string;\n url: string;\n image: Nullish<CustomImageAsset>;\n quantity: number;\n title: string;\n controls: HeaderCartItemControls;\n price: string;\n priceIncludingVAT?: string;\n}\n\nexport interface HeaderCart {\n onReview: () => void;\n loading?: boolean;\n items: HeaderCartItem[];\n upsellItems?: HeaderCartItem[];\n totals: Nullish<{\n shipping: Nullish<string>;\n discount: Nullish<string>;\n finalTax: Nullish<string>;\n total: string;\n totalIncludingVAT?: string;\n }>;\n}\n\nexport type HeaderTranslations = typeof defaultHeaderTranslations;\n\nexport type HeaderEmbedConfig = {\n /**\n * Allows to configure custom callback on home link click\n */\n homeLinkClickHandler?: () => void;\n\n /**\n * Allows to render custom extra section items in Pro Mobile Menu\n */\n mobileMenuExtraSectionItems?: Array<ProMobileMenuSectionItem>;\n\n /**\n * Moves Avatar icon to the left side of the header\n */\n moveAvatarIconToLeft?: boolean;\n\n /**\n * Allows to display avatar as image instead of icon\n */\n displayAvatarAsImage?: boolean;\n\n /**\n * Allows to configure custom callback on avatar click\n */\n avatarClickHandler?: () => void;\n\n /**\n * Allows to hide logo / site title\n */\n hideLogo?: boolean;\n\n /**\n * Allows to hide Avatar icon from the header\n */\n hideAvatarIcon?: boolean;\n\n /**\n * Hide language picker\n */\n hideLanguagePicker?: boolean;\n\n fullWidthHeader?: boolean;\n\n /**\n * Renders site title instead of UI logo\n */\n siteTitle?: string;\n\n /**\n * Blurs search input and dismissed virtual keyboard on touchmove\n */\n /** @deprecated Use blurSearchOnTouchmove */\n hideSearchOnTouchmove?: boolean;\n blurSearchOnTouchmove?: boolean;\n};\n\nexport interface HeaderProps {\n className?: string;\n motif: Motif;\n /**\n * Main header bar becomes fixed position at the top\n */\n sticky?: boolean;\n /**\n * Navigation carousel becomes fixed position at the top\n */\n stickyCarousel?: boolean;\n translations?: HeaderTranslations;\n renderImage: RenderImageFn;\n showLineLoader?: boolean;\n onModalOpen?: () => void;\n onMenuItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationItem,\n ) => void;\n onMenuSubItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationSubItem | ParsedNavigationSubSubItem,\n ) => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Account\n account?: HeaderAccount;\n\n // Search\n onSearchResultsAction?: (searchTerm: string) => void;\n search?: HeaderSearch;\n\n // Cart\n onCartClick?: () => void;\n cart?: HeaderCart;\n\n // Set specific modal to be open initially\n initialActiveModal?: Nullish<ModalId>;\n /**\n * Triggers on active modal change\n */\n onActiveModal?: (id: ModalId | null, prevModalId: ModalId | null) => void;\n\n /**\n * Will be called before navigating to store search, the tracking request in this callback will only\n * finish if called from store side as microsites are not using next router.\n */\n trackStoreSearchClick?: () => void;\n\n transparentHeader?: boolean;\n\n /**\n * Sub-menu used for microsites\n */\n micrositeMenu?: NavigationMicrositeMenuProps;\n\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n accountMenu?: React.ReactNode;\n}\n\nexport type IsolatedHeaderProps = {\n className?: string;\n motif: Motif;\n translations?: HeaderTranslations;\n handleContinueShopping: () => void;\n showLineLoader?: boolean;\n account?: {\n loading?: HeaderAccount[\"loading\"];\n customer?: {\n picture?: HeaderAccountCustomer[\"picture\"];\n };\n };\n} & Pick<HeaderProps, \"embedConfig\">;\n\nexport interface ProHeaderEarlyAccess {\n loading?: boolean;\n onClick: () => void;\n}\n\nexport interface HeaderProductLineOption {\n value: ProductLine;\n label: string;\n}\n\nexport interface ProHeaderCategories {\n items: ProMobileMenuSectionItem[];\n activeIndex: number;\n}\n\nexport type ProHeaderProps = Pick<\n HeaderProps,\n | \"className\"\n | \"motif\"\n | \"cart\"\n | \"account\"\n | \"translations\"\n | \"onModalOpen\"\n | \"onCartClick\"\n | \"showLineLoader\"\n | \"accountMenu\"\n> & {\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n // Country picker\n currentCountryName?: string;\n handleStorePickerClick?: () => void;\n\n // Early access button\n earlyAccess?: ProHeaderEarlyAccess;\n\n // Purchase History button\n handlePurchaseHistoryClick?: () => void;\n\n // Order button\n handleOrderHistoryClick?: () => void;\n\n // Product line picker\n productLineOptions?: HeaderProductLineOption[];\n productLineValue?: ProductLine;\n handleProductLineChange?: (type: ProductLine) => void;\n\n // Mobile menu aka \"hamburger\" button click\n handleMobileMenuClick?: () => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Search\n searchValue?: string;\n onSearch?: (searchTerm: string) => void;\n\n onSearchFocus?: () => void;\n onSearchBlur?: () => void;\n onSearchClick?: () => void;\n\n // Categories used for mobile menu\n categories: ProHeaderCategories;\n useInlineCategories?: boolean;\n};\n"],"names":["defaultHeaderTranslations","new","support","purchasedProductHistory","orderHistory","earlyAccess","store","links","company","social","tools","training","continueShopping","search","placeholder","noMatchesFound","seeAllResults","searchUniFiProducts","searchUISPProducts","searchAmpliFiProducts","account","login","signUp","signOut","uiAccount","unifiSiteManager","manageAccount","cart","VATincluded","includesVat","discount","empty","review","shipping","subtotal","total","itemsTitle","upsellTitle","language","region"],"mappings":";;;AAiBO,MAAMA,yBAA4B,GAAA;EACvCC,GAAK,EAAA,KAAA;EACLC,OAAS,EAAA,SAAA;EACTC,uBAAyB,EAAA,2BAAA;EACzBC,YAAc,EAAA,eAAA;EACdC,WAAa,EAAA,cAAA;EACbC,KAAO,EAAA,OAAA;EACPC,KAAO,EAAA,OAAA;EACPC,OAAS,EAAA,SAAA;EACTC,MAAQ,EAAA,QAAA;EACRC,KAAO,EAAA,OAAA;EACPC,QAAU,EAAA,UAAA;EACVC,gBAAkB,EAAA,mBAAA;EAClBC,MAAQ,EAAA;IACNC,WAAa,EAAA,WAAA;IACbC,cAAgB,EAAA,sCAAA;IAChBC,aAAe,EAAA,iBAAA;IACfC,mBAAqB,EAAA,uBAAA;IACrBC,kBAAoB,EAAA,sBAAA;IACpBC,qBAAuB,EAAA;EACzB,CAAA;EACAC,OAAS,EAAA;IACPC,KAAO,EAAA,QAAA;IACPC,MAAQ,EAAA,SAAA;IACRC,OAAS,EAAA,UAAA;IACTC,SAAW,EAAA,YAAA;IACXC,gBAAkB,EAAA,oBAAA;IAClBC,aAAe,EAAA,gBAAA;IACftB,YAAc,EAAA;EAChB,CAAA;EACAuB,IAAM,EAAA;IACJC,WAAa,EAAA,WAAA;IACbC,WAAa,EAAA,iBAAA;IACbC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,oBAAA;IACPC,MAAQ,EAAA,UAAA;IACRC,QAAU,EAAA,UAAA;IACVC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,cAAA;IACPC,UAAY,EAAA,WAAA;IACZC,WAAa,EAAA;EACf,CAAA;EACAC,UAAU,CAAC,CAAA;EACXC,MAAQ,EAAA;AACV,CAAA;"}
|
|
1
|
+
{"version":3,"file":"Header.types.js","sources":["../../../src/components/Header/Header.types.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\n\nimport type { Language } from \"../../contexts/MenuContext/mapping\";\nimport type {\n ModalId,\n ParsedNavigationItem,\n ParsedNavigationSubItem,\n ParsedNavigationSubSubItem,\n} from \"../../contexts/MenuContext/types\";\nimport type { Nullish, ProductLine } from \"../../types\";\nimport type {\n CustomImageAsset,\n RenderImageFn,\n} from \"../CustomImage/CustomImage.types\";\nimport type { NavigationMicrositeMenuProps } from \"./Navigation/MicrositeMenu/MicrositeMenu.types\";\nimport type { ProMobileMenuSectionItem } from \"./Navigation/ProMobileMenu/ProMobileMenu.types\";\n\nexport const defaultHeaderTranslations = {\n new: \"New\",\n support: \"Support\",\n purchasedProductHistory: \"Purchased Product History\",\n orderHistory: \"Order History\",\n earlyAccess: \"Early Access\",\n store: \"Store\",\n links: \"Links\",\n company: \"Company\",\n social: \"Social\",\n tools: \"Tools\",\n training: \"Training\",\n continueShopping: \"Continue Shopping\",\n search: {\n placeholder: \"Search...\",\n noMatchesFound: \"Sorry, we couldn't find any matches.\",\n seeAllResults: \"See all results\",\n searchUniFiProducts: \"Search UniFi products\",\n searchUISPProducts: \"Search UISP products\",\n searchAmpliFiProducts: \"Search AmpliFi products\",\n },\n account: {\n login: \"Log In\",\n signUp: \"Sign Up\",\n signOut: \"Sign Out\",\n uiAccount: \"UI Account\",\n unifiSiteManager: \"UniFi Site Manager\",\n manageAccount: \"Manage Account\",\n orderHistory: \"Orders & Addresses\",\n },\n cart: {\n VATincluded: \"VAT Incl.\",\n includesVat: \"Includes VAT of\",\n discount: \"Discount\",\n empty: \"Your cart is empty\",\n review: \"Checkout\",\n shipping: \"Shipping\",\n subtotal: \"Subtotal\",\n total: \"Total price:\",\n itemsTitle: \"Your Cart\",\n upsellTitle: \"Usually bought together\",\n },\n language: {},\n};\n\nexport interface HeaderAccountCustomer {\n id: string;\n email: string;\n displayName: string;\n picture?: string | null;\n}\n\nexport interface HeaderAccount {\n loading?: boolean;\n customer?: Nullish<HeaderAccountCustomer>;\n handleLogin?: () => void;\n handleLogout?: () => void;\n handleRegister?: () => void;\n handleManageAccount?: () => void;\n handleOrderHistory?: () => void;\n renderStorePicker?: (onClose: () => void) => JSX.Element;\n}\n\nexport interface HeaderSearch {\n /** Trigger search */\n onSearch: (formattedQuerySearchTerm: string) => void;\n loading?: boolean;\n totalItemsCount: number;\n items: Array<{\n id: string;\n url: string;\n image?: CustomImageAsset | null;\n title: string;\n family?: string | null;\n }>;\n}\n\nexport interface HeaderCartItemControls {\n loading?: boolean;\n quantityMax?: number;\n onQuantityChange: (newQuantity: number) => void;\n}\n\nexport interface HeaderCartItem {\n id: string;\n url: string;\n image: Nullish<CustomImageAsset>;\n quantity: number;\n title: string;\n controls: HeaderCartItemControls;\n price: string;\n priceIncludingVAT?: string;\n}\n\nexport interface HeaderCart {\n onReview: () => void;\n loading?: boolean;\n items: HeaderCartItem[];\n upsellItems?: HeaderCartItem[];\n totals: Nullish<{\n shipping: Nullish<string>;\n discount: Nullish<string>;\n finalTax: Nullish<string>;\n total: string;\n totalIncludingVAT?: string;\n }>;\n}\n\nexport type HeaderTranslations = typeof defaultHeaderTranslations;\n\nexport type HeaderEmbedConfig = {\n /**\n * Allows to configure custom callback on home link click\n */\n homeLinkClickHandler?: () => void;\n\n /**\n * Allows to render custom extra section items in Pro Mobile Menu\n */\n mobileMenuExtraSectionItems?: Array<ProMobileMenuSectionItem>;\n\n /**\n * Moves Avatar icon to the left side of the header\n */\n moveAvatarIconToLeft?: boolean;\n\n /**\n * Allows to display avatar as image instead of icon\n */\n displayAvatarAsImage?: boolean;\n\n /**\n * Allows to configure custom callback on avatar click\n */\n avatarClickHandler?: () => void;\n\n /**\n * Allows to hide logo / site title\n */\n hideLogo?: boolean;\n\n /**\n * Allows to hide Avatar icon from the header\n */\n hideAvatarIcon?: boolean;\n\n /**\n * Hide language picker\n */\n hideLanguagePicker?: boolean;\n\n fullWidthHeader?: boolean;\n\n /**\n * Renders site title instead of UI logo\n */\n siteTitle?: string;\n\n /**\n * Blurs search input and dismissed virtual keyboard on touchmove\n */\n /** @deprecated Use blurSearchOnTouchmove */\n hideSearchOnTouchmove?: boolean;\n blurSearchOnTouchmove?: boolean;\n};\n\nexport interface HeaderProps {\n className?: string;\n motif: Motif;\n /**\n * Main header bar becomes fixed position at the top\n */\n sticky?: boolean;\n /**\n * Navigation carousel becomes fixed position at the top\n */\n stickyCarousel?: boolean;\n translations?: HeaderTranslations;\n renderImage: RenderImageFn;\n showLineLoader?: boolean;\n onModalOpen?: () => void;\n onMenuItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationItem,\n ) => void;\n onMenuSubItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationSubItem | ParsedNavigationSubSubItem,\n ) => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Account\n account?: HeaderAccount;\n\n // Search\n onSearchResultsAction?: (searchTerm: string) => void;\n search?: HeaderSearch;\n\n // Cart\n onCartClick?: () => void;\n cart?: HeaderCart;\n\n // Set specific modal to be open initially\n initialActiveModal?: Nullish<ModalId>;\n /**\n * Triggers on active modal change\n */\n onActiveModal?: (id: ModalId | null, prevModalId: ModalId | null) => void;\n\n /**\n * Will be called before navigating to store search, the tracking request in this callback will only\n * finish if called from store side as microsites are not using next router.\n */\n trackStoreSearchClick?: () => void;\n\n transparentHeader?: boolean;\n\n /**\n * Sub-menu used for microsites\n */\n micrositeMenu?: NavigationMicrositeMenuProps;\n\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n accountMenu?: React.ReactNode;\n}\n\nexport type IsolatedHeaderProps = {\n className?: string;\n motif: Motif;\n translations?: HeaderTranslations;\n handleContinueShopping: () => void;\n showLineLoader?: boolean;\n account?: {\n loading?: HeaderAccount[\"loading\"];\n customer?: {\n picture?: HeaderAccountCustomer[\"picture\"];\n };\n };\n} & Pick<HeaderProps, \"embedConfig\">;\n\nexport interface ProHeaderEarlyAccess {\n loading?: boolean;\n onClick: () => void;\n}\n\nexport type ProHeaderProps = Pick<\n HeaderProps,\n | \"className\"\n | \"motif\"\n | \"cart\"\n | \"account\"\n | \"translations\"\n | \"onModalOpen\"\n | \"onCartClick\"\n | \"showLineLoader\"\n | \"accountMenu\"\n> & {\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n // Country picker\n currentCountryName?: string;\n handleStorePickerClick?: () => void;\n\n // Early access button\n earlyAccess?: ProHeaderEarlyAccess;\n\n // Purchase History button\n handlePurchaseHistoryClick?: () => void;\n\n // Order button\n handleOrderHistoryClick?: () => void;\n\n // Product line picker\n productLineOptions?: { value: ProductLine; label: string }[];\n productLineValue?: ProductLine;\n handleProductLineChange?: (type: ProductLine) => void;\n\n // Mobile menu aka \"hamburger\" button click\n handleMobileMenuClick?: () => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Search\n searchValue?: string;\n onSearch?: (searchTerm: string) => void;\n\n onSearchFocus?: () => void;\n onSearchBlur?: () => void;\n onSearchClick?: () => void;\n};\n"],"names":["defaultHeaderTranslations","new","support","purchasedProductHistory","orderHistory","earlyAccess","store","links","company","social","tools","training","continueShopping","search","placeholder","noMatchesFound","seeAllResults","searchUniFiProducts","searchUISPProducts","searchAmpliFiProducts","account","login","signUp","signOut","uiAccount","unifiSiteManager","manageAccount","cart","VATincluded","includesVat","discount","empty","review","shipping","subtotal","total","itemsTitle","upsellTitle","language"],"mappings":";;;AAiBO,MAAMA,yBAA4B,GAAA;EACvCC,GAAK,EAAA,KAAA;EACLC,OAAS,EAAA,SAAA;EACTC,uBAAyB,EAAA,2BAAA;EACzBC,YAAc,EAAA,eAAA;EACdC,WAAa,EAAA,cAAA;EACbC,KAAO,EAAA,OAAA;EACPC,KAAO,EAAA,OAAA;EACPC,OAAS,EAAA,SAAA;EACTC,MAAQ,EAAA,QAAA;EACRC,KAAO,EAAA,OAAA;EACPC,QAAU,EAAA,UAAA;EACVC,gBAAkB,EAAA,mBAAA;EAClBC,MAAQ,EAAA;IACNC,WAAa,EAAA,WAAA;IACbC,cAAgB,EAAA,sCAAA;IAChBC,aAAe,EAAA,iBAAA;IACfC,mBAAqB,EAAA,uBAAA;IACrBC,kBAAoB,EAAA,sBAAA;IACpBC,qBAAuB,EAAA;EACzB,CAAA;EACAC,OAAS,EAAA;IACPC,KAAO,EAAA,QAAA;IACPC,MAAQ,EAAA,SAAA;IACRC,OAAS,EAAA,UAAA;IACTC,SAAW,EAAA,YAAA;IACXC,gBAAkB,EAAA,oBAAA;IAClBC,aAAe,EAAA,gBAAA;IACftB,YAAc,EAAA;EAChB,CAAA;EACAuB,IAAM,EAAA;IACJC,WAAa,EAAA,WAAA;IACbC,WAAa,EAAA,iBAAA;IACbC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,oBAAA;IACPC,MAAQ,EAAA,UAAA;IACRC,QAAU,EAAA,UAAA;IACVC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,cAAA;IACPC,UAAY,EAAA,WAAA;IACZC,WAAa,EAAA;EACf,CAAA;EACAC,UAAU,CAAC;AACb,CAAA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.types.mjs","sources":["../../../src/components/Header/Header.types.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\n\nimport type { Language } from \"../../contexts/MenuContext/mapping\";\nimport type {\n ModalId,\n ParsedNavigationItem,\n ParsedNavigationSubItem,\n ParsedNavigationSubSubItem,\n} from \"../../contexts/MenuContext/types\";\nimport type { Nullish, ProductLine } from \"../../types\";\nimport type {\n CustomImageAsset,\n RenderImageFn,\n} from \"../CustomImage/CustomImage.types\";\nimport type { NavigationMicrositeMenuProps } from \"./Navigation/MicrositeMenu/MicrositeMenu.types\";\nimport type { ProMobileMenuSectionItem } from \"./Navigation/ProMobileMenu/ProMobileMenu.types\";\n\nexport const defaultHeaderTranslations = {\n new: \"New\",\n support: \"Support\",\n purchasedProductHistory: \"Purchased Product History\",\n orderHistory: \"Order History\",\n earlyAccess: \"Early Access\",\n store: \"Store\",\n links: \"Links\",\n company: \"Company\",\n social: \"Social\",\n tools: \"Tools\",\n training: \"Training\",\n continueShopping: \"Continue Shopping\",\n search: {\n placeholder: \"Search...\",\n noMatchesFound: \"Sorry, we couldn't find any matches.\",\n seeAllResults: \"See all results\",\n searchUniFiProducts: \"Search UniFi products\",\n searchUISPProducts: \"Search UISP products\",\n searchAmpliFiProducts: \"Search AmpliFi products\",\n },\n account: {\n login: \"Log In\",\n signUp: \"Sign Up\",\n signOut: \"Sign Out\",\n uiAccount: \"UI Account\",\n unifiSiteManager: \"UniFi Site Manager\",\n manageAccount: \"Manage Account\",\n orderHistory: \"Orders & Addresses\",\n },\n cart: {\n VATincluded: \"VAT Incl.\",\n includesVat: \"Includes VAT of\",\n discount: \"Discount\",\n empty: \"Your cart is empty\",\n review: \"Checkout\",\n shipping: \"Shipping\",\n subtotal: \"Subtotal\",\n total: \"Total price:\",\n itemsTitle: \"Your Cart\",\n upsellTitle: \"Usually bought together\",\n },\n language: {},\n region: \"Region\",\n};\n\nexport interface HeaderAccountCustomer {\n id: string;\n email: string;\n displayName: string;\n picture?: string | null;\n}\n\nexport interface HeaderAccount {\n loading?: boolean;\n customer?: Nullish<HeaderAccountCustomer>;\n handleLogin?: () => void;\n handleLogout?: () => void;\n handleRegister?: () => void;\n handleManageAccount?: () => void;\n handleOrderHistory?: () => void;\n renderStorePicker?: (onClose: () => void) => JSX.Element;\n}\n\nexport interface HeaderSearch {\n /** Trigger search */\n onSearch: (formattedQuerySearchTerm: string) => void;\n loading?: boolean;\n totalItemsCount: number;\n items: Array<{\n id: string;\n url: string;\n image?: CustomImageAsset | null;\n title: string;\n family?: string | null;\n }>;\n}\n\nexport interface HeaderCartItemControls {\n loading?: boolean;\n quantityMax?: number;\n onQuantityChange: (newQuantity: number) => void;\n}\n\nexport interface HeaderCartItem {\n id: string;\n url: string;\n image: Nullish<CustomImageAsset>;\n quantity: number;\n title: string;\n controls: HeaderCartItemControls;\n price: string;\n priceIncludingVAT?: string;\n}\n\nexport interface HeaderCart {\n onReview: () => void;\n loading?: boolean;\n items: HeaderCartItem[];\n upsellItems?: HeaderCartItem[];\n totals: Nullish<{\n shipping: Nullish<string>;\n discount: Nullish<string>;\n finalTax: Nullish<string>;\n total: string;\n totalIncludingVAT?: string;\n }>;\n}\n\nexport type HeaderTranslations = typeof defaultHeaderTranslations;\n\nexport type HeaderEmbedConfig = {\n /**\n * Allows to configure custom callback on home link click\n */\n homeLinkClickHandler?: () => void;\n\n /**\n * Allows to render custom extra section items in Pro Mobile Menu\n */\n mobileMenuExtraSectionItems?: Array<ProMobileMenuSectionItem>;\n\n /**\n * Moves Avatar icon to the left side of the header\n */\n moveAvatarIconToLeft?: boolean;\n\n /**\n * Allows to display avatar as image instead of icon\n */\n displayAvatarAsImage?: boolean;\n\n /**\n * Allows to configure custom callback on avatar click\n */\n avatarClickHandler?: () => void;\n\n /**\n * Allows to hide logo / site title\n */\n hideLogo?: boolean;\n\n /**\n * Allows to hide Avatar icon from the header\n */\n hideAvatarIcon?: boolean;\n\n /**\n * Hide language picker\n */\n hideLanguagePicker?: boolean;\n\n fullWidthHeader?: boolean;\n\n /**\n * Renders site title instead of UI logo\n */\n siteTitle?: string;\n\n /**\n * Blurs search input and dismissed virtual keyboard on touchmove\n */\n /** @deprecated Use blurSearchOnTouchmove */\n hideSearchOnTouchmove?: boolean;\n blurSearchOnTouchmove?: boolean;\n};\n\nexport interface HeaderProps {\n className?: string;\n motif: Motif;\n /**\n * Main header bar becomes fixed position at the top\n */\n sticky?: boolean;\n /**\n * Navigation carousel becomes fixed position at the top\n */\n stickyCarousel?: boolean;\n translations?: HeaderTranslations;\n renderImage: RenderImageFn;\n showLineLoader?: boolean;\n onModalOpen?: () => void;\n onMenuItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationItem,\n ) => void;\n onMenuSubItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationSubItem | ParsedNavigationSubSubItem,\n ) => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Account\n account?: HeaderAccount;\n\n // Search\n onSearchResultsAction?: (searchTerm: string) => void;\n search?: HeaderSearch;\n\n // Cart\n onCartClick?: () => void;\n cart?: HeaderCart;\n\n // Set specific modal to be open initially\n initialActiveModal?: Nullish<ModalId>;\n /**\n * Triggers on active modal change\n */\n onActiveModal?: (id: ModalId | null, prevModalId: ModalId | null) => void;\n\n /**\n * Will be called before navigating to store search, the tracking request in this callback will only\n * finish if called from store side as microsites are not using next router.\n */\n trackStoreSearchClick?: () => void;\n\n transparentHeader?: boolean;\n\n /**\n * Sub-menu used for microsites\n */\n micrositeMenu?: NavigationMicrositeMenuProps;\n\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n accountMenu?: React.ReactNode;\n}\n\nexport type IsolatedHeaderProps = {\n className?: string;\n motif: Motif;\n translations?: HeaderTranslations;\n handleContinueShopping: () => void;\n showLineLoader?: boolean;\n account?: {\n loading?: HeaderAccount[\"loading\"];\n customer?: {\n picture?: HeaderAccountCustomer[\"picture\"];\n };\n };\n} & Pick<HeaderProps, \"embedConfig\">;\n\nexport interface ProHeaderEarlyAccess {\n loading?: boolean;\n onClick: () => void;\n}\n\nexport interface HeaderProductLineOption {\n value: ProductLine;\n label: string;\n}\n\nexport interface ProHeaderCategories {\n items: ProMobileMenuSectionItem[];\n activeIndex: number;\n}\n\nexport type ProHeaderProps = Pick<\n HeaderProps,\n | \"className\"\n | \"motif\"\n | \"cart\"\n | \"account\"\n | \"translations\"\n | \"onModalOpen\"\n | \"onCartClick\"\n | \"showLineLoader\"\n | \"accountMenu\"\n> & {\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n // Country picker\n currentCountryName?: string;\n handleStorePickerClick?: () => void;\n\n // Early access button\n earlyAccess?: ProHeaderEarlyAccess;\n\n // Purchase History button\n handlePurchaseHistoryClick?: () => void;\n\n // Order button\n handleOrderHistoryClick?: () => void;\n\n // Product line picker\n productLineOptions?: HeaderProductLineOption[];\n productLineValue?: ProductLine;\n handleProductLineChange?: (type: ProductLine) => void;\n\n // Mobile menu aka \"hamburger\" button click\n handleMobileMenuClick?: () => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Search\n searchValue?: string;\n onSearch?: (searchTerm: string) => void;\n\n onSearchFocus?: () => void;\n onSearchBlur?: () => void;\n onSearchClick?: () => void;\n\n // Categories used for mobile menu\n categories: ProHeaderCategories;\n useInlineCategories?: boolean;\n};\n"],"names":["defaultHeaderTranslations","new","support","purchasedProductHistory","orderHistory","earlyAccess","store","links","company","social","tools","training","continueShopping","search","placeholder","noMatchesFound","seeAllResults","searchUniFiProducts","searchUISPProducts","searchAmpliFiProducts","account","login","signUp","signOut","uiAccount","unifiSiteManager","manageAccount","cart","VATincluded","includesVat","discount","empty","review","shipping","subtotal","total","itemsTitle","upsellTitle","language","region"],"mappings":";;AAiBO,MAAMA,yBAA4B,GAAA;EACvCC,GAAK,EAAA,KAAA;EACLC,OAAS,EAAA,SAAA;EACTC,uBAAyB,EAAA,2BAAA;EACzBC,YAAc,EAAA,eAAA;EACdC,WAAa,EAAA,cAAA;EACbC,KAAO,EAAA,OAAA;EACPC,KAAO,EAAA,OAAA;EACPC,OAAS,EAAA,SAAA;EACTC,MAAQ,EAAA,QAAA;EACRC,KAAO,EAAA,OAAA;EACPC,QAAU,EAAA,UAAA;EACVC,gBAAkB,EAAA,mBAAA;EAClBC,MAAQ,EAAA;IACNC,WAAa,EAAA,WAAA;IACbC,cAAgB,EAAA,sCAAA;IAChBC,aAAe,EAAA,iBAAA;IACfC,mBAAqB,EAAA,uBAAA;IACrBC,kBAAoB,EAAA,sBAAA;IACpBC,qBAAuB,EAAA;EACzB,CAAA;EACAC,OAAS,EAAA;IACPC,KAAO,EAAA,QAAA;IACPC,MAAQ,EAAA,SAAA;IACRC,OAAS,EAAA,UAAA;IACTC,SAAW,EAAA,YAAA;IACXC,gBAAkB,EAAA,oBAAA;IAClBC,aAAe,EAAA,gBAAA;IACftB,YAAc,EAAA;EAChB,CAAA;EACAuB,IAAM,EAAA;IACJC,WAAa,EAAA,WAAA;IACbC,WAAa,EAAA,iBAAA;IACbC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,oBAAA;IACPC,MAAQ,EAAA,UAAA;IACRC,QAAU,EAAA,UAAA;IACVC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,cAAA;IACPC,UAAY,EAAA,WAAA;IACZC,WAAa,EAAA;EACf,CAAA;EACAC,UAAU,CAAC,CAAA;EACXC,MAAQ,EAAA;AACV,CAAA;"}
|
|
1
|
+
{"version":3,"file":"Header.types.mjs","sources":["../../../src/components/Header/Header.types.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\n\nimport type { Language } from \"../../contexts/MenuContext/mapping\";\nimport type {\n ModalId,\n ParsedNavigationItem,\n ParsedNavigationSubItem,\n ParsedNavigationSubSubItem,\n} from \"../../contexts/MenuContext/types\";\nimport type { Nullish, ProductLine } from \"../../types\";\nimport type {\n CustomImageAsset,\n RenderImageFn,\n} from \"../CustomImage/CustomImage.types\";\nimport type { NavigationMicrositeMenuProps } from \"./Navigation/MicrositeMenu/MicrositeMenu.types\";\nimport type { ProMobileMenuSectionItem } from \"./Navigation/ProMobileMenu/ProMobileMenu.types\";\n\nexport const defaultHeaderTranslations = {\n new: \"New\",\n support: \"Support\",\n purchasedProductHistory: \"Purchased Product History\",\n orderHistory: \"Order History\",\n earlyAccess: \"Early Access\",\n store: \"Store\",\n links: \"Links\",\n company: \"Company\",\n social: \"Social\",\n tools: \"Tools\",\n training: \"Training\",\n continueShopping: \"Continue Shopping\",\n search: {\n placeholder: \"Search...\",\n noMatchesFound: \"Sorry, we couldn't find any matches.\",\n seeAllResults: \"See all results\",\n searchUniFiProducts: \"Search UniFi products\",\n searchUISPProducts: \"Search UISP products\",\n searchAmpliFiProducts: \"Search AmpliFi products\",\n },\n account: {\n login: \"Log In\",\n signUp: \"Sign Up\",\n signOut: \"Sign Out\",\n uiAccount: \"UI Account\",\n unifiSiteManager: \"UniFi Site Manager\",\n manageAccount: \"Manage Account\",\n orderHistory: \"Orders & Addresses\",\n },\n cart: {\n VATincluded: \"VAT Incl.\",\n includesVat: \"Includes VAT of\",\n discount: \"Discount\",\n empty: \"Your cart is empty\",\n review: \"Checkout\",\n shipping: \"Shipping\",\n subtotal: \"Subtotal\",\n total: \"Total price:\",\n itemsTitle: \"Your Cart\",\n upsellTitle: \"Usually bought together\",\n },\n language: {},\n};\n\nexport interface HeaderAccountCustomer {\n id: string;\n email: string;\n displayName: string;\n picture?: string | null;\n}\n\nexport interface HeaderAccount {\n loading?: boolean;\n customer?: Nullish<HeaderAccountCustomer>;\n handleLogin?: () => void;\n handleLogout?: () => void;\n handleRegister?: () => void;\n handleManageAccount?: () => void;\n handleOrderHistory?: () => void;\n renderStorePicker?: (onClose: () => void) => JSX.Element;\n}\n\nexport interface HeaderSearch {\n /** Trigger search */\n onSearch: (formattedQuerySearchTerm: string) => void;\n loading?: boolean;\n totalItemsCount: number;\n items: Array<{\n id: string;\n url: string;\n image?: CustomImageAsset | null;\n title: string;\n family?: string | null;\n }>;\n}\n\nexport interface HeaderCartItemControls {\n loading?: boolean;\n quantityMax?: number;\n onQuantityChange: (newQuantity: number) => void;\n}\n\nexport interface HeaderCartItem {\n id: string;\n url: string;\n image: Nullish<CustomImageAsset>;\n quantity: number;\n title: string;\n controls: HeaderCartItemControls;\n price: string;\n priceIncludingVAT?: string;\n}\n\nexport interface HeaderCart {\n onReview: () => void;\n loading?: boolean;\n items: HeaderCartItem[];\n upsellItems?: HeaderCartItem[];\n totals: Nullish<{\n shipping: Nullish<string>;\n discount: Nullish<string>;\n finalTax: Nullish<string>;\n total: string;\n totalIncludingVAT?: string;\n }>;\n}\n\nexport type HeaderTranslations = typeof defaultHeaderTranslations;\n\nexport type HeaderEmbedConfig = {\n /**\n * Allows to configure custom callback on home link click\n */\n homeLinkClickHandler?: () => void;\n\n /**\n * Allows to render custom extra section items in Pro Mobile Menu\n */\n mobileMenuExtraSectionItems?: Array<ProMobileMenuSectionItem>;\n\n /**\n * Moves Avatar icon to the left side of the header\n */\n moveAvatarIconToLeft?: boolean;\n\n /**\n * Allows to display avatar as image instead of icon\n */\n displayAvatarAsImage?: boolean;\n\n /**\n * Allows to configure custom callback on avatar click\n */\n avatarClickHandler?: () => void;\n\n /**\n * Allows to hide logo / site title\n */\n hideLogo?: boolean;\n\n /**\n * Allows to hide Avatar icon from the header\n */\n hideAvatarIcon?: boolean;\n\n /**\n * Hide language picker\n */\n hideLanguagePicker?: boolean;\n\n fullWidthHeader?: boolean;\n\n /**\n * Renders site title instead of UI logo\n */\n siteTitle?: string;\n\n /**\n * Blurs search input and dismissed virtual keyboard on touchmove\n */\n /** @deprecated Use blurSearchOnTouchmove */\n hideSearchOnTouchmove?: boolean;\n blurSearchOnTouchmove?: boolean;\n};\n\nexport interface HeaderProps {\n className?: string;\n motif: Motif;\n /**\n * Main header bar becomes fixed position at the top\n */\n sticky?: boolean;\n /**\n * Navigation carousel becomes fixed position at the top\n */\n stickyCarousel?: boolean;\n translations?: HeaderTranslations;\n renderImage: RenderImageFn;\n showLineLoader?: boolean;\n onModalOpen?: () => void;\n onMenuItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationItem,\n ) => void;\n onMenuSubItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationSubItem | ParsedNavigationSubSubItem,\n ) => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Account\n account?: HeaderAccount;\n\n // Search\n onSearchResultsAction?: (searchTerm: string) => void;\n search?: HeaderSearch;\n\n // Cart\n onCartClick?: () => void;\n cart?: HeaderCart;\n\n // Set specific modal to be open initially\n initialActiveModal?: Nullish<ModalId>;\n /**\n * Triggers on active modal change\n */\n onActiveModal?: (id: ModalId | null, prevModalId: ModalId | null) => void;\n\n /**\n * Will be called before navigating to store search, the tracking request in this callback will only\n * finish if called from store side as microsites are not using next router.\n */\n trackStoreSearchClick?: () => void;\n\n transparentHeader?: boolean;\n\n /**\n * Sub-menu used for microsites\n */\n micrositeMenu?: NavigationMicrositeMenuProps;\n\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n accountMenu?: React.ReactNode;\n}\n\nexport type IsolatedHeaderProps = {\n className?: string;\n motif: Motif;\n translations?: HeaderTranslations;\n handleContinueShopping: () => void;\n showLineLoader?: boolean;\n account?: {\n loading?: HeaderAccount[\"loading\"];\n customer?: {\n picture?: HeaderAccountCustomer[\"picture\"];\n };\n };\n} & Pick<HeaderProps, \"embedConfig\">;\n\nexport interface ProHeaderEarlyAccess {\n loading?: boolean;\n onClick: () => void;\n}\n\nexport type ProHeaderProps = Pick<\n HeaderProps,\n | \"className\"\n | \"motif\"\n | \"cart\"\n | \"account\"\n | \"translations\"\n | \"onModalOpen\"\n | \"onCartClick\"\n | \"showLineLoader\"\n | \"accountMenu\"\n> & {\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n // Country picker\n currentCountryName?: string;\n handleStorePickerClick?: () => void;\n\n // Early access button\n earlyAccess?: ProHeaderEarlyAccess;\n\n // Purchase History button\n handlePurchaseHistoryClick?: () => void;\n\n // Order button\n handleOrderHistoryClick?: () => void;\n\n // Product line picker\n productLineOptions?: { value: ProductLine; label: string }[];\n productLineValue?: ProductLine;\n handleProductLineChange?: (type: ProductLine) => void;\n\n // Mobile menu aka \"hamburger\" button click\n handleMobileMenuClick?: () => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Search\n searchValue?: string;\n onSearch?: (searchTerm: string) => void;\n\n onSearchFocus?: () => void;\n onSearchBlur?: () => void;\n onSearchClick?: () => void;\n};\n"],"names":["defaultHeaderTranslations","new","support","purchasedProductHistory","orderHistory","earlyAccess","store","links","company","social","tools","training","continueShopping","search","placeholder","noMatchesFound","seeAllResults","searchUniFiProducts","searchUISPProducts","searchAmpliFiProducts","account","login","signUp","signOut","uiAccount","unifiSiteManager","manageAccount","cart","VATincluded","includesVat","discount","empty","review","shipping","subtotal","total","itemsTitle","upsellTitle","language"],"mappings":";;AAiBO,MAAMA,yBAA4B,GAAA;EACvCC,GAAK,EAAA,KAAA;EACLC,OAAS,EAAA,SAAA;EACTC,uBAAyB,EAAA,2BAAA;EACzBC,YAAc,EAAA,eAAA;EACdC,WAAa,EAAA,cAAA;EACbC,KAAO,EAAA,OAAA;EACPC,KAAO,EAAA,OAAA;EACPC,OAAS,EAAA,SAAA;EACTC,MAAQ,EAAA,QAAA;EACRC,KAAO,EAAA,OAAA;EACPC,QAAU,EAAA,UAAA;EACVC,gBAAkB,EAAA,mBAAA;EAClBC,MAAQ,EAAA;IACNC,WAAa,EAAA,WAAA;IACbC,cAAgB,EAAA,sCAAA;IAChBC,aAAe,EAAA,iBAAA;IACfC,mBAAqB,EAAA,uBAAA;IACrBC,kBAAoB,EAAA,sBAAA;IACpBC,qBAAuB,EAAA;EACzB,CAAA;EACAC,OAAS,EAAA;IACPC,KAAO,EAAA,QAAA;IACPC,MAAQ,EAAA,SAAA;IACRC,OAAS,EAAA,UAAA;IACTC,SAAW,EAAA,YAAA;IACXC,gBAAkB,EAAA,oBAAA;IAClBC,aAAe,EAAA,gBAAA;IACftB,YAAc,EAAA;EAChB,CAAA;EACAuB,IAAM,EAAA;IACJC,WAAa,EAAA,WAAA;IACbC,WAAa,EAAA,iBAAA;IACbC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,oBAAA;IACPC,MAAQ,EAAA,UAAA;IACRC,QAAU,EAAA,UAAA;IACVC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,cAAA;IACPC,UAAY,EAAA,WAAA;IACZC,WAAa,EAAA;EACf,CAAA;EACAC,UAAU,CAAC;AACb,CAAA;"}
|
|
@@ -9,7 +9,7 @@ export declare const MenuButtonLink: import("styled-components").StyledComponent
|
|
|
9
9
|
secondary?: boolean;
|
|
10
10
|
}, never>;
|
|
11
11
|
export declare const TextWrap: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
12
|
-
export declare const Text: import("styled-components").StyledComponent<"
|
|
12
|
+
export declare const Text: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
13
13
|
export declare const Arrow: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
14
14
|
motif: Motif;
|
|
15
15
|
}, never>;
|
|
@@ -108,13 +108,13 @@ const TextWrap = styled__default["default"].div`
|
|
|
108
108
|
position: relative;
|
|
109
109
|
height: 100%;
|
|
110
110
|
`;
|
|
111
|
-
const Text = styled__default["default"].
|
|
111
|
+
const Text = styled__default["default"].span`
|
|
112
112
|
white-space: nowrap;
|
|
113
113
|
text-overflow: ellipsis;
|
|
114
114
|
overflow: hidden;
|
|
115
115
|
transition: color 0.2s linear;
|
|
116
|
-
font-size:
|
|
117
|
-
line-height: ${
|
|
116
|
+
font-size: ${theme.theme.font.size13};
|
|
117
|
+
line-height: ${theme.theme.lineHeight.header};
|
|
118
118
|
`;
|
|
119
119
|
const Arrow = styled__default["default"].div`
|
|
120
120
|
border: 3px solid transparent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.styles.js","sources":["../../../../src/components/Header/MenuItem/MenuItem.styles.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport styled, { css } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../../constants/layout\";\nimport { theme } from \"../../../constants/theme\";\nimport { Button as ButtonBase } from \"../../Button\";\n\n// #############################################################################\n// Shared\n// #############################################################################\ntype VisibilityProps = { hideOnMobile?: boolean; hideOnDesktop?: boolean };\n\nconst visbility = css<{ hideOnMobile?: boolean; hideOnDesktop?: boolean }>`\n ${({ hideOnMobile }) =>\n hideOnMobile &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n `}\n\n ${({ hideOnDesktop }) =>\n hideOnDesktop &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_UP} {\n display: none;\n }\n `}\n`;\n\n// #############################################################################\n// MenuButton\n// #############################################################################\nexport const MenuButtonWrap = styled.div<VisibilityProps>`\n display: flex;\n align-items: center;\n\n ${visbility}\n`;\n\nexport const MenuButtonLink = styled.a<{ motif: Motif; secondary?: boolean }>`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n border-radius: 4px;\n font-size: 13px;\n line-height: 1;\n letter-spacing: -0.02em;\n\n transition: background-color 0.3s ease 0s;\n\n ${({ motif }) => {\n switch (motif) {\n case \"dark\":\n return css`\n color: ${theme.colors.white};\n background-color: #005ed9;\n\n &:focus,\n &:hover {\n color: ${theme.colors.white};\n background-color: #004cad;\n }\n `;\n case \"light\":\n default:\n return css`\n color: ${theme.colors.white};\n background-color: ${theme.colors.primaryBlue};\n\n &:focus,\n &:hover {\n color: ${theme.colors.white};\n background-color: ${theme.colors.dodgerblue};\n }\n `;\n }\n }}\n\n ${({ secondary, motif }) =>\n secondary &&\n css`\n border: 1px solid #595959;\n background-color: transparent;\n\n ${motif === \"light\" &&\n css`\n color: ${theme.colors.menu.text.light};\n\n &:focus,\n &:hover {\n color: ${theme.colors.primaryBlue};\n }\n `}\n\n &:focus,\n &:hover {\n background-color: transparent;\n border-color: ${theme.colors.primaryBlue};\n }\n `}\n`;\n\n// #############################################################################\n// MenuItem\n// #############################################################################\n\nexport const TextWrap = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n height: 100%;\n`;\n\nexport const Text = styled.
|
|
1
|
+
{"version":3,"file":"MenuItem.styles.js","sources":["../../../../src/components/Header/MenuItem/MenuItem.styles.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport styled, { css } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../../constants/layout\";\nimport { theme } from \"../../../constants/theme\";\nimport { Button as ButtonBase } from \"../../Button\";\n\n// #############################################################################\n// Shared\n// #############################################################################\ntype VisibilityProps = { hideOnMobile?: boolean; hideOnDesktop?: boolean };\n\nconst visbility = css<{ hideOnMobile?: boolean; hideOnDesktop?: boolean }>`\n ${({ hideOnMobile }) =>\n hideOnMobile &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n `}\n\n ${({ hideOnDesktop }) =>\n hideOnDesktop &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_UP} {\n display: none;\n }\n `}\n`;\n\n// #############################################################################\n// MenuButton\n// #############################################################################\nexport const MenuButtonWrap = styled.div<VisibilityProps>`\n display: flex;\n align-items: center;\n\n ${visbility}\n`;\n\nexport const MenuButtonLink = styled.a<{ motif: Motif; secondary?: boolean }>`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n border-radius: 4px;\n font-size: 13px;\n line-height: 1;\n letter-spacing: -0.02em;\n\n transition: background-color 0.3s ease 0s;\n\n ${({ motif }) => {\n switch (motif) {\n case \"dark\":\n return css`\n color: ${theme.colors.white};\n background-color: #005ed9;\n\n &:focus,\n &:hover {\n color: ${theme.colors.white};\n background-color: #004cad;\n }\n `;\n case \"light\":\n default:\n return css`\n color: ${theme.colors.white};\n background-color: ${theme.colors.primaryBlue};\n\n &:focus,\n &:hover {\n color: ${theme.colors.white};\n background-color: ${theme.colors.dodgerblue};\n }\n `;\n }\n }}\n\n ${({ secondary, motif }) =>\n secondary &&\n css`\n border: 1px solid #595959;\n background-color: transparent;\n\n ${motif === \"light\" &&\n css`\n color: ${theme.colors.menu.text.light};\n\n &:focus,\n &:hover {\n color: ${theme.colors.primaryBlue};\n }\n `}\n\n &:focus,\n &:hover {\n background-color: transparent;\n border-color: ${theme.colors.primaryBlue};\n }\n `}\n`;\n\n// #############################################################################\n// MenuItem\n// #############################################################################\n\nexport const TextWrap = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n height: 100%;\n`;\n\nexport const Text = styled.span`\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n transition: color 0.2s linear;\n font-size: ${theme.font.size13};\n line-height: ${theme.lineHeight.header};\n`;\n\nexport const Arrow = styled.div<{\n motif: Motif;\n}>`\n border: 3px solid transparent;\n border-bottom: none;\n border-top: 5px solid currentcolor;\n transition: color 0.2s linear;\n`;\n\nexport const ArrowIconWrap = styled.div<{ $flip?: boolean }>`\n position: absolute;\n top: 50%;\n left: 100%;\n transform: translateY(-50%);\n display: flex;\n margin: 1px 0 0 4px;\n\n ${({ $flip }) =>\n $flip &&\n css`\n margin-top: 0;\n\n ${Arrow} {\n transform: rotate(180deg);\n }\n `}\n`;\n\nexport const Button = styled(ButtonBase)<\n {\n motif: Motif;\n $minWidth?: number;\n $active?: boolean;\n $showArrow?: boolean;\n } & VisibilityProps\n>`\n display: flex;\n border: none;\n background: none;\n align-items: center;\n justify-content: center;\n outline: none;\n white-space: nowrap;\n height: 100%;\n cursor: pointer;\n padding: 0;\n color: ${({ motif }) => theme.colors.menu.text[motif]};\n position: relative;\n\n :hover,\n :focus {\n ${Text},\n ${ArrowIconWrap} {\n color: ${({ motif }) => theme.colors.menu.active[motif]};\n }\n }\n\n ${({ $showArrow }) =>\n $showArrow &&\n css`\n margin-right: 5px;\n `}\n\n ${({ $minWidth }) =>\n $minWidth != null &&\n css`\n min-width: ${$minWidth}px;\n `};\n\n ${({ $active, motif }) =>\n $active &&\n css`\n ${Text} {\n color: ${theme.colors.menu.active[motif]};\n }\n\n ${ArrowIconWrap} {\n color: ${theme.colors.menu.active[motif]};\n }\n `}\n\n ${visbility}\n`;\n"],"names":["visbility","css","hideOnMobile","BREAKPOINTS","TOP_NAV_MOBILE_AND_DOWN","hideOnDesktop","TOP_NAV_MOBILE_UP","MenuButtonWrap","styled","div","MenuButtonLink","a","motif","theme","colors","white","primaryBlue","dodgerblue","secondary","menu","text","light","TextWrap","Text","span","font","size13","lineHeight","header","Arrow","ArrowIconWrap","$flip","Button","ButtonBase","active","$showArrow","$minWidth","$active"],"mappings":"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"}
|
|
@@ -100,13 +100,13 @@ const TextWrap = styled.div`
|
|
|
100
100
|
position: relative;
|
|
101
101
|
height: 100%;
|
|
102
102
|
`;
|
|
103
|
-
const Text = styled.
|
|
103
|
+
const Text = styled.span`
|
|
104
104
|
white-space: nowrap;
|
|
105
105
|
text-overflow: ellipsis;
|
|
106
106
|
overflow: hidden;
|
|
107
107
|
transition: color 0.2s linear;
|
|
108
|
-
font-size:
|
|
109
|
-
line-height: ${
|
|
108
|
+
font-size: ${theme.font.size13};
|
|
109
|
+
line-height: ${theme.lineHeight.header};
|
|
110
110
|
`;
|
|
111
111
|
const Arrow = styled.div`
|
|
112
112
|
border: 3px solid transparent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.styles.mjs","sources":["../../../../src/components/Header/MenuItem/MenuItem.styles.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport styled, { css } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../../constants/layout\";\nimport { theme } from \"../../../constants/theme\";\nimport { Button as ButtonBase } from \"../../Button\";\n\n// #############################################################################\n// Shared\n// #############################################################################\ntype VisibilityProps = { hideOnMobile?: boolean; hideOnDesktop?: boolean };\n\nconst visbility = css<{ hideOnMobile?: boolean; hideOnDesktop?: boolean }>`\n ${({ hideOnMobile }) =>\n hideOnMobile &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n `}\n\n ${({ hideOnDesktop }) =>\n hideOnDesktop &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_UP} {\n display: none;\n }\n `}\n`;\n\n// #############################################################################\n// MenuButton\n// #############################################################################\nexport const MenuButtonWrap = styled.div<VisibilityProps>`\n display: flex;\n align-items: center;\n\n ${visbility}\n`;\n\nexport const MenuButtonLink = styled.a<{ motif: Motif; secondary?: boolean }>`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n border-radius: 4px;\n font-size: 13px;\n line-height: 1;\n letter-spacing: -0.02em;\n\n transition: background-color 0.3s ease 0s;\n\n ${({ motif }) => {\n switch (motif) {\n case \"dark\":\n return css`\n color: ${theme.colors.white};\n background-color: #005ed9;\n\n &:focus,\n &:hover {\n color: ${theme.colors.white};\n background-color: #004cad;\n }\n `;\n case \"light\":\n default:\n return css`\n color: ${theme.colors.white};\n background-color: ${theme.colors.primaryBlue};\n\n &:focus,\n &:hover {\n color: ${theme.colors.white};\n background-color: ${theme.colors.dodgerblue};\n }\n `;\n }\n }}\n\n ${({ secondary, motif }) =>\n secondary &&\n css`\n border: 1px solid #595959;\n background-color: transparent;\n\n ${motif === \"light\" &&\n css`\n color: ${theme.colors.menu.text.light};\n\n &:focus,\n &:hover {\n color: ${theme.colors.primaryBlue};\n }\n `}\n\n &:focus,\n &:hover {\n background-color: transparent;\n border-color: ${theme.colors.primaryBlue};\n }\n `}\n`;\n\n// #############################################################################\n// MenuItem\n// #############################################################################\n\nexport const TextWrap = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n height: 100%;\n`;\n\nexport const Text = styled.
|
|
1
|
+
{"version":3,"file":"MenuItem.styles.mjs","sources":["../../../../src/components/Header/MenuItem/MenuItem.styles.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport styled, { css } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../../constants/layout\";\nimport { theme } from \"../../../constants/theme\";\nimport { Button as ButtonBase } from \"../../Button\";\n\n// #############################################################################\n// Shared\n// #############################################################################\ntype VisibilityProps = { hideOnMobile?: boolean; hideOnDesktop?: boolean };\n\nconst visbility = css<{ hideOnMobile?: boolean; hideOnDesktop?: boolean }>`\n ${({ hideOnMobile }) =>\n hideOnMobile &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n `}\n\n ${({ hideOnDesktop }) =>\n hideOnDesktop &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_UP} {\n display: none;\n }\n `}\n`;\n\n// #############################################################################\n// MenuButton\n// #############################################################################\nexport const MenuButtonWrap = styled.div<VisibilityProps>`\n display: flex;\n align-items: center;\n\n ${visbility}\n`;\n\nexport const MenuButtonLink = styled.a<{ motif: Motif; secondary?: boolean }>`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n border-radius: 4px;\n font-size: 13px;\n line-height: 1;\n letter-spacing: -0.02em;\n\n transition: background-color 0.3s ease 0s;\n\n ${({ motif }) => {\n switch (motif) {\n case \"dark\":\n return css`\n color: ${theme.colors.white};\n background-color: #005ed9;\n\n &:focus,\n &:hover {\n color: ${theme.colors.white};\n background-color: #004cad;\n }\n `;\n case \"light\":\n default:\n return css`\n color: ${theme.colors.white};\n background-color: ${theme.colors.primaryBlue};\n\n &:focus,\n &:hover {\n color: ${theme.colors.white};\n background-color: ${theme.colors.dodgerblue};\n }\n `;\n }\n }}\n\n ${({ secondary, motif }) =>\n secondary &&\n css`\n border: 1px solid #595959;\n background-color: transparent;\n\n ${motif === \"light\" &&\n css`\n color: ${theme.colors.menu.text.light};\n\n &:focus,\n &:hover {\n color: ${theme.colors.primaryBlue};\n }\n `}\n\n &:focus,\n &:hover {\n background-color: transparent;\n border-color: ${theme.colors.primaryBlue};\n }\n `}\n`;\n\n// #############################################################################\n// MenuItem\n// #############################################################################\n\nexport const TextWrap = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n height: 100%;\n`;\n\nexport const Text = styled.span`\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n transition: color 0.2s linear;\n font-size: ${theme.font.size13};\n line-height: ${theme.lineHeight.header};\n`;\n\nexport const Arrow = styled.div<{\n motif: Motif;\n}>`\n border: 3px solid transparent;\n border-bottom: none;\n border-top: 5px solid currentcolor;\n transition: color 0.2s linear;\n`;\n\nexport const ArrowIconWrap = styled.div<{ $flip?: boolean }>`\n position: absolute;\n top: 50%;\n left: 100%;\n transform: translateY(-50%);\n display: flex;\n margin: 1px 0 0 4px;\n\n ${({ $flip }) =>\n $flip &&\n css`\n margin-top: 0;\n\n ${Arrow} {\n transform: rotate(180deg);\n }\n `}\n`;\n\nexport const Button = styled(ButtonBase)<\n {\n motif: Motif;\n $minWidth?: number;\n $active?: boolean;\n $showArrow?: boolean;\n } & VisibilityProps\n>`\n display: flex;\n border: none;\n background: none;\n align-items: center;\n justify-content: center;\n outline: none;\n white-space: nowrap;\n height: 100%;\n cursor: pointer;\n padding: 0;\n color: ${({ motif }) => theme.colors.menu.text[motif]};\n position: relative;\n\n :hover,\n :focus {\n ${Text},\n ${ArrowIconWrap} {\n color: ${({ motif }) => theme.colors.menu.active[motif]};\n }\n }\n\n ${({ $showArrow }) =>\n $showArrow &&\n css`\n margin-right: 5px;\n `}\n\n ${({ $minWidth }) =>\n $minWidth != null &&\n css`\n min-width: ${$minWidth}px;\n `};\n\n ${({ $active, motif }) =>\n $active &&\n css`\n ${Text} {\n color: ${theme.colors.menu.active[motif]};\n }\n\n ${ArrowIconWrap} {\n color: ${theme.colors.menu.active[motif]};\n }\n `}\n\n ${visbility}\n`;\n"],"names":["visbility","css","hideOnMobile","BREAKPOINTS","TOP_NAV_MOBILE_AND_DOWN","hideOnDesktop","TOP_NAV_MOBILE_UP","MenuButtonWrap","styled","div","MenuButtonLink","a","motif","theme","colors","white","primaryBlue","dodgerblue","secondary","menu","text","light","TextWrap","Text","span","font","size13","lineHeight","header","Arrow","ArrowIconWrap","$flip","Button","ButtonBase","active","$showArrow","$minWidth","$active"],"mappings":"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"}
|
|
@@ -12,7 +12,7 @@ export declare const Wrap: import("styled-components").StyledComponent<"div", im
|
|
|
12
12
|
slideInView?: boolean;
|
|
13
13
|
noTransition?: boolean;
|
|
14
14
|
}, never>;
|
|
15
|
-
export declare const Container: import("styled-components").StyledComponent<import("react").
|
|
15
|
+
export declare const Container: import("styled-components").StyledComponent<import("react").NamedExoticComponent<import("../../../Container/Container.types").ContainerProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
16
16
|
export declare const PrimaryList: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {}, never>;
|
|
17
17
|
export declare const Button: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../Button/Button.types").ButtonProps & {
|
|
18
18
|
children?: import("react").ReactNode;
|
|
@@ -4,7 +4,7 @@ export declare const SECTION_SEARCH_RESULTS_ITEM_HEIGHT = 76;
|
|
|
4
4
|
export declare const SECTION_ITEM_IMAGE_SIZE = 56;
|
|
5
5
|
export declare const SECTION_ITEM_IMAGE_MARGIN = 10;
|
|
6
6
|
export declare const IOS_GHOST_MENU_HEIGHT = 69;
|
|
7
|
-
export declare const Container: import("styled-components").StyledComponent<import("react").
|
|
7
|
+
export declare const Container: import("styled-components").StyledComponent<import("react").NamedExoticComponent<import("../../../Container/Container.types").ContainerProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
8
8
|
export declare const SearchTextDot: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
9
9
|
export declare const Wrap: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
10
10
|
motif: Motif;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { NavigationProMobileMenuProps } from "./ProMobileMenu.types";
|
|
2
|
-
export declare const NavigationProMobileMenu: ({ translations, onClose, currentCountryName, handleStorePickerClick, handleOrderHistoryClick, handlePurchaseHistoryClick, handleProductLineChange, productLineValue, productLineOptions,
|
|
2
|
+
export declare const NavigationProMobileMenu: ({ translations, onClose, currentCountryName, handleStorePickerClick, handleOrderHistoryClick, handlePurchaseHistoryClick, handleProductLineChange, productLineValue, productLineOptions, extraSectionItems, }: NavigationProMobileMenuProps) => JSX.Element;
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var react = require('react');
|
|
5
|
+
require('../../../../assets/icons/menu/icon-globe.svg.js');
|
|
5
6
|
require('../../../../assets/icons/menu/icon-history.svg.js');
|
|
6
|
-
require('../../../../assets/icons/menu/icon-location-pin.svg.js');
|
|
7
7
|
require('../../../../constants/icons/index.js');
|
|
8
8
|
require('../../../../contexts/MenuContext/index.js');
|
|
9
|
-
var asset = require('../../../../utils/asset.js');
|
|
10
|
-
var typeGuards = require('../../../../utils/typeGuards.js');
|
|
11
9
|
var useFooterContent = require('../../../Footer/hooks/useFooterContent.js');
|
|
12
10
|
require('../../../StyleableSvgImage/index.js');
|
|
13
11
|
var mapping = require('../../LinksModal/mapping.js');
|
|
@@ -15,7 +13,7 @@ var MobileMenu_styles = require('../MobileMenu/MobileMenu.styles.js');
|
|
|
15
13
|
var ProMobileMenu_styles = require('./ProMobileMenu.styles.js');
|
|
16
14
|
var context = require('../../../../contexts/MenuContext/context.js');
|
|
17
15
|
var HistoryIcon = require("../../../../assets/icon-history.svg");
|
|
18
|
-
var
|
|
16
|
+
var GlobeIcon = require("../../../../assets/globe.svg");
|
|
19
17
|
var StyleableSvgImage = require('../../../StyleableSvgImage/StyleableSvgImage.js');
|
|
20
18
|
var _externalAssets_BAXELvSy = require("../../../../assets/collapseArrow.svg");
|
|
21
19
|
function _interopDefault(e) {
|
|
@@ -24,10 +22,9 @@ function _interopDefault(e) {
|
|
|
24
22
|
};
|
|
25
23
|
}
|
|
26
24
|
var HistoryIcon__default = /*#__PURE__*/_interopDefault(HistoryIcon);
|
|
27
|
-
var
|
|
25
|
+
var GlobeIcon__default = /*#__PURE__*/_interopDefault(GlobeIcon);
|
|
28
26
|
var _externalAssets_BAXELvSy__default = /*#__PURE__*/_interopDefault(_externalAssets_BAXELvSy);
|
|
29
27
|
"use strict";
|
|
30
|
-
const motif = "light";
|
|
31
28
|
const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
32
29
|
translations,
|
|
33
30
|
onClose,
|
|
@@ -39,9 +36,9 @@ const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
|
39
36
|
handleProductLineChange,
|
|
40
37
|
productLineValue,
|
|
41
38
|
productLineOptions,
|
|
42
|
-
|
|
43
|
-
hideExtraSection
|
|
39
|
+
extraSectionItems
|
|
44
40
|
}) {
|
|
41
|
+
const motif = "light";
|
|
45
42
|
const {
|
|
46
43
|
footerContent,
|
|
47
44
|
socialContent
|
|
@@ -54,100 +51,111 @@ const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
|
54
51
|
setExpandedSectionItemId(expandedSectionItemId === itemId ? null : itemId);
|
|
55
52
|
}, [expandedSectionItemId]);
|
|
56
53
|
const sections = react.useMemo(() => {
|
|
57
|
-
const
|
|
58
|
-
id: "support",
|
|
59
|
-
label: translations.support,
|
|
60
|
-
url: null,
|
|
61
|
-
subItems: mapping.getSupportLinkMapping(context$1).map(item => ({
|
|
62
|
-
id: item.id,
|
|
63
|
-
label: item.name,
|
|
64
|
-
url: item.url
|
|
65
|
-
}))
|
|
66
|
-
}, {
|
|
67
|
-
id: "social",
|
|
68
|
-
label: translations.social,
|
|
69
|
-
url: null,
|
|
70
|
-
subItems: socialContent.items.map(item => ({
|
|
71
|
-
id: item.id,
|
|
72
|
-
label: item.label,
|
|
73
|
-
url: item.src
|
|
74
|
-
}))
|
|
75
|
-
}, ...[{
|
|
76
|
-
key: "company",
|
|
77
|
-
label: translations.company
|
|
78
|
-
}, {
|
|
79
|
-
key: "training",
|
|
80
|
-
label: translations.training
|
|
81
|
-
}, {
|
|
82
|
-
key: "tools",
|
|
83
|
-
label: translations.tools
|
|
84
|
-
}].map(({
|
|
85
|
-
key,
|
|
86
|
-
label
|
|
87
|
-
}) => ({
|
|
88
|
-
id: key,
|
|
89
|
-
label,
|
|
90
|
-
url: null,
|
|
91
|
-
subItems: footerContent[key].items.map(item => ({
|
|
92
|
-
id: item.id,
|
|
93
|
-
label: item.label,
|
|
94
|
-
url: item.src
|
|
95
|
-
}))
|
|
96
|
-
}))];
|
|
97
|
-
return [{
|
|
54
|
+
const _sections = [{
|
|
98
55
|
id: "store-link-stuff",
|
|
99
|
-
items: [handleOrderHistoryClick ? {
|
|
56
|
+
items: [...(handleOrderHistoryClick ? [{
|
|
100
57
|
id: "order-history",
|
|
101
58
|
label: translations.orderHistory,
|
|
102
59
|
icon: {
|
|
103
|
-
src:
|
|
60
|
+
src: typeof HistoryIcon__default["default"] === "string" ? HistoryIcon__default["default"] : HistoryIcon__default["default"].src,
|
|
104
61
|
width: 16,
|
|
105
62
|
height: 16
|
|
106
63
|
},
|
|
107
|
-
url:
|
|
108
|
-
onClick: () => {
|
|
64
|
+
url: () => {
|
|
109
65
|
handleOrderHistoryClick?.();
|
|
110
66
|
},
|
|
111
67
|
subItems: []
|
|
112
|
-
} :
|
|
68
|
+
}] : []), ...(handlePurchaseHistoryClick ? [{
|
|
113
69
|
id: "purchased-product-history",
|
|
114
70
|
label: translations.purchasedProductHistory,
|
|
115
71
|
icon: {
|
|
116
|
-
src:
|
|
72
|
+
src: typeof HistoryIcon__default["default"] === "string" ? HistoryIcon__default["default"] : HistoryIcon__default["default"].src,
|
|
117
73
|
width: 16,
|
|
118
74
|
height: 16
|
|
119
75
|
},
|
|
120
|
-
url:
|
|
121
|
-
onClick: () => {
|
|
76
|
+
url: () => {
|
|
122
77
|
handlePurchaseHistoryClick?.();
|
|
123
78
|
},
|
|
124
79
|
subItems: []
|
|
125
|
-
} :
|
|
80
|
+
}] : [])
|
|
81
|
+
/**
|
|
82
|
+
* NOTE: Disabled per Kaspars request (09.06.)
|
|
83
|
+
* @see https://ui.slack.com/archives/C050CTJSE80/p1686331781297389
|
|
84
|
+
*/
|
|
85
|
+
// {
|
|
86
|
+
// id: "early-access",
|
|
87
|
+
// label: translations.earlyAccess,
|
|
88
|
+
// icon: {
|
|
89
|
+
// src: typeof EAIcon === "string" ? EAIcon : EAIcon.src,
|
|
90
|
+
// width: 20,
|
|
91
|
+
// height: 16,
|
|
92
|
+
// },
|
|
93
|
+
// url: () => {
|
|
94
|
+
// handleEarlyAccessClick?.();
|
|
95
|
+
// },
|
|
96
|
+
// subItems: [],
|
|
97
|
+
// },
|
|
98
|
+
]
|
|
126
99
|
}, {
|
|
127
|
-
id: "
|
|
128
|
-
items:
|
|
100
|
+
id: "extra",
|
|
101
|
+
items: extraSectionItems ?? [{
|
|
102
|
+
id: "support",
|
|
103
|
+
label: translations.support,
|
|
104
|
+
url: null,
|
|
105
|
+
subItems: mapping.getSupportLinkMapping(context$1).map(item => ({
|
|
106
|
+
id: item.id,
|
|
107
|
+
label: item.name,
|
|
108
|
+
url: item.url
|
|
109
|
+
}))
|
|
110
|
+
}, {
|
|
111
|
+
id: "social",
|
|
112
|
+
label: translations.social,
|
|
113
|
+
url: null,
|
|
114
|
+
subItems: socialContent.items.map(item => ({
|
|
115
|
+
id: item.id,
|
|
116
|
+
label: item.label,
|
|
117
|
+
url: item.src
|
|
118
|
+
}))
|
|
119
|
+
}, ...[{
|
|
120
|
+
key: "company",
|
|
121
|
+
label: translations.company
|
|
122
|
+
}, {
|
|
123
|
+
key: "training",
|
|
124
|
+
label: translations.training
|
|
125
|
+
}, {
|
|
126
|
+
key: "tools",
|
|
127
|
+
label: translations.tools
|
|
128
|
+
}].map(({
|
|
129
|
+
key,
|
|
130
|
+
label
|
|
131
|
+
}) => ({
|
|
132
|
+
id: key,
|
|
133
|
+
label,
|
|
134
|
+
url: null,
|
|
135
|
+
subItems: footerContent[key].items.map(item => ({
|
|
136
|
+
id: item.id,
|
|
137
|
+
label: item.label,
|
|
138
|
+
url: item.src
|
|
139
|
+
}))
|
|
140
|
+
}))]
|
|
129
141
|
}, currentCountryName ? {
|
|
130
142
|
id: "country-selector",
|
|
131
143
|
items: [{
|
|
132
144
|
id: "current-country-name",
|
|
133
|
-
label:
|
|
134
|
-
value: currentCountryName,
|
|
145
|
+
label: currentCountryName,
|
|
135
146
|
icon: {
|
|
136
|
-
src:
|
|
147
|
+
src: typeof GlobeIcon__default["default"] === "string" ? GlobeIcon__default["default"] : GlobeIcon__default["default"].src,
|
|
137
148
|
width: 17,
|
|
138
149
|
height: 17
|
|
139
150
|
},
|
|
140
|
-
url:
|
|
141
|
-
onClick: () => {
|
|
151
|
+
url: () => {
|
|
142
152
|
handleStorePickerClick?.();
|
|
143
153
|
},
|
|
144
154
|
subItems: []
|
|
145
155
|
}]
|
|
146
|
-
} : null
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
})) : [])].filter(typeGuards.isNonNullish);
|
|
150
|
-
}, [translations.support, translations.social, translations.company, translations.training, translations.tools, translations.orderHistory, translations.purchasedProductHistory, translations.region, context$1, socialContent.items, handleOrderHistoryClick, handlePurchaseHistoryClick, categories.items, currentCountryName, handleStorePickerClick, hideExtraSection, footerContent]);
|
|
156
|
+
} : null];
|
|
157
|
+
return _sections.filter(el => !!el);
|
|
158
|
+
}, [context$1, currentCountryName, extraSectionItems, footerContent, handleOrderHistoryClick, handlePurchaseHistoryClick, handleStorePickerClick, socialContent.items, translations.company, translations.orderHistory, translations.purchasedProductHistory, translations.social, translations.support, translations.tools, translations.training]);
|
|
151
159
|
const renderSectionItemIcon = react.useCallback(item => {
|
|
152
160
|
return item.icon && /* @__PURE__ */jsxRuntime.jsx(ProMobileMenu_styles.SectionItemIcon, {
|
|
153
161
|
children: /* @__PURE__ */jsxRuntime.jsx(StyleableSvgImage.StyleableSvgImage, {
|
|
@@ -162,40 +170,35 @@ const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
|
162
170
|
const NewLabelNode = "isNew" in item && item.isNew ? /* @__PURE__ */jsxRuntime.jsx(MobileMenu_styles.NewLabel, {
|
|
163
171
|
children: translations.new
|
|
164
172
|
}) : null;
|
|
165
|
-
const ValueNode = !!item.value && /* @__PURE__ */jsxRuntime.jsx("div", {
|
|
166
|
-
children: item.value
|
|
167
|
-
});
|
|
168
173
|
const target = "targetBlank" in item && item.targetBlank ? "_blank" : void 0;
|
|
169
174
|
const url = item.url;
|
|
170
175
|
if (!url) {
|
|
171
|
-
return /* @__PURE__ */jsxRuntime.jsxs(
|
|
176
|
+
return /* @__PURE__ */jsxRuntime.jsxs(MobileMenu_styles.SectionItemButton, {
|
|
172
177
|
motif,
|
|
173
|
-
onClick:
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
onClick: () => toggleExpandedSectionItemId(item.id),
|
|
179
|
+
children: [IconNode, item.label]
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
if (typeof url === "string") {
|
|
183
|
+
return /* @__PURE__ */jsxRuntime.jsxs(MobileMenu_styles.SectionItemButton, {
|
|
184
|
+
motif,
|
|
185
|
+
as: "a",
|
|
186
|
+
href: url,
|
|
187
|
+
onClick: onClose,
|
|
188
|
+
target,
|
|
189
|
+
children: [IconNode, item.label, NewLabelNode]
|
|
180
190
|
});
|
|
181
191
|
}
|
|
182
192
|
return /* @__PURE__ */jsxRuntime.jsxs(MobileMenu_styles.SectionItemButton, {
|
|
183
193
|
motif,
|
|
184
|
-
onClick:
|
|
185
|
-
|
|
194
|
+
onClick: () => {
|
|
195
|
+
url();
|
|
186
196
|
onClose();
|
|
187
197
|
},
|
|
188
|
-
|
|
189
|
-
as: "a",
|
|
190
|
-
href: url,
|
|
191
|
-
target
|
|
192
|
-
} : {}),
|
|
193
|
-
children: [/* @__PURE__ */jsxRuntime.jsxs(ProMobileMenu_styles.ButtonContent, {
|
|
194
|
-
children: [IconNode, item.label, NewLabelNode]
|
|
195
|
-
}), ValueNode]
|
|
198
|
+
children: [IconNode, item.label]
|
|
196
199
|
});
|
|
197
200
|
}, [onClose, renderSectionItemIcon, toggleExpandedSectionItemId, translations.new]);
|
|
198
|
-
return /* @__PURE__ */jsxRuntime.jsx(
|
|
201
|
+
return /* @__PURE__ */jsxRuntime.jsx(MobileMenu_styles.Wrap, {
|
|
199
202
|
motif,
|
|
200
203
|
children: /* @__PURE__ */jsxRuntime.jsx(MobileMenu_styles.Container, {
|
|
201
204
|
size: "mobile",
|