@ubnt/store.core 9.22.0-alpha.0 → 9.22.0-alpha.10

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 (202) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/lib/assets/attention.svg +5 -5
  3. package/lib/assets/attention2.svg +5 -5
  4. package/lib/assets/minus4.svg +8 -8
  5. package/lib/assets/minus5.svg +8 -8
  6. package/lib/assets/pause.svg +3 -3
  7. package/lib/assets/pause2.svg +3 -3
  8. package/lib/assets/plus5.svg +9 -9
  9. package/lib/assets/plus6.svg +9 -9
  10. package/lib/components/Button/CartButton.d.ts +1 -3
  11. package/lib/components/Button/CartButton.js +12 -8
  12. package/lib/components/Button/CartButton.js.map +1 -1
  13. package/lib/components/Button/CartButton.mjs +12 -8
  14. package/lib/components/Button/CartButton.mjs.map +1 -1
  15. package/lib/components/Explore/ExploreData.js +3 -3
  16. package/lib/components/Explore/ExploreData.js.map +1 -1
  17. package/lib/components/Explore/ExploreData.mjs +3 -3
  18. package/lib/components/Explore/ExploreData.mjs.map +1 -1
  19. package/lib/components/Header/CartModalV2/Item/Item.styles.d.ts +1 -1
  20. package/lib/components/Header/Header.js +4 -3
  21. package/lib/components/Header/Header.js.map +1 -1
  22. package/lib/components/Header/Header.mjs +4 -3
  23. package/lib/components/Header/Header.mjs.map +1 -1
  24. package/lib/components/Header/Header.types.d.ts +1 -1
  25. package/lib/components/Header/Header.types.js.map +1 -1
  26. package/lib/components/Header/Header.types.mjs.map +1 -1
  27. package/lib/components/Header/ProHeader/ProHeader.d.ts +1 -1
  28. package/lib/components/Header/ProHeader/ProHeader.js +18 -43
  29. package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
  30. package/lib/components/Header/ProHeader/ProHeader.mjs +19 -44
  31. package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
  32. package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +3 -1
  33. package/lib/components/Header/ProHeader/ProHeader.styles.js +6 -0
  34. package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
  35. package/lib/components/Header/ProHeader/ProHeader.styles.mjs +6 -0
  36. package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
  37. package/lib/components/MicrositeHeader/components/FirstLevelMenu/FirstLevelMenu.types.d.ts +1 -1
  38. package/lib/components/MicrositeHeader/components/Navigation/Navigation.d.ts +4 -0
  39. package/lib/components/MicrositeHeader/components/Navigation/Navigation.js +27 -11
  40. package/lib/components/MicrositeHeader/components/Navigation/Navigation.js.map +1 -1
  41. package/lib/components/MicrositeHeader/components/Navigation/Navigation.mjs +27 -12
  42. package/lib/components/MicrositeHeader/components/Navigation/Navigation.mjs.map +1 -1
  43. package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.d.ts +6 -6
  44. package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.js +9 -8
  45. package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.js.map +1 -1
  46. package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.mjs +9 -8
  47. package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.mjs.map +1 -1
  48. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/NavigationItem.d.ts +2 -2
  49. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/NavigationItem.js.map +1 -1
  50. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/NavigationItem.mjs.map +1 -1
  51. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.js +3 -21
  52. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.js.map +1 -1
  53. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.mjs +4 -16
  54. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.mjs.map +1 -1
  55. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.styles.d.ts +0 -2
  56. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.styles.js +3 -38
  57. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.styles.js.map +1 -1
  58. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.styles.mjs +4 -37
  59. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.styles.mjs.map +1 -1
  60. package/lib/components/MicrositeHeader/components/Navigation/index.js +1 -0
  61. package/lib/components/MicrositeHeader/components/Navigation/index.js.map +1 -1
  62. package/lib/components/MicrositeHeader/components/Navigation/index.mjs +1 -1
  63. package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +1 -1
  64. package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.mjs +1 -1
  65. package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.js +1 -1
  66. package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.mjs +2 -2
  67. package/lib/components/ModelCompareV3/data/products/express.js +2 -2
  68. package/lib/components/ModelCompareV3/data/products/express.js.map +1 -1
  69. package/lib/components/ModelCompareV3/data/products/express.mjs +3 -3
  70. package/lib/components/ModelCompareV3/data/products/express.mjs.map +1 -1
  71. package/lib/components/ModelCompareV3/data/products/ucgMax.js +1 -1
  72. package/lib/components/ModelCompareV3/data/products/ucgMax.js.map +1 -1
  73. package/lib/components/ModelCompareV3/data/products/ucgMax.mjs +1 -1
  74. package/lib/components/ModelCompareV3/data/products/ucgMax.mjs.map +1 -1
  75. package/lib/components/ModelCompareV3/data/products/ucgUltra.js +2 -2
  76. package/lib/components/ModelCompareV3/data/products/ucgUltra.js.map +1 -1
  77. package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs +3 -3
  78. package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs.map +1 -1
  79. package/lib/components/ModelCompareV3/data/products/udmPro.js +2 -2
  80. package/lib/components/ModelCompareV3/data/products/udmPro.js.map +1 -1
  81. package/lib/components/ModelCompareV3/data/products/udmPro.mjs +3 -3
  82. package/lib/components/ModelCompareV3/data/products/udmPro.mjs.map +1 -1
  83. package/lib/components/ModelCompareV3/data/products/udmProMax.js +2 -2
  84. package/lib/components/ModelCompareV3/data/products/udmProMax.js.map +1 -1
  85. package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +3 -3
  86. package/lib/components/ModelCompareV3/data/products/udmProMax.mjs.map +1 -1
  87. package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +2 -2
  88. package/lib/components/ModelCompareV3/data/products/udmProSpecial.js.map +1 -1
  89. package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +3 -3
  90. package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs.map +1 -1
  91. package/lib/components/ModelCompareV3/data/products/udr.js +2 -2
  92. package/lib/components/ModelCompareV3/data/products/udr.js.map +1 -1
  93. package/lib/components/ModelCompareV3/data/products/udr.mjs +3 -3
  94. package/lib/components/ModelCompareV3/data/products/udr.mjs.map +1 -1
  95. package/lib/components/ModelCompareV3/data/products/udw.js +2 -2
  96. package/lib/components/ModelCompareV3/data/products/udw.js.map +1 -1
  97. package/lib/components/ModelCompareV3/data/products/udw.mjs +3 -3
  98. package/lib/components/ModelCompareV3/data/products/udw.mjs.map +1 -1
  99. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +1 -1
  100. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
  101. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.js +2 -2
  102. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.mjs +2 -2
  103. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.js +1 -1
  104. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.mjs +2 -2
  105. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.js +1 -1
  106. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.mjs +2 -2
  107. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/plus.svg.js +1 -1
  108. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/plus.svg.mjs +2 -2
  109. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js +1 -1
  110. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.mjs +1 -1
  111. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.js +1 -1
  112. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.mjs +2 -2
  113. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js +2 -2
  114. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs +2 -2
  115. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.js +1 -1
  116. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.mjs +2 -2
  117. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/plus.svg.js +1 -1
  118. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/plus.svg.mjs +2 -2
  119. package/lib/components/VideoPlayerNew/VideoPlayer.js +1 -1
  120. package/lib/components/VideoPlayerNew/VideoPlayer.mjs +1 -1
  121. package/lib/components/VideoPlayerNew/assets/pause.svg.js +1 -1
  122. package/lib/components/VideoPlayerNew/assets/pause.svg.mjs +2 -2
  123. package/lib/constants/proStoreCategories/mapping/index.d.ts +2 -2
  124. package/lib/constants/proStoreCategories/mapping/index.js +37 -62
  125. package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
  126. package/lib/constants/proStoreCategories/mapping/index.mjs +36 -60
  127. package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
  128. package/lib/constants/proStoreCategories/mapping/redirects.js +17 -2
  129. package/lib/constants/proStoreCategories/mapping/redirects.js.map +1 -1
  130. package/lib/constants/proStoreCategories/mapping/redirects.mjs +17 -2
  131. package/lib/constants/proStoreCategories/mapping/redirects.mjs.map +1 -1
  132. package/lib/constants/proStoreCategories/mapping/unifi.d.ts +5 -5
  133. package/lib/constants/proStoreCategories/mapping/unifi.js +5 -5
  134. package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
  135. package/lib/constants/proStoreCategories/mapping/unifi.mjs +5 -5
  136. package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
  137. package/lib/constants/proStoreCategories/translations/ar.json.js +2 -0
  138. package/lib/constants/proStoreCategories/translations/ar.json.js.map +1 -1
  139. package/lib/constants/proStoreCategories/translations/ar.json.mjs +2 -0
  140. package/lib/constants/proStoreCategories/translations/ar.json.mjs.map +1 -1
  141. package/lib/constants/proStoreCategories/translations/de.json.js +2 -0
  142. package/lib/constants/proStoreCategories/translations/de.json.js.map +1 -1
  143. package/lib/constants/proStoreCategories/translations/de.json.mjs +2 -0
  144. package/lib/constants/proStoreCategories/translations/de.json.mjs.map +1 -1
  145. package/lib/constants/proStoreCategories/translations/el.json.js +2 -0
  146. package/lib/constants/proStoreCategories/translations/el.json.js.map +1 -1
  147. package/lib/constants/proStoreCategories/translations/el.json.mjs +2 -0
  148. package/lib/constants/proStoreCategories/translations/el.json.mjs.map +1 -1
  149. package/lib/constants/proStoreCategories/translations/en.json.js +2 -2
  150. package/lib/constants/proStoreCategories/translations/en.json.mjs +2 -2
  151. package/lib/constants/proStoreCategories/translations/es.json.js +2 -0
  152. package/lib/constants/proStoreCategories/translations/es.json.js.map +1 -1
  153. package/lib/constants/proStoreCategories/translations/es.json.mjs +2 -0
  154. package/lib/constants/proStoreCategories/translations/es.json.mjs.map +1 -1
  155. package/lib/constants/proStoreCategories/translations/fr.json.js +2 -0
  156. package/lib/constants/proStoreCategories/translations/fr.json.js.map +1 -1
  157. package/lib/constants/proStoreCategories/translations/fr.json.mjs +2 -0
  158. package/lib/constants/proStoreCategories/translations/fr.json.mjs.map +1 -1
  159. package/lib/constants/proStoreCategories/translations/it.json.js +2 -0
  160. package/lib/constants/proStoreCategories/translations/it.json.js.map +1 -1
  161. package/lib/constants/proStoreCategories/translations/it.json.mjs +2 -0
  162. package/lib/constants/proStoreCategories/translations/it.json.mjs.map +1 -1
  163. package/lib/constants/proStoreCategories/translations/ja.json.js +2 -0
  164. package/lib/constants/proStoreCategories/translations/ja.json.js.map +1 -1
  165. package/lib/constants/proStoreCategories/translations/ja.json.mjs +2 -0
  166. package/lib/constants/proStoreCategories/translations/ja.json.mjs.map +1 -1
  167. package/lib/constants/proStoreCategories/translations/pt-BR.json.js +2 -0
  168. package/lib/constants/proStoreCategories/translations/pt-BR.json.js.map +1 -1
  169. package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs +2 -0
  170. package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs.map +1 -1
  171. package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +2 -0
  172. package/lib/constants/proStoreCategories/translations/zh-Hans.json.js.map +1 -1
  173. package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +2 -0
  174. package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs.map +1 -1
  175. package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +2 -0
  176. package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js.map +1 -1
  177. package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +2 -0
  178. package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs.map +1 -1
  179. package/lib/constants/proStoreFilters/mapping.js +4 -4
  180. package/lib/constants/proStoreFilters/mapping.js.map +1 -1
  181. package/lib/constants/proStoreFilters/mapping.mjs +4 -4
  182. package/lib/constants/proStoreFilters/mapping.mjs.map +1 -1
  183. package/lib/contexts/MenuContext/mapping.js.map +1 -1
  184. package/lib/contexts/MenuContext/mapping.mjs.map +1 -1
  185. package/lib/contexts/MicrositeMenuContext/mapping.js +8 -1
  186. package/lib/contexts/MicrositeMenuContext/mapping.js.map +1 -1
  187. package/lib/contexts/MicrositeMenuContext/mapping.mjs +8 -1
  188. package/lib/contexts/MicrositeMenuContext/mapping.mjs.map +1 -1
  189. package/lib/contexts/MicrositeMenuContext/types.d.ts +1 -0
  190. package/lib/contexts/MicrositeMenuContext/types.js.map +1 -1
  191. package/lib/contexts/MicrositeMenuContext/types.mjs.map +1 -1
  192. package/lib/utils/money/index.d.ts +2 -1
  193. package/lib/utils/money/index.js +4 -1
  194. package/lib/utils/money/index.js.map +1 -1
  195. package/lib/utils/money/index.mjs +2 -1
  196. package/lib/utils/money/index.mjs.map +1 -1
  197. package/package.json +1 -1
  198. package/lib/utils/money/allocators/index.d.ts +0 -2
  199. package/lib/utils/money/allocators/index.js +0 -8
  200. package/lib/utils/money/allocators/index.js.map +0 -1
  201. package/lib/utils/money/allocators/index.mjs +0 -4
  202. package/lib/utils/money/allocators/index.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Header.mjs","sources":["../../../src/components/Header/Header.tsx"],"sourcesContent":["import { LineLoader } from \"@ubnt/ui-components/LineLoader\";\nimport type { Motif } from \"@ubnt/ui-components/utils\";\nimport merge from \"lodash/merge\";\nimport type { TouchEvent } from \"react\";\nimport type React from \"react\";\nimport {\n cloneElement,\n isValidElement,\n memo,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport {\n useHoverDirty,\n useKeyPressEvent,\n useMedia,\n useWindowScroll,\n} from \"react-use\";\n\nimport * as icons from \"../../constants/icons\";\nimport { BREAKPOINTS } from \"../../constants/layout\";\nimport {\n UISPCategorySlug,\n UniFiCategorySlug,\n} from \"../../constants/proStoreCategories/mapping\";\nimport { ExternalUrl } from \"../../constants/url\";\nimport { useMenu } from \"../../contexts/MenuContext\";\nimport { Language, SiteId } from \"../../contexts/MenuContext/mapping\";\nimport { ModalId } from \"../../contexts/MenuContext/types\";\nimport { filterOutUnrenderableItems } from \"../../contexts/MenuContext/utils\";\nimport { useTranslation } from \"../../hooks/useTranslation\";\nimport { MobileModal } from \"../MobileModal\";\nimport { StyleableSvgImage } from \"../StyleableSvgImage\";\nimport { AccountFrameMobile } from \"./AccountFrame/Mobile\";\nimport type { AccountMenuProps } from \"./AccountMenu/AccountMenu.types\";\nimport { EmptyCartModal } from \"./CartModal/Empty\";\nimport { CartModal } from \"./CartModalV2\";\nimport * as S from \"./Header.styles\";\nimport type { HeaderProps } from \"./Header.types\";\nimport { defaultHeaderTranslations } from \"./Header.types\";\nimport { LanguageFrame } from \"./LanguageFrame\";\nimport { LanguageFrameMobile } from \"./LanguageFrame/Mobile\";\nimport { MenuItem } from \"./MenuItem\";\nimport { MenuButton } from \"./MenuItem/MenuItem\";\nimport {\n NavigationCarousel,\n NavigationMicrositeMenu,\n NavigationMobileMenu,\n} from \"./Navigation\";\nimport { HeaderOverlay } from \"./Overlay\";\nimport { en as EN_TRANSLATION } from \"./translations\";\n\n/**\n * NOTE: use MenuContext.ModalId, handleModalOpen and handleModalClose when adding new\n * modals to header\n */\n\nexport const GlobalHeader = memo(function GlobalHeader({\n className,\n motif: propMotif,\n translations: initialTranslations,\n renderImage,\n showLineLoader,\n onLanguageChange,\n onModalOpen,\n onMenuItemLinkClick,\n onMenuSubItemLinkClick,\n onSearchResultsAction,\n account,\n search,\n cart,\n onCartClick,\n sticky: stickyInitial,\n stickyCarousel,\n initialActiveModal,\n onActiveModal,\n trackStoreSearchClick,\n transparentHeader,\n micrositeMenu,\n embedConfig,\n accountMenu,\n}: HeaderProps) {\n const isMobile = useMedia(BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN, false);\n\n /** @see https://ubiquiti.atlassian.net/browse/NEP-1781 */\n // // Callback ref used to get child component reference\n // // @see https://reactjs.org/docs/refs-and-the-dom.html#callback-refs\n // const [searchInputRef, setSearchInputRef] = useState<HTMLInputElement | null>(\n // null\n // );\n\n // #############################################################################\n // Merge translations\n // #############################################################################\n const translations = useMemo(() => {\n return merge(defaultHeaderTranslations, initialTranslations);\n }, [initialTranslations]);\n\n // #############################################################################\n // Menu\n // #############################################################################\n const {\n /**\n * NOTE: We use isSsr in the render to make the HTML lighter by not returning elements we don't need for initial\n * viewing such as modals etc. This results in lighter document size.\n * TODO: use next/dynamic to lazy load the non-critical elements after initial page load, we can't do it now as we\n * have microsites that don't have next/dynamic\n */\n isSsr,\n motif,\n context,\n setMotif,\n activeModal,\n prevActiveModal,\n setActiveModal,\n activeNavigationSection,\n // inactiveNavigationSection,\n setNavigationOutOfView,\n createSiteUrl,\n isMicrositeContext,\n isMultiLanguage,\n } = useMenu();\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 * Update motif based on given props, it might vary by page\n */\n useEffect(() => {\n // Force dark motif for UISP\n setMotif(propMotif);\n }, [propMotif, setMotif]);\n\n // Set initial active modal\n const [initialActiveModalDone, setInitialActiveModalSet] = useState(false);\n\n useEffect(() => {\n if (!initialActiveModal || initialActiveModalDone) return;\n\n setActiveModal(initialActiveModal);\n setInitialActiveModalSet(true);\n }, [initialActiveModal, initialActiveModalDone, setActiveModal]);\n\n // Handle active modal event\n useEffect(() => {\n if (activeModal === prevActiveModal) return;\n\n onActiveModal?.(activeModal, prevActiveModal);\n }, [activeModal, onActiveModal, prevActiveModal]);\n\n // #############################################################################\n // Actions\n // #############################################################################\n const handleModalOpen = useCallback(\n (e?: React.MouseEvent<HTMLElement>, id?: ModalId) => {\n e?.stopPropagation();\n\n // Remove all toasts on modal open\n if (activeModal !== id) {\n onModalOpen?.();\n }\n\n // Cart modal overwrite\n if (id === ModalId.Cart) {\n if (onCartClick) {\n // If callback-provided will execute it\n onCartClick();\n } else {\n // Otherwise navigate to store\n window.location.href = createSiteUrl([SiteId.Store, \"/checkout\"]);\n }\n return;\n }\n\n setActiveModal(!id || activeModal === id ? null : id);\n },\n [activeModal, onCartClick, setActiveModal, onModalOpen, createSiteUrl],\n );\n\n const handleModalClose = useCallback(() => {\n setActiveModal(null);\n }, [setActiveModal]);\n\n // close modal when pressing escape\n useKeyPressEvent(\"Escape\", handleModalClose);\n\n /** @see https://ubiquiti.atlassian.net/browse/NEP-1781 */\n // const handleShowSearchTab = useCallback(\n // (e: React.MouseEvent<HTMLElement>) => {\n // // Open search modal\n // handleModalOpen(e, ModalId.Search);\n\n // if (searchInputRef) {\n // // * search input focus triggered via a user action so keyboard visible on ios onFocus\n // // @see https://stackoverflow.com/questions/4609765/manually-triggering-the-iphone-ipad-ipod-keyboard-from-javascript\n // searchInputRef.focus();\n // }\n // },\n // [handleModalOpen, searchInputRef]\n // );\n\n const cartQuantity = useMemo(() => {\n return cart?.items.reduce((sum, item) => sum + item.quantity, 0) ?? 0;\n }, [cart?.items]);\n\n const handleHamburgerClick = useCallback(() => {\n if (!isMobile) return;\n\n if (activeModal === ModalId.MobileMenu) {\n setActiveModal(null);\n } else {\n setActiveModal(ModalId.MobileMenu);\n }\n }, [activeModal, isMobile, setActiveModal]);\n\n // #############################################################################\n // Header bar motif override\n // #############################################################################\n const headerBarMotif = useMemo((): Motif => {\n // Force dark on search\n if (activeModal === ModalId.Search) {\n return \"dark\";\n }\n\n // Return actual motif\n return motif;\n }, [activeModal, motif]);\n\n // #############################################################################\n // Show microsite menu\n // #############################################################################\n const [showTouchMicrositeMenu, setShowTouchMicrositeMenu] = useState(false);\n\n const logoRef = useRef<HTMLDivElement>(null);\n const logoHover = useHoverDirty(logoRef);\n\n // Must separate both show states to prevent flicker\n const showMicrositeMenu = useMemo(() => {\n return logoHover || showTouchMicrositeMenu;\n }, [logoHover, showTouchMicrositeMenu]);\n\n const onLogoAnchorTouchEnd = useCallback(\n (ev: TouchEvent) => {\n // Ignore if not a microsite menu context\n if (!micrositeMenu && !embedConfig?.homeLinkClickHandler) return;\n\n ev.preventDefault();\n\n if (embedConfig?.homeLinkClickHandler) {\n embedConfig.homeLinkClickHandler();\n\n return;\n }\n\n setShowTouchMicrositeMenu((show) => !show);\n },\n [embedConfig, micrositeMenu],\n );\n\n // #############################################################################\n // Out of view handler\n // #############################################################################\n const wrapRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n // If there's no navigation, it's not visible\n if (!wrapRef.current) {\n setNavigationOutOfView(true);\n return;\n }\n\n // Use intersection observer to see if it's in the view\n const observer = new IntersectionObserver(([entry]) =>\n setNavigationOutOfView(!entry?.isIntersecting),\n );\n\n observer.observe(wrapRef.current);\n\n // Cleanup\n return () => {\n observer.disconnect();\n };\n }, [setNavigationOutOfView]);\n\n // #############################################################################\n // Sticky header\n // #############################################################################\n const { y: scrollY } = useWindowScroll();\n\n const sticky = useMemo(() => {\n return (\n // Set as sticky if mobile menu is open\n activeModal === ModalId.MobileMenu ||\n // Fallback to the default\n (stickyInitial && scrollY > 0)\n );\n }, [activeModal, scrollY, stickyInitial]);\n\n // #############################################################################\n // Modals and overlay\n // #############################################################################\n const showEmptyCartModal = useMemo(() => {\n return activeModal === ModalId.Cart && !onCartClick && !cart?.items.length;\n }, [activeModal, cart?.items.length, onCartClick]);\n\n const showFullCartModal = useMemo(() => {\n return activeModal === ModalId.Cart && !onCartClick && !!cart?.items.length;\n }, [activeModal, cart?.items.length, onCartClick]);\n\n const overlayShowForModal = useMemo((): ModalId | null => {\n const overlayModals = [ModalId.Search, ModalId.Cart];\n\n if (!activeModal || !overlayModals.includes(activeModal)) {\n return null;\n }\n\n // Show modal only if the full cart modal is active\n if (activeModal === ModalId.Cart && !showFullCartModal) {\n return null;\n }\n\n return activeModal;\n }, [activeModal, showFullCartModal]);\n\n const storeLink = useMemo(() => {\n const storeLinkSearchParams = (() => {\n let category: UniFiCategorySlug | UISPCategorySlug;\n switch (activeNavigationSection.type) {\n case \"secondary\": {\n category = UISPCategorySlug[\"60GhzWireless\"];\n break;\n }\n case \"primary\": {\n category = UniFiCategorySlug.UniFiCloudGateways;\n break;\n }\n default: {\n category = UniFiCategorySlug.UniFiCloudGateways;\n break;\n }\n }\n\n /** To make url's cleaner only add type if it's non-default */\n return category === UniFiCategorySlug.UniFiCloudGateways\n ? undefined\n : {\n // TODO: improve typesafety to use query key enum (that doesn't exist now) for \"type\"\n category,\n };\n })();\n\n return createSiteUrl([SiteId.Store, \"/\", storeLinkSearchParams]);\n }, [activeNavigationSection, createSiteUrl]);\n\n const handleStoreSearchClick = useCallback(() => {\n trackStoreSearchClick?.();\n }, [trackStoreSearchClick]);\n\n // #############################################################################\n // Header wrap offset for sticky carousel\n // #############################################################################\n const headerWrapRef = useRef<HTMLDivElement>(null);\n const [headerWrapScrollTop, setHeaderWrapScrollTop] = useState(0);\n\n useEffect(() => {\n // Ignore if not sticky carousel\n if (!stickyCarousel) return;\n if (sticky) {\n // Set as 0 if header is sticky\n setHeaderWrapScrollTop(0);\n } else {\n // Set negative offset top\n const headerWrapEl = headerWrapRef.current;\n if (!headerWrapEl) return;\n setHeaderWrapScrollTop(headerWrapEl.getBoundingClientRect().top);\n }\n // Listen to scroll\n scrollY;\n }, [scrollY, sticky, stickyCarousel]);\n\n const avatarHtml = useMemo(() => {\n if (embedConfig?.hideAvatarIcon) {\n return null;\n }\n\n if (account?.loading) {\n return (\n <S.IconWrap motif={motif}>\n <S.SkeletonCircleLoader diameter={S.HEADER_ICON_SIZE} />\n </S.IconWrap>\n );\n }\n\n return (\n <S.IconWrap\n motif={motif}\n data-test-id=\"avatar\"\n onClick={(e) => handleModalOpen(e, ModalId.Account)}\n >\n <S.SvgIcon\n src={icons.header.account}\n width={S.HEADER_ICON_SIZE}\n height={S.HEADER_ICON_SIZE}\n />\n </S.IconWrap>\n );\n }, [account?.loading, embedConfig?.hideAvatarIcon, handleModalOpen, motif]);\n\n const accountItem = useMemo(() => {\n if (!accountMenu) {\n return avatarHtml;\n }\n\n /**\n * We try to inject the onOpen and onClose props to the accountMenu component\n * if it's a valid React element. In most of the cases, it will\n * be <AccountMenu /> component.\n */\n if (isValidElement<AccountMenuProps>(accountMenu)) {\n return cloneElement(accountMenu, {\n /**\n * We are setting state to null to close all other modals because\n * the AccountMenu open state is not controlled by the Header component\n */\n onOpen: handleModalClose,\n onClose: handleModalClose,\n });\n }\n\n return accountMenu;\n }, [accountMenu, avatarHtml, handleModalClose]);\n\n /**\n * Due to how Account menu works, when it is opened, we have to add adding to header when\n * it is sticky otherwise it the header will jump.\n */\n const [documentPaddingRight, setDocumentPaddingRight] = useState<\n string | null\n >(null);\n\n useEffect(() => {\n // Callback function to execute when mutations are observed\n const mutationCallback: MutationCallback = (mutationsList) => {\n for (const mutation of mutationsList) {\n if (\n mutation.type === \"attributes\" &&\n mutation.attributeName === \"style\"\n ) {\n // Accessing the new style\n const paddingRight = (mutation.target as HTMLElement).style\n .paddingRight;\n setDocumentPaddingRight(paddingRight);\n }\n }\n };\n\n // Create a MutationObserver instance\n const observer = new MutationObserver(mutationCallback);\n\n // Options for the observer (which mutations to observe)\n const config: MutationObserverInit = {\n attributes: true,\n attributeFilter: [\"style\"],\n };\n\n // Start observing the target node for configured mutations\n const targetNode = document.documentElement;\n observer.observe(targetNode, config);\n\n // Cleanup function to disconnect the observer when the component unmounts\n return () => {\n observer.disconnect();\n };\n }, []);\n\n const stickyPadding = useMemo(() => {\n if (sticky && documentPaddingRight) {\n return documentPaddingRight;\n }\n\n return undefined;\n }, [documentPaddingRight, sticky]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.Wrap ref={wrapRef}>\n <S.HeaderWrap ref={headerWrapRef} noWrapHeight={transparentHeader}>\n <S.Header\n transparent={transparentHeader}\n className={className}\n motif={headerBarMotif}\n sticky={sticky}\n stickyPadding={stickyPadding}\n >\n <S.Container size=\"desktop\" noVerticalMargin>\n <S.MenuItemsWrap>\n <MenuItem\n hideOnDesktop\n motif={motif}\n onClick={handleHamburgerClick}\n >\n <S.LogoIconWrap motif={motif} $burger>\n {activeModal === ModalId.MobileMenu ? (\n <StyleableSvgImage\n src={icons.generic.close}\n width={14}\n height={14}\n />\n ) : (\n <StyleableSvgImage\n src={icons.generic.hamburger}\n width={S.HEADER_ICON_SIZE}\n height={S.HEADER_ICON_SIZE}\n />\n )}\n </S.LogoIconWrap>\n </MenuItem>\n\n <S.LeftWrap>\n {activeModal !== ModalId.Search && (\n <S.Anchor\n href={createSiteUrl([\n context === SiteId.Uisp ? SiteId.Uisp : SiteId.Ui,\n \"/\",\n ])}\n onTouchEnd={onLogoAnchorTouchEnd}\n >\n <S.LogoIconWrap motif={motif} ref={logoRef}>\n {(() => {\n switch (context) {\n case SiteId.Ui:\n case SiteId.Uwc:\n return (\n <StyleableSvgImage\n src={icons.header.logoUnifi}\n width={58.5}\n height={18}\n />\n );\n case SiteId.Uisp:\n return (\n <StyleableSvgImage\n src={icons.header.logoUisp}\n width={56.5}\n height={18}\n />\n );\n default:\n return (\n <StyleableSvgImage\n src={icons.header.logo}\n width={17.86}\n height={18}\n />\n );\n }\n })()}\n </S.LogoIconWrap>\n </S.Anchor>\n )}\n\n <S.InnerLeftWrap center={activeModal === ModalId.Search}>\n {/** @see https://ubiquiti.atlassian.net/browse/NEP-1781 */}\n {/* <S.SearchTabWrap\n data-test-id=\"search-input\"\n hide={activeModal !== ModalId.Search}\n >\n <SearchTab\n translations={translations}\n onClose={handleModalClose}\n setInputRef={setSearchInputRef}\n showSearchTab={activeModal === ModalId.Search}\n motif={headerBarMotif}\n onSearchResultsAction={onSearchResultsAction}\n search={search}\n />\n </S.SearchTabWrap> */}\n\n {/* Hide menu items when search active */}\n {activeModal !== ModalId.Search && (\n <S.MenuItemWrap hideOnMobile>\n {filterOutUnrenderableItems(\n activeNavigationSection.items,\n ).map((item) => (\n <MenuItem\n key={item.id}\n as=\"a\"\n href={item.url}\n active={item.active}\n onClick={(e) => onMenuItemLinkClick?.(e, item)}\n motif={motif}\n >\n <S.MenuItemLabel>\n {item.icon && <S.SvgIcon {...item.icon} />}\n {/* FIXME: improve type-safety */}\n {/* eslint-disable-next-line @typescript-eslint/no-explicit-any */}\n {formatMessage(item.id as unknown as any)}\n </S.MenuItemLabel>\n </MenuItem>\n ))}\n </S.MenuItemWrap>\n )}\n </S.InnerLeftWrap>\n </S.LeftWrap>\n\n {activeModal !== ModalId.Search && (\n <S.MenuItemWrap narrow>\n {/* <MenuItem\n as=\"a\"\n href={inactiveNavigationSection.url}\n hideOnMobile\n motif={motif}\n >\n {inactiveNavigationSection[\"label\"]}\n </MenuItem> */}\n\n <MenuButton\n href={\n [SiteId.ExpertsUisp, SiteId.Uisp].includes(context)\n ? ExternalUrl.SUPPORT_UISP\n : ExternalUrl.SUPPORT\n }\n hideOnMobile\n motif={motif}\n secondary\n dataTestId=\"support-btn\"\n // Special request by Sam to open the link in new tab - only on ui.com/uisp.com microsites\n openInNewTab={[SiteId.Ui, SiteId.Uisp].includes(context)}\n >\n {formatMessage(\n translations.support as keyof typeof EN_TRANSLATION,\n )}\n </MenuButton>\n\n <MenuButton\n href={storeLink}\n onClick={handleStoreSearchClick}\n hideOnMobile\n motif={motif}\n dataTestId=\"store-btn\"\n >\n {formatMessage(\n translations.store as keyof typeof EN_TRANSLATION,\n )}\n </MenuButton>\n\n <S.IconsWrap>\n {/** @see https://ubiquiti.atlassian.net/browse/NEP-1781 */}\n {/* <S.IconWrap\n hideOnMobile\n motif={motif}\n data-test-id=\"search-icon\"\n onClick={handleShowSearchTab}\n >\n <S.SvgIcon\n src={icons.generic.search}\n width={14}\n height={14}\n />\n </S.IconWrap> */}\n\n {/* Language Picker */}\n {isMultiLanguage && !embedConfig?.hideLanguagePicker && (\n <S.IconWrap\n motif={motif}\n data-test-id=\"language\"\n onClick={(e) => handleModalOpen(e, ModalId.Language)}\n >\n <S.SvgIcon\n src={icons.header.globe}\n width={S.HEADER_ICON_SIZE}\n height={S.HEADER_ICON_SIZE}\n />\n </S.IconWrap>\n )}\n\n {!isMicrositeContext && (\n <S.IconWrap\n motif={motif}\n data-test-id=\"cart-btn\"\n onClick={(e) => handleModalOpen(e, ModalId.Cart)}\n >\n {cart?.loading ? (\n <S.SkeletonCircleLoader\n diameter={S.HEADER_ICON_SIZE}\n />\n ) : (\n <S.CartIcon\n itemCount={cartQuantity}\n motif={motif}\n width={S.HEADER_ICON_SIZE}\n height={S.HEADER_ICON_SIZE}\n />\n )}\n </S.IconWrap>\n )}\n\n {accountItem}\n </S.IconsWrap>\n </S.MenuItemWrap>\n )}\n </S.MenuItemsWrap>\n\n {!isSsr && (\n <LineLoader placement=\"bottom\" isLoading={!!showLineLoader} />\n )}\n </S.Container>\n\n {!isSsr && showEmptyCartModal && (\n <S.ModalWrap size=\"desktop\">\n <S.ModalInnerWrap $modal={ModalId.Cart}>\n <EmptyCartModal\n translations={translations}\n open\n onClose={handleModalClose}\n />\n </S.ModalInnerWrap>\n </S.ModalWrap>\n )}\n\n {!isSsr &&\n activeModal === ModalId.Account &&\n (isMobile ? (\n <MobileModal\n isOpen={activeModal === ModalId.Account}\n handleClose={handleModalClose}\n lockScroll\n closeButtonProps={{\n value: formatMessage(\"Close\"),\n variant: \"cancel\",\n }}\n >\n <AccountFrameMobile\n /**\n * HACK: Disabled custom rendering as the account.stg.ui.com hasn't been whitelisted by our image\n * optimisation CDN\n * @see https://ubiquiti.atlassian.net/browse/NEP-1689\n */\n // renderImage={renderImage}\n onClose={handleModalClose}\n account={account}\n />\n </MobileModal>\n ) : (\n <S.ModalWrap size=\"desktop\">\n <S.ModalInnerWrap\n $pro\n $modal={ModalId.Account}\n ></S.ModalInnerWrap>\n </S.ModalWrap>\n ))}\n\n {/* Language picker component */}\n {!isSsr &&\n activeModal === ModalId.Language &&\n (isMobile ? (\n <MobileModal\n isOpen={activeModal === ModalId.Language}\n handleClose={handleModalClose}\n lockScroll\n closeButtonProps={{\n value: formatMessage(\"Close\"),\n variant: \"cancel\",\n }}\n >\n <LanguageFrameMobile onLanguageChange={onLanguageChange} />\n </MobileModal>\n ) : (\n <S.ModalWrap size=\"desktop\">\n <S.ModalInnerWrap $pro $modal={ModalId.Account}>\n <LanguageFrame\n /**\n * HACK: Disabled custom rendering as the account.stg.ui.com hasn't been whitelisted by our image\n * optimisation CDN\n * @see https://ubiquiti.atlassian.net/browse/NEP-1689\n */\n open\n onClose={handleModalClose}\n onLanguageChange={onLanguageChange}\n />\n </S.ModalInnerWrap>\n </S.ModalWrap>\n ))}\n </S.Header>\n </S.HeaderWrap>\n\n {!isSsr && showFullCartModal && cart && (\n <CartModal\n translations={translations}\n renderImage={renderImage}\n onClose={handleModalClose}\n cart={cart}\n />\n )}\n\n {!isSsr && activeModal === ModalId.MobileMenu && (\n <NavigationMobileMenu\n translations={translations}\n onClose={handleModalClose}\n onSearchResultsAction={onSearchResultsAction}\n renderImage={renderImage}\n search={search}\n storeLink={storeLink}\n hasMicrositeMenu={!!micrositeMenu}\n />\n )}\n\n <NavigationCarousel\n onMenuSubItemLinkClick={onMenuSubItemLinkClick}\n stickyHeader={sticky}\n sticky={stickyCarousel}\n headerWrapScrollTop={headerWrapScrollTop}\n />\n\n {micrositeMenu && (\n <NavigationMicrositeMenu\n {...micrositeMenu}\n show={showMicrositeMenu}\n onClose={() => setShowTouchMicrositeMenu(false)}\n stickyHeader={sticky}\n />\n )}\n\n {!isSsr && (\n <HeaderOverlay\n showForModal={overlayShowForModal}\n onClose={handleModalClose}\n />\n )}\n </S.Wrap>\n );\n});\n"],"names":["GlobalHeader","memo","GlobalHeader2","className","motif","propMotif","translations","initialTranslations","renderImage","showLineLoader","onLanguageChange","onModalOpen","onMenuItemLinkClick","onMenuSubItemLinkClick","onSearchResultsAction","account","search","cart","onCartClick","sticky","stickyInitial","stickyCarousel","initialActiveModal","onActiveModal","trackStoreSearchClick","transparentHeader","micrositeMenu","embedConfig","accountMenu","isMobile","useMedia","BREAKPOINTS","TOP_NAV_MOBILE_AND_DOWN","useMemo","merge","defaultHeaderTranslations","isSsr","context","setMotif","activeModal","prevActiveModal","setActiveModal","activeNavigationSection","setNavigationOutOfView","createSiteUrl","isMicrositeContext","isMultiLanguage","useMenu","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","then","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","Tw","useEffect","initialActiveModalDone","setInitialActiveModalSet","useState","handleModalOpen","useCallback","e","id","stopPropagation","ModalId","Cart","window","location","href","SiteId","Store","handleModalClose","useKeyPressEvent","cartQuantity","items","reduce","sum","item","quantity","handleHamburgerClick","MobileMenu","headerBarMotif","Search","showTouchMicrositeMenu","setShowTouchMicrositeMenu","logoRef","useRef","logoHover","useHoverDirty","showMicrositeMenu","onLogoAnchorTouchEnd","ev","homeLinkClickHandler","preventDefault","show","wrapRef","current","observer","IntersectionObserver","entry","isIntersecting","observe","disconnect","y","scrollY","useWindowScroll","showEmptyCartModal","length","showFullCartModal","overlayShowForModal","overlayModals","includes","storeLink","storeLinkSearchParams","category","type","UISPCategorySlug","UniFiCategorySlug","UniFiCloudGateways","handleStoreSearchClick","headerWrapRef","headerWrapScrollTop","setHeaderWrapScrollTop","headerWrapEl","getBoundingClientRect","top","avatarHtml","hideAvatarIcon","loading","jsx","S.IconWrap","children","S.SkeletonCircleLoader","diameter","S.HEADER_ICON_SIZE","onClick","Account","S.SvgIcon","src","icons.header.account","width","height","accountItem","isValidElement","cloneElement","onOpen","onClose","documentPaddingRight","setDocumentPaddingRight","mutationCallback","mutationsList","mutation","attributeName","paddingRight","target","style","MutationObserver","config","attributes","attributeFilter","targetNode","document","documentElement","stickyPadding","jsxs","S.Wrap","ref","S.HeaderWrap","noWrapHeight","S.Header","transparent","S.Container","size","noVerticalMargin","S.MenuItemsWrap","MenuItem","hideOnDesktop","S.LogoIconWrap","$burger","StyleableSvgImage","icons.generic.close","icons.generic.hamburger","S.LeftWrap","S.Anchor","Uisp","Ui","onTouchEnd","Uwc","icons.header.logoUnifi","icons.header.logoUisp","icons.header.logo","S.InnerLeftWrap","center","S.MenuItemWrap","hideOnMobile","filterOutUnrenderableItems","map","as","url","active","S.MenuItemLabel","icon","narrow","MenuButton","ExpertsUisp","ExternalUrl","SUPPORT_UISP","SUPPORT","secondary","dataTestId","openInNewTab","support","store","S.IconsWrap","hideLanguagePicker","icons.header.globe","S.CartIcon","itemCount","LineLoader","placement","isLoading","S.ModalWrap","S.ModalInnerWrap","$modal","EmptyCartModal","open","MobileModal","isOpen","handleClose","lockScroll","closeButtonProps","value","variant","AccountFrameMobile","$pro","LanguageFrameMobile","LanguageFrame","CartModal","NavigationMobileMenu","hasMicrositeMenu","NavigationCarousel","stickyHeader","NavigationMicrositeMenu","HeaderOverlay","showForModal"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4Da,MAAAA,YAAA,GAAeC,IAAK,CAAA,SAASD,aAAaE,CAAA;EACrDC,SAAA;EACAC,KAAO,EAAAC,SAAA;EACPC,YAAc,EAAAC,mBAAA;EACdC,WAAA;EACAC,cAAA;EACAC,gBAAA;EACAC,WAAA;EACAC,mBAA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A,IAAqBvG,IAC9B,mBAAA4H,GAAA,CAAC4G,SAAA,EAAA;MACCnP,YAAA;MACAE,WAAA;MACAsJ,OAAS,EAAA3E,gBAAA;MACTlE;IAAA,CACF,CAAA,EAGD,CAACmB,KAAA,IAASG,WAAgB,KAAAqC,OAAA,CAAQgB,UACjC,IAAA,eAAAiD,GAAA,CAAC6G,oBAAA,EAAA;MACCpP,YAAA;MACAwJ,OAAS,EAAA3E,gBAAA;MACTrE,qBAAA;MACAN,WAAA;MACAQ,MAAA;MACA4G,SAAA;MACA+H,gBAAA,EAAkB,CAAC,CAACjO;IAAA,CACtB,CAAA,EAAA,eAGFmH,GAAA,CAAC+G,kBAAA,EAAA;MACC/O,sBAAA;MACAgP,YAAc,EAAA1O,MAAA;MACdA,MAAQ,EAAAE,cAAA;MACRgH;IAAA,CACF,CAAA,EAEC3G,aACC,mBAAAmH,GAAA,CAACiH,uBAAA,EAAA;MACE,GAAGpO,aAAA;MACJgF,IAAM,EAAAL,iBAAA;MACNyD,OAAA,EAASA,CAAA,KAAM9D,yBAAA,CAA0B,KAAK,CAAA;MAC9C6J,YAAc,EAAA1O;IAAA,CAChB,CAAA,EAGD,CAACiB,KACA,IAAA,eAAAyG,GAAA,CAACkH,aAAA,EAAA;MACCC,YAAc,EAAAvI,mBAAA;MACdqC,OAAS,EAAA3E;IAAA,CACX,CAAA;EAEJ,CAAA,CAAA;AAEJ,CAAC,CAAA;"}
1
+ {"version":3,"file":"Header.mjs","sources":["../../../src/components/Header/Header.tsx"],"sourcesContent":["import { LineLoader } from \"@ubnt/ui-components/LineLoader\";\nimport type { Motif } from \"@ubnt/ui-components/utils\";\nimport merge from \"lodash/merge\";\nimport type { TouchEvent } from \"react\";\nimport type React from \"react\";\nimport {\n cloneElement,\n isValidElement,\n memo,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport {\n useHoverDirty,\n useKeyPressEvent,\n useMedia,\n useWindowScroll,\n} from \"react-use\";\n\nimport * as icons from \"../../constants/icons\";\nimport { BREAKPOINTS } from \"../../constants/layout\";\nimport {\n UISPCategorySlug,\n UniFiCategorySlug,\n} from \"../../constants/proStoreCategories/mapping\";\nimport { ExternalUrl } from \"../../constants/url\";\nimport { useMenu } from \"../../contexts/MenuContext\";\nimport { Language, SiteId } from \"../../contexts/MenuContext/mapping\";\nimport { ModalId } from \"../../contexts/MenuContext/types\";\nimport { filterOutUnrenderableItems } from \"../../contexts/MenuContext/utils\";\nimport { useTranslation } from \"../../hooks/useTranslation\";\nimport { MobileModal } from \"../MobileModal\";\nimport { StyleableSvgImage } from \"../StyleableSvgImage\";\nimport { AccountFrameMobile } from \"./AccountFrame/Mobile\";\nimport type { AccountMenuProps } from \"./AccountMenu/AccountMenu.types\";\nimport { EmptyCartModal } from \"./CartModal/Empty\";\nimport { CartModal } from \"./CartModalV2\";\nimport * as S from \"./Header.styles\";\nimport type { HeaderProps } from \"./Header.types\";\nimport { defaultHeaderTranslations } from \"./Header.types\";\nimport { LanguageFrame } from \"./LanguageFrame\";\nimport { LanguageFrameMobile } from \"./LanguageFrame/Mobile\";\nimport { MenuItem } from \"./MenuItem\";\nimport { MenuButton } from \"./MenuItem/MenuItem\";\nimport {\n NavigationCarousel,\n NavigationMicrositeMenu,\n NavigationMobileMenu,\n} from \"./Navigation\";\nimport { HeaderOverlay } from \"./Overlay\";\nimport { en as EN_TRANSLATION } from \"./translations\";\n\n/**\n * NOTE: use MenuContext.ModalId, handleModalOpen and handleModalClose when adding new\n * modals to header\n */\n\nexport const GlobalHeader = memo(function GlobalHeader({\n className,\n motif: propMotif,\n translations: initialTranslations,\n renderImage,\n showLineLoader,\n onLanguageChange,\n onModalOpen,\n onMenuItemLinkClick,\n onMenuSubItemLinkClick,\n onSearchResultsAction,\n account,\n search,\n cart,\n onCartClick,\n sticky: stickyInitial,\n stickyCarousel,\n initialActiveModal,\n onActiveModal,\n trackStoreSearchClick,\n transparentHeader,\n micrositeMenu,\n embedConfig,\n accountMenu,\n}: HeaderProps) {\n const isMobile = useMedia(BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN, false);\n\n /** @see https://ubiquiti.atlassian.net/browse/NEP-1781 */\n // // Callback ref used to get child component reference\n // // @see https://reactjs.org/docs/refs-and-the-dom.html#callback-refs\n // const [searchInputRef, setSearchInputRef] = useState<HTMLInputElement | null>(\n // null\n // );\n\n // #############################################################################\n // Merge translations\n // #############################################################################\n const translations = useMemo(() => {\n return merge(defaultHeaderTranslations, initialTranslations);\n }, [initialTranslations]);\n\n // #############################################################################\n // Menu\n // #############################################################################\n const {\n /**\n * NOTE: We use isSsr in the render to make the HTML lighter by not returning elements we don't need for initial\n * viewing such as modals etc. This results in lighter document size.\n * TODO: use next/dynamic to lazy load the non-critical elements after initial page load, we can't do it now as we\n * have microsites that don't have next/dynamic\n */\n isSsr,\n motif,\n context,\n setMotif,\n activeModal,\n prevActiveModal,\n setActiveModal,\n activeNavigationSection,\n // inactiveNavigationSection,\n setNavigationOutOfView,\n createSiteUrl,\n isMicrositeContext,\n isMultiLanguage,\n } = useMenu();\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 * Update motif based on given props, it might vary by page\n */\n useEffect(() => {\n // Force dark motif for UISP\n setMotif(propMotif);\n }, [propMotif, setMotif]);\n\n // Set initial active modal\n const [initialActiveModalDone, setInitialActiveModalSet] = useState(false);\n\n useEffect(() => {\n if (!initialActiveModal || initialActiveModalDone) return;\n\n setActiveModal(initialActiveModal);\n setInitialActiveModalSet(true);\n }, [initialActiveModal, initialActiveModalDone, setActiveModal]);\n\n // Handle active modal event\n useEffect(() => {\n if (activeModal === prevActiveModal) return;\n\n onActiveModal?.(activeModal, prevActiveModal);\n }, [activeModal, onActiveModal, prevActiveModal]);\n\n // #############################################################################\n // Actions\n // #############################################################################\n const handleModalOpen = useCallback(\n (e?: React.MouseEvent<HTMLElement>, id?: ModalId) => {\n e?.stopPropagation();\n\n // Remove all toasts on modal open\n if (activeModal !== id) {\n onModalOpen?.();\n }\n\n // Cart modal overwrite\n if (id === ModalId.Cart) {\n if (onCartClick) {\n // If callback-provided will execute it\n onCartClick();\n } else {\n // Otherwise navigate to store\n window.location.href = createSiteUrl([SiteId.Store, \"/checkout\"]);\n }\n return;\n }\n\n setActiveModal(!id || activeModal === id ? null : id);\n },\n [activeModal, onCartClick, setActiveModal, onModalOpen, createSiteUrl],\n );\n\n const handleModalClose = useCallback(() => {\n setActiveModal(null);\n }, [setActiveModal]);\n\n // close modal when pressing escape\n useKeyPressEvent(\"Escape\", handleModalClose);\n\n /** @see https://ubiquiti.atlassian.net/browse/NEP-1781 */\n // const handleShowSearchTab = useCallback(\n // (e: React.MouseEvent<HTMLElement>) => {\n // // Open search modal\n // handleModalOpen(e, ModalId.Search);\n\n // if (searchInputRef) {\n // // * search input focus triggered via a user action so keyboard visible on ios onFocus\n // // @see https://stackoverflow.com/questions/4609765/manually-triggering-the-iphone-ipad-ipod-keyboard-from-javascript\n // searchInputRef.focus();\n // }\n // },\n // [handleModalOpen, searchInputRef]\n // );\n\n const cartQuantity = useMemo(() => {\n return cart?.items.reduce((sum, item) => sum + item.quantity, 0) ?? 0;\n }, [cart?.items]);\n\n const handleHamburgerClick = useCallback(() => {\n if (!isMobile) return;\n\n if (activeModal === ModalId.MobileMenu) {\n setActiveModal(null);\n } else {\n setActiveModal(ModalId.MobileMenu);\n }\n }, [activeModal, isMobile, setActiveModal]);\n\n // #############################################################################\n // Header bar motif override\n // #############################################################################\n const headerBarMotif = useMemo((): Motif => {\n // Force dark on search\n if (activeModal === ModalId.Search) {\n return \"dark\";\n }\n\n // Return actual motif\n return motif;\n }, [activeModal, motif]);\n\n // #############################################################################\n // Show microsite menu\n // #############################################################################\n const [showTouchMicrositeMenu, setShowTouchMicrositeMenu] = useState(false);\n\n const logoRef = useRef<HTMLDivElement>(null);\n const logoHover = useHoverDirty(logoRef);\n\n // Must separate both show states to prevent flicker\n const showMicrositeMenu = useMemo(() => {\n return logoHover || showTouchMicrositeMenu;\n }, [logoHover, showTouchMicrositeMenu]);\n\n const onLogoAnchorTouchEnd = useCallback(\n (ev: TouchEvent) => {\n // Ignore if not a microsite menu context\n if (!micrositeMenu && !embedConfig?.homeLinkClickHandler) return;\n\n ev.preventDefault();\n\n if (embedConfig?.homeLinkClickHandler) {\n embedConfig.homeLinkClickHandler();\n\n return;\n }\n\n setShowTouchMicrositeMenu((show) => !show);\n },\n [embedConfig, micrositeMenu],\n );\n\n // #############################################################################\n // Out of view handler\n // #############################################################################\n const wrapRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n // If there's no navigation, it's not visible\n if (!wrapRef.current) {\n setNavigationOutOfView(true);\n return;\n }\n\n // Use intersection observer to see if it's in the view\n const observer = new IntersectionObserver(([entry]) =>\n setNavigationOutOfView(!entry?.isIntersecting),\n );\n\n observer.observe(wrapRef.current);\n\n // Cleanup\n return () => {\n observer.disconnect();\n };\n }, [setNavigationOutOfView]);\n\n // #############################################################################\n // Sticky header\n // #############################################################################\n const { y: scrollY } = useWindowScroll();\n\n const sticky = useMemo(() => {\n return (\n // Set as sticky if mobile menu is open\n activeModal === ModalId.MobileMenu ||\n // Fallback to the default\n (stickyInitial && scrollY > 0)\n );\n }, [activeModal, scrollY, stickyInitial]);\n\n // #############################################################################\n // Modals and overlay\n // #############################################################################\n const showEmptyCartModal = useMemo(() => {\n return activeModal === ModalId.Cart && !onCartClick && !cart?.items.length;\n }, [activeModal, cart?.items.length, onCartClick]);\n\n const showFullCartModal = useMemo(() => {\n return activeModal === ModalId.Cart && !onCartClick && !!cart?.items.length;\n }, [activeModal, cart?.items.length, onCartClick]);\n\n const overlayShowForModal = useMemo((): ModalId | null => {\n const overlayModals = [ModalId.Search, ModalId.Cart];\n\n if (!activeModal || !overlayModals.includes(activeModal)) {\n return null;\n }\n\n // Show modal only if the full cart modal is active\n if (activeModal === ModalId.Cart && !showFullCartModal) {\n return null;\n }\n\n return activeModal;\n }, [activeModal, showFullCartModal]);\n\n const storeLink = useMemo(() => {\n const storeLinkSearchParams = (() => {\n let category: UniFiCategorySlug | UISPCategorySlug;\n switch (activeNavigationSection.type) {\n case \"secondary\": {\n category = UISPCategorySlug[\"60GhzWireless\"];\n break;\n }\n case \"primary\": {\n category = UniFiCategorySlug.CloudGateways;\n break;\n }\n default: {\n category = UniFiCategorySlug.CloudGateways;\n break;\n }\n }\n\n /** To make url's cleaner only add type if it's non-default */\n return category === UniFiCategorySlug.CloudGateways\n ? undefined\n : {\n // TODO: improve typesafety to use query key enum (that doesn't exist now) for \"type\"\n category,\n };\n })();\n\n return createSiteUrl([SiteId.Store, \"/\", storeLinkSearchParams]);\n }, [activeNavigationSection, createSiteUrl]);\n\n const handleStoreSearchClick = useCallback(() => {\n trackStoreSearchClick?.();\n }, [trackStoreSearchClick]);\n\n // #############################################################################\n // Header wrap offset for sticky carousel\n // #############################################################################\n const headerWrapRef = useRef<HTMLDivElement>(null);\n const [headerWrapScrollTop, setHeaderWrapScrollTop] = useState(0);\n\n useEffect(() => {\n // Ignore if not sticky carousel\n if (!stickyCarousel) return;\n if (sticky) {\n // Set as 0 if header is sticky\n setHeaderWrapScrollTop(0);\n } else {\n // Set negative offset top\n const headerWrapEl = headerWrapRef.current;\n if (!headerWrapEl) return;\n setHeaderWrapScrollTop(headerWrapEl.getBoundingClientRect().top);\n }\n // Listen to scroll\n scrollY;\n }, [scrollY, sticky, stickyCarousel]);\n\n const avatarHtml = useMemo(() => {\n if (embedConfig?.hideAvatarIcon) {\n return null;\n }\n\n if (account?.loading) {\n return (\n <S.IconWrap motif={motif}>\n <S.SkeletonCircleLoader diameter={S.HEADER_ICON_SIZE} />\n </S.IconWrap>\n );\n }\n\n return (\n <S.IconWrap\n motif={motif}\n data-test-id=\"avatar\"\n onClick={(e) => handleModalOpen(e, ModalId.Account)}\n >\n <S.SvgIcon\n src={icons.header.account}\n width={S.HEADER_ICON_SIZE}\n height={S.HEADER_ICON_SIZE}\n />\n </S.IconWrap>\n );\n }, [account?.loading, embedConfig?.hideAvatarIcon, handleModalOpen, motif]);\n\n const accountItem = useMemo(() => {\n if (!accountMenu) {\n return avatarHtml;\n }\n\n /**\n * We try to inject the onOpen and onClose props to the accountMenu component\n * if it's a valid React element. In most of the cases, it will\n * be <AccountMenu /> component.\n */\n if (isValidElement<AccountMenuProps>(accountMenu)) {\n return cloneElement(accountMenu, {\n /**\n * We are setting state to null to close all other modals because\n * the AccountMenu open state is not controlled by the Header component\n */\n onOpen: handleModalClose,\n onClose: handleModalClose,\n });\n }\n\n return accountMenu;\n }, [accountMenu, avatarHtml, handleModalClose]);\n\n /**\n * Due to how Account menu works, when it is opened, we have to add adding to header when\n * it is sticky otherwise it the header will jump.\n */\n const [documentPaddingRight, setDocumentPaddingRight] = useState<\n string | null\n >(null);\n\n useEffect(() => {\n // Callback function to execute when mutations are observed\n const mutationCallback: MutationCallback = (mutationsList) => {\n for (const mutation of mutationsList) {\n if (\n mutation.type === \"attributes\" &&\n mutation.attributeName === \"style\"\n ) {\n // Accessing the new style\n const paddingRight = (mutation.target as HTMLElement).style\n .paddingRight;\n setDocumentPaddingRight(paddingRight);\n }\n }\n };\n\n // Create a MutationObserver instance\n const observer = new MutationObserver(mutationCallback);\n\n // Options for the observer (which mutations to observe)\n const config: MutationObserverInit = {\n attributes: true,\n attributeFilter: [\"style\"],\n };\n\n // Start observing the target node for configured mutations\n const targetNode = document.documentElement;\n observer.observe(targetNode, config);\n\n // Cleanup function to disconnect the observer when the component unmounts\n return () => {\n observer.disconnect();\n };\n }, []);\n\n const stickyPadding = useMemo(() => {\n if (sticky && documentPaddingRight) {\n return documentPaddingRight;\n }\n\n return undefined;\n }, [documentPaddingRight, sticky]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.Wrap ref={wrapRef}>\n <S.HeaderWrap ref={headerWrapRef} noWrapHeight={transparentHeader}>\n <S.Header\n transparent={transparentHeader}\n className={className}\n motif={headerBarMotif}\n sticky={sticky}\n stickyPadding={stickyPadding}\n >\n <S.Container size=\"desktop\" noVerticalMargin>\n <S.MenuItemsWrap>\n <MenuItem\n hideOnDesktop\n motif={motif}\n onClick={handleHamburgerClick}\n >\n <S.LogoIconWrap motif={motif} $burger>\n {activeModal === ModalId.MobileMenu ? (\n <StyleableSvgImage\n src={icons.generic.close}\n width={14}\n height={14}\n />\n ) : (\n <StyleableSvgImage\n src={icons.generic.hamburger}\n width={S.HEADER_ICON_SIZE}\n height={S.HEADER_ICON_SIZE}\n />\n )}\n </S.LogoIconWrap>\n </MenuItem>\n\n <S.LeftWrap>\n {activeModal !== ModalId.Search && (\n <S.Anchor\n href={createSiteUrl([\n context === SiteId.Uisp ? SiteId.Uisp : SiteId.Ui,\n \"/\",\n ])}\n onTouchEnd={onLogoAnchorTouchEnd}\n >\n <S.LogoIconWrap motif={motif} ref={logoRef}>\n {(() => {\n switch (context) {\n case SiteId.TechSpecs:\n case SiteId.Ui:\n case SiteId.Uwc:\n return (\n <StyleableSvgImage\n src={icons.header.logoUnifi}\n width={58.5}\n height={18}\n />\n );\n case SiteId.Uisp:\n return (\n <StyleableSvgImage\n src={icons.header.logoUisp}\n width={56.5}\n height={18}\n />\n );\n default:\n return (\n <StyleableSvgImage\n src={icons.header.logo}\n width={17.86}\n height={18}\n />\n );\n }\n })()}\n </S.LogoIconWrap>\n </S.Anchor>\n )}\n\n <S.InnerLeftWrap center={activeModal === ModalId.Search}>\n {/** @see https://ubiquiti.atlassian.net/browse/NEP-1781 */}\n {/* <S.SearchTabWrap\n data-test-id=\"search-input\"\n hide={activeModal !== ModalId.Search}\n >\n <SearchTab\n translations={translations}\n onClose={handleModalClose}\n setInputRef={setSearchInputRef}\n showSearchTab={activeModal === ModalId.Search}\n motif={headerBarMotif}\n onSearchResultsAction={onSearchResultsAction}\n search={search}\n />\n </S.SearchTabWrap> */}\n\n {/* Hide menu items when search active */}\n {activeModal !== ModalId.Search && (\n <S.MenuItemWrap hideOnMobile>\n {filterOutUnrenderableItems(\n activeNavigationSection.items,\n ).map((item) => (\n <MenuItem\n key={item.id}\n as=\"a\"\n href={item.url}\n active={item.active}\n onClick={(e) => onMenuItemLinkClick?.(e, item)}\n motif={motif}\n >\n <S.MenuItemLabel>\n {item.icon && <S.SvgIcon {...item.icon} />}\n {/* FIXME: improve type-safety */}\n {/* eslint-disable-next-line @typescript-eslint/no-explicit-any */}\n {formatMessage(item.id as unknown as any)}\n </S.MenuItemLabel>\n </MenuItem>\n ))}\n </S.MenuItemWrap>\n )}\n </S.InnerLeftWrap>\n </S.LeftWrap>\n\n {activeModal !== ModalId.Search && (\n <S.MenuItemWrap narrow>\n {/* <MenuItem\n as=\"a\"\n href={inactiveNavigationSection.url}\n hideOnMobile\n motif={motif}\n >\n {inactiveNavigationSection[\"label\"]}\n </MenuItem> */}\n\n <MenuButton\n href={\n [SiteId.ExpertsUisp, SiteId.Uisp].includes(context)\n ? ExternalUrl.SUPPORT_UISP\n : ExternalUrl.SUPPORT\n }\n hideOnMobile\n motif={motif}\n secondary\n dataTestId=\"support-btn\"\n // Special request by Sam to open the link in new tab - only on ui.com/uisp.com microsites\n openInNewTab={[SiteId.Ui, SiteId.Uisp].includes(context)}\n >\n {formatMessage(\n translations.support as keyof typeof EN_TRANSLATION,\n )}\n </MenuButton>\n\n <MenuButton\n href={storeLink}\n onClick={handleStoreSearchClick}\n hideOnMobile\n motif={motif}\n dataTestId=\"store-btn\"\n >\n {formatMessage(\n translations.store as keyof typeof EN_TRANSLATION,\n )}\n </MenuButton>\n\n <S.IconsWrap>\n {/** @see https://ubiquiti.atlassian.net/browse/NEP-1781 */}\n {/* <S.IconWrap\n hideOnMobile\n motif={motif}\n data-test-id=\"search-icon\"\n onClick={handleShowSearchTab}\n >\n <S.SvgIcon\n src={icons.generic.search}\n width={14}\n height={14}\n />\n </S.IconWrap> */}\n\n {/* Language Picker */}\n {isMultiLanguage && !embedConfig?.hideLanguagePicker && (\n <S.IconWrap\n motif={motif}\n data-test-id=\"language\"\n onClick={(e) => handleModalOpen(e, ModalId.Language)}\n >\n <S.SvgIcon\n src={icons.header.globe}\n width={S.HEADER_ICON_SIZE}\n height={S.HEADER_ICON_SIZE}\n />\n </S.IconWrap>\n )}\n\n {!isMicrositeContext && (\n <S.IconWrap\n motif={motif}\n data-test-id=\"cart-btn\"\n onClick={(e) => handleModalOpen(e, ModalId.Cart)}\n >\n {cart?.loading ? (\n <S.SkeletonCircleLoader\n diameter={S.HEADER_ICON_SIZE}\n />\n ) : (\n <S.CartIcon\n itemCount={cartQuantity}\n motif={motif}\n width={S.HEADER_ICON_SIZE}\n height={S.HEADER_ICON_SIZE}\n />\n )}\n </S.IconWrap>\n )}\n\n {accountItem}\n </S.IconsWrap>\n </S.MenuItemWrap>\n )}\n </S.MenuItemsWrap>\n\n {!isSsr && (\n <LineLoader placement=\"bottom\" isLoading={!!showLineLoader} />\n )}\n </S.Container>\n\n {!isSsr && showEmptyCartModal && (\n <S.ModalWrap size=\"desktop\">\n <S.ModalInnerWrap $modal={ModalId.Cart}>\n <EmptyCartModal\n translations={translations}\n open\n onClose={handleModalClose}\n />\n </S.ModalInnerWrap>\n </S.ModalWrap>\n )}\n\n {!isSsr &&\n activeModal === ModalId.Account &&\n (isMobile ? (\n <MobileModal\n isOpen={activeModal === ModalId.Account}\n handleClose={handleModalClose}\n lockScroll\n closeButtonProps={{\n value: formatMessage(\"Close\"),\n variant: \"cancel\",\n }}\n >\n <AccountFrameMobile\n /**\n * HACK: Disabled custom rendering as the account.stg.ui.com hasn't been whitelisted by our image\n * optimisation CDN\n * @see https://ubiquiti.atlassian.net/browse/NEP-1689\n */\n // renderImage={renderImage}\n onClose={handleModalClose}\n account={account}\n />\n </MobileModal>\n ) : (\n <S.ModalWrap size=\"desktop\">\n <S.ModalInnerWrap\n $pro\n $modal={ModalId.Account}\n ></S.ModalInnerWrap>\n </S.ModalWrap>\n ))}\n\n {/* Language picker component */}\n {!isSsr &&\n activeModal === ModalId.Language &&\n (isMobile ? (\n <MobileModal\n isOpen={activeModal === ModalId.Language}\n handleClose={handleModalClose}\n lockScroll\n closeButtonProps={{\n value: formatMessage(\"Close\"),\n variant: \"cancel\",\n }}\n >\n <LanguageFrameMobile onLanguageChange={onLanguageChange} />\n </MobileModal>\n ) : (\n <S.ModalWrap size=\"desktop\">\n <S.ModalInnerWrap $pro $modal={ModalId.Account}>\n <LanguageFrame\n /**\n * HACK: Disabled custom rendering as the account.stg.ui.com hasn't been whitelisted by our image\n * optimisation CDN\n * @see https://ubiquiti.atlassian.net/browse/NEP-1689\n */\n open\n onClose={handleModalClose}\n onLanguageChange={onLanguageChange}\n />\n </S.ModalInnerWrap>\n </S.ModalWrap>\n ))}\n </S.Header>\n </S.HeaderWrap>\n\n {!isSsr && showFullCartModal && cart && (\n <CartModal\n translations={translations}\n renderImage={renderImage}\n onClose={handleModalClose}\n cart={cart}\n />\n )}\n\n {!isSsr && activeModal === ModalId.MobileMenu && (\n <NavigationMobileMenu\n translations={translations}\n onClose={handleModalClose}\n onSearchResultsAction={onSearchResultsAction}\n renderImage={renderImage}\n search={search}\n storeLink={storeLink}\n hasMicrositeMenu={!!micrositeMenu}\n />\n )}\n\n <NavigationCarousel\n onMenuSubItemLinkClick={onMenuSubItemLinkClick}\n stickyHeader={sticky}\n sticky={stickyCarousel}\n headerWrapScrollTop={headerWrapScrollTop}\n />\n\n {micrositeMenu && (\n <NavigationMicrositeMenu\n {...micrositeMenu}\n show={showMicrositeMenu}\n onClose={() => setShowTouchMicrositeMenu(false)}\n stickyHeader={sticky}\n />\n )}\n\n {!isSsr && (\n <HeaderOverlay\n showForModal={overlayShowForModal}\n onClose={handleModalClose}\n />\n )}\n </S.Wrap>\n );\n});\n"],"names":["GlobalHeader","memo","GlobalHeader2","className","motif","propMotif","translations","initialTranslations","renderImage","showLineLoader","onLanguageChange","onModalOpen","onMenuItemLinkClick","onMenuSubItemLinkClick","onSearchResultsAction","account","search","cart","onCartClick","sticky","stickyInitial","stickyCarousel","initialActiveModal","onActiveModal","trackStoreSearchClick","transparentHeader","micrositeMenu","embedConfig","accountMenu","isMobile","useMedia","BREAKPOINTS","TOP_NAV_MOBILE_AND_DOWN","useMemo","merge","defaultHeaderTranslations","isSsr","context","setMotif","activeModal","prevActiveModal","setActiveModal","activeNavigationSection","setNavigationOutOfView","createSiteUrl","isMicrositeContext","isMultiLanguage","useMenu","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","then","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","Tw","useEffect","initialActiveModalDone","setInitialActiveModalSet","useState","handleModalOpen","useCallback","e","id","stopPropagation","ModalId","Cart","window","location","href","SiteId","Store","handleModalClose","useKeyPressEvent","cartQuantity","items","reduce","sum","item","quantity","handleHamburgerClick","MobileMenu","headerBarMotif","Search","showTouchMicrositeMenu","setShowTouchMicrositeMenu","logoRef","useRef","logoHover","useHoverDirty","showMicrositeMenu","onLogoAnchorTouchEnd","ev","homeLinkClickHandler","preventDefault","show","wrapRef","current","observer","IntersectionObserver","entry","isIntersecting","observe","disconnect","y","scrollY","useWindowScroll","showEmptyCartModal","length","showFullCartModal","overlayShowForModal","overlayModals","includes","storeLink","storeLinkSearchParams","category","type","UISPCategorySlug","UniFiCategorySlug","CloudGateways","handleStoreSearchClick","headerWrapRef","headerWrapScrollTop","setHeaderWrapScrollTop","headerWrapEl","getBoundingClientRect","top","avatarHtml","hideAvatarIcon","loading","jsx","S.IconWrap","children","S.SkeletonCircleLoader","diameter","S.HEADER_ICON_SIZE","onClick","Account","S.SvgIcon","src","icons.header.account","width","height","accountItem","isValidElement","cloneElement","onOpen","onClose","documentPaddingRight","setDocumentPaddingRight","mutationCallback","mutationsList","mutation","attributeName","paddingRight","target","style","MutationObserver","config","attributes","attributeFilter","targetNode","document","documentElement","stickyPadding","jsxs","S.Wrap","ref","S.HeaderWrap","noWrapHeight","S.Header","transparent","S.Container","size","noVerticalMargin","S.MenuItemsWrap","MenuItem","hideOnDesktop","S.LogoIconWrap","$burger","StyleableSvgImage","icons.generic.close","icons.generic.hamburger","S.LeftWrap","S.Anchor","Uisp","Ui","onTouchEnd","TechSpecs","Uwc","icons.header.logoUnifi","icons.header.logoUisp","icons.header.logo","S.InnerLeftWrap","center","S.MenuItemWrap","hideOnMobile","filterOutUnrenderableItems","map","as","url","active","S.MenuItemLabel","icon","narrow","MenuButton","ExpertsUisp","ExternalUrl","SUPPORT_UISP","SUPPORT","secondary","dataTestId","openInNewTab","support","store","S.IconsWrap","hideLanguagePicker","icons.header.globe","S.CartIcon","itemCount","LineLoader","placement","isLoading","S.ModalWrap","S.ModalInnerWrap","$modal","EmptyCartModal","open","MobileModal","isOpen","handleClose","lockScroll","closeButtonProps","value","variant","AccountFrameMobile","$pro","LanguageFrameMobile","LanguageFrame","CartModal","NavigationMobileMenu","hasMicrositeMenu","NavigationCarousel","stickyHeader","NavigationMicrositeMenu","HeaderOverlay","showForModal"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4Da,MAAAA,YAAA,GAAeC,IAAK,CAAA,SAASD,aAAaE,CAAA;EACrDC,SAAA;EACAC,KAAO,EAAAC,SAAA;EACPC,YAAc,EAAAC,mBAAA;EACdC,WAAA;EACAC,cA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,CAAA,CAAA;MAAA,CAAA;KAGR,CAAA,EAEC,CAAC0B,KAAS,IAAAoF,iBAAA,IAAqBvG,IAC9B,mBAAA4H,GAAA,CAAC6G,SAAA,EAAA;MACCpP,YAAA;MACAE,WAAA;MACAsJ,OAAS,EAAA3E,gBAAA;MACTlE;IAAA,CACF,CAAA,EAGD,CAACmB,KAAA,IAASG,WAAgB,KAAAqC,OAAA,CAAQgB,UACjC,IAAA,eAAAiD,GAAA,CAAC8G,oBAAA,EAAA;MACCrP,YAAA;MACAwJ,OAAS,EAAA3E,gBAAA;MACTrE,qBAAA;MACAN,WAAA;MACAQ,MAAA;MACA4G,SAAA;MACAgI,gBAAA,EAAkB,CAAC,CAAClO;IAAA,CACtB,CAAA,EAAA,eAGFmH,GAAA,CAACgH,kBAAA,EAAA;MACChP,sBAAA;MACAiP,YAAc,EAAA3O,MAAA;MACdA,MAAQ,EAAAE,cAAA;MACRgH;IAAA,CACF,CAAA,EAEC3G,aACC,mBAAAmH,GAAA,CAACkH,uBAAA,EAAA;MACE,GAAGrO,aAAA;MACJgF,IAAM,EAAAL,iBAAA;MACNyD,OAAA,EAASA,CAAA,KAAM9D,yBAAA,CAA0B,KAAK,CAAA;MAC9C8J,YAAc,EAAA3O;IAAA,CAChB,CAAA,EAGD,CAACiB,KACA,IAAA,eAAAyG,GAAA,CAACmH,aAAA,EAAA;MACCC,YAAc,EAAAxI,mBAAA;MACdqC,OAAS,EAAA3E;IAAA,CACX,CAAA;EAEJ,CAAA,CAAA;AAEJ,CAAC,CAAA;"}
@@ -243,5 +243,5 @@ export type ProHeaderProps = Pick<HeaderProps, "className" | "motif" | "cart" |
243
243
  onSearchBlur?: () => void;
244
244
  onSearchClick?: () => void;
245
245
  categories: ProHeaderCategories;
246
- useInlineCategories?: boolean;
246
+ hideInlineCategories?: boolean;
247
247
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Header.types.js","sources":["../../../src/components/Header/Header.types.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\n\nimport type { Language } from \"../../contexts/MenuContext/mapping\";\nimport type {\n ModalId,\n ParsedNavigationItem,\n ParsedNavigationSubItem,\n ParsedNavigationSubSubItem,\n} from \"../../contexts/MenuContext/types\";\nimport type { Nullish, ProductLine } from \"../../types\";\nimport type {\n CustomImageAsset,\n RenderImageFn,\n} from \"../CustomImage/CustomImage.types\";\nimport type { NavigationMicrositeMenuProps } from \"./Navigation/MicrositeMenu/MicrositeMenu.types\";\nimport type { ProMobileMenuSectionItem } from \"./Navigation/ProMobileMenu/ProMobileMenu.types\";\n\nexport const defaultHeaderTranslations = {\n new: \"New\",\n support: \"Support\",\n purchasedProductHistory: \"Purchased Product History\",\n orderHistory: \"Order History\",\n earlyAccess: \"Early Access\",\n store: \"Store\",\n links: \"Links\",\n company: \"Company\",\n social: \"Social\",\n tools: \"Tools\",\n training: \"Training\",\n continueShopping: \"Continue Shopping\",\n search: {\n placeholder: \"Search...\",\n noMatchesFound: \"Sorry, we couldn't find any matches.\",\n seeAllResults: \"See all results\",\n searchUniFiProducts: \"Search UniFi products\",\n searchUISPProducts: \"Search UISP products\",\n searchAmpliFiProducts: \"Search AmpliFi products\",\n },\n account: {\n login: \"Log In\",\n signUp: \"Sign Up\",\n signOut: \"Sign Out\",\n uiAccount: \"UI Account\",\n unifiSiteManager: \"UniFi Site Manager\",\n manageAccount: \"Manage Account\",\n orderHistory: \"Orders & Addresses\",\n },\n cart: {\n VATincluded: \"VAT Incl.\",\n includesVat: \"Includes VAT of\",\n discount: \"Discount\",\n empty: \"Your cart is empty\",\n review: \"Checkout\",\n shipping: \"Shipping\",\n subtotal: \"Subtotal\",\n total: \"Total price:\",\n itemsTitle: \"Your Cart\",\n upsellTitle: \"Usually bought together\",\n },\n language: {},\n region: \"Region\",\n};\n\nexport interface HeaderAccountCustomer {\n id: string;\n email: string;\n displayName: string;\n picture?: string | null;\n}\n\nexport interface HeaderAccount {\n loading?: boolean;\n customer?: Nullish<HeaderAccountCustomer>;\n handleLogin?: () => void;\n handleLogout?: () => void;\n handleRegister?: () => void;\n handleManageAccount?: () => void;\n handleOrderHistory?: () => void;\n renderStorePicker?: (onClose: () => void) => JSX.Element;\n}\n\nexport interface HeaderSearch {\n /** Trigger search */\n onSearch: (formattedQuerySearchTerm: string) => void;\n loading?: boolean;\n totalItemsCount: number;\n items: Array<{\n id: string;\n url: string;\n image?: CustomImageAsset | null;\n title: string;\n family?: string | null;\n }>;\n}\n\nexport interface HeaderCartItemControls {\n loading?: boolean;\n quantityMax?: number;\n onQuantityChange: (newQuantity: number) => void;\n}\n\nexport interface HeaderCartItem {\n id: string;\n url: string;\n image: Nullish<CustomImageAsset>;\n quantity: number;\n title: string;\n controls: HeaderCartItemControls;\n price: string;\n priceIncludingVAT?: string;\n}\n\nexport interface HeaderCart {\n onReview: () => void;\n loading?: boolean;\n items: HeaderCartItem[];\n upsellItems?: HeaderCartItem[];\n totals: Nullish<{\n shipping: Nullish<string>;\n discount: Nullish<string>;\n finalTax: Nullish<string>;\n total: string;\n totalIncludingVAT?: string;\n }>;\n}\n\nexport type HeaderTranslations = typeof defaultHeaderTranslations;\n\nexport type HeaderEmbedConfig = {\n /**\n * Allows to configure custom callback on home link click\n */\n homeLinkClickHandler?: () => void;\n\n /**\n * Allows to render custom extra section items in Pro Mobile Menu\n */\n mobileMenuExtraSectionItems?: Array<ProMobileMenuSectionItem>;\n\n /**\n * Moves Avatar icon to the left side of the header\n */\n moveAvatarIconToLeft?: boolean;\n\n /**\n * Allows to display avatar as image instead of icon\n */\n displayAvatarAsImage?: boolean;\n\n /**\n * Allows to configure custom callback on avatar click\n */\n avatarClickHandler?: () => void;\n\n /**\n * Allows to hide logo / site title\n */\n hideLogo?: boolean;\n\n /**\n * Allows to hide Avatar icon from the header\n */\n hideAvatarIcon?: boolean;\n\n /**\n * Hide language picker\n */\n hideLanguagePicker?: boolean;\n\n fullWidthHeader?: boolean;\n\n /**\n * Renders site title instead of UI logo\n */\n siteTitle?: string;\n\n /**\n * Blurs search input and dismissed virtual keyboard on touchmove\n */\n /** @deprecated Use blurSearchOnTouchmove */\n hideSearchOnTouchmove?: boolean;\n blurSearchOnTouchmove?: boolean;\n};\n\nexport interface HeaderProps {\n className?: string;\n motif: Motif;\n /**\n * Main header bar becomes fixed position at the top\n */\n sticky?: boolean;\n /**\n * Navigation carousel becomes fixed position at the top\n */\n stickyCarousel?: boolean;\n translations?: HeaderTranslations;\n renderImage: RenderImageFn;\n showLineLoader?: boolean;\n onModalOpen?: () => void;\n onMenuItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationItem,\n ) => void;\n onMenuSubItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationSubItem | ParsedNavigationSubSubItem,\n ) => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Account\n account?: HeaderAccount;\n\n // Search\n onSearchResultsAction?: (searchTerm: string) => void;\n search?: HeaderSearch;\n\n // Cart\n onCartClick?: () => void;\n cart?: HeaderCart;\n\n // Set specific modal to be open initially\n initialActiveModal?: Nullish<ModalId>;\n /**\n * Triggers on active modal change\n */\n onActiveModal?: (id: ModalId | null, prevModalId: ModalId | null) => void;\n\n /**\n * Will be called before navigating to store search, the tracking request in this callback will only\n * finish if called from store side as microsites are not using next router.\n */\n trackStoreSearchClick?: () => void;\n\n transparentHeader?: boolean;\n\n /**\n * Sub-menu used for microsites\n */\n micrositeMenu?: NavigationMicrositeMenuProps;\n\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n accountMenu?: React.ReactNode;\n}\n\nexport type IsolatedHeaderProps = {\n className?: string;\n motif: Motif;\n translations?: HeaderTranslations;\n handleContinueShopping: () => void;\n showLineLoader?: boolean;\n account?: {\n loading?: HeaderAccount[\"loading\"];\n customer?: {\n picture?: HeaderAccountCustomer[\"picture\"];\n };\n };\n} & Pick<HeaderProps, \"embedConfig\">;\n\nexport interface ProHeaderEarlyAccess {\n loading?: boolean;\n onClick: () => void;\n}\n\nexport interface HeaderProductLineOption {\n value: ProductLine;\n label: string;\n}\n\nexport interface ProHeaderCategories {\n items: ProMobileMenuSectionItem[];\n activeIndex: number;\n}\n\nexport type ProHeaderProps = Pick<\n HeaderProps,\n | \"className\"\n | \"motif\"\n | \"cart\"\n | \"account\"\n | \"translations\"\n | \"onModalOpen\"\n | \"onCartClick\"\n | \"showLineLoader\"\n | \"accountMenu\"\n> & {\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n // Country picker\n currentCountryName?: string;\n handleStorePickerClick?: () => void;\n\n // Early access button\n earlyAccess?: ProHeaderEarlyAccess;\n\n // Purchase History button\n handlePurchaseHistoryClick?: () => void;\n\n // Order button\n handleOrderHistoryClick?: () => void;\n\n // Product line picker\n productLineOptions?: HeaderProductLineOption[];\n productLineValue?: ProductLine;\n handleProductLineChange?: (type: ProductLine) => void;\n\n // Mobile menu aka \"hamburger\" button click\n handleMobileMenuClick?: () => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Search\n searchValue?: string;\n onSearch?: (searchTerm: string) => void;\n\n onSearchFocus?: () => void;\n onSearchBlur?: () => void;\n onSearchClick?: () => void;\n\n // Categories used for mobile menu\n categories: ProHeaderCategories;\n useInlineCategories?: boolean;\n};\n"],"names":["defaultHeaderTranslations","new","support","purchasedProductHistory","orderHistory","earlyAccess","store","links","company","social","tools","training","continueShopping","search","placeholder","noMatchesFound","seeAllResults","searchUniFiProducts","searchUISPProducts","searchAmpliFiProducts","account","login","signUp","signOut","uiAccount","unifiSiteManager","manageAccount","cart","VATincluded","includesVat","discount","empty","review","shipping","subtotal","total","itemsTitle","upsellTitle","language","region"],"mappings":";;;AAiBO,MAAMA,yBAA4B,GAAA;EACvCC,GAAK,EAAA,KAAA;EACLC,OAAS,EAAA,SAAA;EACTC,uBAAyB,EAAA,2BAAA;EACzBC,YAAc,EAAA,eAAA;EACdC,WAAa,EAAA,cAAA;EACbC,KAAO,EAAA,OAAA;EACPC,KAAO,EAAA,OAAA;EACPC,OAAS,EAAA,SAAA;EACTC,MAAQ,EAAA,QAAA;EACRC,KAAO,EAAA,OAAA;EACPC,QAAU,EAAA,UAAA;EACVC,gBAAkB,EAAA,mBAAA;EAClBC,MAAQ,EAAA;IACNC,WAAa,EAAA,WAAA;IACbC,cAAgB,EAAA,sCAAA;IAChBC,aAAe,EAAA,iBAAA;IACfC,mBAAqB,EAAA,uBAAA;IACrBC,kBAAoB,EAAA,sBAAA;IACpBC,qBAAuB,EAAA;EACzB,CAAA;EACAC,OAAS,EAAA;IACPC,KAAO,EAAA,QAAA;IACPC,MAAQ,EAAA,SAAA;IACRC,OAAS,EAAA,UAAA;IACTC,SAAW,EAAA,YAAA;IACXC,gBAAkB,EAAA,oBAAA;IAClBC,aAAe,EAAA,gBAAA;IACftB,YAAc,EAAA;EAChB,CAAA;EACAuB,IAAM,EAAA;IACJC,WAAa,EAAA,WAAA;IACbC,WAAa,EAAA,iBAAA;IACbC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,oBAAA;IACPC,MAAQ,EAAA,UAAA;IACRC,QAAU,EAAA,UAAA;IACVC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,cAAA;IACPC,UAAY,EAAA,WAAA;IACZC,WAAa,EAAA;EACf,CAAA;EACAC,UAAU,CAAC,CAAA;EACXC,MAAQ,EAAA;AACV,CAAA;"}
1
+ {"version":3,"file":"Header.types.js","sources":["../../../src/components/Header/Header.types.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\n\nimport type { Language } from \"../../contexts/MenuContext/mapping\";\nimport type {\n ModalId,\n ParsedNavigationItem,\n ParsedNavigationSubItem,\n ParsedNavigationSubSubItem,\n} from \"../../contexts/MenuContext/types\";\nimport type { Nullish, ProductLine } from \"../../types\";\nimport type {\n CustomImageAsset,\n RenderImageFn,\n} from \"../CustomImage/CustomImage.types\";\nimport type { NavigationMicrositeMenuProps } from \"./Navigation/MicrositeMenu/MicrositeMenu.types\";\nimport type { ProMobileMenuSectionItem } from \"./Navigation/ProMobileMenu/ProMobileMenu.types\";\n\nexport const defaultHeaderTranslations = {\n new: \"New\",\n support: \"Support\",\n purchasedProductHistory: \"Purchased Product History\",\n orderHistory: \"Order History\",\n earlyAccess: \"Early Access\",\n store: \"Store\",\n links: \"Links\",\n company: \"Company\",\n social: \"Social\",\n tools: \"Tools\",\n training: \"Training\",\n continueShopping: \"Continue Shopping\",\n search: {\n placeholder: \"Search...\",\n noMatchesFound: \"Sorry, we couldn't find any matches.\",\n seeAllResults: \"See all results\",\n searchUniFiProducts: \"Search UniFi products\",\n searchUISPProducts: \"Search UISP products\",\n searchAmpliFiProducts: \"Search AmpliFi products\",\n },\n account: {\n login: \"Log In\",\n signUp: \"Sign Up\",\n signOut: \"Sign Out\",\n uiAccount: \"UI Account\",\n unifiSiteManager: \"UniFi Site Manager\",\n manageAccount: \"Manage Account\",\n orderHistory: \"Orders & Addresses\",\n },\n cart: {\n VATincluded: \"VAT Incl.\",\n includesVat: \"Includes VAT of\",\n discount: \"Discount\",\n empty: \"Your cart is empty\",\n review: \"Checkout\",\n shipping: \"Shipping\",\n subtotal: \"Subtotal\",\n total: \"Total price:\",\n itemsTitle: \"Your Cart\",\n upsellTitle: \"Usually bought together\",\n },\n language: {},\n region: \"Region\",\n};\n\nexport interface HeaderAccountCustomer {\n id: string;\n email: string;\n displayName: string;\n picture?: string | null;\n}\n\nexport interface HeaderAccount {\n loading?: boolean;\n customer?: Nullish<HeaderAccountCustomer>;\n handleLogin?: () => void;\n handleLogout?: () => void;\n handleRegister?: () => void;\n handleManageAccount?: () => void;\n handleOrderHistory?: () => void;\n renderStorePicker?: (onClose: () => void) => JSX.Element;\n}\n\nexport interface HeaderSearch {\n /** Trigger search */\n onSearch: (formattedQuerySearchTerm: string) => void;\n loading?: boolean;\n totalItemsCount: number;\n items: Array<{\n id: string;\n url: string;\n image?: CustomImageAsset | null;\n title: string;\n family?: string | null;\n }>;\n}\n\nexport interface HeaderCartItemControls {\n loading?: boolean;\n quantityMax?: number;\n onQuantityChange: (newQuantity: number) => void;\n}\n\nexport interface HeaderCartItem {\n id: string;\n url: string;\n image: Nullish<CustomImageAsset>;\n quantity: number;\n title: string;\n controls: HeaderCartItemControls;\n price: string;\n priceIncludingVAT?: string;\n}\n\nexport interface HeaderCart {\n onReview: () => void;\n loading?: boolean;\n items: HeaderCartItem[];\n upsellItems?: HeaderCartItem[];\n totals: Nullish<{\n shipping: Nullish<string>;\n discount: Nullish<string>;\n finalTax: Nullish<string>;\n total: string;\n totalIncludingVAT?: string;\n }>;\n}\n\nexport type HeaderTranslations = typeof defaultHeaderTranslations;\n\nexport type HeaderEmbedConfig = {\n /**\n * Allows to configure custom callback on home link click\n */\n homeLinkClickHandler?: () => void;\n\n /**\n * Allows to render custom extra section items in Pro Mobile Menu\n */\n mobileMenuExtraSectionItems?: Array<ProMobileMenuSectionItem>;\n\n /**\n * Moves Avatar icon to the left side of the header\n */\n moveAvatarIconToLeft?: boolean;\n\n /**\n * Allows to display avatar as image instead of icon\n */\n displayAvatarAsImage?: boolean;\n\n /**\n * Allows to configure custom callback on avatar click\n */\n avatarClickHandler?: () => void;\n\n /**\n * Allows to hide logo / site title\n */\n hideLogo?: boolean;\n\n /**\n * Allows to hide Avatar icon from the header\n */\n hideAvatarIcon?: boolean;\n\n /**\n * Hide language picker\n */\n hideLanguagePicker?: boolean;\n\n fullWidthHeader?: boolean;\n\n /**\n * Renders site title instead of UI logo\n */\n siteTitle?: string;\n\n /**\n * Blurs search input and dismissed virtual keyboard on touchmove\n */\n /** @deprecated Use blurSearchOnTouchmove */\n hideSearchOnTouchmove?: boolean;\n blurSearchOnTouchmove?: boolean;\n};\n\nexport interface HeaderProps {\n className?: string;\n motif: Motif;\n /**\n * Main header bar becomes fixed position at the top\n */\n sticky?: boolean;\n /**\n * Navigation carousel becomes fixed position at the top\n */\n stickyCarousel?: boolean;\n translations?: HeaderTranslations;\n renderImage: RenderImageFn;\n showLineLoader?: boolean;\n onModalOpen?: () => void;\n onMenuItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationItem,\n ) => void;\n onMenuSubItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationSubItem | ParsedNavigationSubSubItem,\n ) => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Account\n account?: HeaderAccount;\n\n // Search\n onSearchResultsAction?: (searchTerm: string) => void;\n search?: HeaderSearch;\n\n // Cart\n onCartClick?: () => void;\n cart?: HeaderCart;\n\n // Set specific modal to be open initially\n initialActiveModal?: Nullish<ModalId>;\n /**\n * Triggers on active modal change\n */\n onActiveModal?: (id: ModalId | null, prevModalId: ModalId | null) => void;\n\n /**\n * Will be called before navigating to store search, the tracking request in this callback will only\n * finish if called from store side as microsites are not using next router.\n */\n trackStoreSearchClick?: () => void;\n\n transparentHeader?: boolean;\n\n /**\n * Sub-menu used for microsites\n */\n micrositeMenu?: NavigationMicrositeMenuProps;\n\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n accountMenu?: React.ReactNode;\n}\n\nexport type IsolatedHeaderProps = {\n className?: string;\n motif: Motif;\n translations?: HeaderTranslations;\n handleContinueShopping: () => void;\n showLineLoader?: boolean;\n account?: {\n loading?: HeaderAccount[\"loading\"];\n customer?: {\n picture?: HeaderAccountCustomer[\"picture\"];\n };\n };\n} & Pick<HeaderProps, \"embedConfig\">;\n\nexport interface ProHeaderEarlyAccess {\n loading?: boolean;\n onClick: () => void;\n}\n\nexport interface HeaderProductLineOption {\n value: ProductLine;\n label: string;\n}\n\nexport interface ProHeaderCategories {\n items: ProMobileMenuSectionItem[];\n activeIndex: number;\n}\n\nexport type ProHeaderProps = Pick<\n HeaderProps,\n | \"className\"\n | \"motif\"\n | \"cart\"\n | \"account\"\n | \"translations\"\n | \"onModalOpen\"\n | \"onCartClick\"\n | \"showLineLoader\"\n | \"accountMenu\"\n> & {\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n // Country picker\n currentCountryName?: string;\n handleStorePickerClick?: () => void;\n\n // Early access button\n earlyAccess?: ProHeaderEarlyAccess;\n\n // Purchase History button\n handlePurchaseHistoryClick?: () => void;\n\n // Order button\n handleOrderHistoryClick?: () => void;\n\n // Product line picker\n productLineOptions?: HeaderProductLineOption[];\n productLineValue?: ProductLine;\n handleProductLineChange?: (type: ProductLine) => void;\n\n // Mobile menu aka \"hamburger\" button click\n handleMobileMenuClick?: () => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Search\n searchValue?: string;\n onSearch?: (searchTerm: string) => void;\n\n onSearchFocus?: () => void;\n onSearchBlur?: () => void;\n onSearchClick?: () => void;\n\n // Categories used for menu\n categories: ProHeaderCategories;\n hideInlineCategories?: boolean;\n};\n"],"names":["defaultHeaderTranslations","new","support","purchasedProductHistory","orderHistory","earlyAccess","store","links","company","social","tools","training","continueShopping","search","placeholder","noMatchesFound","seeAllResults","searchUniFiProducts","searchUISPProducts","searchAmpliFiProducts","account","login","signUp","signOut","uiAccount","unifiSiteManager","manageAccount","cart","VATincluded","includesVat","discount","empty","review","shipping","subtotal","total","itemsTitle","upsellTitle","language","region"],"mappings":";;;AAiBO,MAAMA,yBAA4B,GAAA;EACvCC,GAAK,EAAA,KAAA;EACLC,OAAS,EAAA,SAAA;EACTC,uBAAyB,EAAA,2BAAA;EACzBC,YAAc,EAAA,eAAA;EACdC,WAAa,EAAA,cAAA;EACbC,KAAO,EAAA,OAAA;EACPC,KAAO,EAAA,OAAA;EACPC,OAAS,EAAA,SAAA;EACTC,MAAQ,EAAA,QAAA;EACRC,KAAO,EAAA,OAAA;EACPC,QAAU,EAAA,UAAA;EACVC,gBAAkB,EAAA,mBAAA;EAClBC,MAAQ,EAAA;IACNC,WAAa,EAAA,WAAA;IACbC,cAAgB,EAAA,sCAAA;IAChBC,aAAe,EAAA,iBAAA;IACfC,mBAAqB,EAAA,uBAAA;IACrBC,kBAAoB,EAAA,sBAAA;IACpBC,qBAAuB,EAAA;EACzB,CAAA;EACAC,OAAS,EAAA;IACPC,KAAO,EAAA,QAAA;IACPC,MAAQ,EAAA,SAAA;IACRC,OAAS,EAAA,UAAA;IACTC,SAAW,EAAA,YAAA;IACXC,gBAAkB,EAAA,oBAAA;IAClBC,aAAe,EAAA,gBAAA;IACftB,YAAc,EAAA;EAChB,CAAA;EACAuB,IAAM,EAAA;IACJC,WAAa,EAAA,WAAA;IACbC,WAAa,EAAA,iBAAA;IACbC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,oBAAA;IACPC,MAAQ,EAAA,UAAA;IACRC,QAAU,EAAA,UAAA;IACVC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,cAAA;IACPC,UAAY,EAAA,WAAA;IACZC,WAAa,EAAA;EACf,CAAA;EACAC,UAAU,CAAC,CAAA;EACXC,MAAQ,EAAA;AACV,CAAA;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Header.types.mjs","sources":["../../../src/components/Header/Header.types.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\n\nimport type { Language } from \"../../contexts/MenuContext/mapping\";\nimport type {\n ModalId,\n ParsedNavigationItem,\n ParsedNavigationSubItem,\n ParsedNavigationSubSubItem,\n} from \"../../contexts/MenuContext/types\";\nimport type { Nullish, ProductLine } from \"../../types\";\nimport type {\n CustomImageAsset,\n RenderImageFn,\n} from \"../CustomImage/CustomImage.types\";\nimport type { NavigationMicrositeMenuProps } from \"./Navigation/MicrositeMenu/MicrositeMenu.types\";\nimport type { ProMobileMenuSectionItem } from \"./Navigation/ProMobileMenu/ProMobileMenu.types\";\n\nexport const defaultHeaderTranslations = {\n new: \"New\",\n support: \"Support\",\n purchasedProductHistory: \"Purchased Product History\",\n orderHistory: \"Order History\",\n earlyAccess: \"Early Access\",\n store: \"Store\",\n links: \"Links\",\n company: \"Company\",\n social: \"Social\",\n tools: \"Tools\",\n training: \"Training\",\n continueShopping: \"Continue Shopping\",\n search: {\n placeholder: \"Search...\",\n noMatchesFound: \"Sorry, we couldn't find any matches.\",\n seeAllResults: \"See all results\",\n searchUniFiProducts: \"Search UniFi products\",\n searchUISPProducts: \"Search UISP products\",\n searchAmpliFiProducts: \"Search AmpliFi products\",\n },\n account: {\n login: \"Log In\",\n signUp: \"Sign Up\",\n signOut: \"Sign Out\",\n uiAccount: \"UI Account\",\n unifiSiteManager: \"UniFi Site Manager\",\n manageAccount: \"Manage Account\",\n orderHistory: \"Orders & Addresses\",\n },\n cart: {\n VATincluded: \"VAT Incl.\",\n includesVat: \"Includes VAT of\",\n discount: \"Discount\",\n empty: \"Your cart is empty\",\n review: \"Checkout\",\n shipping: \"Shipping\",\n subtotal: \"Subtotal\",\n total: \"Total price:\",\n itemsTitle: \"Your Cart\",\n upsellTitle: \"Usually bought together\",\n },\n language: {},\n region: \"Region\",\n};\n\nexport interface HeaderAccountCustomer {\n id: string;\n email: string;\n displayName: string;\n picture?: string | null;\n}\n\nexport interface HeaderAccount {\n loading?: boolean;\n customer?: Nullish<HeaderAccountCustomer>;\n handleLogin?: () => void;\n handleLogout?: () => void;\n handleRegister?: () => void;\n handleManageAccount?: () => void;\n handleOrderHistory?: () => void;\n renderStorePicker?: (onClose: () => void) => JSX.Element;\n}\n\nexport interface HeaderSearch {\n /** Trigger search */\n onSearch: (formattedQuerySearchTerm: string) => void;\n loading?: boolean;\n totalItemsCount: number;\n items: Array<{\n id: string;\n url: string;\n image?: CustomImageAsset | null;\n title: string;\n family?: string | null;\n }>;\n}\n\nexport interface HeaderCartItemControls {\n loading?: boolean;\n quantityMax?: number;\n onQuantityChange: (newQuantity: number) => void;\n}\n\nexport interface HeaderCartItem {\n id: string;\n url: string;\n image: Nullish<CustomImageAsset>;\n quantity: number;\n title: string;\n controls: HeaderCartItemControls;\n price: string;\n priceIncludingVAT?: string;\n}\n\nexport interface HeaderCart {\n onReview: () => void;\n loading?: boolean;\n items: HeaderCartItem[];\n upsellItems?: HeaderCartItem[];\n totals: Nullish<{\n shipping: Nullish<string>;\n discount: Nullish<string>;\n finalTax: Nullish<string>;\n total: string;\n totalIncludingVAT?: string;\n }>;\n}\n\nexport type HeaderTranslations = typeof defaultHeaderTranslations;\n\nexport type HeaderEmbedConfig = {\n /**\n * Allows to configure custom callback on home link click\n */\n homeLinkClickHandler?: () => void;\n\n /**\n * Allows to render custom extra section items in Pro Mobile Menu\n */\n mobileMenuExtraSectionItems?: Array<ProMobileMenuSectionItem>;\n\n /**\n * Moves Avatar icon to the left side of the header\n */\n moveAvatarIconToLeft?: boolean;\n\n /**\n * Allows to display avatar as image instead of icon\n */\n displayAvatarAsImage?: boolean;\n\n /**\n * Allows to configure custom callback on avatar click\n */\n avatarClickHandler?: () => void;\n\n /**\n * Allows to hide logo / site title\n */\n hideLogo?: boolean;\n\n /**\n * Allows to hide Avatar icon from the header\n */\n hideAvatarIcon?: boolean;\n\n /**\n * Hide language picker\n */\n hideLanguagePicker?: boolean;\n\n fullWidthHeader?: boolean;\n\n /**\n * Renders site title instead of UI logo\n */\n siteTitle?: string;\n\n /**\n * Blurs search input and dismissed virtual keyboard on touchmove\n */\n /** @deprecated Use blurSearchOnTouchmove */\n hideSearchOnTouchmove?: boolean;\n blurSearchOnTouchmove?: boolean;\n};\n\nexport interface HeaderProps {\n className?: string;\n motif: Motif;\n /**\n * Main header bar becomes fixed position at the top\n */\n sticky?: boolean;\n /**\n * Navigation carousel becomes fixed position at the top\n */\n stickyCarousel?: boolean;\n translations?: HeaderTranslations;\n renderImage: RenderImageFn;\n showLineLoader?: boolean;\n onModalOpen?: () => void;\n onMenuItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationItem,\n ) => void;\n onMenuSubItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationSubItem | ParsedNavigationSubSubItem,\n ) => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Account\n account?: HeaderAccount;\n\n // Search\n onSearchResultsAction?: (searchTerm: string) => void;\n search?: HeaderSearch;\n\n // Cart\n onCartClick?: () => void;\n cart?: HeaderCart;\n\n // Set specific modal to be open initially\n initialActiveModal?: Nullish<ModalId>;\n /**\n * Triggers on active modal change\n */\n onActiveModal?: (id: ModalId | null, prevModalId: ModalId | null) => void;\n\n /**\n * Will be called before navigating to store search, the tracking request in this callback will only\n * finish if called from store side as microsites are not using next router.\n */\n trackStoreSearchClick?: () => void;\n\n transparentHeader?: boolean;\n\n /**\n * Sub-menu used for microsites\n */\n micrositeMenu?: NavigationMicrositeMenuProps;\n\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n accountMenu?: React.ReactNode;\n}\n\nexport type IsolatedHeaderProps = {\n className?: string;\n motif: Motif;\n translations?: HeaderTranslations;\n handleContinueShopping: () => void;\n showLineLoader?: boolean;\n account?: {\n loading?: HeaderAccount[\"loading\"];\n customer?: {\n picture?: HeaderAccountCustomer[\"picture\"];\n };\n };\n} & Pick<HeaderProps, \"embedConfig\">;\n\nexport interface ProHeaderEarlyAccess {\n loading?: boolean;\n onClick: () => void;\n}\n\nexport interface HeaderProductLineOption {\n value: ProductLine;\n label: string;\n}\n\nexport interface ProHeaderCategories {\n items: ProMobileMenuSectionItem[];\n activeIndex: number;\n}\n\nexport type ProHeaderProps = Pick<\n HeaderProps,\n | \"className\"\n | \"motif\"\n | \"cart\"\n | \"account\"\n | \"translations\"\n | \"onModalOpen\"\n | \"onCartClick\"\n | \"showLineLoader\"\n | \"accountMenu\"\n> & {\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n // Country picker\n currentCountryName?: string;\n handleStorePickerClick?: () => void;\n\n // Early access button\n earlyAccess?: ProHeaderEarlyAccess;\n\n // Purchase History button\n handlePurchaseHistoryClick?: () => void;\n\n // Order button\n handleOrderHistoryClick?: () => void;\n\n // Product line picker\n productLineOptions?: HeaderProductLineOption[];\n productLineValue?: ProductLine;\n handleProductLineChange?: (type: ProductLine) => void;\n\n // Mobile menu aka \"hamburger\" button click\n handleMobileMenuClick?: () => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Search\n searchValue?: string;\n onSearch?: (searchTerm: string) => void;\n\n onSearchFocus?: () => void;\n onSearchBlur?: () => void;\n onSearchClick?: () => void;\n\n // Categories used for mobile menu\n categories: ProHeaderCategories;\n useInlineCategories?: boolean;\n};\n"],"names":["defaultHeaderTranslations","new","support","purchasedProductHistory","orderHistory","earlyAccess","store","links","company","social","tools","training","continueShopping","search","placeholder","noMatchesFound","seeAllResults","searchUniFiProducts","searchUISPProducts","searchAmpliFiProducts","account","login","signUp","signOut","uiAccount","unifiSiteManager","manageAccount","cart","VATincluded","includesVat","discount","empty","review","shipping","subtotal","total","itemsTitle","upsellTitle","language","region"],"mappings":";;AAiBO,MAAMA,yBAA4B,GAAA;EACvCC,GAAK,EAAA,KAAA;EACLC,OAAS,EAAA,SAAA;EACTC,uBAAyB,EAAA,2BAAA;EACzBC,YAAc,EAAA,eAAA;EACdC,WAAa,EAAA,cAAA;EACbC,KAAO,EAAA,OAAA;EACPC,KAAO,EAAA,OAAA;EACPC,OAAS,EAAA,SAAA;EACTC,MAAQ,EAAA,QAAA;EACRC,KAAO,EAAA,OAAA;EACPC,QAAU,EAAA,UAAA;EACVC,gBAAkB,EAAA,mBAAA;EAClBC,MAAQ,EAAA;IACNC,WAAa,EAAA,WAAA;IACbC,cAAgB,EAAA,sCAAA;IAChBC,aAAe,EAAA,iBAAA;IACfC,mBAAqB,EAAA,uBAAA;IACrBC,kBAAoB,EAAA,sBAAA;IACpBC,qBAAuB,EAAA;EACzB,CAAA;EACAC,OAAS,EAAA;IACPC,KAAO,EAAA,QAAA;IACPC,MAAQ,EAAA,SAAA;IACRC,OAAS,EAAA,UAAA;IACTC,SAAW,EAAA,YAAA;IACXC,gBAAkB,EAAA,oBAAA;IAClBC,aAAe,EAAA,gBAAA;IACftB,YAAc,EAAA;EAChB,CAAA;EACAuB,IAAM,EAAA;IACJC,WAAa,EAAA,WAAA;IACbC,WAAa,EAAA,iBAAA;IACbC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,oBAAA;IACPC,MAAQ,EAAA,UAAA;IACRC,QAAU,EAAA,UAAA;IACVC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,cAAA;IACPC,UAAY,EAAA,WAAA;IACZC,WAAa,EAAA;EACf,CAAA;EACAC,UAAU,CAAC,CAAA;EACXC,MAAQ,EAAA;AACV,CAAA;"}
1
+ {"version":3,"file":"Header.types.mjs","sources":["../../../src/components/Header/Header.types.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\n\nimport type { Language } from \"../../contexts/MenuContext/mapping\";\nimport type {\n ModalId,\n ParsedNavigationItem,\n ParsedNavigationSubItem,\n ParsedNavigationSubSubItem,\n} from \"../../contexts/MenuContext/types\";\nimport type { Nullish, ProductLine } from \"../../types\";\nimport type {\n CustomImageAsset,\n RenderImageFn,\n} from \"../CustomImage/CustomImage.types\";\nimport type { NavigationMicrositeMenuProps } from \"./Navigation/MicrositeMenu/MicrositeMenu.types\";\nimport type { ProMobileMenuSectionItem } from \"./Navigation/ProMobileMenu/ProMobileMenu.types\";\n\nexport const defaultHeaderTranslations = {\n new: \"New\",\n support: \"Support\",\n purchasedProductHistory: \"Purchased Product History\",\n orderHistory: \"Order History\",\n earlyAccess: \"Early Access\",\n store: \"Store\",\n links: \"Links\",\n company: \"Company\",\n social: \"Social\",\n tools: \"Tools\",\n training: \"Training\",\n continueShopping: \"Continue Shopping\",\n search: {\n placeholder: \"Search...\",\n noMatchesFound: \"Sorry, we couldn't find any matches.\",\n seeAllResults: \"See all results\",\n searchUniFiProducts: \"Search UniFi products\",\n searchUISPProducts: \"Search UISP products\",\n searchAmpliFiProducts: \"Search AmpliFi products\",\n },\n account: {\n login: \"Log In\",\n signUp: \"Sign Up\",\n signOut: \"Sign Out\",\n uiAccount: \"UI Account\",\n unifiSiteManager: \"UniFi Site Manager\",\n manageAccount: \"Manage Account\",\n orderHistory: \"Orders & Addresses\",\n },\n cart: {\n VATincluded: \"VAT Incl.\",\n includesVat: \"Includes VAT of\",\n discount: \"Discount\",\n empty: \"Your cart is empty\",\n review: \"Checkout\",\n shipping: \"Shipping\",\n subtotal: \"Subtotal\",\n total: \"Total price:\",\n itemsTitle: \"Your Cart\",\n upsellTitle: \"Usually bought together\",\n },\n language: {},\n region: \"Region\",\n};\n\nexport interface HeaderAccountCustomer {\n id: string;\n email: string;\n displayName: string;\n picture?: string | null;\n}\n\nexport interface HeaderAccount {\n loading?: boolean;\n customer?: Nullish<HeaderAccountCustomer>;\n handleLogin?: () => void;\n handleLogout?: () => void;\n handleRegister?: () => void;\n handleManageAccount?: () => void;\n handleOrderHistory?: () => void;\n renderStorePicker?: (onClose: () => void) => JSX.Element;\n}\n\nexport interface HeaderSearch {\n /** Trigger search */\n onSearch: (formattedQuerySearchTerm: string) => void;\n loading?: boolean;\n totalItemsCount: number;\n items: Array<{\n id: string;\n url: string;\n image?: CustomImageAsset | null;\n title: string;\n family?: string | null;\n }>;\n}\n\nexport interface HeaderCartItemControls {\n loading?: boolean;\n quantityMax?: number;\n onQuantityChange: (newQuantity: number) => void;\n}\n\nexport interface HeaderCartItem {\n id: string;\n url: string;\n image: Nullish<CustomImageAsset>;\n quantity: number;\n title: string;\n controls: HeaderCartItemControls;\n price: string;\n priceIncludingVAT?: string;\n}\n\nexport interface HeaderCart {\n onReview: () => void;\n loading?: boolean;\n items: HeaderCartItem[];\n upsellItems?: HeaderCartItem[];\n totals: Nullish<{\n shipping: Nullish<string>;\n discount: Nullish<string>;\n finalTax: Nullish<string>;\n total: string;\n totalIncludingVAT?: string;\n }>;\n}\n\nexport type HeaderTranslations = typeof defaultHeaderTranslations;\n\nexport type HeaderEmbedConfig = {\n /**\n * Allows to configure custom callback on home link click\n */\n homeLinkClickHandler?: () => void;\n\n /**\n * Allows to render custom extra section items in Pro Mobile Menu\n */\n mobileMenuExtraSectionItems?: Array<ProMobileMenuSectionItem>;\n\n /**\n * Moves Avatar icon to the left side of the header\n */\n moveAvatarIconToLeft?: boolean;\n\n /**\n * Allows to display avatar as image instead of icon\n */\n displayAvatarAsImage?: boolean;\n\n /**\n * Allows to configure custom callback on avatar click\n */\n avatarClickHandler?: () => void;\n\n /**\n * Allows to hide logo / site title\n */\n hideLogo?: boolean;\n\n /**\n * Allows to hide Avatar icon from the header\n */\n hideAvatarIcon?: boolean;\n\n /**\n * Hide language picker\n */\n hideLanguagePicker?: boolean;\n\n fullWidthHeader?: boolean;\n\n /**\n * Renders site title instead of UI logo\n */\n siteTitle?: string;\n\n /**\n * Blurs search input and dismissed virtual keyboard on touchmove\n */\n /** @deprecated Use blurSearchOnTouchmove */\n hideSearchOnTouchmove?: boolean;\n blurSearchOnTouchmove?: boolean;\n};\n\nexport interface HeaderProps {\n className?: string;\n motif: Motif;\n /**\n * Main header bar becomes fixed position at the top\n */\n sticky?: boolean;\n /**\n * Navigation carousel becomes fixed position at the top\n */\n stickyCarousel?: boolean;\n translations?: HeaderTranslations;\n renderImage: RenderImageFn;\n showLineLoader?: boolean;\n onModalOpen?: () => void;\n onMenuItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationItem,\n ) => void;\n onMenuSubItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationSubItem | ParsedNavigationSubSubItem,\n ) => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Account\n account?: HeaderAccount;\n\n // Search\n onSearchResultsAction?: (searchTerm: string) => void;\n search?: HeaderSearch;\n\n // Cart\n onCartClick?: () => void;\n cart?: HeaderCart;\n\n // Set specific modal to be open initially\n initialActiveModal?: Nullish<ModalId>;\n /**\n * Triggers on active modal change\n */\n onActiveModal?: (id: ModalId | null, prevModalId: ModalId | null) => void;\n\n /**\n * Will be called before navigating to store search, the tracking request in this callback will only\n * finish if called from store side as microsites are not using next router.\n */\n trackStoreSearchClick?: () => void;\n\n transparentHeader?: boolean;\n\n /**\n * Sub-menu used for microsites\n */\n micrositeMenu?: NavigationMicrositeMenuProps;\n\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n accountMenu?: React.ReactNode;\n}\n\nexport type IsolatedHeaderProps = {\n className?: string;\n motif: Motif;\n translations?: HeaderTranslations;\n handleContinueShopping: () => void;\n showLineLoader?: boolean;\n account?: {\n loading?: HeaderAccount[\"loading\"];\n customer?: {\n picture?: HeaderAccountCustomer[\"picture\"];\n };\n };\n} & Pick<HeaderProps, \"embedConfig\">;\n\nexport interface ProHeaderEarlyAccess {\n loading?: boolean;\n onClick: () => void;\n}\n\nexport interface HeaderProductLineOption {\n value: ProductLine;\n label: string;\n}\n\nexport interface ProHeaderCategories {\n items: ProMobileMenuSectionItem[];\n activeIndex: number;\n}\n\nexport type ProHeaderProps = Pick<\n HeaderProps,\n | \"className\"\n | \"motif\"\n | \"cart\"\n | \"account\"\n | \"translations\"\n | \"onModalOpen\"\n | \"onCartClick\"\n | \"showLineLoader\"\n | \"accountMenu\"\n> & {\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n // Country picker\n currentCountryName?: string;\n handleStorePickerClick?: () => void;\n\n // Early access button\n earlyAccess?: ProHeaderEarlyAccess;\n\n // Purchase History button\n handlePurchaseHistoryClick?: () => void;\n\n // Order button\n handleOrderHistoryClick?: () => void;\n\n // Product line picker\n productLineOptions?: HeaderProductLineOption[];\n productLineValue?: ProductLine;\n handleProductLineChange?: (type: ProductLine) => void;\n\n // Mobile menu aka \"hamburger\" button click\n handleMobileMenuClick?: () => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Search\n searchValue?: string;\n onSearch?: (searchTerm: string) => void;\n\n onSearchFocus?: () => void;\n onSearchBlur?: () => void;\n onSearchClick?: () => void;\n\n // Categories used for menu\n categories: ProHeaderCategories;\n hideInlineCategories?: boolean;\n};\n"],"names":["defaultHeaderTranslations","new","support","purchasedProductHistory","orderHistory","earlyAccess","store","links","company","social","tools","training","continueShopping","search","placeholder","noMatchesFound","seeAllResults","searchUniFiProducts","searchUISPProducts","searchAmpliFiProducts","account","login","signUp","signOut","uiAccount","unifiSiteManager","manageAccount","cart","VATincluded","includesVat","discount","empty","review","shipping","subtotal","total","itemsTitle","upsellTitle","language","region"],"mappings":";;AAiBO,MAAMA,yBAA4B,GAAA;EACvCC,GAAK,EAAA,KAAA;EACLC,OAAS,EAAA,SAAA;EACTC,uBAAyB,EAAA,2BAAA;EACzBC,YAAc,EAAA,eAAA;EACdC,WAAa,EAAA,cAAA;EACbC,KAAO,EAAA,OAAA;EACPC,KAAO,EAAA,OAAA;EACPC,OAAS,EAAA,SAAA;EACTC,MAAQ,EAAA,QAAA;EACRC,KAAO,EAAA,OAAA;EACPC,QAAU,EAAA,UAAA;EACVC,gBAAkB,EAAA,mBAAA;EAClBC,MAAQ,EAAA;IACNC,WAAa,EAAA,WAAA;IACbC,cAAgB,EAAA,sCAAA;IAChBC,aAAe,EAAA,iBAAA;IACfC,mBAAqB,EAAA,uBAAA;IACrBC,kBAAoB,EAAA,sBAAA;IACpBC,qBAAuB,EAAA;EACzB,CAAA;EACAC,OAAS,EAAA;IACPC,KAAO,EAAA,QAAA;IACPC,MAAQ,EAAA,SAAA;IACRC,OAAS,EAAA,UAAA;IACTC,SAAW,EAAA,YAAA;IACXC,gBAAkB,EAAA,oBAAA;IAClBC,aAAe,EAAA,gBAAA;IACftB,YAAc,EAAA;EAChB,CAAA;EACAuB,IAAM,EAAA;IACJC,WAAa,EAAA,WAAA;IACbC,WAAa,EAAA,iBAAA;IACbC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,oBAAA;IACPC,MAAQ,EAAA,UAAA;IACRC,QAAU,EAAA,UAAA;IACVC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,cAAA;IACPC,UAAY,EAAA,WAAA;IACZC,WAAa,EAAA;EACf,CAAA;EACAC,UAAU,CAAC,CAAA;EACXC,MAAQ,EAAA;AACV,CAAA;"}
@@ -17,5 +17,5 @@ export declare const ProHeader: import("react").NamedExoticComponent<Pick<import
17
17
  onSearchBlur?: () => void;
18
18
  onSearchClick?: () => void;
19
19
  categories: import("../Header.types").ProHeaderCategories;
20
- useInlineCategories?: boolean;
20
+ hideInlineCategories?: boolean;
21
21
  }>;
@@ -108,7 +108,7 @@ const ProHeader = react.memo(function ProHeader2({
108
108
  handleMobileMenuClick,
109
109
  productLineValue,
110
110
  categories,
111
- useInlineCategories,
111
+ hideInlineCategories,
112
112
  embedConfig,
113
113
  onSearchFocus,
114
114
  onSearchBlur,
@@ -211,12 +211,12 @@ const ProHeader = react.memo(function ProHeader2({
211
211
  return logoHover || showTouchProMenu;
212
212
  }, [logoHover, showTouchProMenu]);
213
213
  const onClickAwayFromSearchModal = react.useCallback(() => {
214
- if (useInlineCategories && !!searchValue && !isMobile) return;
214
+ if (!!searchValue && !isMobile) return;
215
215
  if (activeModal === types.ModalId.Search) {
216
216
  setActiveModal(null);
217
217
  onSearchClick?.();
218
218
  }
219
- }, [activeModal, isMobile, onSearchClick, searchValue, setActiveModal, useInlineCategories]);
219
+ }, [activeModal, isMobile, onSearchClick, searchValue, setActiveModal]);
220
220
  const [initialSearchValueHandled, setInitialSearchValueHandled] = react.useState(false);
221
221
  react.useEffect(() => {
222
222
  if (!initialSearchValueHandled && searchValue) {
@@ -262,7 +262,7 @@ const ProHeader = react.memo(function ProHeader2({
262
262
  }
263
263
  }, [handleModalOpen, onSearchClick, searchInputRef]);
264
264
  react.useEffect(() => {
265
- if (!useInlineCategories || activeModal !== types.ModalId.Search || isMobile) return;
265
+ if (activeModal === types.ModalId.Search && !isMobile) return;
266
266
  if (desktopSearchInputRef) {
267
267
  const interval = setInterval(() => {
268
268
  if (document.activeElement === desktopSearchInputRef) {
@@ -271,7 +271,7 @@ const ProHeader = react.memo(function ProHeader2({
271
271
  desktopSearchInputRef.focus();
272
272
  }, 0);
273
273
  }
274
- }, [activeModal, desktopSearchInputRef, isMobile, useInlineCategories]);
274
+ }, [activeModal, desktopSearchInputRef, isMobile]);
275
275
  const handleSearchValueChange = react.useCallback(e => {
276
276
  onSearch?.(e.target.value);
277
277
  }, [onSearch]);
@@ -313,24 +313,17 @@ const ProHeader = react.memo(function ProHeader2({
313
313
  return cart?.items.reduce((sum, item) => sum + item.quantity, 0) ?? 0;
314
314
  }, [cart?.items]);
315
315
  const hasTouch = useHasTouch.useHasTouch();
316
- const logoSiteUrl = react.useMemo(() => {
317
- if (useInlineCategories) {
318
- return createSiteUrl([mapping.SiteId.Store, "/"]);
319
- }
320
- return createSiteUrl([mapping.SiteId.Ui, "/"]);
321
- }, [createSiteUrl, useInlineCategories]);
322
316
  const onLogoAnchorClick = react.useCallback(e => {
323
317
  if (embedConfig?.homeLinkClickHandler) {
324
318
  e.preventDefault();
325
319
  embedConfig.homeLinkClickHandler();
326
320
  }
327
- if (useInlineCategories && !showProMenu && !hasTouch) {
321
+ if (!showProMenu && !hasTouch) {
328
322
  e.preventDefault();
329
323
  setShowTouchProMenu(true);
330
324
  }
331
- }, [embedConfig, useInlineCategories, hasTouch, showProMenu]);
325
+ }, [embedConfig, hasTouch, showProMenu]);
332
326
  react.useEffect(() => {
333
- if (!useInlineCategories) return;
334
327
  const containerEl = containerRef.current;
335
328
  if (!containerEl) return;
336
329
  const wrapEl = wrapRef.current;
@@ -344,7 +337,7 @@ const ProHeader = react.memo(function ProHeader2({
344
337
  window.requestAnimationFrame(handle);
345
338
  };
346
339
  window.requestAnimationFrame(handle);
347
- }, [useInlineCategories]);
340
+ }, []);
348
341
  const handleAvatarClick = react.useCallback(e => {
349
342
  if (embedConfig?.avatarClickHandler) {
350
343
  embedConfig.avatarClickHandler();
@@ -387,9 +380,6 @@ const ProHeader = react.memo(function ProHeader2({
387
380
  width: 17.86,
388
381
  height: 18
389
382
  });
390
- if (!useInlineCategories) {
391
- return defaultIcon;
392
- }
393
383
  switch (productLineValue) {
394
384
  case generated.ProductLine.Unifi:
395
385
  return /* @__PURE__ */jsxRuntime.jsx(StyleableSvgImage.StyleableSvgImage, {
@@ -406,7 +396,7 @@ const ProHeader = react.memo(function ProHeader2({
406
396
  default:
407
397
  return defaultIcon;
408
398
  }
409
- }, [productLineValue, useInlineCategories]);
399
+ }, [productLineValue]);
410
400
  return /* @__PURE__ */jsxRuntime.jsxs(ProHeader_styles.ProHeaderWrap, {
411
401
  ref: rootRef,
412
402
  $sticky: !!embedConfig,
@@ -428,7 +418,7 @@ const ProHeader = react.memo(function ProHeader2({
428
418
  $addSpaceOnDesktop: !!embedConfig?.fullWidthHeader,
429
419
  children: activeModal !== types.ModalId.ProMobileMenu && /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, {
430
420
  children: [!embedConfig?.hideLogo && /* @__PURE__ */jsxRuntime.jsx(Header_styles.Anchor, {
431
- href: logoSiteUrl,
421
+ href: createSiteUrl([mapping.SiteId.Store, "/"]),
432
422
  onClick: onLogoAnchorClick,
433
423
  children: embedConfig?.siteTitle ? /* @__PURE__ */jsxRuntime.jsx(Header_styles.SiteTitleWrap, {
434
424
  children: embedConfig.siteTitle
@@ -437,19 +427,11 @@ const ProHeader = react.memo(function ProHeader2({
437
427
  ref: logoRef,
438
428
  children: logoIconHtml
439
429
  })
440
- }), embedConfig?.moveAvatarIconToLeft && avatarHtml, !useInlineCategories && /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.BreakpointsWrap, {
441
- hideBreakpoint: MOBILE_BREAKPOINT_AND_DOWN,
442
- children: currentCountryName && /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.CountryButton, {
443
- "data-test-id": "country-select-btn",
444
- type: "button",
445
- onClick: handleStorePickerClick,
446
- children: currentCountryName
447
- })
448
- })]
430
+ }), embedConfig?.moveAvatarIconToLeft && avatarHtml]
449
431
  })
450
- }), /* @__PURE__ */jsxRuntime.jsxs(ProHeader_styles.CenterWrap, {
432
+ }), /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.CenterWrap, {
451
433
  hideBreakpoint: MOBILE_BREAKPOINT_AND_DOWN,
452
- children: [!useInlineCategories || activeModal === types.ModalId.Search || !!searchValue ? /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.Search, {
434
+ children: activeModal === types.ModalId.Search || !!searchValue ? /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.Search, {
453
435
  setInputRef: setDesktopSearchInputRef,
454
436
  onValueChange: handleSearchValueChange,
455
437
  placeholder: searchPlaceholder,
@@ -462,6 +444,7 @@ const ProHeader = react.memo(function ProHeader2({
462
444
  onBlur: handleSearchBlur,
463
445
  focusedWidth: searchFocusWidth
464
446
  }) : /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.InlineCategoryWrap, {
447
+ $hide: hideInlineCategories,
465
448
  children: /* @__PURE__ */jsxRuntime.jsx(ScrollWrapper.ScrollWrapper, {
466
449
  direction: "horizontal",
467
450
  align: "center",
@@ -486,27 +469,19 @@ const ProHeader = react.memo(function ProHeader2({
486
469
  })
487
470
  }, category.id);
488
471
  }
489
- })) ?? []
472
+ }))
490
473
  })
491
- }), !useInlineCategories && /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.ProductLineSelectorWrap, {
492
- children: productLineOptions.map(option => /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.ProductLineSelectorItem, {
493
- onClick: () => handleProductLineChange?.(option.value),
494
- $active: option.value === productLineValue,
495
- "data-test-id": `product-line-selector-${option.value}`,
496
- children: option.label
497
- }, option.value))
498
- })]
474
+ })
499
475
  }), /* @__PURE__ */jsxRuntime.jsxs(ProHeader_styles.RightWrap, {
500
476
  $addSpaceOnDesktop: !!embedConfig?.fullWidthHeader,
501
477
  children: [activeModal !== types.ModalId.ProMobileMenu && /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, {
502
478
  children: [/* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.ProIconWrap, {
503
479
  "data-test-id": "search-btn",
504
- hideBreakpoint: !useInlineCategories ? MOBILE_BREAKPOINT_UP : void 0,
505
480
  motif,
506
481
  onClick: handleShowSearchTab,
507
482
  children: /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.ProIconInnerFillWrap, {
508
483
  $active: activeModal === types.ModalId.Search || !!searchValue,
509
- $transparent: !!embedConfig || useInlineCategories && !isMobile,
484
+ $transparent: !!embedConfig || !isMobile,
510
485
  children: /* @__PURE__ */jsxRuntime.jsx(Header_styles.SvgIcon, {
511
486
  src: _externalAssets_g50k1DIN__default["default"],
512
487
  width: Header_styles.HEADER_ICON_SIZE,
@@ -653,7 +628,7 @@ const ProHeader = react.memo(function ProHeader2({
653
628
  categories,
654
629
  hideExtraSection: !!embedConfig
655
630
  })]
656
- }), useInlineCategories && !embedConfig && !isMobile && /* @__PURE__ */jsxRuntime.jsx(ProMenu.NavigationProMenu, {
631
+ }), !embedConfig && !isMobile && /* @__PURE__ */jsxRuntime.jsx(ProMenu.NavigationProMenu, {
657
632
  show: showProMenu,
658
633
  currentCountryName,
659
634
  handleStorePickerClick,