@ubnt/store.core 9.9.0-alpha.2 → 9.9.0-alpha.4
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 +348 -2235
- package/lib/assets/attention.svg +5 -5
- package/lib/assets/attention2.svg +5 -5
- package/lib/{components/ModelCompareV3/assets/keylock.svg.js → assets/icons/menu/icon-globe.svg.js} +6 -6
- package/lib/assets/icons/menu/icon-globe.svg.js.map +1 -0
- package/lib/assets/icons/menu/icon-globe.svg.mjs +3 -0
- package/lib/assets/icons/menu/icon-globe.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/minus4.svg +8 -8
- package/lib/assets/minus5.svg +8 -8
- package/lib/assets/plus.svg +4 -22
- package/lib/assets/plus2.svg +22 -1
- package/lib/assets/plus3.svg +1 -4
- 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/assets/udmPro.jpg +0 -0
- package/lib/assets/udmPro2.jpg +0 -0
- package/lib/assets/udmProMax.jpg +0 -0
- package/lib/assets/udmProMax2.jpg +0 -0
- package/lib/assets/udmProSpecial.jpg +0 -0
- package/lib/assets/udmProSpecial2.jpg +0 -0
- package/lib/components/Container/Container.styles.js +0 -2
- package/lib/components/Container/Container.styles.js.map +1 -1
- package/lib/components/Container/Container.styles.mjs +0 -2
- package/lib/components/Container/Container.styles.mjs.map +1 -1
- package/lib/components/Container/Container.types.d.ts +1 -1
- package/lib/components/Explore/Explore.js +1 -1
- package/lib/components/Explore/Explore.js.map +1 -1
- package/lib/components/Explore/Explore.mjs +1 -1
- package/lib/components/Explore/Explore.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/Footer/Footer.d.ts +1 -1
- package/lib/components/Footer/Footer.js +101 -83
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/Footer.mjs +101 -85
- package/lib/components/Footer/Footer.mjs.map +1 -1
- package/lib/components/Footer/Footer.styles.d.ts +6 -2
- package/lib/components/Footer/Footer.styles.js +33 -7
- package/lib/components/Footer/Footer.styles.js.map +1 -1
- package/lib/components/Footer/Footer.styles.mjs +31 -8
- package/lib/components/Footer/Footer.styles.mjs.map +1 -1
- package/lib/components/Footer/Footer.types.d.ts +2 -3
- package/lib/components/Footer/Footer.types.js.map +1 -1
- package/lib/components/Footer/Footer.types.mjs.map +1 -1
- package/lib/components/Footer/hooks/useFooterContent.d.ts +10 -22
- package/lib/components/Footer/hooks/useFooterContent.js +58 -55
- package/lib/components/Footer/hooks/useFooterContent.js.map +1 -1
- package/lib/components/Footer/hooks/useFooterContent.mjs +56 -53
- package/lib/components/Footer/hooks/useFooterContent.mjs.map +1 -1
- package/lib/components/Footer/translations/en.json.js +2 -2
- package/lib/components/Footer/translations/en.json.mjs +2 -2
- package/lib/components/Footer/translations/zh-Hant-TW.json.js +8 -0
- package/lib/components/Footer/translations/zh-Hant-TW.json.js.map +1 -0
- package/lib/components/Footer/translations/zh-Hant-TW.json.mjs +3 -0
- package/lib/components/Footer/translations/zh-Hant-TW.json.mjs.map +1 -0
- package/lib/components/Header/AccountMenu/AccountMenu.js +5 -3
- package/lib/components/Header/AccountMenu/AccountMenu.js.map +1 -1
- package/lib/components/Header/AccountMenu/AccountMenu.mjs +6 -4
- package/lib/components/Header/AccountMenu/AccountMenu.mjs.map +1 -1
- package/lib/components/Header/CartModalV2/Item/Item.js +3 -3
- package/lib/components/Header/CartModalV2/Item/Item.mjs +2 -2
- package/lib/components/Header/Header.js +1 -8
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/Header.mjs +1 -8
- package/lib/components/Header/Header.mjs.map +1 -1
- package/lib/components/Header/Header.styles.js +0 -4
- package/lib/components/Header/Header.styles.js.map +1 -1
- package/lib/components/Header/Header.styles.mjs +0 -4
- package/lib/components/Header/Header.styles.mjs.map +1 -1
- package/lib/components/Header/Header.types.d.ts +1 -3
- package/lib/components/Header/Header.types.js +1 -3
- package/lib/components/Header/Header.types.js.map +1 -1
- package/lib/components/Header/Header.types.mjs +1 -3
- package/lib/components/Header/Header.types.mjs.map +1 -1
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.js +5 -8
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.js.map +1 -1
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.mjs +5 -8
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.mjs.map +1 -1
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.js +2 -1
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.js.map +1 -1
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.mjs +2 -1
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.mjs.map +1 -1
- package/lib/components/Header/Navigation/MicrositeMenu/mapping.d.ts +1 -7
- package/lib/components/Header/Navigation/MicrositeMenu/mapping.js +19 -32
- package/lib/components/Header/Navigation/MicrositeMenu/mapping.js.map +1 -1
- package/lib/components/Header/Navigation/MicrositeMenu/mapping.mjs +19 -32
- package/lib/components/Header/Navigation/MicrositeMenu/mapping.mjs.map +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.js +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.js.map +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.mjs +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.mjs.map +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.d.ts +0 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.js +0 -4
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.js.map +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.mjs +1 -4
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js +55 -65
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs +55 -65
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.types.d.ts +1 -3
- package/lib/components/Header/ProHeader/ProHeader.js +50 -67
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +50 -67
- package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
- package/lib/components/Header/translations/de.json.js +2 -2
- package/lib/components/Header/translations/de.json.mjs +2 -2
- package/lib/components/Header/translations/el.json.js +1 -1
- package/lib/components/Header/translations/el.json.mjs +1 -1
- package/lib/components/Header/translations/en.json.js +33 -37
- package/lib/components/Header/translations/en.json.js.map +1 -1
- package/lib/components/Header/translations/en.json.mjs +34 -37
- package/lib/components/Header/translations/en.json.mjs.map +1 -1
- package/lib/components/Header/translations/fr.json.js +3 -3
- package/lib/components/Header/translations/fr.json.mjs +3 -3
- package/lib/components/LayoutRenderer/LayoutRenderer.types.d.ts +0 -2
- package/lib/components/LayoutRenderer/LayoutRenderer.types.js.map +1 -1
- package/lib/components/LayoutRenderer/LayoutRenderer.types.mjs.map +1 -1
- package/lib/components/MicrositeHero/MicrositeHero.d.ts +1 -1
- package/lib/components/MicrositeHero/MicrositeHero.js +3 -13
- package/lib/components/MicrositeHero/MicrositeHero.js.map +1 -1
- package/lib/components/MicrositeHero/MicrositeHero.mjs +4 -14
- package/lib/components/MicrositeHero/MicrositeHero.mjs.map +1 -1
- package/lib/components/MicrositeHero/MicrositeHero.types.d.ts +0 -1
- package/lib/components/MicrositeHero/MicrositeHero.types.js.map +1 -1
- package/lib/components/MicrositeHero/MicrositeHero.types.mjs.map +1 -1
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.js +40 -59
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.js.map +1 -1
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.mjs +42 -61
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.mjs.map +1 -1
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.styles.d.ts +0 -15
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.styles.js +6 -35
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.styles.js.map +1 -1
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.styles.mjs +7 -35
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.styles.mjs.map +1 -1
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.types.d.ts +0 -9
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.types.js.map +1 -1
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.types.mjs.map +1 -1
- package/lib/components/Microsites/MicrositeProductPage.js +1 -2
- package/lib/components/Microsites/MicrositeProductPage.js.map +1 -1
- package/lib/components/Microsites/MicrositeProductPage.mjs +1 -2
- package/lib/components/Microsites/MicrositeProductPage.mjs.map +1 -1
- package/lib/components/Microsites/Microsites.types.d.ts +1 -3
- package/lib/components/Microsites/Microsites.types.js.map +1 -1
- package/lib/components/Microsites/Microsites.types.mjs.map +1 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.styles.js +0 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.styles.js.map +1 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.styles.mjs +0 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.styles.mjs.map +1 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.types.d.ts +9 -21
- 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/bigCompare/udmPro.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/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/assets/Consoles/udmPro.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/data/CloudGateways.js +21 -21
- package/lib/components/ModelCompareV3/data/CloudGateways.js.map +1 -1
- package/lib/components/ModelCompareV3/data/CloudGateways.mjs +16 -16
- package/lib/components/ModelCompareV3/data/CloudGateways.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/index.d.ts +17 -18
- package/lib/components/ModelCompareV3/data/index.js +34 -37
- package/lib/components/ModelCompareV3/data/index.js.map +1 -1
- package/lib/components/ModelCompareV3/data/index.mjs +34 -37
- package/lib/components/ModelCompareV3/data/index.mjs.map +1 -1
- 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/ModelCompareV3/data/products/udmPro.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/waveApMicro.js +2 -2
- package/lib/components/ModelCompareV3/data/products/waveApMicro.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/waveApMicro.mjs +2 -2
- package/lib/components/ModelCompareV3/data/products/waveApMicro.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/wavePro.js +2 -2
- package/lib/components/ModelCompareV3/data/products/wavePro.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/wavePro.mjs +2 -2
- package/lib/components/ModelCompareV3/data/products/wavePro.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/en.json.js +1 -27
- package/lib/components/ModelCompareV3/translations/en.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/en.json.mjs +1 -27
- package/lib/components/ModelCompareV3/translations/en.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/useModelCompareTranslation.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 +21 -312
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs +21 -310
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.js +22 -38
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.mjs +22 -38
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.d.ts +2 -10
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.js +0 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.mjs +0 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/HddSlots/HddSlots.d.ts +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/HddSlots/HddSlots.js +4 -5
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/HddSlots/HddSlots.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/HddSlots/HddSlots.mjs +4 -5
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/HddSlots/HddSlots.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/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 +2 -2
- 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/translations/en.json.js +1 -4
- package/lib/components/ResourceCalculatorV1/translations/en.json.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/translations/en.json.mjs +1 -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/ScrollWrapper/ScrollWrapper.js +7 -6
- package/lib/components/ScrollWrapper/ScrollWrapper.js.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.mjs +7 -6
- package/lib/components/ScrollWrapper/ScrollWrapper.mjs.map +1 -1
- package/lib/components/VariantSelector/Variant/Variant.js +29 -33
- package/lib/components/VariantSelector/Variant/Variant.js.map +1 -1
- package/lib/components/VariantSelector/Variant/Variant.mjs +30 -34
- package/lib/components/VariantSelector/Variant/Variant.mjs.map +1 -1
- package/lib/components/VariantSelector/Variant/Variant.styles.d.ts +0 -2
- package/lib/components/VariantSelector/Variant/Variant.styles.js +1 -20
- package/lib/components/VariantSelector/Variant/Variant.styles.js.map +1 -1
- package/lib/components/VariantSelector/Variant/Variant.styles.mjs +2 -19
- package/lib/components/VariantSelector/Variant/Variant.styles.mjs.map +1 -1
- package/lib/components/VariantSelector/VariantSelector.constants.d.ts +0 -1
- package/lib/components/VariantSelector/VariantSelector.constants.js +0 -1
- package/lib/components/VariantSelector/VariantSelector.constants.js.map +1 -1
- package/lib/components/VariantSelector/VariantSelector.constants.mjs +0 -1
- package/lib/components/VariantSelector/VariantSelector.constants.mjs.map +1 -1
- package/lib/constants/icons/generic/index.js +3 -3
- package/lib/constants/icons/generic/index.mjs +1 -1
- package/lib/constants/icons/generic/plus.svg.js +5 -5
- package/lib/constants/icons/generic/plus.svg.mjs +2 -2
- package/lib/constants/icons/menu/index.d.ts +1 -2
- package/lib/constants/icons/menu/index.js +9 -18
- package/lib/constants/icons/menu/index.js.map +1 -1
- package/lib/constants/icons/menu/index.mjs +2 -4
- package/lib/constants/icons/menu/index.mjs.map +1 -1
- package/lib/constants/layout.d.ts +0 -1
- package/lib/constants/layout.js +1 -3
- package/lib/constants/layout.js.map +1 -1
- package/lib/constants/layout.mjs +1 -3
- package/lib/constants/layout.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.d.ts +0 -1
- package/lib/constants/proStoreCategories/translations/ar.json.js +2 -2
- package/lib/constants/proStoreCategories/translations/ar.json.mjs +2 -2
- package/lib/constants/proStoreCategories/translations/en.json.js +0 -3
- package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs +1 -3
- 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/ja.json.js +2 -2
- package/lib/constants/proStoreCategories/translations/ja.json.mjs +2 -2
- 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/constants/url.d.ts +1 -1
- package/lib/constants/url.js +1 -1
- package/lib/constants/url.js.map +1 -1
- package/lib/constants/url.mjs +1 -1
- package/lib/constants/url.mjs.map +1 -1
- package/lib/contexts/MenuContext/mapping.js +41 -45
- package/lib/contexts/MenuContext/mapping.js.map +1 -1
- package/lib/contexts/MenuContext/mapping.mjs +40 -43
- package/lib/contexts/MenuContext/mapping.mjs.map +1 -1
- package/package.json +52 -52
- package/lib/assets/arrow-left-right.svg +0 -3
- package/lib/assets/efg.png +0 -0
- package/lib/assets/firewall.svg +0 -12
- package/lib/assets/globe-shield.svg +0 -3
- package/lib/assets/icon-location.svg +0 -5
- package/lib/assets/icons/menu/icon-location.svg.js +0 -27
- package/lib/assets/icons/menu/icon-location.svg.js.map +0 -1
- package/lib/assets/icons/menu/icon-location.svg.mjs +0 -3
- package/lib/assets/icons/menu/icon-location.svg.mjs.map +0 -1
- package/lib/assets/keylock.svg +0 -3
- package/lib/assets/magnifying-glass.svg +0 -10
- package/lib/assets/sfpAndCable.svg +0 -9
- package/lib/assets/ucg-max.png +0 -0
- package/lib/components/MicrositeMediaGrid/components/MobileItem.d.ts +0 -14
- package/lib/components/MicrositeMediaGrid/components/MobileItem.js +0 -60
- package/lib/components/MicrositeMediaGrid/components/MobileItem.js.map +0 -1
- package/lib/components/MicrositeMediaGrid/components/MobileItem.mjs +0 -58
- package/lib/components/MicrositeMediaGrid/components/MobileItem.mjs.map +0 -1
- package/lib/components/ModelCompareV3/assets/arrow-left-right.svg.js +0 -27
- package/lib/components/ModelCompareV3/assets/arrow-left-right.svg.js.map +0 -1
- package/lib/components/ModelCompareV3/assets/arrow-left-right.svg.mjs +0 -3
- package/lib/components/ModelCompareV3/assets/arrow-left-right.svg.mjs.map +0 -1
- package/lib/components/ModelCompareV3/assets/firewall.svg.js +0 -27
- package/lib/components/ModelCompareV3/assets/firewall.svg.js.map +0 -1
- package/lib/components/ModelCompareV3/assets/firewall.svg.mjs +0 -3
- package/lib/components/ModelCompareV3/assets/firewall.svg.mjs.map +0 -1
- package/lib/components/ModelCompareV3/assets/globe-shield.svg.js +0 -27
- package/lib/components/ModelCompareV3/assets/globe-shield.svg.js.map +0 -1
- package/lib/components/ModelCompareV3/assets/globe-shield.svg.mjs +0 -3
- package/lib/components/ModelCompareV3/assets/globe-shield.svg.mjs.map +0 -1
- package/lib/components/ModelCompareV3/assets/keylock.svg.js.map +0 -1
- package/lib/components/ModelCompareV3/assets/keylock.svg.mjs +0 -3
- package/lib/components/ModelCompareV3/assets/keylock.svg.mjs.map +0 -1
- package/lib/components/ModelCompareV3/assets/magnifying-glass.svg.js +0 -27
- package/lib/components/ModelCompareV3/assets/magnifying-glass.svg.js.map +0 -1
- package/lib/components/ModelCompareV3/assets/magnifying-glass.svg.mjs +0 -3
- package/lib/components/ModelCompareV3/assets/magnifying-glass.svg.mjs.map +0 -1
- package/lib/components/ModelCompareV3/data/products/gatewayLiteTechnologyVertical.d.ts +0 -2
- package/lib/components/ModelCompareV3/data/products/gatewayLiteTechnologyVertical.js +0 -89
- package/lib/components/ModelCompareV3/data/products/gatewayLiteTechnologyVertical.js.map +0 -1
- package/lib/components/ModelCompareV3/data/products/gatewayLiteTechnologyVertical.mjs +0 -81
- package/lib/components/ModelCompareV3/data/products/gatewayLiteTechnologyVertical.mjs.map +0 -1
- package/lib/components/ModelCompareV3/data/products/gatewayProfessionalTechnologyVertical.d.ts +0 -2
- package/lib/components/ModelCompareV3/data/products/gatewayProfessionalTechnologyVertical.js +0 -90
- package/lib/components/ModelCompareV3/data/products/gatewayProfessionalTechnologyVertical.js.map +0 -1
- package/lib/components/ModelCompareV3/data/products/gatewayProfessionalTechnologyVertical.mjs +0 -82
- package/lib/components/ModelCompareV3/data/products/gatewayProfessionalTechnologyVertical.mjs.map +0 -1
- package/lib/components/ModelCompareV3/data/products/udm.d.ts +0 -2
- package/lib/components/ModelCompareV3/data/products/udm.js +0 -89
- package/lib/components/ModelCompareV3/data/products/udm.js.map +0 -1
- package/lib/components/ModelCompareV3/data/products/udm.mjs +0 -81
- package/lib/components/ModelCompareV3/data/products/udm.mjs.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/applicationAwareFirewall.d.ts +0 -2
- package/lib/components/ModelCompareV3/data/properties/applicationAwareFirewall.js +0 -18
- package/lib/components/ModelCompareV3/data/properties/applicationAwareFirewall.js.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/applicationAwareFirewall.mjs +0 -10
- package/lib/components/ModelCompareV3/data/properties/applicationAwareFirewall.mjs.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/intrusionPreventionSystem.d.ts +0 -2
- package/lib/components/ModelCompareV3/data/properties/intrusionPreventionSystem.js +0 -18
- package/lib/components/ModelCompareV3/data/properties/intrusionPreventionSystem.js.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/intrusionPreventionSystem.mjs +0 -10
- package/lib/components/ModelCompareV3/data/properties/intrusionPreventionSystem.mjs.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/ipsThroughput.d.ts +0 -2
- package/lib/components/ModelCompareV3/data/properties/ipsThroughput.js +0 -18
- package/lib/components/ModelCompareV3/data/properties/ipsThroughput.js.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/ipsThroughput.mjs +0 -10
- package/lib/components/ModelCompareV3/data/properties/ipsThroughput.mjs.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/ipsVpnThroughput.d.ts +0 -2
- package/lib/components/ModelCompareV3/data/properties/ipsVpnThroughput.js +0 -18
- package/lib/components/ModelCompareV3/data/properties/ipsVpnThroughput.js.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/ipsVpnThroughput.mjs +0 -10
- package/lib/components/ModelCompareV3/data/properties/ipsVpnThroughput.mjs.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/openVpnThroughput.d.ts +0 -2
- package/lib/components/ModelCompareV3/data/properties/openVpnThroughput.js +0 -18
- package/lib/components/ModelCompareV3/data/properties/openVpnThroughput.js.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/openVpnThroughput.mjs +0 -10
- package/lib/components/ModelCompareV3/data/properties/openVpnThroughput.mjs.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/routingThroughput.d.ts +0 -2
- package/lib/components/ModelCompareV3/data/properties/routingThroughput.js +0 -18
- package/lib/components/ModelCompareV3/data/properties/routingThroughput.js.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/routingThroughput.mjs +0 -10
- package/lib/components/ModelCompareV3/data/properties/routingThroughput.mjs.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/sslInspection.d.ts +0 -2
- package/lib/components/ModelCompareV3/data/properties/sslInspection.js +0 -18
- package/lib/components/ModelCompareV3/data/properties/sslInspection.js.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/sslInspection.mjs +0 -10
- package/lib/components/ModelCompareV3/data/properties/sslInspection.mjs.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/sslInspectionPerformance.d.ts +0 -2
- package/lib/components/ModelCompareV3/data/properties/sslInspectionPerformance.js +0 -18
- package/lib/components/ModelCompareV3/data/properties/sslInspectionPerformance.js.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/sslInspectionPerformance.mjs +0 -10
- package/lib/components/ModelCompareV3/data/properties/sslInspectionPerformance.mjs.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/wireGuardVpnThroughput.d.ts +0 -2
- package/lib/components/ModelCompareV3/data/properties/wireGuardVpnThroughput.js +0 -18
- package/lib/components/ModelCompareV3/data/properties/wireGuardVpnThroughput.js.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/wireGuardVpnThroughput.mjs +0 -10
- package/lib/components/ModelCompareV3/data/properties/wireGuardVpnThroughput.mjs.map +0 -1
- package/lib/components/ModelCompareV3/data/technologyVerticals/Cybersecurity/Compare1.d.ts +0 -2
- package/lib/components/ModelCompareV3/data/technologyVerticals/Cybersecurity/Compare1.js +0 -26
- package/lib/components/ModelCompareV3/data/technologyVerticals/Cybersecurity/Compare1.js.map +0 -1
- package/lib/components/ModelCompareV3/data/technologyVerticals/Cybersecurity/Compare1.mjs +0 -24
- package/lib/components/ModelCompareV3/data/technologyVerticals/Cybersecurity/Compare1.mjs.map +0 -1
- package/lib/components/ModelCompareV3/data/technologyVerticals/Cybersecurity/Compare2.d.ts +0 -1
- package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.js +0 -27
- package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.js.map +0 -1
- package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.mjs +0 -3
- package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.mjs.map +0 -1
- package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.js +0 -27
- package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.js.map +0 -1
- package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.mjs +0 -3
- package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.mjs.map +0 -1
- package/lib/constants/icons/menu/sfpAndCable.svg.js +0 -27
- package/lib/constants/icons/menu/sfpAndCable.svg.js.map +0 -1
- package/lib/constants/icons/menu/sfpAndCable.svg.mjs +0 -3
- package/lib/constants/icons/menu/sfpAndCable.svg.mjs.map +0 -1
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var react = require('react');
|
|
5
|
-
require('../../contexts/MenuContext/
|
|
5
|
+
require('../../contexts/MenuContext/index.js');
|
|
6
|
+
var mapping = require('../../contexts/MenuContext/mapping.js');
|
|
6
7
|
require('../../hooks/index.js');
|
|
7
8
|
var asset = require('../../utils/asset.js');
|
|
8
9
|
require('../Container/index.js');
|
|
@@ -10,6 +11,7 @@ var Footer_styles = require('./Footer.styles.js');
|
|
|
10
11
|
var Footer_types = require('./Footer.types.js');
|
|
11
12
|
var useFooterContent = require('./hooks/useFooterContent.js');
|
|
12
13
|
var en = require('./translations/en.json.js');
|
|
14
|
+
var context = require('../../contexts/MenuContext/context.js');
|
|
13
15
|
var useTranslation = require('../../hooks/useTranslation.js');
|
|
14
16
|
var constants = require('../../types/constants.js');
|
|
15
17
|
var Container = require('../Container/Container.js');
|
|
@@ -32,17 +34,21 @@ const getNewsletterSubscribeErrorCodeTranslationKey = errorCode => {
|
|
|
32
34
|
return translationKeys.footerNewsletterError;
|
|
33
35
|
}
|
|
34
36
|
};
|
|
35
|
-
const Footer =
|
|
37
|
+
const Footer = ({
|
|
36
38
|
legalOnly,
|
|
37
39
|
motif = "light",
|
|
38
40
|
id,
|
|
39
41
|
customer,
|
|
40
|
-
storeId,
|
|
41
42
|
storePicker,
|
|
42
43
|
storeBackendUrl,
|
|
44
|
+
storeAddress,
|
|
43
45
|
className
|
|
44
|
-
}) {
|
|
46
|
+
}) => {
|
|
45
47
|
const formRef = react.useRef(null);
|
|
48
|
+
const {
|
|
49
|
+
storeId,
|
|
50
|
+
context: context$1
|
|
51
|
+
} = context.useMenu();
|
|
46
52
|
const [formStatus, setFormStatus] = react.useState(void 0);
|
|
47
53
|
const [loading, setLoading] = react.useState(false);
|
|
48
54
|
const [emailValue, setEmailValue] = react.useState("");
|
|
@@ -83,7 +89,9 @@ const Footer = react.memo(function Footer2({
|
|
|
83
89
|
[constants.Language.Fr]: () => Promise.resolve().then(function () {
|
|
84
90
|
return require('./translations/fr.json.js');
|
|
85
91
|
}).then(res => res.default),
|
|
86
|
-
[constants.Language.Tw]: () => Promise.resolve(
|
|
92
|
+
[constants.Language.Tw]: () => Promise.resolve().then(function () {
|
|
93
|
+
return require('./translations/zh-Hant-TW.json.js');
|
|
94
|
+
}).then(res => res.default)
|
|
87
95
|
}
|
|
88
96
|
});
|
|
89
97
|
const hiddenFields = react.useMemo(() => {
|
|
@@ -148,95 +156,105 @@ const Footer = react.memo(function Footer2({
|
|
|
148
156
|
}, [emailValue, formatMessage, hiddenFields, storeBackendUrl]);
|
|
149
157
|
return /* @__PURE__ */jsxRuntime.jsx(Footer_styles.ContainerWrap, {
|
|
150
158
|
condensed: legalOnly,
|
|
151
|
-
$
|
|
159
|
+
$motif: motif,
|
|
152
160
|
id,
|
|
153
161
|
className,
|
|
154
|
-
children: /* @__PURE__ */jsxRuntime.
|
|
162
|
+
children: /* @__PURE__ */jsxRuntime.jsx(Container.Container, {
|
|
155
163
|
size: "desktop",
|
|
156
164
|
noVerticalMargin: true,
|
|
157
|
-
children:
|
|
158
|
-
children: [/* @__PURE__ */jsxRuntime.jsxs(
|
|
159
|
-
children: [/* @__PURE__ */jsxRuntime.
|
|
160
|
-
children:
|
|
161
|
-
children:
|
|
162
|
-
children: [
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
children: /* @__PURE__ */jsxRuntime.jsx(Footer_styles.
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}, `footer-list-${i}`))
|
|
173
|
-
}), /* @__PURE__ */jsxRuntime.jsxs(Footer_styles.InnerWrap, {
|
|
174
|
-
children: [/* @__PURE__ */jsxRuntime.jsxs(Footer_styles.Form, {
|
|
175
|
-
onSubmit: handleNewsletterSubmit,
|
|
176
|
-
ref: formRef,
|
|
177
|
-
children: [/* @__PURE__ */jsxRuntime.jsx(Footer_styles.Header, {
|
|
178
|
-
children: formatMessage("footer.newsletter.touch")
|
|
179
|
-
}), /* @__PURE__ */jsxRuntime.jsxs(Footer_styles.InputWrap, {
|
|
180
|
-
children: [/* @__PURE__ */jsxRuntime.jsx(Footer_styles.Input, {
|
|
181
|
-
type: "text",
|
|
182
|
-
pattern: "[^@\\s]+@[^@\\s]+\\.[^@\\s]+",
|
|
183
|
-
minLength: 6,
|
|
184
|
-
maxLength: 254,
|
|
185
|
-
required: true,
|
|
186
|
-
autoCapitalize: "off",
|
|
187
|
-
autoCorrect: "off",
|
|
188
|
-
placeholder: formatMessage("footer.newsletter.email"),
|
|
189
|
-
name: "email",
|
|
190
|
-
value: emailValue,
|
|
191
|
-
onChange: e => setEmailValue(e.target.value),
|
|
192
|
-
disabled: loading
|
|
193
|
-
}), /* @__PURE__ */jsxRuntime.jsx(Footer_styles.SubmitButton, {
|
|
194
|
-
type: "submit",
|
|
195
|
-
className: motif,
|
|
196
|
-
variant: "primary",
|
|
197
|
-
loading,
|
|
198
|
-
children: formatMessage("footer.newsletter.subscribe")
|
|
165
|
+
children: /* @__PURE__ */jsxRuntime.jsxs(Footer_styles.InnerContainer, {
|
|
166
|
+
children: [!legalOnly && /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
167
|
+
children: [/* @__PURE__ */jsxRuntime.jsxs(Footer_styles.Wrap, {
|
|
168
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(Footer_styles.ListsWrap, {
|
|
169
|
+
children: Object.values(footerContent).map((list, i) => /* @__PURE__ */jsxRuntime.jsxs(Footer_styles.ListItemWrap, {
|
|
170
|
+
children: [/* @__PURE__ */jsxRuntime.jsxs(Footer_styles.Header, {
|
|
171
|
+
children: [" ", list.header.label]
|
|
172
|
+
}), /* @__PURE__ */jsxRuntime.jsx(Footer_styles.List, {
|
|
173
|
+
children: list.items.map((item, j) => /* @__PURE__ */jsxRuntime.jsx(Footer_styles.ListItem, {
|
|
174
|
+
children: /* @__PURE__ */jsxRuntime.jsx(Footer_styles.ListItemAnchor, {
|
|
175
|
+
href: item.src,
|
|
176
|
+
target: item.target,
|
|
177
|
+
children: item.label
|
|
178
|
+
})
|
|
179
|
+
}, `footer-list-${i}-item-${j}`))
|
|
199
180
|
})]
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
|
|
181
|
+
}, `footer-list-${i}`))
|
|
182
|
+
}), /* @__PURE__ */jsxRuntime.jsxs(Footer_styles.InnerWrap, {
|
|
183
|
+
children: [/* @__PURE__ */jsxRuntime.jsxs(Footer_styles.Form, {
|
|
184
|
+
onSubmit: handleNewsletterSubmit,
|
|
185
|
+
ref: formRef,
|
|
186
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(Footer_styles.Header, {
|
|
187
|
+
children: formatMessage("footer.newsletter.touch")
|
|
188
|
+
}), /* @__PURE__ */jsxRuntime.jsxs(Footer_styles.InputWrap, {
|
|
189
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(Footer_styles.Input, {
|
|
190
|
+
type: "text",
|
|
191
|
+
pattern: "[^@\\s]+@[^@\\s]+\\.[^@\\s]+",
|
|
192
|
+
minLength: 6,
|
|
193
|
+
maxLength: 254,
|
|
194
|
+
required: true,
|
|
195
|
+
autoCapitalize: "off",
|
|
196
|
+
autoCorrect: "off",
|
|
197
|
+
placeholder: formatMessage("footer.newsletter.email"),
|
|
198
|
+
name: "email",
|
|
199
|
+
value: emailValue,
|
|
200
|
+
onChange: e => setEmailValue(e.target.value),
|
|
201
|
+
disabled: loading
|
|
202
|
+
}), /* @__PURE__ */jsxRuntime.jsx(Footer_styles.SubmitButton, {
|
|
203
|
+
type: "submit",
|
|
204
|
+
className: motif,
|
|
205
|
+
variant: "primary",
|
|
206
|
+
loading,
|
|
207
|
+
children: formatMessage("footer.newsletter.subscribe")
|
|
208
|
+
})]
|
|
209
|
+
}), formStatus && /* @__PURE__ */jsxRuntime.jsx(Footer_styles.FormMessage, {
|
|
210
|
+
$status: formStatus.status,
|
|
211
|
+
children: formStatus.message
|
|
212
|
+
})]
|
|
213
|
+
}), /* @__PURE__ */jsxRuntime.jsx(Footer_styles.IconsWrapper, {
|
|
214
|
+
children: socialContent.items.map(socialItem => /* @__PURE__ */jsxRuntime.jsx(Footer_styles.IconWrapper, {
|
|
215
|
+
href: socialItem.src,
|
|
216
|
+
target: socialItem.target,
|
|
217
|
+
children: socialItem.icon ? /* @__PURE__ */jsxRuntime.jsx("img", {
|
|
218
|
+
src: asset.imageSrc(socialItem.icon),
|
|
219
|
+
alt: socialItem.label
|
|
220
|
+
}) : socialItem.label
|
|
221
|
+
}, `footer-social-link-${socialItem.label}`))
|
|
203
222
|
})]
|
|
204
|
-
}), /* @__PURE__ */jsxRuntime.jsx(Footer_styles.IconsWrapper, {
|
|
205
|
-
children: socialContent.items.map(socialItem => /* @__PURE__ */jsxRuntime.jsx(Footer_styles.IconWrapper, {
|
|
206
|
-
href: socialItem.src,
|
|
207
|
-
target: socialItem.target,
|
|
208
|
-
children: socialItem.icon ? /* @__PURE__ */jsxRuntime.jsx("img", {
|
|
209
|
-
src: asset.imageSrc(socialItem.icon),
|
|
210
|
-
alt: socialItem.label
|
|
211
|
-
}) : socialItem.label
|
|
212
|
-
}, `footer-social-link-${socialItem.label}`))
|
|
213
223
|
})]
|
|
224
|
+
}), /* @__PURE__ */jsxRuntime.jsx(Footer_styles.Break, {
|
|
225
|
+
$motif: motif
|
|
214
226
|
})]
|
|
215
|
-
}), /* @__PURE__ */jsxRuntime.
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
227
|
+
}), context$1 === mapping.SiteId.Store && storeAddress && /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
228
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(Footer_styles.StoreAddress, {
|
|
229
|
+
children: storeAddress
|
|
230
|
+
}), /* @__PURE__ */jsxRuntime.jsx(Footer_styles.Break, {
|
|
231
|
+
$motif: motif
|
|
232
|
+
})]
|
|
233
|
+
}), /* @__PURE__ */jsxRuntime.jsxs(Footer_styles.TermsWrap, {
|
|
234
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(Footer_styles.FlexWrap, {
|
|
235
|
+
children: termsContent.items.map((term, i) => /* @__PURE__ */jsxRuntime.jsxs(Footer_styles.AnchorGroup, {
|
|
236
|
+
children: [term.id === useFooterContent.FooterLinkId.Cookie ? /* @__PURE__ */jsxRuntime.jsx(Footer_styles.CookieBtn, {
|
|
237
|
+
type: "button",
|
|
238
|
+
id: useFooterContent.COOKIE_POLICY_BTN_ID,
|
|
239
|
+
className: useFooterContent.COOKIE_POLICY_BTN_ID_CLASSNAME,
|
|
240
|
+
children: term.label
|
|
241
|
+
}, `footer-term-${term.id}`) : /* @__PURE__ */jsxRuntime.jsx(Footer_styles.Anchor, {
|
|
242
|
+
href: term.src,
|
|
243
|
+
target: term.target,
|
|
244
|
+
children: term.label
|
|
245
|
+
}), /* @__PURE__ */jsxRuntime.jsx(Footer_styles.AnchorDivider, {
|
|
246
|
+
children: i !== termsContent.items.length - 1 && "|"
|
|
247
|
+
})]
|
|
248
|
+
}, `footer-term-${term.id}`))
|
|
249
|
+
}), /* @__PURE__ */jsxRuntime.jsxs(Footer_styles.FlexWrapResponsive, {
|
|
250
|
+
children: [storePicker, /* @__PURE__ */jsxRuntime.jsxs(Footer_styles.Copyright, {
|
|
251
|
+
children: ["\xA9 ", ( /* @__PURE__ */new Date()).getFullYear(), " ", formatMessage("footer.copyright")]
|
|
232
252
|
})]
|
|
233
|
-
}
|
|
234
|
-
}), storePicker, /* @__PURE__ */jsxRuntime.jsxs(Footer_styles.Copyright, {
|
|
235
|
-
children: ["\xA9 ", ( /* @__PURE__ */new Date()).getFullYear(), " ", formatMessage("footer.copyright")]
|
|
253
|
+
})]
|
|
236
254
|
})]
|
|
237
|
-
})
|
|
255
|
+
})
|
|
238
256
|
})
|
|
239
257
|
});
|
|
240
|
-
}
|
|
258
|
+
};
|
|
241
259
|
exports.Footer = Footer;
|
|
242
260
|
//# sourceMappingURL=Footer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.js","sources":["../../../src/components/Footer/Footer.tsx"],"sourcesContent":["import { memo, useCallback, useMemo, useRef, useState } from \"react\";\n\nimport { Language } from \"../../contexts/MenuContext/mapping\";\nimport { useTranslation } from \"../../hooks\";\nimport { imageSrc } from \"../../utils/asset\";\nimport { Container } from \"../Container\";\nimport {\n Anchor,\n AnchorDivider,\n AnchorGroup,\n Break,\n ContainerWrap,\n CookieBtn,\n Copyright,\n FlexWrap,\n Form,\n FormMessage,\n Header,\n IconsWrapper,\n IconWrapper,\n InnerWrap,\n Input,\n InputWrap,\n List,\n ListItem,\n ListItemAnchor,\n ListItemWrap,\n ListsWrap,\n SubmitButton,\n TermsWrap,\n Wrap,\n} from \"./Footer.styles\";\nimport type {\n FooterProps,\n FooterTranslationKey,\n NewsletterSubscribeResult,\n} from \"./Footer.types\";\nimport { FormStatus, NewsletterSubscribeErrorCode } from \"./Footer.types\";\nimport {\n COOKIE_POLICY_BTN_ID,\n COOKIE_POLICY_BTN_ID_CLASSNAME,\n FooterLinkId,\n useFooterContent,\n} from \"./hooks/useFooterContent\";\nimport EN_TRANSLATION from \"./translations/en.json\";\n\nconst translationKeys = {\n footerNewsletterError: \"footer.newsletter.error\",\n} as const;\n\nconst getNewsletterSubscribeErrorCodeTranslationKey = (\n errorCode?: NewsletterSubscribeErrorCode,\n): FooterTranslationKey => {\n switch (errorCode) {\n case NewsletterSubscribeErrorCode.MissingEmail:\n return \"footer.newsletter.error.missingEmail\";\n case NewsletterSubscribeErrorCode.InvalidEmail:\n return \"footer.newsletter.error.invalidEmail\";\n case NewsletterSubscribeErrorCode.TooManyRequests:\n return \"footer.newsletter.error.tooManyRequests\";\n // Don't want to show error message about Store ID being invalid because it is added in the background\n case NewsletterSubscribeErrorCode.InvalidStoreId:\n case NewsletterSubscribeErrorCode.Generic:\n return translationKeys.footerNewsletterError;\n default:\n return translationKeys.footerNewsletterError;\n }\n};\n\nexport const Footer = memo(function Footer({\n legalOnly,\n motif = \"light\",\n id,\n customer,\n storeId,\n storePicker,\n storeBackendUrl,\n className,\n}: FooterProps) {\n const formRef = useRef<HTMLFormElement>(null);\n\n const [formStatus, setFormStatus] = useState<\n | {\n status: FormStatus;\n message: string;\n }\n | undefined\n >(undefined);\n\n const [loading, setLoading] = useState<boolean>(false);\n const [emailValue, setEmailValue] = useState<string>(\"\");\n\n // #############################################################################\n // Content\n // #############################################################################\n const { footerContent, socialContent, termsContent } = useFooterContent();\n\n // #############################################################################\n // Translations\n // #############################################################################\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]: () => Promise.resolve(EN_TRANSLATION),\n },\n });\n\n // #############################################################################\n // Hidden fields\n // #############################################################################\n const hiddenFields = useMemo(() => {\n const fields = {\n ...customer,\n storeId,\n };\n\n return (\n Object.entries(fields)\n // Remove empty values\n .reduce(\n (acc, [key, value]) => {\n if (value) {\n acc[key] = value;\n }\n\n return acc;\n },\n {} as Record<string, string>,\n )\n );\n }, [customer, storeId]);\n\n // #############################################################################\n // Newsletter form\n // #############################################################################\n const handleNewsletterSubmit = useCallback(\n async (e) => {\n setLoading(true);\n setFormStatus(undefined);\n\n e.preventDefault();\n\n const data = {\n email: emailValue,\n ...hiddenFields,\n };\n\n const url = new URL(storeBackendUrl);\n url.pathname = \"/newsletter/subscribe\";\n\n try {\n const response = await fetch(url, {\n method: \"POST\",\n body: JSON.stringify(data),\n headers: {\n \"Content-Type\": \"application/json\",\n },\n });\n\n const json = (await response.json()) as NewsletterSubscribeResult;\n\n if (!response.ok) {\n const errorCode =\n json?.result === \"error\" ? json?.[\"code\"] : undefined;\n\n setFormStatus({\n status: FormStatus.Error,\n message: formatMessage(\n getNewsletterSubscribeErrorCodeTranslationKey(errorCode),\n ),\n });\n } else {\n if (json.result === \"success\") {\n setFormStatus({\n status: FormStatus.Success,\n message: formatMessage(\"footer.newsletter.success\"),\n });\n\n formRef.current?.reset();\n } else {\n setFormStatus({\n status: FormStatus.Error,\n message: getNewsletterSubscribeErrorCodeTranslationKey(\n json?.[\"code\"],\n ),\n });\n }\n }\n } catch (error) {\n console.error(error);\n setFormStatus({\n status: FormStatus.Error,\n message: formatMessage(translationKeys.footerNewsletterError),\n });\n }\n\n // Reset loading state\n setLoading(false);\n },\n [emailValue, formatMessage, hiddenFields, storeBackendUrl],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <ContainerWrap\n condensed={legalOnly}\n $darkMode={motif === \"dark\"}\n // This id is important for injecting sidekick mobile embed styles\n id={id}\n className={className}\n >\n <Container size=\"desktop\" noVerticalMargin>\n {!legalOnly && (\n <>\n <Wrap>\n <ListsWrap>\n {Object.values(footerContent).map((list, i) => (\n <ListItemWrap key={`footer-list-${i}`}>\n <Header> {list.header.label}</Header>\n <List>\n {list.items.map((item, j) => (\n <ListItem key={`footer-list-${i}-item-${j}`}>\n <ListItemAnchor href={item.src} target={item.target}>\n {item.label}\n </ListItemAnchor>\n </ListItem>\n ))}\n </List>\n </ListItemWrap>\n ))}\n </ListsWrap>\n <InnerWrap>\n <Form onSubmit={handleNewsletterSubmit} ref={formRef}>\n <Header>{formatMessage(\"footer.newsletter.touch\")}</Header>\n\n <InputWrap>\n <Input\n /**\n * According to StackOverflow, using type=\"text\" together\n * with pattern attribute is a better way to validate email\n * addresses than using the `type=\"email\"`.\n * Code below is partly taken old ui.com Footer component.\n * @see https://stackoverflow.com/a/36379040\n */\n type=\"text\"\n pattern=\"[^@\\s]+@[^@\\s]+\\.[^@\\s]+\"\n minLength={6}\n maxLength={254}\n required\n autoCapitalize=\"off\"\n autoCorrect=\"off\"\n placeholder={formatMessage(\"footer.newsletter.email\")}\n name=\"email\"\n value={emailValue}\n onChange={(e) => setEmailValue(e.target.value)}\n disabled={loading}\n />\n\n <SubmitButton\n type=\"submit\"\n className={motif}\n variant=\"primary\"\n loading={loading}\n >\n {formatMessage(\"footer.newsletter.subscribe\")}\n </SubmitButton>\n </InputWrap>\n\n {formStatus && (\n <FormMessage $status={formStatus.status}>\n {formStatus.message}\n </FormMessage>\n )}\n </Form>\n <IconsWrapper>\n {socialContent.items.map((socialItem) => (\n <IconWrapper\n href={socialItem.src}\n key={`footer-social-link-${socialItem.label}`}\n target={socialItem.target}\n >\n {socialItem.icon ? (\n <img\n src={imageSrc(socialItem.icon)}\n alt={socialItem.label}\n />\n ) : (\n socialItem.label\n )}\n </IconWrapper>\n ))}\n </IconsWrapper>\n </InnerWrap>\n </Wrap>\n <Break $darkMode={motif === \"dark\"} />\n </>\n )}\n\n <TermsWrap>\n <FlexWrap>\n {termsContent.items.map((term, i) =>\n term.id === FooterLinkId.Cookie ? (\n <CookieBtn\n type=\"button\"\n id={COOKIE_POLICY_BTN_ID}\n className={COOKIE_POLICY_BTN_ID_CLASSNAME}\n key={`footer-term-${term.id}`}\n >\n {term.label}\n </CookieBtn>\n ) : (\n <AnchorGroup key={`footer-term-${term.id}`}>\n <Anchor href={term.src} target={term.target}>\n {term.label}\n </Anchor>\n <AnchorDivider>\n {i !== termsContent.items.length - 1 && \"|\"}\n </AnchorDivider>\n </AnchorGroup>\n ),\n )}\n </FlexWrap>\n\n {/**\n * Renders store picker component if provided (needed only in SF)\n */}\n {storePicker}\n\n <Copyright>\n © {new Date().getFullYear()} {formatMessage(\"footer.copyright\")}\n </Copyright>\n </TermsWrap>\n </Container>\n </ContainerWrap>\n );\n});\n"],"names":["translationKeys","footerNewsletterError","getNewsletterSubscribeErrorCodeTranslationKey","errorCode","NewsletterSubscribeErrorCode","MissingEmail","InvalidEmail","TooManyRequests","InvalidStoreId","Generic","Footer","memo","Footer2","legalOnly","motif","id","customer","storeId","storePicker","storeBackendUrl","className","formRef","useRef","formStatus","setFormStatus","useState","loading","setLoading","emailValue","setEmailValue","footerContent","socialContent","termsContent","useFooterContent","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","Promise","then","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","Tw","resolve","hiddenFields","useMemo","fields","Object","entries","reduce","acc","key","value","handleNewsletterSubmit","useCallback","e","preventDefault","data","email","url","URL","pathname","response","fetch","method","body","JSON","stringify","headers","json","ok","result","status","FormStatus","Error","message","Success","current","reset","error","console","jsx","ContainerWrap","condensed","$darkMode","children","jsxs","Container","size","noVerticalMargin","Fragment","Wrap","ListsWrap","values","map","list","i","ListItemWrap","Header","header","label","List","items","item","j","ListItem","ListItemAnchor","href","src","target","InnerWrap","Form","onSubmit","ref","InputWrap","Input","type","pattern","minLength","maxLength","required","autoCapitalize","autoCorrect","placeholder","name","onChange","disabled","SubmitButton","variant","FormMessage","$status","IconsWrapper","socialItem","IconWrapper","icon","imageSrc","alt","Break","TermsWrap","FlexWrap","term","FooterLinkId","Cookie","CookieBtn","COOKIE_POLICY_BTN_ID","COOKIE_POLICY_BTN_ID_CLASSNAME","AnchorGroup","Anchor","AnchorDivider","length","Copyright","Date","getFullYear"],"mappings":";;;;;;;;;;;;;;;;AA8CA,MAAMA,eAAkB,GAAA;EACtBC,qBAAuB,EAAA;AACzB,CAAA;AAEA,MAAMC,6CAAA,GACJC,SACyB,IAAA;EACzB,QAAQA,SAAW;IACjB,KAAKC,YAA6B,CAAAA,4BAAA,CAAAC,YAAA;MACzB,OAAA,sCAAA;IACT,KAAKD,YAA6B,CAAAA,4BAAA,CAAAE,YAAA;MACzB,OAAA,sCAAA;IACT,KAAKF,YAA6B,CAAAA,4BAAA,CAAAG,eAAA;MACzB,OAAA,yCAAA;IAET,KAAKH,YAAAA,CAAAA,4BAA6B,CAAAI,cAAA;I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AAA;UANgB,CAAA,EAAA,eAAeT,IAAK,CAAAxI,EAOtC,EAAA,CAAA;SAGN,CAAA,EAKCG,WAAA,EAAA,+BAEA+I,aAAAA,CAAAA,SAAU,EAAA;UAAAjE,QAAA,EAAA,CAAA,OAAA,EACN,iBAAA,IAAIkE,IAAK,CAAA,CAAA,EAAEC,WAAY,CAAA,CAAA,EAAE,GAAA,EAAEjI,cAAc,kBAAkB,CAAA;SAChE,CAAA;OACF,CAAA;KACF;EAAA,CAAA,CACF;AAEJ,CAAC,CAAA;"}
|
|
1
|
+
{"version":3,"file":"Footer.js","sources":["../../../src/components/Footer/Footer.tsx"],"sourcesContent":["import { useCallback, useMemo, useRef, useState } from \"react\";\n\nimport { useMenu } from \"../../contexts/MenuContext\";\nimport { Language, SiteId } from \"../../contexts/MenuContext/mapping\";\nimport { useTranslation } from \"../../hooks\";\nimport { imageSrc } from \"../../utils/asset\";\nimport { Container } from \"../Container\";\nimport {\n Anchor,\n AnchorDivider,\n AnchorGroup,\n Break,\n ContainerWrap,\n CookieBtn,\n Copyright,\n FlexWrap,\n FlexWrapResponsive,\n Form,\n FormMessage,\n Header,\n IconsWrapper,\n IconWrapper,\n InnerContainer,\n InnerWrap,\n Input,\n InputWrap,\n List,\n ListItem,\n ListItemAnchor,\n ListItemWrap,\n ListsWrap,\n StoreAddress,\n SubmitButton,\n TermsWrap,\n Wrap,\n} from \"./Footer.styles\";\nimport type {\n FooterProps,\n FooterTranslationKey,\n NewsletterSubscribeResult,\n} from \"./Footer.types\";\nimport { FormStatus, NewsletterSubscribeErrorCode } from \"./Footer.types\";\nimport {\n COOKIE_POLICY_BTN_ID,\n COOKIE_POLICY_BTN_ID_CLASSNAME,\n FooterLinkId,\n useFooterContent,\n} from \"./hooks/useFooterContent\";\nimport EN_TRANSLATION from \"./translations/en.json\";\n\nconst translationKeys = {\n footerNewsletterError: \"footer.newsletter.error\",\n} as const;\n\nconst getNewsletterSubscribeErrorCodeTranslationKey = (\n errorCode?: NewsletterSubscribeErrorCode,\n): FooterTranslationKey => {\n switch (errorCode) {\n case NewsletterSubscribeErrorCode.MissingEmail:\n return \"footer.newsletter.error.missingEmail\";\n case NewsletterSubscribeErrorCode.InvalidEmail:\n return \"footer.newsletter.error.invalidEmail\";\n case NewsletterSubscribeErrorCode.TooManyRequests:\n return \"footer.newsletter.error.tooManyRequests\";\n // Don't want to show error message about Store ID being invalid because it is added in the background\n case NewsletterSubscribeErrorCode.InvalidStoreId:\n case NewsletterSubscribeErrorCode.Generic:\n return translationKeys.footerNewsletterError;\n default:\n return translationKeys.footerNewsletterError;\n }\n};\n\nexport const Footer = ({\n legalOnly,\n motif = \"light\",\n id,\n customer,\n storePicker,\n storeBackendUrl,\n storeAddress,\n className,\n}: FooterProps) => {\n const formRef = useRef<HTMLFormElement>(null);\n const { storeId, context } = useMenu();\n\n const [formStatus, setFormStatus] = useState<\n | {\n status: FormStatus;\n message: string;\n }\n | undefined\n >(undefined);\n\n const [loading, setLoading] = useState<boolean>(false);\n const [emailValue, setEmailValue] = useState<string>(\"\");\n\n // #############################################################################\n // Content\n // #############################################################################\n const { footerContent, socialContent, termsContent } = useFooterContent();\n\n // #############################################################################\n // Translations\n // #############################################################################\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 // #############################################################################\n // Hidden fields\n // #############################################################################\n const hiddenFields = useMemo(() => {\n const fields = {\n ...customer,\n storeId,\n };\n\n return (\n Object.entries(fields)\n // Remove empty values\n .reduce(\n (acc, [key, value]) => {\n if (value) {\n acc[key] = value;\n }\n\n return acc;\n },\n {} as Record<string, string>,\n )\n );\n }, [customer, storeId]);\n\n // #############################################################################\n // Newsletter form\n // #############################################################################\n const handleNewsletterSubmit = useCallback(\n async (e) => {\n setLoading(true);\n setFormStatus(undefined);\n\n e.preventDefault();\n\n const data = {\n email: emailValue,\n ...hiddenFields,\n };\n\n const url = new URL(storeBackendUrl);\n url.pathname = \"/newsletter/subscribe\";\n\n try {\n const response = await fetch(url, {\n method: \"POST\",\n body: JSON.stringify(data),\n headers: {\n \"Content-Type\": \"application/json\",\n },\n });\n\n const json = (await response.json()) as NewsletterSubscribeResult;\n\n if (!response.ok) {\n const errorCode =\n json?.result === \"error\" ? json?.[\"code\"] : undefined;\n\n setFormStatus({\n status: FormStatus.Error,\n message: formatMessage(\n getNewsletterSubscribeErrorCodeTranslationKey(errorCode),\n ),\n });\n } else {\n if (json.result === \"success\") {\n setFormStatus({\n status: FormStatus.Success,\n message: formatMessage(\"footer.newsletter.success\"),\n });\n\n formRef.current?.reset();\n } else {\n setFormStatus({\n status: FormStatus.Error,\n message: getNewsletterSubscribeErrorCodeTranslationKey(\n json?.[\"code\"],\n ),\n });\n }\n }\n } catch (error) {\n console.error(error);\n setFormStatus({\n status: FormStatus.Error,\n message: formatMessage(translationKeys.footerNewsletterError),\n });\n }\n\n // Reset loading state\n setLoading(false);\n },\n [emailValue, formatMessage, hiddenFields, storeBackendUrl],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <ContainerWrap\n condensed={legalOnly}\n $motif={motif}\n // This id is important for injecting sidekick mobile embed styles\n id={id}\n className={className}\n >\n <Container size=\"desktop\" noVerticalMargin>\n <InnerContainer>\n {!legalOnly && (\n <>\n <Wrap>\n <ListsWrap>\n {Object.values(footerContent).map((list, i) => (\n <ListItemWrap key={`footer-list-${i}`}>\n <Header> {list.header.label}</Header>\n <List>\n {list.items.map((item, j) => (\n <ListItem key={`footer-list-${i}-item-${j}`}>\n <ListItemAnchor\n href={item.src}\n target={item.target}\n >\n {item.label}\n </ListItemAnchor>\n </ListItem>\n ))}\n </List>\n </ListItemWrap>\n ))}\n </ListsWrap>\n <InnerWrap>\n <Form onSubmit={handleNewsletterSubmit} ref={formRef}>\n <Header>{formatMessage(\"footer.newsletter.touch\")}</Header>\n\n <InputWrap>\n <Input\n /**\n * According to StackOverflow, using type=\"text\" together\n * with pattern attribute is a better way to validate email\n * addresses than using the `type=\"email\"`.\n * Code below is partly taken old ui.com Footer component.\n * @see https://stackoverflow.com/a/36379040\n */\n type=\"text\"\n pattern=\"[^@\\s]+@[^@\\s]+\\.[^@\\s]+\"\n minLength={6}\n maxLength={254}\n required\n autoCapitalize=\"off\"\n autoCorrect=\"off\"\n placeholder={formatMessage(\"footer.newsletter.email\")}\n name=\"email\"\n value={emailValue}\n onChange={(e) => setEmailValue(e.target.value)}\n disabled={loading}\n />\n\n <SubmitButton\n type=\"submit\"\n className={motif}\n variant=\"primary\"\n loading={loading}\n >\n {formatMessage(\"footer.newsletter.subscribe\")}\n </SubmitButton>\n </InputWrap>\n\n {formStatus && (\n <FormMessage $status={formStatus.status}>\n {formStatus.message}\n </FormMessage>\n )}\n </Form>\n <IconsWrapper>\n {socialContent.items.map((socialItem) => (\n <IconWrapper\n href={socialItem.src}\n key={`footer-social-link-${socialItem.label}`}\n target={socialItem.target}\n >\n {socialItem.icon ? (\n <img\n src={imageSrc(socialItem.icon)}\n alt={socialItem.label}\n />\n ) : (\n socialItem.label\n )}\n </IconWrapper>\n ))}\n </IconsWrapper>\n </InnerWrap>\n </Wrap>\n <Break $motif={motif} />\n </>\n )}\n {/**\n * Some stores have an extra row with a non-translated hardcoded address\n */}\n {context === SiteId.Store && storeAddress && (\n <>\n <StoreAddress>{storeAddress}</StoreAddress>\n <Break $motif={motif} />\n </>\n )}\n\n <TermsWrap>\n <FlexWrap>\n {termsContent.items.map((term, i) => (\n <AnchorGroup key={`footer-term-${term.id}`}>\n {term.id === FooterLinkId.Cookie ? (\n <CookieBtn\n type=\"button\"\n id={COOKIE_POLICY_BTN_ID}\n className={COOKIE_POLICY_BTN_ID_CLASSNAME}\n key={`footer-term-${term.id}`}\n >\n {term.label}\n </CookieBtn>\n ) : (\n <Anchor href={term.src} target={term.target}>\n {term.label}\n </Anchor>\n )}\n <AnchorDivider>\n {i !== termsContent.items.length - 1 && \"|\"}\n </AnchorDivider>\n </AnchorGroup>\n ))}\n </FlexWrap>\n\n <FlexWrapResponsive>\n {/**\n * Renders store picker component if provided (needed only in SF)\n */}\n {storePicker}\n\n <Copyright>\n © {new Date().getFullYear()}{\" \"}\n {formatMessage(\"footer.copyright\")}\n </Copyright>\n </FlexWrapResponsive>\n </TermsWrap>\n </InnerContainer>\n </Container>\n </ContainerWrap>\n );\n};\n"],"names":["translationKeys","footerNewsletterError","getNewsletterSubscribeErrorCodeTranslationKey","errorCode","NewsletterSubscribeErrorCode","MissingEmail","InvalidEmail","TooManyRequests","InvalidStoreId","Generic","Footer","legalOnly","motif","id","customer","storePicker","storeBackendUrl","storeAddress","className","formRef","useRef","storeId","context","useMenu","formStatus","setFormStatus","useState","loading","setLoading","emailValue","setEmailValue","footerContent","socialContent","termsContent","useFooterContent","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","Promise","then","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","Tw","hiddenFields","useMemo","fields","Object","entries","reduce","acc","key","value","handleNewsletterSubmit","useCallback","e","preventDefault","data","email","url","URL","pathname","response","fetch","method","body","JSON","stringify","headers","json","ok","result","status","FormStatus","Error","message","Success","current","reset","error","console","jsx","ContainerWrap","condensed","$motif","children","Container","size","noVerticalMargin","InnerContainer","jsxs","Fragment","Wrap","ListsWrap","values","map","list","i","ListItemWrap","Header","header","label","List","items","item","j","ListItem","ListItemAnchor","href","src","target","InnerWrap","Form","onSubmit","ref","InputWrap","Input","type","pattern","minLength","maxLength","required","autoCapitalize","autoCorrect","placeholder","name","onChange","disabled","SubmitButton","variant","FormMessage","$status","IconsWrapper","socialItem","IconWrapper","icon","imageSrc","alt","Break","SiteId","Store","StoreAddress","TermsWrap","FlexWrap","term","AnchorGroup","FooterLinkId","Cookie","CookieBtn","COOKIE_POLICY_BTN_ID","COOKIE_POLICY_BTN_ID_CLASSNAME","Anchor","AnchorDivider","length","FlexWrapResponsive","Copyright","Date","getFullYear"],"mappings":";;;;;;;;;;;;;;;;;;AAkDA,MAAMA,eAAkB,GAAA;EACtBC,qBAAuB,EAAA;AACzB,CAAA;AAEA,MAAMC,6CAAA,GACJC,SACyB,IAAA;EACzB,QAAQA,SAAW;IACjB,KAAKC,YAA6B,CAAAA,4BAAA,CAAAC,YAAA;MACzB,OAAA,sCAAA;IACT,KAAKD,YAA6B,CAAAA,4BAAA,CAAAE,YAAA;MACzB,OAAA,sCAAA;IACT,KAAKF,YAA6B,CAAAA,4BAAA,CAAAG,eAAA;MACzB,OAAA,yCAAA;IAET,KAAKH,YAAAA,CAAAA,4BAA6B,CAAAI,cAAA;IAClC,KAAKJ,YAA6B,CAAAA,4BAAA,CAAAK,OAAA;MAChC,OAAOT,eAAgB,CAAAC,qBAAA;IACzB;MACE,OAAOD,eAAgB,CAAAC,qBAAA;EAC3B;AACF,CAAA;AAEO,MAAMS,SAASA,CAAC;EACrBC,SAAA;EACAC,KAAQ,GAAA,OAAA;EACRC,EAAA;EACAC,QAAA;EACAC,WAAA;EACAC,eAAA;EACAC,YAAA;EACAC;AACF,CAAmB,KAAA;EACX,MAAAC,OAAA,GAAUC,aAAwB,IAAI,CAAA;EAC5C,MAAM;IAAEC,OAAA;IAAAC,OAAA,EAASA;EAAQ,CAAA,GAAIC,OAAQ,CAAAA,OAAA,CAAA,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AAA,CAAA,EAjB+B,eAAAT,IAAA,CAAK9I,EAAE,EAkBxC,CACD;WACH,CAAA,EAAA,+BAECwJ,aAAAA,CAAAA,kBAIE,EAAA;YAAArE,QAAA,EAAA,CAAAjF,WAAA,EAAA,+BAEAuJ,aAAAA,CAAAA,SAAU,EAAA;cAAAtE,QAAA,EAAA,CAAA,OAAA,EACN,iBAAA,IAAIuE,IAAK,CAAA,CAAA,EAAEC,WAAY,CAAA,CAAA,EAAG,GAAA,EAC5BrI,cAAc,kBAAkB,CAAA;aACnC,CAAA;WACF,CAAA;SACF,CAAA;MAAA,CACF;IACF,CAAA;EAAA,CAAA,CACF;AAEJ,CAAA;"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import '../../contexts/MenuContext/
|
|
2
|
+
import { useRef, useState, useMemo, useCallback } from 'react';
|
|
3
|
+
import '../../contexts/MenuContext/index.mjs';
|
|
4
|
+
import { SiteId } from '../../contexts/MenuContext/mapping.mjs';
|
|
4
5
|
import '../../hooks/index.mjs';
|
|
5
6
|
import { imageSrc } from '../../utils/asset.mjs';
|
|
6
7
|
import '../Container/index.mjs';
|
|
7
|
-
import { ContainerWrap, Wrap, ListsWrap, ListItemWrap, Header, List, ListItem, ListItemAnchor, InnerWrap, Form, InputWrap, Input, SubmitButton, FormMessage, IconsWrapper, IconWrapper, Break, TermsWrap, FlexWrap,
|
|
8
|
+
import { ContainerWrap, InnerContainer, Wrap, ListsWrap, ListItemWrap, Header, List, ListItem, ListItemAnchor, InnerWrap, Form, InputWrap, Input, SubmitButton, FormMessage, IconsWrapper, IconWrapper, Break, StoreAddress, TermsWrap, FlexWrap, AnchorGroup, CookieBtn, Anchor, AnchorDivider, FlexWrapResponsive, Copyright } from './Footer.styles.mjs';
|
|
8
9
|
import { NewsletterSubscribeErrorCode, FormStatus } from './Footer.types.mjs';
|
|
9
10
|
import { useFooterContent, FooterLinkId, COOKIE_POLICY_BTN_ID, COOKIE_POLICY_BTN_ID_CLASSNAME } from './hooks/useFooterContent.mjs';
|
|
10
11
|
import EN_TRANSLATION from './translations/en.json.mjs';
|
|
12
|
+
import { useMenu } from '../../contexts/MenuContext/context.mjs';
|
|
11
13
|
import { useTranslation } from '../../hooks/useTranslation.mjs';
|
|
12
14
|
import { Language } from '../../types/constants.mjs';
|
|
13
15
|
import { Container } from '../Container/Container.mjs';
|
|
@@ -30,17 +32,21 @@ const getNewsletterSubscribeErrorCodeTranslationKey = errorCode => {
|
|
|
30
32
|
return translationKeys.footerNewsletterError;
|
|
31
33
|
}
|
|
32
34
|
};
|
|
33
|
-
const Footer =
|
|
35
|
+
const Footer = ({
|
|
34
36
|
legalOnly,
|
|
35
37
|
motif = "light",
|
|
36
38
|
id,
|
|
37
39
|
customer,
|
|
38
|
-
storeId,
|
|
39
40
|
storePicker,
|
|
40
41
|
storeBackendUrl,
|
|
42
|
+
storeAddress,
|
|
41
43
|
className
|
|
42
|
-
}) {
|
|
44
|
+
}) => {
|
|
43
45
|
const formRef = useRef(null);
|
|
46
|
+
const {
|
|
47
|
+
storeId,
|
|
48
|
+
context
|
|
49
|
+
} = useMenu();
|
|
44
50
|
const [formStatus, setFormStatus] = useState(void 0);
|
|
45
51
|
const [loading, setLoading] = useState(false);
|
|
46
52
|
const [emailValue, setEmailValue] = useState("");
|
|
@@ -63,7 +69,7 @@ const Footer = memo(function Footer2({
|
|
|
63
69
|
[Language.Pt]: () => import('./translations/pt-BR.json.mjs').then(res => res.default),
|
|
64
70
|
[Language.Zh]: () => import('./translations/zh-Hans.json.mjs').then(res => res.default),
|
|
65
71
|
[Language.Fr]: () => import('./translations/fr.json.mjs').then(res => res.default),
|
|
66
|
-
[Language.Tw]: () =>
|
|
72
|
+
[Language.Tw]: () => import('./translations/zh-Hant-TW.json.mjs').then(res => res.default)
|
|
67
73
|
}
|
|
68
74
|
});
|
|
69
75
|
const hiddenFields = useMemo(() => {
|
|
@@ -128,95 +134,105 @@ const Footer = memo(function Footer2({
|
|
|
128
134
|
}, [emailValue, formatMessage, hiddenFields, storeBackendUrl]);
|
|
129
135
|
return /* @__PURE__ */jsx(ContainerWrap, {
|
|
130
136
|
condensed: legalOnly,
|
|
131
|
-
$
|
|
137
|
+
$motif: motif,
|
|
132
138
|
id,
|
|
133
139
|
className,
|
|
134
|
-
children: /* @__PURE__ */
|
|
140
|
+
children: /* @__PURE__ */jsx(Container, {
|
|
135
141
|
size: "desktop",
|
|
136
142
|
noVerticalMargin: true,
|
|
137
|
-
children:
|
|
138
|
-
children: [/* @__PURE__ */jsxs(
|
|
139
|
-
children: [/* @__PURE__ */
|
|
140
|
-
children:
|
|
141
|
-
children:
|
|
142
|
-
children: [
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
children: /* @__PURE__ */jsx(
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}, `footer-list-${i}`))
|
|
153
|
-
}), /* @__PURE__ */jsxs(InnerWrap, {
|
|
154
|
-
children: [/* @__PURE__ */jsxs(Form, {
|
|
155
|
-
onSubmit: handleNewsletterSubmit,
|
|
156
|
-
ref: formRef,
|
|
157
|
-
children: [/* @__PURE__ */jsx(Header, {
|
|
158
|
-
children: formatMessage("footer.newsletter.touch")
|
|
159
|
-
}), /* @__PURE__ */jsxs(InputWrap, {
|
|
160
|
-
children: [/* @__PURE__ */jsx(Input, {
|
|
161
|
-
type: "text",
|
|
162
|
-
pattern: "[^@\\s]+@[^@\\s]+\\.[^@\\s]+",
|
|
163
|
-
minLength: 6,
|
|
164
|
-
maxLength: 254,
|
|
165
|
-
required: true,
|
|
166
|
-
autoCapitalize: "off",
|
|
167
|
-
autoCorrect: "off",
|
|
168
|
-
placeholder: formatMessage("footer.newsletter.email"),
|
|
169
|
-
name: "email",
|
|
170
|
-
value: emailValue,
|
|
171
|
-
onChange: e => setEmailValue(e.target.value),
|
|
172
|
-
disabled: loading
|
|
173
|
-
}), /* @__PURE__ */jsx(SubmitButton, {
|
|
174
|
-
type: "submit",
|
|
175
|
-
className: motif,
|
|
176
|
-
variant: "primary",
|
|
177
|
-
loading,
|
|
178
|
-
children: formatMessage("footer.newsletter.subscribe")
|
|
143
|
+
children: /* @__PURE__ */jsxs(InnerContainer, {
|
|
144
|
+
children: [!legalOnly && /* @__PURE__ */jsxs(Fragment, {
|
|
145
|
+
children: [/* @__PURE__ */jsxs(Wrap, {
|
|
146
|
+
children: [/* @__PURE__ */jsx(ListsWrap, {
|
|
147
|
+
children: Object.values(footerContent).map((list, i) => /* @__PURE__ */jsxs(ListItemWrap, {
|
|
148
|
+
children: [/* @__PURE__ */jsxs(Header, {
|
|
149
|
+
children: [" ", list.header.label]
|
|
150
|
+
}), /* @__PURE__ */jsx(List, {
|
|
151
|
+
children: list.items.map((item, j) => /* @__PURE__ */jsx(ListItem, {
|
|
152
|
+
children: /* @__PURE__ */jsx(ListItemAnchor, {
|
|
153
|
+
href: item.src,
|
|
154
|
+
target: item.target,
|
|
155
|
+
children: item.label
|
|
156
|
+
})
|
|
157
|
+
}, `footer-list-${i}-item-${j}`))
|
|
179
158
|
})]
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
|
|
159
|
+
}, `footer-list-${i}`))
|
|
160
|
+
}), /* @__PURE__ */jsxs(InnerWrap, {
|
|
161
|
+
children: [/* @__PURE__ */jsxs(Form, {
|
|
162
|
+
onSubmit: handleNewsletterSubmit,
|
|
163
|
+
ref: formRef,
|
|
164
|
+
children: [/* @__PURE__ */jsx(Header, {
|
|
165
|
+
children: formatMessage("footer.newsletter.touch")
|
|
166
|
+
}), /* @__PURE__ */jsxs(InputWrap, {
|
|
167
|
+
children: [/* @__PURE__ */jsx(Input, {
|
|
168
|
+
type: "text",
|
|
169
|
+
pattern: "[^@\\s]+@[^@\\s]+\\.[^@\\s]+",
|
|
170
|
+
minLength: 6,
|
|
171
|
+
maxLength: 254,
|
|
172
|
+
required: true,
|
|
173
|
+
autoCapitalize: "off",
|
|
174
|
+
autoCorrect: "off",
|
|
175
|
+
placeholder: formatMessage("footer.newsletter.email"),
|
|
176
|
+
name: "email",
|
|
177
|
+
value: emailValue,
|
|
178
|
+
onChange: e => setEmailValue(e.target.value),
|
|
179
|
+
disabled: loading
|
|
180
|
+
}), /* @__PURE__ */jsx(SubmitButton, {
|
|
181
|
+
type: "submit",
|
|
182
|
+
className: motif,
|
|
183
|
+
variant: "primary",
|
|
184
|
+
loading,
|
|
185
|
+
children: formatMessage("footer.newsletter.subscribe")
|
|
186
|
+
})]
|
|
187
|
+
}), formStatus && /* @__PURE__ */jsx(FormMessage, {
|
|
188
|
+
$status: formStatus.status,
|
|
189
|
+
children: formStatus.message
|
|
190
|
+
})]
|
|
191
|
+
}), /* @__PURE__ */jsx(IconsWrapper, {
|
|
192
|
+
children: socialContent.items.map(socialItem => /* @__PURE__ */jsx(IconWrapper, {
|
|
193
|
+
href: socialItem.src,
|
|
194
|
+
target: socialItem.target,
|
|
195
|
+
children: socialItem.icon ? /* @__PURE__ */jsx("img", {
|
|
196
|
+
src: imageSrc(socialItem.icon),
|
|
197
|
+
alt: socialItem.label
|
|
198
|
+
}) : socialItem.label
|
|
199
|
+
}, `footer-social-link-${socialItem.label}`))
|
|
183
200
|
})]
|
|
184
|
-
}), /* @__PURE__ */jsx(IconsWrapper, {
|
|
185
|
-
children: socialContent.items.map(socialItem => /* @__PURE__ */jsx(IconWrapper, {
|
|
186
|
-
href: socialItem.src,
|
|
187
|
-
target: socialItem.target,
|
|
188
|
-
children: socialItem.icon ? /* @__PURE__ */jsx("img", {
|
|
189
|
-
src: imageSrc(socialItem.icon),
|
|
190
|
-
alt: socialItem.label
|
|
191
|
-
}) : socialItem.label
|
|
192
|
-
}, `footer-social-link-${socialItem.label}`))
|
|
193
201
|
})]
|
|
202
|
+
}), /* @__PURE__ */jsx(Break, {
|
|
203
|
+
$motif: motif
|
|
194
204
|
})]
|
|
195
|
-
}), /* @__PURE__ */
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
205
|
+
}), context === SiteId.Store && storeAddress && /* @__PURE__ */jsxs(Fragment, {
|
|
206
|
+
children: [/* @__PURE__ */jsx(StoreAddress, {
|
|
207
|
+
children: storeAddress
|
|
208
|
+
}), /* @__PURE__ */jsx(Break, {
|
|
209
|
+
$motif: motif
|
|
210
|
+
})]
|
|
211
|
+
}), /* @__PURE__ */jsxs(TermsWrap, {
|
|
212
|
+
children: [/* @__PURE__ */jsx(FlexWrap, {
|
|
213
|
+
children: termsContent.items.map((term, i) => /* @__PURE__ */jsxs(AnchorGroup, {
|
|
214
|
+
children: [term.id === FooterLinkId.Cookie ? /* @__PURE__ */jsx(CookieBtn, {
|
|
215
|
+
type: "button",
|
|
216
|
+
id: COOKIE_POLICY_BTN_ID,
|
|
217
|
+
className: COOKIE_POLICY_BTN_ID_CLASSNAME,
|
|
218
|
+
children: term.label
|
|
219
|
+
}, `footer-term-${term.id}`) : /* @__PURE__ */jsx(Anchor, {
|
|
220
|
+
href: term.src,
|
|
221
|
+
target: term.target,
|
|
222
|
+
children: term.label
|
|
223
|
+
}), /* @__PURE__ */jsx(AnchorDivider, {
|
|
224
|
+
children: i !== termsContent.items.length - 1 && "|"
|
|
225
|
+
})]
|
|
226
|
+
}, `footer-term-${term.id}`))
|
|
227
|
+
}), /* @__PURE__ */jsxs(FlexWrapResponsive, {
|
|
228
|
+
children: [storePicker, /* @__PURE__ */jsxs(Copyright, {
|
|
229
|
+
children: ["\xA9 ", ( /* @__PURE__ */new Date()).getFullYear(), " ", formatMessage("footer.copyright")]
|
|
212
230
|
})]
|
|
213
|
-
}
|
|
214
|
-
}), storePicker, /* @__PURE__ */jsxs(Copyright, {
|
|
215
|
-
children: ["\xA9 ", ( /* @__PURE__ */new Date()).getFullYear(), " ", formatMessage("footer.copyright")]
|
|
231
|
+
})]
|
|
216
232
|
})]
|
|
217
|
-
})
|
|
233
|
+
})
|
|
218
234
|
})
|
|
219
235
|
});
|
|
220
|
-
}
|
|
236
|
+
};
|
|
221
237
|
export { Footer };
|
|
222
238
|
//# sourceMappingURL=Footer.mjs.map
|