@ubnt/store.core 9.40.0-beta.1 → 9.40.0-new-design
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 +43 -338
- package/lib/_virtual/_virtual_multi-entry.js +2 -15
- package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
- package/lib/_virtual/_virtual_multi-entry.mjs +0 -2
- package/lib/_virtual/_virtual_multi-entry.mjs.map +1 -1
- package/lib/apis/smartcat.js.map +1 -1
- package/lib/apis/smartcat.mjs.map +1 -1
- package/lib/assets/attention.svg +5 -5
- package/lib/assets/attention2.svg +5 -5
- package/lib/assets/close2.svg +3 -2
- package/lib/assets/close3.svg +2 -3
- package/lib/assets/icon-location-pin.svg +5 -0
- package/lib/{components/ModelCompareV3/assets/crestron.svg.js → assets/icons/menu/icon-location-pin.svg.js} +6 -6
- package/lib/assets/icons/menu/icon-location-pin.svg.js.map +1 -0
- package/lib/assets/icons/menu/icon-location-pin.svg.mjs +3 -0
- package/lib/assets/icons/menu/icon-location-pin.svg.mjs.map +1 -0
- package/lib/assets/logoUnifi.svg +10 -2
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/Accordion/Accordion.mjs.map +1 -1
- package/lib/components/Accordion/Accordion.styles.js.map +1 -1
- package/lib/components/Accordion/Accordion.styles.mjs.map +1 -1
- package/lib/components/Avatar/Avatar.js.map +1 -1
- package/lib/components/Avatar/Avatar.mjs.map +1 -1
- package/lib/components/Banner/Banner.styles.js.map +1 -1
- package/lib/components/Banner/Banner.styles.mjs.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.js.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.mjs.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.styles.js.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.styles.mjs.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.js.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.mjs.map +1 -1
- package/lib/components/CardSection/CardSection.styles.d.ts +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.d.ts +4 -2
- package/lib/components/CategoryTabs/CategoryTabs.styles.js +8 -5
- package/lib/components/CategoryTabs/CategoryTabs.styles.js.map +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs +7 -6
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs.map +1 -1
- package/lib/components/CloserLookSection/CloserLookSection.js.map +1 -1
- package/lib/components/CloserLookSection/CloserLookSection.mjs.map +1 -1
- package/lib/components/CloserLookSection/CloserLookSection.styles.js.map +1 -1
- package/lib/components/CloserLookSection/CloserLookSection.styles.mjs.map +1 -1
- package/lib/components/Compare/Compare.styles.d.ts +5 -5
- package/lib/components/Container/Container.d.ts +1 -1
- package/lib/components/Container/Container.js +4 -3
- package/lib/components/Container/Container.js.map +1 -1
- package/lib/components/Container/Container.mjs +5 -4
- package/lib/components/Container/Container.mjs.map +1 -1
- package/lib/components/Container/Container.styles.js.map +1 -1
- package/lib/components/Container/Container.styles.mjs.map +1 -1
- package/lib/components/CustomImage/CustomImage.js +1 -1
- package/lib/components/CustomImage/CustomImage.js.map +1 -1
- package/lib/components/CustomImage/CustomImage.mjs +1 -1
- package/lib/components/CustomImage/CustomImage.mjs.map +1 -1
- package/lib/components/CustomImage/CustomImage.styles.js.map +1 -1
- package/lib/components/CustomImage/CustomImage.styles.mjs.map +1 -1
- package/lib/components/Explore/Explore.js.map +1 -1
- package/lib/components/Explore/Explore.mjs.map +1 -1
- package/lib/components/Explore/ExploreData.js.map +1 -1
- package/lib/components/Explore/ExploreData.mjs.map +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.js +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.js.map +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.mjs +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.mjs.map +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.styles.js.map +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.styles.mjs.map +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/close.svg.js +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/close.svg.mjs +2 -2
- package/lib/components/Footer/Footer.js +1 -1
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/Footer.mjs +1 -1
- package/lib/components/Footer/Footer.mjs.map +1 -1
- package/lib/components/Footer/Footer.styles.js.map +1 -1
- package/lib/components/Footer/Footer.styles.mjs.map +1 -1
- package/lib/components/Gallery/Gallery.js.map +1 -1
- package/lib/components/Gallery/Gallery.mjs.map +1 -1
- package/lib/components/Gallery/Gallery.styles.js.map +1 -1
- package/lib/components/Gallery/Gallery.styles.mjs.map +1 -1
- package/lib/components/Gallery/GalleryThumbnails/GalleryThumbnails.js.map +1 -1
- package/lib/components/Gallery/GalleryThumbnails/GalleryThumbnails.mjs.map +1 -1
- package/lib/components/Gallery/GalleryThumbnails/GalleryThumbnails.styles.js.map +1 -1
- package/lib/components/Gallery/GalleryThumbnails/GalleryThumbnails.styles.mjs.map +1 -1
- package/lib/components/GradientButton/GradientButton.styles.js.map +1 -1
- package/lib/components/GradientButton/GradientButton.styles.mjs.map +1 -1
- package/lib/components/GridGallery/GridGallery.js.map +1 -1
- package/lib/components/GridGallery/GridGallery.mjs.map +1 -1
- package/lib/components/Header/AccountFrame/AccountFrame.js.map +1 -1
- package/lib/components/Header/AccountFrame/AccountFrame.mjs.map +1 -1
- package/lib/components/Header/AccountFrame/AccountFrame.styles.js.map +1 -1
- package/lib/components/Header/AccountFrame/AccountFrame.styles.mjs.map +1 -1
- package/lib/components/Header/AccountMenu/AccountMenu.js +11 -1
- package/lib/components/Header/AccountMenu/AccountMenu.js.map +1 -1
- package/lib/components/Header/AccountMenu/AccountMenu.mjs +13 -3
- package/lib/components/Header/AccountMenu/AccountMenu.mjs.map +1 -1
- package/lib/components/Header/AccountMenu/megaphone.http.service.js.map +1 -1
- package/lib/components/Header/AccountMenu/megaphone.http.service.mjs.map +1 -1
- package/lib/components/Header/CartModalV2/Item/Item.js.map +1 -1
- package/lib/components/Header/CartModalV2/Item/Item.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 +7 -12
- package/lib/components/Header/Header.styles.js +10 -32
- package/lib/components/Header/Header.styles.js.map +1 -1
- package/lib/components/Header/Header.styles.mjs +10 -31
- package/lib/components/Header/Header.styles.mjs.map +1 -1
- package/lib/components/Header/Header.types.d.ts +29 -5
- package/lib/components/Header/Header.types.js +2 -1
- package/lib/components/Header/Header.types.js.map +1 -1
- package/lib/components/Header/Header.types.mjs +2 -1
- package/lib/components/Header/Header.types.mjs.map +1 -1
- package/lib/components/Header/IsolatedHeader.d.ts +1 -0
- package/lib/components/Header/IsolatedHeader.js +44 -44
- package/lib/components/Header/IsolatedHeader.js.map +1 -1
- package/lib/components/Header/IsolatedHeader.mjs +47 -46
- package/lib/components/Header/IsolatedHeader.mjs.map +1 -1
- package/lib/components/Header/LanguageFrame/LanguageFrame.js.map +1 -1
- package/lib/components/Header/LanguageFrame/LanguageFrame.mjs.map +1 -1
- package/lib/components/Header/LanguageFrame/LanguageFrame.styles.js.map +1 -1
- package/lib/components/Header/LanguageFrame/LanguageFrame.styles.mjs.map +1 -1
- package/lib/components/Header/LogoIcon/LogoIcon.d.ts +7 -0
- package/lib/components/Header/LogoIcon/LogoIcon.js +46 -0
- package/lib/components/Header/LogoIcon/LogoIcon.js.map +1 -0
- package/lib/components/Header/LogoIcon/LogoIcon.mjs +36 -0
- package/lib/components/Header/LogoIcon/LogoIcon.mjs.map +1 -0
- package/lib/components/Header/LogoIcon/index.d.ts +1 -0
- package/lib/components/Header/LogoIcon/index.js +6 -0
- package/lib/components/Header/LogoIcon/index.js.map +1 -0
- package/lib/components/Header/LogoIcon/index.mjs +3 -0
- package/lib/components/Header/LogoIcon/index.mjs.map +1 -0
- package/lib/components/Header/MenuItem/MenuItem.styles.d.ts +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.js +3 -3
- package/lib/components/Header/MenuItem/MenuItem.styles.js.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.mjs +3 -3
- package/lib/components/Header/MenuItem/MenuItem.styles.mjs.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.types.d.ts +1 -0
- package/lib/components/Header/Navigation/Carousel/Carousel.js.map +1 -1
- package/lib/components/Header/Navigation/Carousel/Carousel.mjs.map +1 -1
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.d.ts +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.d.ts +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.js.map +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.d.ts +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js +110 -103
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs +111 -104
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.d.ts +9 -0
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js +15 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs +13 -2
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.types.d.ts +12 -6
- package/lib/components/Header/ProHeader/ProHeader.d.ts +9 -5
- package/lib/components/Header/ProHeader/ProHeader.js +249 -168
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +250 -170
- package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +30 -25
- package/lib/components/Header/ProHeader/ProHeader.styles.js +119 -66
- package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs +112 -65
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
- package/lib/components/Header/translations/ar.json.js +4 -1
- package/lib/components/Header/translations/ar.json.js.map +1 -1
- package/lib/components/Header/translations/ar.json.mjs +4 -2
- package/lib/components/Header/translations/ar.json.mjs.map +1 -1
- package/lib/components/Header/translations/de.json.js +4 -1
- package/lib/components/Header/translations/de.json.js.map +1 -1
- package/lib/components/Header/translations/de.json.mjs +4 -2
- package/lib/components/Header/translations/de.json.mjs.map +1 -1
- package/lib/components/Header/translations/el.json.js +4 -1
- package/lib/components/Header/translations/el.json.js.map +1 -1
- package/lib/components/Header/translations/el.json.mjs +4 -2
- package/lib/components/Header/translations/el.json.mjs.map +1 -1
- package/lib/components/Header/translations/en.json.js +7 -1
- package/lib/components/Header/translations/en.json.js.map +1 -1
- package/lib/components/Header/translations/en.json.mjs +6 -2
- package/lib/components/Header/translations/en.json.mjs.map +1 -1
- package/lib/components/Header/translations/es.json.js +4 -1
- package/lib/components/Header/translations/es.json.js.map +1 -1
- package/lib/components/Header/translations/es.json.mjs +4 -2
- package/lib/components/Header/translations/es.json.mjs.map +1 -1
- package/lib/components/Header/translations/fr.json.js +4 -1
- package/lib/components/Header/translations/fr.json.js.map +1 -1
- package/lib/components/Header/translations/fr.json.mjs +4 -2
- package/lib/components/Header/translations/fr.json.mjs.map +1 -1
- package/lib/components/Header/translations/it.json.js +4 -1
- package/lib/components/Header/translations/it.json.js.map +1 -1
- package/lib/components/Header/translations/it.json.mjs +4 -2
- package/lib/components/Header/translations/it.json.mjs.map +1 -1
- package/lib/components/Header/translations/ja.json.js +4 -1
- package/lib/components/Header/translations/ja.json.js.map +1 -1
- package/lib/components/Header/translations/ja.json.mjs +4 -2
- package/lib/components/Header/translations/ja.json.mjs.map +1 -1
- package/lib/components/Header/translations/pt-BR.json.js +4 -1
- package/lib/components/Header/translations/pt-BR.json.js.map +1 -1
- package/lib/components/Header/translations/pt-BR.json.mjs +4 -2
- package/lib/components/Header/translations/pt-BR.json.mjs.map +1 -1
- package/lib/components/Header/translations/zh-Hans.json.js +4 -1
- package/lib/components/Header/translations/zh-Hans.json.js.map +1 -1
- package/lib/components/Header/translations/zh-Hans.json.mjs +4 -2
- package/lib/components/Header/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/components/Header/translations/zh-Hant-TW.json.js +4 -1
- package/lib/components/Header/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/components/Header/translations/zh-Hant-TW.json.mjs +4 -2
- package/lib/components/Header/translations/zh-Hant-TW.json.mjs.map +1 -1
- package/lib/components/Hero/Hero.js.map +1 -1
- package/lib/components/Hero/Hero.mjs.map +1 -1
- package/lib/components/Hero/Hero.styles.d.ts +2 -2
- package/lib/components/Hero/Hero.styles.js.map +1 -1
- package/lib/components/Hero/Hero.styles.mjs.map +1 -1
- package/lib/components/HeroFadeGallery/HeroFadeGallery.styles.d.ts +1 -1
- package/lib/components/HowToUseSection/HowToUseSection.styles.d.ts +2 -2
- package/lib/components/ImageCarousel/ImageCarousel.styles.js.map +1 -1
- package/lib/components/ImageCarousel/ImageCarousel.styles.mjs.map +1 -1
- package/lib/components/LandingPage/Cards/Card/Card.js.map +1 -1
- package/lib/components/LandingPage/Cards/Card/Card.mjs.map +1 -1
- package/lib/components/LandingPage/Cards/Cards.js.map +1 -1
- package/lib/components/LandingPage/Cards/Cards.mjs.map +1 -1
- package/lib/components/LandingPage/Cards/Cards.styles.js.map +1 -1
- package/lib/components/LandingPage/Cards/Cards.styles.mjs.map +1 -1
- package/lib/components/LandingPage/LandingPage.js.map +1 -1
- package/lib/components/LandingPage/LandingPage.mjs.map +1 -1
- package/lib/components/LandingPagePro/LandingPagePro.js.map +1 -1
- package/lib/components/LandingPagePro/LandingPagePro.mjs.map +1 -1
- package/lib/components/LandingPagePro/LandingPagePro.styles.d.ts +1 -1
- package/lib/components/LandingPageSearch/Modal/Modal.js.map +1 -1
- package/lib/components/LandingPageSearch/Modal/Modal.mjs.map +1 -1
- package/lib/components/LandingPageSidebar/LandingPageSidebar.js.map +1 -1
- package/lib/components/LandingPageSidebar/LandingPageSidebar.mjs.map +1 -1
- package/lib/components/LandingPageSidebar/LandingPageSidebar.styles.js.map +1 -1
- package/lib/components/LandingPageSidebar/LandingPageSidebar.styles.mjs.map +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/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.helpers.js.map +1 -1
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.helpers.mjs.map +1 -1
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.styles.d.ts +1 -1
- package/lib/components/MicrositeExploreCards/MicrositeExploreCards.styles.js.map +1 -1
- package/lib/components/MicrositeExploreCards/MicrositeExploreCards.styles.mjs.map +1 -1
- package/lib/components/MicrositeFeatureList/MicrositeFeatureList.styles.js.map +1 -1
- package/lib/components/MicrositeFeatureList/MicrositeFeatureList.styles.mjs.map +1 -1
- package/lib/components/MicrositeHero/MicrositeHero.js.map +1 -1
- package/lib/components/MicrositeHero/MicrositeHero.mjs.map +1 -1
- package/lib/components/MicrositeHero/MicrositeHero.styles.js.map +1 -1
- package/lib/components/MicrositeHero/MicrositeHero.styles.mjs.map +1 -1
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.styles.js.map +1 -1
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.styles.mjs.map +1 -1
- package/lib/components/MicrositeProductGrid/MicrositeProductGrid.styles.js.map +1 -1
- package/lib/components/MicrositeProductGrid/MicrositeProductGrid.styles.mjs.map +1 -1
- package/lib/components/MicrositeProductLearnMoreBlock/MicrositeProductLearnMoreBlockWrap.js.map +1 -1
- package/lib/components/MicrositeProductLearnMoreBlock/MicrositeProductLearnMoreBlockWrap.mjs.map +1 -1
- package/lib/components/MicrositeSectionWrap/MicrositeSectionWrap.styles.d.ts +1 -1
- package/lib/components/Microsites/MicrositeProductPage.js.map +1 -1
- package/lib/components/Microsites/MicrositeProductPage.mjs.map +1 -1
- package/lib/components/MobileModal/MobileModal.styles.js.map +1 -1
- package/lib/components/MobileModal/MobileModal.styles.mjs.map +1 -1
- package/lib/components/ModelCompareV3/HeaderShadow.js.map +1 -1
- package/lib/components/ModelCompareV3/HeaderShadow.mjs.map +1 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.js.map +1 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.mjs.map +1 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.styles.js.map +1 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.styles.mjs.map +1 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.types.d.ts +0 -1
- package/lib/components/ModelCompareV3/data/EnterpriseSwitching.js +2 -3
- package/lib/components/ModelCompareV3/data/EnterpriseSwitching.js.map +1 -1
- package/lib/components/ModelCompareV3/data/EnterpriseSwitching.mjs +2 -3
- package/lib/components/ModelCompareV3/data/EnterpriseSwitching.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/MegaCapacityWiFI.js +1 -1
- package/lib/components/ModelCompareV3/data/MegaCapacityWiFI.js.map +1 -1
- package/lib/components/ModelCompareV3/data/MegaCapacityWiFI.mjs +1 -1
- package/lib/components/ModelCompareV3/data/MegaCapacityWiFI.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/ProfessionalMaxSwitching.js +3 -10
- package/lib/components/ModelCompareV3/data/ProfessionalMaxSwitching.js.map +1 -1
- package/lib/components/ModelCompareV3/data/ProfessionalMaxSwitching.mjs +3 -10
- package/lib/components/ModelCompareV3/data/ProfessionalMaxSwitching.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/Switching.js +2 -3
- package/lib/components/ModelCompareV3/data/Switching.js.map +1 -1
- package/lib/components/ModelCompareV3/data/Switching.mjs +2 -3
- package/lib/components/ModelCompareV3/data/Switching.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/UispRouter.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/UispRouter.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/UispRouterPro.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/UispRouterPro.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/aggregation.js +0 -7
- package/lib/components/ModelCompareV3/data/products/aggregation.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/aggregation.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/aggregation.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/airFiber11.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/airFiber11.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/airFiber24.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/airFiber24.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/airFiber24HiDensity.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/airFiber24HiDensity.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/airFiber2X.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/airFiber2X.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/airFiber5.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/airFiber5.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/airMAX5GHz16dBi120Sector.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/airMAX5GHz16dBi120Sector.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/airMAX5GHz17dBi90Sector.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/airMAX5GHz17dBi90Sector.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/airMAX5GHz19dBi120Sector.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/airMAX5GHz19dBi120Sector.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/airMAX5GHz20dBi90Sector.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/airMAX5GHz20dBi90Sector.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/baseStationXG.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/baseStationXG.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/buildingBridge.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/buildingBridge.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/buildingBridgeXG.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/buildingBridgeXG.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.js +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/e7.js +1 -1
- package/lib/components/ModelCompareV3/data/products/e7.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/e7.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/e7.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/e7Campus.js +2 -2
- package/lib/components/ModelCompareV3/data/products/e7Campus.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/e7Campus.mjs +2 -2
- package/lib/components/ModelCompareV3/data/products/e7Campus.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgePointR6.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgePointR6.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgePointR8.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgePointR8.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgePointS16Switch.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgePointS16Switch.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeRouter10x.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeRouter10x.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeRouter12.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeRouter12.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeRouter12p.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeRouter12p.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeRouter4.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeRouter4.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeRouter6Poe.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeRouter6Poe.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeRouterInfinity.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeRouterInfinity.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeRouterX.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeRouterX.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeRouterXSfp.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeRouterXSfp.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch10x.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch10x.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch10xp.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch10xp.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch16xg.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch16xg.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch16xp.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch16xp.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch16xpoe150.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch16xpoe150.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch18x.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch18x.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch24lite.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch24lite.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch24poe-500.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch24poe-500.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch24poe.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch24poe.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch48lite.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch48lite.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch48poe.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeSwitch48poe.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeswitch48poe-750.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeswitch48poe-750.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeswitch5xp.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeswitch5xp.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeswitch8poe.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/edgeswitch8poe.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseAggregation.js +0 -7
- package/lib/components/ModelCompareV3/data/products/enterpriseAggregation.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseAggregation.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/enterpriseAggregation.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus24PoE.js +0 -7
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus24PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus24PoE.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus24PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus48PoE.js +0 -7
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus48PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus48PoE.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus48PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/fiberInstant.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/fiberInstant.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/fiberNanog.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/fiberNanog.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/highCapacityAggregation.js +0 -7
- package/lib/components/ModelCompareV3/data/products/highCapacityAggregation.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/highCapacityAggregation.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/highCapacityAggregation.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ltuExtremeRange.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ltuExtremeRange.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ltuLongRange.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ltuLongRange.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ltuPro.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ltuPro.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/missionCritical.js +0 -7
- package/lib/components/ModelCompareV3/data/products/missionCritical.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/missionCritical.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/missionCritical.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/nanoStation5AC.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/nanoStation5AC.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/nanoStation5ACLoco.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/nanoStation5ACLoco.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/prismStation5AC.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/prismStation5AC.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax16.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax16.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax16.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax16.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax16PoE.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax16PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax16PoE.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax16PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax24.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax24.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax24.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax24.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax24PoE.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax24PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax24PoE.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax24PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax48.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax48.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax48.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax48.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax48PoE.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax48PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax48PoE.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax48PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesEnterprise.js +0 -8
- package/lib/components/ModelCompareV3/data/products/switchesEnterprise.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesEnterprise.mjs +0 -8
- package/lib/components/ModelCompareV3/data/products/switchesEnterprise.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessional.js +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesProfessional.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessional.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesProfessional.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalMax.js +1 -10
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalMax.mjs +1 -10
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesStandard.js +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesStandard.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesStandard.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesStandard.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udb.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udb.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udbPro.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udbPro.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/uispSwitch.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/uispSwitch.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/properties/index.d.ts +0 -1
- package/lib/components/ModelCompareV3/data/properties/index.js +0 -2
- package/lib/components/ModelCompareV3/data/properties/index.js.map +1 -1
- package/lib/components/ModelCompareV3/data/properties/index.mjs +0 -1
- package/lib/components/ModelCompareV3/data/properties/index.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/en.json.js +0 -2
- package/lib/components/ModelCompareV3/translations/en.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/en.json.mjs +0 -2
- package/lib/components/ModelCompareV3/translations/en.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/useModelCompareTranslation.d.ts +2 -2
- package/lib/components/Pagination/Pagination.js.map +1 -1
- package/lib/components/Pagination/Pagination.mjs.map +1 -1
- package/lib/components/PriceRangeSlider/PriceRangeSlider.js.map +1 -1
- package/lib/components/PriceRangeSlider/PriceRangeSlider.mjs.map +1 -1
- package/lib/components/ProductCard/ProductCard.js.map +1 -1
- package/lib/components/ProductCard/ProductCard.mjs.map +1 -1
- package/lib/components/ProductCardPopup/ProductCardPopup.js.map +1 -1
- package/lib/components/ProductCardPopup/ProductCardPopup.mjs.map +1 -1
- package/lib/components/ProductGrid/ProductGrid.js.map +1 -1
- package/lib/components/ProductGrid/ProductGrid.mjs.map +1 -1
- package/lib/components/ProductSectionNavigation/ProductSectionNavigation.styles.d.ts +1 -1
- package/lib/components/ProductSectionNavigationV2/ProductSectionNavigation.styles.d.ts +1 -1
- package/lib/components/ProductSectionTabs/ProductSectionTabs.js.map +1 -1
- package/lib/components/ProductSectionTabs/ProductSectionTabs.mjs.map +1 -1
- package/lib/components/ProductTechSpecs/ProductTechSpecs.styles.d.ts +2 -2
- package/lib/components/ProductTechSpecs/ProductTechSpecs.styles.js.map +1 -1
- package/lib/components/ProductTechSpecs/ProductTechSpecs.styles.mjs.map +1 -1
- package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.js.map +1 -1
- package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.mjs.map +1 -1
- package/lib/components/RelatedProducts/RelatedProducts.js.map +1 -1
- package/lib/components/RelatedProducts/RelatedProducts.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/HddSlots/HddSlots.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/HddSlots/HddSlots.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/Layout.styles.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/Layout.styles.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerConfigurator.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerConfigurator.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/RecommendedPoeSwitches.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/RecommendedPoeSwitches.mjs.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.d.ts +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.js +16 -8
- package/lib/components/ScrollWrapper/ScrollWrapper.js.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.mjs +16 -8
- package/lib/components/ScrollWrapper/ScrollWrapper.mjs.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.styles.js.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.styles.mjs.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.types.d.ts +2 -0
- package/lib/components/Search/Input/Input.d.ts +1 -1
- package/lib/components/Search/Input/Input.js +4 -4
- package/lib/components/Search/Input/Input.js.map +1 -1
- package/lib/components/Search/Input/Input.mjs +4 -4
- package/lib/components/Search/Input/Input.mjs.map +1 -1
- package/lib/components/Search/Input/Input.styles.js +0 -1
- package/lib/components/Search/Input/Input.styles.js.map +1 -1
- package/lib/components/Search/Input/Input.styles.mjs +0 -1
- package/lib/components/Search/Input/Input.styles.mjs.map +1 -1
- package/lib/components/Search/Input/Input.types.d.ts +3 -2
- package/lib/components/Search/Modal/Modal.js.map +1 -1
- package/lib/components/Search/Modal/Modal.mjs.map +1 -1
- package/lib/components/SkeletonLoader/SkeletonLoaderTable/SkeletonLoaderTable.js.map +1 -1
- package/lib/components/SkeletonLoader/SkeletonLoaderTable/SkeletonLoaderTable.mjs.map +1 -1
- package/lib/components/StorageSliders/StorageSliders.utils.js.map +1 -1
- package/lib/components/StorageSliders/StorageSliders.utils.mjs.map +1 -1
- package/lib/components/StyleableSvgImage/StyleableSvgImage.js.map +1 -1
- package/lib/components/StyleableSvgImage/StyleableSvgImage.mjs.map +1 -1
- package/lib/components/VariantSelector/Variant/Compatibility/Compatibility.js.map +1 -1
- package/lib/components/VariantSelector/Variant/Compatibility/Compatibility.mjs.map +1 -1
- package/lib/components/VariantSelector/Variant/Compatibility/Compatibility.styles.js.map +1 -1
- package/lib/components/VariantSelector/Variant/Compatibility/Compatibility.styles.mjs.map +1 -1
- package/lib/components/VariantSelector/Variant/Variant.js.map +1 -1
- package/lib/components/VariantSelector/Variant/Variant.mjs.map +1 -1
- package/lib/components/VariantSelector/VariantSelector.constants.js.map +1 -1
- package/lib/components/VariantSelector/VariantSelector.constants.mjs.map +1 -1
- package/lib/components/VideoPlayerNew/VideoPlayer.js +1 -1
- package/lib/components/VideoPlayerNew/VideoPlayer.mjs +1 -1
- package/lib/components/VideoPlayerNew/assets/close.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/close.svg.mjs +2 -2
- package/lib/constants/layout.js.map +1 -1
- package/lib/constants/layout.mjs.map +1 -1
- package/lib/constants/postalCode.js.map +1 -1
- package/lib/constants/postalCode.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/filters.d.ts +16 -0
- package/lib/constants/proStoreCategories/mapping/filters.js +16 -0
- package/lib/constants/proStoreCategories/mapping/filters.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/filters.mjs +16 -0
- package/lib/constants/proStoreCategories/mapping/filters.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.d.ts +1 -1
- package/lib/constants/proStoreCategories/mapping/index.js +15 -11
- package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.mjs +15 -11
- package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/mapping.d.ts +5 -0
- package/lib/constants/proStoreCategories/mapping/uisp.d.ts +0 -1
- package/lib/constants/proStoreCategories/mapping/uisp.js +0 -1
- package/lib/constants/proStoreCategories/mapping/uisp.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/uisp.mjs +0 -1
- package/lib/constants/proStoreCategories/mapping/uisp.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.d.ts +1 -0
- package/lib/constants/proStoreCategories/mapping/unifi.js +1 -0
- package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.mjs +1 -0
- package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.js +2 -5
- package/lib/constants/proStoreCategories/translations/ar.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.mjs +3 -5
- package/lib/constants/proStoreCategories/translations/ar.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.js +2 -5
- package/lib/constants/proStoreCategories/translations/de.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.mjs +3 -5
- package/lib/constants/proStoreCategories/translations/de.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.js +3 -6
- package/lib/constants/proStoreCategories/translations/el.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.mjs +4 -6
- package/lib/constants/proStoreCategories/translations/el.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.js +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.js +2 -5
- package/lib/constants/proStoreCategories/translations/es.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.mjs +3 -5
- package/lib/constants/proStoreCategories/translations/es.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.js +2 -2
- package/lib/constants/proStoreCategories/translations/fr.json.mjs +2 -2
- package/lib/constants/proStoreCategories/translations/it.json.js +2 -5
- package/lib/constants/proStoreCategories/translations/it.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.mjs +3 -5
- package/lib/constants/proStoreCategories/translations/it.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.js +2 -5
- package/lib/constants/proStoreCategories/translations/ja.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.mjs +3 -5
- package/lib/constants/proStoreCategories/translations/ja.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js +2 -5
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs +3 -5
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +2 -2
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +2 -2
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +2 -2
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +2 -2
- package/lib/constants/proStoreFilters/mapping.d.ts +33 -7
- package/lib/constants/proStoreFilters/mapping.js +108 -14
- package/lib/constants/proStoreFilters/mapping.js.map +1 -1
- package/lib/constants/proStoreFilters/mapping.mjs +108 -14
- package/lib/constants/proStoreFilters/mapping.mjs.map +1 -1
- package/lib/constants/theme.js +4 -0
- package/lib/constants/theme.js.map +1 -1
- package/lib/constants/theme.mjs +4 -0
- package/lib/constants/theme.mjs.map +1 -1
- package/lib/contexts/MenuContext/context.js +1 -1
- package/lib/contexts/MenuContext/context.js.map +1 -1
- package/lib/contexts/MenuContext/context.mjs +1 -1
- package/lib/contexts/MenuContext/context.mjs.map +1 -1
- package/lib/contexts/MenuContext/mapping.js.map +1 -1
- package/lib/contexts/MenuContext/mapping.mjs.map +1 -1
- package/lib/contexts/MenuContext/utils.js.map +1 -1
- package/lib/contexts/MenuContext/utils.mjs.map +1 -1
- package/lib/helpers/index.d.ts +0 -1
- package/lib/helpers/index.js +0 -11
- package/lib/helpers/index.js.map +1 -1
- package/lib/helpers/index.mjs +0 -1
- package/lib/helpers/index.mjs.map +1 -1
- package/lib/helpers/time.js.map +1 -1
- package/lib/helpers/time.mjs.map +1 -1
- package/lib/helpers/ux.d.ts +9 -1
- package/lib/helpers/ux.js +15 -0
- package/lib/helpers/ux.js.map +1 -1
- package/lib/helpers/ux.mjs +15 -1
- package/lib/helpers/ux.mjs.map +1 -1
- package/lib/hooks/useTranslation.js.map +1 -1
- package/lib/hooks/useTranslation.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/address.d.ts +62 -278
- package/lib/utils/address.js +8 -11
- package/lib/utils/address.js.map +1 -1
- package/lib/utils/address.mjs +8 -11
- package/lib/utils/address.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/allocators/fixedAmount.js.map +1 -1
- package/lib/utils/money/allocators/fixedAmount.mjs.map +1 -1
- package/lib/utils/money/format.js +1 -2
- package/lib/utils/money/format.js.map +1 -1
- package/lib/utils/money/format.mjs +1 -2
- package/lib/utils/money/format.mjs.map +1 -1
- package/lib/utils/money/misc.js.map +1 -1
- package/lib/utils/money/misc.mjs.map +1 -1
- package/lib/utils/nextjs/createInlineScript.js.map +1 -1
- package/lib/utils/nextjs/createInlineScript.mjs.map +1 -1
- package/lib/utils/nextjs/index.d.ts +0 -3
- package/lib/utils/nextjs/index.js +0 -5
- package/lib/utils/nextjs/index.js.map +1 -1
- package/lib/utils/nextjs/index.mjs +0 -3
- package/lib/utils/nextjs/index.mjs.map +1 -1
- package/lib/utils/nextjs/stringifyForInject.js.map +1 -1
- package/lib/utils/nextjs/stringifyForInject.mjs.map +1 -1
- package/lib/utils/number.js.map +1 -1
- package/lib/utils/number.mjs.map +1 -1
- package/lib/utils/tax/brazil.js.map +1 -1
- package/lib/utils/tax/brazil.mjs.map +1 -1
- package/lib/utils/wattage.js.map +1 -1
- package/lib/utils/wattage.mjs.map +1 -1
- package/package.json +1 -3
- package/lib/assets/crestron.svg +0 -3
- package/lib/assets/icons/menu/icon-globe.svg.js +0 -27
- package/lib/assets/icons/menu/icon-globe.svg.js.map +0 -1
- package/lib/assets/icons/menu/icon-globe.svg.mjs +0 -3
- package/lib/assets/icons/menu/icon-globe.svg.mjs.map +0 -1
- package/lib/components/ModelCompareV3/assets/crestron.svg.js.map +0 -1
- package/lib/components/ModelCompareV3/assets/crestron.svg.mjs +0 -3
- package/lib/components/ModelCompareV3/assets/crestron.svg.mjs.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.d.ts +0 -2
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.js +0 -18
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.js.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.mjs +0 -10
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.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/helpers/product.test.d.ts +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/nextjs/patch.d.ts +0 -1
- package/lib/utils/nextjs/patch.js +0 -53
- package/lib/utils/nextjs/patch.js.map +0 -1
- package/lib/utils/nextjs/patch.mjs +0 -41
- package/lib/utils/nextjs/patch.mjs.map +0 -1
- package/lib/utils/nextjs/plugin.d.ts +0 -14
- package/lib/utils/nextjs/plugin.js +0 -41
- package/lib/utils/nextjs/plugin.js.map +0 -1
- package/lib/utils/nextjs/plugin.mjs +0 -39
- package/lib/utils/nextjs/plugin.mjs.map +0 -1
- package/lib/utils/nextjs/ssr/constants.d.ts +0 -8
- package/lib/utils/nextjs/ssr/constants.js +0 -8
- package/lib/utils/nextjs/ssr/constants.js.map +0 -1
- package/lib/utils/nextjs/ssr/constants.mjs +0 -6
- package/lib/utils/nextjs/ssr/constants.mjs.map +0 -1
- package/lib/utils/nextjs/ssr/registry.d.ts +0 -52
- package/lib/utils/nextjs/ssr/registry.js +0 -22
- package/lib/utils/nextjs/ssr/registry.js.map +0 -1
- package/lib/utils/nextjs/ssr/registry.mjs +0 -20
- package/lib/utils/nextjs/ssr/registry.mjs.map +0 -1
- package/lib/utils/nextjs/ssr/style-inject.d.ts +0 -21
- package/lib/utils/nextjs/ssr/style-inject.js +0 -47
- package/lib/utils/nextjs/ssr/style-inject.js.map +0 -1
- package/lib/utils/nextjs/ssr/style-inject.mjs +0 -43
- package/lib/utils/nextjs/ssr/style-inject.mjs.map +0 -1
- package/lib/utils/nextjs/ssr/transform-css-module.d.ts +0 -11
- package/lib/utils/nextjs/ssr/transform-css-module.js +0 -115
- package/lib/utils/nextjs/ssr/transform-css-module.js.map +0 -1
- package/lib/utils/nextjs/ssr/transform-css-module.mjs +0 -87
- package/lib/utils/nextjs/ssr/transform-css-module.mjs.map +0 -1
- package/lib/utils/nextjs/ssr/transform-css-module.test.d.ts +0 -1
- package/lib/utils/nextjs/ssr/types.d.ts +0 -10
- 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/utils/validations/lastNameSuperRefinement.d.ts +0 -11
- package/lib/utils/validations/lastNameSuperRefinement.js +0 -25
- package/lib/utils/validations/lastNameSuperRefinement.js.map +0 -1
- package/lib/utils/validations/lastNameSuperRefinement.mjs +0 -21
- package/lib/utils/validations/lastNameSuperRefinement.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postalCode.js","sources":["../../src/constants/postalCode.ts"],"sourcesContent":["import { CountryCode } from \"../types\";\n\n/**\n * A list of countries that don't use postal codes, this will make it o that we don't render the postal code input and\n * mark it nullable for those countries\n */\nexport const COUNTRIES_NO_POSTAL_CODE = [CountryCode.Ae];\n\ntype CountryPostalCodeObject = {\n [key in CountryCode]?: {\n regex: RegExp;\n /**\n * String that potentially could be used for postal code tooltips to show required format\n */\n requiredFormatString: string | undefined;\n /**\n * Used for postal code normalization where we can 100% now that we are\n * doing it right.\n *\n * For example we can safely normalize LV-1039 and LV1039 to 1039\n */\n normalize: ((postalCode: string) => string) | undefined;\n };\n};\n\n/**\n * Removes non numeric characters from string.\n * In case of \"LV-1039\"/\"LV1039\" => \"1039\".\n * This method is not intended to do more, in case of incorrect\n * \"LV-123456789\" result would be \"123456789\", as we can't normalize it to\n * first 4 numbers as it might be not what user intended.\n */\nconst normalizePostalCodeNumeric = (postalCode: string) =>\n postalCode.replace(/\\D/g, \"\").trim();\n\n/**\n * Removes any non alpha numeric values, including spaces and dashes.\n * Can be used with conjunction with normalizePostalCodeCharacterSeparator.\n * This method will normalize valid postcode: 9999-999 to 9999999.\n * In conjunction with normalizePostalCodeCharacterSeparator we can reliably\n * normalize back to 9999-999\n */\nconst normalizePostalCodeAlphaNumeric = (postalCode: string) =>\n postalCode.replace(/[^a-zA-Z\\d]+/g, \"\").trim();\n\nconst normalizePostalCodeUppercase = (postalCode: string) =>\n postalCode.toUpperCase().trim();\n\n/**\n * Adds character after specific position.\n * Used for inputs like \"IM51AG\" to normalize to \"IM5 1AG\"\n */\nconst normalizePostalCodeCharacterSeparator = (\n postalCode: string,\n position: number,\n character: string,\n) => {\n /**\n * Do not insert separator if position is over postalCode\n */\n if (position >= postalCode.length) {\n return postalCode;\n }\n\n return (\n postalCode.slice(0, position) +\n character +\n postalCode.slice(position)\n ).trim();\n};\n\n/**\n * Chains normalization methods to be reused.\n * Used for any alpha numeric postal code.\n */\nconst normalizeFullAlphaNumeric = (\n postalCode: string,\n position: number | undefined,\n character: string | undefined,\n) => {\n let normalized = normalizePostalCodeAlphaNumeric(postalCode);\n if (position && character) {\n normalized = normalizePostalCodeCharacterSeparator(\n normalized,\n position,\n character,\n );\n }\n return normalizePostalCodeUppercase(normalized);\n};\n\n/**\n * Chains normalization methods to be reused.\n * Used for any numeric postal code.\n */\nconst normalizeFullNumeric = (\n postalCode: string,\n position: number | undefined,\n character: string | undefined,\n) => {\n let normalized = normalizePostalCodeNumeric(postalCode);\n if (position && character) {\n normalized = normalizePostalCodeCharacterSeparator(\n normalized,\n position,\n character,\n );\n }\n return normalized;\n};\n\n/**\n * Used to generate simple numeric postal code required string\n */\nconst requiredFormatStringNumeric = (length: number) =>\n new Array(length).fill(\"9\").join(\"\");\n\n/**\n * Used to generate simple numeric postal code regex\n */\nconst numericPostCodeRegex = (length: number) =>\n new RegExp(`^[0-9]{${length}}$`);\n\n/**\n * Used for postal codes when expected 999 99.\n * For DHL there is no difference between 999 99 and 99999, thats why space is optional.\n */\nconst numericTwoPartPostCodeRegexWhitespace = (\n firstLength: number,\n secondLength: number,\n) => new RegExp(`^[0-9]{${firstLength}} [0-9]{${secondLength}}$`);\n\n/**\n * Used for postal codes when expected 999-99.\n * For DHL there is no difference between 999-99 and 99999, thats why dash is optional.\n */\nconst numericTwoPartPostCodeRegexDash = (\n firstLength: number,\n secondLength: number,\n) => new RegExp(`^[0-9]{${firstLength}}-[0-9]{${secondLength}}$`);\n\n/**\n * Mapping for postal code regex based on country\n * Data (if not stated differently) taken from DHL api responses: https://express.api.dhl.com/mydhlapi/test/address-validate?type=delivery&countryCode=LV&postalCode=LV-1039&strictValidation=false\n * Related task: https://ubiquiti.atlassian.net/browse/NEP-1860\n */\nexport const COUNTRY_CODE_POSTAL_CODE: CountryPostalCodeObject = {\n [CountryCode.Ca]: {\n /**\n * Canada post code validation, we changed the regex from the url taken on by forcing a space in the middle (it's\n * optional there)\n * @see https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch04s15.html#:~:text=Aside%20from%20those%20two%20exceptions,for%20Canada%20Post's%20Ottawa%20headquarters.\n */\n regex: /^(?!.*[DFIOQU])[A-VXY][0-9][A-Z] [0-9][A-Z][0-9]$/,\n requiredFormatString: \"A1A 1A1\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 3, \" \"),\n },\n\n [CountryCode.Za]: {\n /**\n * South Africa uses a simple 4-digit ZIP code pattern.\n * Unfortunately there doesn't seem have be pattern that some specific digits present a specific state/city that is\n * easily regex'able\n */\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n\n // DHL required - 9999\n [CountryCode.Lv]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.At]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Be]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Bg]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Hr]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Cy]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Dk]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Ee]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Fi]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Fr]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.De]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Hu]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 999\n [CountryCode.Is]: {\n regex: numericPostCodeRegex(3),\n requiredFormatString: requiredFormatStringNumeric(3),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.It]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Li]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Lt]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Lu]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Mc]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.No]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 999999\n [CountryCode.Ro]: {\n regex: numericPostCodeRegex(6),\n requiredFormatString: requiredFormatStringNumeric(6),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Rs]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Si]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Es]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Ch]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n\n // DHL required - 999 99\n [CountryCode.Cz]: {\n regex: numericTwoPartPostCodeRegexWhitespace(3, 2),\n requiredFormatString: \"999 99\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 3, \" \"),\n },\n // DHL required - 999 99\n [CountryCode.Se]: {\n regex: numericTwoPartPostCodeRegexWhitespace(3, 2),\n requiredFormatString: \"999 99\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 3, \" \"),\n },\n // DHL required - 999 99\n [CountryCode.Gr]: {\n regex: numericTwoPartPostCodeRegexWhitespace(3, 2),\n requiredFormatString: \"999 99\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 3, \" \"),\n },\n // DHL required - 999 99\n [CountryCode.Sk]: {\n regex: numericTwoPartPostCodeRegexWhitespace(3, 2),\n requiredFormatString: \"999 99\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 3, \" \"),\n },\n\n // DHL required - 99-999\n [CountryCode.Pl]: {\n regex: numericTwoPartPostCodeRegexDash(2, 3),\n requiredFormatString: \"99-999\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 2, \"-\"),\n },\n // DHL required - 9999-999\n [CountryCode.Pt]: {\n regex: numericTwoPartPostCodeRegexDash(4, 3),\n requiredFormatString: \"9999-999\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 4, \"-\"),\n },\n\n // DHL required - 9999 AA, 9999\n [CountryCode.Nl]: {\n regex: /^[0-9]{4} ?[a-zA-Z]{0,2}$/,\n requiredFormatString: \"9999 AA, 9999\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 4, \" \"),\n },\n\n /**\n * DHL required - AA9A 9AA, AA99 9AA, AA9 9AA, A9A 9AA, A99 9AA, A9 9AA.\n * Regex tested against values above\n */\n [CountryCode.Gb]: {\n regex: /^[a-zA-Z]{1,2}\\d[a-zA-Z\\d]? \\d[a-zA-Z]{2}$/,\n requiredFormatString:\n \"AA9A 9AA, AA99 9AA, AA9 9AA, A9A 9AA, A99 9AA, A9 9AA\",\n normalize: normalizePostalCodeUppercase,\n },\n\n /**\n * Example of Isle of Man postal code IM5 1AG, IM99 1AA\n * https://en.wikipedia.org/wiki/IM_postcode_area\n * https://gist.github.com/jamesbar2/1c677c22df8f21e869cca7e439fc3f5b\n */\n [CountryCode.Im]: {\n regex: /^IM\\d{1,2} \\d{1}[a-zA-Z]{2}$/,\n requiredFormatString: \"IM9 9AA, IM99 9AA\",\n normalize: (postalCode: string) => {\n const normalized = normalizePostalCodeAlphaNumeric(postalCode);\n\n // IM9 9AA\n if (normalized.length === 6) {\n return normalizeFullAlphaNumeric(normalized, 3, \" \");\n }\n\n // IM99 9AA\n if (normalized.length === 7) {\n return normalizeFullAlphaNumeric(normalized, 4, \" \");\n }\n\n return normalizeFullAlphaNumeric(postalCode, undefined, undefined);\n },\n },\n\n // Example of Ireland postal code: H53 DF43\n [CountryCode.Ie]: {\n regex: /^[A-Za-z\\d]{3} [A-Za-z\\d]{4}$/,\n requiredFormatString: \"CCC CCCC\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 3, \" \"),\n },\n\n /**\n * Example of Maltese postal code VLT 1117\n * https://en.wikipedia.org/wiki/Postal_codes_in_Malta\n * https://gist.github.com/jamesbar2/1c677c22df8f21e869cca7e439fc3f5b\n */\n [CountryCode.Mt]: {\n regex: /^[A-Za-z\\d]{3} \\d{4}$/,\n requiredFormatString: \"AAA 9999\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 3, \" \"),\n },\n\n /**\n * Taken from: https://gist.github.com/jamesbar2/1c677c22df8f21e869cca7e439fc3f5b#file-postal-codes-json-L1452\n * From gist, removed \\b as they are redundant and removed space as a separator\n * Valid are\n */\n [CountryCode.Us]: {\n regex: /^\\d{5}(?:[-]{1}\\d{4})?$/,\n requiredFormatString: \"99999 (optionally 99999-9999)\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 5, \"-\"),\n },\n\n /**\n * Singapore uses 6 digit postal code\n * @see https://en.wikipedia.org/wiki/Postal_codes_in_Singapore#6-digit_postal_code\n */\n [CountryCode.Sg]: {\n regex: numericPostCodeRegex(6),\n requiredFormatString: requiredFormatStringNumeric(6),\n normalize: normalizePostalCodeNumeric,\n },\n\n /**\n * Japan uses 7 digit postal code, separated by `-` after third character\n * @see https://japan-postcode.810popo.net/\n */\n [CountryCode.Jp]: {\n regex: /^[\\d]{3}(-| )?\\d{4}$/,\n requiredFormatString: \"999-9999\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 3, \"-\"),\n },\n\n /**\n * The first three digits of the postal code are required; the last two or three digits are optional.\n * @see https://en.wikipedia.org/wiki/List_of_postal_codes\n */\n [CountryCode.Tw]: {\n regex: /^\\d{3}(-| )?((\\d{2})?|(\\d{3})?)$/,\n requiredFormatString: \"999, 999-99, 999-999\",\n normalize: (untrimmedPostalCode: string) => {\n const postalCode = untrimmedPostalCode.trim();\n return postalCode.length === 3\n ? postalCode\n : normalizeFullAlphaNumeric(postalCode, 3, \"-\");\n },\n },\n\n /**\n * Brazil uses 8 digit postal code, separated by `-` after fifth character\n * @see https://en.wikipedia.org/wiki/C%C3%B3digo_de_Endere%C3%A7amento_Postal\n */\n [CountryCode.Br]: {\n regex: /^[\\d]{5}(-| )?\\d{3}$/,\n requiredFormatString: \"99999-999\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 5, \"-\"),\n },\n\n /**\n * Brazil uses 5 digit postal code\n * @see https://en.wikipedia.org/wiki/Postal_codes_in_Mexico\n */\n [CountryCode.Mx]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: \"99999\",\n normalize: normalizePostalCodeNumeric,\n },\n\n /**\n * Philippines uses 4 digit postal code\n * @see https://en.wikipedia.org/wiki/ZIP_codes_in_the_Philippines\n */\n [CountryCode.Ph]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n};\n\n/**\n * Mapping for postal code first letter to state province code.\n * Used for stricter postal code validation so zip code matches right state\n * Data taken from https://www12.statcan.gc.ca/census-recensement/2021/ref/dict/tab/index-eng.cfm?ID=t1_9\n * Related task: https://ubiquiti.atlassian.net/browse/NEP-1184?focusedCommentId=292248\n */\nexport const CA_POSTAL_CODE_PROVINCE_FIRST_CHARACTER = {\n A: [\"NL\"], // Newfoundland and Labrador\n B: [\"NS\"], // Nova Scotia\n C: [\"PE\"], // Prince Edward Island\n E: [\"NB\"], // New Brunswick\n G: [\"QC\"], // Eastern Quebec\n H: [\"QC\"], // Metropolitan Montréal\n J: [\"QC\"], // Western Quebec\n K: [\"ON\"], // Eastern Ontario\n L: [\"ON\"], // Central Ontario\n M: [\"ON\"], // Metropolitan Toronto\n N: [\"ON\"], // Southwestern Ontario\n P: [\"ON\"], // Northern Ontario\n R: [\"MB\"], // Manitoba\n S: [\"SK\"], // Saskatchewan\n T: [\"AB\"], // Alberta\n V: [\"BC\"], // British Columbia\n X: [\"NU\", \"NT\"], // Northwest Territories and Nunavut\n Y: [\"YT\"], // Yukon\n};\n"],"names":["COUNTRIES_NO_POSTAL_CODE","CountryCode","Ae","normalizePostalCodeNumeric","postalCode","replace","trim","normalizePostalCodeAlphaNumeric","normalizePostalCodeUppercase","toUpperCase","normalizePostalCodeCharacterSeparator","position","character","length","slice","normalizeFullAlphaNumeric","normalized","normalizeFullNumeric","requiredFormatStringNumeric","Array","fill","join","numericPostCodeRegex","RegExp","numericTwoPartPostCodeRegexWhitespace","firstLength","secondLength","numericTwoPartPostCodeRegexDash","COUNTRY_CODE_POSTAL_CODE","Ca","regex","requiredFormatString","normalize","Za","Lv","At","Be","Bg","Hr","Cy","Dk","Ee","Fi","Fr","De","Hu","Is","It","Li","Lt","Lu","Mc","No","Ro","Rs","Si","Es","Ch","Cz","Se","Gr","Sk","Pl","Pt","Nl","Gb","Im","Ie","Mt","Us","Sg","Jp","Tw","untrimmedPostalCode","Br","Mx","Ph","CA_POSTAL_CODE_PROVINCE_FIRST_C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A;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAA,EAAM,IAAI,CAAA;EAAA;EACdC,CAAA,EAAG,CAAC,IAAI;EAAA;AACV,CAAA;;;"}
|
|
1
|
+
{"version":3,"file":"postalCode.js","sources":["../../src/constants/postalCode.ts"],"sourcesContent":["import { CountryCode } from \"../types\";\n\n/**\n * A list of countries that don't use postal codes, this will make it o that we don't render the postal code input and\n * mark it nullable for those countries\n */\nexport const COUNTRIES_NO_POSTAL_CODE = [CountryCode.Ae];\n\ntype CountryPostalCodeObject = {\n [key in CountryCode]?: {\n regex: RegExp;\n /**\n * String that potentially could be used for postal code tooltips to show required format\n */\n requiredFormatString: string | undefined;\n /**\n * Used for postal code normalization where we can 100% now that we are\n * doing it right.\n *\n * For example we can safely normalize LV-1039 and LV1039 to 1039\n */\n normalize: ((postalCode: string) => string) | undefined;\n };\n};\n\n/**\n * Removes non numeric characters from string.\n * In case of \"LV-1039\"/\"LV1039\" => \"1039\".\n * This method is not intended to do more, in case of incorrect\n * \"LV-123456789\" result would be \"123456789\", as we can't normalize it to\n * first 4 numbers as it might be not what user intended.\n */\nconst normalizePostalCodeNumeric = (postalCode: string) =>\n postalCode.replace(/\\D/g, \"\").trim();\n\n/**\n * Removes any non alpha numeric values, including spaces and dashes.\n * Can be used with conjunction with normalizePostalCodeCharacterSeparator.\n * This method will normalize valid postcode: 9999-999 to 9999999.\n * In conjunction with normalizePostalCodeCharacterSeparator we can reliably\n * normalize back to 9999-999\n */\nconst normalizePostalCodeAlphaNumeric = (postalCode: string) =>\n postalCode.replace(/[^a-zA-Z\\d]+/g, \"\").trim();\n\nconst normalizePostalCodeUppercase = (postalCode: string) =>\n postalCode.toUpperCase().trim();\n\n/**\n * Adds character after specific position.\n * Used for inputs like \"IM51AG\" to normalize to \"IM5 1AG\"\n */\nconst normalizePostalCodeCharacterSeparator = (\n postalCode: string,\n position: number,\n character: string,\n) => {\n /**\n * Do not insert separator if position is over postalCode\n */\n if (position >= postalCode.length) {\n return postalCode;\n }\n\n return (\n postalCode.slice(0, position) +\n character +\n postalCode.slice(position)\n ).trim();\n};\n\n/**\n * Chains normalization methods to be reused.\n * Used for any alpha numeric postal code.\n */\nconst normalizeFullAlphaNumeric = (\n postalCode: string,\n position: number | undefined,\n character: string | undefined,\n) => {\n let normalized = normalizePostalCodeAlphaNumeric(postalCode);\n if (position && character) {\n normalized = normalizePostalCodeCharacterSeparator(\n normalized,\n position,\n character,\n );\n }\n return normalizePostalCodeUppercase(normalized);\n};\n\n/**\n * Chains normalization methods to be reused.\n * Used for any numeric postal code.\n */\nconst normalizeFullNumeric = (\n postalCode: string,\n position: number | undefined,\n character: string | undefined,\n) => {\n let normalized = normalizePostalCodeNumeric(postalCode);\n if (position && character) {\n normalized = normalizePostalCodeCharacterSeparator(\n normalized,\n position,\n character,\n );\n }\n return normalized;\n};\n\n/**\n * Used to generate simple numeric postal code required string\n */\nconst requiredFormatStringNumeric = (length: number) =>\n new Array(length).fill(\"9\").join(\"\");\n\n/**\n * Used to generate simple numeric postal code regex\n */\nconst numericPostCodeRegex = (length: number) =>\n new RegExp(`^[0-9]{${length}}$`);\n\n/**\n * Used for postal codes when expected 999 99.\n * For DHL there is no difference between 999 99 and 99999, thats why space is optional.\n */\nconst numericTwoPartPostCodeRegexWhitespace = (\n firstLength: number,\n secondLength: number,\n) => new RegExp(`^[0-9]{${firstLength}} [0-9]{${secondLength}}$`);\n\n/**\n * Used for postal codes when expected 999-99.\n * For DHL there is no difference between 999-99 and 99999, thats why dash is optional.\n */\nconst numericTwoPartPostCodeRegexDash = (\n firstLength: number,\n secondLength: number,\n) => new RegExp(`^[0-9]{${firstLength}}-[0-9]{${secondLength}}$`);\n\n/**\n * Mapping for postal code regex based on country\n * Data (if not stated differently) taken from DHL api responses: https://express.api.dhl.com/mydhlapi/test/address-validate?type=delivery&countryCode=LV&postalCode=LV-1039&strictValidation=false\n * Related task: https://ubiquiti.atlassian.net/browse/NEP-1860\n */\nexport const COUNTRY_CODE_POSTAL_CODE: CountryPostalCodeObject = {\n [CountryCode.Ca]: {\n /**\n * Canada post code validation, we changed the regex from the url taken on by forcing a space in the middle (it's\n * optional there)\n * @see https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch04s15.html#:~:text=Aside%20from%20those%20two%20exceptions,for%20Canada%20Post's%20Ottawa%20headquarters.\n */\n regex: /^(?!.*[DFIOQU])[A-VXY][0-9][A-Z] [0-9][A-Z][0-9]$/,\n requiredFormatString: \"A1A 1A1\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 3, \" \"),\n },\n\n [CountryCode.Za]: {\n /**\n * South Africa uses a simple 4-digit ZIP code pattern.\n * Unfortunately there doesn't seem have be pattern that some specific digits present a specific state/city that is\n * easily regex'able\n */\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n\n // DHL required - 9999\n [CountryCode.Lv]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.At]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Be]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Bg]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Hr]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Cy]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Dk]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Ee]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Fi]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Fr]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.De]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Hu]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 999\n [CountryCode.Is]: {\n regex: numericPostCodeRegex(3),\n requiredFormatString: requiredFormatStringNumeric(3),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.It]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Li]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Lt]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Lu]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Mc]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.No]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 999999\n [CountryCode.Ro]: {\n regex: numericPostCodeRegex(6),\n requiredFormatString: requiredFormatStringNumeric(6),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Rs]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Si]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Es]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Ch]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n\n // DHL required - 999 99\n [CountryCode.Cz]: {\n regex: numericTwoPartPostCodeRegexWhitespace(3, 2),\n requiredFormatString: \"999 99\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 3, \" \"),\n },\n // DHL required - 999 99\n [CountryCode.Se]: {\n regex: numericTwoPartPostCodeRegexWhitespace(3, 2),\n requiredFormatString: \"999 99\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 3, \" \"),\n },\n // DHL required - 999 99\n [CountryCode.Gr]: {\n regex: numericTwoPartPostCodeRegexWhitespace(3, 2),\n requiredFormatString: \"999 99\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 3, \" \"),\n },\n // DHL required - 999 99\n [CountryCode.Sk]: {\n regex: numericTwoPartPostCodeRegexWhitespace(3, 2),\n requiredFormatString: \"999 99\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 3, \" \"),\n },\n\n // DHL required - 99-999\n [CountryCode.Pl]: {\n regex: numericTwoPartPostCodeRegexDash(2, 3),\n requiredFormatString: \"99-999\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 2, \"-\"),\n },\n // DHL required - 9999-999\n [CountryCode.Pt]: {\n regex: numericTwoPartPostCodeRegexDash(4, 3),\n requiredFormatString: \"9999-999\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 4, \"-\"),\n },\n\n // DHL required - 9999 AA, 9999\n [CountryCode.Nl]: {\n regex: /^[0-9]{4} ?[a-zA-Z]{0,2}$/,\n requiredFormatString: \"9999 AA, 9999\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 4, \" \"),\n },\n\n /**\n * DHL required - AA9A 9AA, AA99 9AA, AA9 9AA, A9A 9AA, A99 9AA, A9 9AA.\n * Regex tested against values above\n */\n [CountryCode.Gb]: {\n regex: /^[a-zA-Z]{1,2}\\d[a-zA-Z\\d]? \\d[a-zA-Z]{2}$/,\n requiredFormatString:\n \"AA9A 9AA, AA99 9AA, AA9 9AA, A9A 9AA, A99 9AA, A9 9AA\",\n normalize: normalizePostalCodeUppercase,\n },\n\n /**\n * Example of Isle of Man postal code IM5 1AG, IM99 1AA\n * https://en.wikipedia.org/wiki/IM_postcode_area\n * https://gist.github.com/jamesbar2/1c677c22df8f21e869cca7e439fc3f5b\n */\n [CountryCode.Im]: {\n regex: /^IM\\d{1,2} \\d{1}[a-zA-Z]{2}$/,\n requiredFormatString: \"IM9 9AA, IM99 9AA\",\n normalize: (postalCode: string) => {\n const normalized = normalizePostalCodeAlphaNumeric(postalCode);\n\n // IM9 9AA\n if (normalized.length === 6) {\n return normalizeFullAlphaNumeric(normalized, 3, \" \");\n }\n\n // IM99 9AA\n if (normalized.length === 7) {\n return normalizeFullAlphaNumeric(normalized, 4, \" \");\n }\n\n return normalizeFullAlphaNumeric(postalCode, undefined, undefined);\n },\n },\n\n // Example of Ireland postal code: H53 DF43\n [CountryCode.Ie]: {\n regex: /^[A-Za-z\\d]{3} [A-Za-z\\d]{4}$/,\n requiredFormatString: \"CCC CCCC\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 3, \" \"),\n },\n\n /**\n * Example of Maltese postal code VLT 1117\n * https://en.wikipedia.org/wiki/Postal_codes_in_Malta\n * https://gist.github.com/jamesbar2/1c677c22df8f21e869cca7e439fc3f5b\n */\n [CountryCode.Mt]: {\n regex: /^[A-Za-z\\d]{3} \\d{4}$/,\n requiredFormatString: \"AAA 9999\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 3, \" \"),\n },\n\n /**\n * Taken from: https://gist.github.com/jamesbar2/1c677c22df8f21e869cca7e439fc3f5b#file-postal-codes-json-L1452\n * From gist, removed \\b as they are redundant and removed space as a separator\n * Valid are\n */\n [CountryCode.Us]: {\n regex: /^\\d{5}(?:[-]{1}\\d{4})?$/,\n requiredFormatString: \"99999 (optionally 99999-9999)\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 5, \"-\"),\n },\n\n /**\n * Singapore uses 6 digit postal code\n * @see https://en.wikipedia.org/wiki/Postal_codes_in_Singapore#6-digit_postal_code\n */\n [CountryCode.Sg]: {\n regex: numericPostCodeRegex(6),\n requiredFormatString: requiredFormatStringNumeric(6),\n normalize: normalizePostalCodeNumeric,\n },\n\n /**\n * Japan uses 7 digit postal code, separated by `-` after third character\n * @see https://japan-postcode.810popo.net/\n */\n [CountryCode.Jp]: {\n regex: /^[\\d]{3}(-| )?\\d{4}$/,\n requiredFormatString: \"999-9999\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 3, \"-\"),\n },\n\n /**\n * The first three digits of the postal code are required; the last two or three digits are optional.\n * @see https://en.wikipedia.org/wiki/List_of_postal_codes\n */\n [CountryCode.Tw]: {\n regex: /^\\d{3}(-| )?((\\d{2})?|(\\d{3})?)$/,\n requiredFormatString: \"999, 999-99, 999-999\",\n normalize: (untrimmedPostalCode: string) => {\n const postalCode = untrimmedPostalCode.trim();\n return postalCode.length === 3\n ? postalCode\n : normalizeFullAlphaNumeric(postalCode, 3, \"-\");\n },\n },\n\n /**\n * Brazil uses 8 digit postal code, separated by `-` after fifth character\n * @see https://en.wikipedia.org/wiki/C%C3%B3digo_de_Endere%C3%A7amento_Postal\n */\n [CountryCode.Br]: {\n regex: /^[\\d]{5}(-| )?\\d{3}$/,\n requiredFormatString: \"99999-999\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 5, \"-\"),\n },\n\n /**\n * Brazil uses 5 digit postal code\n * @see https://en.wikipedia.org/wiki/Postal_codes_in_Mexico\n */\n [CountryCode.Mx]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: \"99999\",\n normalize: normalizePostalCodeNumeric,\n },\n\n /**\n * Philippines uses 4 digit postal code\n * @see https://en.wikipedia.org/wiki/ZIP_codes_in_the_Philippines\n */\n [CountryCode.Ph]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n};\n\n/**\n * Mapping for postal code first letter to state province code.\n * Used for stricter postal code validation so zip code matches right state\n * Data taken from https://www12.statcan.gc.ca/census-recensement/2021/ref/dict/tab/index-eng.cfm?ID=t1_9\n * Related task: https://ubiquiti.atlassian.net/browse/NEP-1184?focusedCommentId=292248\n */\nexport const CA_POSTAL_CODE_PROVINCE_FIRST_CHARACTER = {\n A: [\"NL\"], // Newfoundland and Labrador\n B: [\"NS\"], // Nova Scotia\n C: [\"PE\"], // Prince Edward Island\n E: [\"NB\"], // New Brunswick\n G: [\"QC\"], // Eastern Quebec\n H: [\"QC\"], // Metropolitan Montréal\n J: [\"QC\"], // Western Quebec\n K: [\"ON\"], // Eastern Ontario\n L: [\"ON\"], // Central Ontario\n M: [\"ON\"], // Metropolitan Toronto\n N: [\"ON\"], // Southwestern Ontario\n P: [\"ON\"], // Northern Ontario\n R: [\"MB\"], // Manitoba\n S: [\"SK\"], // Saskatchewan\n T: [\"AB\"], // Alberta\n V: [\"BC\"], // British Columbia\n X: [\"NU\", \"NT\"], // Northwest Territories and Nunavut\n Y: [\"YT\"], // Yukon\n};\n"],"names":["COUNTRIES_NO_POSTAL_CODE","CountryCode","Ae","normalizePostalCodeNumeric","postalCode","replace","trim","normalizePostalCodeAlphaNumeric","normalizePostalCodeUppercase","toUpperCase","normalizePostalCodeCharacterSeparator","position","character","length","slice","normalizeFullAlphaNumeric","normalized","normalizeFullNumeric","requiredFormatStringNumeric","Array","fill","join","numericPostCodeRegex","RegExp","numericTwoPartPostCodeRegexWhitespace","firstLength","secondLength","numericTwoPartPostCodeRegexDash","COUNTRY_CODE_POSTAL_CODE","Ca","regex","requiredFormatString","normalize","Za","Lv","At","Be","Bg","Hr","Cy","Dk","Ee","Fi","Fr","De","Hu","Is","It","Li","Lt","Lu","Mc","No","Ro","Rs","Si","Es","Ch","Cz","Se","Gr","Sk","Pl","Pt","Nl","Gb","Im","Ie","Mt","Us","Sg","Jp","Tw","untrimmedPostalCode","Br","Mx","Ph","CA_POSTAL_CODE_PROVINCE_FIRST_CHARACTER","A","B","C","E","G","H","J","K","L","M","N","P","R","S","T","V","X","Y"],"mappings":";;;;;AAMa,MAAAA,wBAAA,GAA2B,CAACC,SAAA,CAAAA,WAAA,CAAYC,EAAE,CAAA;AA0BvD,MAAMC,0BAAA,GAA8BC,UAClC,IAAAA,UAAA,CAAWC,QAAQ,KAA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C,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAA,EAAM,IAAI,CAAA;EAAA;EACdC,CAAA,EAAG,CAAC,IAAI;EAAA;AACV,CAAA;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postalCode.mjs","sources":["../../src/constants/postalCode.ts"],"sourcesContent":["import { CountryCode } from \"../types\";\n\n/**\n * A list of countries that don't use postal codes, this will make it o that we don't render the postal code input and\n * mark it nullable for those countries\n */\nexport const COUNTRIES_NO_POSTAL_CODE = [CountryCode.Ae];\n\ntype CountryPostalCodeObject = {\n [key in CountryCode]?: {\n regex: RegExp;\n /**\n * String that potentially could be used for postal code tooltips to show required format\n */\n requiredFormatString: string | undefined;\n /**\n * Used for postal code normalization where we can 100% now that we are\n * doing it right.\n *\n * For example we can safely normalize LV-1039 and LV1039 to 1039\n */\n normalize: ((postalCode: string) => string) | undefined;\n };\n};\n\n/**\n * Removes non numeric characters from string.\n * In case of \"LV-1039\"/\"LV1039\" => \"1039\".\n * This method is not intended to do more, in case of incorrect\n * \"LV-123456789\" result would be \"123456789\", as we can't normalize it to\n * first 4 numbers as it might be not what user intended.\n */\nconst normalizePostalCodeNumeric = (postalCode: string) =>\n postalCode.replace(/\\D/g, \"\").trim();\n\n/**\n * Removes any non alpha numeric values, including spaces and dashes.\n * Can be used with conjunction with normalizePostalCodeCharacterSeparator.\n * This method will normalize valid postcode: 9999-999 to 9999999.\n * In conjunction with normalizePostalCodeCharacterSeparator we can reliably\n * normalize back to 9999-999\n */\nconst normalizePostalCodeAlphaNumeric = (postalCode: string) =>\n postalCode.replace(/[^a-zA-Z\\d]+/g, \"\").trim();\n\nconst normalizePostalCodeUppercase = (postalCode: string) =>\n postalCode.toUpperCase().trim();\n\n/**\n * Adds character after specific position.\n * Used for inputs like \"IM51AG\" to normalize to \"IM5 1AG\"\n */\nconst normalizePostalCodeCharacterSeparator = (\n postalCode: string,\n position: number,\n character: string,\n) => {\n /**\n * Do not insert separator if position is over postalCode\n */\n if (position >= postalCode.length) {\n return postalCode;\n }\n\n return (\n postalCode.slice(0, position) +\n character +\n postalCode.slice(position)\n ).trim();\n};\n\n/**\n * Chains normalization methods to be reused.\n * Used for any alpha numeric postal code.\n */\nconst normalizeFullAlphaNumeric = (\n postalCode: string,\n position: number | undefined,\n character: string | undefined,\n) => {\n let normalized = normalizePostalCodeAlphaNumeric(postalCode);\n if (position && character) {\n normalized = normalizePostalCodeCharacterSeparator(\n normalized,\n position,\n character,\n );\n }\n return normalizePostalCodeUppercase(normalized);\n};\n\n/**\n * Chains normalization methods to be reused.\n * Used for any numeric postal code.\n */\nconst normalizeFullNumeric = (\n postalCode: string,\n position: number | undefined,\n character: string | undefined,\n) => {\n let normalized = normalizePostalCodeNumeric(postalCode);\n if (position && character) {\n normalized = normalizePostalCodeCharacterSeparator(\n normalized,\n position,\n character,\n );\n }\n return normalized;\n};\n\n/**\n * Used to generate simple numeric postal code required string\n */\nconst requiredFormatStringNumeric = (length: number) =>\n new Array(length).fill(\"9\").join(\"\");\n\n/**\n * Used to generate simple numeric postal code regex\n */\nconst numericPostCodeRegex = (length: number) =>\n new RegExp(`^[0-9]{${length}}$`);\n\n/**\n * Used for postal codes when expected 999 99.\n * For DHL there is no difference between 999 99 and 99999, thats why space is optional.\n */\nconst numericTwoPartPostCodeRegexWhitespace = (\n firstLength: number,\n secondLength: number,\n) => new RegExp(`^[0-9]{${firstLength}} [0-9]{${secondLength}}$`);\n\n/**\n * Used for postal codes when expected 999-99.\n * For DHL there is no difference between 999-99 and 99999, thats why dash is optional.\n */\nconst numericTwoPartPostCodeRegexDash = (\n firstLength: number,\n secondLength: number,\n) => new RegExp(`^[0-9]{${firstLength}}-[0-9]{${secondLength}}$`);\n\n/**\n * Mapping for postal code regex based on country\n * Data (if not stated differently) taken from DHL api responses: https://express.api.dhl.com/mydhlapi/test/address-validate?type=delivery&countryCode=LV&postalCode=LV-1039&strictValidation=false\n * Related task: https://ubiquiti.atlassian.net/browse/NEP-1860\n */\nexport const COUNTRY_CODE_POSTAL_CODE: CountryPostalCodeObject = {\n [CountryCode.Ca]: {\n /**\n * Canada post code validation, we changed the regex from the url taken on by forcing a space in the middle (it's\n * optional there)\n * @see https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch04s15.html#:~:text=Aside%20from%20those%20two%20exceptions,for%20Canada%20Post's%20Ottawa%20headquarters.\n */\n regex: /^(?!.*[DFIOQU])[A-VXY][0-9][A-Z] [0-9][A-Z][0-9]$/,\n requiredFormatString: \"A1A 1A1\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 3, \" \"),\n },\n\n [CountryCode.Za]: {\n /**\n * South Africa uses a simple 4-digit ZIP code pattern.\n * Unfortunately there doesn't seem have be pattern that some specific digits present a specific state/city that is\n * easily regex'able\n */\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n\n // DHL required - 9999\n [CountryCode.Lv]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.At]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Be]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Bg]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Hr]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Cy]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Dk]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Ee]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Fi]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Fr]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.De]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Hu]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 999\n [CountryCode.Is]: {\n regex: numericPostCodeRegex(3),\n requiredFormatString: requiredFormatStringNumeric(3),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.It]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Li]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Lt]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Lu]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Mc]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.No]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 999999\n [CountryCode.Ro]: {\n regex: numericPostCodeRegex(6),\n requiredFormatString: requiredFormatStringNumeric(6),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Rs]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Si]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Es]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Ch]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n\n // DHL required - 999 99\n [CountryCode.Cz]: {\n regex: numericTwoPartPostCodeRegexWhitespace(3, 2),\n requiredFormatString: \"999 99\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 3, \" \"),\n },\n // DHL required - 999 99\n [CountryCode.Se]: {\n regex: numericTwoPartPostCodeRegexWhitespace(3, 2),\n requiredFormatString: \"999 99\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 3, \" \"),\n },\n // DHL required - 999 99\n [CountryCode.Gr]: {\n regex: numericTwoPartPostCodeRegexWhitespace(3, 2),\n requiredFormatString: \"999 99\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 3, \" \"),\n },\n // DHL required - 999 99\n [CountryCode.Sk]: {\n regex: numericTwoPartPostCodeRegexWhitespace(3, 2),\n requiredFormatString: \"999 99\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 3, \" \"),\n },\n\n // DHL required - 99-999\n [CountryCode.Pl]: {\n regex: numericTwoPartPostCodeRegexDash(2, 3),\n requiredFormatString: \"99-999\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 2, \"-\"),\n },\n // DHL required - 9999-999\n [CountryCode.Pt]: {\n regex: numericTwoPartPostCodeRegexDash(4, 3),\n requiredFormatString: \"9999-999\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 4, \"-\"),\n },\n\n // DHL required - 9999 AA, 9999\n [CountryCode.Nl]: {\n regex: /^[0-9]{4} ?[a-zA-Z]{0,2}$/,\n requiredFormatString: \"9999 AA, 9999\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 4, \" \"),\n },\n\n /**\n * DHL required - AA9A 9AA, AA99 9AA, AA9 9AA, A9A 9AA, A99 9AA, A9 9AA.\n * Regex tested against values above\n */\n [CountryCode.Gb]: {\n regex: /^[a-zA-Z]{1,2}\\d[a-zA-Z\\d]? \\d[a-zA-Z]{2}$/,\n requiredFormatString:\n \"AA9A 9AA, AA99 9AA, AA9 9AA, A9A 9AA, A99 9AA, A9 9AA\",\n normalize: normalizePostalCodeUppercase,\n },\n\n /**\n * Example of Isle of Man postal code IM5 1AG, IM99 1AA\n * https://en.wikipedia.org/wiki/IM_postcode_area\n * https://gist.github.com/jamesbar2/1c677c22df8f21e869cca7e439fc3f5b\n */\n [CountryCode.Im]: {\n regex: /^IM\\d{1,2} \\d{1}[a-zA-Z]{2}$/,\n requiredFormatString: \"IM9 9AA, IM99 9AA\",\n normalize: (postalCode: string) => {\n const normalized = normalizePostalCodeAlphaNumeric(postalCode);\n\n // IM9 9AA\n if (normalized.length === 6) {\n return normalizeFullAlphaNumeric(normalized, 3, \" \");\n }\n\n // IM99 9AA\n if (normalized.length === 7) {\n return normalizeFullAlphaNumeric(normalized, 4, \" \");\n }\n\n return normalizeFullAlphaNumeric(postalCode, undefined, undefined);\n },\n },\n\n // Example of Ireland postal code: H53 DF43\n [CountryCode.Ie]: {\n regex: /^[A-Za-z\\d]{3} [A-Za-z\\d]{4}$/,\n requiredFormatString: \"CCC CCCC\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 3, \" \"),\n },\n\n /**\n * Example of Maltese postal code VLT 1117\n * https://en.wikipedia.org/wiki/Postal_codes_in_Malta\n * https://gist.github.com/jamesbar2/1c677c22df8f21e869cca7e439fc3f5b\n */\n [CountryCode.Mt]: {\n regex: /^[A-Za-z\\d]{3} \\d{4}$/,\n requiredFormatString: \"AAA 9999\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 3, \" \"),\n },\n\n /**\n * Taken from: https://gist.github.com/jamesbar2/1c677c22df8f21e869cca7e439fc3f5b#file-postal-codes-json-L1452\n * From gist, removed \\b as they are redundant and removed space as a separator\n * Valid are\n */\n [CountryCode.Us]: {\n regex: /^\\d{5}(?:[-]{1}\\d{4})?$/,\n requiredFormatString: \"99999 (optionally 99999-9999)\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 5, \"-\"),\n },\n\n /**\n * Singapore uses 6 digit postal code\n * @see https://en.wikipedia.org/wiki/Postal_codes_in_Singapore#6-digit_postal_code\n */\n [CountryCode.Sg]: {\n regex: numericPostCodeRegex(6),\n requiredFormatString: requiredFormatStringNumeric(6),\n normalize: normalizePostalCodeNumeric,\n },\n\n /**\n * Japan uses 7 digit postal code, separated by `-` after third character\n * @see https://japan-postcode.810popo.net/\n */\n [CountryCode.Jp]: {\n regex: /^[\\d]{3}(-| )?\\d{4}$/,\n requiredFormatString: \"999-9999\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 3, \"-\"),\n },\n\n /**\n * The first three digits of the postal code are required; the last two or three digits are optional.\n * @see https://en.wikipedia.org/wiki/List_of_postal_codes\n */\n [CountryCode.Tw]: {\n regex: /^\\d{3}(-| )?((\\d{2})?|(\\d{3})?)$/,\n requiredFormatString: \"999, 999-99, 999-999\",\n normalize: (untrimmedPostalCode: string) => {\n const postalCode = untrimmedPostalCode.trim();\n return postalCode.length === 3\n ? postalCode\n : normalizeFullAlphaNumeric(postalCode, 3, \"-\");\n },\n },\n\n /**\n * Brazil uses 8 digit postal code, separated by `-` after fifth character\n * @see https://en.wikipedia.org/wiki/C%C3%B3digo_de_Endere%C3%A7amento_Postal\n */\n [CountryCode.Br]: {\n regex: /^[\\d]{5}(-| )?\\d{3}$/,\n requiredFormatString: \"99999-999\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 5, \"-\"),\n },\n\n /**\n * Brazil uses 5 digit postal code\n * @see https://en.wikipedia.org/wiki/Postal_codes_in_Mexico\n */\n [CountryCode.Mx]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: \"99999\",\n normalize: normalizePostalCodeNumeric,\n },\n\n /**\n * Philippines uses 4 digit postal code\n * @see https://en.wikipedia.org/wiki/ZIP_codes_in_the_Philippines\n */\n [CountryCode.Ph]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n};\n\n/**\n * Mapping for postal code first letter to state province code.\n * Used for stricter postal code validation so zip code matches right state\n * Data taken from https://www12.statcan.gc.ca/census-recensement/2021/ref/dict/tab/index-eng.cfm?ID=t1_9\n * Related task: https://ubiquiti.atlassian.net/browse/NEP-1184?focusedCommentId=292248\n */\nexport const CA_POSTAL_CODE_PROVINCE_FIRST_CHARACTER = {\n A: [\"NL\"], // Newfoundland and Labrador\n B: [\"NS\"], // Nova Scotia\n C: [\"PE\"], // Prince Edward Island\n E: [\"NB\"], // New Brunswick\n G: [\"QC\"], // Eastern Quebec\n H: [\"QC\"], // Metropolitan Montréal\n J: [\"QC\"], // Western Quebec\n K: [\"ON\"], // Eastern Ontario\n L: [\"ON\"], // Central Ontario\n M: [\"ON\"], // Metropolitan Toronto\n N: [\"ON\"], // Southwestern Ontario\n P: [\"ON\"], // Northern Ontario\n R: [\"MB\"], // Manitoba\n S: [\"SK\"], // Saskatchewan\n T: [\"AB\"], // Alberta\n V: [\"BC\"], // British Columbia\n X: [\"NU\", \"NT\"], // Northwest Territories and Nunavut\n Y: [\"YT\"], // Yukon\n};\n"],"names":["COUNTRIES_NO_POSTAL_CODE","CountryCode","Ae","normalizePostalCodeNumeric","postalCode","replace","trim","normalizePostalCodeAlphaNumeric","normalizePostalCodeUppercase","toUpperCase","normalizePostalCodeCharacterSeparator","position","character","length","slice","normalizeFullAlphaNumeric","normalized","normalizeFullNumeric","requiredFormatStringNumeric","Array","fill","join","numericPostCodeRegex","RegExp","numericTwoPartPostCodeRegexWhitespace","firstLength","secondLength","numericTwoPartPostCodeRegexDash","COUNTRY_CODE_POSTAL_CODE","Ca","regex","requiredFormatString","normalize","Za","Lv","At","Be","Bg","Hr","Cy","Dk","Ee","Fi","Fr","De","Hu","Is","It","Li","Lt","Lu","Mc","No","Ro","Rs","Si","Es","Ch","Cz","Se","Gr","Sk","Pl","Pt","Nl","Gb","Im","Ie","Mt","Us","Sg","Jp","Tw","untrimmedPostalCode","Br","Mx","Ph","CA_POSTAL_CODE_PROVINCE_FIRST_CHARACTER","A","B","C","E","G","H","J","K","L","M","N","P","R","S","T","V","X","Y"],"mappings":";;;AAMa,MAAAA,wBAAA,GAA2B,CAACC,WAAA,CAAYC,EAAE,CAAA;AA0BvD,MAAMC,0BAAA,GAA8BC,UAClC,IAAAA,UAAA,CAAWC,QAAQ,KAAO,EAAA,EAAE,EAAEC,IAAK,EAAA;AASrC,MAAMC,+BAAA,GAAmCH,UACvC,IAAAA,UAAA,CAAWC,QAAQ,eAAiB,EAAA,EAAE,EAAEC,IAAK,EAAA;AAE/C,MAAME,+BAAgCJ,UAAA,IACpCA,UAAW,CAAAK,WAAA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ACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAA,EAAM,IAAI,CAAA;EAAA;EACdC,CAAA,EAAG,CAAC,IAAI;EAAA;AACV,CAAA;"}
|
|
1
|
+
{"version":3,"file":"postalCode.mjs","sources":["../../src/constants/postalCode.ts"],"sourcesContent":["import { CountryCode } from \"../types\";\n\n/**\n * A list of countries that don't use postal codes, this will make it o that we don't render the postal code input and\n * mark it nullable for those countries\n */\nexport const COUNTRIES_NO_POSTAL_CODE = [CountryCode.Ae];\n\ntype CountryPostalCodeObject = {\n [key in CountryCode]?: {\n regex: RegExp;\n /**\n * String that potentially could be used for postal code tooltips to show required format\n */\n requiredFormatString: string | undefined;\n /**\n * Used for postal code normalization where we can 100% now that we are\n * doing it right.\n *\n * For example we can safely normalize LV-1039 and LV1039 to 1039\n */\n normalize: ((postalCode: string) => string) | undefined;\n };\n};\n\n/**\n * Removes non numeric characters from string.\n * In case of \"LV-1039\"/\"LV1039\" => \"1039\".\n * This method is not intended to do more, in case of incorrect\n * \"LV-123456789\" result would be \"123456789\", as we can't normalize it to\n * first 4 numbers as it might be not what user intended.\n */\nconst normalizePostalCodeNumeric = (postalCode: string) =>\n postalCode.replace(/\\D/g, \"\").trim();\n\n/**\n * Removes any non alpha numeric values, including spaces and dashes.\n * Can be used with conjunction with normalizePostalCodeCharacterSeparator.\n * This method will normalize valid postcode: 9999-999 to 9999999.\n * In conjunction with normalizePostalCodeCharacterSeparator we can reliably\n * normalize back to 9999-999\n */\nconst normalizePostalCodeAlphaNumeric = (postalCode: string) =>\n postalCode.replace(/[^a-zA-Z\\d]+/g, \"\").trim();\n\nconst normalizePostalCodeUppercase = (postalCode: string) =>\n postalCode.toUpperCase().trim();\n\n/**\n * Adds character after specific position.\n * Used for inputs like \"IM51AG\" to normalize to \"IM5 1AG\"\n */\nconst normalizePostalCodeCharacterSeparator = (\n postalCode: string,\n position: number,\n character: string,\n) => {\n /**\n * Do not insert separator if position is over postalCode\n */\n if (position >= postalCode.length) {\n return postalCode;\n }\n\n return (\n postalCode.slice(0, position) +\n character +\n postalCode.slice(position)\n ).trim();\n};\n\n/**\n * Chains normalization methods to be reused.\n * Used for any alpha numeric postal code.\n */\nconst normalizeFullAlphaNumeric = (\n postalCode: string,\n position: number | undefined,\n character: string | undefined,\n) => {\n let normalized = normalizePostalCodeAlphaNumeric(postalCode);\n if (position && character) {\n normalized = normalizePostalCodeCharacterSeparator(\n normalized,\n position,\n character,\n );\n }\n return normalizePostalCodeUppercase(normalized);\n};\n\n/**\n * Chains normalization methods to be reused.\n * Used for any numeric postal code.\n */\nconst normalizeFullNumeric = (\n postalCode: string,\n position: number | undefined,\n character: string | undefined,\n) => {\n let normalized = normalizePostalCodeNumeric(postalCode);\n if (position && character) {\n normalized = normalizePostalCodeCharacterSeparator(\n normalized,\n position,\n character,\n );\n }\n return normalized;\n};\n\n/**\n * Used to generate simple numeric postal code required string\n */\nconst requiredFormatStringNumeric = (length: number) =>\n new Array(length).fill(\"9\").join(\"\");\n\n/**\n * Used to generate simple numeric postal code regex\n */\nconst numericPostCodeRegex = (length: number) =>\n new RegExp(`^[0-9]{${length}}$`);\n\n/**\n * Used for postal codes when expected 999 99.\n * For DHL there is no difference between 999 99 and 99999, thats why space is optional.\n */\nconst numericTwoPartPostCodeRegexWhitespace = (\n firstLength: number,\n secondLength: number,\n) => new RegExp(`^[0-9]{${firstLength}} [0-9]{${secondLength}}$`);\n\n/**\n * Used for postal codes when expected 999-99.\n * For DHL there is no difference between 999-99 and 99999, thats why dash is optional.\n */\nconst numericTwoPartPostCodeRegexDash = (\n firstLength: number,\n secondLength: number,\n) => new RegExp(`^[0-9]{${firstLength}}-[0-9]{${secondLength}}$`);\n\n/**\n * Mapping for postal code regex based on country\n * Data (if not stated differently) taken from DHL api responses: https://express.api.dhl.com/mydhlapi/test/address-validate?type=delivery&countryCode=LV&postalCode=LV-1039&strictValidation=false\n * Related task: https://ubiquiti.atlassian.net/browse/NEP-1860\n */\nexport const COUNTRY_CODE_POSTAL_CODE: CountryPostalCodeObject = {\n [CountryCode.Ca]: {\n /**\n * Canada post code validation, we changed the regex from the url taken on by forcing a space in the middle (it's\n * optional there)\n * @see https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch04s15.html#:~:text=Aside%20from%20those%20two%20exceptions,for%20Canada%20Post's%20Ottawa%20headquarters.\n */\n regex: /^(?!.*[DFIOQU])[A-VXY][0-9][A-Z] [0-9][A-Z][0-9]$/,\n requiredFormatString: \"A1A 1A1\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 3, \" \"),\n },\n\n [CountryCode.Za]: {\n /**\n * South Africa uses a simple 4-digit ZIP code pattern.\n * Unfortunately there doesn't seem have be pattern that some specific digits present a specific state/city that is\n * easily regex'able\n */\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n\n // DHL required - 9999\n [CountryCode.Lv]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.At]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Be]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Bg]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Hr]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Cy]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Dk]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Ee]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Fi]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Fr]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.De]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Hu]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 999\n [CountryCode.Is]: {\n regex: numericPostCodeRegex(3),\n requiredFormatString: requiredFormatStringNumeric(3),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.It]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Li]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Lt]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Lu]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Mc]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.No]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 999999\n [CountryCode.Ro]: {\n regex: numericPostCodeRegex(6),\n requiredFormatString: requiredFormatStringNumeric(6),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Rs]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Si]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 99999\n [CountryCode.Es]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: requiredFormatStringNumeric(5),\n normalize: normalizePostalCodeNumeric,\n },\n // DHL required - 9999\n [CountryCode.Ch]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n\n // DHL required - 999 99\n [CountryCode.Cz]: {\n regex: numericTwoPartPostCodeRegexWhitespace(3, 2),\n requiredFormatString: \"999 99\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 3, \" \"),\n },\n // DHL required - 999 99\n [CountryCode.Se]: {\n regex: numericTwoPartPostCodeRegexWhitespace(3, 2),\n requiredFormatString: \"999 99\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 3, \" \"),\n },\n // DHL required - 999 99\n [CountryCode.Gr]: {\n regex: numericTwoPartPostCodeRegexWhitespace(3, 2),\n requiredFormatString: \"999 99\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 3, \" \"),\n },\n // DHL required - 999 99\n [CountryCode.Sk]: {\n regex: numericTwoPartPostCodeRegexWhitespace(3, 2),\n requiredFormatString: \"999 99\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 3, \" \"),\n },\n\n // DHL required - 99-999\n [CountryCode.Pl]: {\n regex: numericTwoPartPostCodeRegexDash(2, 3),\n requiredFormatString: \"99-999\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 2, \"-\"),\n },\n // DHL required - 9999-999\n [CountryCode.Pt]: {\n regex: numericTwoPartPostCodeRegexDash(4, 3),\n requiredFormatString: \"9999-999\",\n normalize: (postalCode: string) => normalizeFullNumeric(postalCode, 4, \"-\"),\n },\n\n // DHL required - 9999 AA, 9999\n [CountryCode.Nl]: {\n regex: /^[0-9]{4} ?[a-zA-Z]{0,2}$/,\n requiredFormatString: \"9999 AA, 9999\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 4, \" \"),\n },\n\n /**\n * DHL required - AA9A 9AA, AA99 9AA, AA9 9AA, A9A 9AA, A99 9AA, A9 9AA.\n * Regex tested against values above\n */\n [CountryCode.Gb]: {\n regex: /^[a-zA-Z]{1,2}\\d[a-zA-Z\\d]? \\d[a-zA-Z]{2}$/,\n requiredFormatString:\n \"AA9A 9AA, AA99 9AA, AA9 9AA, A9A 9AA, A99 9AA, A9 9AA\",\n normalize: normalizePostalCodeUppercase,\n },\n\n /**\n * Example of Isle of Man postal code IM5 1AG, IM99 1AA\n * https://en.wikipedia.org/wiki/IM_postcode_area\n * https://gist.github.com/jamesbar2/1c677c22df8f21e869cca7e439fc3f5b\n */\n [CountryCode.Im]: {\n regex: /^IM\\d{1,2} \\d{1}[a-zA-Z]{2}$/,\n requiredFormatString: \"IM9 9AA, IM99 9AA\",\n normalize: (postalCode: string) => {\n const normalized = normalizePostalCodeAlphaNumeric(postalCode);\n\n // IM9 9AA\n if (normalized.length === 6) {\n return normalizeFullAlphaNumeric(normalized, 3, \" \");\n }\n\n // IM99 9AA\n if (normalized.length === 7) {\n return normalizeFullAlphaNumeric(normalized, 4, \" \");\n }\n\n return normalizeFullAlphaNumeric(postalCode, undefined, undefined);\n },\n },\n\n // Example of Ireland postal code: H53 DF43\n [CountryCode.Ie]: {\n regex: /^[A-Za-z\\d]{3} [A-Za-z\\d]{4}$/,\n requiredFormatString: \"CCC CCCC\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 3, \" \"),\n },\n\n /**\n * Example of Maltese postal code VLT 1117\n * https://en.wikipedia.org/wiki/Postal_codes_in_Malta\n * https://gist.github.com/jamesbar2/1c677c22df8f21e869cca7e439fc3f5b\n */\n [CountryCode.Mt]: {\n regex: /^[A-Za-z\\d]{3} \\d{4}$/,\n requiredFormatString: \"AAA 9999\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 3, \" \"),\n },\n\n /**\n * Taken from: https://gist.github.com/jamesbar2/1c677c22df8f21e869cca7e439fc3f5b#file-postal-codes-json-L1452\n * From gist, removed \\b as they are redundant and removed space as a separator\n * Valid are\n */\n [CountryCode.Us]: {\n regex: /^\\d{5}(?:[-]{1}\\d{4})?$/,\n requiredFormatString: \"99999 (optionally 99999-9999)\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 5, \"-\"),\n },\n\n /**\n * Singapore uses 6 digit postal code\n * @see https://en.wikipedia.org/wiki/Postal_codes_in_Singapore#6-digit_postal_code\n */\n [CountryCode.Sg]: {\n regex: numericPostCodeRegex(6),\n requiredFormatString: requiredFormatStringNumeric(6),\n normalize: normalizePostalCodeNumeric,\n },\n\n /**\n * Japan uses 7 digit postal code, separated by `-` after third character\n * @see https://japan-postcode.810popo.net/\n */\n [CountryCode.Jp]: {\n regex: /^[\\d]{3}(-| )?\\d{4}$/,\n requiredFormatString: \"999-9999\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 3, \"-\"),\n },\n\n /**\n * The first three digits of the postal code are required; the last two or three digits are optional.\n * @see https://en.wikipedia.org/wiki/List_of_postal_codes\n */\n [CountryCode.Tw]: {\n regex: /^\\d{3}(-| )?((\\d{2})?|(\\d{3})?)$/,\n requiredFormatString: \"999, 999-99, 999-999\",\n normalize: (untrimmedPostalCode: string) => {\n const postalCode = untrimmedPostalCode.trim();\n return postalCode.length === 3\n ? postalCode\n : normalizeFullAlphaNumeric(postalCode, 3, \"-\");\n },\n },\n\n /**\n * Brazil uses 8 digit postal code, separated by `-` after fifth character\n * @see https://en.wikipedia.org/wiki/C%C3%B3digo_de_Endere%C3%A7amento_Postal\n */\n [CountryCode.Br]: {\n regex: /^[\\d]{5}(-| )?\\d{3}$/,\n requiredFormatString: \"99999-999\",\n normalize: (postalCode: string) =>\n normalizeFullAlphaNumeric(postalCode, 5, \"-\"),\n },\n\n /**\n * Brazil uses 5 digit postal code\n * @see https://en.wikipedia.org/wiki/Postal_codes_in_Mexico\n */\n [CountryCode.Mx]: {\n regex: numericPostCodeRegex(5),\n requiredFormatString: \"99999\",\n normalize: normalizePostalCodeNumeric,\n },\n\n /**\n * Philippines uses 4 digit postal code\n * @see https://en.wikipedia.org/wiki/ZIP_codes_in_the_Philippines\n */\n [CountryCode.Ph]: {\n regex: numericPostCodeRegex(4),\n requiredFormatString: requiredFormatStringNumeric(4),\n normalize: normalizePostalCodeNumeric,\n },\n};\n\n/**\n * Mapping for postal code first letter to state province code.\n * Used for stricter postal code validation so zip code matches right state\n * Data taken from https://www12.statcan.gc.ca/census-recensement/2021/ref/dict/tab/index-eng.cfm?ID=t1_9\n * Related task: https://ubiquiti.atlassian.net/browse/NEP-1184?focusedCommentId=292248\n */\nexport const CA_POSTAL_CODE_PROVINCE_FIRST_CHARACTER = {\n A: [\"NL\"], // Newfoundland and Labrador\n B: [\"NS\"], // Nova Scotia\n C: [\"PE\"], // Prince Edward Island\n E: [\"NB\"], // New Brunswick\n G: [\"QC\"], // Eastern Quebec\n H: [\"QC\"], // Metropolitan Montréal\n J: [\"QC\"], // Western Quebec\n K: [\"ON\"], // Eastern Ontario\n L: [\"ON\"], // Central Ontario\n M: [\"ON\"], // Metropolitan Toronto\n N: [\"ON\"], // Southwestern Ontario\n P: [\"ON\"], // Northern Ontario\n R: [\"MB\"], // Manitoba\n S: [\"SK\"], // Saskatchewan\n T: [\"AB\"], // Alberta\n V: [\"BC\"], // British Columbia\n X: [\"NU\", \"NT\"], // Northwest Territories and Nunavut\n Y: [\"YT\"], // Yukon\n};\n"],"names":["COUNTRIES_NO_POSTAL_CODE","CountryCode","Ae","normalizePostalCodeNumeric","postalCode","replace","trim","normalizePostalCodeAlphaNumeric","normalizePostalCodeUppercase","toUpperCase","normalizePostalCodeCharacterSeparator","position","character","length","slice","normalizeFullAlphaNumeric","normalized","normalizeFullNumeric","requiredFormatStringNumeric","Array","fill","join","numericPostCodeRegex","RegExp","numericTwoPartPostCodeRegexWhitespace","firstLength","secondLength","numericTwoPartPostCodeRegexDash","COUNTRY_CODE_POSTAL_CODE","Ca","regex","requiredFormatString","normalize","Za","Lv","At","Be","Bg","Hr","Cy","Dk","Ee","Fi","Fr","De","Hu","Is","It","Li","Lt","Lu","Mc","No","Ro","Rs","Si","Es","Ch","Cz","Se","Gr","Sk","Pl","Pt","Nl","Gb","Im","Ie","Mt","Us","Sg","Jp","Tw","untrimmedPostalCode","Br","Mx","Ph","CA_POSTAL_CODE_PROVINCE_FIRST_CHARACT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A2E,EAAE,GAAG;IAChB9C,KAAA,EAAOR,qBAAqB,CAAC,CAAA;IAC7BS,oBAAA,EAAsBb,4BAA4B,CAAC,CAAA;IACnDc,SAAW,EAAA7B;EACb;AACF,CAAA;AAQO,MAAM0E,uCAA0C,GAAA;EACrDC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAA,EAAM,IAAI,CAAA;EAAA;EACdC,CAAA,EAAG,CAAC,IAAI;EAAA;AACV,CAAA;"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export declare enum FilterId {
|
|
2
2
|
ConnectionType = "connection-type",
|
|
3
3
|
WifiConnectionType = "wifi-connection-type",
|
|
4
|
+
WifiConnectionType2 = "wifi-connection-type-2",
|
|
4
5
|
SupportedSpeeds = "supported-speeds",
|
|
5
6
|
PortCount = "port-count",
|
|
6
7
|
PoeSupport = "poe-support",
|
|
8
|
+
PoeBasicSupport = "poe-basic-support",
|
|
7
9
|
OutdoorSupport = "outdoor-support",
|
|
8
10
|
Resolution = "resolution",
|
|
9
11
|
OutdoorRating = "outdoor-rating",
|
|
@@ -17,5 +19,19 @@ export declare enum FilterId {
|
|
|
17
19
|
WiredFeatures = "wired-features",
|
|
18
20
|
UispAccessoriesFeatures = "uisp-accessories-features",
|
|
19
21
|
EtherLighting = "etherlighting",
|
|
22
|
+
ClientDevices = "performance-client-devices",
|
|
23
|
+
ThroughputRate = "throughput-rate",
|
|
24
|
+
UnifiDevices = "unifi-devices",
|
|
25
|
+
RedundantPower = "redundant-power",
|
|
26
|
+
Streams = "streams",
|
|
27
|
+
Radios = "radios",
|
|
28
|
+
ExternalAntennaSupport = "external-antenna-support",
|
|
29
|
+
IntegratedStorage = "integrated-storage",
|
|
30
|
+
WirelessOption = "wireless-option",
|
|
31
|
+
AIDetectionOption = "ai-detection-options",
|
|
32
|
+
OpticalZoomOption = "optical-zoom-options",
|
|
33
|
+
PreInstalledStorageOption = "pre-installed-storage-option",
|
|
34
|
+
CoverageDegree = "coverage-degree",
|
|
35
|
+
CameraCount = "camera-count",
|
|
20
36
|
Other = "other"
|
|
21
37
|
}
|
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
var FilterId = /* @__PURE__ */(FilterId2 => {
|
|
5
5
|
FilterId2["ConnectionType"] = "connection-type";
|
|
6
6
|
FilterId2["WifiConnectionType"] = "wifi-connection-type";
|
|
7
|
+
FilterId2["WifiConnectionType2"] = "wifi-connection-type-2";
|
|
7
8
|
FilterId2["SupportedSpeeds"] = "supported-speeds";
|
|
8
9
|
FilterId2["PortCount"] = "port-count";
|
|
9
10
|
FilterId2["PoeSupport"] = "poe-support";
|
|
11
|
+
FilterId2["PoeBasicSupport"] = "poe-basic-support";
|
|
10
12
|
FilterId2["OutdoorSupport"] = "outdoor-support";
|
|
11
13
|
FilterId2["Resolution"] = "resolution";
|
|
12
14
|
FilterId2["OutdoorRating"] = "outdoor-rating";
|
|
@@ -20,6 +22,20 @@ var FilterId = /* @__PURE__ */(FilterId2 => {
|
|
|
20
22
|
FilterId2["WiredFeatures"] = "wired-features";
|
|
21
23
|
FilterId2["UispAccessoriesFeatures"] = "uisp-accessories-features";
|
|
22
24
|
FilterId2["EtherLighting"] = "etherlighting";
|
|
25
|
+
FilterId2["ClientDevices"] = "performance-client-devices";
|
|
26
|
+
FilterId2["ThroughputRate"] = "throughput-rate";
|
|
27
|
+
FilterId2["UnifiDevices"] = "unifi-devices";
|
|
28
|
+
FilterId2["RedundantPower"] = "redundant-power";
|
|
29
|
+
FilterId2["Streams"] = "streams";
|
|
30
|
+
FilterId2["Radios"] = "radios";
|
|
31
|
+
FilterId2["ExternalAntennaSupport"] = "external-antenna-support";
|
|
32
|
+
FilterId2["IntegratedStorage"] = "integrated-storage";
|
|
33
|
+
FilterId2["WirelessOption"] = "wireless-option";
|
|
34
|
+
FilterId2["AIDetectionOption"] = "ai-detection-options";
|
|
35
|
+
FilterId2["OpticalZoomOption"] = "optical-zoom-options";
|
|
36
|
+
FilterId2["PreInstalledStorageOption"] = "pre-installed-storage-option";
|
|
37
|
+
FilterId2["CoverageDegree"] = "coverage-degree";
|
|
38
|
+
FilterId2["CameraCount"] = "camera-count";
|
|
23
39
|
FilterId2["Other"] = "other";
|
|
24
40
|
return FilterId2;
|
|
25
41
|
})(FilterId || {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters.js","sources":["../../../../src/constants/proStoreCategories/mapping/filters.ts"],"sourcesContent":["// #############################################################################\n// Filter IDs\n// #############################################################################\nexport enum FilterId {\n ConnectionType = \"connection-type\",\n WifiConnectionType = \"wifi-connection-type\",\n SupportedSpeeds = \"supported-speeds\",\n PortCount = \"port-count\",\n PoeSupport = \"poe-support\",\n OutdoorSupport = \"outdoor-support\",\n Resolution = \"resolution\",\n OutdoorRating = \"outdoor-rating\",\n AdditionalFeatures = \"additional-features\",\n DoorAccessFeatures = \"door-access-features\",\n PhoneSystemFeatures = \"phone-system-features\",\n AccessoriesFeatures = \"accessories-features\",\n \"60GhWirelessFeatures\" = \"60gh-wireless-features\",\n WirelessFeatures = \"wireless-features\",\n FiberFeatures = \"fiber-features\",\n WiredFeatures = \"wired-features\",\n UispAccessoriesFeatures = \"uisp-accessories-features\",\n EtherLighting = \"etherlighting\",\n // For now used for \"In Stock\" and \"UI Care\" filters\n Other = \"other\",\n}\n"],"names":["FilterId"],"mappings":";;;AAGY,IAAAA,QAAA,GAAA,gBAAAA,SAAL,IAAA;EACLA,UAAA,gBAAiB,CAAA,GAAA,iBAAA;EACjBA,UAAA,oBAAqB,CAAA,GAAA,sBAAA;EACrBA,UAAA,iBAAkB,CAAA,GAAA,kBAAA;EAClBA,UAAA,WAAY,CAAA,GAAA,YAAA;EACZA,UAAA,YAAa,CAAA,GAAA,aAAA;EACbA,UAAA,gBAAiB,CAAA,GAAA,iBAAA;EACjBA,UAAA,YAAa,CAAA,GAAA,YAAA;EACbA,UAAA,eAAgB,CAAA,GAAA,gBAAA;EAChBA,UAAA,oBAAqB,CAAA,GAAA,qBAAA;EACrBA,UAAA,oBAAqB,CAAA,GAAA,sBAAA;EACrBA,UAAA,qBAAsB,CAAA,GAAA,uBAAA;EACtBA,UAAA,qBAAsB,CAAA,GAAA,sBAAA;EACtBA,UAAA,sBAAyB,CAAA,GAAA,wBAAA;EACzBA,UAAA,kBAAmB,CAAA,GAAA,mBAAA;EACnBA,UAAA,eAAgB,CAAA,GAAA,gBAAA;EAChBA,UAAA,eAAgB,CAAA,GAAA,gBAAA;EAChBA,UAAA,yBAA0B,CAAA,GAAA,2BAAA;EAC1BA,UAAA,eAAgB,CAAA,GAAA,eAAA;
|
|
1
|
+
{"version":3,"file":"filters.js","sources":["../../../../src/constants/proStoreCategories/mapping/filters.ts"],"sourcesContent":["// #############################################################################\n// Filter IDs\n// #############################################################################\nexport enum FilterId {\n ConnectionType = \"connection-type\",\n WifiConnectionType = \"wifi-connection-type\",\n WifiConnectionType2 = \"wifi-connection-type-2\",\n SupportedSpeeds = \"supported-speeds\",\n PortCount = \"port-count\",\n PoeSupport = \"poe-support\",\n PoeBasicSupport = \"poe-basic-support\",\n OutdoorSupport = \"outdoor-support\",\n Resolution = \"resolution\",\n OutdoorRating = \"outdoor-rating\",\n AdditionalFeatures = \"additional-features\",\n DoorAccessFeatures = \"door-access-features\",\n PhoneSystemFeatures = \"phone-system-features\",\n AccessoriesFeatures = \"accessories-features\",\n \"60GhWirelessFeatures\" = \"60gh-wireless-features\",\n WirelessFeatures = \"wireless-features\",\n FiberFeatures = \"fiber-features\",\n WiredFeatures = \"wired-features\",\n UispAccessoriesFeatures = \"uisp-accessories-features\",\n EtherLighting = \"etherlighting\",\n ClientDevices = \"performance-client-devices\",\n ThroughputRate = \"throughput-rate\",\n UnifiDevices = \"unifi-devices\",\n RedundantPower = \"redundant-power\",\n Streams = \"streams\",\n Radios = \"radios\",\n ExternalAntennaSupport = \"external-antenna-support\",\n IntegratedStorage = \"integrated-storage\",\n WirelessOption = \"wireless-option\",\n AIDetectionOption = \"ai-detection-options\",\n OpticalZoomOption = \"optical-zoom-options\",\n PreInstalledStorageOption = \"pre-installed-storage-option\",\n CoverageDegree = \"coverage-degree\",\n CameraCount = \"camera-count\",\n // For now used for \"In Stock\" and \"UI Care\" filters\n Other = \"other\",\n}\n"],"names":["FilterId"],"mappings":";;;AAGY,IAAAA,QAAA,GAAA,gBAAAA,SAAL,IAAA;EACLA,UAAA,gBAAiB,CAAA,GAAA,iBAAA;EACjBA,UAAA,oBAAqB,CAAA,GAAA,sBAAA;EACrBA,UAAA,qBAAsB,CAAA,GAAA,wBAAA;EACtBA,UAAA,iBAAkB,CAAA,GAAA,kBAAA;EAClBA,UAAA,WAAY,CAAA,GAAA,YAAA;EACZA,UAAA,YAAa,CAAA,GAAA,aAAA;EACbA,UAAA,iBAAkB,CAAA,GAAA,mBAAA;EAClBA,UAAA,gBAAiB,CAAA,GAAA,iBAAA;EACjBA,UAAA,YAAa,CAAA,GAAA,YAAA;EACbA,UAA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iConnectionType"] = "wifi-connection-type";
|
|
6
|
+
FilterId2["WifiConnectionType2"] = "wifi-connection-type-2";
|
|
6
7
|
FilterId2["SupportedSpeeds"] = "supported-speeds";
|
|
7
8
|
FilterId2["PortCount"] = "port-count";
|
|
8
9
|
FilterId2["PoeSupport"] = "poe-support";
|
|
10
|
+
FilterId2["PoeBasicSupport"] = "poe-basic-support";
|
|
9
11
|
FilterId2["OutdoorSupport"] = "outdoor-support";
|
|
10
12
|
FilterId2["Resolution"] = "resolution";
|
|
11
13
|
FilterId2["OutdoorRating"] = "outdoor-rating";
|
|
@@ -19,6 +21,20 @@ var FilterId = /* @__PURE__ */(FilterId2 => {
|
|
|
19
21
|
FilterId2["WiredFeatures"] = "wired-features";
|
|
20
22
|
FilterId2["UispAccessoriesFeatures"] = "uisp-accessories-features";
|
|
21
23
|
FilterId2["EtherLighting"] = "etherlighting";
|
|
24
|
+
FilterId2["ClientDevices"] = "performance-client-devices";
|
|
25
|
+
FilterId2["ThroughputRate"] = "throughput-rate";
|
|
26
|
+
FilterId2["UnifiDevices"] = "unifi-devices";
|
|
27
|
+
FilterId2["RedundantPower"] = "redundant-power";
|
|
28
|
+
FilterId2["Streams"] = "streams";
|
|
29
|
+
FilterId2["Radios"] = "radios";
|
|
30
|
+
FilterId2["ExternalAntennaSupport"] = "external-antenna-support";
|
|
31
|
+
FilterId2["IntegratedStorage"] = "integrated-storage";
|
|
32
|
+
FilterId2["WirelessOption"] = "wireless-option";
|
|
33
|
+
FilterId2["AIDetectionOption"] = "ai-detection-options";
|
|
34
|
+
FilterId2["OpticalZoomOption"] = "optical-zoom-options";
|
|
35
|
+
FilterId2["PreInstalledStorageOption"] = "pre-installed-storage-option";
|
|
36
|
+
FilterId2["CoverageDegree"] = "coverage-degree";
|
|
37
|
+
FilterId2["CameraCount"] = "camera-count";
|
|
22
38
|
FilterId2["Other"] = "other";
|
|
23
39
|
return FilterId2;
|
|
24
40
|
})(FilterId || {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters.mjs","sources":["../../../../src/constants/proStoreCategories/mapping/filters.ts"],"sourcesContent":["// #############################################################################\n// Filter IDs\n// #############################################################################\nexport enum FilterId {\n ConnectionType = \"connection-type\",\n WifiConnectionType = \"wifi-connection-type\",\n SupportedSpeeds = \"supported-speeds\",\n PortCount = \"port-count\",\n PoeSupport = \"poe-support\",\n OutdoorSupport = \"outdoor-support\",\n Resolution = \"resolution\",\n OutdoorRating = \"outdoor-rating\",\n AdditionalFeatures = \"additional-features\",\n DoorAccessFeatures = \"door-access-features\",\n PhoneSystemFeatures = \"phone-system-features\",\n AccessoriesFeatures = \"accessories-features\",\n \"60GhWirelessFeatures\" = \"60gh-wireless-features\",\n WirelessFeatures = \"wireless-features\",\n FiberFeatures = \"fiber-features\",\n WiredFeatures = \"wired-features\",\n UispAccessoriesFeatures = \"uisp-accessories-features\",\n EtherLighting = \"etherlighting\",\n // For now used for \"In Stock\" and \"UI Care\" filters\n Other = \"other\",\n}\n"],"names":["FilterId"],"mappings":";;AAGY,IAAAA,QAAA,GAAA,gBAAAA,SAAL,IAAA;EACLA,UAAA,gBAAiB,CAAA,GAAA,iBAAA;EACjBA,UAAA,oBAAqB,CAAA,GAAA,sBAAA;EACrBA,UAAA,iBAAkB,CAAA,GAAA,kBAAA;EAClBA,UAAA,WAAY,CAAA,GAAA,YAAA;EACZA,UAAA,YAAa,CAAA,GAAA,aAAA;EACbA,UAAA,gBAAiB,CAAA,GAAA,iBAAA;EACjBA,UAAA,YAAa,CAAA,GAAA,YAAA;EACbA,UAAA,eAAgB,CAAA,GAAA,gBAAA;EAChBA,UAAA,oBAAqB,CAAA,GAAA,qBAAA;EACrBA,UAAA,oBAAqB,CAAA,GAAA,sBAAA;EACrBA,UAAA,qBAAsB,CAAA,GAAA,uBAAA;EACtBA,UAAA,qBAAsB,CAAA,GAAA,sBAAA;EACtBA,UAAA,sBAAyB,CAAA,GAAA,wBAAA;EACzBA,UAAA,kBAAmB,CAAA,GAAA,mBAAA;EACnBA,UAAA,eAAgB,CAAA,GAAA,gBAAA;EAChBA,UAAA,eAAgB,CAAA,GAAA,gBAAA;EAChBA,UAAA,yBAA0B,CAAA,GAAA,2BAAA;EAC1BA,UAAA,eAAgB,CAAA,GAAA,eAAA;
|
|
1
|
+
{"version":3,"file":"filters.mjs","sources":["../../../../src/constants/proStoreCategories/mapping/filters.ts"],"sourcesContent":["// #############################################################################\n// Filter IDs\n// #############################################################################\nexport enum FilterId {\n ConnectionType = \"connection-type\",\n WifiConnectionType = \"wifi-connection-type\",\n WifiConnectionType2 = \"wifi-connection-type-2\",\n SupportedSpeeds = \"supported-speeds\",\n PortCount = \"port-count\",\n PoeSupport = \"poe-support\",\n PoeBasicSupport = \"poe-basic-support\",\n OutdoorSupport = \"outdoor-support\",\n Resolution = \"resolution\",\n OutdoorRating = \"outdoor-rating\",\n AdditionalFeatures = \"additional-features\",\n DoorAccessFeatures = \"door-access-features\",\n PhoneSystemFeatures = \"phone-system-features\",\n AccessoriesFeatures = \"accessories-features\",\n \"60GhWirelessFeatures\" = \"60gh-wireless-features\",\n WirelessFeatures = \"wireless-features\",\n FiberFeatures = \"fiber-features\",\n WiredFeatures = \"wired-features\",\n UispAccessoriesFeatures = \"uisp-accessories-features\",\n EtherLighting = \"etherlighting\",\n ClientDevices = \"performance-client-devices\",\n ThroughputRate = \"throughput-rate\",\n UnifiDevices = \"unifi-devices\",\n RedundantPower = \"redundant-power\",\n Streams = \"streams\",\n Radios = \"radios\",\n ExternalAntennaSupport = \"external-antenna-support\",\n IntegratedStorage = \"integrated-storage\",\n WirelessOption = \"wireless-option\",\n AIDetectionOption = \"ai-detection-options\",\n OpticalZoomOption = \"optical-zoom-options\",\n PreInstalledStorageOption = \"pre-installed-storage-option\",\n CoverageDegree = \"coverage-degree\",\n CameraCount = \"camera-count\",\n // For now used for \"In Stock\" and \"UI Care\" filters\n Other = \"other\",\n}\n"],"names":["FilterId"],"mappings":";;AAGY,IAAAA,QAAA,GAAA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B,CAAA,GAAA,sBAAA;EACpBA,UAAA,2BAA4B,CAAA,GAAA,8BAAA;EAC5BA,UAAA,gBAAiB,CAAA,GAAA,iBAAA;EACjBA,UAAA,aAAc,CAAA,GAAA,cAAA;EAEdA,UAAA,OAAQ,CAAA,GAAA,OAAA;EApCEA,OAAAA,SAAAA;AAAA,CAAA,EAAAA,QAAA,IAAA,CAAA,CAAA,CAAA;"}
|
|
@@ -22,6 +22,7 @@ export declare const getProStoreCategoryMapping: (translations?: {
|
|
|
22
22
|
Bullet: string;
|
|
23
23
|
"Cables & Modules": string;
|
|
24
24
|
Cabling: string;
|
|
25
|
+
"Camera Accessories": string;
|
|
25
26
|
"Camera Security": string;
|
|
26
27
|
"Cloud Gateways": string;
|
|
27
28
|
Compact: string;
|
|
@@ -91,7 +92,6 @@ export declare const getProStoreCategoryMapping: (translations?: {
|
|
|
91
92
|
Utility: string;
|
|
92
93
|
Wall: string;
|
|
93
94
|
"Wave 60 GHz": string;
|
|
94
|
-
"Wave MLO": string;
|
|
95
95
|
"What's New": string;
|
|
96
96
|
WiFi: string;
|
|
97
97
|
"WiFi CPE": string;
|
|
@@ -102,7 +102,8 @@ const getProStoreCategoryMapping = (translations = en["default"]) => {
|
|
|
102
102
|
label: formatMessage("WiFi Integrated"),
|
|
103
103
|
collectionSlugs: ["cloud-gateways-wifi-integrated"]
|
|
104
104
|
}],
|
|
105
|
-
filters: [filters.FilterId.ConnectionType]
|
|
105
|
+
filters: [filters.FilterId.ConnectionType],
|
|
106
|
+
storeFilters: [filters.FilterId.PoeBasicSupport, filters.FilterId.IntegratedStorage, filters.FilterId.SupportedSpeeds, filters.FilterId.ThroughputRate, filters.FilterId.ClientDevices, filters.FilterId.UnifiDevices]
|
|
106
107
|
}, {
|
|
107
108
|
id: unifi.UniFiCategoryId.Switching,
|
|
108
109
|
slug: unifi.UniFiCategorySlug.Switching,
|
|
@@ -147,7 +148,8 @@ const getProStoreCategoryMapping = (translations = en["default"]) => {
|
|
|
147
148
|
label: formatMessage("Utility"),
|
|
148
149
|
collectionSlugs: ["switching-utility"]
|
|
149
150
|
}],
|
|
150
|
-
filters: [filters.FilterId.SupportedSpeeds, filters.FilterId.PortCount, filters.FilterId.PoeSupport, filters.FilterId.EtherLighting, filters.FilterId.OutdoorSupport]
|
|
151
|
+
filters: [filters.FilterId.SupportedSpeeds, filters.FilterId.PortCount, filters.FilterId.PoeSupport, filters.FilterId.EtherLighting, filters.FilterId.OutdoorSupport],
|
|
152
|
+
storeFilters: [filters.FilterId.PoeSupport, filters.FilterId.PortCount, filters.FilterId.SupportedSpeeds, filters.FilterId.EtherLighting, filters.FilterId.RedundantPower, filters.FilterId.OutdoorSupport]
|
|
151
153
|
}, {
|
|
152
154
|
id: unifi.UniFiCategoryId.WiFi,
|
|
153
155
|
slug: unifi.UniFiCategorySlug.WiFi,
|
|
@@ -193,7 +195,8 @@ const getProStoreCategoryMapping = (translations = en["default"]) => {
|
|
|
193
195
|
collectionSlugs: ["unifi-wifi-building-bridge"],
|
|
194
196
|
disabledStores: [generated.StoreId.In, generated.StoreId.Br]
|
|
195
197
|
}],
|
|
196
|
-
filters: [filters.FilterId.WifiConnectionType]
|
|
198
|
+
filters: [filters.FilterId.WifiConnectionType],
|
|
199
|
+
storeFilters: [filters.FilterId.WifiConnectionType2, filters.FilterId.SupportedSpeeds, filters.FilterId.Streams, filters.FilterId.Radios, filters.FilterId.ExternalAntennaSupport]
|
|
197
200
|
}, {
|
|
198
201
|
id: unifi.UniFiCategoryId.CamerasNVRs,
|
|
199
202
|
slug: unifi.UniFiCategorySlug.CamerasNVRs,
|
|
@@ -214,7 +217,8 @@ const getProStoreCategoryMapping = (translations = en["default"]) => {
|
|
|
214
217
|
items: [{
|
|
215
218
|
id: unifi.UniFiChildCategorySlug.CamerasNVR,
|
|
216
219
|
label: formatMessage("NVRs & Viewport"),
|
|
217
|
-
collectionSlugs: ["unifi-camera-security-nvr"]
|
|
220
|
+
collectionSlugs: ["unifi-camera-security-nvr"],
|
|
221
|
+
filters: [filters.FilterId.CameraCount]
|
|
218
222
|
}, {
|
|
219
223
|
id: unifi.UniFiChildCategorySlug.CamerasDomeTurret,
|
|
220
224
|
label: formatMessage("Dome & Turret"),
|
|
@@ -249,8 +253,13 @@ const getProStoreCategoryMapping = (translations = en["default"]) => {
|
|
|
249
253
|
label: formatMessage("Special Devices"),
|
|
250
254
|
collectionSlugs: ["unifi-camera-security-special"],
|
|
251
255
|
disabledStores: [generated.StoreId.Mx]
|
|
256
|
+
}, {
|
|
257
|
+
id: unifi.UniFiChildCategorySlug.CamerasAccessories,
|
|
258
|
+
label: formatMessage("Camera Accessories"),
|
|
259
|
+
collectionSlugs: ["accessories-pro-camera"]
|
|
252
260
|
}],
|
|
253
|
-
filters: [filters.FilterId.Resolution, filters.FilterId.OutdoorRating, filters.FilterId.AdditionalFeatures]
|
|
261
|
+
filters: [filters.FilterId.Resolution, filters.FilterId.OutdoorRating, filters.FilterId.AdditionalFeatures],
|
|
262
|
+
storeFilters: [filters.FilterId.Resolution, filters.FilterId.OutdoorRating, filters.FilterId.WirelessOption, filters.FilterId.AIDetectionOption, filters.FilterId.OpticalZoomOption, filters.FilterId.PreInstalledStorageOption, filters.FilterId.CoverageDegree]
|
|
254
263
|
}, {
|
|
255
264
|
id: unifi.UniFiCategoryId.DoorAccess,
|
|
256
265
|
slug: unifi.UniFiCategorySlug.DoorAccess,
|
|
@@ -340,7 +349,7 @@ const getProStoreCategoryMapping = (translations = en["default"]) => {
|
|
|
340
349
|
id: unifi.UniFiChildCategorySlug.IntegrationsPowerTech,
|
|
341
350
|
label: formatMessage("Power Tech"),
|
|
342
351
|
collectionSlugs: ["power-tech"],
|
|
343
|
-
enableProductGrouping: [generated.StoreId.Us, generated.StoreId.Ca, generated.StoreId.Eu, generated.StoreId.Uk, generated.StoreId.Tw
|
|
352
|
+
enableProductGrouping: [generated.StoreId.Us, generated.StoreId.Ca, generated.StoreId.Eu, generated.StoreId.Uk, generated.StoreId.Tw]
|
|
344
353
|
}]
|
|
345
354
|
}, {
|
|
346
355
|
id: unifi.UniFiCategoryId.AdvancedHosting,
|
|
@@ -472,11 +481,6 @@ const getProStoreCategoryMapping = (translations = en["default"]) => {
|
|
|
472
481
|
},
|
|
473
482
|
disabledStores: [generated.StoreId.Br, generated.StoreId.Mx],
|
|
474
483
|
items: [{
|
|
475
|
-
id: uisp.UISPChildCategorySlug.WirelessWaveMLO,
|
|
476
|
-
label: formatMessage("Wave MLO"),
|
|
477
|
-
collectionSlugs: ["wireless-mlo"],
|
|
478
|
-
disabledStores: store.inverseStoreSelect([generated.StoreId.Us, generated.StoreId.Ca, generated.StoreId.Uk, generated.StoreId.Eu])
|
|
479
|
-
}, {
|
|
480
484
|
id: uisp.UISPChildCategorySlug.WirelessLTU5Ghz,
|
|
481
485
|
label: formatMessage("LTU 5 GHz"),
|
|
482
486
|
collectionSlugs: ["wireless-ltu-5-ghz"],
|