@ubnt/store.core 10.4.1 → 10.5.0-globalStoreId.0

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.
Files changed (199) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/lib/_virtual/_virtual_multi-entry.js +0 -1
  3. package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
  4. package/lib/_virtual/_virtual_multi-entry.mjs +1 -1
  5. package/lib/assets/attention.svg +5 -5
  6. package/lib/assets/attention2.svg +5 -5
  7. package/lib/assets/express.jpg +0 -0
  8. package/lib/assets/express2.jpg +0 -0
  9. package/lib/assets/express7.jpg +0 -0
  10. package/lib/assets/express72.jpg +0 -0
  11. package/lib/assets/minus4.svg +8 -8
  12. package/lib/assets/minus5.svg +8 -8
  13. package/lib/assets/pause.svg +3 -3
  14. package/lib/assets/pause2.svg +3 -3
  15. package/lib/assets/poe2.svg +3 -2
  16. package/lib/assets/poe3.svg +2 -3
  17. package/lib/assets/port.svg +4 -2
  18. package/lib/assets/port2.svg +2 -4
  19. package/lib/assets/ucgMax.jpg +0 -0
  20. package/lib/assets/ucgMax2.jpg +0 -0
  21. package/lib/assets/udmProMax.jpg +0 -0
  22. package/lib/assets/udmProMax2.jpg +0 -0
  23. package/lib/assets/udr2.jpg +0 -0
  24. package/lib/assets/udr3.jpg +0 -0
  25. package/lib/components/Explore/ExploreData.d.ts +3 -3
  26. package/lib/components/Explore/ExploreData.js +2 -2
  27. package/lib/components/Explore/ExploreData.js.map +1 -1
  28. package/lib/components/Explore/ExploreData.mjs +3 -3
  29. package/lib/components/Explore/ExploreData.mjs.map +1 -1
  30. package/lib/components/Footer/Footer.js +14 -14
  31. package/lib/components/Footer/Footer.js.map +1 -1
  32. package/lib/components/Footer/Footer.mjs +15 -15
  33. package/lib/components/Footer/Footer.mjs.map +1 -1
  34. package/lib/components/Footer/hooks/useFooterContent.js +33 -33
  35. package/lib/components/Footer/hooks/useFooterContent.js.map +1 -1
  36. package/lib/components/Footer/hooks/useFooterContent.mjs +34 -34
  37. package/lib/components/Footer/hooks/useFooterContent.mjs.map +1 -1
  38. package/lib/components/Header/Header.js +1 -1
  39. package/lib/components/Header/Header.js.map +1 -1
  40. package/lib/components/Header/Header.mjs +2 -2
  41. package/lib/components/Header/Header.mjs.map +1 -1
  42. package/lib/components/Header/Header.stories.d.ts +2 -2
  43. package/lib/components/Header/Header.styles.d.ts +1 -0
  44. package/lib/components/Header/Header.styles.js +9 -1
  45. package/lib/components/Header/Header.styles.js.map +1 -1
  46. package/lib/components/Header/Header.styles.mjs +9 -2
  47. package/lib/components/Header/Header.styles.mjs.map +1 -1
  48. package/lib/components/Header/LanguageFrame/utils/buildLanguageLink.d.ts +2 -2
  49. package/lib/components/Header/LanguageFrame/utils/buildLanguageLink.js.map +1 -1
  50. package/lib/components/Header/LanguageFrame/utils/buildLanguageLink.mjs.map +1 -1
  51. package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +1 -1
  52. package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.mjs +1 -1
  53. package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.js +1 -1
  54. package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.mjs +2 -2
  55. package/lib/components/Microsites/Microsites.types.d.ts +2 -2
  56. package/lib/components/Microsites/Microsites.types.js.map +1 -1
  57. package/lib/components/Microsites/Microsites.types.mjs.map +1 -1
  58. package/lib/components/ModelCompareV3/ModelCompareV3.types.d.ts +9 -9
  59. package/lib/components/ModelCompareV3/assets/CameraSecurity/ai-pro.jpg.js +5 -5
  60. package/lib/components/ModelCompareV3/assets/CameraSecurity/g4-instant.jpg.js +5 -5
  61. package/lib/components/ModelCompareV3/assets/CameraSecurity/g5-flex.jpg.js +5 -5
  62. package/lib/components/ModelCompareV3/assets/CameraSecurity/g5-pro.jpg.js +5 -5
  63. package/lib/components/ModelCompareV3/assets/CameraSecurity/g6-bullet.jpg.js +5 -5
  64. package/lib/components/ModelCompareV3/assets/CameraSecurity/g6-instant.jpg.js +5 -5
  65. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/express.jpg.js +5 -5
  66. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/express.jpg.mjs +2 -2
  67. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/express7.jpg.js +5 -5
  68. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/express7.jpg.mjs +2 -2
  69. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgMax.jpg.js +5 -5
  70. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgMax.jpg.mjs +2 -2
  71. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.js +5 -5
  72. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.mjs +2 -2
  73. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udr.jpg.js +5 -5
  74. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udr.jpg.mjs +2 -2
  75. package/lib/components/ModelCompareV3/assets/Consoles/express.jpg.js +1 -1
  76. package/lib/components/ModelCompareV3/assets/Consoles/express.jpg.mjs +2 -2
  77. package/lib/components/ModelCompareV3/assets/Consoles/express7.jpg.js +1 -1
  78. package/lib/components/ModelCompareV3/assets/Consoles/express7.jpg.mjs +2 -2
  79. package/lib/components/ModelCompareV3/assets/Consoles/ucgMax.jpg.js +1 -1
  80. package/lib/components/ModelCompareV3/assets/Consoles/ucgMax.jpg.mjs +2 -2
  81. package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.js +1 -1
  82. package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.mjs +2 -2
  83. package/lib/components/ModelCompareV3/assets/Consoles/udr.jpg.js +1 -1
  84. package/lib/components/ModelCompareV3/assets/Consoles/udr.jpg.mjs +2 -2
  85. package/lib/components/ModelCompareV3/assets/poe.svg.js +1 -1
  86. package/lib/components/ModelCompareV3/assets/poe.svg.mjs +2 -2
  87. package/lib/components/ModelCompareV3/assets/port.svg.js +1 -1
  88. package/lib/components/ModelCompareV3/assets/port.svg.mjs +2 -2
  89. package/lib/components/ModelCompareV3/data/CameraSecurity.js +13 -13
  90. package/lib/components/ModelCompareV3/data/CameraSecurity.mjs +7 -7
  91. package/lib/components/ModelCompareV3/data/CloudGateways.js +9 -9
  92. package/lib/components/ModelCompareV3/data/CloudGateways.mjs +6 -6
  93. package/lib/components/ModelCompareV3/data/products/e7Audience.js +2 -2
  94. package/lib/components/ModelCompareV3/data/products/e7Audience.js.map +1 -1
  95. package/lib/components/ModelCompareV3/data/products/e7Audience.mjs +3 -3
  96. package/lib/components/ModelCompareV3/data/products/e7Audience.mjs.map +1 -1
  97. package/lib/components/ModelCompareV3/data/products/express.js +1 -1
  98. package/lib/components/ModelCompareV3/data/products/express.mjs +1 -1
  99. package/lib/components/ModelCompareV3/data/products/express7.js +1 -1
  100. package/lib/components/ModelCompareV3/data/products/express7.mjs +1 -1
  101. package/lib/components/ModelCompareV3/data/products/g3TouchEnterprise.js +1 -1
  102. package/lib/components/ModelCompareV3/data/products/g3TouchEnterprise.js.map +1 -1
  103. package/lib/components/ModelCompareV3/data/products/g3TouchEnterprise.mjs +2 -2
  104. package/lib/components/ModelCompareV3/data/products/g3TouchEnterprise.mjs.map +1 -1
  105. package/lib/components/ModelCompareV3/data/products/g3TouchWall.js +1 -1
  106. package/lib/components/ModelCompareV3/data/products/g3TouchWall.js.map +1 -1
  107. package/lib/components/ModelCompareV3/data/products/g3TouchWall.mjs +2 -2
  108. package/lib/components/ModelCompareV3/data/products/g3TouchWall.mjs.map +1 -1
  109. package/lib/components/ModelCompareV3/data/products/u6Extender.js +1 -1
  110. package/lib/components/ModelCompareV3/data/products/u6Extender.js.map +1 -1
  111. package/lib/components/ModelCompareV3/data/products/u6Extender.mjs +2 -2
  112. package/lib/components/ModelCompareV3/data/products/u6Extender.mjs.map +1 -1
  113. package/lib/components/ModelCompareV3/data/products/u7proOutdoor.js +2 -2
  114. package/lib/components/ModelCompareV3/data/products/u7proOutdoor.js.map +1 -1
  115. package/lib/components/ModelCompareV3/data/products/u7proOutdoor.mjs +3 -3
  116. package/lib/components/ModelCompareV3/data/products/u7proOutdoor.mjs.map +1 -1
  117. package/lib/components/ModelCompareV3/data/products/ucgMax.js +1 -1
  118. package/lib/components/ModelCompareV3/data/products/ucgMax.mjs +1 -1
  119. package/lib/components/ModelCompareV3/data/products/udmProMax.js +1 -1
  120. package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +1 -1
  121. package/lib/components/ModelCompareV3/data/products/udr.js +1 -1
  122. package/lib/components/ModelCompareV3/data/products/udr.mjs +1 -1
  123. package/lib/components/ModelCompareV3/data/products/umr.js +2 -2
  124. package/lib/components/ModelCompareV3/data/products/umr.js.map +1 -1
  125. package/lib/components/ModelCompareV3/data/products/umr.mjs +3 -3
  126. package/lib/components/ModelCompareV3/data/products/umr.mjs.map +1 -1
  127. package/lib/components/ModelCompareV3/data/products/umrIndustrial.js +2 -2
  128. package/lib/components/ModelCompareV3/data/products/umrIndustrial.js.map +1 -1
  129. package/lib/components/ModelCompareV3/data/products/umrIndustrial.mjs +3 -3
  130. package/lib/components/ModelCompareV3/data/products/umrIndustrial.mjs.map +1 -1
  131. package/lib/components/ModelCompareV3/data/products/umrUltra.js +1 -1
  132. package/lib/components/ModelCompareV3/data/products/umrUltra.js.map +1 -1
  133. package/lib/components/ModelCompareV3/data/products/umrUltra.mjs +2 -2
  134. package/lib/components/ModelCompareV3/data/products/umrUltra.mjs.map +1 -1
  135. package/lib/components/ModelCompareV3/data/properties/powerMethodPoe.js +1 -1
  136. package/lib/components/ModelCompareV3/data/properties/powerMethodPoe.mjs +1 -1
  137. package/lib/components/ModelCompareV3/data/properties/readerPowerMethod.js +1 -1
  138. package/lib/components/ModelCompareV3/data/properties/readerPowerMethod.mjs +1 -1
  139. package/lib/components/ModelCompareV3/data/properties/redundantRj45Port.js +1 -1
  140. package/lib/components/ModelCompareV3/data/properties/redundantRj45Port.mjs +1 -1
  141. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +1 -1
  142. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
  143. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.js +1 -1
  144. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.mjs +1 -1
  145. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.js +1 -1
  146. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.mjs +2 -2
  147. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.js +1 -1
  148. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.mjs +2 -2
  149. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js +1 -1
  150. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.mjs +1 -1
  151. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.js +1 -1
  152. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.mjs +2 -2
  153. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js +1 -1
  154. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs +1 -1
  155. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.js +1 -1
  156. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.mjs +2 -2
  157. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/RecommendedPoeSwitches.js +2 -2
  158. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/RecommendedPoeSwitches.mjs +2 -2
  159. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/poe.svg.js +1 -1
  160. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/poe.svg.mjs +2 -2
  161. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/port.svg.js +1 -1
  162. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/port.svg.mjs +2 -2
  163. package/lib/components/VideoPlayerNew/VideoPlayer.js +1 -1
  164. package/lib/components/VideoPlayerNew/VideoPlayer.mjs +1 -1
  165. package/lib/components/VideoPlayerNew/assets/pause.svg.js +1 -1
  166. package/lib/components/VideoPlayerNew/assets/pause.svg.mjs +2 -2
  167. package/lib/contexts/MenuContext/context.d.ts +3 -3
  168. package/lib/contexts/MenuContext/context.js.map +1 -1
  169. package/lib/contexts/MenuContext/context.mjs.map +1 -1
  170. package/lib/contexts/MenuContext/mapping.d.ts +3 -4
  171. package/lib/contexts/MenuContext/mapping.js +1 -1
  172. package/lib/contexts/MenuContext/mapping.js.map +1 -1
  173. package/lib/contexts/MenuContext/mapping.mjs +2 -2
  174. package/lib/contexts/MenuContext/mapping.mjs.map +1 -1
  175. package/lib/contexts/MenuContext/types.d.ts +3 -3
  176. package/lib/contexts/MenuContext/types.js.map +1 -1
  177. package/lib/contexts/MenuContext/types.mjs.map +1 -1
  178. package/lib/contexts/MenuContext/utils.d.ts +3 -3
  179. package/lib/contexts/MenuContext/utils.js.map +1 -1
  180. package/lib/contexts/MenuContext/utils.mjs.map +1 -1
  181. package/lib/types/generated.d.ts +0 -35
  182. package/lib/types/generated.js +0 -18
  183. package/lib/types/generated.js.map +1 -1
  184. package/lib/types/generated.mjs +1 -18
  185. package/lib/types/generated.mjs.map +1 -1
  186. package/lib/types/index.js +0 -1
  187. package/lib/types/index.js.map +1 -1
  188. package/lib/types/index.mjs +1 -1
  189. package/lib/utils/nextjs/navigationPresets.d.ts +4 -4
  190. package/lib/utils/nextjs/navigationPresets.js +20 -20
  191. package/lib/utils/nextjs/navigationPresets.js.map +1 -1
  192. package/lib/utils/nextjs/navigationPresets.mjs +21 -21
  193. package/lib/utils/nextjs/navigationPresets.mjs.map +1 -1
  194. package/lib/utils/storeId.d.ts +1 -8
  195. package/lib/utils/storeId.js +0 -6
  196. package/lib/utils/storeId.js.map +1 -1
  197. package/lib/utils/storeId.mjs +1 -6
  198. package/lib/utils/storeId.mjs.map +1 -1
  199. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Footer.js","sources":["../../../src/components/Footer/Footer.tsx"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport { useMenu } from \"../../contexts/MenuContext\";\nimport { Language, SiteId } from \"../../contexts/MenuContext/mapping\";\nimport { useTranslation } from \"../../hooks\";\nimport { GlobalStoreId } from \"../../types\";\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 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 { FooterProps } 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\n/**\n * NOTE: All commented out code is here because the BE is not implemented yet.\n * BE needs a lot of work to be done but the FE is ready to use the old way\n * of subscribing to the newsletter.\n */\n// const translationKeys = {\n// footerNewsletterError: \"footer.newsletter.error\",\n// } as const;\n\n// const 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\n/**\n * Map store ID to Mailchimp region value\n */\nconst subscribeRegionValue = {\n [GlobalStoreId.Us]: \"United States\",\n [GlobalStoreId.Eu]: \"Europe\",\n [GlobalStoreId.Ca]: \"Canada\",\n [GlobalStoreId.Za]: \"South Africa\",\n [GlobalStoreId.Me]: \"Middle East\",\n [GlobalStoreId.Uk]: \"United Kingdom\",\n [GlobalStoreId.In]: \"India\",\n [GlobalStoreId.Sg]: \"Singapore\",\n [GlobalStoreId.Br]: \"Brazil\",\n [GlobalStoreId.Jp]: \"Japan\",\n [GlobalStoreId.Mx]: \"Mexico\",\n [GlobalStoreId.Ph]: \"Philippines\",\n [GlobalStoreId.Tw]: \"Taiwan\",\n [GlobalStoreId.Cn]: \"China\",\n} satisfies Record<GlobalStoreId, string>;\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 const hiddenFields = useMemo(() => {\n return {\n // Merge fields are based on Mailchimp settings\n u: \"bc856e62a9254399365d0277b\",\n id: \"1c1b02cb37\",\n MERGE1: customer?.firstName,\n MERGE2: customer?.lastName,\n // Always set the user as residential as we don't have any other type of user\n MERGE4: \"Residential (home use)\",\n // Always set the user as subscribed to all lists\n MERGE3: \"subscribed\",\n MERGE7: \"subscribed\",\n MERGE8: \"subscribed\",\n // Store region value expected in two fields\n MERGE6: subscribeRegionValue[storeId],\n MERGE9: subscribeRegionValue[storeId],\n };\n }, [customer?.firstName, customer?.lastName, 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 $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\n method=\"get\"\n action=\"https://ui.us8.list-manage.com/subscribe\"\n target=\"_blank\"\n >\n <Header>{formatMessage(\"footer.newsletter.touch\")}</Header>\n\n {/* Hidden fields */}\n {Object.entries(hiddenFields).map(([key, value]) => (\n <input key={key} type=\"hidden\" name={key} value={value} />\n ))}\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":["subscribeRegionValue","GlobalStoreId","Us","Eu","Ca","Za","Me","Uk","In","Sg","Br","Jp","Mx","Ph","Tw","Cn","Footer","legalOnly","motif","id","customer","storePicker","storeAddress","className","storeId","context","useMenu","footerContent","socialContent","termsContent","useFooterContent","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","Promise","then","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","resolve","require","hiddenFields","useMemo","u","MERGE1","firstName","MERGE2","lastName","MERGE4","MERGE3","MERGE7","MERGE8","MERGE6","MERGE9","jsx","ContainerWrap","$motif","children","Container","size","noVerticalMargin","InnerContainer","jsxs","Fragment","Wrap","ListsWrap","Object","values","map","list","i","ListItemWrap","Header","header","label","List","items","item","j","ListItem","ListItemAnchor","href","src","target","InnerWrap","Form","method","action","entries","key","value","type","name","InputWrap","Input","pattern","minLength","maxLength","required","autoCapitalize","autoCorrect","placeholder","SubmitButton","variant","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":";;;;;;;;;;;;;;;;;;;AA4EA,MAAMA,oBAAuB,GAAA;EAC3B,CAACC,SAAAA,CAAAA,aAAc,CAAAC,EAAE,GAAG,eAAA;EACpB,CAACD,SAAAA,CAAAA,aAAc,CAAAE,EAAE,GAAG,QAAA;EACpB,CAACF,SAAAA,CAAAA,aAAc,CAAAG,EAAE,GAAG,QAAA;EACpB,CAACH,SAAAA,CAAAA,aAAc,CAAAI,EAAE,GAAG,cAAA;EACpB,CAACJ,SAAAA,CAAAA,aAAc,CAAAK,EAAE,GAAG,aAAA;EACpB,CAACL,SAAAA,CAAAA,aAAc,CAAAM,EAAE,GAAG,gBAAA;EACpB,CAACN,SAAAA,CAAAA,aAAc,CAAAO,EAAE,GAAG,OAAA;EACpB,CAACP,SAAAA,CAAAA,aAAc,CAAAQ,EAAE,GAAG,WAAA;EACpB,CAACR,SAAAA,CAAAA,aAAc,CAAAS,EAAE,GAAG,QAAA;EACpB,CAACT,SAAAA,CAAAA,aAAc,CAAAU,EAAE,GAAG,OAAA;EACpB,CAACV,SAAAA,CAAAA,aAAc,CAAAW,EAAE,GAAG,QAAA;EACpB,CAACX,SAAAA,CAAAA,aAAc,CAAAY,EAAE,GAAG,aAAA;EACpB,CAACZ,SAAAA,CAAAA,aAAc,CAAAa,EAAE,GAAG,QAAA;EACpB,CAACb,SAAAA,CAAAA,aAAc,CAAAc,EAAE,GAAG;AACtB,CAAA;AAEO,MAAMC,SAASA,CAAC;EACrBC,SAAA;EACAC,KAAQ,GAAA,OAAA;EACRC,EAAA;EACAC,QAAA;EACAC,WAAA;EAAA;EAEAC,YAAA;EAC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A,CACF,CAAA;AAEJ,CAAA;"}
1
+ {"version":3,"file":"Footer.js","sources":["../../../src/components/Footer/Footer.tsx"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport { useMenu } from \"../../contexts/MenuContext\";\nimport { Language, SiteId } from \"../../contexts/MenuContext/mapping\";\nimport { useTranslation } from \"../../hooks\";\nimport { StoreId } from \"../../types\";\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 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 { FooterProps } 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\n/**\n * NOTE: All commented out code is here because the BE is not implemented yet.\n * BE needs a lot of work to be done but the FE is ready to use the old way\n * of subscribing to the newsletter.\n */\n// const translationKeys = {\n// footerNewsletterError: \"footer.newsletter.error\",\n// } as const;\n\n// const 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\n/**\n * Map store ID to Mailchimp region value\n */\nconst subscribeRegionValue = {\n [StoreId.Us]: \"United States\",\n [StoreId.Eu]: \"Europe\",\n [StoreId.Ca]: \"Canada\",\n [StoreId.Za]: \"South Africa\",\n [StoreId.Me]: \"Middle East\",\n [StoreId.Uk]: \"United Kingdom\",\n [StoreId.In]: \"India\",\n [StoreId.Sg]: \"Singapore\",\n [StoreId.Br]: \"Brazil\",\n [StoreId.Jp]: \"Japan\",\n [StoreId.Mx]: \"Mexico\",\n [StoreId.Ph]: \"Philippines\",\n [StoreId.Tw]: \"Taiwan\",\n [StoreId.Cn]: \"China\",\n} satisfies Record<StoreId, string>;\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 const hiddenFields = useMemo(() => {\n return {\n // Merge fields are based on Mailchimp settings\n u: \"bc856e62a9254399365d0277b\",\n id: \"1c1b02cb37\",\n MERGE1: customer?.firstName,\n MERGE2: customer?.lastName,\n // Always set the user as residential as we don't have any other type of user\n MERGE4: \"Residential (home use)\",\n // Always set the user as subscribed to all lists\n MERGE3: \"subscribed\",\n MERGE7: \"subscribed\",\n MERGE8: \"subscribed\",\n // Store region value expected in two fields\n MERGE6: subscribeRegionValue[storeId],\n MERGE9: subscribeRegionValue[storeId],\n };\n }, [customer?.firstName, customer?.lastName, 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 $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\n method=\"get\"\n action=\"https://ui.us8.list-manage.com/subscribe\"\n target=\"_blank\"\n >\n <Header>{formatMessage(\"footer.newsletter.touch\")}</Header>\n\n {/* Hidden fields */}\n {Object.entries(hiddenFields).map(([key, value]) => (\n <input key={key} type=\"hidden\" name={key} value={value} />\n ))}\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":["subscribeRegionValue","StoreId","Us","Eu","Ca","Za","Me","Uk","In","Sg","Br","Jp","Mx","Ph","Tw","Cn","Footer","legalOnly","motif","id","customer","storePicker","storeAddress","className","storeId","context","useMenu","footerContent","socialContent","termsContent","useFooterContent","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","Promise","then","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","resolve","require","hiddenFields","useMemo","u","MERGE1","firstName","MERGE2","lastName","MERGE4","MERGE3","MERGE7","MERGE8","MERGE6","MERGE9","jsx","ContainerWrap","$motif","children","Container","size","noVerticalMargin","InnerContainer","jsxs","Fragment","Wrap","ListsWrap","Object","values","map","list","i","ListItemWrap","Header","header","label","List","items","item","j","ListItem","ListItemAnchor","href","src","target","InnerWrap","Form","method","action","entries","key","value","type","name","InputWrap","Input","pattern","minLength","maxLength","required","autoCapitalize","autoCorrect","placeholder","SubmitButton","variant","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":";;;;;;;;;;;;;;;;;;;AA4EA,MAAMA,oBAAuB,GAAA;EAC3B,CAACC,SAAAA,CAAAA,OAAQ,CAAAC,EAAE,GAAG,eAAA;EACd,CAACD,SAAAA,CAAAA,OAAQ,CAAAE,EAAE,GAAG,QAAA;EACd,CAACF,SAAAA,CAAAA,OAAQ,CAAAG,EAAE,GAAG,QAAA;EACd,CAACH,SAAAA,CAAAA,OAAQ,CAAAI,EAAE,GAAG,cAAA;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E,aAAA,CAAAA,MAAA,EAAA;gBAAO1C,IAAM,EAAAmC,IAAA,CAAKlC;gBAAKC,MAAQ,EAAAiC,IAAA,CAAKjC,MAClC;gBAAA1B,QAAA,EAAA2D,IAAA,CAAK1C;cACR,CAAA,CAAA,EAAA,8BAEDkD,aAAAA,CAAAA,aACE,EAAA;gBAAAnE,QAAA,EAAAa,CAAA,KAAMpD,aAAa0D,KAAM,CAAAiD,MAAA,GAAS,KAAK;cAC1C,CAAA,CAAA;YAAA,CAAA,EAjBgB,eAAeT,IAAA,CAAK5G,EAAE,EAkBxC,CACD;WACH,CAAA,EAAA,+BAECsH,aAAAA,CAAAA,kBAIE,EAAA;YAAArE,QAAA,EAAA,CAAA/C,WAAA,EAAA,+BAEAqH,aAAAA,CAAAA,SAAU,EAAA;cAAAtE,QAAA,EAAA,CAAA,OAAA,EACN,gBAAA,IAAIuE,IAAK,CAAA,CAAA,EAAEC,WAAY,CAAA,CAAA,EAAG,GAAA,EAC5B7G,cAAc,kBAAkB,CAAA;YACnC,CAAA,CAAA;UACF,CAAA,CAAA;QACF,CAAA,CAAA;MAAA,CACF;IACF,CAAA;EAAA,CACF,CAAA;AAEJ,CAAA;"}
@@ -9,27 +9,27 @@ import '../Container/index.mjs';
9
9
  import { ContainerWrap, InnerContainer, Wrap, ListsWrap, ListItemWrap, Header, List, ListItem, ListItemAnchor, InnerWrap, Form, InputWrap, Input, SubmitButton, IconsWrapper, IconWrapper, Break, StoreAddress, TermsWrap, FlexWrap, AnchorGroup, CookieBtn, Anchor, AnchorDivider, FlexWrapResponsive, Copyright } from './Footer.styles.mjs';
10
10
  import { useFooterContent, FooterLinkId, COOKIE_POLICY_BTN_ID_CLASSNAME, COOKIE_POLICY_BTN_ID } from './hooks/useFooterContent.mjs';
11
11
  import EN_TRANSLATION from './translations/en.json.mjs';
12
- import { GlobalStoreId } from '../../types/generated.mjs';
12
+ import { StoreId } from '../../types/generated.mjs';
13
13
  import { useMenu } from '../../contexts/MenuContext/context.mjs';
14
14
  import { useTranslation } from '../../hooks/useTranslation.mjs';
15
15
  import { Language } from '../../types/constants.mjs';
16
16
  import { Container } from '../Container/Container.mjs';
17
17
  "use strict";
18
18
  const subscribeRegionValue = {
19
- [GlobalStoreId.Us]: "United States",
20
- [GlobalStoreId.Eu]: "Europe",
21
- [GlobalStoreId.Ca]: "Canada",
22
- [GlobalStoreId.Za]: "South Africa",
23
- [GlobalStoreId.Me]: "Middle East",
24
- [GlobalStoreId.Uk]: "United Kingdom",
25
- [GlobalStoreId.In]: "India",
26
- [GlobalStoreId.Sg]: "Singapore",
27
- [GlobalStoreId.Br]: "Brazil",
28
- [GlobalStoreId.Jp]: "Japan",
29
- [GlobalStoreId.Mx]: "Mexico",
30
- [GlobalStoreId.Ph]: "Philippines",
31
- [GlobalStoreId.Tw]: "Taiwan",
32
- [GlobalStoreId.Cn]: "China"
19
+ [StoreId.Us]: "United States",
20
+ [StoreId.Eu]: "Europe",
21
+ [StoreId.Ca]: "Canada",
22
+ [StoreId.Za]: "South Africa",
23
+ [StoreId.Me]: "Middle East",
24
+ [StoreId.Uk]: "United Kingdom",
25
+ [StoreId.In]: "India",
26
+ [StoreId.Sg]: "Singapore",
27
+ [StoreId.Br]: "Brazil",
28
+ [StoreId.Jp]: "Japan",
29
+ [StoreId.Mx]: "Mexico",
30
+ [StoreId.Ph]: "Philippines",
31
+ [StoreId.Tw]: "Taiwan",
32
+ [StoreId.Cn]: "China"
33
33
  };
34
34
  const Footer = ({
35
35
  legalOnly,
@@ -1 +1 @@
1
- {"version":3,"file":"Footer.mjs","sources":["../../../src/components/Footer/Footer.tsx"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport { useMenu } from \"../../contexts/MenuContext\";\nimport { Language, SiteId } from \"../../contexts/MenuContext/mapping\";\nimport { useTranslation } from \"../../hooks\";\nimport { GlobalStoreId } from \"../../types\";\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 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 { FooterProps } 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\n/**\n * NOTE: All commented out code is here because the BE is not implemented yet.\n * BE needs a lot of work to be done but the FE is ready to use the old way\n * of subscribing to the newsletter.\n */\n// const translationKeys = {\n// footerNewsletterError: \"footer.newsletter.error\",\n// } as const;\n\n// const 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\n/**\n * Map store ID to Mailchimp region value\n */\nconst subscribeRegionValue = {\n [GlobalStoreId.Us]: \"United States\",\n [GlobalStoreId.Eu]: \"Europe\",\n [GlobalStoreId.Ca]: \"Canada\",\n [GlobalStoreId.Za]: \"South Africa\",\n [GlobalStoreId.Me]: \"Middle East\",\n [GlobalStoreId.Uk]: \"United Kingdom\",\n [GlobalStoreId.In]: \"India\",\n [GlobalStoreId.Sg]: \"Singapore\",\n [GlobalStoreId.Br]: \"Brazil\",\n [GlobalStoreId.Jp]: \"Japan\",\n [GlobalStoreId.Mx]: \"Mexico\",\n [GlobalStoreId.Ph]: \"Philippines\",\n [GlobalStoreId.Tw]: \"Taiwan\",\n [GlobalStoreId.Cn]: \"China\",\n} satisfies Record<GlobalStoreId, string>;\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 const hiddenFields = useMemo(() => {\n return {\n // Merge fields are based on Mailchimp settings\n u: \"bc856e62a9254399365d0277b\",\n id: \"1c1b02cb37\",\n MERGE1: customer?.firstName,\n MERGE2: customer?.lastName,\n // Always set the user as residential as we don't have any other type of user\n MERGE4: \"Residential (home use)\",\n // Always set the user as subscribed to all lists\n MERGE3: \"subscribed\",\n MERGE7: \"subscribed\",\n MERGE8: \"subscribed\",\n // Store region value expected in two fields\n MERGE6: subscribeRegionValue[storeId],\n MERGE9: subscribeRegionValue[storeId],\n };\n }, [customer?.firstName, customer?.lastName, 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 $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\n method=\"get\"\n action=\"https://ui.us8.list-manage.com/subscribe\"\n target=\"_blank\"\n >\n <Header>{formatMessage(\"footer.newsletter.touch\")}</Header>\n\n {/* Hidden fields */}\n {Object.entries(hiddenFields).map(([key, value]) => (\n <input key={key} type=\"hidden\" name={key} value={value} />\n ))}\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":["subscribeRegionValue","GlobalStoreId","Us","Eu","Ca","Za","Me","Uk","In","Sg","Br","Jp","Mx","Ph","Tw","Cn","Footer","legalOnly","motif","id","customer","storePicker","storeAddress","className","storeId","context","useMenu","footerContent","socialContent","termsContent","useFooterContent","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","then","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","hiddenFields","useMemo","u","MERGE1","firstName","MERGE2","lastName","MERGE4","MERGE3","MERGE7","MERGE8","MERGE6","MERGE9","jsx","ContainerWrap","$motif","children","Container","size","noVerticalMargin","InnerContainer","jsxs","Fragment","Wrap","ListsWrap","Object","values","map","list","i","ListItemWrap","Header","header","label","List","items","item","j","ListItem","ListItemAnchor","href","src","target","InnerWrap","Form","method","action","entries","key","value","type","name","InputWrap","Input","pattern","minLength","maxLength","required","autoCapitalize","autoCorrect","placeholder","SubmitButton","variant","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":";;;;;;;;;;;;;;;;;AA4EA,MAAMA,oBAAuB,GAAA;EAC3B,CAACC,aAAc,CAAAC,EAAE,GAAG,eAAA;EACpB,CAACD,aAAc,CAAAE,EAAE,GAAG,QAAA;EACpB,CAACF,aAAc,CAAAG,EAAE,GAAG,QAAA;EACpB,CAACH,aAAc,CAAAI,EAAE,GAAG,cAAA;EACpB,CAACJ,aAAc,CAAAK,EAAE,GAAG,aAAA;EACpB,CAACL,aAAc,CAAAM,EAAE,GAAG,gBAAA;EACpB,CAACN,aAAc,CAAAO,EAAE,GAAG,OAAA;EACpB,CAACP,aAAc,CAAAQ,EAAE,GAAG,WAAA;EACpB,CAACR,aAAc,CAAAS,EAAE,GAAG,QAAA;EACpB,CAACT,aAAc,CAAAU,EAAE,GAAG,OAAA;EACpB,CAACV,aAAc,CAAAW,EAAE,GAAG,QAAA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AAArE,QAAA,EAAA,CAAA5C,WAAA,EAAA,oBAEAkH,SAAU,EAAA;cAAAtE,QAAA,EAAA,CAAA,OAAA,EACN,gBAAA,IAAIuE,IAAK,CAAA,CAAA,EAAEC,WAAY,CAAA,CAAA,EAAG,GAAA,EAC5B1G,cAAc,kBAAkB,CAAA;YACnC,CAAA,CAAA;UACF,CAAA,CAAA;QACF,CAAA,CAAA;MAAA,CACF;IACF,CAAA;EAAA,CACF,CAAA;AAEJ,CAAA;"}
1
+ {"version":3,"file":"Footer.mjs","sources":["../../../src/components/Footer/Footer.tsx"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport { useMenu } from \"../../contexts/MenuContext\";\nimport { Language, SiteId } from \"../../contexts/MenuContext/mapping\";\nimport { useTranslation } from \"../../hooks\";\nimport { StoreId } from \"../../types\";\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 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 { FooterProps } 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\n/**\n * NOTE: All commented out code is here because the BE is not implemented yet.\n * BE needs a lot of work to be done but the FE is ready to use the old way\n * of subscribing to the newsletter.\n */\n// const translationKeys = {\n// footerNewsletterError: \"footer.newsletter.error\",\n// } as const;\n\n// const 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\n/**\n * Map store ID to Mailchimp region value\n */\nconst subscribeRegionValue = {\n [StoreId.Us]: \"United States\",\n [StoreId.Eu]: \"Europe\",\n [StoreId.Ca]: \"Canada\",\n [StoreId.Za]: \"South Africa\",\n [StoreId.Me]: \"Middle East\",\n [StoreId.Uk]: \"United Kingdom\",\n [StoreId.In]: \"India\",\n [StoreId.Sg]: \"Singapore\",\n [StoreId.Br]: \"Brazil\",\n [StoreId.Jp]: \"Japan\",\n [StoreId.Mx]: \"Mexico\",\n [StoreId.Ph]: \"Philippines\",\n [StoreId.Tw]: \"Taiwan\",\n [StoreId.Cn]: \"China\",\n} satisfies Record<StoreId, string>;\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 const hiddenFields = useMemo(() => {\n return {\n // Merge fields are based on Mailchimp settings\n u: \"bc856e62a9254399365d0277b\",\n id: \"1c1b02cb37\",\n MERGE1: customer?.firstName,\n MERGE2: customer?.lastName,\n // Always set the user as residential as we don't have any other type of user\n MERGE4: \"Residential (home use)\",\n // Always set the user as subscribed to all lists\n MERGE3: \"subscribed\",\n MERGE7: \"subscribed\",\n MERGE8: \"subscribed\",\n // Store region value expected in two fields\n MERGE6: subscribeRegionValue[storeId],\n MERGE9: subscribeRegionValue[storeId],\n };\n }, [customer?.firstName, customer?.lastName, 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 $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\n method=\"get\"\n action=\"https://ui.us8.list-manage.com/subscribe\"\n target=\"_blank\"\n >\n <Header>{formatMessage(\"footer.newsletter.touch\")}</Header>\n\n {/* Hidden fields */}\n {Object.entries(hiddenFields).map(([key, value]) => (\n <input key={key} type=\"hidden\" name={key} value={value} />\n ))}\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":["subscribeRegionValue","StoreId","Us","Eu","Ca","Za","Me","Uk","In","Sg","Br","Jp","Mx","Ph","Tw","Cn","Footer","legalOnly","motif","id","customer","storePicker","storeAddress","className","storeId","context","useMenu","footerContent","socialContent","termsContent","useFooterContent","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","then","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","hiddenFields","useMemo","u","MERGE1","firstName","MERGE2","lastName","MERGE4","MERGE3","MERGE7","MERGE8","MERGE6","MERGE9","jsx","ContainerWrap","$motif","children","Container","size","noVerticalMargin","InnerContainer","jsxs","Fragment","Wrap","ListsWrap","Object","values","map","list","i","ListItemWrap","Header","header","label","List","items","item","j","ListItem","ListItemAnchor","href","src","target","InnerWrap","Form","method","action","entries","key","value","type","name","InputWrap","Input","pattern","minLength","maxLength","required","autoCapitalize","autoCorrect","placeholder","SubmitButton","variant","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":";;;;;;;;;;;;;;;;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EAAA2G,8BAAA;gBAGVjE,QAAK,EAAA2D,IAAA,CAAA1C;cAAA,CAAA,EAFD,eAAe0C,KAAKzG,EAAE,EAG7B,CAAA,GAAA,eAEC2C,GAAA,CAAAqE,MAAA,EAAA;gBAAO1C,IAAM,EAAAmC,IAAA,CAAKlC;gBAAKC,MAAQ,EAAAiC,IAAA,CAAKjC,MAClC;gBAAA1B,QAAA,EAAA2D,IAAA,CAAK1C;cACR,CAAA,CAAA,EAAA,mBAEDkD,aACE,EAAA;gBAAAnE,QAAA,EAAAa,CAAA,KAAMjD,aAAauD,KAAM,CAAAiD,MAAA,GAAS,KAAK;cAC1C,CAAA,CAAA;YAAA,CAAA,EAjBgB,eAAeT,IAAA,CAAKzG,EAAE,EAkBxC,CACD;WACH,CAAA,EAAA,oBAECmH,kBAIE,EAAA;YAAArE,QAAA,EAAA,CAAA5C,WAAA,EAAA,oBAEAkH,SAAU,EAAA;cAAAtE,QAAA,EAAA,CAAA,OAAA,EACN,gBAAA,IAAIuE,IAAK,CAAA,CAAA,EAAEC,WAAY,CAAA,CAAA,EAAG,GAAA,EAC5B1G,cAAc,kBAAkB,CAAA;YACnC,CAAA,CAAA;UACF,CAAA,CAAA;QACF,CAAA,CAAA;MAAA,CACF;IACF,CAAA;EAAA,CACF,CAAA;AAEJ,CAAA;"}
@@ -94,37 +94,37 @@ const FOOTER_LINKS = {
94
94
  ["compliance" /* Compliance */]: url.ExternalUrl.COMPLIANCE
95
95
  };
96
96
  const TOC_LINKS = {
97
- [generated.GlobalStoreId.Ca]: "https://www.ui.com/legal/ui-ca-store/termsandconditions/",
98
- [generated.GlobalStoreId.Us]: "https://www.ui.com/legal/ui-store/termsandconditions/",
99
- [generated.GlobalStoreId.Eu]: "https://www.ui.com/legal/ui-eu-store/termsandconditions/",
100
- [generated.GlobalStoreId.Za]: "https://www.ui.com/legal/ui-za-store/termsandconditions/",
101
- [generated.GlobalStoreId.Me]: "https://www.ui.com/legal/ui-me-store/termsandconditions/",
102
- [generated.GlobalStoreId.Uk]: "https://cdn.ecomm.ui.com/terms-and-conditions/UK+Store+Terms+and+Conditions.pdf",
103
- [generated.GlobalStoreId.In]: "https://www.ui.com/legal/ui-in-store/termsandconditions/",
104
- [generated.GlobalStoreId.Sg]: "https://www.ui.com/legal/ui-sg-store/termsandconditions/",
105
- [generated.GlobalStoreId.Br]: "https://www.ui.com/legal/ui-br-store/termsandconditions/",
106
- [generated.GlobalStoreId.Mx]: "https://www.ui.com/legal/ui-mx-store/termsandconditions/",
107
- [generated.GlobalStoreId.Jp]: "https://www.ui.com/legal/ui-jp-store/termsandconditions/",
108
- [generated.GlobalStoreId.Tw]: "https://www.ui.com/legal/ui-tw-store/termsandconditions/",
109
- [generated.GlobalStoreId.Ph]: "https://www.ui.com/legal/ui-ph-store/termsandconditions/",
110
- [generated.GlobalStoreId.Cn]: "https://www.ui.com.cn/legal/ui-store/termsandconditions/"
97
+ [generated.StoreId.Ca]: "https://www.ui.com/legal/ui-ca-store/termsandconditions/",
98
+ [generated.StoreId.Us]: "https://www.ui.com/legal/ui-store/termsandconditions/",
99
+ [generated.StoreId.Eu]: "https://www.ui.com/legal/ui-eu-store/termsandconditions/",
100
+ [generated.StoreId.Za]: "https://www.ui.com/legal/ui-za-store/termsandconditions/",
101
+ [generated.StoreId.Me]: "https://www.ui.com/legal/ui-me-store/termsandconditions/",
102
+ [generated.StoreId.Uk]: "https://cdn.ecomm.ui.com/terms-and-conditions/UK+Store+Terms+and+Conditions.pdf",
103
+ [generated.StoreId.In]: "https://www.ui.com/legal/ui-in-store/termsandconditions/",
104
+ [generated.StoreId.Sg]: "https://www.ui.com/legal/ui-sg-store/termsandconditions/",
105
+ [generated.StoreId.Br]: "https://www.ui.com/legal/ui-br-store/termsandconditions/",
106
+ [generated.StoreId.Mx]: "https://www.ui.com/legal/ui-mx-store/termsandconditions/",
107
+ [generated.StoreId.Jp]: "https://www.ui.com/legal/ui-jp-store/termsandconditions/",
108
+ [generated.StoreId.Tw]: "https://www.ui.com/legal/ui-tw-store/termsandconditions/",
109
+ [generated.StoreId.Ph]: "https://www.ui.com/legal/ui-ph-store/termsandconditions/",
110
+ [generated.StoreId.Cn]: "https://www.ui.com.cn/legal/ui-store/termsandconditions/"
111
111
  };
112
112
  const CONTACT_LINKS = {
113
- [generated.GlobalStoreId.Us]: url.ExternalUrl.CONTACT,
114
- [generated.GlobalStoreId.Tw]: "https://tw.ui.com/contact/"
113
+ [generated.StoreId.Us]: url.ExternalUrl.CONTACT,
114
+ [generated.StoreId.Tw]: "https://tw.ui.com/contact/"
115
115
  };
116
116
  const BECOME_DISTRIBUTOR_LINKS = {
117
- [generated.GlobalStoreId.Us]: url.ExternalUrl.BECOME_DISTRIBUTOR,
118
- [generated.GlobalStoreId.Tw]: "https://tw.ui.com/distributors/become-authorized-distributor/"
117
+ [generated.StoreId.Us]: url.ExternalUrl.BECOME_DISTRIBUTOR,
118
+ [generated.StoreId.Tw]: "https://tw.ui.com/distributors/become-authorized-distributor/"
119
119
  };
120
120
  const TOS_LINKS = {
121
- [generated.GlobalStoreId.Us]: url.ExternalUrl.TERMS_SERVICE
121
+ [generated.StoreId.Us]: url.ExternalUrl.TERMS_SERVICE
122
122
  };
123
123
  const FACEBOOK_LINKS = {
124
- [generated.GlobalStoreId.Us]: url.ExternalUrl.FACEBOOK,
125
- [generated.GlobalStoreId.Jp]: "https://www.facebook.com/UbiquitiJapan"
124
+ [generated.StoreId.Us]: url.ExternalUrl.FACEBOOK,
125
+ [generated.StoreId.Jp]: "https://www.facebook.com/UbiquitiJapan"
126
126
  };
127
- const getRegionalLink = (links, storeId = generated.GlobalStoreId.Us) => {
127
+ const getRegionalLink = (links, storeId = generated.StoreId.Us) => {
128
128
  const link = links[storeId];
129
129
  if (link) {
130
130
  return link;
@@ -133,7 +133,7 @@ const getRegionalLink = (links, storeId = generated.GlobalStoreId.Us) => {
133
133
  };
134
134
  const useFooterContent = () => {
135
135
  const {
136
- storeId: globalStoreId,
136
+ storeId: StoreId2,
137
137
  context: context$1,
138
138
  createSiteUrl
139
139
  } = context.useMenu();
@@ -176,9 +176,9 @@ const useFooterContent = () => {
176
176
  });
177
177
  const urls = React.useMemo(() => {
178
178
  return {
179
- termsAndConditions: getRegionalLink(TOC_LINKS, globalStoreId)
179
+ termsAndConditions: getRegionalLink(TOC_LINKS, StoreId2)
180
180
  };
181
- }, [globalStoreId]);
181
+ }, [StoreId2]);
182
182
  const footerContent = React.useMemo(() => ({
183
183
  company: {
184
184
  header: {
@@ -193,7 +193,7 @@ const useFooterContent = () => {
193
193
  }, {
194
194
  id: "contact" /* Contact */,
195
195
  label: formatMessage("footer.link.contact"),
196
- src: getRegionalLink(CONTACT_LINKS, globalStoreId),
196
+ src: getRegionalLink(CONTACT_LINKS, StoreId2),
197
197
  target: "_blank"
198
198
  }, {
199
199
  id: "investors" /* Investors */,
@@ -252,7 +252,7 @@ const useFooterContent = () => {
252
252
  }, {
253
253
  id: "becomeDistributor" /* BecomeDistributor */,
254
254
  label: formatMessage("footer.link.distributor.become"),
255
- src: getRegionalLink(BECOME_DISTRIBUTOR_LINKS, globalStoreId),
255
+ src: getRegionalLink(BECOME_DISTRIBUTOR_LINKS, StoreId2),
256
256
  target: "_blank"
257
257
  }].filter(typeGuards.isNonNullish)
258
258
  },
@@ -288,7 +288,7 @@ const useFooterContent = () => {
288
288
  target: "_blank"
289
289
  }].filter(typeGuards.isNonNullish)
290
290
  }
291
- }), [context$1, createSiteUrl, formatMessage, globalStoreId]);
291
+ }), [context$1, createSiteUrl, formatMessage, StoreId2]);
292
292
  const socialContent = React.useMemo(() => ({
293
293
  header: {
294
294
  id: "social" /* Social */,
@@ -297,7 +297,7 @@ const useFooterContent = () => {
297
297
  items: [{
298
298
  id: "facebook" /* Facebook */,
299
299
  label: "Facebook",
300
- src: getRegionalLink(FACEBOOK_LINKS, globalStoreId),
300
+ src: getRegionalLink(FACEBOOK_LINKS, StoreId2),
301
301
  icon: FacebookIcon__default["default"],
302
302
  target: "_blank"
303
303
  }, {
@@ -319,7 +319,7 @@ const useFooterContent = () => {
319
319
  icon: InstagramIcon__default["default"],
320
320
  target: "_blank"
321
321
  }].filter(typeGuards.isNonNullish)
322
- }), [formatMessage, globalStoreId]);
322
+ }), [formatMessage, StoreId2]);
323
323
  const termsContent = React.useMemo(() => ({
324
324
  header: {
325
325
  id: "terms" /* Terms */,
@@ -335,7 +335,7 @@ const useFooterContent = () => {
335
335
  } : null, {
336
336
  id: "service" /* Service */,
337
337
  label: formatMessage("footer.link.terms.service"),
338
- src: getRegionalLink(TOS_LINKS, globalStoreId),
338
+ src: getRegionalLink(TOS_LINKS, StoreId2),
339
339
  target: "_blank"
340
340
  }, {
341
341
  id: "privacy" /* Privacy */,
@@ -358,7 +358,7 @@ const useFooterContent = () => {
358
358
  * Currently the same URL as per request of @kaspars.kristapsons
359
359
  * @see https://ui.enterprise.slack.com/files/U03KX6R6519/F0594F39XGS/screenshot_2023-05-23_at_20.49.36.png
360
360
  */
361
- src: getRegionalLink(TOC_LINKS, globalStoreId),
361
+ src: getRegionalLink(TOC_LINKS, StoreId2),
362
362
  target: "_blank"
363
363
  } : null, {
364
364
  id: "cookie" /* Cookie */,
@@ -372,7 +372,7 @@ const useFooterContent = () => {
372
372
  src: createSiteUrl([mapping.SiteId.Store, "/faq"]),
373
373
  target: "_blank"
374
374
  } : null].filter(typeGuards.isNonNullish)
375
- }), [context$1, createSiteUrl, formatMessage, globalStoreId, urls.termsAndConditions]);
375
+ }), [context$1, createSiteUrl, formatMessage, StoreId2, urls.termsAndConditions]);
376
376
  return {
377
377
  footerContent,
378
378
  socialContent,