@ubnt/store.core 9.57.0-beta.2 → 9.57.0-new-design
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +98 -545
- package/lib/_virtual/_virtual_multi-entry.js +15 -25
- package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
- package/lib/_virtual/_virtual_multi-entry.mjs +13 -13
- package/lib/apis/smartcat.d.ts +12 -2
- package/lib/apis/smartcat.js +27 -4
- package/lib/apis/smartcat.js.map +1 -1
- package/lib/apis/smartcat.mjs +27 -4
- package/lib/apis/smartcat.mjs.map +1 -1
- package/lib/assets/cart-secondary.svg +5 -0
- package/lib/assets/icon-location-pin.svg +5 -0
- package/lib/assets/icons/{menu/icon-globe.svg.js → cart-secondary.svg.js} +6 -6
- 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/{components/ModelCompareV3/assets/crestron.svg.js → assets/icons/menu/icon-location-pin.svg.js} +6 -6
- package/lib/assets/icons/menu/icon-location-pin.svg.js.map +1 -0
- package/lib/assets/icons/menu/icon-location-pin.svg.mjs +3 -0
- package/lib/assets/icons/menu/icon-location-pin.svg.mjs.map +1 -0
- package/lib/assets/logoUnifi.svg +10 -2
- package/lib/assets/udmPro.jpg +0 -0
- package/lib/assets/udmPro2.jpg +0 -0
- package/lib/assets/udmProMax.jpg +0 -0
- package/lib/assets/udmProMax2.jpg +0 -0
- package/lib/assets/udmProSpecial.jpg +0 -0
- package/lib/assets/udmProSpecial2.jpg +0 -0
- package/lib/components/Accordion/Accordion.js +4 -4
- package/lib/components/Avatar/Avatar.js +2 -2
- package/lib/components/Button/Button.js +12 -5
- 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 +11 -6
- 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/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.js +16 -9
- package/lib/components/ButtonGroup/ButtonGroup.js.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.mjs +16 -9
- package/lib/components/ButtonGroup/ButtonGroup.mjs.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.styles.d.ts +10 -6
- package/lib/components/ButtonGroup/ButtonGroup.styles.js +60 -20
- package/lib/components/ButtonGroup/ButtonGroup.styles.js.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.styles.mjs +60 -20
- package/lib/components/ButtonGroup/ButtonGroup.styles.mjs.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.types.d.ts +5 -0
- package/lib/components/ButtonGroupBasic/index.stories.d.ts +6 -0
- package/lib/components/CardSection/Card/Card.js +6 -6
- package/lib/components/CardSection/CardSection.js +2 -2
- package/lib/components/CardSection/CardSection.styles.d.ts +1 -1
- package/lib/components/CartIcon/CartIcon.js +2 -2
- 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/Checkbox/Checkbox.js +4 -4
- package/lib/components/CloserLookSection/CloserLookSection.js +11 -11
- package/lib/components/CloserLookSection/RecommendedAddons/RecommendedAddons.js +5 -5
- 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 +5 -4
- package/lib/components/Container/Container.js.map +1 -1
- package/lib/components/Container/Container.mjs +5 -4
- package/lib/components/Container/Container.mjs.map +1 -1
- package/lib/components/Container/index.stories.d.ts +5 -5
- package/lib/components/CustomImage/CustomImage.js +12 -12
- package/lib/components/Explore/Explore.js +5 -5
- package/lib/components/FeaturesSection_deprecated/Features/Features.js +2 -2
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.js +22 -22
- package/lib/components/Footer/Footer.js +2 -2
- package/lib/components/Footer/hooks/useFooterContent.js +5 -5
- package/lib/components/Gallery/Gallery.context.js +17 -17
- package/lib/components/Gallery/Gallery.js +9 -9
- package/lib/components/Gallery/GalleryControls/GalleryControls.js +4 -4
- package/lib/components/Gallery/GalleryItem/GalleryItem.js +8 -8
- package/lib/components/Gallery/GalleryThumbnails/GalleryThumbnails.js +8 -8
- package/lib/components/GridGallery/GridGallery.js +8 -8
- package/lib/components/GridGallery/GridModal/GridModal.js +6 -6
- package/lib/components/Header/AccountFrame/AccountFrame.js +11 -11
- package/lib/components/Header/AccountFrame/Mobile/Mobile.js +4 -4
- package/lib/components/Header/AccountMenu/AccountMenu.js +30 -20
- 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/CartModal/Empty/Empty.js +3 -3
- package/lib/components/Header/CartModalV2/CartModal.js +5 -5
- package/lib/components/Header/CartModalV2/Item/Item.js +4 -4
- package/lib/components/Header/CartModalV2/Item/Item.styles.d.ts +1 -1
- package/lib/components/Header/Header.js +40 -40
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/Header.mjs +6 -6
- package/lib/components/Header/Header.mjs.map +1 -1
- package/lib/components/Header/Header.stories.d.ts +111 -0
- package/lib/components/Header/Header.styles.d.ts +7 -12
- package/lib/components/Header/Header.styles.js +10 -32
- package/lib/components/Header/Header.styles.js.map +1 -1
- package/lib/components/Header/Header.styles.mjs +10 -31
- package/lib/components/Header/Header.styles.mjs.map +1 -1
- package/lib/components/Header/Header.types.d.ts +29 -5
- package/lib/components/Header/Header.types.js +2 -1
- package/lib/components/Header/Header.types.js.map +1 -1
- package/lib/components/Header/Header.types.mjs +2 -1
- package/lib/components/Header/Header.types.mjs.map +1 -1
- package/lib/components/Header/IsolatedHeader.d.ts +1 -0
- package/lib/components/Header/IsolatedHeader.js +50 -50
- 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 +6 -6
- package/lib/components/Header/LogoIcon/LogoIcon.d.ts +7 -0
- package/lib/components/Header/LogoIcon/LogoIcon.js +46 -0
- package/lib/components/Header/LogoIcon/LogoIcon.js.map +1 -0
- package/lib/components/Header/LogoIcon/LogoIcon.mjs +36 -0
- package/lib/components/Header/LogoIcon/LogoIcon.mjs.map +1 -0
- package/lib/components/Header/LogoIcon/index.d.ts +1 -0
- package/lib/components/Header/LogoIcon/index.js +6 -0
- package/lib/components/Header/LogoIcon/index.js.map +1 -0
- package/lib/components/Header/LogoIcon/index.mjs +3 -0
- package/lib/components/Header/LogoIcon/index.mjs.map +1 -0
- package/lib/components/Header/MenuItem/MenuItem.styles.d.ts +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.js +3 -3
- package/lib/components/Header/MenuItem/MenuItem.styles.js.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.mjs +3 -3
- package/lib/components/Header/MenuItem/MenuItem.styles.mjs.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.types.d.ts +1 -0
- package/lib/components/Header/Navigation/Carousel/Carousel.js +5 -5
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.js +12 -12
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.d.ts +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.js +6 -6
- 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 +116 -109
- 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/Overlay/Overlay.js +3 -3
- package/lib/components/Header/ProHeader/ProHeader.d.ts +9 -5
- package/lib/components/Header/ProHeader/ProHeader.js +270 -189
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +251 -171
- 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 +5 -5
- 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/HowToUseSection/HowToUseSection.styles.d.ts +2 -2
- package/lib/components/ImageCarousel/ImageCarousel.js +29 -33
- package/lib/components/ImageCarousel/ImageCarousel.js.map +1 -1
- package/lib/components/ImageCarousel/ImageCarousel.mjs +0 -4
- package/lib/components/ImageCarousel/ImageCarousel.mjs.map +1 -1
- package/lib/components/ImageSequence/ImageSequence.js +8 -8
- package/lib/components/LandingPage/Cards/Card/Card.js +4 -4
- package/lib/components/LandingPage/Cards/Cards.js +10 -10
- package/lib/components/LandingPage/LandingPage.js +2 -2
- package/lib/components/LandingPagePro/LandingPagePro.js +13 -13
- package/lib/components/LandingPagePro/LandingPagePro.styles.d.ts +1 -1
- package/lib/components/LandingPageSearch/LandingPageSearch.js +2 -2
- package/lib/components/LandingPageSearch/Modal/Modal.js +9 -9
- package/lib/components/LandingPageSidebar/LandingPageSidebar.js +12 -12
- package/lib/components/LayoutRenderer/LayoutRenderer.js +8 -8
- 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/EpisodeCard/EpisodeCard.js +7 -7
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.js +18 -18
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.styles.d.ts +1 -1
- package/lib/components/MicrositeColumnFeatureProgressBar/MicrositeColumnFeatureProgressBar.js +2 -2
- package/lib/components/MicrositeFeatureChecklist/MicrositeFeatureChecklist.js +3 -3
- package/lib/components/MicrositeFeatureProgressBar/MicrositeFeatureProgressBar.js +3 -3
- package/lib/components/MicrositeHero/MicrositeHero.js +18 -18
- package/lib/components/MicrositeIntroductionBlock/MicrositeIntroductionBlock.js +4 -4
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.js +9 -9
- package/lib/components/MicrositeProductGrid/MicrositeProductGrid.js +8 -8
- package/lib/components/MicrositeProductLearnMoreBlock/MicrositeProductLearnMoreBlockWrap.js +2 -2
- package/lib/components/MicrositeSectionWrap/MicrositeSectionWrap.styles.d.ts +1 -1
- package/lib/components/MicrositeSubSubNavigation/MicrositeSubSubNavigation.js +3 -3
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +12 -12
- package/lib/components/Microsites/MicrositePageContext.js +2 -2
- package/lib/components/Microsites/MicrositeProductPage.js +3 -3
- package/lib/components/Microsites/context/MicrositeProductPageContext.js +3 -3
- package/lib/components/MobileModal/MobileModal.js +4 -4
- package/lib/components/Modal/Modal.js +3 -3
- package/lib/components/ModelCompareV3/ModelCompareOverflowScrollButton.js +3 -3
- package/lib/components/ModelCompareV3/ModelComparePropertyValueGridItem.js +2 -2
- package/lib/components/ModelCompareV3/ModelCompareV3.js +14 -14
- package/lib/components/ModelCompareV3/ModelCompareV3.types.d.ts +0 -1
- package/lib/components/ModelCompareV3/ProductGroupsGrid.js +3 -3
- package/lib/components/ModelCompareV3/ScrollGroup/ScrollGroup.js +5 -5
- package/lib/components/ModelCompareV3/ScrollGroup/context.js +3 -3
- package/lib/components/ModelCompareV3/ScrollGroup/useScrollGroupItem.js +8 -8
- package/lib/components/ModelCompareV3/ScrollGroup/useScrollGroupSetScroll.js +2 -2
- package/lib/components/ModelCompareV3/ScrollGroup/useScrollGroupTo.js +2 -2
- package/lib/components/ModelCompareV3/StickyGrid/StickyGrid.js +7 -7
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridBody.js +2 -2
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridHeader.js +5 -5
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridItem.js +2 -2
- package/lib/components/ModelCompareV3/StickyGrid/context.js +3 -3
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/data/CloudGateways.js +9 -9
- package/lib/components/ModelCompareV3/data/CloudGateways.mjs +6 -6
- package/lib/components/ModelCompareV3/data/EnterpriseSwitching.js +2 -3
- package/lib/components/ModelCompareV3/data/EnterpriseSwitching.js.map +1 -1
- package/lib/components/ModelCompareV3/data/EnterpriseSwitching.mjs +2 -3
- package/lib/components/ModelCompareV3/data/EnterpriseSwitching.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/ProfessionalMaxSwitching.js +3 -10
- package/lib/components/ModelCompareV3/data/ProfessionalMaxSwitching.js.map +1 -1
- package/lib/components/ModelCompareV3/data/ProfessionalMaxSwitching.mjs +3 -10
- package/lib/components/ModelCompareV3/data/ProfessionalMaxSwitching.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/Switching.js +2 -3
- package/lib/components/ModelCompareV3/data/Switching.js.map +1 -1
- package/lib/components/ModelCompareV3/data/Switching.mjs +2 -3
- package/lib/components/ModelCompareV3/data/Switching.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/aggregation.js +0 -7
- package/lib/components/ModelCompareV3/data/products/aggregation.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/aggregation.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/aggregation.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.js +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseAggregation.js +0 -7
- package/lib/components/ModelCompareV3/data/products/enterpriseAggregation.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseAggregation.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/enterpriseAggregation.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus24PoE.js +0 -7
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus24PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus24PoE.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus24PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus48PoE.js +0 -7
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus48PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus48PoE.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus48PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/g3TouchEnterprise.js +1 -1
- package/lib/components/ModelCompareV3/data/products/g3TouchEnterprise.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/g3TouchEnterprise.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/g3TouchEnterprise.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/g3TouchPro.js +1 -1
- package/lib/components/ModelCompareV3/data/products/g3TouchPro.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/g3TouchPro.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/g3TouchPro.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/g3TouchWall.js +1 -1
- package/lib/components/ModelCompareV3/data/products/g3TouchWall.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/g3TouchWall.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/g3TouchWall.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/highCapacityAggregation.js +0 -7
- package/lib/components/ModelCompareV3/data/products/highCapacityAggregation.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/highCapacityAggregation.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/highCapacityAggregation.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/missionCritical.js +0 -7
- package/lib/components/ModelCompareV3/data/products/missionCritical.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/missionCritical.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/missionCritical.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalHd24.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalHd24.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalHd24.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalHd24.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalHd24Poe.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalHd24Poe.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalHd24Poe.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalHd24Poe.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax16.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax16.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax16.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax16.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax16PoE.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax16PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax16PoE.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax16PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax24.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax24.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax24.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax24.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax24PoE.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax24PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax24PoE.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax24PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax48.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax48.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax48.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax48.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax48PoE.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax48PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax48PoE.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax48PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesEnterprise.js +0 -8
- package/lib/components/ModelCompareV3/data/products/switchesEnterprise.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesEnterprise.mjs +0 -8
- package/lib/components/ModelCompareV3/data/products/switchesEnterprise.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessional.js +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesProfessional.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessional.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesProfessional.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalHd.js +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalHd.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalHd.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalHd.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalMax.js +1 -10
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalMax.mjs +1 -10
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesStandard.js +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesStandard.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesStandard.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesStandard.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +1 -1
- package/lib/components/ModelCompareV3/data/properties/index.d.ts +0 -1
- package/lib/components/ModelCompareV3/data/properties/index.js +0 -2
- package/lib/components/ModelCompareV3/data/properties/index.js.map +1 -1
- package/lib/components/ModelCompareV3/data/properties/index.mjs +0 -1
- package/lib/components/ModelCompareV3/data/properties/index.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/ar.json.js +16 -12
- package/lib/components/ModelCompareV3/translations/ar.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/ar.json.mjs +16 -12
- package/lib/components/ModelCompareV3/translations/ar.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/de.json.js +8 -4
- package/lib/components/ModelCompareV3/translations/de.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/de.json.mjs +8 -4
- package/lib/components/ModelCompareV3/translations/de.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/el.json.js +8 -4
- package/lib/components/ModelCompareV3/translations/el.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/el.json.mjs +8 -4
- package/lib/components/ModelCompareV3/translations/el.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/en.json.js +5 -4
- package/lib/components/ModelCompareV3/translations/en.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/en.json.mjs +5 -4
- package/lib/components/ModelCompareV3/translations/en.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/es.json.js +8 -4
- package/lib/components/ModelCompareV3/translations/es.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/es.json.mjs +8 -4
- package/lib/components/ModelCompareV3/translations/es.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/fr.json.js +7 -3
- package/lib/components/ModelCompareV3/translations/fr.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/fr.json.mjs +7 -3
- package/lib/components/ModelCompareV3/translations/fr.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/it.json.js +7 -3
- package/lib/components/ModelCompareV3/translations/it.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/it.json.mjs +7 -3
- package/lib/components/ModelCompareV3/translations/it.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/ja.json.js +13 -9
- package/lib/components/ModelCompareV3/translations/ja.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/ja.json.mjs +13 -9
- package/lib/components/ModelCompareV3/translations/ja.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/pt-BR.json.js +7 -3
- package/lib/components/ModelCompareV3/translations/pt-BR.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/pt-BR.json.mjs +7 -3
- package/lib/components/ModelCompareV3/translations/pt-BR.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/useModelCompareTranslation.d.ts +2 -2
- package/lib/components/ModelCompareV3/translations/zh-Hans.json.js +11 -7
- package/lib/components/ModelCompareV3/translations/zh-Hans.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/zh-Hans.json.mjs +11 -7
- package/lib/components/ModelCompareV3/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/zh-Hant-TW.json.js +16 -12
- package/lib/components/ModelCompareV3/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/zh-Hant-TW.json.mjs +16 -12
- package/lib/components/ModelCompareV3/translations/zh-Hant-TW.json.mjs.map +1 -1
- package/lib/components/Pagination/Pagination.js +3 -3
- package/lib/components/PriceRangeSlider/PriceRangeSlider.js +16 -16
- package/lib/components/ProductCard/ProductCard.js +7 -7
- package/lib/components/ProductCardPopup/ProductCardPopup.js +8 -8
- package/lib/components/ProductCompare/ProductCompare.js +7 -7
- package/lib/components/ProductDetails/ProductDetails.js +5 -5
- package/lib/components/ProductGrid/ProductGrid.js +10 -10
- package/lib/components/ProductKeyFeatures/ProductKeyFeatures.js +3 -3
- 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 +2 -2
- package/lib/components/ProductTechSpecs/ProductTechSpecs.styles.d.ts +2 -2
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.d.ts +2 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.js +81 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.js.map +1 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.mjs +73 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.mjs.map +1 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.stories.d.ts +5 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.d.ts +11 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.js +80 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.js.map +1 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.mjs +66 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.mjs.map +1 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.types.d.ts +12 -0
- package/lib/components/ProductTechSpecsV2/index.d.ts +1 -0
- package/lib/components/ProductTechSpecsV2/index.js +6 -0
- package/lib/components/ProductTechSpecsV2/index.js.map +1 -0
- package/lib/components/ProductTechSpecsV2/index.mjs +3 -0
- package/lib/components/ProductTechSpecsV2/index.mjs.map +1 -0
- package/lib/components/ProductWizard/Options/Options.js +3 -3
- package/lib/components/ProductWizard/ProductWizard.js +2 -2
- package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.js +5 -5
- package/lib/components/ProgressCircle/ProgressCircle.js +4 -4
- package/lib/components/QuantityControls/QuantityControls.js +6 -6
- package/lib/components/QuantityControls/QuantityControls.js.map +1 -1
- package/lib/components/QuantityControls/QuantityControls.mjs +2 -2
- package/lib/components/QuantityControls/QuantityControls.mjs.map +1 -1
- package/lib/components/QuantityControls/QuantityControls.types.d.ts +1 -1
- package/lib/components/QuantityInput/QuantityInput.js +6 -1
- package/lib/components/QuantityInput/QuantityInput.js.map +1 -1
- package/lib/components/QuantityInput/QuantityInput.mjs +6 -1
- package/lib/components/QuantityInput/QuantityInput.mjs.map +1 -1
- package/lib/components/RelatedProducts/RelatedProducts.js +5 -5
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.js +36 -36
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.js +12 -12
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +5 -5
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CheckboxSection.js +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.js +4 -4
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/SliderSection.js +3 -3
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js +7 -7
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.js +6 -6
- package/lib/components/ResourceCalculatorV1/PoeCalculator/PoeCalculator.js +9 -9
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerConfigurator.js +10 -10
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js +15 -15
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/RecommendedPoeSwitches.js +2 -2
- package/lib/components/ResourceCalculatorV1/ResourceCalculator.js +6 -6
- package/lib/components/ReverseLoopingVideo/ReverseLoopingVideo.js +5 -5
- package/lib/components/ScrollWrapper/ScrollWrapper.d.ts +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.js +33 -25
- 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.types.d.ts +2 -0
- package/lib/components/Search/Input/Input.d.ts +1 -1
- package/lib/components/Search/Input/Input.js +8 -8
- package/lib/components/Search/Input/Input.js.map +1 -1
- package/lib/components/Search/Input/Input.mjs +4 -4
- package/lib/components/Search/Input/Input.mjs.map +1 -1
- package/lib/components/Search/Input/Input.styles.js +0 -1
- package/lib/components/Search/Input/Input.styles.js.map +1 -1
- package/lib/components/Search/Input/Input.styles.mjs +0 -1
- package/lib/components/Search/Input/Input.styles.mjs.map +1 -1
- package/lib/components/Search/Input/Input.types.d.ts +3 -2
- package/lib/components/Search/Modal/Modal.js +3 -3
- package/lib/components/StorageSliders/Slider/Slider.js +3 -3
- package/lib/components/StorageSliders/StorageSliders.context.js +20 -20
- package/lib/components/StorageSliders/StorageSliders.js +4 -4
- package/lib/components/Tooltip/Tooltip.js +5 -5
- package/lib/components/VariantSelector/Variant/Compatibility/Compatibility.js +7 -7
- package/lib/components/VariantSelector/Variant/Variant.js +40 -40
- package/lib/components/VariantSelector/VariantSelector.js +16 -16
- package/lib/components/VideoPlayerNew/VideoPlayer.js +19 -19
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +2 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/index.mjs +2 -0
- package/lib/components/index.mjs.map +1 -1
- package/lib/constants/icons/options/colors/black.svg.js +5 -5
- package/lib/constants/icons/options/colors/index.js +3 -3
- package/lib/constants/icons/options/styles/black.svg.js +5 -5
- package/lib/constants/icons/options/styles/index.js +3 -3
- package/lib/constants/optionIcons.js +6 -6
- package/lib/constants/optionIcons.mjs +4 -4
- package/lib/constants/proStoreCategories/mapping/filters.d.ts +17 -0
- package/lib/constants/proStoreCategories/mapping/filters.js +17 -0
- package/lib/constants/proStoreCategories/mapping/filters.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/filters.mjs +17 -0
- package/lib/constants/proStoreCategories/mapping/filters.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.d.ts +2 -0
- package/lib/constants/proStoreCategories/mapping/index.js +21 -7
- package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.mjs +21 -7
- 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/unifi.d.ts +2 -0
- package/lib/constants/proStoreCategories/mapping/unifi.js +2 -0
- package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.mjs +2 -0
- package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.js +5 -4
- package/lib/constants/proStoreCategories/translations/ar.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.mjs +5 -4
- package/lib/constants/proStoreCategories/translations/ar.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.js +5 -4
- package/lib/constants/proStoreCategories/translations/de.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.mjs +5 -4
- package/lib/constants/proStoreCategories/translations/de.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.js +6 -5
- package/lib/constants/proStoreCategories/translations/el.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.mjs +6 -5
- package/lib/constants/proStoreCategories/translations/el.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.js +5 -1
- package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs +5 -2
- package/lib/constants/proStoreCategories/translations/en.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.js +5 -4
- package/lib/constants/proStoreCategories/translations/es.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.mjs +5 -4
- package/lib/constants/proStoreCategories/translations/es.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.js +5 -1
- package/lib/constants/proStoreCategories/translations/fr.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.mjs +5 -2
- package/lib/constants/proStoreCategories/translations/fr.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.js +5 -4
- package/lib/constants/proStoreCategories/translations/it.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.mjs +5 -4
- package/lib/constants/proStoreCategories/translations/it.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.js +5 -4
- package/lib/constants/proStoreCategories/translations/ja.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.mjs +5 -4
- package/lib/constants/proStoreCategories/translations/ja.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js +5 -4
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs +5 -4
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +5 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +5 -2
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +5 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +5 -2
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs.map +1 -1
- package/lib/constants/proStoreFilters/mapping.d.ts +43 -7
- package/lib/constants/proStoreFilters/mapping.js +129 -15
- package/lib/constants/proStoreFilters/mapping.js.map +1 -1
- package/lib/constants/proStoreFilters/mapping.mjs +129 -15
- 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 +34 -34
- package/lib/contexts/MenuContext/context.js.map +1 -1
- package/lib/contexts/MenuContext/context.mjs +1 -1
- package/lib/contexts/MenuContext/context.mjs.map +1 -1
- package/lib/contexts/MenuContext/mapping.js.map +1 -1
- package/lib/contexts/MenuContext/mapping.mjs.map +1 -1
- package/lib/contexts/MenuContext/presets.d.ts +1 -1
- package/lib/contexts/MenuContext/presets.js +2 -4
- package/lib/contexts/MenuContext/presets.js.map +1 -1
- package/lib/contexts/MenuContext/presets.mjs +2 -4
- package/lib/contexts/MenuContext/presets.mjs.map +1 -1
- package/lib/helpers/index.d.ts +0 -1
- package/lib/helpers/index.js +1 -11
- package/lib/helpers/index.js.map +1 -1
- package/lib/helpers/index.mjs +1 -2
- package/lib/helpers/index.mjs.map +1 -1
- package/lib/helpers/proStoreCategories.js +2 -2
- package/lib/helpers/ux.d.ts +8 -0
- package/lib/helpers/ux.js +15 -0
- package/lib/helpers/ux.js.map +1 -1
- package/lib/helpers/ux.mjs +15 -1
- package/lib/helpers/ux.mjs.map +1 -1
- package/lib/hooks/useHasTouch.js +3 -3
- package/lib/hooks/useHddRetentionCalculator.js +5 -5
- package/lib/hooks/useHorizontalScroll.js +2 -2
- package/lib/hooks/useLockBodyScrollCustom.js +3 -3
- package/lib/hooks/useScrollToY.js +2 -2
- package/lib/hooks/useTestMediaElementVolumeSetter.js +3 -3
- package/lib/hooks/useTranslation.js +6 -6
- package/lib/types/generated.d.ts +1 -1
- package/lib/types/generated.js.map +1 -1
- package/lib/types/generated.mjs.map +1 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/index.js +1 -2
- package/lib/types/index.js.map +1 -1
- package/lib/types/index.mjs +1 -1
- package/lib/types/object.d.ts +20 -0
- package/lib/types/string.d.ts +9 -0
- package/lib/types/string.js +3 -0
- package/lib/types/string.js.map +1 -0
- package/lib/types/string.mjs +2 -0
- package/lib/types/string.mjs.map +1 -0
- package/lib/utils/address.d.ts +62 -278
- package/lib/utils/address.js +8 -11
- package/lib/utils/address.js.map +1 -1
- package/lib/utils/address.mjs +8 -11
- package/lib/utils/address.mjs.map +1 -1
- package/lib/utils/array.d.ts +0 -4
- package/lib/utils/array.js +0 -10
- package/lib/utils/array.js.map +1 -1
- package/lib/utils/array.mjs +1 -10
- package/lib/utils/array.mjs.map +1 -1
- package/lib/utils/nextjs/ssr/registry.js +2 -2
- package/package.json +42 -42
- package/lib/assets/crestron.svg +0 -3
- package/lib/assets/icons/menu/icon-globe.svg.js.map +0 -1
- package/lib/assets/icons/menu/icon-globe.svg.mjs +0 -3
- package/lib/assets/icons/menu/icon-globe.svg.mjs.map +0 -1
- package/lib/components/ModelCompareV3/assets/crestron.svg.js.map +0 -1
- package/lib/components/ModelCompareV3/assets/crestron.svg.mjs +0 -3
- package/lib/components/ModelCompareV3/assets/crestron.svg.mjs.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.d.ts +0 -2
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.js +0 -18
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.js.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.mjs +0 -10
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.mjs.map +0 -1
- package/lib/helpers/product.d.ts +0 -87
- package/lib/helpers/product.js +0 -346
- package/lib/helpers/product.js.map +0 -1
- package/lib/helpers/product.mjs +0 -335
- package/lib/helpers/product.mjs.map +0 -1
- package/lib/helpers/product.test.d.ts +0 -1
- package/lib/types/product.d.ts +0 -87
- package/lib/types/product.js +0 -14
- package/lib/types/product.js.map +0 -1
- package/lib/types/product.mjs +0 -13
- package/lib/types/product.mjs.map +0 -1
- package/lib/utils/productSort.d.ts +0 -41
- package/lib/utils/productSort.js +0 -67
- package/lib/utils/productSort.js.map +0 -1
- package/lib/utils/productSort.mjs +0 -60
- package/lib/utils/productSort.mjs.map +0 -1
- package/lib/utils/validations/lastNameSuperRefinement.d.ts +0 -11
- package/lib/utils/validations/lastNameSuperRefinement.js +0 -25
- package/lib/utils/validations/lastNameSuperRefinement.js.map +0 -1
- package/lib/utils/validations/lastNameSuperRefinement.mjs +0 -21
- package/lib/utils/validations/lastNameSuperRefinement.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
var reactUse = require('react-use');
|
|
6
6
|
var layout = require('../../constants/layout.js');
|
|
7
7
|
var Gallery_context = require('./Gallery.context.js');
|
|
@@ -26,7 +26,7 @@ const parseGalleryEntries = (entries, fade) => {
|
|
|
26
26
|
slidesWithClones.push(slidesWithClones[1]);
|
|
27
27
|
return slidesWithClones;
|
|
28
28
|
};
|
|
29
|
-
const Gallery =
|
|
29
|
+
const Gallery = React.memo(function Gallery2({
|
|
30
30
|
controls,
|
|
31
31
|
entries,
|
|
32
32
|
parsed,
|
|
@@ -46,25 +46,25 @@ const Gallery = react.memo(function Gallery2({
|
|
|
46
46
|
visibleSlide,
|
|
47
47
|
resetTransitionState
|
|
48
48
|
} = Gallery_context.useGalleryControls();
|
|
49
|
-
const galleryRef =
|
|
50
|
-
const entriesParsed =
|
|
49
|
+
const galleryRef = React.useRef(null);
|
|
50
|
+
const entriesParsed = React.useMemo(() => {
|
|
51
51
|
return parsed ? entries : parseGalleryEntries(entries, fade);
|
|
52
52
|
}, [entries, fade, parsed]);
|
|
53
|
-
|
|
53
|
+
React.useEffect(() => {
|
|
54
54
|
setControlsType(controls);
|
|
55
55
|
}, [controls, setControlsType]);
|
|
56
|
-
|
|
56
|
+
React.useEffect(() => {
|
|
57
57
|
reset(entriesParsed.length);
|
|
58
58
|
}, [entriesParsed, reset]);
|
|
59
|
-
const activeEntry =
|
|
60
|
-
const couldBeNext =
|
|
59
|
+
const activeEntry = React.useMemo(() => entriesParsed[visibleSlide], [entriesParsed, visibleSlide]);
|
|
60
|
+
const couldBeNext = React.useCallback(index => {
|
|
61
61
|
const potentialNextRightSlideIndex = visibleSlide + 1 > entriesParsed.length - 1 ? 0 : visibleSlide + 1;
|
|
62
62
|
const potentialNextLeftSlideIndex = visibleSlide - 1 < 0 ? entriesParsed.length - 1 : visibleSlide - 1;
|
|
63
63
|
return !!(potentialNextRightSlideIndex === index || potentialNextLeftSlideIndex === index);
|
|
64
64
|
}, [entriesParsed.length, visibleSlide]);
|
|
65
65
|
const isTabletUp = reactUse.useMedia(layout.BREAKPOINTS.TABLET_UP, false);
|
|
66
66
|
const hoveredRaw = reactUse.useHoverDirty(galleryRef, isTabletUp);
|
|
67
|
-
const [hovered, setHovered] =
|
|
67
|
+
const [hovered, setHovered] = React.useState(false);
|
|
68
68
|
reactUse.useDebounce(() => {
|
|
69
69
|
setHovered(hoveredRaw);
|
|
70
70
|
}, 10, [hoveredRaw]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
require('../../../assets/icons/arrowRightMicro.svg.js');
|
|
6
6
|
var Gallery_context = require('../Gallery.context.js');
|
|
7
7
|
var GalleryControls_styles = require('./GalleryControls.styles.js');
|
|
@@ -13,7 +13,7 @@ function _interopDefault(e) {
|
|
|
13
13
|
}
|
|
14
14
|
var arrowRightMicroSvg__default = /*#__PURE__*/_interopDefault(arrowRightMicroSvg);
|
|
15
15
|
"use strict";
|
|
16
|
-
const GalleryControl =
|
|
16
|
+
const GalleryControl = React.memo(function GalleryRightControl({
|
|
17
17
|
label,
|
|
18
18
|
side,
|
|
19
19
|
rounded,
|
|
@@ -23,7 +23,7 @@ const GalleryControl = react.memo(function GalleryRightControl({
|
|
|
23
23
|
setNext,
|
|
24
24
|
setPrevious
|
|
25
25
|
} = Gallery_context.useGalleryControls();
|
|
26
|
-
const handleClick =
|
|
26
|
+
const handleClick = React.useCallback(() => {
|
|
27
27
|
onClick?.();
|
|
28
28
|
switch (side) {
|
|
29
29
|
case "left":
|
|
@@ -57,7 +57,7 @@ const GalleryOutsideControlsInfo = () => {
|
|
|
57
57
|
children: currentImageLabel
|
|
58
58
|
});
|
|
59
59
|
};
|
|
60
|
-
const GalleryBottomControls =
|
|
60
|
+
const GalleryBottomControls = React.memo(function GalleryBottomControls2({
|
|
61
61
|
className,
|
|
62
62
|
size,
|
|
63
63
|
onControl
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
var reactUse = require('react-use');
|
|
6
6
|
var layout = require('../../../constants/layout.js');
|
|
7
7
|
var GalleryItem_styles = require('./GalleryItem.styles.js');
|
|
8
8
|
"use strict";
|
|
9
|
-
const GalleryItem =
|
|
9
|
+
const GalleryItem = React.memo(function GalleryItem2({
|
|
10
10
|
item,
|
|
11
11
|
renderImage,
|
|
12
12
|
priority,
|
|
@@ -16,10 +16,10 @@ const GalleryItem = react.memo(function GalleryItem2({
|
|
|
16
16
|
couldBeNext = true,
|
|
17
17
|
objectFit = "cover"
|
|
18
18
|
}) {
|
|
19
|
-
const videoRef =
|
|
20
|
-
const isVideoHovering =
|
|
19
|
+
const videoRef = React.useRef(null);
|
|
20
|
+
const isVideoHovering = React.useRef(false);
|
|
21
21
|
const isMobile = reactUse.useMedia(layout.BREAKPOINTS.TABLET_AND_DOWN, false);
|
|
22
|
-
const handleMouseEnter =
|
|
22
|
+
const handleMouseEnter = React.useCallback(() => {
|
|
23
23
|
isVideoHovering.current = true;
|
|
24
24
|
if (!videoRef.current) {
|
|
25
25
|
return;
|
|
@@ -40,8 +40,8 @@ const GalleryItem = react.memo(function GalleryItem2({
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
}, []);
|
|
43
|
-
const [isVisible, setIsVisible] =
|
|
44
|
-
|
|
43
|
+
const [isVisible, setIsVisible] = React.useState(isActive);
|
|
44
|
+
React.useEffect(() => {
|
|
45
45
|
if (!isActive) {
|
|
46
46
|
window.setTimeout(() => {
|
|
47
47
|
setIsVisible(false);
|
|
@@ -52,7 +52,7 @@ const GalleryItem = react.memo(function GalleryItem2({
|
|
|
52
52
|
setIsVisible(true);
|
|
53
53
|
}
|
|
54
54
|
}, [isActive, isVisible]);
|
|
55
|
-
|
|
55
|
+
React.useEffect(() => {
|
|
56
56
|
if (!isVisible && videoRef.current) {
|
|
57
57
|
videoRef.current.pause();
|
|
58
58
|
videoRef.current.currentTime = 0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
var reactUse = require('react-use');
|
|
6
6
|
require('../../ScrollWrapper/index.js');
|
|
7
7
|
var Gallery_context = require('../Gallery.context.js');
|
|
@@ -18,26 +18,26 @@ const GalleryThumbnails = function GalleryThumbnails2({
|
|
|
18
18
|
visibleSlide,
|
|
19
19
|
jumpToSlide
|
|
20
20
|
} = Gallery_context.useGalleryControls();
|
|
21
|
-
const handleThumbnailClick =
|
|
21
|
+
const handleThumbnailClick = React.useCallback(index => {
|
|
22
22
|
if (expanded) {
|
|
23
23
|
onControl?.();
|
|
24
24
|
jumpToSlide(index);
|
|
25
25
|
}
|
|
26
26
|
}, [expanded, jumpToSlide, onControl]);
|
|
27
|
-
const [allowPointers, setAllowPointers] =
|
|
27
|
+
const [allowPointers, setAllowPointers] = React.useState(false);
|
|
28
28
|
reactUse.useDebounce(() => {
|
|
29
29
|
setAllowPointers(expanded);
|
|
30
30
|
}, GalleryThumbnails_styles.GALLERY_TRANSITION_MS, [expanded, visibleSlide]);
|
|
31
|
-
const wrapRef =
|
|
32
|
-
const [scrollOffset, setScrollOffset] =
|
|
33
|
-
const [containerWidth, setContainerWidth] =
|
|
34
|
-
const onScrollChange =
|
|
31
|
+
const wrapRef = React.useRef(null);
|
|
32
|
+
const [scrollOffset, setScrollOffset] = React.useState(0);
|
|
33
|
+
const [containerWidth, setContainerWidth] = React.useState(0);
|
|
34
|
+
const onScrollChange = React.useCallback(({
|
|
35
35
|
scrollX
|
|
36
36
|
}) => {
|
|
37
37
|
setScrollOffset(scrollX);
|
|
38
38
|
setContainerWidth(wrapRef.current?.offsetWidth ?? 0);
|
|
39
39
|
}, []);
|
|
40
|
-
|
|
40
|
+
React.useEffect(() => {
|
|
41
41
|
setScrollOffset(0);
|
|
42
42
|
setContainerWidth(wrapRef.current?.offsetWidth ?? 0);
|
|
43
43
|
}, [items]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
var reactUse = require('react-use');
|
|
6
6
|
require('../../assets/icons/play-big.svg.js');
|
|
7
7
|
var layout = require('../../constants/layout.js');
|
|
@@ -27,11 +27,11 @@ const GridGallery = function GridGallery2({
|
|
|
27
27
|
onModalToggle
|
|
28
28
|
}) {
|
|
29
29
|
const isTablet = reactUse.useMedia(layout.BREAKPOINTS.TABLET_AND_DOWN, false);
|
|
30
|
-
const [activeModalId, setActiveModalId] =
|
|
31
|
-
|
|
30
|
+
const [activeModalId, setActiveModalId] = React.useState("");
|
|
31
|
+
React.useEffect(() => {
|
|
32
32
|
onModalToggle?.(activeModalId);
|
|
33
33
|
}, [onModalToggle, activeModalId]);
|
|
34
|
-
const getAssetAspectRatioType =
|
|
34
|
+
const getAssetAspectRatioType = React.useCallback(asset => {
|
|
35
35
|
const aspectHeightRatio = asset.height / asset.width;
|
|
36
36
|
const heightRatios = Object.values(GridGallery_styles.GRID_GALLERY_RATIOS).map(ratios => ratios.height);
|
|
37
37
|
const heightRatio = number.findClosestNumber(heightRatios, aspectHeightRatio);
|
|
@@ -42,7 +42,7 @@ const GridGallery = function GridGallery2({
|
|
|
42
42
|
}
|
|
43
43
|
return GridGallery_types.RatioType.OneThird;
|
|
44
44
|
}, []);
|
|
45
|
-
const parsedAssets =
|
|
45
|
+
const parsedAssets = React.useMemo(() => {
|
|
46
46
|
const parsed = assetsInitial.map(asset => {
|
|
47
47
|
const ratioType = getAssetAspectRatioType(asset);
|
|
48
48
|
return {
|
|
@@ -60,8 +60,8 @@ const GridGallery = function GridGallery2({
|
|
|
60
60
|
return asset;
|
|
61
61
|
});
|
|
62
62
|
}, [assetsInitial, getAssetAspectRatioType]);
|
|
63
|
-
const [assetRows, setAssetRows] =
|
|
64
|
-
const createAssetRows =
|
|
63
|
+
const [assetRows, setAssetRows] = React.useState([]);
|
|
64
|
+
const createAssetRows = React.useCallback(() => {
|
|
65
65
|
const fullRows = [];
|
|
66
66
|
const partialRows = [];
|
|
67
67
|
const availableAssets = [...parsedAssets];
|
|
@@ -123,7 +123,7 @@ const GridGallery = function GridGallery2({
|
|
|
123
123
|
}
|
|
124
124
|
setAssetRows(fullRows);
|
|
125
125
|
}, [parsedAssets]);
|
|
126
|
-
|
|
126
|
+
React.useEffect(() => {
|
|
127
127
|
createAssetRows();
|
|
128
128
|
}, [
|
|
129
129
|
// HACK: needed parsedAssets to retrigger the effect
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
var reactUse = require('react-use');
|
|
6
6
|
require('../../../constants/icons/index.js');
|
|
7
7
|
var Header_styles = require('../../Header/Header.styles.js');
|
|
@@ -24,9 +24,9 @@ const GridModal = function CartModal({
|
|
|
24
24
|
height,
|
|
25
25
|
videoStartTime
|
|
26
26
|
}) {
|
|
27
|
-
const ref =
|
|
28
|
-
const refVideo =
|
|
29
|
-
const [offsetTop, setOffsetTop] =
|
|
27
|
+
const ref = React.useRef(null);
|
|
28
|
+
const refVideo = React.useRef(null);
|
|
29
|
+
const [offsetTop, setOffsetTop] = React.useState(0);
|
|
30
30
|
reactUse.useClickAway(ref, onClose, ["click"]);
|
|
31
31
|
reactUse.useLockBodyScroll(open);
|
|
32
32
|
reactUse.useKeyPressEvent("Escape", () => {
|
|
@@ -34,12 +34,12 @@ const GridModal = function CartModal({
|
|
|
34
34
|
onClose();
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
|
|
37
|
+
React.useEffect(() => {
|
|
38
38
|
if (open && refVideo.current && videoStartTime) {
|
|
39
39
|
refVideo.current.currentTime = videoStartTime;
|
|
40
40
|
}
|
|
41
41
|
}, [open, videoStartTime]);
|
|
42
|
-
|
|
42
|
+
React.useEffect(() => {
|
|
43
43
|
if (window.scrollY === 0) {
|
|
44
44
|
setOffsetTop(Header_styles.HEADER_HEIGHT);
|
|
45
45
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
var reactUse = require('react-use');
|
|
6
6
|
var url = require('../../../constants/url.js');
|
|
7
7
|
require('../../../contexts/MenuContext/mapping.js');
|
|
@@ -20,8 +20,8 @@ const AccountFrame = function AccountFrame2({
|
|
|
20
20
|
renderImage,
|
|
21
21
|
account
|
|
22
22
|
}) {
|
|
23
|
-
const ref =
|
|
24
|
-
const name =
|
|
23
|
+
const ref = React.useRef(null);
|
|
24
|
+
const name = React.useRef(null);
|
|
25
25
|
const {
|
|
26
26
|
formatMessage
|
|
27
27
|
} = useTranslation.useTranslation({
|
|
@@ -60,8 +60,8 @@ const AccountFrame = function AccountFrame2({
|
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
const isHovering = reactUse.useHoverDirty(name);
|
|
63
|
-
const [showPopover, setShowPopover] =
|
|
64
|
-
|
|
63
|
+
const [showPopover, setShowPopover] = React.useState(false);
|
|
64
|
+
React.useEffect(() => {
|
|
65
65
|
if (name.current) {
|
|
66
66
|
const displayPopover = name.current.offsetWidth < name.current.scrollWidth;
|
|
67
67
|
if (displayPopover && isHovering) {
|
|
@@ -71,7 +71,7 @@ const AccountFrame = function AccountFrame2({
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}, [isHovering]);
|
|
74
|
-
const handleClose =
|
|
74
|
+
const handleClose = React.useCallback(() => {
|
|
75
75
|
onClose();
|
|
76
76
|
}, [onClose]);
|
|
77
77
|
reactUse.useClickAway(ref, event => {
|
|
@@ -87,22 +87,22 @@ const AccountFrame = function AccountFrame2({
|
|
|
87
87
|
handleClose();
|
|
88
88
|
}
|
|
89
89
|
}, ["click"]);
|
|
90
|
-
const hasAccountEvents =
|
|
90
|
+
const hasAccountEvents = React.useMemo(() => {
|
|
91
91
|
return !!(account && (account.handleLogin || account.handleRegister || account.handleLogout));
|
|
92
92
|
}, [account]);
|
|
93
|
-
const handleLogout =
|
|
93
|
+
const handleLogout = React.useCallback(() => {
|
|
94
94
|
account?.handleLogout?.();
|
|
95
95
|
handleClose();
|
|
96
96
|
}, [handleClose, account]);
|
|
97
|
-
const handleUnifiSiteManager =
|
|
97
|
+
const handleUnifiSiteManager = React.useCallback(() => {
|
|
98
98
|
window.open(url.ExternalUrl.UNIFI_SITE_MANAGER);
|
|
99
99
|
handleClose();
|
|
100
100
|
}, [handleClose]);
|
|
101
|
-
const handleOrderHistoryClick =
|
|
101
|
+
const handleOrderHistoryClick = React.useCallback(() => {
|
|
102
102
|
account?.handleOrderHistory?.();
|
|
103
103
|
handleClose();
|
|
104
104
|
}, [account, handleClose]);
|
|
105
|
-
const onManageAccount =
|
|
105
|
+
const onManageAccount = React.useCallback(() => {
|
|
106
106
|
account?.handleManageAccount?.();
|
|
107
107
|
handleClose();
|
|
108
108
|
}, [account, handleClose]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
var url = require('../../../../constants/url.js');
|
|
6
6
|
require('../../../../contexts/MenuContext/mapping.js');
|
|
7
7
|
require('../../../../hooks/index.js');
|
|
@@ -54,14 +54,14 @@ const AccountFrameMobile = function AccountFrameMobile2({
|
|
|
54
54
|
}).then(res => res.default)
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
|
-
const hasAccountEvents =
|
|
57
|
+
const hasAccountEvents = React.useMemo(() => {
|
|
58
58
|
return !!(account?.handleLogin && account.handleRegister && account.handleLogout);
|
|
59
59
|
}, [account]);
|
|
60
|
-
const handleUnifiSiteManager =
|
|
60
|
+
const handleUnifiSiteManager = React.useCallback(() => {
|
|
61
61
|
window.open(url.ExternalUrl.UNIFI_SITE_MANAGER);
|
|
62
62
|
onClose();
|
|
63
63
|
}, [onClose]);
|
|
64
|
-
const onCloseFn =
|
|
64
|
+
const onCloseFn = React.useCallback(fn => {
|
|
65
65
|
return () => {
|
|
66
66
|
fn?.();
|
|
67
67
|
onClose();
|
|
@@ -5,7 +5,7 @@ var AccountMenu$1 = require('@ubnt/ui-components/aria/AccountMenu');
|
|
|
5
5
|
var Avatar = require('@ubnt/ui-components/aria/Avatar');
|
|
6
6
|
var experimental = require('@ubnt/ui-components/aria/experimental');
|
|
7
7
|
var Button = require('@ubnt/ui-components/Button');
|
|
8
|
-
var
|
|
8
|
+
var React = require('react');
|
|
9
9
|
var reactUse = require('react-use');
|
|
10
10
|
require('../../../assets/icons/menu/icon-avatar-placeholder-dark.png.js');
|
|
11
11
|
require('../../../assets/icons/menu/icon-avatar-placeholder.png.js');
|
|
@@ -93,30 +93,30 @@ const AccountMenu = ({
|
|
|
93
93
|
[constants.Language.Tw]: () => Promise.resolve(en["default"])
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
|
-
const megaphoneHttpService =
|
|
96
|
+
const megaphoneHttpService = React.useMemo(() => {
|
|
97
97
|
if (megaphoneServiceUrl) {
|
|
98
98
|
return new megaphone_http_service["default"](megaphoneServiceUrl);
|
|
99
99
|
}
|
|
100
100
|
return null;
|
|
101
101
|
}, [megaphoneServiceUrl]);
|
|
102
|
-
const hasAccountEvents =
|
|
102
|
+
const hasAccountEvents = React.useMemo(() => {
|
|
103
103
|
return !!(account && (account.handleLogin || account.handleRegister || account.handleLogout));
|
|
104
104
|
}, [account]);
|
|
105
|
-
const handleLogout =
|
|
105
|
+
const handleLogout = React.useCallback(() => {
|
|
106
106
|
account?.handleLogout?.();
|
|
107
107
|
}, [account]);
|
|
108
|
-
const handleUnifiSiteManager =
|
|
108
|
+
const handleUnifiSiteManager = React.useCallback(() => {
|
|
109
109
|
window.open(url.ExternalUrl.UNIFI_SITE_MANAGER);
|
|
110
110
|
}, []);
|
|
111
|
-
const handleOrderHistoryClick =
|
|
111
|
+
const handleOrderHistoryClick = React.useCallback(() => {
|
|
112
112
|
account?.handleOrderHistory?.();
|
|
113
113
|
}, [account]);
|
|
114
|
-
const onManageAccount =
|
|
114
|
+
const onManageAccount = React.useCallback(() => {
|
|
115
115
|
account?.handleManageAccount?.();
|
|
116
116
|
}, [account]);
|
|
117
|
-
const [announcements, setAnnouncements] =
|
|
118
|
-
const [, setIsAnnouncementsLoading] =
|
|
119
|
-
|
|
117
|
+
const [announcements, setAnnouncements] = React.useState([]);
|
|
118
|
+
const [, setIsAnnouncementsLoading] = React.useState(false);
|
|
119
|
+
React.useEffect(() => {
|
|
120
120
|
if (testStorybookAnnouncements?.length) {
|
|
121
121
|
setAnnouncements(testStorybookAnnouncements);
|
|
122
122
|
}
|
|
@@ -128,12 +128,12 @@ const AccountMenu = ({
|
|
|
128
128
|
data
|
|
129
129
|
}) => setAnnouncements(data ?? [])).catch(e => console.error(e)).finally(() => setIsAnnouncementsLoading(false));
|
|
130
130
|
}, [megaphoneHttpService, testStorybookAnnouncements]);
|
|
131
|
-
const unreadAnnouncements =
|
|
131
|
+
const unreadAnnouncements = React.useMemo(() => {
|
|
132
132
|
return announcements.filter(({
|
|
133
133
|
isRead
|
|
134
134
|
}) => !isRead);
|
|
135
135
|
}, [announcements]);
|
|
136
|
-
const markAsRead =
|
|
136
|
+
const markAsRead = React.useCallback(async announcement => {
|
|
137
137
|
if (!megaphoneHttpService) {
|
|
138
138
|
return;
|
|
139
139
|
}
|
|
@@ -145,7 +145,7 @@ const AccountMenu = ({
|
|
|
145
145
|
setAnnouncements([...filtered, announcement]);
|
|
146
146
|
});
|
|
147
147
|
}, [announcements, megaphoneHttpService]);
|
|
148
|
-
const getAnnouncementButtons =
|
|
148
|
+
const getAnnouncementButtons = React.useCallback((announcement, markAsRead2, onExternalClick) => {
|
|
149
149
|
return [/* @__PURE__ */jsxRuntime.jsx(AccountMenu_styles.StyledMessageClearBtn, {
|
|
150
150
|
variant: "inline",
|
|
151
151
|
type: "button",
|
|
@@ -160,7 +160,7 @@ const AccountMenu = ({
|
|
|
160
160
|
children: formatMessage("Show Me")
|
|
161
161
|
}, `btn-show-me-${announcement.announcementId}`)];
|
|
162
162
|
}, [formatMessage]);
|
|
163
|
-
const mappedAnnouncements =
|
|
163
|
+
const mappedAnnouncements = React.useMemo(() => {
|
|
164
164
|
return (unreadAnnouncements ?? [])?.map(announcement => ({
|
|
165
165
|
...announcement,
|
|
166
166
|
id: announcement.announcementId,
|
|
@@ -181,7 +181,7 @@ const AccountMenu = ({
|
|
|
181
181
|
animateIn,
|
|
182
182
|
animateOut
|
|
183
183
|
} = Avatar.useAnnouncementAnimation(START_KEY, "userAvatar" /* UserAvatar */);
|
|
184
|
-
|
|
184
|
+
React.useEffect(() => {
|
|
185
185
|
if (announcements?.length) {
|
|
186
186
|
animateIn();
|
|
187
187
|
return;
|
|
@@ -191,20 +191,30 @@ const AccountMenu = ({
|
|
|
191
191
|
}
|
|
192
192
|
animateOut();
|
|
193
193
|
}, [animateIn, animateOut, announcements, display]);
|
|
194
|
-
const showOrderHistory =
|
|
195
|
-
const showLogin =
|
|
196
|
-
const showUiAccount =
|
|
197
|
-
const unifiSiteManagerButtonVariant =
|
|
194
|
+
const showOrderHistory = React.useMemo(() => !!(account?.customer && account?.handleOrderHistory), [account?.customer, account?.handleOrderHistory]);
|
|
195
|
+
const showLogin = React.useMemo(() => !!(!account?.customer && account?.handleLogin), [account?.customer, account?.handleLogin]);
|
|
196
|
+
const showUiAccount = React.useMemo(() => !!(!hasAccountEvents || account?.customer && !account?.handleManageAccount), [account?.customer, account?.handleManageAccount, hasAccountEvents]);
|
|
197
|
+
const unifiSiteManagerButtonVariant = React.useMemo(() => {
|
|
198
198
|
if (showOrderHistory || showLogin || showUiAccount) {
|
|
199
199
|
return "tertiary";
|
|
200
200
|
}
|
|
201
201
|
return "primary";
|
|
202
202
|
}, [showLogin, showOrderHistory, showUiAccount]);
|
|
203
|
+
if (!account || account.loading) {
|
|
204
|
+
return /* @__PURE__ */jsxRuntime.jsx(AccountMenu_styles.UiAccountMenuWrap, {
|
|
205
|
+
children: /* @__PURE__ */jsxRuntime.jsx(AccountMenu_styles.IconWrap, {
|
|
206
|
+
motif,
|
|
207
|
+
children: /* @__PURE__ */jsxRuntime.jsx(Header_styles.SkeletonCircleLoader, {
|
|
208
|
+
diameter: Header_styles.HEADER_ICON_SIZE
|
|
209
|
+
})
|
|
210
|
+
})
|
|
211
|
+
});
|
|
212
|
+
}
|
|
203
213
|
return /* @__PURE__ */jsxRuntime.jsx(AccountMenu_styles.UiAccountMenuWrap, {
|
|
204
214
|
children: /* @__PURE__ */jsxRuntime.jsxs(AccountMenu$1.AccountMenu.Root, {
|
|
205
215
|
onOpenChange: isOpen => isOpen ? onOpen?.() : onClose?.(),
|
|
206
216
|
children: [/* @__PURE__ */jsxRuntime.jsx(AccountMenu$1.AccountMenu.Trigger, {
|
|
207
|
-
children: account
|
|
217
|
+
children: account.customer ? /* @__PURE__ */jsxRuntime.jsx(AccountMenu_styles.StyledAvatar, {
|
|
208
218
|
image: account.customer.picture || (motif === "dark" ? AvatarDarkSrc : AvatarSrc),
|
|
209
219
|
animate,
|
|
210
220
|
alt: "Avatar",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountMenu.js","sources":["../../../../src/components/Header/AccountMenu/AccountMenu.tsx"],"sourcesContent":["import { AccountMenu as AccountMenuBase } from \"@ubnt/ui-components/aria/AccountMenu\";\nimport { useAnnouncementAnimation } from \"@ubnt/ui-components/aria/Avatar\";\nimport { Link } from \"@ubnt/ui-components/aria/experimental\";\nimport { ButtonLink, Button as ButtonNext } from \"@ubnt/ui-components/Button\";\nimport { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { useMedia } from \"react-use\";\n\nimport AvatarPlaceholderDarkIcon from \"../../../assets/icons/menu/icon-avatar-placeholder-dark.png\";\nimport AvatarPlaceholderIcon from \"../../../assets/icons/menu/icon-avatar-placeholder.png\";\nimport * as icons from \"../../../constants/icons\";\nimport { BREAKPOINTS } from \"../../../constants/layout\";\nimport { ExternalUrl } from \"../../../constants/url\";\nimport { useMenu } from \"../../../contexts/MenuContext\";\nimport { Language } from \"../../../contexts/MenuContext/mapping\";\nimport { useTranslation } from \"../../../hooks\";\nimport {\n FOOTER_LINKS,\n FooterLinkId,\n useFooterContent,\n} from \"../../Footer/hooks/useFooterContent\";\nimport EN_TRANSLATION from \"../AccountFrame/translations/en.json\";\nimport { HEADER_ICON_SIZE } from \"../Header.styles\";\nimport * as S from \"./AccountMenu.styles\";\nimport type { AccountMenuProps } from \"./AccountMenu.types\";\nimport type { Announcement } from \"./megaphone.http.service\";\nimport MegaphoneHttpService from \"./megaphone.http.service\";\n\nenum AvatarDisplayType {\n UserAvatar = \"userAvatar\",\n Announcement = \"announcement\",\n}\n\nconst AvatarDarkSrc =\n typeof AvatarPlaceholderDarkIcon === \"string\"\n ? AvatarPlaceholderDarkIcon\n : AvatarPlaceholderDarkIcon.src;\nconst AvatarSrc =\n typeof AvatarPlaceholderIcon === \"string\"\n ? AvatarPlaceholderIcon\n : AvatarPlaceholderIcon.src;\n\nconst START_KEY = \"start\";\n\nexport const AccountMenu = ({\n onClose,\n onOpen,\n account,\n megaphoneServiceUrl,\n // eslint-disable-next-line sonarjs/deprecation\n testStorybookAnnouncements,\n}: AccountMenuProps) => {\n const isMobile = useMedia(BREAKPOINTS.MOBILE_AND_DOWN, false);\n const { urls } = useFooterContent();\n\n // #############################################################################\n // Menu\n // #############################################################################\n const { motif } = useMenu();\n\n // NOTE: Reusing \"Account Frame\" translations\n // TODO: Migrate later fully to this component\n const { formatMessage } = useTranslation({\n defaultTranslation: EN_TRANSLATION,\n additionalTranslations: {\n [Language.Ja]: () =>\n import(\"../AccountFrame/translations/ja.json\").then(\n (res) => res.default,\n ),\n [Language.Ar]: () =>\n import(\"../AccountFrame/translations/ar.json\").then(\n (res) => res.default,\n ),\n [Language.De]: () =>\n import(\"../AccountFrame/translations/de.json\").then(\n (res) => res.default,\n ),\n [Language.Es]: () =>\n import(\"../AccountFrame/translations/es.json\").then(\n (res) => res.default,\n ),\n [Language.El]: () =>\n import(\"../AccountFrame/translations/el.json\").then(\n (res) => res.default,\n ),\n [Language.It]: () =>\n import(\"../AccountFrame/translations/it.json\").then(\n (res) => res.default,\n ),\n [Language.Pt]: () =>\n import(\"../AccountFrame/translations/pt-BR.json\").then(\n (res) => res.default,\n ),\n [Language.Zh]: () =>\n import(\"../AccountFrame/translations/zh-Hans.json\").then(\n (res) => res.default,\n ),\n [Language.Fr]: () =>\n import(\"../AccountFrame/translations/fr.json\").then(\n (res) => res.default,\n ),\n [Language.Tw]: () => Promise.resolve(EN_TRANSLATION),\n },\n });\n\n // #############################################################################\n // Megaphone service\n // #############################################################################\n const megaphoneHttpService = useMemo(() => {\n if (megaphoneServiceUrl) {\n return new MegaphoneHttpService(megaphoneServiceUrl);\n }\n\n return null;\n }, [megaphoneServiceUrl]);\n\n // #############################################################################\n // Account events\n // #############################################################################\n const hasAccountEvents = useMemo((): boolean => {\n return !!(\n account &&\n (account.handleLogin || account.handleRegister || account.handleLogout)\n );\n }, [account]);\n\n // #############################################################################\n // Actions\n // #############################################################################\n const handleLogout = useCallback(() => {\n account?.handleLogout?.();\n }, [account]);\n\n const handleUnifiSiteManager = useCallback(() => {\n window.open(ExternalUrl.UNIFI_SITE_MANAGER);\n }, []);\n\n const handleOrderHistoryClick = useCallback(() => {\n account?.handleOrderHistory?.();\n }, [account]);\n\n const onManageAccount = useCallback(() => {\n account?.handleManageAccount?.();\n }, [account]);\n\n // #############################################################################\n // Announcements\n // #############################################################################\n const [announcements, setAnnouncements] = useState<Announcement[]>([]);\n // FIXME: Why are we setting loading state if we don't use it?\n // eslint-disable-next-line react/hook-use-state\n const [, setIsAnnouncementsLoading] = useState(false);\n\n useEffect(() => {\n /**\n * ? Uncomment this to test megaphone announcements on storybook\n */\n // if (account?.customer && location.host === \"localhost:6008\") {\n // setAnnouncements([\n // {\n // announcementId: \"92e31d33-4807-46ae-98ff-3d76c305eea4\",\n // isRead: false,\n // title: \"Lorem ipsum\",\n // description:\n // \"Lorem ipsum dolor sit amet consectetur adipisicing elit.\",\n // externalLink: \"#\",\n // },\n // ]);\n // return;\n // }\n\n if (testStorybookAnnouncements?.length) {\n setAnnouncements(testStorybookAnnouncements);\n }\n\n // megaphoneHttpService not set if megaphone service URL is not provided\n if (!megaphoneHttpService) {\n return;\n }\n\n setIsAnnouncementsLoading(true);\n\n // eslint-disable-next-line promise/catch-or-return\n megaphoneHttpService\n .getAnnouncements()\n .then(({ data }) => setAnnouncements(data ?? []))\n .catch((e) => console.error(e))\n .finally(() => setIsAnnouncementsLoading(false));\n }, [megaphoneHttpService, testStorybookAnnouncements]);\n\n const unreadAnnouncements = useMemo(() => {\n return announcements.filter(({ isRead }) => !isRead);\n }, [announcements]);\n\n const markAsRead = useCallback(\n async (announcement: Announcement) => {\n if (!megaphoneHttpService) {\n return;\n }\n\n const filtered = announcements.filter(\n ({ announcementId }) => announcement.announcementId !== announcementId,\n );\n setAnnouncements(filtered);\n\n await megaphoneHttpService\n .markAsRead(announcement.announcementId)\n .catch(() => {\n /* since we are removing announcement optimistically add it back in case request failed */\n setAnnouncements([...filtered, announcement]);\n });\n },\n [announcements, megaphoneHttpService],\n );\n\n const getAnnouncementButtons = useCallback(\n (\n announcement: Announcement,\n markAsRead?: (announcement: Announcement) => void,\n onExternalClick?: (externalLink: string) => void,\n ) => {\n return [\n <S.StyledMessageClearBtn\n key={`btn-ignore-${announcement.announcementId}`}\n variant=\"inline\"\n type=\"button\"\n onClick={() => markAsRead?.(announcement)}\n >\n {formatMessage(\"Clear\")}\n </S.StyledMessageClearBtn>,\n <S.StyledMessageActionBtn\n key={`btn-show-me-${announcement.announcementId}`}\n variant=\"inline\"\n onClick={() => {\n markAsRead?.(announcement);\n onExternalClick?.(announcement.externalLink);\n }}\n >\n {formatMessage(\"Show Me\")}\n </S.StyledMessageActionBtn>,\n ];\n },\n [formatMessage],\n );\n\n const mappedAnnouncements = useMemo(() => {\n return (unreadAnnouncements ?? [])?.map((announcement) => ({\n ...announcement,\n id: announcement.announcementId,\n headerImg: announcement?.media?.image ? (\n <img src={announcement.media.image} alt={announcement.title} />\n ) : undefined,\n showIndicator: true,\n actionButtons: getAnnouncementButtons(\n announcement,\n markAsRead,\n (externalLink: string) => {\n if (typeof window === \"undefined\") return;\n\n window.open(externalLink, \"_blank\");\n },\n ),\n }));\n }, [unreadAnnouncements, getAnnouncementButtons, markAsRead]);\n\n const { animate, display, animateIn, animateOut } = useAnnouncementAnimation(\n START_KEY,\n AvatarDisplayType.UserAvatar,\n );\n\n useEffect(() => {\n if (announcements?.length) {\n animateIn();\n return;\n }\n /* avoid animate out if avatar is visible by default, animateIn sets display to announcement */\n if (display !== AvatarDisplayType.Announcement) {\n return;\n }\n animateOut();\n }, [animateIn, animateOut, announcements, display]);\n\n // #############################################################################\n // Action buttons\n // #############################################################################\n const showOrderHistory = useMemo(\n () => !!(account?.customer && account?.handleOrderHistory),\n [account?.customer, account?.handleOrderHistory],\n );\n\n const showLogin = useMemo(\n () => !!(!account?.customer && account?.handleLogin),\n [account?.customer, account?.handleLogin],\n );\n\n /* Display account button if no related actions */\n const showUiAccount = useMemo(\n () =>\n !!(\n !hasAccountEvents ||\n (account?.customer && !account?.handleManageAccount)\n ),\n [account?.customer, account?.handleManageAccount, hasAccountEvents],\n );\n\n const unifiSiteManagerButtonVariant = useMemo(() => {\n if (showOrderHistory || showLogin || showUiAccount) {\n return \"tertiary\";\n }\n\n return \"primary\";\n }, [showLogin, showOrderHistory, showUiAccount]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.UiAccountMenuWrap>\n <AccountMenuBase.Root\n onOpenChange={(isOpen) => (isOpen ? onOpen?.() : onClose?.())}\n >\n <AccountMenuBase.Trigger>\n {account?.customer ? (\n <S.StyledAvatar\n image={\n account.customer.picture ||\n (motif === \"dark\" ? AvatarDarkSrc : AvatarSrc)\n }\n animate={animate}\n alt=\"Avatar\"\n notices={(unreadAnnouncements ?? [])?.length ?? 0}\n display={\n unreadAnnouncements.length\n ? display\n : AvatarDisplayType.UserAvatar\n }\n />\n ) : (\n <S.IconWrap motif={motif} data-test-id=\"avatar\">\n <S.SvgIcon\n src={icons.header.account}\n width={HEADER_ICON_SIZE}\n height={HEADER_ICON_SIZE}\n />\n </S.IconWrap>\n )}\n </AccountMenuBase.Trigger>\n <S.UiAccountMenuPopover\n alt=\"User\"\n image={account?.customer?.picture}\n name={account?.customer?.displayName}\n emailAddress={account?.customer?.email}\n messages={mappedAnnouncements}\n footerLinks={[\n <Link\n key=\"terms&conditions\"\n href={urls.termsAndConditions}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n variant=\"neutral\"\n fontSize=\"small\"\n >\n {formatMessage(\"Terms and Conditions\")}\n </Link>,\n <Link\n key=\"privacyPolicy\"\n href={FOOTER_LINKS[FooterLinkId.Privacy]}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n variant=\"neutral\"\n fontSize=\"small\"\n >\n {formatMessage(\"Privacy policy\")}\n </Link>,\n ]}\n actionButtons={({ close }) => (\n <>\n {showOrderHistory && (\n <ButtonNext\n data-test-id=\"order-history-btn\"\n variant=\"primary\"\n full\n onClick={() => {\n close?.();\n handleOrderHistoryClick();\n }}\n >\n {formatMessage(\"Order History\")}\n </ButtonNext>\n )}\n\n {showLogin && (\n <ButtonNext\n data-test-id=\"log-in-btn\"\n variant=\"primary\"\n full\n onClick={() => {\n close?.();\n account?.handleLogin?.();\n }}\n >\n {formatMessage(\"Log In\")}\n </ButtonNext>\n )}\n\n {!account?.customer && account?.handleRegister && (\n <ButtonNext\n data-test-id=\"sign-up-btn\"\n variant=\"link\"\n onClick={() => {\n close?.();\n account.handleRegister?.();\n }}\n >\n {formatMessage(\"Sign Up\")}\n </ButtonNext>\n )}\n\n {/* Display account button if no related actions */}\n {showUiAccount && (\n <ButtonLink\n variant=\"primary\"\n full\n href={ExternalUrl.ACCOUNT}\n onClick={close}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {formatMessage(\"UI Account\")}\n </ButtonLink>\n )}\n\n <ButtonNext\n variant={unifiSiteManagerButtonVariant}\n onClick={() => {\n close?.();\n handleUnifiSiteManager();\n }}\n >\n {formatMessage(\"UniFi Site Manager\")}\n </ButtonNext>\n\n {account?.customer && account.handleManageAccount && (\n <ButtonNext\n variant=\"tertiary\"\n onClick={() => {\n close?.();\n onManageAccount();\n }}\n >\n {formatMessage(\"Manage Account\")}\n </ButtonNext>\n )}\n\n {account?.customer && !!account.handleLogout && (\n <ButtonNext\n data-test-id=\"sign-out-btn\"\n variant=\"tertiary\"\n onClick={() => {\n close?.();\n handleLogout();\n }}\n >\n {formatMessage(\"Sign Out\")}\n </ButtonNext>\n )}\n </>\n )}\n placement={isMobile ? \"top left\" : \"top right\"}\n />\n </AccountMenuBase.Root>\n </S.UiAccountMenuWrap>\n );\n};\n"],"names":["AvatarDisplayType","AvatarDarkSrc","AvatarPlaceholderDarkIcon","src","AvatarSrc","AvatarPlaceholderIcon","START_KEY","AccountMenu","onClose","onOpen","account","megaphoneServiceUrl","testStorybookAnnouncements","isMobile","useMedia","BREAKPOINTS","MOBILE_AND_DOWN","urls","useFooterContent","motif","useMenu","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","Promise","resolve","then","require","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","Tw","megaphoneHttpService","useMemo","MegaphoneHttpService","hasAccountEvents","handleLogin","handleRegister","handleLogout","useCallback","handleUnifiSiteManager","window","open","ExternalUrl","UNIFI_SITE_MANAGER","handleOrderHistoryClick","handleOrderHistory","onManageAccount","handleManageAccount","announcements","setAnnouncements","useState","setIsAnnouncementsLoading","useEffect","length","getAnnouncements","data","catch","e","console","error","finally","unreadAnnouncements","filter","isRead","markAsRead","announcement","filtered","announcementId","getAnnouncementButtons","onExternalClick","jsx","S.StyledMessageClearBtn","StyledMessageClearBtn","variant","type","onClick","children","S.StyledMessageActionBtn","StyledMessageActionBtn","externalLink","mappedAnnouncements","map","id","headerImg","media","image","alt","title","showIndicator","actionButtons","animate","display","animateIn","animateOut","useAnnouncementAnimation","showOrderHistory","customer","showLogin","showUiAccount","unifiSiteManagerButtonVariant","S.UiAccountMenuWrap","jsxs","AccountMenuBase","Root","onOpenChange","isOpen","Trigger","S.StyledAvatar","StyledAvatar","picture","notices","S.IconWrap","S.SvgIcon","SvgIcon","icons.header.account","width","HEADER_ICON_SIZE","height","S.UiAccountMenuPopover","UiAccountMenuPopover","name","displayName","emailAddress","email","messages","footerLinks","Link","href","termsAndConditions","target","rel","fontSize","FOOTER_LINKS","FooterLinkId","Privacy","close","Fragment","ButtonNext","Button","full","ButtonLink","ACCOUNT","placement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,IAAKA,iBAAA,GAAA,gBAAAA,kBAAL,IAAA;EACEA,mBAAA,YAAa,CAAA,GAAA,YAAA;EACbA,mBAAA,cAAe,CAAA,GAAA,cAAA;EAFZA,OAAAA,kBAAAA;AAAA,CAAA,EAAAA,iBAAA,IAAA,CAAA,CAAA,CAAA;AAKL,MAAMC,aACJ,GAAA,OAAOC,kCAAAA,CAAAA,SAAAA,CAA8B,KAAA,QAAA,GACjCA,kCAAAA,CAAAA,SAAAA,IACAA,kCAAAA,CAAAA,SAAAA,CAA0B,CAAAC,GAAA;AAChC,MAAMC,SACJ,GAAA,OAAOC,8BAAAA,CAAAA,SAAAA,CAA0B,KAAA,QAAA,GAC7BA,8BAAAA,CAAAA,SAAAA,IACAA,8BAAAA,CAAAA,SAAAA,CAAsB,CAAAF,GAAA;AAE5B,MAAMG,SAAY,GAAA,OAAA;AAEX,MAAMC,cAAcA,CAAC;EAC1BC,OAAA;EACAC,MAAA;EACAC,OAAA;EACAC,mBAAA;EAAA;EAEAC;AACF,CAAwB,KAAA;EACtB,MAAMC,QAAW,GAAAC,QAAA,CAAAA,QAAA,CAASC,MAAY,CAAAA,WAAA,CAAAC,eAAA,EAAiB,KAAK,CAAA;EACtD,MAAA;IAAEC;GAAK,GAAIC,gBAAAA,CAAAA,gBAAiB,EAAA;EAK5B,MAAA;IAAEC;GAAM,GAAIC,OAAAA,CAAAA,OAAQ,EAAA;EAIpB,MAAA;IAAEC;EAAc,CAAA,GAAIC,6BAAe,CAAA;IACvC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E,SAASA,CAAA,KAAM;cACL4D,KAAA,IAAA;cACKlG,YAAA,EAAA;YACf,CAAA;YAECuC,wBAAc,UAAU;UAAA,CAC3B,CAAA;SAEJ,CAAA;QAEFkE,SAAA,EAAW7I,WAAW,UAAa,GAAA;MAAA,CACrC,CAAA;IAAA,CAEJ;EAAA,CAAA,CAAA;AAEJ,CAAA;"}
|
|
1
|
+
{"version":3,"file":"AccountMenu.js","sources":["../../../../src/components/Header/AccountMenu/AccountMenu.tsx"],"sourcesContent":["import { AccountMenu as AccountMenuBase } from \"@ubnt/ui-components/aria/AccountMenu\";\nimport { useAnnouncementAnimation } from \"@ubnt/ui-components/aria/Avatar\";\nimport { Link } from \"@ubnt/ui-components/aria/experimental\";\nimport { ButtonLink, Button as ButtonNext } from \"@ubnt/ui-components/Button\";\nimport { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { useMedia } from \"react-use\";\n\nimport AvatarPlaceholderDarkIcon from \"../../../assets/icons/menu/icon-avatar-placeholder-dark.png\";\nimport AvatarPlaceholderIcon from \"../../../assets/icons/menu/icon-avatar-placeholder.png\";\nimport * as icons from \"../../../constants/icons\";\nimport { BREAKPOINTS } from \"../../../constants/layout\";\nimport { ExternalUrl } from \"../../../constants/url\";\nimport { useMenu } from \"../../../contexts/MenuContext\";\nimport { Language } from \"../../../contexts/MenuContext/mapping\";\nimport { useTranslation } from \"../../../hooks\";\nimport {\n FOOTER_LINKS,\n FooterLinkId,\n useFooterContent,\n} from \"../../Footer/hooks/useFooterContent\";\nimport EN_TRANSLATION from \"../AccountFrame/translations/en.json\";\nimport { HEADER_ICON_SIZE, SkeletonCircleLoader } from \"../Header.styles\";\nimport * as S from \"./AccountMenu.styles\";\nimport type { AccountMenuProps } from \"./AccountMenu.types\";\nimport type { Announcement } from \"./megaphone.http.service\";\nimport MegaphoneHttpService from \"./megaphone.http.service\";\n\nenum AvatarDisplayType {\n UserAvatar = \"userAvatar\",\n Announcement = \"announcement\",\n}\n\nconst AvatarDarkSrc =\n typeof AvatarPlaceholderDarkIcon === \"string\"\n ? AvatarPlaceholderDarkIcon\n : AvatarPlaceholderDarkIcon.src;\nconst AvatarSrc =\n typeof AvatarPlaceholderIcon === \"string\"\n ? AvatarPlaceholderIcon\n : AvatarPlaceholderIcon.src;\n\nconst START_KEY = \"start\";\n\nexport const AccountMenu = ({\n onClose,\n onOpen,\n account,\n megaphoneServiceUrl,\n // eslint-disable-next-line sonarjs/deprecation\n testStorybookAnnouncements,\n}: AccountMenuProps) => {\n const isMobile = useMedia(BREAKPOINTS.MOBILE_AND_DOWN, false);\n const { urls } = useFooterContent();\n\n // #############################################################################\n // Menu\n // #############################################################################\n const { motif } = useMenu();\n\n // NOTE: Reusing \"Account Frame\" translations\n // TODO: Migrate later fully to this component\n const { formatMessage } = useTranslation({\n defaultTranslation: EN_TRANSLATION,\n additionalTranslations: {\n [Language.Ja]: () =>\n import(\"../AccountFrame/translations/ja.json\").then(\n (res) => res.default,\n ),\n [Language.Ar]: () =>\n import(\"../AccountFrame/translations/ar.json\").then(\n (res) => res.default,\n ),\n [Language.De]: () =>\n import(\"../AccountFrame/translations/de.json\").then(\n (res) => res.default,\n ),\n [Language.Es]: () =>\n import(\"../AccountFrame/translations/es.json\").then(\n (res) => res.default,\n ),\n [Language.El]: () =>\n import(\"../AccountFrame/translations/el.json\").then(\n (res) => res.default,\n ),\n [Language.It]: () =>\n import(\"../AccountFrame/translations/it.json\").then(\n (res) => res.default,\n ),\n [Language.Pt]: () =>\n import(\"../AccountFrame/translations/pt-BR.json\").then(\n (res) => res.default,\n ),\n [Language.Zh]: () =>\n import(\"../AccountFrame/translations/zh-Hans.json\").then(\n (res) => res.default,\n ),\n [Language.Fr]: () =>\n import(\"../AccountFrame/translations/fr.json\").then(\n (res) => res.default,\n ),\n [Language.Tw]: () => Promise.resolve(EN_TRANSLATION),\n },\n });\n\n // #############################################################################\n // Megaphone service\n // #############################################################################\n const megaphoneHttpService = useMemo(() => {\n if (megaphoneServiceUrl) {\n return new MegaphoneHttpService(megaphoneServiceUrl);\n }\n\n return null;\n }, [megaphoneServiceUrl]);\n\n // #############################################################################\n // Account events\n // #############################################################################\n const hasAccountEvents = useMemo((): boolean => {\n return !!(\n account &&\n (account.handleLogin || account.handleRegister || account.handleLogout)\n );\n }, [account]);\n\n // #############################################################################\n // Actions\n // #############################################################################\n const handleLogout = useCallback(() => {\n account?.handleLogout?.();\n }, [account]);\n\n const handleUnifiSiteManager = useCallback(() => {\n window.open(ExternalUrl.UNIFI_SITE_MANAGER);\n }, []);\n\n const handleOrderHistoryClick = useCallback(() => {\n account?.handleOrderHistory?.();\n }, [account]);\n\n const onManageAccount = useCallback(() => {\n account?.handleManageAccount?.();\n }, [account]);\n\n // #############################################################################\n // Announcements\n // #############################################################################\n const [announcements, setAnnouncements] = useState<Announcement[]>([]);\n // FIXME: Why are we setting loading state if we don't use it?\n // eslint-disable-next-line react/hook-use-state\n const [, setIsAnnouncementsLoading] = useState(false);\n\n useEffect(() => {\n /**\n * ? Uncomment this to test megaphone announcements on storybook\n */\n // if (account?.customer && location.host === \"localhost:6008\") {\n // setAnnouncements([\n // {\n // announcementId: \"92e31d33-4807-46ae-98ff-3d76c305eea4\",\n // isRead: false,\n // title: \"Lorem ipsum\",\n // description:\n // \"Lorem ipsum dolor sit amet consectetur adipisicing elit.\",\n // externalLink: \"#\",\n // },\n // ]);\n // return;\n // }\n\n if (testStorybookAnnouncements?.length) {\n setAnnouncements(testStorybookAnnouncements);\n }\n\n // megaphoneHttpService not set if megaphone service URL is not provided\n if (!megaphoneHttpService) {\n return;\n }\n\n setIsAnnouncementsLoading(true);\n\n // eslint-disable-next-line promise/catch-or-return\n megaphoneHttpService\n .getAnnouncements()\n .then(({ data }) => setAnnouncements(data ?? []))\n .catch((e) => console.error(e))\n .finally(() => setIsAnnouncementsLoading(false));\n }, [megaphoneHttpService, testStorybookAnnouncements]);\n\n const unreadAnnouncements = useMemo(() => {\n return announcements.filter(({ isRead }) => !isRead);\n }, [announcements]);\n\n const markAsRead = useCallback(\n async (announcement: Announcement) => {\n if (!megaphoneHttpService) {\n return;\n }\n\n const filtered = announcements.filter(\n ({ announcementId }) => announcement.announcementId !== announcementId,\n );\n setAnnouncements(filtered);\n\n await megaphoneHttpService\n .markAsRead(announcement.announcementId)\n .catch(() => {\n /* since we are removing announcement optimistically add it back in case request failed */\n setAnnouncements([...filtered, announcement]);\n });\n },\n [announcements, megaphoneHttpService],\n );\n\n const getAnnouncementButtons = useCallback(\n (\n announcement: Announcement,\n markAsRead?: (announcement: Announcement) => void,\n onExternalClick?: (externalLink: string) => void,\n ) => {\n return [\n <S.StyledMessageClearBtn\n key={`btn-ignore-${announcement.announcementId}`}\n variant=\"inline\"\n type=\"button\"\n onClick={() => markAsRead?.(announcement)}\n >\n {formatMessage(\"Clear\")}\n </S.StyledMessageClearBtn>,\n <S.StyledMessageActionBtn\n key={`btn-show-me-${announcement.announcementId}`}\n variant=\"inline\"\n onClick={() => {\n markAsRead?.(announcement);\n onExternalClick?.(announcement.externalLink);\n }}\n >\n {formatMessage(\"Show Me\")}\n </S.StyledMessageActionBtn>,\n ];\n },\n [formatMessage],\n );\n\n const mappedAnnouncements = useMemo(() => {\n return (unreadAnnouncements ?? [])?.map((announcement) => ({\n ...announcement,\n id: announcement.announcementId,\n headerImg: announcement?.media?.image ? (\n <img src={announcement.media.image} alt={announcement.title} />\n ) : undefined,\n showIndicator: true,\n actionButtons: getAnnouncementButtons(\n announcement,\n markAsRead,\n (externalLink: string) => {\n if (typeof window === \"undefined\") return;\n\n window.open(externalLink, \"_blank\");\n },\n ),\n }));\n }, [unreadAnnouncements, getAnnouncementButtons, markAsRead]);\n\n const { animate, display, animateIn, animateOut } = useAnnouncementAnimation(\n START_KEY,\n AvatarDisplayType.UserAvatar,\n );\n\n useEffect(() => {\n if (announcements?.length) {\n animateIn();\n return;\n }\n /* avoid animate out if avatar is visible by default, animateIn sets display to announcement */\n if (display !== AvatarDisplayType.Announcement) {\n return;\n }\n animateOut();\n }, [animateIn, animateOut, announcements, display]);\n\n // #############################################################################\n // Action buttons\n // #############################################################################\n const showOrderHistory = useMemo(\n () => !!(account?.customer && account?.handleOrderHistory),\n [account?.customer, account?.handleOrderHistory],\n );\n\n const showLogin = useMemo(\n () => !!(!account?.customer && account?.handleLogin),\n [account?.customer, account?.handleLogin],\n );\n\n /* Display account button if no related actions */\n const showUiAccount = useMemo(\n () =>\n !!(\n !hasAccountEvents ||\n (account?.customer && !account?.handleManageAccount)\n ),\n [account?.customer, account?.handleManageAccount, hasAccountEvents],\n );\n\n const unifiSiteManagerButtonVariant = useMemo(() => {\n if (showOrderHistory || showLogin || showUiAccount) {\n return \"tertiary\";\n }\n\n return \"primary\";\n }, [showLogin, showOrderHistory, showUiAccount]);\n\n // #############################################################################\n // Render\n // #############################################################################\n if (!account || account.loading) {\n return (\n <S.UiAccountMenuWrap>\n <S.IconWrap motif={motif}>\n <SkeletonCircleLoader diameter={HEADER_ICON_SIZE} />\n </S.IconWrap>\n </S.UiAccountMenuWrap>\n );\n }\n\n return (\n <S.UiAccountMenuWrap>\n <AccountMenuBase.Root\n onOpenChange={(isOpen) => (isOpen ? onOpen?.() : onClose?.())}\n >\n <AccountMenuBase.Trigger>\n {account.customer ? (\n <S.StyledAvatar\n image={\n account.customer.picture ||\n (motif === \"dark\" ? AvatarDarkSrc : AvatarSrc)\n }\n animate={animate}\n alt=\"Avatar\"\n notices={(unreadAnnouncements ?? [])?.length ?? 0}\n display={\n unreadAnnouncements.length\n ? display\n : AvatarDisplayType.UserAvatar\n }\n />\n ) : (\n <S.IconWrap motif={motif} data-test-id=\"avatar\">\n <S.SvgIcon\n src={icons.header.account}\n width={HEADER_ICON_SIZE}\n height={HEADER_ICON_SIZE}\n />\n </S.IconWrap>\n )}\n </AccountMenuBase.Trigger>\n <S.UiAccountMenuPopover\n alt=\"User\"\n image={account?.customer?.picture}\n name={account?.customer?.displayName}\n emailAddress={account?.customer?.email}\n messages={mappedAnnouncements}\n footerLinks={[\n <Link\n key=\"terms&conditions\"\n href={urls.termsAndConditions}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n variant=\"neutral\"\n fontSize=\"small\"\n >\n {formatMessage(\"Terms and Conditions\")}\n </Link>,\n <Link\n key=\"privacyPolicy\"\n href={FOOTER_LINKS[FooterLinkId.Privacy]}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n variant=\"neutral\"\n fontSize=\"small\"\n >\n {formatMessage(\"Privacy policy\")}\n </Link>,\n ]}\n actionButtons={({ close }) => (\n <>\n {showOrderHistory && (\n <ButtonNext\n data-test-id=\"order-history-btn\"\n variant=\"primary\"\n full\n onClick={() => {\n close?.();\n handleOrderHistoryClick();\n }}\n >\n {formatMessage(\"Order History\")}\n </ButtonNext>\n )}\n\n {showLogin && (\n <ButtonNext\n data-test-id=\"log-in-btn\"\n variant=\"primary\"\n full\n onClick={() => {\n close?.();\n account?.handleLogin?.();\n }}\n >\n {formatMessage(\"Log In\")}\n </ButtonNext>\n )}\n\n {!account?.customer && account?.handleRegister && (\n <ButtonNext\n data-test-id=\"sign-up-btn\"\n variant=\"link\"\n onClick={() => {\n close?.();\n account.handleRegister?.();\n }}\n >\n {formatMessage(\"Sign Up\")}\n </ButtonNext>\n )}\n\n {/* Display account button if no related actions */}\n {showUiAccount && (\n <ButtonLink\n variant=\"primary\"\n full\n href={ExternalUrl.ACCOUNT}\n onClick={close}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {formatMessage(\"UI Account\")}\n </ButtonLink>\n )}\n\n <ButtonNext\n variant={unifiSiteManagerButtonVariant}\n onClick={() => {\n close?.();\n handleUnifiSiteManager();\n }}\n >\n {formatMessage(\"UniFi Site Manager\")}\n </ButtonNext>\n\n {account?.customer && account.handleManageAccount && (\n <ButtonNext\n variant=\"tertiary\"\n onClick={() => {\n close?.();\n onManageAccount();\n }}\n >\n {formatMessage(\"Manage Account\")}\n </ButtonNext>\n )}\n\n {account?.customer && !!account.handleLogout && (\n <ButtonNext\n data-test-id=\"sign-out-btn\"\n variant=\"tertiary\"\n onClick={() => {\n close?.();\n handleLogout();\n }}\n >\n {formatMessage(\"Sign Out\")}\n </ButtonNext>\n )}\n </>\n )}\n placement={isMobile ? \"top left\" : \"top right\"}\n />\n </AccountMenuBase.Root>\n </S.UiAccountMenuWrap>\n );\n};\n"],"names":["AvatarDisplayType","AvatarDarkSrc","AvatarPlaceholderDarkIcon","src","AvatarSrc","AvatarPlaceholderIcon","START_KEY","AccountMenu","onClose","onOpen","account","megaphoneServiceUrl","testStorybookAnnouncements","isMobile","useMedia","BREAKPOINTS","MOBILE_AND_DOWN","urls","useFooterContent","motif","useMenu","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","Promise","resolve","then","require","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","Tw","megaphoneHttpService","useMemo","MegaphoneHttpService","hasAccountEvents","handleLogin","handleRegister","handleLogout","useCallback","handleUnifiSiteManager","window","open","ExternalUrl","UNIFI_SITE_MANAGER","handleOrderHistoryClick","handleOrderHistory","onManageAccount","handleManageAccount","announcements","setAnnouncements","useState","setIsAnnouncementsLoading","useEffect","length","getAnnouncements","data","catch","e","console","error","finally","unreadAnnouncements","filter","isRead","markAsRead","announcement","filtered","announcementId","getAnnouncementButtons","onExternalClick","jsx","S.StyledMessageClearBtn","StyledMessageClearBtn","variant","type","onClick","children","S.StyledMessageActionBtn","StyledMessageActionBtn","externalLink","mappedAnnouncements","map","id","headerImg","media","image","alt","title","showIndicator","actionButtons","animate","display","animateIn","animateOut","useAnnouncementAnimation","showOrderHistory","customer","showLogin","showUiAccount","unifiSiteManagerButtonVariant","loading","S.UiAccountMenuWrap","S.IconWrap","IconWrap","SkeletonCircleLoader","diameter","HEADER_ICON_SIZE","jsxs","AccountMenuBase","Root","onOpenChange","isOpen","Trigger","S.StyledAvatar","StyledAvatar","picture","notices","S.SvgIcon","SvgIcon","icons.header.account","width","height","S.UiAccountMenuPopover","UiAccountMenuPopover","name","displayName","emailAddress","email","messages","footerLinks","Link","href","termsAndConditions","target","rel","fontSize","FOOTER_LINKS","FooterLinkId","Privacy","close","Fragment","ButtonNext","Button","full","ButtonLink","ACCOUNT","placement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,IAAKA,iBAAA,GAAA,gBAAAA,kBAAL,IAAA;EACEA,mBAAA,YAAa,CAAA,GAAA,YAAA;EACbA,mBAAA,cAAe,CAAA,GAAA,cAAA;EAFZA,OAAAA,kBAAAA;AAAA,CAAA,EAAAA,iBAAA,IAAA,CAAA,CAAA,CAAA;AAKL,MAAMC,aACJ,GAAA,OAAOC,kCAAAA,CAAAA,SAAAA,CAA8B,KAAA,QAAA,GACjCA,kCAAAA,CAAAA,SAAAA,IACAA,kCAAAA,CAAAA,SAAAA,CAA0B,CAAAC,GAAA;AAChC,MAAMC,SACJ,GAAA,OAAOC,8BAAAA,CAAAA,SAAAA,CAA0B,KAAA,QAAA,GAC7BA,8BAAAA,CAAAA,SAAAA,IACAA,8BAAAA,CAAAA,SAAAA,CAAsB,CAAAF,GAAA;AAE5B,MAAMG,SAAY,GAAA,OAAA;AAEX,MAAMC,cAAcA,CAAC;EAC1BC,OAAA;EACAC,MAAA;EACAC,OAAA;EACAC,mBAAA;EAAA;EAEAC;AACF,CAAwB,KAAA;EACtB,MAAMC,QAAW,GAAAC,QAAA,CAAAA,QAAA,CAASC,MAAY,CAAAA,WAAA,CAAAC,eAAA,EAAiB,KAAK,CAAA;EACtD,MAAA;IAAEC;GAAK,GAAIC,gBAAAA,CAAAA,gBAAiB,EAAA;EAK5B,MAAA;IAAEC;GAAM,GAAIC,OAAAA,CAAAA,OAAQ,EAAA;EAIpB,MAAA;IAAEC;EAAc,CAAA,GAAIC,6BAAe,CAAA;IACvCC,kBAAoB,EAAAC,EAAA,CAAA,SAAA,CAAA;IACpBC,sBAAwB,EAAA;MACtB,CAACC,SAAS,CAAAA,QAAA,CAAAC,EAAE,GAAG,MACbC,OAAO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