@ubnt/store.core 9.16.0 → 9.17.0-alpha.1
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 +144 -0
- package/lib/_virtual/_virtual_multi-entry.js +27 -12
- package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
- package/lib/_virtual/_virtual_multi-entry.mjs +14 -10
- package/lib/_virtual/_virtual_multi-entry.mjs.map +1 -1
- package/lib/assets/attention.svg +5 -5
- package/lib/assets/attention2.svg +5 -5
- package/lib/assets/efg.png +0 -0
- package/lib/assets/icon-location-pin.svg +5 -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/minus4.svg +8 -8
- package/lib/assets/minus5.svg +8 -8
- package/lib/assets/ucg-max.png +0 -0
- package/lib/assets/ucgMax.jpg +0 -0
- package/lib/assets/ucgMax2.jpg +0 -0
- package/lib/assets/ucgUltra.jpg +0 -0
- package/lib/assets/ucgUltra2.jpg +0 -0
- package/lib/components/CategoryTabs/CategoryTabs.types.d.ts +1 -1
- package/lib/components/CustomImage/CustomImage.js.map +1 -1
- package/lib/components/CustomImage/CustomImage.mjs.map +1 -1
- package/lib/components/Header/AccountMenu/megaphone.http.service.js +1 -1
- package/lib/components/Header/AccountMenu/megaphone.http.service.js.map +1 -1
- package/lib/components/Header/AccountMenu/megaphone.http.service.mjs +1 -1
- package/lib/components/Header/AccountMenu/megaphone.http.service.mjs.map +1 -1
- package/lib/components/Header/Header.types.d.ts +8 -4
- 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/MenuItem/MenuItem.styles.d.ts +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.js +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.js.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.mjs +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMenu/ProMenu.d.ts +2 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.js +109 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.js.map +1 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.mjs +87 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.mjs.map +1 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.d.ts +24 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.js +154 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.js.map +1 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.mjs +138 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.mjs.map +1 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.types.d.ts +13 -0
- package/lib/components/Header/Navigation/ProMenu/index.d.ts +1 -0
- package/lib/components/Header/Navigation/ProMenu/index.js +6 -0
- package/lib/components/{ResourceCalculatorV1/components → Header/Navigation/ProMenu}/index.js.map +1 -1
- package/lib/components/Header/Navigation/ProMenu/index.mjs +3 -0
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.d.ts +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js +130 -63
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs +111 -64
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.d.ts +6 -0
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js +11 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs +10 -2
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.types.d.ts +5 -1
- package/lib/components/Header/ProHeader/ProHeader.d.ts +2 -4
- package/lib/components/Header/ProHeader/ProHeader.js +138 -36
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +139 -39
- package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +3 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.js +18 -13
- package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs +17 -14
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
- package/lib/components/Header/translations/en.json.js +4 -1
- package/lib/components/Header/translations/en.json.js.map +1 -1
- package/lib/components/Header/translations/en.json.mjs +4 -2
- package/lib/components/Header/translations/en.json.mjs.map +1 -1
- package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.d.ts +1 -1
- package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.js +3 -1
- package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.js.map +1 -0
- package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.mjs +3 -1
- package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.mjs.map +1 -0
- package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.styles.d.ts +1 -0
- package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.styles.js +10 -7
- package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.js.map +1 -0
- package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.styles.mjs +10 -7
- package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.mjs.map +1 -0
- package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.types.d.ts +1 -0
- package/lib/components/LandingPagePro/LandingPagePro.d.ts +3 -0
- package/lib/components/LandingPagePro/LandingPagePro.js +3 -3
- package/lib/components/LandingPagePro/LandingPagePro.js.map +1 -1
- package/lib/components/LandingPagePro/LandingPagePro.mjs +2 -2
- package/lib/components/LandingPagePro/LandingPagePro.mjs.map +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgMax.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgUltra.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgUltra.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/ucgMax.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/ucgMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/ucgUltra.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/ucgUltra.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/data/CloudGateways.js +6 -6
- package/lib/components/ModelCompareV3/data/CloudGateways.mjs +4 -4
- package/lib/components/ModelCompareV3/data/products/ucgMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs +1 -1
- package/lib/components/NormalisedImage/NormalisedImage.js.map +1 -1
- package/lib/components/NormalisedImage/NormalisedImage.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js +313 -17
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs +311 -17
- 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 +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.js +2 -0
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.mjs +2 -0
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.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/InputCard/assets/minus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.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/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js +3 -3
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs +3 -3
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ResourceCalculator.js +1 -2
- package/lib/components/ResourceCalculatorV1/ResourceCalculator.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ResourceCalculator.mjs +1 -2
- package/lib/components/ResourceCalculatorV1/ResourceCalculator.mjs.map +1 -1
- package/lib/{assets/icons/menu/icon-globe.svg.js → components/ResourceCalculatorV1/assets/consoles/efg.png.js} +6 -6
- package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.js.map +1 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.mjs +3 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/efg.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 +6 -4
- package/lib/components/ResourceCalculatorV1/translations/en.json.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/translations/en.json.mjs +6 -4
- package/lib/components/ResourceCalculatorV1/translations/en.json.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/translations/useResourceCalculatorTranslation.d.ts +2 -2
- package/lib/components/StyleableSvgImage/StyleableSvgImage.js.map +1 -1
- package/lib/components/StyleableSvgImage/StyleableSvgImage.mjs.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +2 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/index.mjs +2 -0
- package/lib/components/index.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.d.ts +1 -0
- package/lib/constants/proStoreCategories/mapping/index.js +15 -10
- package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.mjs +15 -10
- package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.d.ts +2 -1
- package/lib/constants/proStoreCategories/mapping/unifi.js +1 -0
- package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.mjs +1 -0
- package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.js +3 -0
- package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs +3 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.js +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.mjs +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +1 -1
- package/lib/contexts/MenuContext/context.js +1 -1
- package/lib/contexts/MenuContext/context.js.map +1 -1
- package/lib/contexts/MenuContext/context.mjs +1 -1
- package/lib/contexts/MenuContext/context.mjs.map +1 -1
- package/lib/helpers/index.d.ts +1 -0
- package/lib/helpers/index.js +11 -0
- package/lib/helpers/index.js.map +1 -1
- package/lib/helpers/index.mjs +1 -0
- package/lib/helpers/index.mjs.map +1 -1
- package/lib/helpers/product.d.ts +87 -0
- package/lib/helpers/product.js +346 -0
- package/lib/helpers/product.js.map +1 -0
- package/lib/helpers/product.mjs +335 -0
- package/lib/helpers/product.mjs.map +1 -0
- package/lib/helpers/ux.d.ts +1 -1
- package/lib/helpers/ux.js.map +1 -1
- package/lib/helpers/ux.mjs.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +2 -0
- package/lib/types/index.js.map +1 -1
- package/lib/types/index.mjs +1 -0
- package/lib/types/index.mjs.map +1 -1
- package/lib/types/product.d.ts +87 -0
- package/lib/types/product.js +14 -0
- package/lib/types/product.js.map +1 -0
- package/lib/types/product.mjs +13 -0
- package/lib/types/product.mjs.map +1 -0
- package/lib/utils/array.d.ts +4 -0
- package/lib/utils/array.js +10 -0
- package/lib/utils/array.js.map +1 -1
- package/lib/utils/array.mjs +10 -1
- package/lib/utils/array.mjs.map +1 -1
- package/lib/utils/money/allocators/fixedAmount.d.ts +26 -0
- package/lib/utils/money/allocators/fixedAmount.js +55 -0
- package/lib/utils/money/allocators/fixedAmount.js.map +1 -0
- package/lib/utils/money/allocators/fixedAmount.mjs +53 -0
- package/lib/utils/money/allocators/fixedAmount.mjs.map +1 -0
- package/lib/utils/money/allocators/index.d.ts +2 -0
- package/lib/utils/money/allocators/index.js +8 -0
- package/lib/utils/money/allocators/index.js.map +1 -0
- package/lib/utils/money/allocators/index.mjs +4 -0
- package/lib/utils/money/allocators/index.mjs.map +1 -0
- package/lib/utils/money/allocators/productAmount.d.ts +13 -0
- package/lib/utils/money/allocators/productAmount.js +110 -0
- package/lib/utils/money/allocators/productAmount.js.map +1 -0
- package/lib/utils/money/allocators/productAmount.mjs +108 -0
- package/lib/utils/money/allocators/productAmount.mjs.map +1 -0
- package/lib/utils/money/constants.d.ts +56 -25
- package/lib/utils/money/constants.js +72 -7
- package/lib/utils/money/constants.js.map +1 -1
- package/lib/utils/money/constants.mjs +70 -7
- package/lib/utils/money/constants.mjs.map +1 -1
- package/lib/utils/money/exchangeRate.d.ts +31 -0
- package/lib/utils/money/exchangeRate.js +27 -0
- package/lib/utils/money/exchangeRate.js.map +1 -0
- package/lib/utils/money/exchangeRate.mjs +23 -0
- package/lib/utils/money/exchangeRate.mjs.map +1 -0
- package/lib/utils/money/format.d.ts +10 -5
- package/lib/utils/money/format.js +22 -14
- package/lib/utils/money/format.js.map +1 -1
- package/lib/utils/money/format.mjs +23 -16
- package/lib/utils/money/format.mjs.map +1 -1
- package/lib/utils/money/index.d.ts +4 -1
- package/lib/utils/money/index.js +26 -8
- package/lib/utils/money/index.js.map +1 -1
- package/lib/utils/money/index.mjs +8 -4
- package/lib/utils/money/index.mjs.map +1 -1
- package/lib/utils/money/misc.d.ts +68 -28
- package/lib/utils/money/misc.js +35 -64
- package/lib/utils/money/misc.js.map +1 -1
- package/lib/utils/money/misc.mjs +32 -43
- package/lib/utils/money/misc.mjs.map +1 -1
- package/lib/utils/money/misc.private.d.ts +23 -0
- package/lib/utils/money/misc.private.js +46 -0
- package/lib/utils/money/misc.private.js.map +1 -0
- package/lib/utils/money/misc.private.mjs +21 -0
- package/lib/utils/money/misc.private.mjs.map +1 -0
- package/lib/utils/money/shipping.d.ts +5 -0
- package/lib/utils/money/shipping.js +8 -0
- package/lib/utils/money/shipping.js.map +1 -0
- package/lib/utils/money/shipping.mjs +6 -0
- package/lib/utils/money/shipping.mjs.map +1 -0
- package/lib/utils/money/tax.d.ts +38 -2
- package/lib/utils/money/tax.js +46 -10
- package/lib/utils/money/tax.js.map +1 -1
- package/lib/utils/money/tax.mjs +42 -11
- package/lib/utils/money/tax.mjs.map +1 -1
- package/lib/utils/money/tax.private.d.ts +17 -0
- package/lib/utils/money/tax.private.js +65 -0
- package/lib/utils/money/tax.private.js.map +1 -0
- package/lib/utils/money/tax.private.mjs +60 -0
- package/lib/utils/money/tax.private.mjs.map +1 -0
- package/lib/utils/money/types.d.ts +78 -3
- package/lib/utils/number.d.ts +1 -1
- package/lib/utils/number.js +1 -1
- package/lib/utils/number.js.map +1 -1
- package/lib/utils/number.mjs +1 -1
- package/lib/utils/number.mjs.map +1 -1
- package/lib/utils/productSort.d.ts +41 -0
- package/lib/utils/productSort.js +66 -0
- package/lib/utils/productSort.js.map +1 -0
- package/lib/utils/productSort.mjs +59 -0
- package/lib/utils/productSort.mjs.map +1 -0
- package/package.json +1 -1
- package/lib/assets/icons/menu/icon-globe.svg.js.map +0 -1
- package/lib/assets/icons/menu/icon-globe.svg.mjs +0 -3
- package/lib/assets/icons/menu/icon-globe.svg.mjs.map +0 -1
- package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.js.map +0 -1
- package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.mjs.map +0 -1
- package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.js.map +0 -1
- package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.mjs.map +0 -1
- package/lib/components/ResourceCalculatorV1/components/index.d.ts +0 -1
- package/lib/components/ResourceCalculatorV1/components/index.js +0 -5
- package/lib/components/ResourceCalculatorV1/components/index.mjs +0 -3
- package/lib/utils/validations.d.ts +0 -15
- package/lib/utils/validations.js +0 -23
- package/lib/utils/validations.js.map +0 -1
- package/lib/utils/validations.mjs +0 -21
- package/lib/utils/validations.mjs.map +0 -1
- /package/lib/components/{ResourceCalculatorV1/components → Header/Navigation/ProMenu}/index.mjs.map +0 -0
- /package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/index.d.ts +0 -0
- /package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/index.js +0 -0
- /package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/index.js.map +0 -0
- /package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/index.mjs +0 -0
- /package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/index.mjs.map +0 -0
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { useState, useCallback, useMemo } from 'react';
|
|
3
|
-
import '../../../../assets/icons/menu/icon-globe.svg.mjs';
|
|
4
3
|
import '../../../../assets/icons/menu/icon-history.svg.mjs';
|
|
4
|
+
import '../../../../assets/icons/menu/icon-location-pin.svg.mjs';
|
|
5
5
|
import '../../../../constants/icons/index.mjs';
|
|
6
6
|
import '../../../../contexts/MenuContext/index.mjs';
|
|
7
|
+
import '../../../../hooks/index.mjs';
|
|
8
|
+
import '../../../../types/index.mjs';
|
|
9
|
+
import { imageSrc } from '../../../../utils/asset.mjs';
|
|
7
10
|
import { useFooterContent } from '../../../Footer/hooks/useFooterContent.mjs';
|
|
8
11
|
import '../../../StyleableSvgImage/index.mjs';
|
|
9
12
|
import { getSupportLinkMapping } from '../../LinksModal/mapping.mjs';
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
13
|
+
import '../../translations/index.mjs';
|
|
14
|
+
import { NewLabel, Wrap, Container, InnerWrap, Section, SectionItemsGroup, SectionItem, SectionItemArrowButton, ButtonIcon } from '../MobileMenu/MobileMenu.styles.mjs';
|
|
15
|
+
import { SectionItemIcon, ProSectionItemButton, ButtonContent, ButtonGroup, CustomButton } from './ProMobileMenu.styles.mjs';
|
|
16
|
+
import { useTranslation } from '../../../../hooks/useTranslation.mjs';
|
|
17
|
+
import EN_TRANSLATION from '../../translations/en.json.mjs';
|
|
18
|
+
import { Language } from '../../../../types/constants.mjs';
|
|
12
19
|
import { useMenu } from '../../../../contexts/MenuContext/context.mjs';
|
|
13
20
|
import HistoryIcon__default from "../../../../assets/icon-history.svg";
|
|
14
|
-
import
|
|
21
|
+
import LocationPinIcon__default from "../../../../assets/icon-location-pin.svg";
|
|
15
22
|
import { StyleableSvgImage } from '../../../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
16
23
|
import _externalAssets_BAXELvSy__default from "../../../../assets/collapseArrow.svg";
|
|
17
24
|
"use strict";
|
|
25
|
+
const motif = "light";
|
|
18
26
|
const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
19
27
|
translations,
|
|
20
28
|
onClose,
|
|
@@ -26,9 +34,26 @@ const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
|
26
34
|
handleProductLineChange,
|
|
27
35
|
productLineValue,
|
|
28
36
|
productLineOptions,
|
|
29
|
-
extraSectionItems
|
|
37
|
+
extraSectionItems,
|
|
38
|
+
inlineCategoryTabs
|
|
30
39
|
}) {
|
|
31
|
-
const
|
|
40
|
+
const {
|
|
41
|
+
formatMessage
|
|
42
|
+
} = useTranslation({
|
|
43
|
+
defaultTranslation: EN_TRANSLATION,
|
|
44
|
+
additionalTranslations: {
|
|
45
|
+
[Language.Ja]: () => import('../../translations/ja.json.mjs').then(res => res.default),
|
|
46
|
+
[Language.Ar]: () => import('../../translations/ar.json.mjs').then(res => res.default),
|
|
47
|
+
[Language.De]: () => import('../../translations/de.json.mjs').then(res => res.default),
|
|
48
|
+
[Language.Es]: () => import('../../translations/es.json.mjs').then(res => res.default),
|
|
49
|
+
[Language.El]: () => import('../../translations/el.json.mjs').then(res => res.default),
|
|
50
|
+
[Language.It]: () => import('../../translations/it.json.mjs').then(res => res.default),
|
|
51
|
+
[Language.Pt]: () => import('../../translations/pt-BR.json.mjs').then(res => res.default),
|
|
52
|
+
[Language.Zh]: () => import('../../translations/zh-Hans.json.mjs').then(res => res.default),
|
|
53
|
+
[Language.Fr]: () => import('../../translations/fr.json.mjs').then(res => res.default),
|
|
54
|
+
[Language.Tw]: () => import('../../translations/zh-Hant-TW.json.mjs').then(res => res.default)
|
|
55
|
+
}
|
|
56
|
+
});
|
|
32
57
|
const {
|
|
33
58
|
footerContent,
|
|
34
59
|
socialContent
|
|
@@ -47,7 +72,7 @@ const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
|
47
72
|
id: "order-history",
|
|
48
73
|
label: translations.orderHistory,
|
|
49
74
|
icon: {
|
|
50
|
-
src:
|
|
75
|
+
src: imageSrc(HistoryIcon__default),
|
|
51
76
|
width: 16,
|
|
52
77
|
height: 16
|
|
53
78
|
},
|
|
@@ -59,7 +84,7 @@ const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
|
59
84
|
id: "purchased-product-history",
|
|
60
85
|
label: translations.purchasedProductHistory,
|
|
61
86
|
icon: {
|
|
62
|
-
src:
|
|
87
|
+
src: imageSrc(HistoryIcon__default),
|
|
63
88
|
width: 16,
|
|
64
89
|
height: 16
|
|
65
90
|
},
|
|
@@ -86,55 +111,24 @@ const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
|
86
111
|
// subItems: [],
|
|
87
112
|
// },
|
|
88
113
|
]
|
|
89
|
-
}, {
|
|
90
|
-
id: "
|
|
91
|
-
items:
|
|
92
|
-
id:
|
|
93
|
-
label:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}, {
|
|
101
|
-
id: "social",
|
|
102
|
-
label: translations.social,
|
|
103
|
-
url: null,
|
|
104
|
-
subItems: socialContent.items.map(item => ({
|
|
105
|
-
id: item.id,
|
|
106
|
-
label: item.label,
|
|
107
|
-
url: item.src
|
|
108
|
-
}))
|
|
109
|
-
}, ...[{
|
|
110
|
-
key: "company",
|
|
111
|
-
label: translations.company
|
|
112
|
-
}, {
|
|
113
|
-
key: "training",
|
|
114
|
-
label: translations.training
|
|
115
|
-
}, {
|
|
116
|
-
key: "tools",
|
|
117
|
-
label: translations.tools
|
|
118
|
-
}].map(({
|
|
119
|
-
key,
|
|
120
|
-
label
|
|
121
|
-
}) => ({
|
|
122
|
-
id: key,
|
|
123
|
-
label,
|
|
124
|
-
url: null,
|
|
125
|
-
subItems: footerContent[key].items.map(item => ({
|
|
126
|
-
id: item.id,
|
|
127
|
-
label: item.label,
|
|
128
|
-
url: item.src
|
|
129
|
-
}))
|
|
130
|
-
}))]
|
|
131
|
-
}, currentCountryName ? {
|
|
114
|
+
}, inlineCategoryTabs ? {
|
|
115
|
+
id: "categories",
|
|
116
|
+
items: inlineCategoryTabs.categories.map(category => ({
|
|
117
|
+
id: category.id,
|
|
118
|
+
label:
|
|
119
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
120
|
+
formatMessage(category.id) ?? category.label,
|
|
121
|
+
url: category.href ?? null,
|
|
122
|
+
subItems: []
|
|
123
|
+
}))
|
|
124
|
+
} : null, currentCountryName ? {
|
|
132
125
|
id: "country-selector",
|
|
133
126
|
items: [{
|
|
134
127
|
id: "current-country-name",
|
|
135
|
-
label:
|
|
128
|
+
label: translations.region,
|
|
129
|
+
value: currentCountryName,
|
|
136
130
|
icon: {
|
|
137
|
-
src:
|
|
131
|
+
src: imageSrc(LocationPinIcon__default),
|
|
138
132
|
width: 17,
|
|
139
133
|
height: 17
|
|
140
134
|
},
|
|
@@ -143,9 +137,51 @@ const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
|
143
137
|
},
|
|
144
138
|
subItems: []
|
|
145
139
|
}]
|
|
146
|
-
} : null
|
|
140
|
+
} : null, ...(extraSectionItems ?? [{
|
|
141
|
+
id: "support",
|
|
142
|
+
label: translations.support,
|
|
143
|
+
url: null,
|
|
144
|
+
subItems: getSupportLinkMapping(context).map(item => ({
|
|
145
|
+
id: item.id,
|
|
146
|
+
label: item.name,
|
|
147
|
+
url: item.url
|
|
148
|
+
}))
|
|
149
|
+
}, {
|
|
150
|
+
id: "social",
|
|
151
|
+
label: translations.social,
|
|
152
|
+
url: null,
|
|
153
|
+
subItems: socialContent.items.map(item => ({
|
|
154
|
+
id: item.id,
|
|
155
|
+
label: item.label,
|
|
156
|
+
url: item.src
|
|
157
|
+
}))
|
|
158
|
+
}, ...[{
|
|
159
|
+
key: "company",
|
|
160
|
+
label: translations.company
|
|
161
|
+
}, {
|
|
162
|
+
key: "training",
|
|
163
|
+
label: translations.training
|
|
164
|
+
}, {
|
|
165
|
+
key: "tools",
|
|
166
|
+
label: translations.tools
|
|
167
|
+
}].map(({
|
|
168
|
+
key,
|
|
169
|
+
label
|
|
170
|
+
}) => ({
|
|
171
|
+
id: key,
|
|
172
|
+
label,
|
|
173
|
+
url: null,
|
|
174
|
+
subItems: footerContent[key].items.map(item => ({
|
|
175
|
+
id: item.id,
|
|
176
|
+
label: item.label,
|
|
177
|
+
url: item.src
|
|
178
|
+
}))
|
|
179
|
+
}))]).map(item => ({
|
|
180
|
+
id: `extra-${item.id}`,
|
|
181
|
+
items: [item]
|
|
182
|
+
}))];
|
|
147
183
|
return _sections.filter(el => !!el);
|
|
148
|
-
}, [
|
|
184
|
+
}, [handleOrderHistoryClick, translations.orderHistory, translations.purchasedProductHistory, translations.support, translations.social, translations.company, translations.training, translations.tools, translations.region, handlePurchaseHistoryClick, inlineCategoryTabs, extraSectionItems, context, socialContent.items, currentCountryName, formatMessage, footerContent, handleStorePickerClick]);
|
|
149
185
|
const renderSectionItemIcon = useCallback(item => {
|
|
150
186
|
return item.icon && /* @__PURE__ */jsx(SectionItemIcon, {
|
|
151
187
|
children: /* @__PURE__ */jsx(StyleableSvgImage, {
|
|
@@ -160,34 +196,45 @@ const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
|
160
196
|
const NewLabelNode = "isNew" in item && item.isNew ? /* @__PURE__ */jsx(NewLabel, {
|
|
161
197
|
children: translations.new
|
|
162
198
|
}) : null;
|
|
199
|
+
const ValueNode = !!item.value && /* @__PURE__ */jsx("div", {
|
|
200
|
+
children: item.value
|
|
201
|
+
});
|
|
163
202
|
const target = "targetBlank" in item && item.targetBlank ? "_blank" : void 0;
|
|
164
203
|
const url = item.url;
|
|
165
204
|
if (!url) {
|
|
166
|
-
return /* @__PURE__ */jsxs(
|
|
205
|
+
return /* @__PURE__ */jsxs(ProSectionItemButton, {
|
|
167
206
|
motif,
|
|
168
207
|
onClick: () => toggleExpandedSectionItemId(item.id),
|
|
169
|
-
children: [
|
|
208
|
+
children: [/* @__PURE__ */jsxs(ButtonContent, {
|
|
209
|
+
children: [IconNode, item.label]
|
|
210
|
+
}), ValueNode]
|
|
170
211
|
});
|
|
171
212
|
}
|
|
172
|
-
if (typeof url === "string") {
|
|
173
|
-
|
|
213
|
+
if (typeof url === "string" || typeof url === "object") {
|
|
214
|
+
const href = typeof url === "string" ? url : void 0;
|
|
215
|
+
const anchor = /* @__PURE__ */jsxs(ProSectionItemButton, {
|
|
174
216
|
motif,
|
|
175
217
|
as: "a",
|
|
176
|
-
href
|
|
218
|
+
href,
|
|
177
219
|
onClick: onClose,
|
|
178
220
|
target,
|
|
179
|
-
children: [
|
|
221
|
+
children: [/* @__PURE__ */jsxs(ButtonContent, {
|
|
222
|
+
children: [IconNode, item.label, NewLabelNode]
|
|
223
|
+
}), ValueNode]
|
|
180
224
|
});
|
|
225
|
+
return inlineCategoryTabs?.renderLink?.(anchor) ?? anchor;
|
|
181
226
|
}
|
|
182
|
-
return /* @__PURE__ */jsxs(
|
|
227
|
+
return /* @__PURE__ */jsxs(ProSectionItemButton, {
|
|
183
228
|
motif,
|
|
184
229
|
onClick: () => {
|
|
185
230
|
url();
|
|
186
231
|
onClose();
|
|
187
232
|
},
|
|
188
|
-
children: [
|
|
233
|
+
children: [/* @__PURE__ */jsxs(ButtonContent, {
|
|
234
|
+
children: [IconNode, item.label]
|
|
235
|
+
}), ValueNode]
|
|
189
236
|
});
|
|
190
|
-
}, [onClose, renderSectionItemIcon, toggleExpandedSectionItemId, translations.new]);
|
|
237
|
+
}, [inlineCategoryTabs, onClose, renderSectionItemIcon, toggleExpandedSectionItemId, translations.new]);
|
|
191
238
|
return /* @__PURE__ */jsx(Wrap, {
|
|
192
239
|
motif,
|
|
193
240
|
children: /* @__PURE__ */jsx(Container, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProMobileMenu.mjs","sources":["../../../../../src/components/Header/Navigation/ProMobileMenu/ProMobileMenu.tsx"],"sourcesContent":["/* eslint-disable @next/next/no-img-element */\nimport type { Motif } from \"@ubnt/ui-components/utils\";\nimport { useCallback, useMemo, useState } from \"react\";\n\n// import EAIcon from \"../../../../assets/icons/menu/icon-ea.svg\";\nimport GlobeIcon from \"../../../../assets/icons/menu/icon-globe.svg\";\nimport HistoryIcon from \"../../../../assets/icons/menu/icon-history.svg\";\nimport * as icons from \"../../../../constants/icons\";\nimport { useMenu } from \"../../../../contexts/MenuContext\";\nimport { useFooterContent } from \"../../../Footer/hooks/useFooterContent\";\nimport { StyleableSvgImage } from \"../../../StyleableSvgImage\";\nimport { getSupportLinkMapping } from \"../../LinksModal/mapping\";\nimport * as S from \"../MobileMenu/MobileMenu.styles\";\nimport * as S2 from \"./ProMobileMenu.styles\";\nimport type {\n NavigationProMobileMenuProps,\n ProMobileMenuSection,\n ProMobileMenuSectionItem,\n ProMobileMenuSectionSubItem,\n} from \"./ProMobileMenu.types\";\n\nexport const NavigationProMobileMenu = function NavigationProMobileMenu({\n translations,\n onClose,\n currentCountryName,\n handleStorePickerClick,\n // handleEarlyAccessClick,\n handleOrderHistoryClick,\n handlePurchaseHistoryClick,\n handleProductLineChange,\n productLineValue,\n productLineOptions,\n extraSectionItems,\n}: NavigationProMobileMenuProps) {\n const motif: Motif = \"light\";\n\n const { footerContent, socialContent } = useFooterContent();\n const { context } = useMenu();\n\n // #############################################################################\n // Section toggling\n // #############################################################################\n const [expandedSectionItemId, setExpandedSectionItemId] = useState<\n string | null\n >(null);\n\n const toggleExpandedSectionItemId = useCallback(\n (itemId: string) => {\n setExpandedSectionItemId(\n expandedSectionItemId === itemId ? null : itemId,\n );\n },\n [expandedSectionItemId],\n );\n\n // #############################################################################\n // Menu sections\n // #############################################################################\n const sections = useMemo((): ProMobileMenuSection[] => {\n const _sections: Array<ProMobileMenuSection | null> = [\n {\n id: \"store-link-stuff\",\n items: [\n ...(handleOrderHistoryClick\n ? [\n {\n id: \"order-history\",\n label: translations.orderHistory,\n icon: {\n src:\n typeof HistoryIcon === \"string\"\n ? HistoryIcon\n : HistoryIcon.src,\n width: 16,\n height: 16,\n },\n url: () => {\n handleOrderHistoryClick?.();\n },\n subItems: [],\n },\n ]\n : []),\n ...(handlePurchaseHistoryClick\n ? [\n {\n id: \"purchased-product-history\",\n label: translations.purchasedProductHistory,\n icon: {\n src:\n typeof HistoryIcon === \"string\"\n ? HistoryIcon\n : HistoryIcon.src,\n width: 16,\n height: 16,\n },\n url: () => {\n handlePurchaseHistoryClick?.();\n },\n subItems: [],\n },\n ]\n : []),\n /**\n * NOTE: Disabled per Kaspars request (09.06.)\n * @see https://ui.slack.com/archives/C050CTJSE80/p1686331781297389\n */\n // {\n // id: \"early-access\",\n // label: translations.earlyAccess,\n // icon: {\n // src: typeof EAIcon === \"string\" ? EAIcon : EAIcon.src,\n // width: 20,\n // height: 16,\n // },\n // url: () => {\n // handleEarlyAccessClick?.();\n // },\n // subItems: [],\n // },\n ],\n },\n {\n id: \"extra\",\n items: extraSectionItems ?? [\n {\n id: \"support\",\n label: translations.support,\n url: null,\n subItems: getSupportLinkMapping(context).map((item) => ({\n id: item.id,\n label: item.name,\n url: item.url,\n })),\n },\n {\n id: \"social\",\n label: translations.social,\n url: null,\n subItems: socialContent.items.map((item) => ({\n id: item.id,\n label: item.label,\n url: item.src,\n })),\n },\n ...(\n [\n { key: \"company\", label: translations.company },\n { key: \"training\", label: translations.training },\n { key: \"tools\", label: translations.tools },\n ] as const\n ).map(({ key, label }) => ({\n id: key,\n label,\n url: null,\n subItems: footerContent[key].items.map((item) => ({\n id: item.id,\n label: item.label,\n url: item.src,\n })),\n })),\n ],\n },\n currentCountryName\n ? {\n id: \"country-selector\",\n items: [\n {\n id: \"current-country-name\",\n label: currentCountryName,\n icon: {\n src:\n typeof GlobeIcon === \"string\" ? GlobeIcon : GlobeIcon.src,\n width: 17,\n height: 17,\n },\n url: () => {\n handleStorePickerClick?.();\n },\n subItems: [],\n },\n ],\n }\n : null,\n ];\n\n return _sections.filter((el): el is ProMobileMenuSection => !!el);\n }, [\n context,\n currentCountryName,\n extraSectionItems,\n footerContent,\n handleOrderHistoryClick,\n handlePurchaseHistoryClick,\n handleStorePickerClick,\n socialContent.items,\n translations.company,\n translations.orderHistory,\n translations.purchasedProductHistory,\n translations.social,\n translations.support,\n translations.tools,\n translations.training,\n ]);\n\n // #############################################################################\n // Render helpers\n // #############################################################################\n const renderSectionItemIcon = useCallback(\n (item: ProMobileMenuSection[\"items\"][number]): React.ReactNode => {\n return (\n item.icon && (\n <S2.SectionItemIcon>\n <StyleableSvgImage\n src={item.icon.src}\n width={item.icon.width}\n height={item.icon.height}\n />\n </S2.SectionItemIcon>\n )\n );\n },\n [],\n );\n\n const renderSectionItemButton = useCallback(\n (\n item: ProMobileMenuSectionItem | ProMobileMenuSectionSubItem,\n ): React.ReactNode => {\n const IconNode = \"subItems\" in item && renderSectionItemIcon(item);\n const NewLabelNode =\n \"isNew\" in item && item.isNew ? (\n <S.NewLabel>{translations.new}</S.NewLabel>\n ) : null;\n const target =\n \"targetBlank\" in item && item.targetBlank ? \"_blank\" : undefined;\n const url = item.url;\n\n if (!url) {\n return (\n <S.SectionItemButton\n motif={motif}\n onClick={() => toggleExpandedSectionItemId(item.id)}\n >\n {IconNode}\n {item.label}\n </S.SectionItemButton>\n );\n }\n\n if (typeof url === \"string\") {\n return (\n <S.SectionItemButton\n motif={motif}\n as=\"a\"\n href={url}\n onClick={onClose}\n target={target}\n >\n {IconNode}\n {item.label}\n {NewLabelNode}\n </S.SectionItemButton>\n );\n }\n\n return (\n <S.SectionItemButton\n motif={motif}\n onClick={() => {\n url();\n onClose();\n }}\n >\n {IconNode}\n {item.label}\n </S.SectionItemButton>\n );\n },\n [\n onClose,\n renderSectionItemIcon,\n toggleExpandedSectionItemId,\n translations.new,\n ],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.Wrap motif={motif}>\n <S.Container size=\"mobile\" noVerticalMargin>\n <S.InnerWrap>\n {/* Product line */}\n {!!productLineOptions?.length && (\n <S2.ButtonGroup>\n {productLineOptions.map((option) => (\n <S2.CustomButton\n full\n key={option.value}\n variant=\"gray\"\n $active={option.value === productLineValue}\n onClick={() => {\n handleProductLineChange?.(option.value);\n onClose();\n }}\n >\n {option.label}\n </S2.CustomButton>\n ))}\n </S2.ButtonGroup>\n )}\n\n {/* Sections */}\n {sections.map((section) => (\n <S.Section motif={motif} key={section.id}>\n {section.items.map((item) => (\n <S.SectionItemsGroup\n motif={motif}\n key={item.id}\n $active={item.id === expandedSectionItemId}\n >\n <S.SectionItem motif={motif}>\n {renderSectionItemButton(item)}\n\n {item.subItems.length > 0 && (\n <S.SectionItemArrowButton\n motif={motif}\n onClick={() => toggleExpandedSectionItemId(item.id)}\n >\n <S.ButtonIcon>\n <StyleableSvgImage\n src={icons.generic.collapseArrow}\n width={13}\n height={8}\n />\n </S.ButtonIcon>\n </S.SectionItemArrowButton>\n )}\n </S.SectionItem>\n\n {item.id === expandedSectionItemId &&\n item.subItems.length > 0 &&\n item.subItems.map((subItem) => (\n <S.SectionItem key={subItem.id} motif={motif} $secondary>\n {renderSectionItemButton(subItem)}\n </S.SectionItem>\n ))}\n </S.SectionItemsGroup>\n ))}\n </S.Section>\n ))}\n </S.InnerWrap>\n </S.Container>\n </S.Wrap>\n );\n};\n"],"names":["NavigationProMobileMenu","NavigationProMobileMenu2","translations","onClose","currentCountryName","handleStorePickerClick","handleOrderHistoryClick","handlePurchaseHistoryClick","handleProductLineChange","productLineValue","productLineOptions","extraSectionItems","motif","footerContent","socialContent","useFooterContent","context","useMenu","expandedSectionItemId","setExpandedSectionItemId","useState","toggleExpandedSectionItemId","useCallback","itemId","sections","useMemo","_sections","id","items","label","orderHistory","icon","src","HistoryIcon","width","height","url","subItems","purchasedProductHistory","support","getSupportLinkMapping","map","item","name","social","key","company","training","tools","GlobeIcon","filter","el","renderSectionItemIcon","jsx","S2.SectionItemIcon","children","StyleableSvgImage","renderSectionItemButton","IconNode","NewLabelNode","isNew","S.NewLabel","new","target","targetBlank","jsxs","S.SectionItemButton","onClick","as","href","S.Wrap","S.Container","size","noVerticalMargin","S.InnerWrap","length","S2.ButtonGroup","option","S2.CustomButton","full","variant","$active","value","section","S.Section","S.SectionItemsGroup","S.SectionItem","S.SectionItemArrowButton","S.ButtonIcon","icons.generic.collapseArrow","subItem","$secondary"],"mappings":";;;;;;;;;;;;;;;;;AAqBa,MAAAA,uBAAA,GAA0B,SAASA,wBAAwBC,CAAA;EACtEC,YAAA;EACAC,OAAA;EACAC,kBAAA;EACAC,sBAAA;EAAA;EAEAC,uBAAA;EACAC,0BAAA;EACAC,uBAAA;EACAC,gBAAA;EACAC,kBAAA;EACAC;AACF,CAAiC,EAAA;EAC/B,MAAMC,KAAe,GAAA,OAAA;EAErB,MAAM;IAAEC,aAAA;IAAeC;EAAc,CAA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A,iBAAAF,GAAA,CAACmC,UAAE,EAAF;kBACCjC,QAAA,EAAA,eAAAF,GAAA,CAACG,iBAAA,EAAA;oBACCxB,GAAA,EAAKyD,iCAAc;oBACnBvD,KAAO,EAAA,EAAA;oBACPC,MAAQ,EAAA;kBAAA,CAAA;iBAEZ;cAAA,CACF,CAAA;aAEJ,CAAA,EAECO,IAAA,CAAKf,EAAO,KAAAT,qBAAA,IACXwB,IAAK,CAAAL,QAAA,CAASsC,SAAS,CACvB,IAAAjC,IAAA,CAAKL,QAAS,CAAAI,GAAA,CAAKiD,OAAA,IAAA,mBAChBJ,WAAE,EAAF;cAA+B1E,KAAA;cAAc+E,UAAU,EAAA,IAAA;cACrDpC,kCAAwBmC,OAAO;YAAA,CAAA,EADdA,OAAQ,CAAA/D,EAE5B,CACD,CAAA;UAAA,CAAA,EA5BEe,IAAK,CAAAf,EAAA,CA8Bb;QAAA,CAAA,EAlC2BwD,OAAQ,CAAAxD,EAmCtC,CACD,CAAA;OACH;KACF;EACF,CAAA,CAAA;AAEJ,CAAA;"}
|
|
1
|
+
{"version":3,"file":"ProMobileMenu.mjs","sources":["../../../../../src/components/Header/Navigation/ProMobileMenu/ProMobileMenu.tsx"],"sourcesContent":["/* eslint-disable @next/next/no-img-element */\nimport type { Motif } from \"@ubnt/ui-components/utils\";\nimport { useCallback, useMemo, useState } from \"react\";\n\n// import EAIcon from \"../../../../assets/icons/menu/icon-ea.svg\";\nimport HistoryIcon from \"../../../../assets/icons/menu/icon-history.svg\";\nimport LocationPinIcon from \"../../../../assets/icons/menu/icon-location-pin.svg\";\nimport * as icons from \"../../../../constants/icons\";\nimport { useMenu } from \"../../../../contexts/MenuContext\";\nimport { useTranslation } from \"../../../../hooks\";\nimport { Language } from \"../../../../types\";\nimport { imageSrc } from \"../../../../utils/asset\";\nimport { useFooterContent } from \"../../../Footer/hooks/useFooterContent\";\nimport { StyleableSvgImage } from \"../../../StyleableSvgImage\";\nimport { getSupportLinkMapping } from \"../../LinksModal/mapping\";\nimport { en as EN_TRANSLATION } from \"../../translations\";\nimport * as S from \"../MobileMenu/MobileMenu.styles\";\nimport * as S2 from \"./ProMobileMenu.styles\";\nimport type {\n NavigationProMobileMenuProps,\n ProMobileMenuSection,\n ProMobileMenuSectionItem,\n ProMobileMenuSectionSubItem,\n} from \"./ProMobileMenu.types\";\n\nconst motif: Motif = \"light\";\n\nexport const NavigationProMobileMenu = function NavigationProMobileMenu({\n translations,\n onClose,\n currentCountryName,\n handleStorePickerClick,\n // handleEarlyAccessClick,\n handleOrderHistoryClick,\n handlePurchaseHistoryClick,\n handleProductLineChange,\n productLineValue,\n productLineOptions,\n extraSectionItems,\n inlineCategoryTabs,\n}: NavigationProMobileMenuProps) {\n const { formatMessage } = useTranslation({\n defaultTranslation: EN_TRANSLATION,\n additionalTranslations: {\n [Language.Ja]: () =>\n import(\"../../translations/ja.json\").then((res) => res.default),\n [Language.Ar]: () =>\n import(\"../../translations/ar.json\").then((res) => res.default),\n [Language.De]: () =>\n import(\"../../translations/de.json\").then((res) => res.default),\n [Language.Es]: () =>\n import(\"../../translations/es.json\").then((res) => res.default),\n [Language.El]: () =>\n import(\"../../translations/el.json\").then((res) => res.default),\n [Language.It]: () =>\n import(\"../../translations/it.json\").then((res) => res.default),\n [Language.Pt]: () =>\n import(\"../../translations/pt-BR.json\").then((res) => res.default),\n [Language.Zh]: () =>\n import(\"../../translations/zh-Hans.json\").then((res) => res.default),\n [Language.Fr]: () =>\n import(\"../../translations/fr.json\").then((res) => res.default),\n [Language.Tw]: () =>\n import(\"../../translations/zh-Hant-TW.json\").then((res) => res.default),\n },\n });\n\n const { footerContent, socialContent } = useFooterContent();\n const { context } = useMenu();\n\n // #############################################################################\n // Section toggling\n // #############################################################################\n const [expandedSectionItemId, setExpandedSectionItemId] = useState<\n string | null\n >(null);\n\n const toggleExpandedSectionItemId = useCallback(\n (itemId: string) => {\n setExpandedSectionItemId(\n expandedSectionItemId === itemId ? null : itemId,\n );\n },\n [expandedSectionItemId],\n );\n\n // #############################################################################\n // Menu sections\n // #############################################################################\n const sections = useMemo((): ProMobileMenuSection[] => {\n const _sections: Array<ProMobileMenuSection | null> = [\n {\n id: \"store-link-stuff\",\n items: [\n ...(handleOrderHistoryClick\n ? [\n {\n id: \"order-history\",\n label: translations.orderHistory,\n icon: {\n src: imageSrc(HistoryIcon),\n width: 16,\n height: 16,\n },\n url: () => {\n handleOrderHistoryClick?.();\n },\n subItems: [],\n },\n ]\n : []),\n ...(handlePurchaseHistoryClick\n ? [\n {\n id: \"purchased-product-history\",\n label: translations.purchasedProductHistory,\n icon: {\n src: imageSrc(HistoryIcon),\n width: 16,\n height: 16,\n },\n url: () => {\n handlePurchaseHistoryClick?.();\n },\n subItems: [],\n },\n ]\n : []),\n /**\n * NOTE: Disabled per Kaspars request (09.06.)\n * @see https://ui.slack.com/archives/C050CTJSE80/p1686331781297389\n */\n // {\n // id: \"early-access\",\n // label: translations.earlyAccess,\n // icon: {\n // src: typeof EAIcon === \"string\" ? EAIcon : EAIcon.src,\n // width: 20,\n // height: 16,\n // },\n // url: () => {\n // handleEarlyAccessClick?.();\n // },\n // subItems: [],\n // },\n ],\n },\n inlineCategoryTabs\n ? {\n id: \"categories\",\n items: inlineCategoryTabs.categories.map(\n (category): ProMobileMenuSectionItem => ({\n id: category.id,\n label:\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n formatMessage(category.id as unknown as any) ??\n category.label,\n url: category.href ?? null,\n subItems: [],\n }),\n ),\n }\n : null,\n currentCountryName\n ? {\n id: \"country-selector\",\n items: [\n {\n id: \"current-country-name\",\n label: translations.region,\n value: currentCountryName,\n icon: {\n src: imageSrc(LocationPinIcon),\n width: 17,\n height: 17,\n },\n url: () => {\n handleStorePickerClick?.();\n },\n subItems: [],\n },\n ],\n }\n : null,\n\n ...(\n extraSectionItems ?? [\n {\n id: \"support\",\n label: translations.support,\n url: null,\n subItems: getSupportLinkMapping(context).map((item) => ({\n id: item.id,\n label: item.name,\n url: item.url,\n })),\n },\n {\n id: \"social\",\n label: translations.social,\n url: null,\n subItems: socialContent.items.map((item) => ({\n id: item.id,\n label: item.label,\n url: item.src,\n })),\n },\n ...(\n [\n { key: \"company\", label: translations.company },\n { key: \"training\", label: translations.training },\n { key: \"tools\", label: translations.tools },\n ] as const\n ).map(({ key, label }) => ({\n id: key,\n label,\n url: null,\n subItems: footerContent[key].items.map((item) => ({\n id: item.id,\n label: item.label,\n url: item.src,\n })),\n })),\n ]\n ).map((item) => ({\n id: `extra-${item.id}`,\n items: [item],\n })),\n ];\n\n return _sections.filter((el): el is ProMobileMenuSection => !!el);\n }, [\n handleOrderHistoryClick,\n translations.orderHistory,\n translations.purchasedProductHistory,\n translations.support,\n translations.social,\n translations.company,\n translations.training,\n translations.tools,\n translations.region,\n handlePurchaseHistoryClick,\n inlineCategoryTabs,\n extraSectionItems,\n context,\n socialContent.items,\n currentCountryName,\n formatMessage,\n footerContent,\n handleStorePickerClick,\n ]);\n\n // #############################################################################\n // Render helpers\n // #############################################################################\n const renderSectionItemIcon = useCallback(\n (item: ProMobileMenuSection[\"items\"][number]): React.ReactNode => {\n return (\n item.icon && (\n <S2.SectionItemIcon>\n <StyleableSvgImage\n src={item.icon.src}\n width={item.icon.width}\n height={item.icon.height}\n />\n </S2.SectionItemIcon>\n )\n );\n },\n [],\n );\n\n const renderSectionItemButton = useCallback(\n (\n item: ProMobileMenuSectionItem | ProMobileMenuSectionSubItem,\n ): React.ReactNode => {\n const IconNode = \"subItems\" in item && renderSectionItemIcon(item);\n const NewLabelNode =\n \"isNew\" in item && item.isNew ? (\n <S.NewLabel>{translations.new}</S.NewLabel>\n ) : null;\n const ValueNode = !!item.value && <div>{item.value}</div>;\n\n const target =\n \"targetBlank\" in item && item.targetBlank ? \"_blank\" : undefined;\n const url = item.url;\n\n if (!url) {\n return (\n <S2.ProSectionItemButton\n motif={motif}\n onClick={() => toggleExpandedSectionItemId(item.id)}\n >\n <S2.ButtonContent>\n {IconNode}\n {item.label}\n </S2.ButtonContent>\n {ValueNode}\n </S2.ProSectionItemButton>\n );\n }\n\n if (typeof url === \"string\" || typeof url === \"object\") {\n const href = typeof url === \"string\" ? url : undefined;\n const anchor = (\n <S2.ProSectionItemButton\n motif={motif}\n as=\"a\"\n href={href}\n onClick={onClose}\n target={target}\n >\n <S2.ButtonContent>\n {IconNode}\n {item.label}\n {NewLabelNode}\n </S2.ButtonContent>\n {ValueNode}\n </S2.ProSectionItemButton>\n );\n\n return inlineCategoryTabs?.renderLink?.(anchor) ?? anchor;\n }\n\n return (\n <S2.ProSectionItemButton\n motif={motif}\n onClick={() => {\n url();\n onClose();\n }}\n >\n <S2.ButtonContent>\n {IconNode}\n {item.label}\n </S2.ButtonContent>\n {ValueNode}\n </S2.ProSectionItemButton>\n );\n },\n [\n inlineCategoryTabs,\n onClose,\n renderSectionItemIcon,\n toggleExpandedSectionItemId,\n translations.new,\n ],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.Wrap motif={motif}>\n <S.Container size=\"mobile\" noVerticalMargin>\n <S.InnerWrap>\n {/* Product line */}\n {!!productLineOptions?.length && (\n <S2.ButtonGroup>\n {productLineOptions.map((option) => (\n <S2.CustomButton\n full\n key={option.value}\n variant=\"gray\"\n $active={option.value === productLineValue}\n onClick={() => {\n handleProductLineChange?.(option.value);\n onClose();\n }}\n >\n {option.label}\n </S2.CustomButton>\n ))}\n </S2.ButtonGroup>\n )}\n\n {/* Sections */}\n {sections.map((section) => (\n <S.Section motif={motif} key={section.id}>\n {section.items.map((item) => (\n <S.SectionItemsGroup\n motif={motif}\n key={item.id}\n $active={item.id === expandedSectionItemId}\n >\n <S.SectionItem motif={motif}>\n {renderSectionItemButton(item)}\n\n {item.subItems.length > 0 && (\n <S.SectionItemArrowButton\n motif={motif}\n onClick={() => toggleExpandedSectionItemId(item.id)}\n >\n <S.ButtonIcon>\n <StyleableSvgImage\n src={icons.generic.collapseArrow}\n width={13}\n height={8}\n />\n </S.ButtonIcon>\n </S.SectionItemArrowButton>\n )}\n </S.SectionItem>\n\n {item.id === expandedSectionItemId &&\n item.subItems.length > 0 &&\n item.subItems.map((subItem) => (\n <S.SectionItem key={subItem.id} motif={motif} $secondary>\n {renderSectionItemButton(subItem)}\n </S.SectionItem>\n ))}\n </S.SectionItemsGroup>\n ))}\n </S.Section>\n ))}\n </S.InnerWrap>\n </S.Container>\n </S.Wrap>\n );\n};\n"],"names":["motif","NavigationProMobileMenu","NavigationProMobileMenu2","translations","onClose","currentCountryName","handleStorePickerClick","handleOrderHistoryClick","handlePurchaseHistoryClick","handleProductLineChange","productLineValue","productLineOptions","extraSectionItems","inlineCategoryTabs","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","then","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","Tw","footerContent","socialContent","useFooterContent","context","useMenu","expandedSectionItemId","setExpandedSectionItemId","useState","toggleExpandedSectionItemId","useCallback","itemId","sections","useMemo","_sections","id","items","label","orderHistory","icon","src","imageSrc","HistoryIcon","width","height","url","subItems","purchasedProductHistory","categories","map","category","href","region","value","LocationPinIcon","support","getSupportLinkMapping","item","name","social","key","company","training","tools","filter","el","renderSectionItemIcon","jsx","S2.SectionItemIcon","children","StyleableSvgImage","renderSectionItemButton","IconNode","NewLabelNode","isNew","S.NewLabel","new","ValueNode","target","targetBlank","jsxs","S2.ProSectionItemButton","onClick","S2.ButtonContent","anchor","as","renderLink","S.Wrap","S.Container","size","noVerticalMargin","S.InnerWrap","length","S2.ButtonGroup","option","S2.CustomButton","full","variant","$active","section","S.Section","S.SectionItemsGroup","S.SectionItem","S.SectionItemArrowButton","S.ButtonIcon","icons.generic.collapseArrow","subItem","$secondary"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAMA,KAAe,GAAA,OAAA;AAER,MAAAC,uBAAA,GAA0B,SAASA,wBAAwBC,CAAA;EACtEC,YAAA;EACAC,OAAA;EACAC,kBAAA;EACAC,sBAAA;EAAA;EAEAC,uBAA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AElDkC,QAAA,iBAAAF,GAAA,CAACqC,UAAE,EAAF;kBACCnC,QAAA,EAAA,eAAAF,GAAA,CAACG,iBAAA,EAAA;oBACC9B,GAAA,EAAKiE,iCAAc;oBACnB9D,KAAO,EAAA,EAAA;oBACPC,MAAQ,EAAA;kBAAA,CAAA;iBAEZ;cAAA,CACF,CAAA;aAEJ,CAAA,EAECa,IAAA,CAAKtB,EAAO,KAAAT,qBAAA,IACX+B,IAAK,CAAAX,QAAA,CAAS8C,SAAS,CACvB,IAAAnC,IAAA,CAAKX,QAAS,CAAAG,GAAA,CAAKyD,OAAA,IAAA,mBAChBJ,WAAE,EAAF;cAA+BlH,KAAA;cAAcuH,UAAU,EAAA,IAAA;cACrDtC,kCAAwBqC,OAAO;YAAA,CAAA,EADdA,OAAQ,CAAAvE,EAE5B,CACD,CAAA;UAAA,CAAA,EA5BEsB,IAAK,CAAAtB,EAAA,CA8Bb;QAAA,CAAA,EAlC2BgE,OAAQ,CAAAhE,EAmCtC,CACD,CAAA;OACH;KACF;EACF,CAAA,CAAA;AAEJ,CAAA;"}
|
|
@@ -5,3 +5,9 @@ export declare const CustomButton: import("styled-components").StyledComponent<i
|
|
|
5
5
|
$active?: boolean;
|
|
6
6
|
}, never>;
|
|
7
7
|
export declare const ButtonGroup: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
8
|
+
export declare const ButtonContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
9
|
+
export declare const ProSectionItemButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
10
|
+
motif: import("@ubnt/ui-components").Motif;
|
|
11
|
+
$link?: boolean;
|
|
12
|
+
$bold?: boolean;
|
|
13
|
+
}, never>;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var styled = require('styled-components');
|
|
4
4
|
var theme = require('../../../../constants/theme.js');
|
|
5
5
|
require('../../../Button/index.js');
|
|
6
|
+
var MobileMenu_styles = require('../MobileMenu/MobileMenu.styles.js');
|
|
6
7
|
var Button = require('../../../Button/Button.js');
|
|
7
8
|
function _interopDefault(e) {
|
|
8
9
|
return e && e.__esModule ? e : {
|
|
@@ -14,7 +15,6 @@ var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
|
14
15
|
const SectionItemIcon = styled__default["default"].div`
|
|
15
16
|
width: 20px;
|
|
16
17
|
height: 20px;
|
|
17
|
-
margin-right: 10px;
|
|
18
18
|
color: ${theme.theme.colors.black};
|
|
19
19
|
|
|
20
20
|
display: flex;
|
|
@@ -39,7 +39,17 @@ const ButtonGroup = styled__default["default"].div`
|
|
|
39
39
|
display: flex;
|
|
40
40
|
gap: 8px;
|
|
41
41
|
`;
|
|
42
|
+
const ButtonContent = styled__default["default"].div`
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
gap: 10px;
|
|
46
|
+
`;
|
|
47
|
+
const ProSectionItemButton = styled__default["default"](MobileMenu_styles.SectionItemButton)`
|
|
48
|
+
justify-content: space-between;
|
|
49
|
+
`;
|
|
50
|
+
exports.ButtonContent = ButtonContent;
|
|
42
51
|
exports.ButtonGroup = ButtonGroup;
|
|
43
52
|
exports.CustomButton = CustomButton;
|
|
53
|
+
exports.ProSectionItemButton = ProSectionItemButton;
|
|
44
54
|
exports.SectionItemIcon = SectionItemIcon;
|
|
45
55
|
//# sourceMappingURL=ProMobileMenu.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProMobileMenu.styles.js","sources":["../../../../../src/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.tsx"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { theme } from \"../../../../constants/theme\";\nimport { Button } from \"../../../Button\";\n\nexport const SectionItemIcon = styled.div`\n width: 20px;\n height: 20px;\n
|
|
1
|
+
{"version":3,"file":"ProMobileMenu.styles.js","sources":["../../../../../src/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.tsx"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { theme } from \"../../../../constants/theme\";\nimport { Button } from \"../../../Button\";\nimport { SectionItemButton } from \"../MobileMenu/MobileMenu.styles\";\n\nexport const SectionItemIcon = styled.div`\n width: 20px;\n height: 20px;\n color: ${theme.colors.black};\n\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\n// FIXME i should be using Motif here but...\nexport const CustomButton = styled(Button)<{ $active?: boolean }>`\n height: 46px;\n font-size: ${theme.font.size14};\n line-height: 1;\n border-radius: 6px;\n\n ${({ $active }) =>\n $active &&\n css`\n background: ${theme.colors.white} !important;\n border-width: 4px;\n color: ${theme.colors.primaryBlue};\n `}\n`;\n\nexport const ButtonGroup = styled.div`\n display: flex;\n gap: 8px;\n`;\n\nexport const ButtonContent = styled.div`\n display: flex;\n align-items: center;\n gap: 10px;\n`;\n\nexport const ProSectionItemButton = styled(SectionItemButton)`\n justify-content: space-between;\n`;\n"],"names":["SectionItemIcon","styled","div","theme","colors","black","CustomButton","Button","font","size14","$active","css","white","primaryBlue","ButtonGroup","ButtonContent","ProSectionItemButton","SectionItemButton"],"mappings":";;;;;;;;;;;;;;AAMO,MAAMA,kBAAkBC,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA,WAG3BC,KAAA,CAAAA,KAAA,CAAMC,OAAOC,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAQhB,MAAAC,YAAA,GAAeL,eAAAA,CAAAA,SAAAA,EAAOM,MAAAA,CAAAA,MAAM,CAAA;AAAA;AAAA,eAE1BJ,KAAA,CAAAA,KAAA,CAAMK,KAAKC,MAAM;AAAA;AAAA;AAAA;AAAA,IAI5B,CAAC;EAAEC;CAAQ,KACXA,OACA,IAAAC,MAAAA,CAAAA,GAAA;AAAA,oBACgBR,KAAA,CAAAA,KAAA,CAAMC,OAAOQ,KAAK;AAAA;AAAA,eAEvBT,KAAA,CAAAA,KAAA,CAAMC,OAAOS,WAAW;AAAA,KAClC;AAAA,CAAA;AAGE,MAAMC,cAAcb,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA,CAAA;AAK3B,MAAMa,gBAAgBd,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAMvB,MAAAc,oBAAA,GAAuBf,eAAAA,CAAAA,SAAAA,EAAOgB,iBAAAA,CAAAA,iBAAiB,CAAA;AAAA;AAAA,CAAA;;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
2
|
import { theme } from '../../../../constants/theme.mjs';
|
|
3
3
|
import '../../../Button/index.mjs';
|
|
4
|
+
import { SectionItemButton } from '../MobileMenu/MobileMenu.styles.mjs';
|
|
4
5
|
import { Button } from '../../../Button/Button.mjs';
|
|
5
6
|
"use strict";
|
|
6
7
|
const SectionItemIcon = styled.div`
|
|
7
8
|
width: 20px;
|
|
8
9
|
height: 20px;
|
|
9
|
-
margin-right: 10px;
|
|
10
10
|
color: ${theme.colors.black};
|
|
11
11
|
|
|
12
12
|
display: flex;
|
|
@@ -31,5 +31,13 @@ const ButtonGroup = styled.div`
|
|
|
31
31
|
display: flex;
|
|
32
32
|
gap: 8px;
|
|
33
33
|
`;
|
|
34
|
-
|
|
34
|
+
const ButtonContent = styled.div`
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
gap: 10px;
|
|
38
|
+
`;
|
|
39
|
+
const ProSectionItemButton = styled(SectionItemButton)`
|
|
40
|
+
justify-content: space-between;
|
|
41
|
+
`;
|
|
42
|
+
export { ButtonContent, ButtonGroup, CustomButton, ProSectionItemButton, SectionItemIcon };
|
|
35
43
|
//# sourceMappingURL=ProMobileMenu.styles.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProMobileMenu.styles.mjs","sources":["../../../../../src/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.tsx"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { theme } from \"../../../../constants/theme\";\nimport { Button } from \"../../../Button\";\n\nexport const SectionItemIcon = styled.div`\n width: 20px;\n height: 20px;\n
|
|
1
|
+
{"version":3,"file":"ProMobileMenu.styles.mjs","sources":["../../../../../src/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.tsx"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { theme } from \"../../../../constants/theme\";\nimport { Button } from \"../../../Button\";\nimport { SectionItemButton } from \"../MobileMenu/MobileMenu.styles\";\n\nexport const SectionItemIcon = styled.div`\n width: 20px;\n height: 20px;\n color: ${theme.colors.black};\n\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\n// FIXME i should be using Motif here but...\nexport const CustomButton = styled(Button)<{ $active?: boolean }>`\n height: 46px;\n font-size: ${theme.font.size14};\n line-height: 1;\n border-radius: 6px;\n\n ${({ $active }) =>\n $active &&\n css`\n background: ${theme.colors.white} !important;\n border-width: 4px;\n color: ${theme.colors.primaryBlue};\n `}\n`;\n\nexport const ButtonGroup = styled.div`\n display: flex;\n gap: 8px;\n`;\n\nexport const ButtonContent = styled.div`\n display: flex;\n align-items: center;\n gap: 10px;\n`;\n\nexport const ProSectionItemButton = styled(SectionItemButton)`\n justify-content: space-between;\n`;\n"],"names":["SectionItemIcon","styled","div","theme","colors","black","CustomButton","Button","font","size14","$active","css","white","primaryBlue","ButtonGroup","ButtonContent","ProSectionItemButton","SectionItemButton"],"mappings":";;;;;;AAMO,MAAMA,kBAAkBC,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA,WAG3BC,KAAA,CAAMC,OAAOC,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAQhB,MAAAC,YAAA,GAAeL,OAAOM,MAAM,CAAA;AAAA;AAAA,eAE1BJ,KAAA,CAAMK,KAAKC,MAAM;AAAA;AAAA;AAAA;AAAA,IAI5B,CAAC;EAAEC;CAAQ,KACXA,OACA,IAAAC,GAAA;AAAA,oBACgBR,KAAA,CAAMC,OAAOQ,KAAK;AAAA;AAAA,eAEvBT,KAAA,CAAMC,OAAOS,WAAW;AAAA,KAClC;AAAA,CAAA;AAGE,MAAMC,cAAcb,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA,CAAA;AAK3B,MAAMa,gBAAgBd,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAMvB,MAAAc,oBAAA,GAAuBf,OAAOgB,iBAAiB,CAAA;AAAA;AAAA,CAAA;"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { ProductLine } from "../../../../types";
|
|
2
|
+
import type { CategoryTabsProps, Href } from "../../../CategoryTabs/CategoryTabs.types";
|
|
2
3
|
import type { HeaderTranslations, ProHeaderProps } from "../../Header.types";
|
|
3
4
|
export type ProMobileMenuSectionSubItem = {
|
|
4
5
|
id: string;
|
|
5
6
|
label: string;
|
|
7
|
+
value?: string;
|
|
6
8
|
url: string | (() => void);
|
|
7
9
|
isNew?: boolean;
|
|
8
10
|
targetBlank?: boolean;
|
|
@@ -10,12 +12,13 @@ export type ProMobileMenuSectionSubItem = {
|
|
|
10
12
|
export type ProMobileMenuSectionItem = {
|
|
11
13
|
id: string;
|
|
12
14
|
label: string;
|
|
15
|
+
value?: string;
|
|
13
16
|
icon?: {
|
|
14
17
|
src: string;
|
|
15
18
|
width: number;
|
|
16
19
|
height: number;
|
|
17
20
|
};
|
|
18
|
-
url: string | (() => void) | null;
|
|
21
|
+
url: string | (() => void) | Href | null;
|
|
19
22
|
subItems: Array<ProMobileMenuSectionSubItem>;
|
|
20
23
|
};
|
|
21
24
|
export interface ProMobileMenuSection {
|
|
@@ -37,4 +40,5 @@ export interface NavigationProMobileMenuProps {
|
|
|
37
40
|
}>;
|
|
38
41
|
hideExtraSection?: boolean;
|
|
39
42
|
extraSectionItems?: Array<ProMobileMenuSectionItem>;
|
|
43
|
+
inlineCategoryTabs?: CategoryTabsProps;
|
|
40
44
|
}
|
|
@@ -6,10 +6,7 @@ export declare const ProHeader: import("react").NamedExoticComponent<Pick<import
|
|
|
6
6
|
earlyAccess?: import("../Header.types").ProHeaderEarlyAccess;
|
|
7
7
|
handlePurchaseHistoryClick?: () => void;
|
|
8
8
|
handleOrderHistoryClick?: () => void;
|
|
9
|
-
productLineOptions?:
|
|
10
|
-
value: ProductLine;
|
|
11
|
-
label: string;
|
|
12
|
-
}[];
|
|
9
|
+
productLineOptions?: import("../Header.types").HeaderProductLineOption[];
|
|
13
10
|
productLineValue?: ProductLine;
|
|
14
11
|
handleProductLineChange?: (type: ProductLine) => void;
|
|
15
12
|
handleMobileMenuClick?: () => void;
|
|
@@ -19,4 +16,5 @@ export declare const ProHeader: import("react").NamedExoticComponent<Pick<import
|
|
|
19
16
|
onSearchFocus?: () => void;
|
|
20
17
|
onSearchBlur?: () => void;
|
|
21
18
|
onSearchClick?: () => void;
|
|
19
|
+
inlineCategoryTabs?: import("../../CategoryTabs/CategoryTabs.types").CategoryTabsProps;
|
|
22
20
|
}>;
|