@ubnt/store.core 9.44.2 → 9.44.3-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 +57 -0
- package/lib/apis/smartcat.d.ts +4 -4
- package/lib/apis/smartcat.js +1 -1
- package/lib/apis/smartcat.js.map +1 -1
- package/lib/apis/smartcat.mjs +1 -1
- package/lib/apis/smartcat.mjs.map +1 -1
- package/lib/assets/cart-secondary.svg +5 -0
- 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/assets/icons/cart-secondary.svg.js +27 -0
- package/lib/assets/icons/cart-secondary.svg.js.map +1 -0
- package/lib/assets/icons/cart-secondary.svg.mjs +3 -0
- package/lib/assets/icons/cart-secondary.svg.mjs.map +1 -0
- package/lib/assets/icons/menu/{icon-globe.svg.js → 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/assets/pause.svg +3 -3
- package/lib/assets/pause2.svg +3 -3
- package/lib/assets/port.svg +4 -2
- package/lib/assets/port2.svg +2 -4
- package/lib/components/Accordion/Accordion.js +2 -2
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/Accordion/Accordion.mjs +2 -2
- package/lib/components/Accordion/Accordion.mjs.map +1 -1
- package/lib/components/BackInStock/BackInStock.types.d.ts +1 -0
- package/lib/components/Button/Button.js +7 -0
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/Button/Button.mjs +8 -1
- package/lib/components/Button/Button.mjs.map +1 -1
- package/lib/components/Button/CartButton.d.ts +3 -1
- package/lib/components/Button/CartButton.js +9 -4
- package/lib/components/Button/CartButton.js.map +1 -1
- package/lib/components/Button/CartButton.mjs +8 -4
- package/lib/components/Button/CartButton.mjs.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.d.ts +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.js +16 -4
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.js.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.mjs +17 -5
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.mjs.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.d.ts +5 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.js +82 -17
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.js.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.mjs +82 -17
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.mjs.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.types.d.ts +4 -0
- 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/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/CustomImage/CustomImage.js +4 -4
- package/lib/components/CustomImage/CustomImage.js.map +1 -1
- package/lib/components/CustomImage/CustomImage.mjs +4 -4
- package/lib/components/CustomImage/CustomImage.mjs.map +1 -1
- package/lib/components/Explore/ExploreData.js +12 -12
- package/lib/components/Explore/ExploreData.js.map +1 -1
- package/lib/components/Explore/ExploreData.mjs +12 -12
- package/lib/components/Explore/ExploreData.mjs.map +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.js +2 -2
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.js.map +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.mjs +2 -2
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.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/Gallery/Gallery.context.js.map +1 -1
- package/lib/components/Gallery/Gallery.context.mjs.map +1 -1
- package/lib/components/Gallery/GalleryItem/GalleryItem.js +3 -1
- package/lib/components/Gallery/GalleryItem/GalleryItem.js.map +1 -1
- package/lib/components/Gallery/GalleryItem/GalleryItem.mjs +3 -1
- package/lib/components/Gallery/GalleryItem/GalleryItem.mjs.map +1 -1
- package/lib/components/Header/AccountFrame/AccountFrame.js +3 -3
- package/lib/components/Header/AccountFrame/AccountFrame.js.map +1 -1
- package/lib/components/Header/AccountFrame/AccountFrame.mjs +3 -3
- package/lib/components/Header/AccountFrame/AccountFrame.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/CartModalV2/Item/Item.styles.d.ts +1 -1
- package/lib/components/Header/Header.js +12 -12
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/Header.mjs +12 -12
- 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 +30 -6
- 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/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/MicrositeMenu/MicrositeMenu.js +2 -2
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.js.map +1 -1
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.mjs +2 -2
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.mjs.map +1 -1
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.d.ts +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.d.ts +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.d.ts +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js +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 +260 -175
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +261 -177
- 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 +1 -1
- package/lib/components/Hero/Hero.js.map +1 -1
- package/lib/components/Hero/Hero.mjs +1 -1
- package/lib/components/Hero/Hero.mjs.map +1 -1
- package/lib/components/Hero/Hero.styles.d.ts +2 -2
- package/lib/components/HeroFadeGallery/HeroFadeGallery.styles.d.ts +1 -1
- package/lib/components/HeroVideo/HeroVideo.js +5 -5
- package/lib/components/HeroVideo/HeroVideo.js.map +1 -1
- package/lib/components/HeroVideo/HeroVideo.mjs +5 -5
- package/lib/components/HeroVideo/HeroVideo.mjs.map +1 -1
- package/lib/components/HowToUseSection/HowToUseSection.styles.d.ts +2 -2
- package/lib/components/ImageCarousel/ImageCarousel.js.map +1 -1
- package/lib/components/ImageCarousel/ImageCarousel.mjs.map +1 -1
- package/lib/components/LandingPagePro/LandingPagePro.js +4 -1
- package/lib/components/LandingPagePro/LandingPagePro.js.map +1 -1
- package/lib/components/LandingPagePro/LandingPagePro.mjs +4 -1
- package/lib/components/LandingPagePro/LandingPagePro.mjs.map +1 -1
- package/lib/components/LandingPagePro/LandingPagePro.styles.d.ts +1 -1
- package/lib/components/LandingPageSidebar/LandingPageSidebar.js +8 -8
- package/lib/components/LandingPageSidebar/LandingPageSidebar.js.map +1 -1
- package/lib/components/LandingPageSidebar/LandingPageSidebar.mjs +8 -8
- package/lib/components/LandingPageSidebar/LandingPageSidebar.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/LoaderDots/LoaderDots.d.ts +1 -1
- package/lib/components/LoaderDots/LoaderDots.js +3 -1
- package/lib/components/LoaderDots/LoaderDots.js.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.mjs +3 -1
- package/lib/components/LoaderDots/LoaderDots.mjs.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.styles.d.ts +2 -1
- package/lib/components/LoaderDots/LoaderDots.styles.js +11 -1
- package/lib/components/LoaderDots/LoaderDots.styles.js.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.styles.mjs +11 -1
- package/lib/components/LoaderDots/LoaderDots.styles.mjs.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.types.d.ts +2 -0
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.js +4 -4
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.js.map +1 -1
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.mjs +4 -4
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.mjs.map +1 -1
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.styles.d.ts +1 -1
- package/lib/components/MicrositeHero/MicrositeHero.js +2 -2
- package/lib/components/MicrositeHero/MicrositeHero.js.map +1 -1
- package/lib/components/MicrositeHero/MicrositeHero.mjs +2 -2
- package/lib/components/MicrositeHero/MicrositeHero.mjs.map +1 -1
- package/lib/components/MicrositeSectionWrap/MicrositeSectionWrap.styles.d.ts +1 -1
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +1 -1
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.mjs +1 -1
- package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.js +1 -1
- package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.mjs +2 -2
- package/lib/components/Microsites/Microsites.types.js.map +1 -1
- package/lib/components/Microsites/Microsites.types.mjs.map +1 -1
- package/lib/components/ModelCompareV3/ModelComparePropertyValueGridItem.js +37 -26
- package/lib/components/ModelCompareV3/ModelComparePropertyValueGridItem.js.map +1 -1
- package/lib/components/ModelCompareV3/ModelComparePropertyValueGridItem.mjs +37 -26
- package/lib/components/ModelCompareV3/ModelComparePropertyValueGridItem.mjs.map +1 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.types.d.ts +1 -1
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridItem.js +16 -8
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridItem.js.map +1 -1
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridItem.mjs +16 -8
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridItem.mjs.map +1 -1
- package/lib/components/ModelCompareV3/StickyGrid/context.d.ts +3 -3
- package/lib/components/ModelCompareV3/StickyGrid/context.js.map +1 -1
- package/lib/components/ModelCompareV3/StickyGrid/context.mjs.map +1 -1
- package/lib/components/ModelCompareV3/assets/port.svg.js +1 -1
- package/lib/components/ModelCompareV3/assets/port.svg.mjs +2 -2
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.js +4 -2
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.mjs +4 -2
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.js +2 -2
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.mjs +2 -2
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/express.js +3 -3
- package/lib/components/ModelCompareV3/data/products/express.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/express.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/express.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.js +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.mjs +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayLite.js +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayLite.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayLite.mjs +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayLite.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayMax.js +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayMax.mjs +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.js +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.mjs +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.js +3 -1
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.mjs +3 -1
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js +3 -3
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.js +3 -3
- package/lib/components/ModelCompareV3/data/products/udmPro.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.js +3 -3
- package/lib/components/ModelCompareV3/data/products/udmProMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +3 -3
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udr.js +5 -41
- package/lib/components/ModelCompareV3/data/products/udr.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udr.mjs +5 -21
- package/lib/components/ModelCompareV3/data/products/udr.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udw.js +3 -3
- package/lib/components/ModelCompareV3/data/products/udw.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udw.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/udw.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/properties/redundantRj45Port.js +1 -1
- package/lib/components/ModelCompareV3/data/properties/redundantRj45Port.mjs +1 -1
- package/lib/components/PriceRangeSlider/PriceRangeSlider.types.d.ts +2 -2
- package/lib/components/PriceRangeSlider/PriceRangeSlider.types.js.map +1 -1
- package/lib/components/PriceRangeSlider/PriceRangeSlider.types.mjs.map +1 -1
- package/lib/components/ProductCard/ProductCard.js +1 -1
- package/lib/components/ProductCard/ProductCard.js.map +1 -1
- package/lib/components/ProductCard/ProductCard.mjs +2 -2
- package/lib/components/ProductCard/ProductCard.mjs.map +1 -1
- package/lib/components/ProductCardPopup/ProductCardPopup.js +2 -2
- package/lib/components/ProductCardPopup/ProductCardPopup.js.map +1 -1
- package/lib/components/ProductCardPopup/ProductCardPopup.mjs +2 -2
- package/lib/components/ProductCardPopup/ProductCardPopup.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 +6 -1
- package/lib/components/ProductSectionTabs/ProductSectionTabs.js.map +1 -1
- package/lib/components/ProductSectionTabs/ProductSectionTabs.mjs +6 -1
- package/lib/components/ProductSectionTabs/ProductSectionTabs.mjs.map +1 -1
- package/lib/components/ProductTechSpecs/ProductTechSpecs.styles.d.ts +2 -2
- package/lib/components/ProductWizard/ProductWizard.js +3 -3
- package/lib/components/ProductWizard/ProductWizard.js.map +1 -1
- package/lib/components/ProductWizard/ProductWizard.mjs +3 -3
- package/lib/components/ProductWizard/ProductWizard.mjs.map +1 -1
- package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.js +17 -4
- package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.js.map +1 -1
- package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.mjs +17 -4
- package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.js +4 -4
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.mjs +4 -4
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/RecommendedPoeSwitches.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/RecommendedPoeSwitches.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/port.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/port.svg.mjs +2 -2
- 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 +87 -64
- package/lib/components/ScrollWrapper/ScrollWrapper.styles.js.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.styles.mjs +87 -64
- 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/StorageSliders/StorageSliders.context.js +17 -14
- package/lib/components/StorageSliders/StorageSliders.context.js.map +1 -1
- package/lib/components/StorageSliders/StorageSliders.context.mjs +17 -14
- package/lib/components/StorageSliders/StorageSliders.context.mjs.map +1 -1
- package/lib/components/StorybookUtils/StoryFaker.js.map +1 -1
- package/lib/components/StorybookUtils/StoryFaker.mjs.map +1 -1
- package/lib/components/VariantSelector/VariantSelector.js +4 -4
- package/lib/components/VariantSelector/VariantSelector.js.map +1 -1
- package/lib/components/VariantSelector/VariantSelector.mjs +4 -4
- package/lib/components/VariantSelector/VariantSelector.mjs.map +1 -1
- package/lib/components/VideoPlayerNew/VideoPlayer.js +14 -16
- package/lib/components/VideoPlayerNew/VideoPlayer.js.map +1 -1
- package/lib/components/VideoPlayerNew/VideoPlayer.mjs +14 -16
- package/lib/components/VideoPlayerNew/VideoPlayer.mjs.map +1 -1
- package/lib/components/VideoPlayerNew/assets/close.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/close.svg.mjs +2 -2
- package/lib/components/VideoPlayerNew/assets/pause.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/pause.svg.mjs +2 -2
- package/lib/constants/address.d.ts +1 -1
- package/lib/constants/address.js +34 -34
- package/lib/constants/address.js.map +1 -1
- package/lib/constants/address.mjs +34 -34
- package/lib/constants/address.mjs.map +1 -1
- package/lib/constants/postalCode.js +10 -10
- package/lib/constants/postalCode.js.map +1 -1
- package/lib/constants/postalCode.mjs +10 -10
- 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 +3 -2
- package/lib/constants/proStoreCategories/mapping/index.js +45 -51
- package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.mjs +44 -49
- 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/redirects.js +18 -3
- package/lib/constants/proStoreCategories/mapping/redirects.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/redirects.mjs +18 -3
- package/lib/constants/proStoreCategories/mapping/redirects.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.d.ts +8 -9
- package/lib/constants/proStoreCategories/mapping/unifi.js +8 -9
- package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.mjs +8 -9
- package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.js +4 -3
- package/lib/constants/proStoreCategories/translations/ar.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.mjs +4 -3
- package/lib/constants/proStoreCategories/translations/ar.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.js +4 -3
- package/lib/constants/proStoreCategories/translations/de.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.mjs +4 -3
- package/lib/constants/proStoreCategories/translations/de.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.js +4 -3
- package/lib/constants/proStoreCategories/translations/el.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.mjs +4 -3
- package/lib/constants/proStoreCategories/translations/el.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.js +3 -2
- package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs +3 -2
- package/lib/constants/proStoreCategories/translations/en.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.js +4 -3
- package/lib/constants/proStoreCategories/translations/es.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.mjs +4 -3
- package/lib/constants/proStoreCategories/translations/es.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.js +4 -3
- package/lib/constants/proStoreCategories/translations/fr.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.mjs +4 -3
- package/lib/constants/proStoreCategories/translations/fr.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.js +4 -3
- package/lib/constants/proStoreCategories/translations/it.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.mjs +4 -3
- package/lib/constants/proStoreCategories/translations/it.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.js +4 -3
- package/lib/constants/proStoreCategories/translations/ja.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.mjs +4 -3
- package/lib/constants/proStoreCategories/translations/ja.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js +4 -3
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs +4 -3
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +4 -3
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +4 -3
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +4 -3
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +4 -3
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs.map +1 -1
- package/lib/constants/proStoreFilters/mapping.d.ts +45 -3
- package/lib/constants/proStoreFilters/mapping.js +119 -9
- package/lib/constants/proStoreFilters/mapping.js.map +1 -1
- package/lib/constants/proStoreFilters/mapping.mjs +119 -9
- 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 +28 -27
- package/lib/contexts/MenuContext/context.js.map +1 -1
- package/lib/contexts/MenuContext/context.mjs +28 -27
- 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/helpers/ux.d.ts +8 -11
- package/lib/helpers/ux.js +15 -4
- package/lib/helpers/ux.js.map +1 -1
- package/lib/helpers/ux.mjs +15 -4
- package/lib/helpers/ux.mjs.map +1 -1
- package/lib/hooks/useScrollToY.js.map +1 -1
- package/lib/hooks/useScrollToY.mjs.map +1 -1
- package/lib/utils/collectionSlug.js +2 -2
- package/lib/utils/collectionSlug.js.map +1 -1
- package/lib/utils/collectionSlug.mjs +2 -2
- package/lib/utils/collectionSlug.mjs.map +1 -1
- package/lib/utils/errors.js.map +1 -1
- package/lib/utils/errors.mjs.map +1 -1
- package/lib/utils/measures.js +1 -0
- package/lib/utils/measures.js.map +1 -1
- package/lib/utils/measures.mjs +1 -0
- package/lib/utils/measures.mjs.map +1 -1
- package/lib/utils/money/format.js.map +1 -1
- package/lib/utils/money/format.mjs.map +1 -1
- package/lib/utils/money/misc.js +1 -1
- package/lib/utils/money/misc.js.map +1 -1
- package/lib/utils/money/misc.mjs +1 -1
- package/lib/utils/money/misc.mjs.map +1 -1
- package/lib/utils/nextjs/ssr/transform-css-module.js.map +1 -1
- package/lib/utils/nextjs/ssr/transform-css-module.mjs.map +1 -1
- package/lib/utils/number.js.map +1 -1
- package/lib/utils/number.mjs.map +1 -1
- package/lib/utils/product.js +4 -4
- package/lib/utils/product.js.map +1 -1
- package/lib/utils/product.mjs +4 -4
- package/lib/utils/product.mjs.map +1 -1
- package/lib/utils/tags.js +2 -2
- package/lib/utils/tags.js.map +1 -1
- package/lib/utils/tags.mjs +2 -2
- package/lib/utils/tags.mjs.map +1 -1
- package/package.json +1 -1
- package/lib/assets/icons/menu/icon-globe.svg.js.map +0 -1
- package/lib/assets/icons/menu/icon-globe.svg.mjs +0 -3
- package/lib/assets/icons/menu/icon-globe.svg.mjs.map +0 -1
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var styled = require('styled-components');
|
|
5
5
|
require('../../../../constants/proStoreCategories/index.js');
|
|
6
|
+
var unifi = require('../../../../constants/proStoreCategories/mapping/unifi.js');
|
|
6
7
|
var mapping = require('../../../../contexts/MenuContext/mapping.js');
|
|
7
|
-
var useTranslation = require('../../../../hooks/useTranslation.js');
|
|
8
8
|
require('../../../StyleableSvgImage/index.js');
|
|
9
9
|
require('../../assets/Consoles/bigCompare/udr.jpg.js');
|
|
10
10
|
require('../../assets/wifi-device.svg.js');
|
|
11
|
-
var
|
|
11
|
+
var useModelCompareTranslation = require('../../translations/useModelCompareTranslation.js');
|
|
12
12
|
require('../properties/index.js');
|
|
13
13
|
var clientDevices = require('../properties/clientDevices.js');
|
|
14
14
|
var idsIpsThroughput = require('../properties/idsIpsThroughput.js');
|
|
@@ -22,9 +22,7 @@ var unifiAppSuite = require('../properties/unifiAppSuite.js');
|
|
|
22
22
|
var unifiDevices = require('../properties/unifiDevices.js');
|
|
23
23
|
var wanPorts = require('../properties/wanPorts.js');
|
|
24
24
|
var StyleableSvgImage = require('../../../StyleableSvgImage/StyleableSvgImage.js');
|
|
25
|
-
var constants = require('../../../../types/constants.js');
|
|
26
25
|
var applications = require("../../../../assets/wifi-device.svg");
|
|
27
|
-
var unifi = require('../../../../constants/proStoreCategories/mapping/unifi.js');
|
|
28
26
|
var image = require("../../../../assets/udr2.jpg");
|
|
29
27
|
var nextAiInspection = require('../properties/nextAiInspection.js');
|
|
30
28
|
function _interopDefault(e) {
|
|
@@ -54,41 +52,7 @@ const Copy = styled__default["default"].span`
|
|
|
54
52
|
const UniFiAppSuiteCopy = () => {
|
|
55
53
|
const {
|
|
56
54
|
formatMessage
|
|
57
|
-
} =
|
|
58
|
-
defaultTranslation: en["default"],
|
|
59
|
-
additionalTranslations: {
|
|
60
|
-
[constants.Language.Ja]: () => Promise.resolve().then(function () {
|
|
61
|
-
return require('../../translations/ja.json.js');
|
|
62
|
-
}).then(res => res.default),
|
|
63
|
-
[constants.Language.Ar]: () => Promise.resolve().then(function () {
|
|
64
|
-
return require('../../translations/ar.json.js');
|
|
65
|
-
}).then(res => res.default),
|
|
66
|
-
[constants.Language.De]: () => Promise.resolve().then(function () {
|
|
67
|
-
return require('../../translations/de.json.js');
|
|
68
|
-
}).then(res => res.default),
|
|
69
|
-
[constants.Language.Es]: () => Promise.resolve().then(function () {
|
|
70
|
-
return require('../../translations/es.json.js');
|
|
71
|
-
}).then(res => res.default),
|
|
72
|
-
[constants.Language.El]: () => Promise.resolve().then(function () {
|
|
73
|
-
return require('../../translations/el.json.js');
|
|
74
|
-
}).then(res => res.default),
|
|
75
|
-
[constants.Language.It]: () => Promise.resolve().then(function () {
|
|
76
|
-
return require('../../translations/it.json.js');
|
|
77
|
-
}).then(res => res.default),
|
|
78
|
-
[constants.Language.Pt]: () => Promise.resolve().then(function () {
|
|
79
|
-
return require('../../translations/pt-BR.json.js');
|
|
80
|
-
}).then(res => res.default),
|
|
81
|
-
[constants.Language.Zh]: () => Promise.resolve().then(function () {
|
|
82
|
-
return require('../../translations/zh-Hans.json.js');
|
|
83
|
-
}).then(res => res.default),
|
|
84
|
-
[constants.Language.Fr]: () => Promise.resolve().then(function () {
|
|
85
|
-
return require('../../translations/fr.json.js');
|
|
86
|
-
}).then(res => res.default),
|
|
87
|
-
[constants.Language.Tw]: () => Promise.resolve().then(function () {
|
|
88
|
-
return require('../../translations/zh-Hant-TW.json.js');
|
|
89
|
-
}).then(res => res.default)
|
|
90
|
-
}
|
|
91
|
-
});
|
|
55
|
+
} = useModelCompareTranslation.useModelCompareTranslation();
|
|
92
56
|
return /* @__PURE__ */jsxRuntime.jsxs(UniFiAppSuitPropertyWrap, {
|
|
93
57
|
children: [/* @__PURE__ */jsxRuntime.jsx(Icon, {
|
|
94
58
|
src: applications__default["default"],
|
|
@@ -105,9 +69,9 @@ const udr = {
|
|
|
105
69
|
id: "udr",
|
|
106
70
|
title: "udr.title",
|
|
107
71
|
description: "udr.description",
|
|
108
|
-
techspecsPath: [mapping.SiteId.TechSpecs, `/unifi/${unifi.UniFiCategoryId.
|
|
72
|
+
techspecsPath: [mapping.SiteId.TechSpecs, `/unifi/${unifi.UniFiCategoryId.CloudGateways}/udr`],
|
|
109
73
|
storePathParts: {
|
|
110
|
-
category:
|
|
74
|
+
category: unifi.UniFiChildCategorySlug.CloudGatewaysWifiIntegrated,
|
|
111
75
|
productSlug: "udr"
|
|
112
76
|
},
|
|
113
77
|
image: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"udr.js","sources":["../../../../../src/components/ModelCompareV3/data/products/udr.tsx"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { UniFiCategoryId } from \"../../../../constants/proStoreCategories\";\nimport { Language, SiteId } from \"../../../../contexts/MenuContext/mapping\";\nimport { useTranslation } from \"../../../../hooks/useTranslation\";\nimport { StyleableSvgImage as StyleableSvgImageBase } from \"../../../StyleableSvgImage\";\nimport image from \"../../assets/Consoles/bigCompare/udr.jpg\";\nimport applications from \"../../assets/wifi-device.svg\";\nimport type { Product } from \"../../ModelCompareV3.types\";\nimport EN_TRANSLATION from \"../../translations/en.json\";\nimport { nextAiInspection } from \"../properties\";\nimport { clientDevices } from \"../properties/clientDevices\";\nimport { idsIpsThroughput } from \"../properties/idsIpsThroughput\";\nimport { integratedWiFi6 } from \"../properties/integratedWiFi6\";\nimport { lanPorts } from \"../properties/lanPorts\";\nimport { mounting } from \"../properties/mounting\";\nimport { powerRedundancy } from \"../properties/powerRedundancy\";\nimport { storage } from \"../properties/storage\";\nimport { throughput } from \"../properties/throughput\";\nimport { unifiAppSuite } from \"../properties/unifiAppSuite\";\nimport { unifiDevices } from \"../properties/unifiDevices\";\nimport { wanPorts } from \"../properties/wanPorts\";\n\nconst appSuiteKey = \"udr.unifiAppSuite\";\n\nconst UniFiAppSuitPropertyWrap = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst Icon = styled(StyleableSvgImageBase)`\n max-width: 15.75px;\n`;\n\nconst PlusCharacter = styled.span`\n margin: 0 5px;\n`;\n\nconst Copy = styled.span`\n text-align: start;\n line-height: 1.2;\n`;\n\nconst UniFiAppSuiteCopy = () => {\n const { formatMessage } = useTranslation({\n defaultTranslation: EN_TRANSLATION,\n additionalTranslations: {\n [Language.Ja]: () =>\n import(\"../../translations/ja.json\").then((res) => res.default),\n [Language.Ar]: () =>\n import(\"../../translations/ar.json\").then((res) => res.default),\n [Language.De]: () =>\n import(\"../../translations/de.json\").then((res) => res.default),\n [Language.Es]: () =>\n import(\"../../translations/es.json\").then((res) => res.default),\n [Language.El]: () =>\n import(\"../../translations/el.json\").then((res) => res.default),\n [Language.It]: () =>\n import(\"../../translations/it.json\").then((res) => res.default),\n [Language.Pt]: () =>\n import(\"../../translations/pt-BR.json\").then((res) => res.default),\n [Language.Zh]: () =>\n import(\"../../translations/zh-Hans.json\").then((res) => res.default),\n [Language.Fr]: () =>\n import(\"../../translations/fr.json\").then((res) => res.default),\n [Language.Tw]: () =>\n import(\"../../translations/zh-Hant-TW.json\").then((res) => res.default),\n },\n });\n\n return (\n <UniFiAppSuitPropertyWrap>\n <Icon src={applications} height={30} width={144} />\n <PlusCharacter>+</PlusCharacter>\n <Copy>{formatMessage(appSuiteKey)}</Copy>\n </UniFiAppSuitPropertyWrap>\n );\n};\n\nexport const udr: Product = {\n id: \"udr\",\n title: \"udr.title\",\n description: \"udr.description\",\n techspecsPath: [\n SiteId.TechSpecs,\n `/unifi/${UniFiCategoryId.UniFiCloudGateways}/udr`,\n ],\n storePathParts: {\n category: \"all-unifi-cloud-gateways\",\n productSlug: \"udr\",\n },\n image: {\n src: image,\n width: 175.75,\n height: 182,\n },\n propertyValues: [\n {\n propertyId: unifiAppSuite.id,\n value: {\n type: \"custom\",\n value: <UniFiAppSuiteCopy />,\n },\n },\n {\n propertyId: throughput.id,\n value: {\n type: \"translation\",\n value: \"udr.throughput\",\n },\n },\n {\n propertyId: idsIpsThroughput.id,\n value: {\n type: \"translation\",\n value: \"udr.idsIpsThroughput\",\n },\n },\n {\n propertyId: unifiDevices.id,\n value: {\n type: \"translation\",\n value: \"udr.unifiDevices\",\n },\n },\n {\n propertyId: clientDevices.id,\n value: {\n type: \"translation\",\n value: \"udr.clientDevices\",\n },\n },\n {\n propertyId: wanPorts.id,\n value: {\n type: \"translation\",\n value: \"udr.wanPorts\",\n },\n },\n {\n propertyId: lanPorts.id,\n value: {\n type: \"translation\",\n value: \"udr.lanPorts\",\n },\n },\n {\n propertyId: nextAiInspection.id,\n value: {\n type: \"boolean\",\n value: false,\n },\n },\n {\n propertyId: storage.id,\n value: {\n type: \"translation\",\n value: \"udr.storage\",\n },\n },\n {\n propertyId: powerRedundancy.id,\n value: {\n type: \"boolean\",\n value: false,\n },\n },\n {\n propertyId: mounting.id,\n value: {\n type: \"translation\",\n value: \"udr.mounting\",\n },\n },\n {\n propertyId: integratedWiFi6.id,\n value: {\n type: \"translation\",\n value: \"udr.integratedWiFi6\",\n },\n },\n ],\n};\n"],"names":["appSuiteKey","UniFiAppSuitPropertyWrap","styled","div","Icon","StyleableSvgImageBase","PlusCharacter","span","Copy","UniFiAppSuiteCopy","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","Promise","then","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","Tw","children","jsx","src","applications","height","width","udr","id","title","description","techspecsPath","SiteId","TechSpecs","UniFiCategoryId","UniFiCloudGateways","storePathParts","category","productSlug","image","propertyValues","propertyId","unifiAppSuite","value","type","throughput","idsIpsThroughput","unifiDevices","clientDevices","wanPorts","lanPorts","nextAiInspection","storage","powerRedundancy","mounting","integratedWiFi6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAMA,WAAc,GAAA,mBAAA;AAEpB,MAAMC,2BAA2BC,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA,CAAA;AAKxC,MAAMC,IAAA,GAAOF,eAAAA,CAAAA,SAAAA,EAAOG,iBAAAA,CAAAA,iBAAqB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AA,CAAAvB,EAAA;IAC7Be,KAAO,EAAA;MACLC,IAAM,EAAA,SAAA;MACND,KAAO,EAAA;IACT;EACF,CAAA,EACA;IACEF,YAAYW,OAAQ,CAAAA,OAAA,CAAAxB,EAAA;IACpBe,KAAO,EAAA;MACLC,IAAM,EAAA,aAAA;MACND,KAAO,EAAA;IACT;EACF,CAAA,EACA;IACEF,YAAYY,eAAgB,CAAAA,eAAA,CAAAzB,EAAA;IAC5Be,KAAO,EAAA;MACLC,IAAM,EAAA,SAAA;MACND,KAAO,EAAA;IACT;EACF,CAAA,EACA;IACEF,YAAYa,QAAS,CAAAA,QAAA,CAAA1B,EAAA;IACrBe,KAAO,EAAA;MACLC,IAAM,EAAA,aAAA;MACND,KAAO,EAAA;IACT;EACF,CAAA,EACA;IACEF,YAAYc,eAAgB,CAAAA,eAAA,CAAA3B,EAAA;IAC5Be,KAAO,EAAA;MACLC,IAAM,EAAA,aAAA;MACND,KAAO,EAAA;IACT;EACF,CAAA;AAEJ,CAAA;"}
|
|
1
|
+
{"version":3,"file":"udr.js","sources":["../../../../../src/components/ModelCompareV3/data/products/udr.tsx"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { UniFiCategoryId } from \"../../../../constants/proStoreCategories\";\nimport { UniFiChildCategorySlug } from \"../../../../constants/proStoreCategories/mapping/unifi\";\nimport { SiteId } from \"../../../../contexts/MenuContext/mapping\";\nimport { StyleableSvgImage as StyleableSvgImageBase } from \"../../../StyleableSvgImage\";\nimport image from \"../../assets/Consoles/bigCompare/udr.jpg\";\nimport applications from \"../../assets/wifi-device.svg\";\nimport type { Product } from \"../../ModelCompareV3.types\";\nimport { useModelCompareTranslation } from \"../../translations/useModelCompareTranslation\";\nimport { nextAiInspection } from \"../properties\";\nimport { clientDevices } from \"../properties/clientDevices\";\nimport { idsIpsThroughput } from \"../properties/idsIpsThroughput\";\nimport { integratedWiFi6 } from \"../properties/integratedWiFi6\";\nimport { lanPorts } from \"../properties/lanPorts\";\nimport { mounting } from \"../properties/mounting\";\nimport { powerRedundancy } from \"../properties/powerRedundancy\";\nimport { storage } from \"../properties/storage\";\nimport { throughput } from \"../properties/throughput\";\nimport { unifiAppSuite } from \"../properties/unifiAppSuite\";\nimport { unifiDevices } from \"../properties/unifiDevices\";\nimport { wanPorts } from \"../properties/wanPorts\";\n\nconst appSuiteKey = \"udr.unifiAppSuite\";\n\nconst UniFiAppSuitPropertyWrap = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst Icon = styled(StyleableSvgImageBase)`\n max-width: 15.75px;\n`;\n\nconst PlusCharacter = styled.span`\n margin: 0 5px;\n`;\n\nconst Copy = styled.span`\n text-align: start;\n line-height: 1.2;\n`;\n\nconst UniFiAppSuiteCopy = () => {\n const { formatMessage } = useModelCompareTranslation();\n\n return (\n <UniFiAppSuitPropertyWrap>\n <Icon src={applications} height={30} width={144} />\n <PlusCharacter>+</PlusCharacter>\n <Copy>{formatMessage(appSuiteKey)}</Copy>\n </UniFiAppSuitPropertyWrap>\n );\n};\n\nexport const udr: Product = {\n id: \"udr\",\n title: \"udr.title\",\n description: \"udr.description\",\n techspecsPath: [\n SiteId.TechSpecs,\n `/unifi/${UniFiCategoryId.CloudGateways}/udr`,\n ],\n storePathParts: {\n category: UniFiChildCategorySlug.CloudGatewaysWifiIntegrated,\n productSlug: \"udr\",\n },\n image: {\n src: image,\n width: 175.75,\n height: 182,\n },\n propertyValues: [\n {\n propertyId: unifiAppSuite.id,\n value: {\n type: \"custom\",\n value: <UniFiAppSuiteCopy />,\n },\n },\n {\n propertyId: throughput.id,\n value: {\n type: \"translation\",\n value: \"udr.throughput\",\n },\n },\n {\n propertyId: idsIpsThroughput.id,\n value: {\n type: \"translation\",\n value: \"udr.idsIpsThroughput\",\n },\n },\n {\n propertyId: unifiDevices.id,\n value: {\n type: \"translation\",\n value: \"udr.unifiDevices\",\n },\n },\n {\n propertyId: clientDevices.id,\n value: {\n type: \"translation\",\n value: \"udr.clientDevices\",\n },\n },\n {\n propertyId: wanPorts.id,\n value: {\n type: \"translation\",\n value: \"udr.wanPorts\",\n },\n },\n {\n propertyId: lanPorts.id,\n value: {\n type: \"translation\",\n value: \"udr.lanPorts\",\n },\n },\n {\n propertyId: nextAiInspection.id,\n value: {\n type: \"boolean\",\n value: false,\n },\n },\n {\n propertyId: storage.id,\n value: {\n type: \"translation\",\n value: \"udr.storage\",\n },\n },\n {\n propertyId: powerRedundancy.id,\n value: {\n type: \"boolean\",\n value: false,\n },\n },\n {\n propertyId: mounting.id,\n value: {\n type: \"translation\",\n value: \"udr.mounting\",\n },\n },\n {\n propertyId: integratedWiFi6.id,\n value: {\n type: \"translation\",\n value: \"udr.integratedWiFi6\",\n },\n },\n ],\n};\n"],"names":["appSuiteKey","UniFiAppSuitPropertyWrap","styled","div","Icon","StyleableSvgImageBase","PlusCharacter","span","Copy","UniFiAppSuiteCopy","formatMessage","useModelCompareTranslation","children","jsx","src","applications","height","width","udr","id","title","description","techspecsPath","SiteId","TechSpecs","UniFiCategoryId","CloudGateways","storePathParts","category","UniFiChildCategorySlug","CloudGatewaysWifiIntegrated","productSlug","image","propertyValues","propertyId","unifiAppSuite","value","type","throughput","idsIpsThroughput","unifiDevices","clientDevices","wanPorts","lanPorts","nextAiInspection","storage","powerRedundancy","mounting","integratedWiFi6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAMA,WAAc,GAAA,mBAAA;AAEpB,MAAMC,2BAA2BC,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA,CAAA;AAKxC,MAAMC,IAAA,GAAOF,eAAAA,CAAAA,SAAAA,EAAOG,iBAAAA,CAAAA,iBAAqB,CAAA;AAAA;AAAA,CAAA;AAIzC,MAAMC,gBAAgBJ,eAAO,CAAA,SAAA,CAAA,CAAAK,IAAA;AAAA;AAAA,CAAA;AAI7B,MAAMC,OAAON,eAAO,CAAA,SAAA,CAAA,CAAAK,IAAA;AAAA;AAAA;AAAA,CAAA;A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,EAAA;MACLC,IAAM,EAAA,aAAA;MACND,KAAO,EAAA;IACT;EACF,CAAA;AAEJ,CAAA;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import '../../../../constants/proStoreCategories/index.mjs';
|
|
4
|
+
import { UniFiCategoryId, UniFiChildCategorySlug } from '../../../../constants/proStoreCategories/mapping/unifi.mjs';
|
|
4
5
|
import { SiteId } from '../../../../contexts/MenuContext/mapping.mjs';
|
|
5
|
-
import { useTranslation } from '../../../../hooks/useTranslation.mjs';
|
|
6
6
|
import '../../../StyleableSvgImage/index.mjs';
|
|
7
7
|
import '../../assets/Consoles/bigCompare/udr.jpg.mjs';
|
|
8
8
|
import '../../assets/wifi-device.svg.mjs';
|
|
9
|
-
import
|
|
9
|
+
import { useModelCompareTranslation } from '../../translations/useModelCompareTranslation.mjs';
|
|
10
10
|
import '../properties/index.mjs';
|
|
11
11
|
import { clientDevices } from '../properties/clientDevices.mjs';
|
|
12
12
|
import { idsIpsThroughput } from '../properties/idsIpsThroughput.mjs';
|
|
@@ -20,9 +20,7 @@ import { unifiAppSuite } from '../properties/unifiAppSuite.mjs';
|
|
|
20
20
|
import { unifiDevices } from '../properties/unifiDevices.mjs';
|
|
21
21
|
import { wanPorts } from '../properties/wanPorts.mjs';
|
|
22
22
|
import { StyleableSvgImage } from '../../../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
23
|
-
import { Language } from '../../../../types/constants.mjs';
|
|
24
23
|
import applications__default from "../../../../assets/wifi-device.svg";
|
|
25
|
-
import { UniFiCategoryId } from '../../../../constants/proStoreCategories/mapping/unifi.mjs';
|
|
26
24
|
import image__default from "../../../../assets/udr2.jpg";
|
|
27
25
|
import { nextAiInspection } from '../properties/nextAiInspection.mjs';
|
|
28
26
|
"use strict";
|
|
@@ -44,21 +42,7 @@ const Copy = styled.span`
|
|
|
44
42
|
const UniFiAppSuiteCopy = () => {
|
|
45
43
|
const {
|
|
46
44
|
formatMessage
|
|
47
|
-
} =
|
|
48
|
-
defaultTranslation: EN_TRANSLATION,
|
|
49
|
-
additionalTranslations: {
|
|
50
|
-
[Language.Ja]: () => import('../../translations/ja.json.mjs').then(res => res.default),
|
|
51
|
-
[Language.Ar]: () => import('../../translations/ar.json.mjs').then(res => res.default),
|
|
52
|
-
[Language.De]: () => import('../../translations/de.json.mjs').then(res => res.default),
|
|
53
|
-
[Language.Es]: () => import('../../translations/es.json.mjs').then(res => res.default),
|
|
54
|
-
[Language.El]: () => import('../../translations/el.json.mjs').then(res => res.default),
|
|
55
|
-
[Language.It]: () => import('../../translations/it.json.mjs').then(res => res.default),
|
|
56
|
-
[Language.Pt]: () => import('../../translations/pt-BR.json.mjs').then(res => res.default),
|
|
57
|
-
[Language.Zh]: () => import('../../translations/zh-Hans.json.mjs').then(res => res.default),
|
|
58
|
-
[Language.Fr]: () => import('../../translations/fr.json.mjs').then(res => res.default),
|
|
59
|
-
[Language.Tw]: () => import('../../translations/zh-Hant-TW.json.mjs').then(res => res.default)
|
|
60
|
-
}
|
|
61
|
-
});
|
|
45
|
+
} = useModelCompareTranslation();
|
|
62
46
|
return /* @__PURE__ */jsxs(UniFiAppSuitPropertyWrap, {
|
|
63
47
|
children: [/* @__PURE__ */jsx(Icon, {
|
|
64
48
|
src: applications__default,
|
|
@@ -75,9 +59,9 @@ const udr = {
|
|
|
75
59
|
id: "udr",
|
|
76
60
|
title: "udr.title",
|
|
77
61
|
description: "udr.description",
|
|
78
|
-
techspecsPath: [SiteId.TechSpecs, `/unifi/${UniFiCategoryId.
|
|
62
|
+
techspecsPath: [SiteId.TechSpecs, `/unifi/${UniFiCategoryId.CloudGateways}/udr`],
|
|
79
63
|
storePathParts: {
|
|
80
|
-
category:
|
|
64
|
+
category: UniFiChildCategorySlug.CloudGatewaysWifiIntegrated,
|
|
81
65
|
productSlug: "udr"
|
|
82
66
|
},
|
|
83
67
|
image: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"udr.mjs","sources":["../../../../../src/components/ModelCompareV3/data/products/udr.tsx"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { UniFiCategoryId } from \"../../../../constants/proStoreCategories\";\nimport {
|
|
1
|
+
{"version":3,"file":"udr.mjs","sources":["../../../../../src/components/ModelCompareV3/data/products/udr.tsx"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { UniFiCategoryId } from \"../../../../constants/proStoreCategories\";\nimport { UniFiChildCategorySlug } from \"../../../../constants/proStoreCategories/mapping/unifi\";\nimport { SiteId } from \"../../../../contexts/MenuContext/mapping\";\nimport { StyleableSvgImage as StyleableSvgImageBase } from \"../../../StyleableSvgImage\";\nimport image from \"../../assets/Consoles/bigCompare/udr.jpg\";\nimport applications from \"../../assets/wifi-device.svg\";\nimport type { Product } from \"../../ModelCompareV3.types\";\nimport { useModelCompareTranslation } from \"../../translations/useModelCompareTranslation\";\nimport { nextAiInspection } from \"../properties\";\nimport { clientDevices } from \"../properties/clientDevices\";\nimport { idsIpsThroughput } from \"../properties/idsIpsThroughput\";\nimport { integratedWiFi6 } from \"../properties/integratedWiFi6\";\nimport { lanPorts } from \"../properties/lanPorts\";\nimport { mounting } from \"../properties/mounting\";\nimport { powerRedundancy } from \"../properties/powerRedundancy\";\nimport { storage } from \"../properties/storage\";\nimport { throughput } from \"../properties/throughput\";\nimport { unifiAppSuite } from \"../properties/unifiAppSuite\";\nimport { unifiDevices } from \"../properties/unifiDevices\";\nimport { wanPorts } from \"../properties/wanPorts\";\n\nconst appSuiteKey = \"udr.unifiAppSuite\";\n\nconst UniFiAppSuitPropertyWrap = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst Icon = styled(StyleableSvgImageBase)`\n max-width: 15.75px;\n`;\n\nconst PlusCharacter = styled.span`\n margin: 0 5px;\n`;\n\nconst Copy = styled.span`\n text-align: start;\n line-height: 1.2;\n`;\n\nconst UniFiAppSuiteCopy = () => {\n const { formatMessage } = useModelCompareTranslation();\n\n return (\n <UniFiAppSuitPropertyWrap>\n <Icon src={applications} height={30} width={144} />\n <PlusCharacter>+</PlusCharacter>\n <Copy>{formatMessage(appSuiteKey)}</Copy>\n </UniFiAppSuitPropertyWrap>\n );\n};\n\nexport const udr: Product = {\n id: \"udr\",\n title: \"udr.title\",\n description: \"udr.description\",\n techspecsPath: [\n SiteId.TechSpecs,\n `/unifi/${UniFiCategoryId.CloudGateways}/udr`,\n ],\n storePathParts: {\n category: UniFiChildCategorySlug.CloudGatewaysWifiIntegrated,\n productSlug: \"udr\",\n },\n image: {\n src: image,\n width: 175.75,\n height: 182,\n },\n propertyValues: [\n {\n propertyId: unifiAppSuite.id,\n value: {\n type: \"custom\",\n value: <UniFiAppSuiteCopy />,\n },\n },\n {\n propertyId: throughput.id,\n value: {\n type: \"translation\",\n value: \"udr.throughput\",\n },\n },\n {\n propertyId: idsIpsThroughput.id,\n value: {\n type: \"translation\",\n value: \"udr.idsIpsThroughput\",\n },\n },\n {\n propertyId: unifiDevices.id,\n value: {\n type: \"translation\",\n value: \"udr.unifiDevices\",\n },\n },\n {\n propertyId: clientDevices.id,\n value: {\n type: \"translation\",\n value: \"udr.clientDevices\",\n },\n },\n {\n propertyId: wanPorts.id,\n value: {\n type: \"translation\",\n value: \"udr.wanPorts\",\n },\n },\n {\n propertyId: lanPorts.id,\n value: {\n type: \"translation\",\n value: \"udr.lanPorts\",\n },\n },\n {\n propertyId: nextAiInspection.id,\n value: {\n type: \"boolean\",\n value: false,\n },\n },\n {\n propertyId: storage.id,\n value: {\n type: \"translation\",\n value: \"udr.storage\",\n },\n },\n {\n propertyId: powerRedundancy.id,\n value: {\n type: \"boolean\",\n value: false,\n },\n },\n {\n propertyId: mounting.id,\n value: {\n type: \"translation\",\n value: \"udr.mounting\",\n },\n },\n {\n propertyId: integratedWiFi6.id,\n value: {\n type: \"translation\",\n value: \"udr.integratedWiFi6\",\n },\n },\n ],\n};\n"],"names":["appSuiteKey","UniFiAppSuitPropertyWrap","styled","div","Icon","StyleableSvgImageBase","PlusCharacter","span","Copy","UniFiAppSuiteCopy","formatMessage","useModelCompareTranslation","children","jsx","src","applications","height","width","udr","id","title","description","techspecsPath","SiteId","TechSpecs","UniFiCategoryId","CloudGateways","storePathParts","category","UniFiChildCategorySlug","CloudGatewaysWifiIntegrated","productSlug","image","propertyValues","propertyId","unifiAppSuite","value","type","throughput","idsIpsThroughput","unifiDevices","clientDevices","wanPorts","lanPorts","nextAiInspection","storage","powerRedundancy","mounting","integratedWiFi6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAMA,WAAc,GAAA,mBAAA;AAEpB,MAAMC,2BAA2BC,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA,CAAA;AAKxC,MAAMC,IAAA,GAAOF,OAAOG,iBAAqB,CAAA;AAAA;AAAA,CAAA;AAIzC,MAAMC,gBAAgBJ,MAAO,CAAAK,IAAA;AAAA;AAAA,CAAA;AAI7B,MAAMC,OAAON,MAAO,CAAAK,IAAA;AAAA;AAAA;AAAA,CAAA;AAKpB,MAAME,oBAAoBA,CAAA,KAAM;EACxB,MAAA;IAAEC;GAAc,GAAIC,0BAA2B,EAAA;EAErD,2BACGV,wBACC,EAAA;IAAAW,QAAA,EAAA,CAAA,eAAAC,GAAA,CAACT;MAAKU,GAAK,EAAAC,qBAAA;MAAcC,MAAQ,EAAA,EAAA;MAAIC,OAAO;KAAK,CAAA,EACjD,eAAAJ,GAAA,CAACP;MAAcM,QAAC,EAAA;IAAA,CAAA,CAAA,EAAA,eACfC,GAAA,CAAAL,IAAA,EAAA;MAAMI,QAAc,EAAAF,aAAA,CAAAV,WAAW;IAAE,CAAA,CAAA;EACpC,CAAA,CAAA;AAEJ,CAAA;AAEO,MAAMkB,GAAe,GAAA;EAC1BC,EAAI,EAAA,KAAA;EACJC,KAAO,EAAA,WAAA;EACPC,WAAa,EAAA,iBAAA;EACbC,aAAe,EAAA,CACbC,MAAO,CAAAC,SAAA,E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AAA1B,EAAA;IACpBiB,KAAO,EAAA;MACLC,IAAM,EAAA,aAAA;MACND,KAAO,EAAA;IACT;EACF,CAAA,EACA;IACEF,YAAYY,eAAgB,CAAA3B,EAAA;IAC5BiB,KAAO,EAAA;MACLC,IAAM,EAAA,SAAA;MACND,KAAO,EAAA;IACT;EACF,CAAA,EACA;IACEF,YAAYa,QAAS,CAAA5B,EAAA;IACrBiB,KAAO,EAAA;MACLC,IAAM,EAAA,aAAA;MACND,KAAO,EAAA;IACT;EACF,CAAA,EACA;IACEF,YAAYc,eAAgB,CAAA7B,EAAA;IAC5BiB,KAAO,EAAA;MACLC,IAAM,EAAA,aAAA;MACND,KAAO,EAAA;IACT;EACF,CAAA;AAEJ,CAAA;"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
require('../../../../constants/proStoreCategories/index.js');
|
|
5
|
+
var unifi = require('../../../../constants/proStoreCategories/mapping/unifi.js');
|
|
5
6
|
var mapping = require('../../../../contexts/MenuContext/mapping.js');
|
|
6
7
|
require('../../../StyleableSvgImage/index.js');
|
|
7
8
|
require('../../assets/applications.svg.js');
|
|
@@ -18,7 +19,6 @@ var throughput = require('../properties/throughput.js');
|
|
|
18
19
|
var unifiAppSuite = require('../properties/unifiAppSuite.js');
|
|
19
20
|
var unifiDevices = require('../properties/unifiDevices.js');
|
|
20
21
|
var wanPorts = require('../properties/wanPorts.js');
|
|
21
|
-
var unifi = require('../../../../constants/proStoreCategories/mapping/unifi.js');
|
|
22
22
|
var image = require("../../../../assets/udw2.jpg");
|
|
23
23
|
var StyleableSvgImage = require('../../../StyleableSvgImage/StyleableSvgImage.js');
|
|
24
24
|
var applications = require("../../../../assets/applications.svg");
|
|
@@ -35,9 +35,9 @@ const udw = {
|
|
|
35
35
|
id: "udw",
|
|
36
36
|
title: "udw.title",
|
|
37
37
|
description: "udw.description",
|
|
38
|
-
techspecsPath: [mapping.SiteId.TechSpecs, `/unifi/${unifi.UniFiCategoryId.
|
|
38
|
+
techspecsPath: [mapping.SiteId.TechSpecs, `/unifi/${unifi.UniFiCategoryId.CloudGateways}/udw`],
|
|
39
39
|
storePathParts: {
|
|
40
|
-
category:
|
|
40
|
+
category: unifi.UniFiChildCategorySlug.CloudGatewaysWifiIntegrated,
|
|
41
41
|
productSlug: "udw"
|
|
42
42
|
},
|
|
43
43
|
image: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"udw.js","sources":["../../../../../src/components/ModelCompareV3/data/products/udw.tsx"],"sourcesContent":["import { UniFiCategoryId } from \"../../../../constants/proStoreCategories\";\nimport { SiteId } from \"../../../../contexts/MenuContext/mapping\";\nimport { StyleableSvgImage } from \"../../../StyleableSvgImage\";\nimport applications from \"../../assets/applications.svg\";\nimport image from \"../../assets/Consoles/bigCompare/udw.jpg\";\nimport type { Product } from \"../../ModelCompareV3.types\";\nimport { nextAiInspection } from \"../properties\";\nimport { clientDevices } from \"../properties/clientDevices\";\nimport { idsIpsThroughput } from \"../properties/idsIpsThroughput\";\nimport { integratedWiFi6 } from \"../properties/integratedWiFi6\";\nimport { lanPorts } from \"../properties/lanPorts\";\nimport { mounting } from \"../properties/mounting\";\nimport { powerRedundancy } from \"../properties/powerRedundancy\";\nimport { storage } from \"../properties/storage\";\nimport { throughput } from \"../properties/throughput\";\nimport { unifiAppSuite } from \"../properties/unifiAppSuite\";\nimport { unifiDevices } from \"../properties/unifiDevices\";\nimport { wanPorts } from \"../properties/wanPorts\";\n\nexport const udw: Product = {\n id: \"udw\",\n title: \"udw.title\",\n description: \"udw.description\",\n techspecsPath: [\n SiteId.TechSpecs,\n `/unifi/${UniFiCategoryId.
|
|
1
|
+
{"version":3,"file":"udw.js","sources":["../../../../../src/components/ModelCompareV3/data/products/udw.tsx"],"sourcesContent":["import { UniFiCategoryId } from \"../../../../constants/proStoreCategories\";\nimport { UniFiChildCategorySlug } from \"../../../../constants/proStoreCategories/mapping/unifi\";\nimport { SiteId } from \"../../../../contexts/MenuContext/mapping\";\nimport { StyleableSvgImage } from \"../../../StyleableSvgImage\";\nimport applications from \"../../assets/applications.svg\";\nimport image from \"../../assets/Consoles/bigCompare/udw.jpg\";\nimport type { Product } from \"../../ModelCompareV3.types\";\nimport { nextAiInspection } from \"../properties\";\nimport { clientDevices } from \"../properties/clientDevices\";\nimport { idsIpsThroughput } from \"../properties/idsIpsThroughput\";\nimport { integratedWiFi6 } from \"../properties/integratedWiFi6\";\nimport { lanPorts } from \"../properties/lanPorts\";\nimport { mounting } from \"../properties/mounting\";\nimport { powerRedundancy } from \"../properties/powerRedundancy\";\nimport { storage } from \"../properties/storage\";\nimport { throughput } from \"../properties/throughput\";\nimport { unifiAppSuite } from \"../properties/unifiAppSuite\";\nimport { unifiDevices } from \"../properties/unifiDevices\";\nimport { wanPorts } from \"../properties/wanPorts\";\n\nexport const udw: Product = {\n id: \"udw\",\n title: \"udw.title\",\n description: \"udw.description\",\n techspecsPath: [\n SiteId.TechSpecs,\n `/unifi/${UniFiCategoryId.CloudGateways}/udw`,\n ],\n storePathParts: {\n category: UniFiChildCategorySlug.CloudGatewaysWifiIntegrated,\n productSlug: \"udw\",\n },\n image: {\n src: image,\n width: 337,\n height: 130,\n },\n notes: [\"udw.notes\"],\n propertyValues: [\n {\n propertyId: unifiAppSuite.id,\n value: {\n type: \"custom\",\n value: <StyleableSvgImage src={applications} height={30} width={144} />,\n },\n },\n {\n propertyId: throughput.id,\n value: {\n type: \"translation\",\n value: \"udw.throughput\",\n },\n },\n {\n propertyId: idsIpsThroughput.id,\n value: {\n type: \"translation\",\n value: \"udw.idsIpsThroughput\",\n },\n },\n {\n propertyId: unifiDevices.id,\n value: {\n type: \"translation\",\n value: \"udw.unifiDevices\",\n },\n },\n {\n propertyId: clientDevices.id,\n value: {\n type: \"translation\",\n value: \"udw.clientDevices\",\n },\n },\n {\n propertyId: wanPorts.id,\n value: {\n type: \"translation\",\n value: \"udw.wanPorts\",\n },\n },\n {\n propertyId: lanPorts.id,\n value: {\n type: \"translation\",\n value: \"udw.lanPorts\",\n },\n },\n {\n propertyId: nextAiInspection.id,\n value: {\n type: \"boolean\",\n value: false,\n },\n },\n {\n propertyId: storage.id,\n value: {\n type: \"translation\",\n value: \"udw.storage\",\n },\n },\n {\n propertyId: powerRedundancy.id,\n value: {\n type: \"translation\",\n value: \"udw.powerRedundancy\",\n },\n },\n {\n propertyId: mounting.id,\n value: {\n type: \"translation\",\n value: \"udw.mounting\",\n },\n },\n {\n propertyId: integratedWiFi6.id,\n value: {\n type: \"translation\",\n value: \"udw.integratedWiFi6\",\n },\n },\n ],\n};\n"],"names":["udw","id","title","description","techspecsPath","SiteId","TechSpecs","UniFiCategoryId","CloudGateways","storePathParts","category","UniFiChildCategorySlug","CloudGatewaysWifiIntegrated","productSlug","image","src","width","height","notes","propertyValues","propertyId","unifiAppSuite","value","type","StyleableSvgImage","applications","throughput","idsIpsThroughput","unifiDevices","clientDevices","wanPorts","lanPorts","nextAiInspection","storage","powerRedundancy","mounting","integratedWiFi6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBO,MAAMA,GAAe,GAAA;EAC1BC,EAAI,EAAA,KAAA;EACJC,KAAO,EAAA,WAAA;EACPC,WAAa,EAAA,iBAAA;EACbC,aAAe,EAAA,CACbC,OAAAA,CAAAA,MAAO,CAAAC,SAAA,EACP,UAAUC,KAAAA,CAAAA,gBAAgBC,aAAa,MAAA,CACzC;EACAC,cAAgB,EAAA;IACdC,UAAUC,KAAuB,CAAAA,sBAAA,CAAAC,2BAAA;IACjCC,WAAa,EAAA;EACf,CAAA;EACAC,KAAO,EAAA;IACLC,GAAK,EAAAD,cAAA,CAAA,SAAA,CAAA;IACLE,KAAO,EAAA,GAAA;IACPC,MAAQ,EAAA;EACV,CAAA;EACAC,KAAA,EAAO,CAAC,WAAW,CAAA;EACnBC,cAAgB,EAAA,CACd;IACEC,YAAYC,aAAc,CAAAA,aAAA,CAAApB,EA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,YAAYc,eAAgB,CAAAA,eAAA,CAAAjC,EAAA;IAC5BqB,KAAO,EAAA;MACLC,IAAM,EAAA,aAAA;MACND,KAAO,EAAA;IACT;EACF,CAAA,EACA;IACEF,YAAYe,QAAS,CAAAA,QAAA,CAAAlC,EAAA;IACrBqB,KAAO,EAAA;MACLC,IAAM,EAAA,aAAA;MACND,KAAO,EAAA;IACT;EACF,CAAA,EACA;IACEF,YAAYgB,eAAgB,CAAAA,eAAA,CAAAnC,EAAA;IAC5BqB,KAAO,EAAA;MACLC,IAAM,EAAA,aAAA;MACND,KAAO,EAAA;IACT;EACF,CAAA;AAEJ,CAAA;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import '../../../../constants/proStoreCategories/index.mjs';
|
|
3
|
+
import { UniFiCategoryId, UniFiChildCategorySlug } from '../../../../constants/proStoreCategories/mapping/unifi.mjs';
|
|
3
4
|
import { SiteId } from '../../../../contexts/MenuContext/mapping.mjs';
|
|
4
5
|
import '../../../StyleableSvgImage/index.mjs';
|
|
5
6
|
import '../../assets/applications.svg.mjs';
|
|
@@ -16,7 +17,6 @@ import { throughput } from '../properties/throughput.mjs';
|
|
|
16
17
|
import { unifiAppSuite } from '../properties/unifiAppSuite.mjs';
|
|
17
18
|
import { unifiDevices } from '../properties/unifiDevices.mjs';
|
|
18
19
|
import { wanPorts } from '../properties/wanPorts.mjs';
|
|
19
|
-
import { UniFiCategoryId } from '../../../../constants/proStoreCategories/mapping/unifi.mjs';
|
|
20
20
|
import image__default from "../../../../assets/udw2.jpg";
|
|
21
21
|
import { StyleableSvgImage } from '../../../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
22
22
|
import applications__default from "../../../../assets/applications.svg";
|
|
@@ -26,9 +26,9 @@ const udw = {
|
|
|
26
26
|
id: "udw",
|
|
27
27
|
title: "udw.title",
|
|
28
28
|
description: "udw.description",
|
|
29
|
-
techspecsPath: [SiteId.TechSpecs, `/unifi/${UniFiCategoryId.
|
|
29
|
+
techspecsPath: [SiteId.TechSpecs, `/unifi/${UniFiCategoryId.CloudGateways}/udw`],
|
|
30
30
|
storePathParts: {
|
|
31
|
-
category:
|
|
31
|
+
category: UniFiChildCategorySlug.CloudGatewaysWifiIntegrated,
|
|
32
32
|
productSlug: "udw"
|
|
33
33
|
},
|
|
34
34
|
image: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"udw.mjs","sources":["../../../../../src/components/ModelCompareV3/data/products/udw.tsx"],"sourcesContent":["import { UniFiCategoryId } from \"../../../../constants/proStoreCategories\";\nimport { SiteId } from \"../../../../contexts/MenuContext/mapping\";\nimport { StyleableSvgImage } from \"../../../StyleableSvgImage\";\nimport applications from \"../../assets/applications.svg\";\nimport image from \"../../assets/Consoles/bigCompare/udw.jpg\";\nimport type { Product } from \"../../ModelCompareV3.types\";\nimport { nextAiInspection } from \"../properties\";\nimport { clientDevices } from \"../properties/clientDevices\";\nimport { idsIpsThroughput } from \"../properties/idsIpsThroughput\";\nimport { integratedWiFi6 } from \"../properties/integratedWiFi6\";\nimport { lanPorts } from \"../properties/lanPorts\";\nimport { mounting } from \"../properties/mounting\";\nimport { powerRedundancy } from \"../properties/powerRedundancy\";\nimport { storage } from \"../properties/storage\";\nimport { throughput } from \"../properties/throughput\";\nimport { unifiAppSuite } from \"../properties/unifiAppSuite\";\nimport { unifiDevices } from \"../properties/unifiDevices\";\nimport { wanPorts } from \"../properties/wanPorts\";\n\nexport const udw: Product = {\n id: \"udw\",\n title: \"udw.title\",\n description: \"udw.description\",\n techspecsPath: [\n SiteId.TechSpecs,\n `/unifi/${UniFiCategoryId.
|
|
1
|
+
{"version":3,"file":"udw.mjs","sources":["../../../../../src/components/ModelCompareV3/data/products/udw.tsx"],"sourcesContent":["import { UniFiCategoryId } from \"../../../../constants/proStoreCategories\";\nimport { UniFiChildCategorySlug } from \"../../../../constants/proStoreCategories/mapping/unifi\";\nimport { SiteId } from \"../../../../contexts/MenuContext/mapping\";\nimport { StyleableSvgImage } from \"../../../StyleableSvgImage\";\nimport applications from \"../../assets/applications.svg\";\nimport image from \"../../assets/Consoles/bigCompare/udw.jpg\";\nimport type { Product } from \"../../ModelCompareV3.types\";\nimport { nextAiInspection } from \"../properties\";\nimport { clientDevices } from \"../properties/clientDevices\";\nimport { idsIpsThroughput } from \"../properties/idsIpsThroughput\";\nimport { integratedWiFi6 } from \"../properties/integratedWiFi6\";\nimport { lanPorts } from \"../properties/lanPorts\";\nimport { mounting } from \"../properties/mounting\";\nimport { powerRedundancy } from \"../properties/powerRedundancy\";\nimport { storage } from \"../properties/storage\";\nimport { throughput } from \"../properties/throughput\";\nimport { unifiAppSuite } from \"../properties/unifiAppSuite\";\nimport { unifiDevices } from \"../properties/unifiDevices\";\nimport { wanPorts } from \"../properties/wanPorts\";\n\nexport const udw: Product = {\n id: \"udw\",\n title: \"udw.title\",\n description: \"udw.description\",\n techspecsPath: [\n SiteId.TechSpecs,\n `/unifi/${UniFiCategoryId.CloudGateways}/udw`,\n ],\n storePathParts: {\n category: UniFiChildCategorySlug.CloudGatewaysWifiIntegrated,\n productSlug: \"udw\",\n },\n image: {\n src: image,\n width: 337,\n height: 130,\n },\n notes: [\"udw.notes\"],\n propertyValues: [\n {\n propertyId: unifiAppSuite.id,\n value: {\n type: \"custom\",\n value: <StyleableSvgImage src={applications} height={30} width={144} />,\n },\n },\n {\n propertyId: throughput.id,\n value: {\n type: \"translation\",\n value: \"udw.throughput\",\n },\n },\n {\n propertyId: idsIpsThroughput.id,\n value: {\n type: \"translation\",\n value: \"udw.idsIpsThroughput\",\n },\n },\n {\n propertyId: unifiDevices.id,\n value: {\n type: \"translation\",\n value: \"udw.unifiDevices\",\n },\n },\n {\n propertyId: clientDevices.id,\n value: {\n type: \"translation\",\n value: \"udw.clientDevices\",\n },\n },\n {\n propertyId: wanPorts.id,\n value: {\n type: \"translation\",\n value: \"udw.wanPorts\",\n },\n },\n {\n propertyId: lanPorts.id,\n value: {\n type: \"translation\",\n value: \"udw.lanPorts\",\n },\n },\n {\n propertyId: nextAiInspection.id,\n value: {\n type: \"boolean\",\n value: false,\n },\n },\n {\n propertyId: storage.id,\n value: {\n type: \"translation\",\n value: \"udw.storage\",\n },\n },\n {\n propertyId: powerRedundancy.id,\n value: {\n type: \"translation\",\n value: \"udw.powerRedundancy\",\n },\n },\n {\n propertyId: mounting.id,\n value: {\n type: \"translation\",\n value: \"udw.mounting\",\n },\n },\n {\n propertyId: integratedWiFi6.id,\n value: {\n type: \"translation\",\n value: \"udw.integratedWiFi6\",\n },\n },\n ],\n};\n"],"names":["udw","id","title","description","techspecsPath","SiteId","TechSpecs","UniFiCategoryId","CloudGateways","storePathParts","category","UniFiChildCategorySlug","CloudGatewaysWifiIntegrated","productSlug","image","src","width","height","notes","propertyValues","propertyId","unifiAppSuite","value","type","StyleableSvgImage","applications","throughput","idsIpsThroughput","unifiDevices","clientDevices","wanPorts","lanPorts","nextAiInspection","storage","powerRedundancy","mounting","integratedWiFi6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAoBO,MAAMA,GAAe,GAAA;EAC1BC,EAAI,EAAA,KAAA;EACJC,KAAO,EAAA,WAAA;EACPC,WAAa,EAAA,iBAAA;EACbC,aAAe,EAAA,CACbC,MAAO,CAAAC,SAAA,EACP,UAAUC,gBAAgBC,aAAa,MAAA,CACzC;EACAC,cAAgB,EAAA;IACdC,UAAUC,sBAAuB,CAAAC,2BAAA;IACjCC,WAAa,EAAA;EACf,CAAA;EACAC,KAAO,EAAA;IACLC,GAAK,EAAAD,cAAA;IACLE,KAAO,EAAA,GAAA;IACPC,MAAQ,EAAA;EACV,CAAA;EACAC,KAAA,EAAO,CAAC,WAAW,CAAA;EACnBC,cAAgB,EAAA,CACd;IACEC,YAAYC,aAAc,CAAApB,EAAA;IAC1BqB,KAAO,EAAA;MACLC,IAAM,EAAA,QAAA;MACND,KAAA,qBAAQE,iBAAkB,EAAA;QAAAT,GAAA,EAAKU;QAA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ACEF,YAAYgB,eAAgB,CAAAnC,EAAA;IAC5BqB,KAAO,EAAA;MACLC,IAAM,EAAA,aAAA;MACND,KAAO,EAAA;IACT;EACF,CAAA;AAEJ,CAAA;"}
|
|
@@ -7,8 +7,8 @@ export declare enum QueryKey {
|
|
|
7
7
|
export interface PriceRangeSliderProps {
|
|
8
8
|
minValue: Money;
|
|
9
9
|
maxValue: Money;
|
|
10
|
-
priceFrom?: Money
|
|
11
|
-
priceTo?: Money
|
|
10
|
+
priceFrom?: Money;
|
|
11
|
+
priceTo?: Money;
|
|
12
12
|
onChange: (activeFilters: ReturnSliderData) => void;
|
|
13
13
|
title: string;
|
|
14
14
|
currency: Currency;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PriceRangeSlider.types.js","sources":["../../../src/components/PriceRangeSlider/PriceRangeSlider.types.tsx"],"sourcesContent":["import type { Currency } from \"../../types\";\nimport type { Money } from \"../../utils/money\";\n\nexport enum QueryKey {\n priceFrom = \"priceFrom\",\n priceTo = \"priceTo\",\n}\n\nexport interface PriceRangeSliderProps {\n minValue: Money;\n\n maxValue: Money;\n priceFrom?: Money
|
|
1
|
+
{"version":3,"file":"PriceRangeSlider.types.js","sources":["../../../src/components/PriceRangeSlider/PriceRangeSlider.types.tsx"],"sourcesContent":["import type { Currency } from \"../../types\";\nimport type { Money } from \"../../utils/money\";\n\nexport enum QueryKey {\n priceFrom = \"priceFrom\",\n priceTo = \"priceTo\",\n}\n\nexport interface PriceRangeSliderProps {\n minValue: Money;\n\n maxValue: Money;\n priceFrom?: Money;\n priceTo?: Money;\n onChange: (activeFilters: ReturnSliderData) => void;\n title: string;\n currency: Currency;\n}\n\nexport interface ReturnSliderData {\n [QueryKey.priceFrom]?: {\n displayPrice?: Money;\n };\n [QueryKey.priceTo]?: {\n displayPrice?: Money;\n };\n}\n"],"names":["QueryKey"],"mappings":";;;AAGY,IAAAA,QAAA,GAAA,gBAAAA,SAAL,IAAA;EACLA,UAAA,WAAY,CAAA,GAAA,WAAA;EACZA,UAAA,SAAU,CAAA,GAAA,SAAA;EAFAA,OAAAA,SAAAA;AAAA,CAAA,EAAAA,QAAA,IAAA,CAAA,CAAA,CAAA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PriceRangeSlider.types.mjs","sources":["../../../src/components/PriceRangeSlider/PriceRangeSlider.types.tsx"],"sourcesContent":["import type { Currency } from \"../../types\";\nimport type { Money } from \"../../utils/money\";\n\nexport enum QueryKey {\n priceFrom = \"priceFrom\",\n priceTo = \"priceTo\",\n}\n\nexport interface PriceRangeSliderProps {\n minValue: Money;\n\n maxValue: Money;\n priceFrom?: Money
|
|
1
|
+
{"version":3,"file":"PriceRangeSlider.types.mjs","sources":["../../../src/components/PriceRangeSlider/PriceRangeSlider.types.tsx"],"sourcesContent":["import type { Currency } from \"../../types\";\nimport type { Money } from \"../../utils/money\";\n\nexport enum QueryKey {\n priceFrom = \"priceFrom\",\n priceTo = \"priceTo\",\n}\n\nexport interface PriceRangeSliderProps {\n minValue: Money;\n\n maxValue: Money;\n priceFrom?: Money;\n priceTo?: Money;\n onChange: (activeFilters: ReturnSliderData) => void;\n title: string;\n currency: Currency;\n}\n\nexport interface ReturnSliderData {\n [QueryKey.priceFrom]?: {\n displayPrice?: Money;\n };\n [QueryKey.priceTo]?: {\n displayPrice?: Money;\n };\n}\n"],"names":["QueryKey"],"mappings":";;AAGY,IAAAA,QAAA,GAAA,gBAAAA,SAAL,IAAA;EACLA,UAAA,WAAY,CAAA,GAAA,WAAA;EACZA,UAAA,SAAU,CAAA,GAAA,SAAA;EAFAA,OAAAA,SAAAA;AAAA,CAAA,EAAAA,QAAA,IAAA,CAAA,CAAA,CAAA;"}
|
|
@@ -60,7 +60,7 @@ const ProductCard = ({
|
|
|
60
60
|
const isEarlyAccess = react.useMemo(() => {
|
|
61
61
|
return !!variants?.some(variant => variant?.isEarlyAccess);
|
|
62
62
|
}, [variants]);
|
|
63
|
-
const
|
|
63
|
+
const localQuantity = 1;
|
|
64
64
|
const handleAddToCart = react.useCallback(() => {
|
|
65
65
|
const quantity = hasManyVariants ? null : localQuantity;
|
|
66
66
|
onAddToCart(slug, quantity);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCard.js","sources":["../../../src/components/ProductCard/ProductCard.tsx"],"sourcesContent":["import merge from \"lodash/merge\";\nimport { useCallback, useMemo, useState } from \"react\";\nimport { useMeasure } from \"react-use\";\n\nimport PreviouslyPurchasedStar from \"../../assets/icons/previouslyPurchasedStar.svg\";\nimport { getSkuText } from \"../../utils/variant\";\nimport { Badge } from \"../Badge\";\nimport { CartButton } from \"../Button\";\nimport { defaultProductCardTranslations } from \"./ProductCard.constants\";\nimport * as S from \"./ProductCard.styles\";\nimport type { ProductCardProps } from \"./ProductCard.types\";\n\nconst PreviouslyPurchasedStarAsset = {\n src:\n typeof PreviouslyPurchasedStar === \"string\"\n ? PreviouslyPurchasedStar\n : PreviouslyPurchasedStar.src,\n width: 20,\n height: 20,\n};\n\nexport const ProductCard = ({\n compact,\n title,\n slug,\n baseSku,\n shortDescription,\n images,\n skuExtraLabel,\n formattedPrice,\n formattedPriceWithTax,\n isPreviouslyPurchased,\n isSubscription,\n variants,\n translations: initialTranslations,\n learnMoreUrl,\n onLearnMoreClick,\n onAddToCart,\n renderImage,\n}: ProductCardProps) => {\n // #############################################################################\n // Merge translations\n // #############################################################################\n const translations = useMemo(() => {\n return merge(defaultProductCardTranslations, initialTranslations);\n }, [initialTranslations]);\n\n // #############################################################################\n // Parse data\n // #############################################################################\n /**\n * Has more than one variant\n */\n const hasManyVariants = useMemo(() => {\n return variants.length > 1;\n }, [variants.length]);\n\n /**\n * If one of the variants is in stock, the product is in stock\n */\n const isInStock = useMemo(() => {\n return !!isSubscription || !!variants?.some((variant) => variant.isInStock);\n }, [isSubscription, variants]);\n\n /**\n * If none of variants is in stock and one of the variants is\n * coming soon, the product is coming soon.\n */\n const isComingSoon = useMemo(() => {\n return !isInStock && !!variants?.some((variant) => variant.isComingSoon);\n }, [isInStock, variants]);\n\n /**\n * If one of the variants is early access, the product is early access.\n */\n const isEarlyAccess = useMemo(() => {\n return !!variants?.some((variant) => variant?.isEarlyAccess);\n }, [variants]);\n\n // #############################################################################\n // Quantity\n // #############################################################################\n const [localQuantity] = useState(1);\n // const [quantityDisabled, setQuantityDisabled] = useState(false);\n\n // useEffect(() => {\n // if (!isInStock) {\n // setLocalQuantity(0);\n // setQuantityDisabled(true);\n // }\n // }, [isInStock]);\n\n // #############################################################################\n // Events\n // #############################################################################\n const handleAddToCart = useCallback(() => {\n const quantity = hasManyVariants ? null : localQuantity;\n\n onAddToCart(slug, quantity);\n }, [hasManyVariants, localQuantity, onAddToCart, slug]);\n\n // #############################################################################\n // Handle short description size\n // #############################################################################\n const [shortDescriptionRef, shortDescriptionSize] =\n useMeasure<HTMLDivElement>();\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.Wrap $compact={compact}>\n <S.Container data-test-id=\"product-card\">\n {/* Product Flags */}\n <S.IconWrapper>\n {isPreviouslyPurchased && (\n <S.PreviouslyPurchasedStar {...PreviouslyPurchasedStarAsset} />\n )}\n {/**\n * NOTE: Disabled on May 18 2023\n * @see https://ui.slack.com/archives/G01B4G8GF2S/p1684436883345729\n */}\n {/* {isInStock && <Badge variant=\"blue\" data-test-id=\"badge-in-stock\">{translations.inStock}</Badge>} */}\n {isEarlyAccess && (\n <Badge variant=\"lightNavy\" data-test-id=\"badge-early-access\">\n {translations.earlyAccess}\n </Badge>\n )}\n {isComingSoon && (\n <Badge variant=\"lightNavy\" data-test-id=\"badge-coming-soon\">\n {translations.comingSoon}\n </Badge>\n )}\n </S.IconWrapper>\n\n <S.MetaAnchor\n href={learnMoreUrl}\n onClick={(e) => onLearnMoreClick(e, learnMoreUrl)}\n >\n {/* Product Image */}\n <S.CustomImage\n asset={images?.[0] ?? undefined}\n sizes={`${S.PRODUCT_IMAGE_SIZE}px`}\n renderImage={renderImage}\n responsive\n />\n\n {/* Product Title */}\n <S.Title data-test-id=\"product-card-title\">{title}</S.Title>\n\n {/* Product Sku */}\n <S.Sku>\n {getSkuText(variants?.[0]?.sku || baseSku, skuExtraLabel)}\n </S.Sku>\n\n {/* Product Description */}\n <S.ShortDescription ref={shortDescriptionRef}>\n <S.ShortDescriptionInner $wrapHeight={shortDescriptionSize.height}>\n {shortDescription}\n </S.ShortDescriptionInner>\n </S.ShortDescription>\n </S.MetaAnchor>\n\n {/* Product Price */}\n <S.AddToCartContainer>\n <S.PriceWrap>\n <S.Price data-test-id=\"price-label\">{formattedPrice}</S.Price>\n {formattedPriceWithTax && (\n <S.PriceWithVAT data-test-id=\"price-with-vat-label\">\n {formattedPriceWithTax}\n </S.PriceWithVAT>\n )}\n </S.PriceWrap>\n\n {isSubscription ? (\n <CartButton\n data-test-id=\"add-to-cart-btn\"\n variant=\"primary\"\n hideIcon\n onClick={(e) => onLearnMoreClick(e, learnMoreUrl)}\n label={translations.view}\n />\n ) : hasManyVariants ? (\n <CartButton\n data-test-id=\"select-variant-btn\"\n variant={isInStock ? \"primary\" : \"unavailable\"}\n hideIcon\n onClick={handleAddToCart}\n label={isInStock ? translations.select : translations.soldOut}\n />\n ) : (\n <CartButton\n data-test-id={\n isInStock ? \"add-to-cart-btn\" : \"add-to-cart-btn-disabled\"\n }\n variant={\n isInStock\n ? \"primary\"\n : isComingSoon\n ? \"comingSoon\"\n : \"unavailable\"\n }\n disabled={!isInStock || isComingSoon}\n onClick={handleAddToCart}\n hideIcon\n label={\n isComingSoon\n ? translations.comingSoon\n : !isInStock\n ? translations.soldOut\n : translations.addToCart\n }\n />\n )}\n </S.AddToCartContainer>\n </S.Container>\n </S.Wrap>\n );\n};\n"],"names":["PreviouslyPurchasedStarAsset","src","PreviouslyPurchasedStar","width","height","ProductCard","compact","title","slug","baseSku","shortDescription","images","skuExtraLabel","formattedPrice","formattedPriceWithTax","isPreviouslyPurchased","isSubscription","variants","translations","initialTranslations","learnMoreUrl","onLearnMoreClick","onAddToCart","renderImage","useMemo","merge","defaultProductCardTranslations","hasManyVariants","length","isInStock","some","variant","isComingSoon","isEarlyAccess","localQuantity","useState","handleAddToCart","useCallback","quantity","shortDescriptionRef","shortDescriptionSize","useMeasure","jsx","S.Wrap","$compact","children","jsxs","S.Container","S.IconWrapper","S.PreviouslyPurchasedStar","Badge","earlyAccess","comingSoon","S.MetaAnchor","MetaAnchor","href","onClick","e","S.CustomImage","CustomImage","asset","sizes","S.PRODUCT_IMAGE_SIZE","PRODUCT_IMAGE_SIZE","responsive","S.Title","Title","S.Sku","Sku","getSkuText","sku","S.ShortDescription","ShortDescription","ref","S.ShortDescriptionInner","$wrapHeight","S.AddToCartContainer","S.PriceWrap","S.Price","Price","S.PriceWithVAT","CartButton","hideIcon","label","view","select","soldOut","disabled","addToCart"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAMA,4BAA+B,GAAA;EACnCC,GACE,EAAA,OAAOC,gCAA4B,CAAA,SAAA,CAAA,KAAA,QAAA,GAC/BA,8CACAA,gCAAwB,CAAA,SAAA,CAAA,CAAAD,GAAA;EAC9BE,KAAO,EAAA,EAAA;EACPC,MAAQ,EAAA;AACV,CAAA;AAEO,MAAMC,cAAcA,CAAC;EAC1BC,OAAA;EACAC,KAAA;EACAC,IAAA;EACAC,OAAA;EACAC,gBAAA;EACAC,MAAA;EACAC,aAAA;EACAC,cAAA;EACAC,qBAAA;EACAC,qBAAA;EACAC,cAAA;EACAC,QAAA;EACAC,YAAc,EAAAC,mBAAA;EACdC,YAAA;EACAC,gBAAA;EACAC,WAAA;EACAC;AACF,CAAwB,KAAA;EAIhB,MAAAL,YAAA,GAAeM,KAAAA,CAAAA,QAAQ,MAAM;IAC1B,OAAAC,cAAA,CAAA,SAAA,CAAA,CAAMC,sDAAgCP,mBAAmB,CAAA;EAAA,CAClE,EAAG,CAACA,mBAAmB,CAAC,CAAA;EAQlB,MAAAQ,eAAA,GAAkBH,KAAAA,CAAAA,QAAQ,MAA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AAA,EACEpD,YAAY,iBAAoB,GAAA,0BAAA;UAElCE,OACE,EAAAF,SAAA,GACI,SACA,GAAAG,YAAA,GACE,YACA,GAAA,aAAA;UAERuD,QAAA,EAAU,CAAC1D,SAAa,IAAAG,YAAA;UACxBwB,OAAS,EAAApB,eAAA;UACT8C,QAAQ,EAAA,IAAA;UACRC,KAAA,EACEnD,eACId,YAAa,CAAAkC,UAAA,GACb,CAACvB,SACC,GAAAX,YAAA,CAAaoE,UACbpE,YAAa,CAAAsE;QAAA,CAEvB,CAAA;OAEJ,CAAA;IACF,CAAA;EACF,CAAA,CAAA;AAEJ,CAAA;"}
|
|
1
|
+
{"version":3,"file":"ProductCard.js","sources":["../../../src/components/ProductCard/ProductCard.tsx"],"sourcesContent":["import merge from \"lodash/merge\";\nimport { useCallback, useMemo } from \"react\";\nimport { useMeasure } from \"react-use\";\n\nimport PreviouslyPurchasedStar from \"../../assets/icons/previouslyPurchasedStar.svg\";\nimport { getSkuText } from \"../../utils/variant\";\nimport { Badge } from \"../Badge\";\nimport { CartButton } from \"../Button\";\nimport { defaultProductCardTranslations } from \"./ProductCard.constants\";\nimport * as S from \"./ProductCard.styles\";\nimport type { ProductCardProps } from \"./ProductCard.types\";\n\nconst PreviouslyPurchasedStarAsset = {\n src:\n typeof PreviouslyPurchasedStar === \"string\"\n ? PreviouslyPurchasedStar\n : PreviouslyPurchasedStar.src,\n width: 20,\n height: 20,\n};\n\nexport const ProductCard = ({\n compact,\n title,\n slug,\n baseSku,\n shortDescription,\n images,\n skuExtraLabel,\n formattedPrice,\n formattedPriceWithTax,\n isPreviouslyPurchased,\n isSubscription,\n variants,\n translations: initialTranslations,\n learnMoreUrl,\n onLearnMoreClick,\n onAddToCart,\n renderImage,\n}: ProductCardProps) => {\n // #############################################################################\n // Merge translations\n // #############################################################################\n const translations = useMemo(() => {\n return merge(defaultProductCardTranslations, initialTranslations);\n }, [initialTranslations]);\n\n // #############################################################################\n // Parse data\n // #############################################################################\n /**\n * Has more than one variant\n */\n const hasManyVariants = useMemo(() => {\n return variants.length > 1;\n }, [variants.length]);\n\n /**\n * If one of the variants is in stock, the product is in stock\n */\n const isInStock = useMemo(() => {\n return !!isSubscription || !!variants?.some((variant) => variant.isInStock);\n }, [isSubscription, variants]);\n\n /**\n * If none of variants is in stock and one of the variants is\n * coming soon, the product is coming soon.\n */\n const isComingSoon = useMemo(() => {\n return !isInStock && !!variants?.some((variant) => variant.isComingSoon);\n }, [isInStock, variants]);\n\n /**\n * If one of the variants is early access, the product is early access.\n */\n const isEarlyAccess = useMemo(() => {\n return !!variants?.some((variant) => variant?.isEarlyAccess);\n }, [variants]);\n\n // #############################################################################\n // Quantity\n // #############################################################################\n const localQuantity = 1;\n // const [quantityDisabled, setQuantityDisabled] = useState(false);\n\n // useEffect(() => {\n // if (!isInStock) {\n // setLocalQuantity(0);\n // setQuantityDisabled(true);\n // }\n // }, [isInStock]);\n\n // #############################################################################\n // Events\n // #############################################################################\n const handleAddToCart = useCallback(() => {\n const quantity = hasManyVariants ? null : localQuantity;\n\n onAddToCart(slug, quantity);\n }, [hasManyVariants, localQuantity, onAddToCart, slug]);\n\n // #############################################################################\n // Handle short description size\n // #############################################################################\n const [shortDescriptionRef, shortDescriptionSize] =\n useMeasure<HTMLDivElement>();\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.Wrap $compact={compact}>\n <S.Container data-test-id=\"product-card\">\n {/* Product Flags */}\n <S.IconWrapper>\n {isPreviouslyPurchased && (\n <S.PreviouslyPurchasedStar {...PreviouslyPurchasedStarAsset} />\n )}\n {/**\n * NOTE: Disabled on May 18 2023\n * @see https://ui.slack.com/archives/G01B4G8GF2S/p1684436883345729\n */}\n {/* {isInStock && <Badge variant=\"blue\" data-test-id=\"badge-in-stock\">{translations.inStock}</Badge>} */}\n {isEarlyAccess && (\n <Badge variant=\"lightNavy\" data-test-id=\"badge-early-access\">\n {translations.earlyAccess}\n </Badge>\n )}\n {isComingSoon && (\n <Badge variant=\"lightNavy\" data-test-id=\"badge-coming-soon\">\n {translations.comingSoon}\n </Badge>\n )}\n </S.IconWrapper>\n\n <S.MetaAnchor\n href={learnMoreUrl}\n onClick={(e) => onLearnMoreClick(e, learnMoreUrl)}\n >\n {/* Product Image */}\n <S.CustomImage\n asset={images?.[0] ?? undefined}\n sizes={`${S.PRODUCT_IMAGE_SIZE}px`}\n renderImage={renderImage}\n responsive\n />\n\n {/* Product Title */}\n <S.Title data-test-id=\"product-card-title\">{title}</S.Title>\n\n {/* Product Sku */}\n <S.Sku>\n {getSkuText(variants?.[0]?.sku || baseSku, skuExtraLabel)}\n </S.Sku>\n\n {/* Product Description */}\n <S.ShortDescription ref={shortDescriptionRef}>\n <S.ShortDescriptionInner $wrapHeight={shortDescriptionSize.height}>\n {shortDescription}\n </S.ShortDescriptionInner>\n </S.ShortDescription>\n </S.MetaAnchor>\n\n {/* Product Price */}\n <S.AddToCartContainer>\n <S.PriceWrap>\n <S.Price data-test-id=\"price-label\">{formattedPrice}</S.Price>\n {formattedPriceWithTax && (\n <S.PriceWithVAT data-test-id=\"price-with-vat-label\">\n {formattedPriceWithTax}\n </S.PriceWithVAT>\n )}\n </S.PriceWrap>\n {isSubscription ? (\n <CartButton\n data-test-id=\"add-to-cart-btn\"\n variant=\"primary\"\n hideIcon\n onClick={(e) => onLearnMoreClick(e, learnMoreUrl)}\n label={translations.view}\n />\n ) : hasManyVariants ? (\n <CartButton\n data-test-id=\"select-variant-btn\"\n variant={isInStock ? \"primary\" : \"unavailable\"}\n hideIcon\n onClick={handleAddToCart}\n label={isInStock ? translations.select : translations.soldOut}\n />\n ) : (\n <CartButton\n data-test-id={\n isInStock ? \"add-to-cart-btn\" : \"add-to-cart-btn-disabled\"\n }\n variant={\n isInStock\n ? \"primary\"\n : isComingSoon\n ? \"comingSoon\"\n : \"unavailable\"\n }\n disabled={!isInStock || isComingSoon}\n onClick={handleAddToCart}\n hideIcon\n label={\n isComingSoon\n ? translations.comingSoon\n : !isInStock\n ? translations.soldOut\n : translations.addToCart\n }\n />\n )}\n </S.AddToCartContainer>\n </S.Container>\n </S.Wrap>\n );\n};\n"],"names":["PreviouslyPurchasedStarAsset","src","PreviouslyPurchasedStar","width","height","ProductCard","compact","title","slug","baseSku","shortDescription","images","skuExtraLabel","formattedPrice","formattedPriceWithTax","isPreviouslyPurchased","isSubscription","variants","translations","initialTranslations","learnMoreUrl","onLearnMoreClick","onAddToCart","renderImage","useMemo","merge","defaultProductCardTranslations","hasManyVariants","length","isInStock","some","variant","isComingSoon","isEarlyAccess","localQuantity","handleAddToCart","useCallback","quantity","shortDescriptionRef","shortDescriptionSize","useMeasure","jsx","S.Wrap","$compact","children","jsxs","S.Container","S.IconWrapper","S.PreviouslyPurchasedStar","Badge","earlyAccess","comingSoon","S.MetaAnchor","MetaAnchor","href","onClick","e","S.CustomImage","CustomImage","asset","sizes","S.PRODUCT_IMAGE_SIZE","PRODUCT_IMAGE_SIZE","responsive","S.Title","Title","S.Sku","Sku","getSkuText","sku","S.ShortDescription","ShortDescription","ref","S.ShortDescriptionInner","$wrapHeight","S.AddToCartContainer","S.PriceWrap","S.Price","Price","S.PriceWithVAT","CartButton","hideIcon","label","view","select","soldOut","disabled","addToCart"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAMA,4BAA+B,GAAA;EACnCC,GACE,EAAA,OAAOC,gCAA4B,CAAA,SAAA,CAAA,KAAA,QAAA,GAC/BA,8CACAA,gCAAwB,CAAA,SAAA,CAAA,CAAAD,GAAA;EAC9BE,KAAO,EAAA,EAAA;EACPC,MAAQ,EAAA;AACV,CAAA;AAEO,MAAMC,cAAcA,CAAC;EAC1BC,OAAA;EACAC,KAAA;EACAC,IAAA;EACAC,OAAA;EACAC,gBAAA;EACAC,MAAA;EACAC,aAAA;EACAC,cAAA;EACAC,qBAAA;EACAC,qBAAA;EACAC,cAAA;EACAC,QAAA;EACAC,YAAc,EAAAC,mBAAA;EACdC,YAAA;EACAC,gBAAA;EACAC,WAAA;EACAC;AACF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AAA,IAAA;UACR1B,OAAS,EAAApB,eAAA;UACT+C,KAAO,EAAArD,SAAA,GAAYX,YAAa,CAAAkE,MAAA,GAASlE,YAAa,CAAAmE;QAAA,CAAA,CAGxD,kBAAA5C,UAAA,CAAAA,GAAA,CAACuC,UAAA,CAAAA,UAAA,EAAA;UACC,cAAA,EACEnD,YAAY,iBAAoB,GAAA,0BAAA;UAElCE,OACE,EAAAF,SAAA,GACI,SACA,GAAAG,YAAA,GACE,YACA,GAAA,aAAA;UAERsD,QAAA,EAAU,CAACzD,SAAa,IAAAG,YAAA;UACxBuB,OAAS,EAAApB,eAAA;UACT8C,QAAQ,EAAA,IAAA;UACRC,KAAA,EACElD,eACId,YAAa,CAAAiC,UAAA,GACb,CAACtB,SACC,GAAAX,YAAA,CAAamE,UACbnE,YAAa,CAAAqE;QAAA,CAEvB,CAAA;OAEJ,CAAA;IACF,CAAA;EACF,CAAA,CAAA;AAEJ,CAAA;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import merge from 'lodash/merge';
|
|
3
|
-
import { useMemo,
|
|
3
|
+
import { useMemo, useCallback } from 'react';
|
|
4
4
|
import { useMeasure } from 'react-use';
|
|
5
5
|
import '../../assets/icons/previouslyPurchasedStar.svg.mjs';
|
|
6
6
|
import { getSkuText } from '../../utils/variant.mjs';
|
|
@@ -51,7 +51,7 @@ const ProductCard = ({
|
|
|
51
51
|
const isEarlyAccess = useMemo(() => {
|
|
52
52
|
return !!variants?.some(variant => variant?.isEarlyAccess);
|
|
53
53
|
}, [variants]);
|
|
54
|
-
const
|
|
54
|
+
const localQuantity = 1;
|
|
55
55
|
const handleAddToCart = useCallback(() => {
|
|
56
56
|
const quantity = hasManyVariants ? null : localQuantity;
|
|
57
57
|
onAddToCart(slug, quantity);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCard.mjs","sources":["../../../src/components/ProductCard/ProductCard.tsx"],"sourcesContent":["import merge from \"lodash/merge\";\nimport { useCallback, useMemo, useState } from \"react\";\nimport { useMeasure } from \"react-use\";\n\nimport PreviouslyPurchasedStar from \"../../assets/icons/previouslyPurchasedStar.svg\";\nimport { getSkuText } from \"../../utils/variant\";\nimport { Badge } from \"../Badge\";\nimport { CartButton } from \"../Button\";\nimport { defaultProductCardTranslations } from \"./ProductCard.constants\";\nimport * as S from \"./ProductCard.styles\";\nimport type { ProductCardProps } from \"./ProductCard.types\";\n\nconst PreviouslyPurchasedStarAsset = {\n src:\n typeof PreviouslyPurchasedStar === \"string\"\n ? PreviouslyPurchasedStar\n : PreviouslyPurchasedStar.src,\n width: 20,\n height: 20,\n};\n\nexport const ProductCard = ({\n compact,\n title,\n slug,\n baseSku,\n shortDescription,\n images,\n skuExtraLabel,\n formattedPrice,\n formattedPriceWithTax,\n isPreviouslyPurchased,\n isSubscription,\n variants,\n translations: initialTranslations,\n learnMoreUrl,\n onLearnMoreClick,\n onAddToCart,\n renderImage,\n}: ProductCardProps) => {\n // #############################################################################\n // Merge translations\n // #############################################################################\n const translations = useMemo(() => {\n return merge(defaultProductCardTranslations, initialTranslations);\n }, [initialTranslations]);\n\n // #############################################################################\n // Parse data\n // #############################################################################\n /**\n * Has more than one variant\n */\n const hasManyVariants = useMemo(() => {\n return variants.length > 1;\n }, [variants.length]);\n\n /**\n * If one of the variants is in stock, the product is in stock\n */\n const isInStock = useMemo(() => {\n return !!isSubscription || !!variants?.some((variant) => variant.isInStock);\n }, [isSubscription, variants]);\n\n /**\n * If none of variants is in stock and one of the variants is\n * coming soon, the product is coming soon.\n */\n const isComingSoon = useMemo(() => {\n return !isInStock && !!variants?.some((variant) => variant.isComingSoon);\n }, [isInStock, variants]);\n\n /**\n * If one of the variants is early access, the product is early access.\n */\n const isEarlyAccess = useMemo(() => {\n return !!variants?.some((variant) => variant?.isEarlyAccess);\n }, [variants]);\n\n // #############################################################################\n // Quantity\n // #############################################################################\n const [localQuantity] = useState(1);\n // const [quantityDisabled, setQuantityDisabled] = useState(false);\n\n // useEffect(() => {\n // if (!isInStock) {\n // setLocalQuantity(0);\n // setQuantityDisabled(true);\n // }\n // }, [isInStock]);\n\n // #############################################################################\n // Events\n // #############################################################################\n const handleAddToCart = useCallback(() => {\n const quantity = hasManyVariants ? null : localQuantity;\n\n onAddToCart(slug, quantity);\n }, [hasManyVariants, localQuantity, onAddToCart, slug]);\n\n // #############################################################################\n // Handle short description size\n // #############################################################################\n const [shortDescriptionRef, shortDescriptionSize] =\n useMeasure<HTMLDivElement>();\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.Wrap $compact={compact}>\n <S.Container data-test-id=\"product-card\">\n {/* Product Flags */}\n <S.IconWrapper>\n {isPreviouslyPurchased && (\n <S.PreviouslyPurchasedStar {...PreviouslyPurchasedStarAsset} />\n )}\n {/**\n * NOTE: Disabled on May 18 2023\n * @see https://ui.slack.com/archives/G01B4G8GF2S/p1684436883345729\n */}\n {/* {isInStock && <Badge variant=\"blue\" data-test-id=\"badge-in-stock\">{translations.inStock}</Badge>} */}\n {isEarlyAccess && (\n <Badge variant=\"lightNavy\" data-test-id=\"badge-early-access\">\n {translations.earlyAccess}\n </Badge>\n )}\n {isComingSoon && (\n <Badge variant=\"lightNavy\" data-test-id=\"badge-coming-soon\">\n {translations.comingSoon}\n </Badge>\n )}\n </S.IconWrapper>\n\n <S.MetaAnchor\n href={learnMoreUrl}\n onClick={(e) => onLearnMoreClick(e, learnMoreUrl)}\n >\n {/* Product Image */}\n <S.CustomImage\n asset={images?.[0] ?? undefined}\n sizes={`${S.PRODUCT_IMAGE_SIZE}px`}\n renderImage={renderImage}\n responsive\n />\n\n {/* Product Title */}\n <S.Title data-test-id=\"product-card-title\">{title}</S.Title>\n\n {/* Product Sku */}\n <S.Sku>\n {getSkuText(variants?.[0]?.sku || baseSku, skuExtraLabel)}\n </S.Sku>\n\n {/* Product Description */}\n <S.ShortDescription ref={shortDescriptionRef}>\n <S.ShortDescriptionInner $wrapHeight={shortDescriptionSize.height}>\n {shortDescription}\n </S.ShortDescriptionInner>\n </S.ShortDescription>\n </S.MetaAnchor>\n\n {/* Product Price */}\n <S.AddToCartContainer>\n <S.PriceWrap>\n <S.Price data-test-id=\"price-label\">{formattedPrice}</S.Price>\n {formattedPriceWithTax && (\n <S.PriceWithVAT data-test-id=\"price-with-vat-label\">\n {formattedPriceWithTax}\n </S.PriceWithVAT>\n )}\n </S.PriceWrap>\n\n {isSubscription ? (\n <CartButton\n data-test-id=\"add-to-cart-btn\"\n variant=\"primary\"\n hideIcon\n onClick={(e) => onLearnMoreClick(e, learnMoreUrl)}\n label={translations.view}\n />\n ) : hasManyVariants ? (\n <CartButton\n data-test-id=\"select-variant-btn\"\n variant={isInStock ? \"primary\" : \"unavailable\"}\n hideIcon\n onClick={handleAddToCart}\n label={isInStock ? translations.select : translations.soldOut}\n />\n ) : (\n <CartButton\n data-test-id={\n isInStock ? \"add-to-cart-btn\" : \"add-to-cart-btn-disabled\"\n }\n variant={\n isInStock\n ? \"primary\"\n : isComingSoon\n ? \"comingSoon\"\n : \"unavailable\"\n }\n disabled={!isInStock || isComingSoon}\n onClick={handleAddToCart}\n hideIcon\n label={\n isComingSoon\n ? translations.comingSoon\n : !isInStock\n ? translations.soldOut\n : translations.addToCart\n }\n />\n )}\n </S.AddToCartContainer>\n </S.Container>\n </S.Wrap>\n );\n};\n"],"names":["PreviouslyPurchasedStarAsset","src","PreviouslyPurchasedStar","width","height","ProductCard","compact","title","slug","baseSku","shortDescription","images","skuExtraLabel","formattedPrice","formattedPriceWithTax","isPreviouslyPurchased","isSubscription","variants","translations","initialTranslations","learnMoreUrl","onLearnMoreClick","onAddToCart","renderImage","useMemo","merge","defaultProductCardTranslations","hasManyVariants","length","isInStock","some","variant","isComingSoon","isEarlyAccess","localQuantity","useState","handleAddToCart","useCallback","quantity","shortDescriptionRef","shortDescriptionSize","useMeasure","jsx","S.Wrap","$compact","children","jsxs","S.Container","S.IconWrapper","S.PreviouslyPurchasedStar","Badge","earlyAccess","comingSoon","S.MetaAnchor","href","onClick","e","S.CustomImage","asset","sizes","S.PRODUCT_IMAGE_SIZE","responsive","S.Title","S.Sku","getSkuText","sku","S.ShortDescription","ref","S.ShortDescriptionInner","$wrapHeight","S.AddToCartContainer","S.PriceWrap","S.Price","S.PriceWithVAT","CartButton","hideIcon","label","view","select","soldOut","disabled","addToCart"],"mappings":";;;;;;;;;;;;;;AAYA,MAAMA,4BAA+B,GAAA;EACnCC,GACE,EAAA,OAAOC,gCAA4B,KAAA,QAAA,GAC/BA,mCACAA,gCAAwB,CAAAD,GAAA;EAC9BE,KAAO,EAAA,EAAA;EACPC,MAAQ,EAAA;AACV,CAAA;AAEO,MAAMC,cAAcA,CAAC;EAC1BC,OAAA;EACAC,KAAA;EACAC,IAAA;EACAC,OAAA;EACAC,gBAAA;EACAC,MAAA;EACAC,aAAA;EACAC,cAAA;EACAC,qBAAA;EACAC,qBAAA;EACAC,cAAA;EACAC,QAAA;EACAC,YAAc,EAAAC,mBAAA;EACdC,YAAA;EACAC,gBAAA;EACAC,WAAA;EACAC;AACF,CAAwB,KAAA;EAIhB,MAAAL,YAAA,GAAeM,QAAQ,MAAM;IAC1B,OAAAC,KAAA,CAAMC,gCAAgCP,mBAAmB,CAAA;EAAA,CAClE,EAAG,CAACA,mBAAmB,CAAC,CAAA;EAQlB,MAAAQ,eAAA,GAAkBH,QAAQ,MAAM;IACpC,OAAOP,SAASW,MAAS,GAAA,CAAA;EAAA,CACxB,EAAA,CAACX,QAAS,CAAAW,MAAM,CAAC,CAAA;EAKd,MAAAC,SAAA,GAAYL,QAAQ,MAAM;IACvB,OAAA,CAAC,CAACR,cAAA,IAAkB,CAAC,CAACC,UAAUa,IAAK,CAACC,OAAY,IAAAA,OAAA,CAAQF,SAAS,CAAA;EAAA,CACzE,EAAA,CAACb,cAAgB,EAAAC,QAAQ,CAAC,CAAA;EAMvB,MAAAe,YAAA,GAAeR,QAAQ,MAAM;IAC1B,OAAA,CAAC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AAAnC,gBAAA,CAAiBmC,GAAGpC,YAAY,CAAA;UAChDwD,OAAO1D,YAAa,CAAA2D;QAAA,KAEpBlD,eACF,GAAA,eAAAe,GAAA,CAACgC,UAAA,EAAA;UACC,cAAa,EAAA,oBAAA;UACb3C,OAAA,EAASF,YAAY,SAAY,GAAA,aAAA;UACjC8C,QAAQ,EAAA,IAAA;UACRpB,OAAS,EAAAnB,eAAA;UACTwC,KAAO,EAAA/C,SAAA,GAAYX,YAAa,CAAA4D,MAAA,GAAS5D,YAAa,CAAA6D;QAAA,CAAA,CAGxD,kBAAArC,GAAA,CAACgC,UAAA,EAAA;UACC,cAAA,EACE7C,YAAY,iBAAoB,GAAA,0BAAA;UAElCE,OACE,EAAAF,SAAA,GACI,SACA,GAAAG,YAAA,GACE,YACA,GAAA,aAAA;UAERgD,QAAA,EAAU,CAACnD,SAAa,IAAAG,YAAA;UACxBuB,OAAS,EAAAnB,eAAA;UACTuC,QAAQ,EAAA,IAAA;UACRC,KAAA,EACE5C,eACId,YAAa,CAAAkC,UAAA,GACb,CAACvB,SACC,GAAAX,YAAA,CAAa6D,UACb7D,YAAa,CAAA+D;QAAA,CAEvB,CAAA;OAEJ,CAAA;IACF,CAAA;EACF,CAAA,CAAA;AAEJ,CAAA;"}
|
|
1
|
+
{"version":3,"file":"ProductCard.mjs","sources":["../../../src/components/ProductCard/ProductCard.tsx"],"sourcesContent":["import merge from \"lodash/merge\";\nimport { useCallback, useMemo } from \"react\";\nimport { useMeasure } from \"react-use\";\n\nimport PreviouslyPurchasedStar from \"../../assets/icons/previouslyPurchasedStar.svg\";\nimport { getSkuText } from \"../../utils/variant\";\nimport { Badge } from \"../Badge\";\nimport { CartButton } from \"../Button\";\nimport { defaultProductCardTranslations } from \"./ProductCard.constants\";\nimport * as S from \"./ProductCard.styles\";\nimport type { ProductCardProps } from \"./ProductCard.types\";\n\nconst PreviouslyPurchasedStarAsset = {\n src:\n typeof PreviouslyPurchasedStar === \"string\"\n ? PreviouslyPurchasedStar\n : PreviouslyPurchasedStar.src,\n width: 20,\n height: 20,\n};\n\nexport const ProductCard = ({\n compact,\n title,\n slug,\n baseSku,\n shortDescription,\n images,\n skuExtraLabel,\n formattedPrice,\n formattedPriceWithTax,\n isPreviouslyPurchased,\n isSubscription,\n variants,\n translations: initialTranslations,\n learnMoreUrl,\n onLearnMoreClick,\n onAddToCart,\n renderImage,\n}: ProductCardProps) => {\n // #############################################################################\n // Merge translations\n // #############################################################################\n const translations = useMemo(() => {\n return merge(defaultProductCardTranslations, initialTranslations);\n }, [initialTranslations]);\n\n // #############################################################################\n // Parse data\n // #############################################################################\n /**\n * Has more than one variant\n */\n const hasManyVariants = useMemo(() => {\n return variants.length > 1;\n }, [variants.length]);\n\n /**\n * If one of the variants is in stock, the product is in stock\n */\n const isInStock = useMemo(() => {\n return !!isSubscription || !!variants?.some((variant) => variant.isInStock);\n }, [isSubscription, variants]);\n\n /**\n * If none of variants is in stock and one of the variants is\n * coming soon, the product is coming soon.\n */\n const isComingSoon = useMemo(() => {\n return !isInStock && !!variants?.some((variant) => variant.isComingSoon);\n }, [isInStock, variants]);\n\n /**\n * If one of the variants is early access, the product is early access.\n */\n const isEarlyAccess = useMemo(() => {\n return !!variants?.some((variant) => variant?.isEarlyAccess);\n }, [variants]);\n\n // #############################################################################\n // Quantity\n // #############################################################################\n const localQuantity = 1;\n // const [quantityDisabled, setQuantityDisabled] = useState(false);\n\n // useEffect(() => {\n // if (!isInStock) {\n // setLocalQuantity(0);\n // setQuantityDisabled(true);\n // }\n // }, [isInStock]);\n\n // #############################################################################\n // Events\n // #############################################################################\n const handleAddToCart = useCallback(() => {\n const quantity = hasManyVariants ? null : localQuantity;\n\n onAddToCart(slug, quantity);\n }, [hasManyVariants, localQuantity, onAddToCart, slug]);\n\n // #############################################################################\n // Handle short description size\n // #############################################################################\n const [shortDescriptionRef, shortDescriptionSize] =\n useMeasure<HTMLDivElement>();\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.Wrap $compact={compact}>\n <S.Container data-test-id=\"product-card\">\n {/* Product Flags */}\n <S.IconWrapper>\n {isPreviouslyPurchased && (\n <S.PreviouslyPurchasedStar {...PreviouslyPurchasedStarAsset} />\n )}\n {/**\n * NOTE: Disabled on May 18 2023\n * @see https://ui.slack.com/archives/G01B4G8GF2S/p1684436883345729\n */}\n {/* {isInStock && <Badge variant=\"blue\" data-test-id=\"badge-in-stock\">{translations.inStock}</Badge>} */}\n {isEarlyAccess && (\n <Badge variant=\"lightNavy\" data-test-id=\"badge-early-access\">\n {translations.earlyAccess}\n </Badge>\n )}\n {isComingSoon && (\n <Badge variant=\"lightNavy\" data-test-id=\"badge-coming-soon\">\n {translations.comingSoon}\n </Badge>\n )}\n </S.IconWrapper>\n\n <S.MetaAnchor\n href={learnMoreUrl}\n onClick={(e) => onLearnMoreClick(e, learnMoreUrl)}\n >\n {/* Product Image */}\n <S.CustomImage\n asset={images?.[0] ?? undefined}\n sizes={`${S.PRODUCT_IMAGE_SIZE}px`}\n renderImage={renderImage}\n responsive\n />\n\n {/* Product Title */}\n <S.Title data-test-id=\"product-card-title\">{title}</S.Title>\n\n {/* Product Sku */}\n <S.Sku>\n {getSkuText(variants?.[0]?.sku || baseSku, skuExtraLabel)}\n </S.Sku>\n\n {/* Product Description */}\n <S.ShortDescription ref={shortDescriptionRef}>\n <S.ShortDescriptionInner $wrapHeight={shortDescriptionSize.height}>\n {shortDescription}\n </S.ShortDescriptionInner>\n </S.ShortDescription>\n </S.MetaAnchor>\n\n {/* Product Price */}\n <S.AddToCartContainer>\n <S.PriceWrap>\n <S.Price data-test-id=\"price-label\">{formattedPrice}</S.Price>\n {formattedPriceWithTax && (\n <S.PriceWithVAT data-test-id=\"price-with-vat-label\">\n {formattedPriceWithTax}\n </S.PriceWithVAT>\n )}\n </S.PriceWrap>\n {isSubscription ? (\n <CartButton\n data-test-id=\"add-to-cart-btn\"\n variant=\"primary\"\n hideIcon\n onClick={(e) => onLearnMoreClick(e, learnMoreUrl)}\n label={translations.view}\n />\n ) : hasManyVariants ? (\n <CartButton\n data-test-id=\"select-variant-btn\"\n variant={isInStock ? \"primary\" : \"unavailable\"}\n hideIcon\n onClick={handleAddToCart}\n label={isInStock ? translations.select : translations.soldOut}\n />\n ) : (\n <CartButton\n data-test-id={\n isInStock ? \"add-to-cart-btn\" : \"add-to-cart-btn-disabled\"\n }\n variant={\n isInStock\n ? \"primary\"\n : isComingSoon\n ? \"comingSoon\"\n : \"unavailable\"\n }\n disabled={!isInStock || isComingSoon}\n onClick={handleAddToCart}\n hideIcon\n label={\n isComingSoon\n ? translations.comingSoon\n : !isInStock\n ? translations.soldOut\n : translations.addToCart\n }\n />\n )}\n </S.AddToCartContainer>\n </S.Container>\n </S.Wrap>\n );\n};\n"],"names":["PreviouslyPurchasedStarAsset","src","PreviouslyPurchasedStar","width","height","ProductCard","compact","title","slug","baseSku","shortDescription","images","skuExtraLabel","formattedPrice","formattedPriceWithTax","isPreviouslyPurchased","isSubscription","variants","translations","initialTranslations","learnMoreUrl","onLearnMoreClick","onAddToCart","renderImage","useMemo","merge","defaultProductCardTranslations","hasManyVariants","length","isInStock","some","variant","isComingSoon","isEarlyAccess","localQuantity","handleAddToCart","useCallback","quantity","shortDescriptionRef","shortDescriptionSize","useMeasure","jsx","S.Wrap","$compact","children","jsxs","S.Container","S.IconWrapper","S.PreviouslyPurchasedStar","Badge","earlyAccess","comingSoon","S.MetaAnchor","href","onClick","e","S.CustomImage","asset","sizes","S.PRODUCT_IMAGE_SIZE","responsive","S.Title","S.Sku","getSkuText","sku","S.ShortDescription","ref","S.ShortDescriptionInner","$wrapHeight","S.AddToCartContainer","S.PriceWrap","S.Price","S.PriceWithVAT","CartButton","hideIcon","label","view","select","soldOut","disabled","addToCart"],"mappings":";;;;;;;;;;;;;;AAYA,MAAMA,4BAA+B,GAAA;EACnCC,GACE,EAAA,OAAOC,gCAA4B,KAAA,QAAA,GAC/BA,mCACAA,gCAAwB,CAAAD,GAAA;EAC9BE,KAAO,E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GAAA,0BAAA;UAElCE,OACE,EAAAF,SAAA,GACI,SACA,GAAAG,YAAA,GACE,YACA,GAAA,aAAA;UAER+C,QAAA,EAAU,CAAClD,SAAa,IAAAG,YAAA;UACxBsB,OAAS,EAAAnB,eAAA;UACTuC,QAAQ,EAAA,IAAA;UACRC,KAAA,EACE3C,eACId,YAAa,CAAAiC,UAAA,GACb,CAACtB,SACC,GAAAX,YAAA,CAAa4D,UACb5D,YAAa,CAAA8D;QAAA,CAEvB,CAAA;OAEJ,CAAA;IACF,CAAA;EACF,CAAA,CAAA;AAEJ,CAAA;"}
|
|
@@ -68,8 +68,8 @@ const ProductCardPopupInternal = ({
|
|
|
68
68
|
});
|
|
69
69
|
}, [currentVariant?.optionValueIds, options, variants]);
|
|
70
70
|
const updateGalleryImage = react.useCallback(imageId => {
|
|
71
|
-
const imageIndex = imagesParsed
|
|
72
|
-
if (imageIndex !==
|
|
71
|
+
const imageIndex = imagesParsed.findIndex(image => image.id === imageId);
|
|
72
|
+
if (imageIndex !== -1) {
|
|
73
73
|
jumpToSlide(imageIndex);
|
|
74
74
|
}
|
|
75
75
|
}, [imagesParsed, jumpToSlide]);
|