@ubnt/store.core 9.50.0 → 9.51.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 +85 -1
- package/lib/_virtual/_virtual_multi-entry.js +1 -0
- package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
- package/lib/_virtual/_virtual_multi-entry.mjs +1 -1
- package/lib/assets/attention.svg +5 -5
- package/lib/assets/attention2.svg +5 -5
- package/lib/assets/cart-secondary.svg +5 -0
- package/lib/assets/envr.png +0 -0
- package/lib/assets/icon-location-pin.svg +5 -0
- package/lib/assets/icons/cart-secondary.svg.js +27 -0
- package/lib/assets/icons/cart-secondary.svg.js.map +1 -0
- package/lib/assets/icons/cart-secondary.svg.mjs +3 -0
- package/lib/assets/icons/cart-secondary.svg.mjs.map +1 -0
- package/lib/assets/icons/menu/icon-location-pin.svg.js +27 -0
- package/lib/assets/icons/menu/icon-location-pin.svg.js.map +1 -0
- package/lib/assets/icons/menu/icon-location-pin.svg.mjs +3 -0
- package/lib/assets/icons/menu/icon-location-pin.svg.mjs.map +1 -0
- package/lib/assets/icons/wizard/plus.svg.js +1 -1
- package/lib/assets/icons/wizard/plus.svg.mjs +2 -2
- package/lib/assets/logoUnifi.svg +10 -2
- package/lib/assets/plus.svg +4 -22
- package/lib/assets/plus2.svg +22 -4
- package/lib/assets/ucg-max.png +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/BackInStock/BackInStock.types.d.ts +1 -0
- package/lib/components/Button/Button.js +7 -0
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/Button/Button.mjs +8 -1
- package/lib/components/Button/Button.mjs.map +1 -1
- package/lib/components/Button/CartButton.d.ts +3 -1
- package/lib/components/Button/CartButton.js +9 -4
- package/lib/components/Button/CartButton.js.map +1 -1
- package/lib/components/Button/CartButton.mjs +8 -4
- package/lib/components/Button/CartButton.mjs.map +1 -1
- package/lib/components/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/ButtonGroupBasic.d.ts +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.js +16 -4
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.js.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.mjs +17 -5
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.mjs.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.d.ts +5 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.js +82 -17
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.js.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.mjs +82 -17
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.mjs.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.types.d.ts +4 -0
- package/lib/components/ButtonGroupBasic/index.stories.d.ts +6 -0
- package/lib/components/CardSection/CardSection.styles.d.ts +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.d.ts +4 -2
- package/lib/components/CategoryTabs/CategoryTabs.styles.js +8 -5
- package/lib/components/CategoryTabs/CategoryTabs.styles.js.map +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs +7 -6
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs.map +1 -1
- package/lib/components/Compare/Compare.styles.d.ts +5 -5
- package/lib/components/Container/Container.d.ts +1 -1
- package/lib/components/Container/Container.js +4 -3
- package/lib/components/Container/Container.js.map +1 -1
- package/lib/components/Container/Container.mjs +5 -4
- package/lib/components/Container/Container.mjs.map +1 -1
- package/lib/components/Container/index.stories.d.ts +5 -5
- package/lib/components/Explore/ExploreData.js +12 -12
- package/lib/components/Explore/ExploreData.js.map +1 -1
- package/lib/components/Explore/ExploreData.mjs +12 -12
- package/lib/components/Explore/ExploreData.mjs.map +1 -1
- package/lib/components/FeaturesSection_deprecated/AllFeaturesButton/AllFeaturesButton.js +1 -1
- package/lib/components/FeaturesSection_deprecated/AllFeaturesButton/AllFeaturesButton.mjs +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/plus.svg.js +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/plus.svg.mjs +2 -2
- package/lib/components/Header/AccountMenu/AccountMenu.js +11 -1
- package/lib/components/Header/AccountMenu/AccountMenu.js.map +1 -1
- package/lib/components/Header/AccountMenu/AccountMenu.mjs +13 -3
- package/lib/components/Header/AccountMenu/AccountMenu.mjs.map +1 -1
- package/lib/components/Header/CartModalV2/Item/Item.styles.d.ts +1 -1
- package/lib/components/Header/Header.js +9 -9
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/Header.mjs +9 -9
- 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 +44 -44
- package/lib/components/Header/IsolatedHeader.js.map +1 -1
- package/lib/components/Header/IsolatedHeader.mjs +47 -46
- package/lib/components/Header/IsolatedHeader.mjs.map +1 -1
- package/lib/components/Header/LogoIcon/LogoIcon.d.ts +7 -0
- package/lib/components/Header/LogoIcon/LogoIcon.js +46 -0
- package/lib/components/Header/LogoIcon/LogoIcon.js.map +1 -0
- package/lib/components/Header/LogoIcon/LogoIcon.mjs +36 -0
- package/lib/components/Header/LogoIcon/LogoIcon.mjs.map +1 -0
- package/lib/components/Header/LogoIcon/index.d.ts +1 -0
- package/lib/components/Header/LogoIcon/index.js +6 -0
- package/lib/components/Header/LogoIcon/index.js.map +1 -0
- package/lib/components/Header/LogoIcon/index.mjs +3 -0
- package/lib/components/Header/LogoIcon/index.mjs.map +1 -0
- package/lib/components/Header/MenuItem/MenuItem.styles.d.ts +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.js +3 -3
- package/lib/components/Header/MenuItem/MenuItem.styles.js.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.mjs +3 -3
- package/lib/components/Header/MenuItem/MenuItem.styles.mjs.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.types.d.ts +1 -0
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.d.ts +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.d.ts +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.d.ts +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js +110 -103
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs +111 -104
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.d.ts +9 -0
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js +15 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs +13 -2
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.types.d.ts +12 -6
- package/lib/components/Header/ProHeader/ProHeader.d.ts +9 -5
- package/lib/components/Header/ProHeader/ProHeader.js +249 -168
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +250 -170
- package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +30 -25
- package/lib/components/Header/ProHeader/ProHeader.styles.js +119 -66
- package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs +112 -65
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
- package/lib/components/Header/translations/ar.json.js +4 -1
- package/lib/components/Header/translations/ar.json.js.map +1 -1
- package/lib/components/Header/translations/ar.json.mjs +4 -2
- package/lib/components/Header/translations/ar.json.mjs.map +1 -1
- package/lib/components/Header/translations/de.json.js +4 -1
- package/lib/components/Header/translations/de.json.js.map +1 -1
- package/lib/components/Header/translations/de.json.mjs +4 -2
- package/lib/components/Header/translations/de.json.mjs.map +1 -1
- package/lib/components/Header/translations/el.json.js +4 -1
- package/lib/components/Header/translations/el.json.js.map +1 -1
- package/lib/components/Header/translations/el.json.mjs +4 -2
- package/lib/components/Header/translations/el.json.mjs.map +1 -1
- package/lib/components/Header/translations/en.json.js +7 -1
- package/lib/components/Header/translations/en.json.js.map +1 -1
- package/lib/components/Header/translations/en.json.mjs +6 -2
- package/lib/components/Header/translations/en.json.mjs.map +1 -1
- package/lib/components/Header/translations/es.json.js +4 -1
- package/lib/components/Header/translations/es.json.js.map +1 -1
- package/lib/components/Header/translations/es.json.mjs +4 -2
- package/lib/components/Header/translations/es.json.mjs.map +1 -1
- package/lib/components/Header/translations/fr.json.js +4 -1
- package/lib/components/Header/translations/fr.json.js.map +1 -1
- package/lib/components/Header/translations/fr.json.mjs +4 -2
- package/lib/components/Header/translations/fr.json.mjs.map +1 -1
- package/lib/components/Header/translations/it.json.js +4 -1
- package/lib/components/Header/translations/it.json.js.map +1 -1
- package/lib/components/Header/translations/it.json.mjs +4 -2
- package/lib/components/Header/translations/it.json.mjs.map +1 -1
- package/lib/components/Header/translations/ja.json.js +4 -1
- package/lib/components/Header/translations/ja.json.js.map +1 -1
- package/lib/components/Header/translations/ja.json.mjs +4 -2
- package/lib/components/Header/translations/ja.json.mjs.map +1 -1
- package/lib/components/Header/translations/pt-BR.json.js +4 -1
- package/lib/components/Header/translations/pt-BR.json.js.map +1 -1
- package/lib/components/Header/translations/pt-BR.json.mjs +4 -2
- package/lib/components/Header/translations/pt-BR.json.mjs.map +1 -1
- package/lib/components/Header/translations/zh-Hans.json.js +4 -1
- package/lib/components/Header/translations/zh-Hans.json.js.map +1 -1
- package/lib/components/Header/translations/zh-Hans.json.mjs +4 -2
- package/lib/components/Header/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/components/Header/translations/zh-Hant-TW.json.js +4 -1
- package/lib/components/Header/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/components/Header/translations/zh-Hant-TW.json.mjs +4 -2
- package/lib/components/Header/translations/zh-Hant-TW.json.mjs.map +1 -1
- package/lib/components/Hero/Hero.styles.d.ts +2 -2
- package/lib/components/HeroFadeGallery/HeroFadeGallery.styles.d.ts +1 -1
- package/lib/components/HowToUseSection/HowToUseSection.styles.d.ts +2 -2
- package/lib/components/LandingPagePro/LandingPagePro.styles.d.ts +1 -1
- package/lib/components/LayoutRenderer/LayoutRenderer.styles.d.ts +1 -1
- package/lib/components/LayoutRendererV1/LayoutRenderer.styles.d.ts +3 -3
- package/lib/components/LayoutRendererV2/LayoutRenderer.styles.d.ts +3 -3
- package/lib/components/LoaderDots/LoaderDots.d.ts +1 -1
- package/lib/components/LoaderDots/LoaderDots.js +3 -1
- package/lib/components/LoaderDots/LoaderDots.js.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.mjs +3 -1
- package/lib/components/LoaderDots/LoaderDots.mjs.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.styles.d.ts +2 -1
- package/lib/components/LoaderDots/LoaderDots.styles.js +11 -1
- package/lib/components/LoaderDots/LoaderDots.styles.js.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.styles.mjs +11 -1
- package/lib/components/LoaderDots/LoaderDots.styles.mjs.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.types.d.ts +2 -0
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.styles.d.ts +1 -1
- package/lib/components/MicrositeSectionWrap/MicrositeSectionWrap.styles.d.ts +1 -1
- 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/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 +6 -6
- package/lib/components/ModelCompareV3/data/CloudGateways.mjs +4 -4
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.js +4 -2
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.mjs +4 -2
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.js +2 -2
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.mjs +2 -2
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/express.js +3 -3
- package/lib/components/ModelCompareV3/data/products/express.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/express.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/express.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.js +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.mjs +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayLite.js +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayLite.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayLite.mjs +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayLite.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayMax.js +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayMax.mjs +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.js +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.mjs +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.js +3 -1
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.mjs +3 -1
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js +3 -3
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.js +3 -3
- package/lib/components/ModelCompareV3/data/products/udmPro.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.js +4 -4
- package/lib/components/ModelCompareV3/data/products/udmProMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +4 -4
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +4 -4
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +4 -4
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udr.js +5 -41
- package/lib/components/ModelCompareV3/data/products/udr.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udr.mjs +5 -21
- package/lib/components/ModelCompareV3/data/products/udr.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udw.js +3 -3
- package/lib/components/ModelCompareV3/data/products/udw.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udw.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/udw.mjs.map +1 -1
- package/lib/components/ProductSectionNavigation/ProductSectionNavigation.styles.d.ts +1 -1
- package/lib/components/ProductSectionNavigationV2/ProductSectionNavigation.styles.d.ts +1 -1
- package/lib/components/ProductTechSpecs/ProductTechSpecs.styles.d.ts +2 -2
- package/lib/components/ProductWizard/ProductWizard.js +1 -1
- package/lib/components/ProductWizard/ProductWizard.mjs +1 -1
- package/lib/components/QuantityInput/QuantityInput.js +1 -1
- package/lib/components/QuantityInput/QuantityInput.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js +419 -64
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs +416 -63
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.d.ts +3 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.js +2 -0
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.mjs +2 -0
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.js +120 -34
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.mjs +120 -34
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.d.ts +16 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.js +54 -12
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.mjs +50 -11
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/assets/ArrowLeftPrimary.svg.js +5 -5
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/assets/ArrowRightPrimary.svg.js +5 -5
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.mjs.map +1 -1
- package/lib/{assets/icons/menu/icon-globe.svg.js → components/ResourceCalculatorV1/assets/consoles/envr.png.js} +6 -6
- package/lib/components/ResourceCalculatorV1/assets/consoles/envr.png.js.map +1 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/envr.png.mjs +3 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/envr.png.mjs.map +1 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.js +27 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.js.map +1 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.mjs +3 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.mjs.map +1 -0
- package/lib/components/ResourceCalculatorV1/translations/en.json.js +10 -5
- package/lib/components/ResourceCalculatorV1/translations/en.json.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/translations/en.json.mjs +10 -5
- package/lib/components/ResourceCalculatorV1/translations/en.json.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/translations/useResourceCalculatorTranslation.d.ts +2 -2
- package/lib/components/ScrollWrapper/ScrollWrapper.d.ts +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.js +16 -8
- package/lib/components/ScrollWrapper/ScrollWrapper.js.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.mjs +16 -8
- package/lib/components/ScrollWrapper/ScrollWrapper.mjs.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.types.d.ts +2 -0
- package/lib/components/Search/Input/Input.d.ts +1 -1
- package/lib/components/Search/Input/Input.js +4 -4
- package/lib/components/Search/Input/Input.js.map +1 -1
- package/lib/components/Search/Input/Input.mjs +4 -4
- package/lib/components/Search/Input/Input.mjs.map +1 -1
- package/lib/components/Search/Input/Input.styles.js +0 -1
- package/lib/components/Search/Input/Input.styles.js.map +1 -1
- package/lib/components/Search/Input/Input.styles.mjs +0 -1
- package/lib/components/Search/Input/Input.styles.mjs.map +1 -1
- package/lib/components/Search/Input/Input.types.d.ts +3 -2
- package/lib/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 +16 -0
- package/lib/constants/proStoreCategories/mapping/filters.js +16 -0
- package/lib/constants/proStoreCategories/mapping/filters.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/filters.mjs +16 -0
- package/lib/constants/proStoreCategories/mapping/filters.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.d.ts +4 -2
- package/lib/constants/proStoreCategories/mapping/index.js +50 -51
- package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.mjs +49 -49
- package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/mapping.d.ts +5 -0
- package/lib/constants/proStoreCategories/mapping/redirects.js +18 -3
- package/lib/constants/proStoreCategories/mapping/redirects.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/redirects.mjs +18 -3
- package/lib/constants/proStoreCategories/mapping/redirects.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.d.ts +9 -9
- package/lib/constants/proStoreCategories/mapping/unifi.js +9 -9
- package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.mjs +9 -9
- package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.js +7 -3
- package/lib/constants/proStoreCategories/translations/ar.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.mjs +7 -4
- package/lib/constants/proStoreCategories/translations/ar.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.js +7 -3
- package/lib/constants/proStoreCategories/translations/de.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.mjs +7 -4
- package/lib/constants/proStoreCategories/translations/de.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.js +7 -3
- package/lib/constants/proStoreCategories/translations/el.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.mjs +7 -4
- package/lib/constants/proStoreCategories/translations/el.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.js +7 -3
- package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs +7 -4
- package/lib/constants/proStoreCategories/translations/en.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.js +7 -3
- package/lib/constants/proStoreCategories/translations/es.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.mjs +7 -4
- package/lib/constants/proStoreCategories/translations/es.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.js +7 -3
- package/lib/constants/proStoreCategories/translations/fr.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.mjs +7 -4
- package/lib/constants/proStoreCategories/translations/fr.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.js +7 -3
- package/lib/constants/proStoreCategories/translations/it.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.mjs +7 -4
- package/lib/constants/proStoreCategories/translations/it.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.js +7 -3
- package/lib/constants/proStoreCategories/translations/ja.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.mjs +7 -4
- package/lib/constants/proStoreCategories/translations/ja.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js +7 -3
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs +7 -4
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +7 -3
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +7 -4
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +7 -3
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +7 -4
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs.map +1 -1
- package/lib/constants/proStoreFilters/mapping.d.ts +45 -3
- package/lib/constants/proStoreFilters/mapping.js +119 -9
- package/lib/constants/proStoreFilters/mapping.js.map +1 -1
- package/lib/constants/proStoreFilters/mapping.mjs +119 -9
- package/lib/constants/proStoreFilters/mapping.mjs.map +1 -1
- package/lib/constants/theme.js +4 -0
- package/lib/constants/theme.js.map +1 -1
- package/lib/constants/theme.mjs +4 -0
- package/lib/constants/theme.mjs.map +1 -1
- package/lib/contexts/MenuContext/context.js +1 -1
- package/lib/contexts/MenuContext/context.js.map +1 -1
- package/lib/contexts/MenuContext/context.mjs +1 -1
- package/lib/contexts/MenuContext/context.mjs.map +1 -1
- package/lib/contexts/MenuContext/mapping.js.map +1 -1
- package/lib/contexts/MenuContext/mapping.mjs.map +1 -1
- package/lib/helpers/index.js +1 -0
- package/lib/helpers/index.js.map +1 -1
- package/lib/helpers/index.mjs +1 -1
- 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/utils/money/format.d.ts +8 -0
- package/lib/utils/money/format.js +3 -0
- package/lib/utils/money/format.js.map +1 -1
- package/lib/utils/money/format.mjs +3 -0
- package/lib/utils/money/format.mjs.map +1 -1
- package/package.json +7 -6
- package/lib/assets/icons/menu/icon-globe.svg.js.map +0 -1
- package/lib/assets/icons/menu/icon-globe.svg.mjs +0 -3
- package/lib/assets/icons/menu/icon-globe.svg.mjs.map +0 -1
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var
|
|
6
|
+
var arrowRight = require("../../../../../../assets/ArrowRightPrimary.svg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
var
|
|
12
|
+
var arrowRight__default = /*#__PURE__*/_interopDefault(arrowRight);
|
|
13
13
|
Object.defineProperty(exports, "default", {
|
|
14
14
|
enumerable: true,
|
|
15
15
|
get: function () {
|
|
16
|
-
return
|
|
16
|
+
return arrowRight__default["default"];
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
Object.keys(
|
|
19
|
+
Object.keys(arrowRight).forEach(function (k) {
|
|
20
20
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
21
21
|
enumerable: true,
|
|
22
22
|
get: function () {
|
|
23
|
-
return
|
|
23
|
+
return arrowRight[k];
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
});
|
|
@@ -12,7 +12,7 @@ require('./assets/attention.svg.js');
|
|
|
12
12
|
var InputCard_styles = require('./InputCard.styles.js');
|
|
13
13
|
require('./InputSections/index.js');
|
|
14
14
|
var CustomImage = require('../../../../CustomImage/CustomImage.js');
|
|
15
|
-
var attentionIcon = require("../../../../../assets/
|
|
15
|
+
var attentionIcon = require("../../../../../assets/attention2.svg");
|
|
16
16
|
var OptionSelectSection = require('./InputSections/OptionSelectSection.js');
|
|
17
17
|
var SliderSection = require('./InputSections/SliderSection.js');
|
|
18
18
|
var CounterSection = require('./InputSections/CounterSection.js');
|
|
@@ -10,7 +10,7 @@ import './assets/attention.svg.mjs';
|
|
|
10
10
|
import { Card, Header, HeaderHeadingSection, HeadingIcon, HeadingTitle, HeaderActionSection, SubduedInfo, OverlayFilter, NotAvailableNoteWrap, NotAvailableNoteIcon, InputBody, InputSectionSpacing, Footer, FooterContent, FooterNote } from './InputCard.styles.mjs';
|
|
11
11
|
import './InputSections/index.mjs';
|
|
12
12
|
import { CustomImage } from '../../../../CustomImage/CustomImage.mjs';
|
|
13
|
-
import attentionIcon__default from "../../../../../assets/
|
|
13
|
+
import attentionIcon__default from "../../../../../assets/attention2.svg";
|
|
14
14
|
import { OptionSelectSection } from './InputSections/OptionSelectSection.mjs';
|
|
15
15
|
import { SliderSection } from './InputSections/SliderSection.mjs';
|
|
16
16
|
import { CounterSection } from './InputSections/CounterSection.mjs';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var attentionIcon = require("../../../../../../assets/
|
|
6
|
+
var attentionIcon = require("../../../../../../assets/attention2.svg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../../../assets/
|
|
2
|
-
export { default } from "../../../../../../assets/
|
|
1
|
+
export * from "../../../../../../assets/attention2.svg";
|
|
2
|
+
export { default } from "../../../../../../assets/attention2.svg";
|
|
3
3
|
//# sourceMappingURL=attention.svg.mjs.map
|
|
@@ -6,7 +6,7 @@ var asset = require('../../../../../utils/asset.js');
|
|
|
6
6
|
require('./assets/attention.svg.js');
|
|
7
7
|
var Part = require('./Part.js');
|
|
8
8
|
var ProgressBarChart_styles = require('./ProgressBarChart.styles.js');
|
|
9
|
-
var attentionIcon = require("../../../../../assets/
|
|
9
|
+
var attentionIcon = require("../../../../../assets/attention.svg");
|
|
10
10
|
function _interopDefault(e) {
|
|
11
11
|
return e && e.__esModule ? e : {
|
|
12
12
|
default: e
|
|
@@ -4,7 +4,7 @@ import { imageSrc } from '../../../../../utils/asset.mjs';
|
|
|
4
4
|
import './assets/attention.svg.mjs';
|
|
5
5
|
import { PART_GAP_PX, PART_WIDTH_PX, Part } from './Part.mjs';
|
|
6
6
|
import { ProgressBarChartContainer, ProgressBarChartHeader, ProgressBarChartTitle, ProgressBarWrapper, ProgressBarPartsContainer, ProgressBarAttentionLabel, ProgressBarAttentionLabelIcon } from './ProgressBarChart.styles.mjs';
|
|
7
|
-
import attentionIcon__default from "../../../../../assets/
|
|
7
|
+
import attentionIcon__default from "../../../../../assets/attention.svg";
|
|
8
8
|
"use strict";
|
|
9
9
|
const ProgressBarChart = ({
|
|
10
10
|
title,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var attentionIcon = require("../../../../../../assets/
|
|
6
|
+
var attentionIcon = require("../../../../../../assets/attention.svg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../../../assets/
|
|
2
|
-
export { default } from "../../../../../../assets/
|
|
1
|
+
export * from "../../../../../../assets/attention.svg";
|
|
2
|
+
export { default } from "../../../../../../assets/attention.svg";
|
|
3
3
|
//# sourceMappingURL=attention.svg.mjs.map
|
|
@@ -32,7 +32,7 @@ const useComputeResourceCalculator = ({
|
|
|
32
32
|
if (networkInputs.detections) {
|
|
33
33
|
const cpu = networkDeviceResources.securityDetection.cpu.value * networkDeviceResources.securityDetection.cpu.weight;
|
|
34
34
|
const memory = networkDeviceResources.securityDetection.memory.value * networkDeviceResources.securityDetection.memory.weight;
|
|
35
|
-
sum += cpu + memory
|
|
35
|
+
sum += cpu + memory;
|
|
36
36
|
}
|
|
37
37
|
if (networkInputs.adBlocking) {
|
|
38
38
|
const cpu = networkDeviceResources.adBlocking.cpu.value * networkDeviceResources.adBlocking.cpu.weight;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useComputeResourceCalculator.js","sources":["../../../../src/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.ts"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport type {\n ComputeResourceCalculatorInputs,\n Device,\n} from \"./ComputeResourceCalculator.types\";\nimport { FeatureId } from \"./ComputeResourceCalculator.types\";\n\nexport const useComputeResourceCalculator = ({\n deviceResourceData,\n inputs,\n}: {\n deviceResourceData: Device[\"loadData\"];\n inputs: ComputeResourceCalculatorInputs;\n}) => {\n const networkResources = useMemo(() => {\n const networkDeviceResources = deviceResourceData.Network;\n const networkInputs = inputs[FeatureId.Network];\n\n if (!networkInputs.enabled || !networkDeviceResources) {\n return 0;\n }\n\n let sum = 0;\n\n if (networkInputs.enabled) {\n const cpu =\n networkDeviceResources.enableFeature.cpu.value *\n networkDeviceResources.enableFeature.cpu.weight;\n const memory =\n networkDeviceResources.enableFeature.memory.value *\n networkDeviceResources.enableFeature.memory.weight;\n sum += cpu + memory;\n }\n\n if (networkInputs.accessPoints > 0) {\n const cpu =\n networkInputs.accessPoints *\n (networkDeviceResources.accessPoint.data.cpu.value *\n networkDeviceResources.accessPoint.data.cpu.weight);\n const memory =\n networkInputs.accessPoints *\n (networkDeviceResources.accessPoint.data.memory.value *\n networkDeviceResources.accessPoint.data.memory.weight);\n sum += cpu + memory;\n }\n\n if (networkInputs.vpn) {\n const cpu =\n networkDeviceResources.vpn.cpu.value *\n networkDeviceResources.vpn.cpu.weight;\n const memory =\n networkDeviceResources.vpn.memory.value *\n networkDeviceResources.vpn.memory.weight;\n sum += cpu + memory;\n }\n\n if (networkInputs.detections) {\n const cpu =\n networkDeviceResources.securityDetection.cpu.value *\n networkDeviceResources.securityDetection.cpu.weight;\n const memory =\n networkDeviceResources.securityDetection.memory.value *\n networkDeviceResources.securityDetection.memory.weight;\n\n sum += cpu + memory + networkDeviceResources.threatManagementLoad;\n }\n\n if (networkInputs.adBlocking) {\n const cpu =\n networkDeviceResources.adBlocking.cpu.value *\n networkDeviceResources.adBlocking.cpu.weight;\n const memory =\n networkDeviceResources.adBlocking.memory.value *\n networkDeviceResources.adBlocking.memory.weight;\n sum += cpu + memory;\n }\n\n if (networkInputs.qos) {\n const cpu =\n networkDeviceResources.qos.cpu.value *\n networkDeviceResources.qos.cpu.weight;\n const memory =\n networkDeviceResources.qos.memory.value *\n networkDeviceResources.qos.memory.weight;\n sum += cpu + memory;\n }\n\n return sum;\n }, [deviceResourceData, inputs]);\n\n const protectResources = useMemo(() => {\n const protectDeviceResources = deviceResourceData.Protect;\n const protectInputs = inputs[FeatureId.Protect];\n\n // Increasing weight of camera values by 50%.\n const CAMERA_WEIGHT_FACTOR = 1.5;\n\n if (!protectInputs.enabled || !protectDeviceResources) {\n return 0;\n }\n\n let sum = 0;\n\n if (protectInputs.enabled) {\n const cpu =\n protectDeviceResources.enableFeature.cpu.value *\n protectDeviceResources.enableFeature.cpu.weight;\n const memory =\n protectDeviceResources.enableFeature.memory.value *\n protectDeviceResources.enableFeature.memory.weight;\n sum += cpu + memory;\n }\n\n if (protectInputs.cameraHd > 0) {\n const cpu =\n protectInputs.cameraHd *\n protectDeviceResources.cameraHd.data.cpu.value *\n protectDeviceResources.cameraHd.data.cpu.weight;\n const memory =\n protectInputs.cameraHd *\n protectDeviceResources.cameraHd.data.memory.value *\n protectDeviceResources.cameraHd.data.memory.weight;\n sum += (cpu + memory) * CAMERA_WEIGHT_FACTOR;\n }\n\n if (protectInputs.camera2k > 0) {\n const cpu =\n protectInputs.camera2k *\n protectDeviceResources.camera2k.data.cpu.value *\n protectDeviceResources.camera2k.data.cpu.weight;\n const memory =\n protectInputs.camera2k *\n protectDeviceResources.camera2k.data.memory.value *\n protectDeviceResources.camera2k.data.memory.weight;\n sum += (cpu + memory) * CAMERA_WEIGHT_FACTOR;\n }\n\n if (protectInputs.camera4k > 0) {\n const cpu =\n protectInputs.camera4k *\n protectDeviceResources.camera4k.data.cpu.value *\n protectDeviceResources.camera4k.data.cpu.weight;\n const memory =\n protectInputs.camera4k *\n protectDeviceResources.camera4k.data.memory.value *\n protectDeviceResources.camera4k.data.memory.weight;\n sum += (cpu + memory) * CAMERA_WEIGHT_FACTOR;\n }\n\n return sum;\n }, [deviceResourceData, inputs]);\n\n const talkResources = useMemo(() => {\n const talkDeviceResources = deviceResourceData.Talk;\n const talkInputs = inputs[FeatureId.Talk];\n\n if (!talkInputs.enabled || !talkDeviceResources) {\n return 0;\n }\n\n let sum = 0;\n\n if (talkInputs.enabled) {\n const cpu =\n talkDeviceResources.enableFeature.cpu.value *\n talkDeviceResources.enableFeature.cpu.weight;\n const memory =\n talkDeviceResources.enableFeature.memory.value *\n talkDeviceResources.enableFeature.memory.weight;\n sum += cpu + memory;\n }\n\n if (talkInputs.phones) {\n const cpu =\n talkInputs.phones *\n talkDeviceResources.phone.data.cpu.value *\n talkDeviceResources.phone.data.cpu.weight;\n const memory =\n talkInputs.phones *\n talkDeviceResources.phone.data.memory.value *\n talkDeviceResources.phone.data.memory.weight;\n sum += cpu + memory;\n }\n\n if (talkInputs.record) {\n const cpu =\n talkDeviceResources.record.cpu.value *\n talkDeviceResources.record.cpu.weight;\n const memory =\n talkDeviceResources.record.memory.value *\n talkDeviceResources.record.memory.weight;\n sum += cpu + memory;\n }\n\n return sum;\n }, [deviceResourceData, inputs]);\n\n const accessResources = useMemo(() => {\n const accessDeviceResources = deviceResourceData.Access;\n const accessInputs = inputs[FeatureId.Access];\n\n if (!accessInputs.enabled || !accessDeviceResources) {\n return 0;\n }\n\n let sum = 0;\n\n if (accessInputs.enabled) {\n const cpu =\n accessDeviceResources.enableFeature.cpu.value *\n accessDeviceResources.enableFeature.cpu.weight;\n const memory =\n accessDeviceResources.enableFeature.memory.value *\n accessDeviceResources.enableFeature.memory.weight;\n sum += cpu + memory;\n }\n\n if (accessInputs.doors > 0) {\n const cpu =\n accessInputs.doors *\n (accessDeviceResources.door.data.cpu.value *\n accessDeviceResources.door.data.cpu.weight);\n const memory =\n accessInputs.doors *\n (accessDeviceResources.door.data.memory.value *\n accessDeviceResources.door.data.memory.weight);\n sum += cpu + memory;\n }\n\n return sum;\n }, [deviceResourceData, inputs]);\n\n const computedResourcesLoadRatio = useMemo(() => {\n return (\n networkResources + talkResources + accessResources + protectResources\n );\n }, [networkResources, talkResources, accessResources, protectResources]);\n\n return {\n computedResourcesLoadRatio,\n };\n};\n"],"names":["useComputeResourceCalculator","deviceResourceData","inputs","networkResources","useMemo","networkDeviceResources","Network","networkInputs","FeatureId","enabled","sum","cpu","enableFeature","value","weight","memory","accessPoints","accessPoint","data","vpn","detections","securityDetection","threatManagementLoad","adBlocking","qos","protectResources","protectDeviceResources","Protect","protectInputs","CAMERA_WEIGHT_FACTOR","cameraHd","camera2k","camera4k","talkResources","talkDeviceResources","Talk","talkInputs","phones","phone","record","accessResources","accessDeviceResources","Access","accessInputs","doors","door","computedResourcesLoadRatio"],"mappings":";;;;;AAQO,MAAMA,+BAA+BA,CAAC;EAC3CC,kBAAA;EACAC;AACF,CAGM,KAAA;EACE,MAAAC,gBAAA,GAAmBC,KAAAA,CAAAA,QAAQ,MAAM;IACrC,MAAMC,yBAAyBJ,kBAAmB,CAAAK,OAAA;IAC5C,MAAAC,aAAA,GAAgBL,MAAO,CAAAM,+BAAA,CAAAA,SAAA,CAAUF,OAAO,CAAA;IAE9C,IAAI,CAACC,aAAA,CAAcE,OAAW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,MACJ8B,qBAAsB,CAAA7B,aAAA,CAAcD,IAAIE,KACxC,GAAA4B,qBAAA,CAAsB7B,cAAcD,GAAI,CAAAG,MAAA;MAC1C,MAAMC,SACJ0B,qBAAsB,CAAA7B,aAAA,CAAcG,OAAOF,KAC3C,GAAA4B,qBAAA,CAAsB7B,cAAcG,MAAO,CAAAD,MAAA;MAC7CJ,GAAA,IAAOC,GAAM,GAAAI,MAAA;IACf;IAEI,IAAA4B,YAAA,CAAaC,QAAQ,CAAG,EAAA;MACpB,MAAAjC,GAAA,GACJgC,YAAa,CAAAC,KAAA,IACZH,qBAAsB,CAAAI,IAAA,CAAK3B,IAAK,CAAAP,GAAA,CAAIE,KACnC,GAAA4B,qBAAA,CAAsBI,IAAK,CAAA3B,IAAA,CAAKP,GAAI,CAAAG,MAAA,CAAA;MAClC,MAAAC,MAAA,GACJ4B,YAAa,CAAAC,KAAA,IACZH,qBAAsB,CAAAI,IAAA,CAAK3B,IAAK,CAAAH,MAAA,CAAOF,KACtC,GAAA4B,qBAAA,CAAsBI,IAAK,CAAA3B,IAAA,CAAKH,MAAO,CAAAD,MAAA,CAAA;MAC3CJ,GAAA,IAAOC,GAAM,GAAAI,MAAA;IACf;IAEO,OAAAL,GAAA;EAAA,CACN,EAAA,CAACT,kBAAoB,EAAAC,MAAM,CAAC,CAAA;EAEzB,MAAA4C,0BAAA,GAA6B1C,KAAAA,CAAAA,QAAQ,MAAM;IAE7C,OAAAD,gBAAA,GAAmB8B,gBAAgBO,eAAkB,GAAAf,gBAAA;KAEtD,CAACtB,gBAAA,EAAkB8B,aAAe,EAAAO,eAAA,EAAiBf,gBAAgB,CAAC,CAAA;EAEhE,OAAA;IACLqB;EAAA,CACF;AACF,CAAA;"}
|
|
1
|
+
{"version":3,"file":"useComputeResourceCalculator.js","sources":["../../../../src/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.ts"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport type {\n ComputeResourceCalculatorInputs,\n Device,\n} from \"./ComputeResourceCalculator.types\";\nimport { FeatureId } from \"./ComputeResourceCalculator.types\";\n\nexport const useComputeResourceCalculator = ({\n deviceResourceData,\n inputs,\n}: {\n deviceResourceData: Device[\"loadData\"];\n inputs: ComputeResourceCalculatorInputs;\n}) => {\n const networkResources = useMemo(() => {\n const networkDeviceResources = deviceResourceData.Network;\n const networkInputs = inputs[FeatureId.Network];\n\n if (!networkInputs.enabled || !networkDeviceResources) {\n return 0;\n }\n\n let sum = 0;\n\n if (networkInputs.enabled) {\n const cpu =\n networkDeviceResources.enableFeature.cpu.value *\n networkDeviceResources.enableFeature.cpu.weight;\n const memory =\n networkDeviceResources.enableFeature.memory.value *\n networkDeviceResources.enableFeature.memory.weight;\n sum += cpu + memory;\n }\n\n if (networkInputs.accessPoints > 0) {\n const cpu =\n networkInputs.accessPoints *\n (networkDeviceResources.accessPoint.data.cpu.value *\n networkDeviceResources.accessPoint.data.cpu.weight);\n const memory =\n networkInputs.accessPoints *\n (networkDeviceResources.accessPoint.data.memory.value *\n networkDeviceResources.accessPoint.data.memory.weight);\n sum += cpu + memory;\n }\n\n if (networkInputs.vpn) {\n const cpu =\n networkDeviceResources.vpn.cpu.value *\n networkDeviceResources.vpn.cpu.weight;\n const memory =\n networkDeviceResources.vpn.memory.value *\n networkDeviceResources.vpn.memory.weight;\n sum += cpu + memory;\n }\n\n if (networkInputs.detections) {\n const cpu =\n networkDeviceResources.securityDetection.cpu.value *\n networkDeviceResources.securityDetection.cpu.weight;\n const memory =\n networkDeviceResources.securityDetection.memory.value *\n networkDeviceResources.securityDetection.memory.weight;\n\n sum += cpu + memory;\n }\n\n if (networkInputs.adBlocking) {\n const cpu =\n networkDeviceResources.adBlocking.cpu.value *\n networkDeviceResources.adBlocking.cpu.weight;\n const memory =\n networkDeviceResources.adBlocking.memory.value *\n networkDeviceResources.adBlocking.memory.weight;\n sum += cpu + memory;\n }\n\n if (networkInputs.qos) {\n const cpu =\n networkDeviceResources.qos.cpu.value *\n networkDeviceResources.qos.cpu.weight;\n const memory =\n networkDeviceResources.qos.memory.value *\n networkDeviceResources.qos.memory.weight;\n sum += cpu + memory;\n }\n\n return sum;\n }, [deviceResourceData, inputs]);\n\n const protectResources = useMemo(() => {\n const protectDeviceResources = deviceResourceData.Protect;\n const protectInputs = inputs[FeatureId.Protect];\n\n // Increasing weight of camera values by 50%.\n const CAMERA_WEIGHT_FACTOR = 1.5;\n\n if (!protectInputs.enabled || !protectDeviceResources) {\n return 0;\n }\n\n let sum = 0;\n\n if (protectInputs.enabled) {\n const cpu =\n protectDeviceResources.enableFeature.cpu.value *\n protectDeviceResources.enableFeature.cpu.weight;\n const memory =\n protectDeviceResources.enableFeature.memory.value *\n protectDeviceResources.enableFeature.memory.weight;\n sum += cpu + memory;\n }\n\n if (protectInputs.cameraHd > 0) {\n const cpu =\n protectInputs.cameraHd *\n protectDeviceResources.cameraHd.data.cpu.value *\n protectDeviceResources.cameraHd.data.cpu.weight;\n const memory =\n protectInputs.cameraHd *\n protectDeviceResources.cameraHd.data.memory.value *\n protectDeviceResources.cameraHd.data.memory.weight;\n sum += (cpu + memory) * CAMERA_WEIGHT_FACTOR;\n }\n\n if (protectInputs.camera2k > 0) {\n const cpu =\n protectInputs.camera2k *\n protectDeviceResources.camera2k.data.cpu.value *\n protectDeviceResources.camera2k.data.cpu.weight;\n const memory =\n protectInputs.camera2k *\n protectDeviceResources.camera2k.data.memory.value *\n protectDeviceResources.camera2k.data.memory.weight;\n sum += (cpu + memory) * CAMERA_WEIGHT_FACTOR;\n }\n\n if (protectInputs.camera4k > 0) {\n const cpu =\n protectInputs.camera4k *\n protectDeviceResources.camera4k.data.cpu.value *\n protectDeviceResources.camera4k.data.cpu.weight;\n const memory =\n protectInputs.camera4k *\n protectDeviceResources.camera4k.data.memory.value *\n protectDeviceResources.camera4k.data.memory.weight;\n sum += (cpu + memory) * CAMERA_WEIGHT_FACTOR;\n }\n\n return sum;\n }, [deviceResourceData, inputs]);\n\n const talkResources = useMemo(() => {\n const talkDeviceResources = deviceResourceData.Talk;\n const talkInputs = inputs[FeatureId.Talk];\n\n if (!talkInputs.enabled || !talkDeviceResources) {\n return 0;\n }\n\n let sum = 0;\n\n if (talkInputs.enabled) {\n const cpu =\n talkDeviceResources.enableFeature.cpu.value *\n talkDeviceResources.enableFeature.cpu.weight;\n const memory =\n talkDeviceResources.enableFeature.memory.value *\n talkDeviceResources.enableFeature.memory.weight;\n sum += cpu + memory;\n }\n\n if (talkInputs.phones) {\n const cpu =\n talkInputs.phones *\n talkDeviceResources.phone.data.cpu.value *\n talkDeviceResources.phone.data.cpu.weight;\n const memory =\n talkInputs.phones *\n talkDeviceResources.phone.data.memory.value *\n talkDeviceResources.phone.data.memory.weight;\n sum += cpu + memory;\n }\n\n if (talkInputs.record) {\n const cpu =\n talkDeviceResources.record.cpu.value *\n talkDeviceResources.record.cpu.weight;\n const memory =\n talkDeviceResources.record.memory.value *\n talkDeviceResources.record.memory.weight;\n sum += cpu + memory;\n }\n\n return sum;\n }, [deviceResourceData, inputs]);\n\n const accessResources = useMemo(() => {\n const accessDeviceResources = deviceResourceData.Access;\n const accessInputs = inputs[FeatureId.Access];\n\n if (!accessInputs.enabled || !accessDeviceResources) {\n return 0;\n }\n\n let sum = 0;\n\n if (accessInputs.enabled) {\n const cpu =\n accessDeviceResources.enableFeature.cpu.value *\n accessDeviceResources.enableFeature.cpu.weight;\n const memory =\n accessDeviceResources.enableFeature.memory.value *\n accessDeviceResources.enableFeature.memory.weight;\n sum += cpu + memory;\n }\n\n if (accessInputs.doors > 0) {\n const cpu =\n accessInputs.doors *\n (accessDeviceResources.door.data.cpu.value *\n accessDeviceResources.door.data.cpu.weight);\n const memory =\n accessInputs.doors *\n (accessDeviceResources.door.data.memory.value *\n accessDeviceResources.door.data.memory.weight);\n sum += cpu + memory;\n }\n\n return sum;\n }, [deviceResourceData, inputs]);\n\n const computedResourcesLoadRatio = useMemo(() => {\n return (\n networkResources + talkResources + accessResources + protectResources\n );\n }, [networkResources, talkResources, accessResources, protectResources]);\n\n return {\n computedResourcesLoadRatio,\n };\n};\n"],"names":["useComputeResourceCalculator","deviceResourceData","inputs","networkResources","useMemo","networkDeviceResources","Network","networkInputs","FeatureId","enabled","sum","cpu","enableFeature","value","weight","memory","accessPoints","accessPoint","data","vpn","detections","securityDetection","adBlocking","qos","protectResources","protectDeviceResources","Protect","protectInputs","CAMERA_WEIGHT_FACTOR","cameraHd","camera2k","camera4k","talkResources","talkDeviceResources","Talk","talkInputs","phones","phone","record","accessResources","accessDeviceResources","Access","accessInputs","doors","door","computedResourcesLoadRatio"],"mappings":";;;;;AAQO,MAAMA,+BAA+BA,CAAC;EAC3CC,kBAAA;EACAC;AACF,CAGM,KAAA;EACE,MAAAC,gBAAA,GAAmBC,KAAAA,CAAAA,QAAQ,MAAM;IACrC,MAAMC,yBAAyBJ,kBAAmB,CAAAK,OAAA;IAC5C,MAAAC,aAAA,GAAgBL,MAAO,CAAAM,+BAAA,CAAAA,SAAA,CAAUF,OAAO,CAAA;IAE9C,IAAI,CAACC,aAAA,CAAcE,OAAW,IAAA,CAACJ,sBAAwB,EAAA;MAC9C,OAAA,CAAA;IACT;IAEA,IAAIK,GAAM,GAAA,CAAA;IAEV,IAAIH,cAAcE,OAAS,EAAA;MACzB,MAAME,MACJN,sBAAuB,CAAAO,aAAA,CAAcD,IAAIE,KACzC,GAAAR,sBAAA,CAAuBO,cAAcD,GAAI,CAAAG,MAAA;MAC3C,MAAMC,SACJV,sBAAuB,CAAAO,aAAA,CAAcG,OAAOF,KAC5C,GAAAR,sBAAA,CAAuBO,cAAcG,MAAO,CAAAD,MAAA;MAC9CJ,GAAA,IAAOC,GAAM,GAAAI,MAAA;IACf;IAEI,IAAAR,aAAA,CAAcS,eAAe,CAAG,EAAA;MAC5B,MAAAL,GAAA,GACJJ,aAAc,CAAAS,YAAA,IACbX,sBAAuB,CAAAY,WAAA,CAAYC,IAAK,CAAAP,GAAA,CAAIE,KAC3C,GAAAR,sBAA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K1B,IAAK,CAAAH,MAAA,CAAOF,KACtC,GAAA2B,qBAAA,CAAsBI,IAAK,CAAA1B,IAAA,CAAKH,MAAO,CAAAD,MAAA,CAAA;MAC3CJ,GAAA,IAAOC,GAAM,GAAAI,MAAA;IACf;IAEO,OAAAL,GAAA;EAAA,CACN,EAAA,CAACT,kBAAoB,EAAAC,MAAM,CAAC,CAAA;EAEzB,MAAA2C,0BAAA,GAA6BzC,KAAAA,CAAAA,QAAQ,MAAM;IAE7C,OAAAD,gBAAA,GAAmB6B,gBAAgBO,eAAkB,GAAAf,gBAAA;KAEtD,CAACrB,gBAAA,EAAkB6B,aAAe,EAAAO,eAAA,EAAiBf,gBAAgB,CAAC,CAAA;EAEhE,OAAA;IACLqB;EAAA,CACF;AACF,CAAA;"}
|
|
@@ -30,7 +30,7 @@ const useComputeResourceCalculator = ({
|
|
|
30
30
|
if (networkInputs.detections) {
|
|
31
31
|
const cpu = networkDeviceResources.securityDetection.cpu.value * networkDeviceResources.securityDetection.cpu.weight;
|
|
32
32
|
const memory = networkDeviceResources.securityDetection.memory.value * networkDeviceResources.securityDetection.memory.weight;
|
|
33
|
-
sum += cpu + memory
|
|
33
|
+
sum += cpu + memory;
|
|
34
34
|
}
|
|
35
35
|
if (networkInputs.adBlocking) {
|
|
36
36
|
const cpu = networkDeviceResources.adBlocking.cpu.value * networkDeviceResources.adBlocking.cpu.weight;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useComputeResourceCalculator.mjs","sources":["../../../../src/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.ts"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport type {\n ComputeResourceCalculatorInputs,\n Device,\n} from \"./ComputeResourceCalculator.types\";\nimport { FeatureId } from \"./ComputeResourceCalculator.types\";\n\nexport const useComputeResourceCalculator = ({\n deviceResourceData,\n inputs,\n}: {\n deviceResourceData: Device[\"loadData\"];\n inputs: ComputeResourceCalculatorInputs;\n}) => {\n const networkResources = useMemo(() => {\n const networkDeviceResources = deviceResourceData.Network;\n const networkInputs = inputs[FeatureId.Network];\n\n if (!networkInputs.enabled || !networkDeviceResources) {\n return 0;\n }\n\n let sum = 0;\n\n if (networkInputs.enabled) {\n const cpu =\n networkDeviceResources.enableFeature.cpu.value *\n networkDeviceResources.enableFeature.cpu.weight;\n const memory =\n networkDeviceResources.enableFeature.memory.value *\n networkDeviceResources.enableFeature.memory.weight;\n sum += cpu + memory;\n }\n\n if (networkInputs.accessPoints > 0) {\n const cpu =\n networkInputs.accessPoints *\n (networkDeviceResources.accessPoint.data.cpu.value *\n networkDeviceResources.accessPoint.data.cpu.weight);\n const memory =\n networkInputs.accessPoints *\n (networkDeviceResources.accessPoint.data.memory.value *\n networkDeviceResources.accessPoint.data.memory.weight);\n sum += cpu + memory;\n }\n\n if (networkInputs.vpn) {\n const cpu =\n networkDeviceResources.vpn.cpu.value *\n networkDeviceResources.vpn.cpu.weight;\n const memory =\n networkDeviceResources.vpn.memory.value *\n networkDeviceResources.vpn.memory.weight;\n sum += cpu + memory;\n }\n\n if (networkInputs.detections) {\n const cpu =\n networkDeviceResources.securityDetection.cpu.value *\n networkDeviceResources.securityDetection.cpu.weight;\n const memory =\n networkDeviceResources.securityDetection.memory.value *\n networkDeviceResources.securityDetection.memory.weight;\n\n sum += cpu + memory + networkDeviceResources.threatManagementLoad;\n }\n\n if (networkInputs.adBlocking) {\n const cpu =\n networkDeviceResources.adBlocking.cpu.value *\n networkDeviceResources.adBlocking.cpu.weight;\n const memory =\n networkDeviceResources.adBlocking.memory.value *\n networkDeviceResources.adBlocking.memory.weight;\n sum += cpu + memory;\n }\n\n if (networkInputs.qos) {\n const cpu =\n networkDeviceResources.qos.cpu.value *\n networkDeviceResources.qos.cpu.weight;\n const memory =\n networkDeviceResources.qos.memory.value *\n networkDeviceResources.qos.memory.weight;\n sum += cpu + memory;\n }\n\n return sum;\n }, [deviceResourceData, inputs]);\n\n const protectResources = useMemo(() => {\n const protectDeviceResources = deviceResourceData.Protect;\n const protectInputs = inputs[FeatureId.Protect];\n\n // Increasing weight of camera values by 50%.\n const CAMERA_WEIGHT_FACTOR = 1.5;\n\n if (!protectInputs.enabled || !protectDeviceResources) {\n return 0;\n }\n\n let sum = 0;\n\n if (protectInputs.enabled) {\n const cpu =\n protectDeviceResources.enableFeature.cpu.value *\n protectDeviceResources.enableFeature.cpu.weight;\n const memory =\n protectDeviceResources.enableFeature.memory.value *\n protectDeviceResources.enableFeature.memory.weight;\n sum += cpu + memory;\n }\n\n if (protectInputs.cameraHd > 0) {\n const cpu =\n protectInputs.cameraHd *\n protectDeviceResources.cameraHd.data.cpu.value *\n protectDeviceResources.cameraHd.data.cpu.weight;\n const memory =\n protectInputs.cameraHd *\n protectDeviceResources.cameraHd.data.memory.value *\n protectDeviceResources.cameraHd.data.memory.weight;\n sum += (cpu + memory) * CAMERA_WEIGHT_FACTOR;\n }\n\n if (protectInputs.camera2k > 0) {\n const cpu =\n protectInputs.camera2k *\n protectDeviceResources.camera2k.data.cpu.value *\n protectDeviceResources.camera2k.data.cpu.weight;\n const memory =\n protectInputs.camera2k *\n protectDeviceResources.camera2k.data.memory.value *\n protectDeviceResources.camera2k.data.memory.weight;\n sum += (cpu + memory) * CAMERA_WEIGHT_FACTOR;\n }\n\n if (protectInputs.camera4k > 0) {\n const cpu =\n protectInputs.camera4k *\n protectDeviceResources.camera4k.data.cpu.value *\n protectDeviceResources.camera4k.data.cpu.weight;\n const memory =\n protectInputs.camera4k *\n protectDeviceResources.camera4k.data.memory.value *\n protectDeviceResources.camera4k.data.memory.weight;\n sum += (cpu + memory) * CAMERA_WEIGHT_FACTOR;\n }\n\n return sum;\n }, [deviceResourceData, inputs]);\n\n const talkResources = useMemo(() => {\n const talkDeviceResources = deviceResourceData.Talk;\n const talkInputs = inputs[FeatureId.Talk];\n\n if (!talkInputs.enabled || !talkDeviceResources) {\n return 0;\n }\n\n let sum = 0;\n\n if (talkInputs.enabled) {\n const cpu =\n talkDeviceResources.enableFeature.cpu.value *\n talkDeviceResources.enableFeature.cpu.weight;\n const memory =\n talkDeviceResources.enableFeature.memory.value *\n talkDeviceResources.enableFeature.memory.weight;\n sum += cpu + memory;\n }\n\n if (talkInputs.phones) {\n const cpu =\n talkInputs.phones *\n talkDeviceResources.phone.data.cpu.value *\n talkDeviceResources.phone.data.cpu.weight;\n const memory =\n talkInputs.phones *\n talkDeviceResources.phone.data.memory.value *\n talkDeviceResources.phone.data.memory.weight;\n sum += cpu + memory;\n }\n\n if (talkInputs.record) {\n const cpu =\n talkDeviceResources.record.cpu.value *\n talkDeviceResources.record.cpu.weight;\n const memory =\n talkDeviceResources.record.memory.value *\n talkDeviceResources.record.memory.weight;\n sum += cpu + memory;\n }\n\n return sum;\n }, [deviceResourceData, inputs]);\n\n const accessResources = useMemo(() => {\n const accessDeviceResources = deviceResourceData.Access;\n const accessInputs = inputs[FeatureId.Access];\n\n if (!accessInputs.enabled || !accessDeviceResources) {\n return 0;\n }\n\n let sum = 0;\n\n if (accessInputs.enabled) {\n const cpu =\n accessDeviceResources.enableFeature.cpu.value *\n accessDeviceResources.enableFeature.cpu.weight;\n const memory =\n accessDeviceResources.enableFeature.memory.value *\n accessDeviceResources.enableFeature.memory.weight;\n sum += cpu + memory;\n }\n\n if (accessInputs.doors > 0) {\n const cpu =\n accessInputs.doors *\n (accessDeviceResources.door.data.cpu.value *\n accessDeviceResources.door.data.cpu.weight);\n const memory =\n accessInputs.doors *\n (accessDeviceResources.door.data.memory.value *\n accessDeviceResources.door.data.memory.weight);\n sum += cpu + memory;\n }\n\n return sum;\n }, [deviceResourceData, inputs]);\n\n const computedResourcesLoadRatio = useMemo(() => {\n return (\n networkResources + talkResources + accessResources + protectResources\n );\n }, [networkResources, talkResources, accessResources, protectResources]);\n\n return {\n computedResourcesLoadRatio,\n };\n};\n"],"names":["useComputeResourceCalculator","deviceResourceData","inputs","networkResources","useMemo","networkDeviceResources","Network","networkInputs","FeatureId","enabled","sum","cpu","enableFeature","value","weight","memory","accessPoints","accessPoint","data","vpn","detections","securityDetection","threatManagementLoad","adBlocking","qos","protectResources","protectDeviceResources","Protect","protectInputs","CAMERA_WEIGHT_FACTOR","cameraHd","camera2k","camera4k","talkResources","talkDeviceResources","Talk","talkInputs","phones","phone","record","accessResources","accessDeviceResources","Access","accessInputs","doors","door","computedResourcesLoadRatio"],"mappings":";;;AAQO,MAAMA,+BAA+BA,CAAC;EAC3CC,kBAAA;EACAC;AACF,CAGM,KAAA;EACE,MAAAC,gBAAA,GAAmBC,QAAQ,MAAM;IACrC,MAAMC,yBAAyBJ,kBAAmB,CAAAK,OAAA;IAC5C,MAAAC,aAAA,GAAgBL,MAAO,CAAAM,SAAA,CAAUF,OAAO,CAAA;IAE9C,IAAI,CAACC,aAAA,CAAcE,OAAW,IAAA,CAACJ,sBAAwB,EAAA;MAC9C,OAAA,CAAA;IACT;IAEA,IAAIK,GAAM,GAAA,CAAA;IAEV,IAAIH,cAAcE,OAAS,EAAA;MACzB,MAAME,MACJN,sBAAuB,CAAAO,aAAA,CAAcD,IAAIE,KACzC,GAAAR,sBAAA,CAAuBO,cAAcD,GAAI,CAAAG,MAAA;MAC3C,MAAMC,SACJV,sBAAuB,CAAAO,aAAA,CAAcG,OAAOF,KAC5C,GAAAR,sBAAA,CAAuBO,cAAcG,MAAO,CAAAD,MAAA;MAC9CJ,GAAA,IAAOC,GAAM,GAAAI,MAAA;IACf;IAEI,IAAAR,aAAA,CAAcS,eAAe,CAAG,EAAA;MAC5B,MAAAL,GAAA,GACJJ,aAAc,CAAAS,YAAA,IACbX,sBAAuB,CAAAY,WAAA,CAAYC,IAAK,CAAAP,GAAA,CAAIE,KAC3C,GAAAR,sBAAA,CAAuBY,WAAY,CAAAC,IAAA,CAAKP,GAAI,CAAAG,MAAA,CAAA;MAC1C,MAAAC,MAAA,GACJR,aAAc,CAAAS,YAAA,IACbX,sBAAuB,CAAAY,WAAA,CAAYC,IAAK,CAAAH,MAAA,CAAOF,KAC9C,GAAAR,s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B,MAAA4C,0BAAA,GAA6B1C,QAAQ,MAAM;IAE7C,OAAAD,gBAAA,GAAmB8B,gBAAgBO,eAAkB,GAAAf,gBAAA;KAEtD,CAACtB,gBAAA,EAAkB8B,aAAe,EAAAO,eAAA,EAAiBf,gBAAgB,CAAC,CAAA;EAEhE,OAAA;IACLqB;EAAA,CACF;AACF,CAAA;"}
|
|
1
|
+
{"version":3,"file":"useComputeResourceCalculator.mjs","sources":["../../../../src/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.ts"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport type {\n ComputeResourceCalculatorInputs,\n Device,\n} from \"./ComputeResourceCalculator.types\";\nimport { FeatureId } from \"./ComputeResourceCalculator.types\";\n\nexport const useComputeResourceCalculator = ({\n deviceResourceData,\n inputs,\n}: {\n deviceResourceData: Device[\"loadData\"];\n inputs: ComputeResourceCalculatorInputs;\n}) => {\n const networkResources = useMemo(() => {\n const networkDeviceResources = deviceResourceData.Network;\n const networkInputs = inputs[FeatureId.Network];\n\n if (!networkInputs.enabled || !networkDeviceResources) {\n return 0;\n }\n\n let sum = 0;\n\n if (networkInputs.enabled) {\n const cpu =\n networkDeviceResources.enableFeature.cpu.value *\n networkDeviceResources.enableFeature.cpu.weight;\n const memory =\n networkDeviceResources.enableFeature.memory.value *\n networkDeviceResources.enableFeature.memory.weight;\n sum += cpu + memory;\n }\n\n if (networkInputs.accessPoints > 0) {\n const cpu =\n networkInputs.accessPoints *\n (networkDeviceResources.accessPoint.data.cpu.value *\n networkDeviceResources.accessPoint.data.cpu.weight);\n const memory =\n networkInputs.accessPoints *\n (networkDeviceResources.accessPoint.data.memory.value *\n networkDeviceResources.accessPoint.data.memory.weight);\n sum += cpu + memory;\n }\n\n if (networkInputs.vpn) {\n const cpu =\n networkDeviceResources.vpn.cpu.value *\n networkDeviceResources.vpn.cpu.weight;\n const memory =\n networkDeviceResources.vpn.memory.value *\n networkDeviceResources.vpn.memory.weight;\n sum += cpu + memory;\n }\n\n if (networkInputs.detections) {\n const cpu =\n networkDeviceResources.securityDetection.cpu.value *\n networkDeviceResources.securityDetection.cpu.weight;\n const memory =\n networkDeviceResources.securityDetection.memory.value *\n networkDeviceResources.securityDetection.memory.weight;\n\n sum += cpu + memory;\n }\n\n if (networkInputs.adBlocking) {\n const cpu =\n networkDeviceResources.adBlocking.cpu.value *\n networkDeviceResources.adBlocking.cpu.weight;\n const memory =\n networkDeviceResources.adBlocking.memory.value *\n networkDeviceResources.adBlocking.memory.weight;\n sum += cpu + memory;\n }\n\n if (networkInputs.qos) {\n const cpu =\n networkDeviceResources.qos.cpu.value *\n networkDeviceResources.qos.cpu.weight;\n const memory =\n networkDeviceResources.qos.memory.value *\n networkDeviceResources.qos.memory.weight;\n sum += cpu + memory;\n }\n\n return sum;\n }, [deviceResourceData, inputs]);\n\n const protectResources = useMemo(() => {\n const protectDeviceResources = deviceResourceData.Protect;\n const protectInputs = inputs[FeatureId.Protect];\n\n // Increasing weight of camera values by 50%.\n const CAMERA_WEIGHT_FACTOR = 1.5;\n\n if (!protectInputs.enabled || !protectDeviceResources) {\n return 0;\n }\n\n let sum = 0;\n\n if (protectInputs.enabled) {\n const cpu =\n protectDeviceResources.enableFeature.cpu.value *\n protectDeviceResources.enableFeature.cpu.weight;\n const memory =\n protectDeviceResources.enableFeature.memory.value *\n protectDeviceResources.enableFeature.memory.weight;\n sum += cpu + memory;\n }\n\n if (protectInputs.cameraHd > 0) {\n const cpu =\n protectInputs.cameraHd *\n protectDeviceResources.cameraHd.data.cpu.value *\n protectDeviceResources.cameraHd.data.cpu.weight;\n const memory =\n protectInputs.cameraHd *\n protectDeviceResources.cameraHd.data.memory.value *\n protectDeviceResources.cameraHd.data.memory.weight;\n sum += (cpu + memory) * CAMERA_WEIGHT_FACTOR;\n }\n\n if (protectInputs.camera2k > 0) {\n const cpu =\n protectInputs.camera2k *\n protectDeviceResources.camera2k.data.cpu.value *\n protectDeviceResources.camera2k.data.cpu.weight;\n const memory =\n protectInputs.camera2k *\n protectDeviceResources.camera2k.data.memory.value *\n protectDeviceResources.camera2k.data.memory.weight;\n sum += (cpu + memory) * CAMERA_WEIGHT_FACTOR;\n }\n\n if (protectInputs.camera4k > 0) {\n const cpu =\n protectInputs.camera4k *\n protectDeviceResources.camera4k.data.cpu.value *\n protectDeviceResources.camera4k.data.cpu.weight;\n const memory =\n protectInputs.camera4k *\n protectDeviceResources.camera4k.data.memory.value *\n protectDeviceResources.camera4k.data.memory.weight;\n sum += (cpu + memory) * CAMERA_WEIGHT_FACTOR;\n }\n\n return sum;\n }, [deviceResourceData, inputs]);\n\n const talkResources = useMemo(() => {\n const talkDeviceResources = deviceResourceData.Talk;\n const talkInputs = inputs[FeatureId.Talk];\n\n if (!talkInputs.enabled || !talkDeviceResources) {\n return 0;\n }\n\n let sum = 0;\n\n if (talkInputs.enabled) {\n const cpu =\n talkDeviceResources.enableFeature.cpu.value *\n talkDeviceResources.enableFeature.cpu.weight;\n const memory =\n talkDeviceResources.enableFeature.memory.value *\n talkDeviceResources.enableFeature.memory.weight;\n sum += cpu + memory;\n }\n\n if (talkInputs.phones) {\n const cpu =\n talkInputs.phones *\n talkDeviceResources.phone.data.cpu.value *\n talkDeviceResources.phone.data.cpu.weight;\n const memory =\n talkInputs.phones *\n talkDeviceResources.phone.data.memory.value *\n talkDeviceResources.phone.data.memory.weight;\n sum += cpu + memory;\n }\n\n if (talkInputs.record) {\n const cpu =\n talkDeviceResources.record.cpu.value *\n talkDeviceResources.record.cpu.weight;\n const memory =\n talkDeviceResources.record.memory.value *\n talkDeviceResources.record.memory.weight;\n sum += cpu + memory;\n }\n\n return sum;\n }, [deviceResourceData, inputs]);\n\n const accessResources = useMemo(() => {\n const accessDeviceResources = deviceResourceData.Access;\n const accessInputs = inputs[FeatureId.Access];\n\n if (!accessInputs.enabled || !accessDeviceResources) {\n return 0;\n }\n\n let sum = 0;\n\n if (accessInputs.enabled) {\n const cpu =\n accessDeviceResources.enableFeature.cpu.value *\n accessDeviceResources.enableFeature.cpu.weight;\n const memory =\n accessDeviceResources.enableFeature.memory.value *\n accessDeviceResources.enableFeature.memory.weight;\n sum += cpu + memory;\n }\n\n if (accessInputs.doors > 0) {\n const cpu =\n accessInputs.doors *\n (accessDeviceResources.door.data.cpu.value *\n accessDeviceResources.door.data.cpu.weight);\n const memory =\n accessInputs.doors *\n (accessDeviceResources.door.data.memory.value *\n accessDeviceResources.door.data.memory.weight);\n sum += cpu + memory;\n }\n\n return sum;\n }, [deviceResourceData, inputs]);\n\n const computedResourcesLoadRatio = useMemo(() => {\n return (\n networkResources + talkResources + accessResources + protectResources\n );\n }, [networkResources, talkResources, accessResources, protectResources]);\n\n return {\n computedResourcesLoadRatio,\n };\n};\n"],"names":["useComputeResourceCalculator","deviceResourceData","inputs","networkResources","useMemo","networkDeviceResources","Network","networkInputs","FeatureId","enabled","sum","cpu","enableFeature","value","weight","memory","accessPoints","accessPoint","data","vpn","detections","securityDetection","adBlocking","qos","protectResources","protectDeviceResources","Protect","protectInputs","CAMERA_WEIGHT_FACTOR","cameraHd","camera2k","camera4k","talkResources","talkDeviceResources","Talk","talkInputs","phones","phone","record","accessResources","accessDeviceResources","Access","accessInputs","doors","door","computedResourcesLoadRatio"],"mappings":";;;AAQO,MAAMA,+BAA+BA,CAAC;EAC3CC,kBAAA;EACAC;AACF,CAGM,KAAA;EACE,MAAAC,gBAAA,GAAmBC,QAAQ,MAAM;IACrC,MAAMC,yBAAyBJ,kBAAmB,CAAAK,OAAA;IAC5C,MAAAC,aAAA,GAAgBL,MAAO,CAAAM,SAAA,CAAUF,OAAO,CAAA;IAE9C,IAAI,CAACC,aAAA,CAAcE,OAAW,IAAA,CAACJ,sBAAwB,EAAA;MAC9C,OAAA,CAAA;IACT;IAEA,IAAIK,GAAM,GAAA,CAAA;IAEV,IAAIH,cAAcE,OAAS,EAAA;MACzB,MAAME,MACJN,sBAAuB,CAAAO,aAAA,CAAcD,IAAIE,KACzC,GAAAR,sBAAA,CAAuBO,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MACpB,MAAAhC,GAAA,GACJ+B,YAAa,CAAAC,KAAA,IACZH,qBAAsB,CAAAI,IAAA,CAAK1B,IAAK,CAAAP,GAAA,CAAIE,KACnC,GAAA2B,qBAAA,CAAsBI,IAAK,CAAA1B,IAAA,CAAKP,GAAI,CAAAG,MAAA,CAAA;MAClC,MAAAC,MAAA,GACJ2B,YAAa,CAAAC,KAAA,IACZH,qBAAsB,CAAAI,IAAA,CAAK1B,IAAK,CAAAH,MAAA,CAAOF,KACtC,GAAA2B,qBAAA,CAAsBI,IAAK,CAAA1B,IAAA,CAAKH,MAAO,CAAAD,MAAA,CAAA;MAC3CJ,GAAA,IAAOC,GAAM,GAAAI,MAAA;IACf;IAEO,OAAAL,GAAA;EAAA,CACN,EAAA,CAACT,kBAAoB,EAAAC,MAAM,CAAC,CAAA;EAEzB,MAAA2C,0BAAA,GAA6BzC,QAAQ,MAAM;IAE7C,OAAAD,gBAAA,GAAmB6B,gBAAgBO,eAAkB,GAAAf,gBAAA;KAEtD,CAACrB,gBAAA,EAAkB6B,aAAe,EAAAO,eAAA,EAAiBf,gBAAgB,CAAC,CAAA;EAEhE,OAAA;IACLqB;EAAA,CACF;AACF,CAAA;"}
|
|
@@ -3,25 +3,25 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var
|
|
6
|
+
var envr = require("../../../../assets/envr.png");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
var
|
|
12
|
+
var envr__default = /*#__PURE__*/_interopDefault(envr);
|
|
13
13
|
Object.defineProperty(exports, "default", {
|
|
14
14
|
enumerable: true,
|
|
15
15
|
get: function () {
|
|
16
|
-
return
|
|
16
|
+
return envr__default["default"];
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
Object.keys(
|
|
19
|
+
Object.keys(envr).forEach(function (k) {
|
|
20
20
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
21
21
|
enumerable: true,
|
|
22
22
|
get: function () {
|
|
23
|
-
return
|
|
23
|
+
return envr[k];
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
});
|
|
27
|
-
//# sourceMappingURL=
|
|
27
|
+
//# sourceMappingURL=envr.png.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"envr.png.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"envr.png.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var ucgMax = require("../../../../assets/ucg-max.png");
|
|
7
|
+
function _interopDefault(e) {
|
|
8
|
+
return e && e.__esModule ? e : {
|
|
9
|
+
default: e
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
var ucgMax__default = /*#__PURE__*/_interopDefault(ucgMax);
|
|
13
|
+
Object.defineProperty(exports, "default", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () {
|
|
16
|
+
return ucgMax__default["default"];
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
Object.keys(ucgMax).forEach(function (k) {
|
|
20
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () {
|
|
23
|
+
return ucgMax[k];
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=ucg-max.png.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ucg-max.png.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ucg-max.png.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
var access = "Access";
|
|
7
|
-
var add = "Add";
|
|
8
7
|
var addPorts = "Add Ports";
|
|
9
8
|
var adjustYourDevice = "Adjust your device selection to view recommended PoE switches.";
|
|
10
9
|
var assignPoeDevices = "Assign PoE devices to the ports above to view recommended PoE switches.";
|
|
@@ -12,6 +11,7 @@ var capacityCalculator = "Capacity Calculator";
|
|
|
12
11
|
var capacityExceeded = "Recommended Capacity Exceeded: This deployment may experience degraded performance.";
|
|
13
12
|
var cloudKeyNote = "* The Cloud Key Gen2 Plus only supports hard drives that can operate on 5V power. Hard drives that require additional power are not supported.";
|
|
14
13
|
var computeResources = "Compute Resources";
|
|
14
|
+
var add = "Add";
|
|
15
15
|
var estimatesMayVary = "Compute Resources are estimates. Results may vary.";
|
|
16
16
|
var network = "Network";
|
|
17
17
|
var notAvailable = "Not Available";
|
|
@@ -31,7 +31,6 @@ var watts = "Watts";
|
|
|
31
31
|
var EN_TRANSLATION = {
|
|
32
32
|
access: access,
|
|
33
33
|
"access.doors": "Doors",
|
|
34
|
-
add: add,
|
|
35
34
|
addPorts: addPorts,
|
|
36
35
|
adjustYourDevice: adjustYourDevice,
|
|
37
36
|
assignPoeDevices: assignPoeDevices,
|
|
@@ -46,13 +45,19 @@ var EN_TRANSLATION = {
|
|
|
46
45
|
computeResources: computeResources,
|
|
47
46
|
"designCenter.startYourProject": "Start your project here",
|
|
48
47
|
"designCenter.title": "Design Center",
|
|
49
|
-
"device.CloudKey+": "CloudKey+",
|
|
50
48
|
"device.UDM Pro / SE": "UDM Pro / SE",
|
|
49
|
+
"device.ENVR": "ENVR",
|
|
51
50
|
"device.UDM Pro Max": "UDM Pro Max",
|
|
52
|
-
"device.UDR": "UDR",
|
|
53
|
-
"device.UDW": "UDW",
|
|
54
51
|
"device.UNVR": "UNVR",
|
|
55
52
|
"device.UNVR Pro": "UNVR Pro",
|
|
53
|
+
"device.CloudKey+": "CloudKey+",
|
|
54
|
+
"device.UDW": "UDW",
|
|
55
|
+
"device.UDR": "UDR",
|
|
56
|
+
"device.UDR7": "UDR7",
|
|
57
|
+
"device.UX": "UX",
|
|
58
|
+
"device.EFG": "EFG",
|
|
59
|
+
"device.UCG Max": "UCG Max",
|
|
60
|
+
add: add,
|
|
56
61
|
estimatesMayVary: estimatesMayVary,
|
|
57
62
|
network: network,
|
|
58
63
|
"network.accessPoints": "Access Points",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
var access = "Access";
|
|
2
|
-
var add = "Add";
|
|
3
2
|
var addPorts = "Add Ports";
|
|
4
3
|
var adjustYourDevice = "Adjust your device selection to view recommended PoE switches.";
|
|
5
4
|
var assignPoeDevices = "Assign PoE devices to the ports above to view recommended PoE switches.";
|
|
@@ -7,6 +6,7 @@ var capacityCalculator = "Capacity Calculator";
|
|
|
7
6
|
var capacityExceeded = "Recommended Capacity Exceeded: This deployment may experience degraded performance.";
|
|
8
7
|
var cloudKeyNote = "* The Cloud Key Gen2 Plus only supports hard drives that can operate on 5V power. Hard drives that require additional power are not supported.";
|
|
9
8
|
var computeResources = "Compute Resources";
|
|
9
|
+
var add = "Add";
|
|
10
10
|
var estimatesMayVary = "Compute Resources are estimates. Results may vary.";
|
|
11
11
|
var network = "Network";
|
|
12
12
|
var notAvailable = "Not Available";
|
|
@@ -26,7 +26,6 @@ var watts = "Watts";
|
|
|
26
26
|
var EN_TRANSLATION = {
|
|
27
27
|
access: access,
|
|
28
28
|
"access.doors": "Doors",
|
|
29
|
-
add: add,
|
|
30
29
|
addPorts: addPorts,
|
|
31
30
|
adjustYourDevice: adjustYourDevice,
|
|
32
31
|
assignPoeDevices: assignPoeDevices,
|
|
@@ -41,13 +40,19 @@ var EN_TRANSLATION = {
|
|
|
41
40
|
computeResources: computeResources,
|
|
42
41
|
"designCenter.startYourProject": "Start your project here",
|
|
43
42
|
"designCenter.title": "Design Center",
|
|
44
|
-
"device.CloudKey+": "CloudKey+",
|
|
45
43
|
"device.UDM Pro / SE": "UDM Pro / SE",
|
|
44
|
+
"device.ENVR": "ENVR",
|
|
46
45
|
"device.UDM Pro Max": "UDM Pro Max",
|
|
47
|
-
"device.UDR": "UDR",
|
|
48
|
-
"device.UDW": "UDW",
|
|
49
46
|
"device.UNVR": "UNVR",
|
|
50
47
|
"device.UNVR Pro": "UNVR Pro",
|
|
48
|
+
"device.CloudKey+": "CloudKey+",
|
|
49
|
+
"device.UDW": "UDW",
|
|
50
|
+
"device.UDR": "UDR",
|
|
51
|
+
"device.UDR7": "UDR7",
|
|
52
|
+
"device.UX": "UX",
|
|
53
|
+
"device.EFG": "EFG",
|
|
54
|
+
"device.UCG Max": "UCG Max",
|
|
55
|
+
add: add,
|
|
51
56
|
estimatesMayVary: estimatesMayVary,
|
|
52
57
|
network: network,
|
|
53
58
|
"network.accessPoints": "Access Points",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/components/ResourceCalculatorV1/translations/useResourceCalculatorTranslation.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const useResourceCalculatorTranslation: () => {
|
|
2
|
-
intl: import("@formatjs/intl").IntlShape<"add" | "network" | "protect" | "talk" | "access" | "portCount" | "ports" | "capacityCalculator" | "access.doors" | "addPorts" | "adjustYourDevice" | "assignPoeDevices" | "capacityExceeded" | "category.Access Points" | "category.Cameras" | "category.Connect Display" | "category.Door Access" | "category.Talk" | "cloudKeyNote" | "computeResources" | "designCenter.startYourProject" | "designCenter.title" | "device.
|
|
3
|
-
formatMessage: (id: "add" | "network" | "protect" | "talk" | "access" | "portCount" | "ports" | "capacityCalculator" | "access.doors" | "addPorts" | "adjustYourDevice" | "assignPoeDevices" | "capacityExceeded" | "category.Access Points" | "category.Cameras" | "category.Connect Display" | "category.Door Access" | "category.Talk" | "cloudKeyNote" | "computeResources" | "designCenter.startYourProject" | "designCenter.title" | "device.
|
|
2
|
+
intl: import("@formatjs/intl").IntlShape<"add" | "network" | "protect" | "talk" | "access" | "portCount" | "ports" | "capacityCalculator" | "access.doors" | "addPorts" | "adjustYourDevice" | "assignPoeDevices" | "capacityExceeded" | "category.Access Points" | "category.Cameras" | "category.Connect Display" | "category.Door Access" | "category.Talk" | "cloudKeyNote" | "computeResources" | "designCenter.startYourProject" | "designCenter.title" | "device.UDM Pro / SE" | "device.ENVR" | "device.UDM Pro Max" | "device.UNVR" | "device.UNVR Pro" | "device.CloudKey+" | "device.UDW" | "device.UDR" | "device.UDR7" | "device.UX" | "device.EFG" | "device.UCG Max" | "estimatesMayVary" | "network.accessPoints" | "network.adBlocking" | "network.clientsPerAP" | "network.maxFeaturesNote" | "network.qos" | "network.securityDetections" | "network.vpn" | "notAvailable" | "poeCapacity" | "poeConsumer.AC In-Wall" | "poeConsumer.AC Lite" | "poeConsumer.AC Long-Range" | "poeConsumer.AC Mesh" | "poeConsumer.AC Mesh Pro" | "poeConsumer.AC Pro" | "poeConsumer.AI 360" | "poeConsumer.AI Bullet" | "poeConsumer.AI DSLR" | "poeConsumer.AI DSLR LD" | "poeConsumer.AI Pro" | "poeConsumer.AI Theta" | "poeConsumer.Access Hub" | "poeConsumer.Access Reader G2" | "poeConsumer.Access Reader G2 Pro" | "poeConsumer.Access Reader Lite" | "poeConsumer.Analog Telephone Adapter" | "poeConsumer.Building Bridge" | "poeConsumer.Building Bridge XG" | "poeConsumer.Connect Display" | "poeConsumer.G3 Flex" | "poeConsumer.G4 Bullet" | "poeConsumer.G4 Dome" | "poeConsumer.G4 Doorbell Pro PoE Kit" | "poeConsumer.G4 PTZ" | "poeConsumer.G4 Pro" | "poeConsumer.G5 Bullet" | "poeConsumer.G5 Dome" | "poeConsumer.G5 Flex" | "poeConsumer.G5 Pro" | "poeConsumer.G5 Pro with Enhancer" | "poeConsumer.Phone Touch" | "poeConsumer.Phone Touch Max" | "poeConsumer.Protect Floodlight" | "poeConsumer.Protect Viewport" | "poeConsumer.Swiss Army Knife Ultra" | "poeConsumer.U6 Enterprise" | "poeConsumer.U6 Enterprise In-Wall" | "poeConsumer.U6 In-Wall" | "poeConsumer.U6 Lite" | "poeConsumer.U6 Long-Range" | "poeConsumer.U6 Mesh" | "poeConsumer.U6 Pro" | "poeConsumer.U6+" | "poeConsumer.U7 Pro" | "poeConsumer.WiFi BaseStation XG" | "poeConsumer.empty" | "poePowerBudget" | "poeProvider.8 PoE (Gen1)" | "poeProvider.8 PoE, SFP (Gen1)" | "poeProvider.Enterprise 24 PoE" | "poeProvider.Enterprise 48 PoE" | "poeProvider.Enterprise 8 PoE" | "poeProvider.Flex" | "poeProvider.Industrial" | "poeProvider.Lite 16 PoE" | "poeProvider.Lite 8 PoE" | "poeProvider.Mission Critical" | "poeProvider.Pro 24 PoE" | "poeProvider.Pro 48 PoE" | "poeProvider.Pro 8 PoE" | "poeProvider.Pro Max 24 PoE" | "poeProvider.Pro Max 48 PoE" | "poeProvider.Standard 16 PoE" | "poeProvider.Standard 16 PoE (Gen1)" | "poeProvider.Standard 24 PoE" | "poeProvider.Standard 24 PoE (Gen1)" | "poeProvider.Standard 48 PoE" | "poeProvider.Standard 48 PoE (Gen1)" | "poeProvider.Ultra" | "poeProvider.Ultra 210W" | "poeProvider.Ultra 60W" | "poeProvider.XG 6 PoE (Gen1)" | "protect.2kCameras" | "protect.4kCameras" | "protect.CkG2PlusNote" | "protect.DreamWallNote" | "protect.days" | "protect.hdCameras" | "protect.noStorage" | "protect.storageDriveSize" | "protect.storageProtection" | "recommendedPoeSwitches" | "removePorts" | "requirements" | "showLess" | "showMore" | "systemCapacity" | "talk.callRecording" | "talk.phones" | "watts">;
|
|
3
|
+
formatMessage: (id: "add" | "network" | "protect" | "talk" | "access" | "portCount" | "ports" | "capacityCalculator" | "access.doors" | "addPorts" | "adjustYourDevice" | "assignPoeDevices" | "capacityExceeded" | "category.Access Points" | "category.Cameras" | "category.Connect Display" | "category.Door Access" | "category.Talk" | "cloudKeyNote" | "computeResources" | "designCenter.startYourProject" | "designCenter.title" | "device.UDM Pro / SE" | "device.ENVR" | "device.UDM Pro Max" | "device.UNVR" | "device.UNVR Pro" | "device.CloudKey+" | "device.UDW" | "device.UDR" | "device.UDR7" | "device.UX" | "device.EFG" | "device.UCG Max" | "estimatesMayVary" | "network.accessPoints" | "network.adBlocking" | "network.clientsPerAP" | "network.maxFeaturesNote" | "network.qos" | "network.securityDetections" | "network.vpn" | "notAvailable" | "poeCapacity" | "poeConsumer.AC In-Wall" | "poeConsumer.AC Lite" | "poeConsumer.AC Long-Range" | "poeConsumer.AC Mesh" | "poeConsumer.AC Mesh Pro" | "poeConsumer.AC Pro" | "poeConsumer.AI 360" | "poeConsumer.AI Bullet" | "poeConsumer.AI DSLR" | "poeConsumer.AI DSLR LD" | "poeConsumer.AI Pro" | "poeConsumer.AI Theta" | "poeConsumer.Access Hub" | "poeConsumer.Access Reader G2" | "poeConsumer.Access Reader G2 Pro" | "poeConsumer.Access Reader Lite" | "poeConsumer.Analog Telephone Adapter" | "poeConsumer.Building Bridge" | "poeConsumer.Building Bridge XG" | "poeConsumer.Connect Display" | "poeConsumer.G3 Flex" | "poeConsumer.G4 Bullet" | "poeConsumer.G4 Dome" | "poeConsumer.G4 Doorbell Pro PoE Kit" | "poeConsumer.G4 PTZ" | "poeConsumer.G4 Pro" | "poeConsumer.G5 Bullet" | "poeConsumer.G5 Dome" | "poeConsumer.G5 Flex" | "poeConsumer.G5 Pro" | "poeConsumer.G5 Pro with Enhancer" | "poeConsumer.Phone Touch" | "poeConsumer.Phone Touch Max" | "poeConsumer.Protect Floodlight" | "poeConsumer.Protect Viewport" | "poeConsumer.Swiss Army Knife Ultra" | "poeConsumer.U6 Enterprise" | "poeConsumer.U6 Enterprise In-Wall" | "poeConsumer.U6 In-Wall" | "poeConsumer.U6 Lite" | "poeConsumer.U6 Long-Range" | "poeConsumer.U6 Mesh" | "poeConsumer.U6 Pro" | "poeConsumer.U6+" | "poeConsumer.U7 Pro" | "poeConsumer.WiFi BaseStation XG" | "poeConsumer.empty" | "poePowerBudget" | "poeProvider.8 PoE (Gen1)" | "poeProvider.8 PoE, SFP (Gen1)" | "poeProvider.Enterprise 24 PoE" | "poeProvider.Enterprise 48 PoE" | "poeProvider.Enterprise 8 PoE" | "poeProvider.Flex" | "poeProvider.Industrial" | "poeProvider.Lite 16 PoE" | "poeProvider.Lite 8 PoE" | "poeProvider.Mission Critical" | "poeProvider.Pro 24 PoE" | "poeProvider.Pro 48 PoE" | "poeProvider.Pro 8 PoE" | "poeProvider.Pro Max 24 PoE" | "poeProvider.Pro Max 48 PoE" | "poeProvider.Standard 16 PoE" | "poeProvider.Standard 16 PoE (Gen1)" | "poeProvider.Standard 24 PoE" | "poeProvider.Standard 24 PoE (Gen1)" | "poeProvider.Standard 48 PoE" | "poeProvider.Standard 48 PoE (Gen1)" | "poeProvider.Ultra" | "poeProvider.Ultra 210W" | "poeProvider.Ultra 60W" | "poeProvider.XG 6 PoE (Gen1)" | "protect.2kCameras" | "protect.4kCameras" | "protect.CkG2PlusNote" | "protect.DreamWallNote" | "protect.days" | "protect.hdCameras" | "protect.noStorage" | "protect.storageDriveSize" | "protect.storageProtection" | "recommendedPoeSwitches" | "removePorts" | "requirements" | "showLess" | "showMore" | "systemCapacity" | "talk.callRecording" | "talk.phones" | "watts", values?: {
|
|
4
4
|
[x: string]: import("intl-messageformat").PrimitiveType | import("intl-messageformat").FormatXMLElementFn<string, string>;
|
|
5
5
|
}) => string;
|
|
6
6
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ScrollWrapperProps } from "./ScrollWrapper.types";
|
|
2
|
-
export declare const ScrollWrapper: ({ align, direction, items, fillType, fillColor, accentColor, arrowColor, scrollStepType, gap, className, arrowFadeColor, activeIndex, circleArrowBackground, arrowGap, gradientSize, hideArrows, onScrollChange, enableWheelScroll, arrowIcon, }: ScrollWrapperProps) => JSX.Element;
|
|
2
|
+
export declare const ScrollWrapper: ({ align, direction, items, fillType, fillColor, accentColor, arrowColor, scrollStepType, gap, className, arrowFadeColor, activeIndex, circleArrowBackground, arrowGap, gradientSize, hideArrows, onScrollChange, enableWheelScroll, arrowIcon, alignActive, disableScrollToActive, }: ScrollWrapperProps) => JSX.Element;
|
|
@@ -35,7 +35,9 @@ const ScrollWrapper = function ScrollWrapper2({
|
|
|
35
35
|
hideArrows,
|
|
36
36
|
onScrollChange,
|
|
37
37
|
enableWheelScroll,
|
|
38
|
-
arrowIcon
|
|
38
|
+
arrowIcon,
|
|
39
|
+
alignActive = "center",
|
|
40
|
+
disableScrollToActive
|
|
39
41
|
}) {
|
|
40
42
|
const containerRef = react.useRef(null);
|
|
41
43
|
const [containerMeasureRef, containerSize] = reactUse.useMeasure();
|
|
@@ -141,10 +143,16 @@ const ScrollWrapper = function ScrollWrapper2({
|
|
|
141
143
|
if (actNav) {
|
|
142
144
|
const actNavRect = actNav.getBoundingClientRect();
|
|
143
145
|
if (direction === "horizontal") {
|
|
144
|
-
if (
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
if (alignActive === "left") {
|
|
147
|
+
if (actNavRect.left < containerRect.left || actNavRect.right > containerRect.right) {
|
|
148
|
+
offset.left = actNavRect.left - containerRect.left + containerRef.current.scrollLeft;
|
|
149
|
+
}
|
|
150
|
+
} else {
|
|
151
|
+
if (actNavRect.right > containerRect.right) {
|
|
152
|
+
offset.left = actNavRect.right - containerRect.right + containerRef.current.scrollLeft + (!hideArrows ? ScrollWrapper_styles.FADE_BUTTON_SIZE : 0) + containerRect.width / 2 - actNavRect.width / 2;
|
|
153
|
+
} else if (actNavRect.left < containerRect.left) {
|
|
154
|
+
offset.left = actNavRect.left - containerRect.left + containerRef.current.scrollLeft - (!hideArrows ? ScrollWrapper_styles.FADE_BUTTON_SIZE : 0) - containerRect.width / 2 + actNavRect.width / 2;
|
|
155
|
+
}
|
|
148
156
|
}
|
|
149
157
|
} else if (direction === "vertical") {
|
|
150
158
|
if (actNavRect.bottom > containerRect.bottom) {
|
|
@@ -155,7 +163,7 @@ const ScrollWrapper = function ScrollWrapper2({
|
|
|
155
163
|
}
|
|
156
164
|
}
|
|
157
165
|
return offset;
|
|
158
|
-
}, [direction, hideArrows]);
|
|
166
|
+
}, [direction, alignActive, hideArrows]);
|
|
159
167
|
const {
|
|
160
168
|
x: refScrollX,
|
|
161
169
|
y: refScrollY
|
|
@@ -271,7 +279,7 @@ const ScrollWrapper = function ScrollWrapper2({
|
|
|
271
279
|
}, [direction, scrollX, scrollY, scrollStepType, gap, getContainerItemWidth, getVisibleItemsWidth, getInvisibleItemOffset]);
|
|
272
280
|
react.useEffect(() => {
|
|
273
281
|
window.setTimeout(() => {
|
|
274
|
-
if (!containerRef.current) return;
|
|
282
|
+
if (!containerRef.current || disableScrollToActive) return;
|
|
275
283
|
if (activeIndex !== void 0 && activeIndex > -1) {
|
|
276
284
|
const offset = getActiveIndexOffset(activeIndex);
|
|
277
285
|
if (offset.left !== void 0) {
|
|
@@ -288,7 +296,7 @@ const ScrollWrapper = function ScrollWrapper2({
|
|
|
288
296
|
});
|
|
289
297
|
}
|
|
290
298
|
}, 0);
|
|
291
|
-
}, [activeIndex, getActiveIndexOffset]);
|
|
299
|
+
}, [activeIndex, getActiveIndexOffset, disableScrollToActive]);
|
|
292
300
|
const arrowIconSrc = react.useMemo(() => {
|
|
293
301
|
const icon = arrowIcon?.icon ?? ArrowRightIcon__default["default"];
|
|
294
302
|
return typeof icon === "string" ? icon : icon.src;
|