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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (869) hide show
  1. package/CHANGELOG.md +237 -5
  2. package/lib/_virtual/_virtual_multi-entry.js +61 -42
  3. package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
  4. package/lib/_virtual/_virtual_multi-entry.mjs +48 -40
  5. package/lib/_virtual/_virtual_multi-entry.mjs.map +1 -1
  6. package/lib/assets/aggregation.png +0 -0
  7. package/lib/assets/bullet.png +0 -0
  8. package/lib/assets/camera-special-devices.png +0 -0
  9. package/lib/assets/cloud-gateway-overview.png +0 -0
  10. package/lib/assets/compact-switching.png +0 -0
  11. package/lib/assets/compact.png +0 -0
  12. package/lib/assets/consolidatedSpecialDevices.svg +5 -0
  13. package/lib/assets/digital-signage.png +0 -0
  14. package/lib/assets/dome-turret.png +0 -0
  15. package/lib/assets/door-access.png +0 -0
  16. package/lib/assets/doorAccess.svg +5 -0
  17. package/lib/assets/education.jpg +0 -0
  18. package/lib/assets/efg.png +0 -0
  19. package/lib/assets/enterprise-scale.png +0 -0
  20. package/lib/assets/enterprise.jpg +0 -0
  21. package/lib/assets/ev-charging.png +0 -0
  22. package/lib/assets/flagship.jpg +0 -0
  23. package/lib/assets/flexible-outdoor.jpg +0 -0
  24. package/lib/assets/gbe-1u-2.5and10.png +0 -0
  25. package/lib/assets/gbe-1u.png +0 -0
  26. package/lib/assets/hospitality.jpg +0 -0
  27. package/lib/assets/how-it-works.jpg +0 -0
  28. package/lib/assets/icon-location-pin.svg +5 -0
  29. package/lib/{components/MobileModal/assets → assets/icons}/arrowDown.svg.js +1 -1
  30. package/lib/assets/icons/arrowDown.svg.mjs +3 -0
  31. package/lib/assets/icons/menu/icon-location-pin.svg.js +27 -0
  32. package/lib/assets/icons/menu/icon-location-pin.svg.js.map +1 -0
  33. package/lib/assets/icons/menu/icon-location-pin.svg.mjs +3 -0
  34. package/lib/assets/icons/menu/icon-location-pin.svg.mjs.map +1 -0
  35. package/lib/assets/icons/zoomOut.svg.js +27 -0
  36. package/lib/assets/icons/zoomOut.svg.js.map +1 -0
  37. package/lib/assets/icons/zoomOut.svg.mjs +3 -0
  38. package/lib/assets/icons/zoomOut.svg.mjs.map +1 -0
  39. package/lib/assets/industrial.jpg +0 -0
  40. package/lib/assets/industrial2.jpg +0 -0
  41. package/lib/assets/large-scale.png +0 -0
  42. package/lib/assets/managed-voip.png +0 -0
  43. package/lib/assets/mega-capacity.jpg +0 -0
  44. package/lib/assets/minus4.svg +8 -8
  45. package/lib/assets/minus5.svg +8 -8
  46. package/lib/assets/mobile-routing.png +0 -0
  47. package/lib/assets/nextai-camera.jpg +0 -0
  48. package/lib/assets/nextai-cyber.jpg +0 -0
  49. package/lib/assets/overview.svg +3 -0
  50. package/lib/assets/pause.svg +3 -3
  51. package/lib/assets/pause2.svg +3 -3
  52. package/lib/assets/plus5.svg +9 -9
  53. package/lib/assets/plus6.svg +9 -9
  54. package/lib/assets/premium-audio.png +0 -0
  55. package/lib/assets/ptz.png +0 -0
  56. package/lib/assets/retail.jpg +0 -0
  57. package/lib/assets/sd-wan-sase.jpg +0 -0
  58. package/lib/assets/security-overview.png +0 -0
  59. package/lib/assets/site-manager.jpg +0 -0
  60. package/lib/assets/stadium.jpg +0 -0
  61. package/lib/assets/switching-overview.png +0 -0
  62. package/lib/assets/tco-calculator.jpg +0 -0
  63. package/lib/assets/ucg-max.png +0 -0
  64. package/lib/assets/ucgMax.jpg +0 -0
  65. package/lib/assets/ucgMax2.jpg +0 -0
  66. package/lib/assets/ucgUltra.jpg +0 -0
  67. package/lib/assets/ucgUltra2.jpg +0 -0
  68. package/lib/assets/udmPro.jpg +0 -0
  69. package/lib/assets/udmPro2.jpg +0 -0
  70. package/lib/assets/udmProMax.jpg +0 -0
  71. package/lib/assets/udmProMax2.jpg +0 -0
  72. package/lib/assets/udmProSpecial.jpg +0 -0
  73. package/lib/assets/udmProSpecial2.jpg +0 -0
  74. package/lib/assets/unifi-drive.png +0 -0
  75. package/lib/assets/video-recorders.png +0 -0
  76. package/lib/assets/wall.jpg +0 -0
  77. package/lib/assets/wifi-bridging.png +0 -0
  78. package/lib/assets/wifi-flagship.png +0 -0
  79. package/lib/assets/wifi-integrated.png +0 -0
  80. package/lib/assets/wifi-mega-capacity.png +0 -0
  81. package/lib/assets/wifi-outdoor.png +0 -0
  82. package/lib/assets/wifi-overview.png +0 -0
  83. package/lib/assets/wifi-wall.png +0 -0
  84. package/lib/assets/zoomOut.svg +3 -0
  85. package/lib/components/Button/CartButton.d.ts +3 -1
  86. package/lib/components/Button/CartButton.js +4 -2
  87. package/lib/components/Button/CartButton.js.map +1 -1
  88. package/lib/components/Button/CartButton.mjs +4 -2
  89. package/lib/components/Button/CartButton.mjs.map +1 -1
  90. package/lib/components/CategoryTabs/CategoryTabs.styles.d.ts +1 -1
  91. package/lib/components/CategoryTabs/CategoryTabs.styles.js +2 -3
  92. package/lib/components/CategoryTabs/CategoryTabs.styles.js.map +1 -1
  93. package/lib/components/CategoryTabs/CategoryTabs.styles.mjs +2 -3
  94. package/lib/components/CategoryTabs/CategoryTabs.styles.mjs.map +1 -1
  95. package/lib/components/Compare/Compare.styles.d.ts +5 -5
  96. package/lib/components/Container/Container.d.ts +1 -1
  97. package/lib/components/Container/Container.js +4 -3
  98. package/lib/components/Container/Container.js.map +1 -1
  99. package/lib/components/Container/Container.mjs +5 -4
  100. package/lib/components/Container/Container.mjs.map +1 -1
  101. package/lib/components/Header/AccountMenu/AccountMenu.js +14 -4
  102. package/lib/components/Header/AccountMenu/AccountMenu.js.map +1 -1
  103. package/lib/components/Header/AccountMenu/AccountMenu.mjs +15 -5
  104. package/lib/components/Header/AccountMenu/AccountMenu.mjs.map +1 -1
  105. package/lib/components/Header/AccountMenu/AccountMenu.styles.d.ts +3 -3
  106. package/lib/components/Header/CartModalV2/Item/Item.styles.d.ts +1 -1
  107. package/lib/components/Header/Header.js +15 -15
  108. package/lib/components/Header/Header.js.map +1 -1
  109. package/lib/components/Header/Header.mjs +12 -12
  110. package/lib/components/Header/Header.mjs.map +1 -1
  111. package/lib/components/Header/Header.styles.d.ts +2 -9
  112. package/lib/components/Header/Header.styles.js +2 -21
  113. package/lib/components/Header/Header.styles.js.map +1 -1
  114. package/lib/components/Header/Header.styles.mjs +3 -21
  115. package/lib/components/Header/Header.styles.mjs.map +1 -1
  116. package/lib/components/Header/Header.types.d.ts +12 -4
  117. package/lib/components/Header/Header.types.js +2 -1
  118. package/lib/components/Header/Header.types.js.map +1 -1
  119. package/lib/components/Header/Header.types.mjs +2 -1
  120. package/lib/components/Header/Header.types.mjs.map +1 -1
  121. package/lib/components/Header/IsolatedHeader.js +40 -38
  122. package/lib/components/Header/IsolatedHeader.js.map +1 -1
  123. package/lib/components/Header/IsolatedHeader.mjs +41 -39
  124. package/lib/components/Header/IsolatedHeader.mjs.map +1 -1
  125. package/lib/components/Header/MenuItem/MenuItem.styles.d.ts +1 -1
  126. package/lib/components/Header/MenuItem/MenuItem.styles.js +3 -3
  127. package/lib/components/Header/MenuItem/MenuItem.styles.js.map +1 -1
  128. package/lib/components/Header/MenuItem/MenuItem.styles.mjs +3 -3
  129. package/lib/components/Header/MenuItem/MenuItem.styles.mjs.map +1 -1
  130. package/lib/components/Header/MenuItem/MenuItem.types.d.ts +1 -0
  131. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.d.ts +1 -1
  132. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.js +7 -5
  133. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.js.map +1 -1
  134. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.mjs +7 -5
  135. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.mjs.map +1 -1
  136. package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.d.ts +1 -1
  137. package/lib/components/Header/Navigation/ProMenu/ProMenu.d.ts +2 -0
  138. package/lib/components/Header/Navigation/ProMenu/ProMenu.js +103 -0
  139. package/lib/components/Header/Navigation/ProMenu/ProMenu.js.map +1 -0
  140. package/lib/components/Header/Navigation/ProMenu/ProMenu.mjs +81 -0
  141. package/lib/components/Header/Navigation/ProMenu/ProMenu.mjs.map +1 -0
  142. package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.d.ts +23 -0
  143. package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.js +121 -0
  144. package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.js.map +1 -0
  145. package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.mjs +106 -0
  146. package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.mjs.map +1 -0
  147. package/lib/components/Header/Navigation/ProMenu/ProMenu.types.d.ts +12 -0
  148. package/lib/components/Header/Navigation/ProMenu/index.d.ts +1 -0
  149. package/lib/components/Header/Navigation/ProMenu/index.js +6 -0
  150. package/lib/components/{ResourceCalculatorV1/components → Header/Navigation/ProMenu}/index.js.map +1 -1
  151. package/lib/components/Header/Navigation/ProMenu/index.mjs +3 -0
  152. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.d.ts +1 -1
  153. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js +101 -101
  154. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js.map +1 -1
  155. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs +101 -101
  156. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs.map +1 -1
  157. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.d.ts +9 -0
  158. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js +15 -1
  159. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js.map +1 -1
  160. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs +13 -2
  161. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs.map +1 -1
  162. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.types.d.ts +10 -4
  163. package/lib/components/Header/ProHeader/ProHeader.d.ts +3 -4
  164. package/lib/components/Header/ProHeader/ProHeader.js +258 -125
  165. package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
  166. package/lib/components/Header/ProHeader/ProHeader.mjs +258 -127
  167. package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
  168. package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +5 -4
  169. package/lib/components/Header/ProHeader/ProHeader.styles.js +25 -19
  170. package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
  171. package/lib/components/Header/ProHeader/ProHeader.styles.mjs +23 -20
  172. package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
  173. package/lib/components/Header/translations/ar.json.js +4 -1
  174. package/lib/components/Header/translations/ar.json.js.map +1 -1
  175. package/lib/components/Header/translations/ar.json.mjs +4 -2
  176. package/lib/components/Header/translations/ar.json.mjs.map +1 -1
  177. package/lib/components/Header/translations/de.json.js +4 -1
  178. package/lib/components/Header/translations/de.json.js.map +1 -1
  179. package/lib/components/Header/translations/de.json.mjs +4 -2
  180. package/lib/components/Header/translations/de.json.mjs.map +1 -1
  181. package/lib/components/Header/translations/el.json.js +4 -1
  182. package/lib/components/Header/translations/el.json.js.map +1 -1
  183. package/lib/components/Header/translations/el.json.mjs +4 -2
  184. package/lib/components/Header/translations/el.json.mjs.map +1 -1
  185. package/lib/components/Header/translations/en.json.js +4 -1
  186. package/lib/components/Header/translations/en.json.js.map +1 -1
  187. package/lib/components/Header/translations/en.json.mjs +4 -2
  188. package/lib/components/Header/translations/en.json.mjs.map +1 -1
  189. package/lib/components/Header/translations/es.json.js +4 -1
  190. package/lib/components/Header/translations/es.json.js.map +1 -1
  191. package/lib/components/Header/translations/es.json.mjs +4 -2
  192. package/lib/components/Header/translations/es.json.mjs.map +1 -1
  193. package/lib/components/Header/translations/fr.json.js +4 -1
  194. package/lib/components/Header/translations/fr.json.js.map +1 -1
  195. package/lib/components/Header/translations/fr.json.mjs +4 -2
  196. package/lib/components/Header/translations/fr.json.mjs.map +1 -1
  197. package/lib/components/Header/translations/it.json.js +4 -1
  198. package/lib/components/Header/translations/it.json.js.map +1 -1
  199. package/lib/components/Header/translations/it.json.mjs +4 -2
  200. package/lib/components/Header/translations/it.json.mjs.map +1 -1
  201. package/lib/components/Header/translations/ja.json.js +4 -1
  202. package/lib/components/Header/translations/ja.json.js.map +1 -1
  203. package/lib/components/Header/translations/ja.json.mjs +4 -2
  204. package/lib/components/Header/translations/ja.json.mjs.map +1 -1
  205. package/lib/components/Header/translations/pt-BR.json.js +4 -1
  206. package/lib/components/Header/translations/pt-BR.json.js.map +1 -1
  207. package/lib/components/Header/translations/pt-BR.json.mjs +4 -2
  208. package/lib/components/Header/translations/pt-BR.json.mjs.map +1 -1
  209. package/lib/components/Header/translations/zh-Hans.json.js +4 -1
  210. package/lib/components/Header/translations/zh-Hans.json.js.map +1 -1
  211. package/lib/components/Header/translations/zh-Hans.json.mjs +4 -2
  212. package/lib/components/Header/translations/zh-Hans.json.mjs.map +1 -1
  213. package/lib/components/Header/translations/zh-Hant-TW.json.js +4 -1
  214. package/lib/components/Header/translations/zh-Hant-TW.json.js.map +1 -1
  215. package/lib/components/Header/translations/zh-Hant-TW.json.mjs +4 -2
  216. package/lib/components/Header/translations/zh-Hant-TW.json.mjs.map +1 -1
  217. package/lib/components/Hero/Hero.styles.d.ts +2 -2
  218. package/lib/components/HeroFadeGallery/HeroFadeGallery.styles.d.ts +1 -1
  219. package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.d.ts +1 -1
  220. package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.js +3 -1
  221. package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.js.map +1 -0
  222. package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.mjs +3 -1
  223. package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.mjs.map +1 -0
  224. package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.styles.d.ts +1 -0
  225. package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.styles.js +10 -7
  226. package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.js.map +1 -0
  227. package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.styles.mjs +10 -7
  228. package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.mjs.map +1 -0
  229. package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.types.d.ts +1 -0
  230. package/lib/components/HowToUseSection/HowToUseSection.styles.d.ts +2 -2
  231. package/lib/components/InputSelect/InputSelect.styles.d.ts +1 -1
  232. package/lib/components/LandingPage/Cards/Cards.js +4 -4
  233. package/lib/components/LandingPage/Cards/Cards.js.map +1 -1
  234. package/lib/components/LandingPage/Cards/Cards.mjs +3 -3
  235. package/lib/components/LandingPage/Cards/Cards.mjs.map +1 -1
  236. package/lib/components/LandingPagePro/LandingPagePro.styles.d.ts +1 -1
  237. package/lib/components/LayoutRenderer/LayoutRenderer.styles.d.ts +1 -1
  238. package/lib/components/LayoutRendererV1/LayoutRenderer.styles.d.ts +3 -3
  239. package/lib/components/LayoutRendererV2/LayoutRenderer.styles.d.ts +3 -3
  240. package/lib/components/MicrositeHeader/MicrositeHeader.d.ts +2 -0
  241. package/lib/components/MicrositeHeader/MicrositeHeader.js +28 -0
  242. package/lib/components/MicrositeHeader/MicrositeHeader.js.map +1 -0
  243. package/lib/components/MicrositeHeader/MicrositeHeader.mjs +26 -0
  244. package/lib/components/MicrositeHeader/MicrositeHeader.mjs.map +1 -0
  245. package/lib/components/MicrositeHeader/MicrositeHeader.styles.d.ts +2 -0
  246. package/lib/components/MicrositeHeader/MicrositeHeader.types.d.ts +5 -0
  247. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.d.ts +2 -0
  248. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.js +139 -0
  249. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.js.map +1 -0
  250. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.mjs +130 -0
  251. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.mjs.map +1 -0
  252. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.styles.d.ts +59 -0
  253. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.styles.js +424 -0
  254. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.styles.js.map +1 -0
  255. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.styles.mjs +389 -0
  256. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.styles.mjs.map +1 -0
  257. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.types.d.ts +21 -0
  258. package/lib/components/MicrositeHeader/components/DropdownMenu/index.d.ts +1 -0
  259. package/lib/components/MicrositeHeader/components/DropdownMenu/index.js +6 -0
  260. package/lib/components/MicrositeHeader/components/DropdownMenu/index.js.map +1 -0
  261. package/lib/components/MicrositeHeader/components/DropdownMenu/index.mjs +3 -0
  262. package/lib/components/MicrositeHeader/components/DropdownMenu/index.mjs.map +1 -0
  263. package/lib/components/MicrositeHeader/components/FirstLevelMenu/FirstLevelMenu.d.ts +2 -0
  264. package/lib/components/MicrositeHeader/components/FirstLevelMenu/FirstLevelMenu.styles.d.ts +22 -0
  265. package/lib/components/MicrositeHeader/components/FirstLevelMenu/FirstLevelMenu.styles.js +148 -0
  266. package/lib/components/MicrositeHeader/components/FirstLevelMenu/FirstLevelMenu.styles.js.map +1 -0
  267. package/lib/components/MicrositeHeader/components/FirstLevelMenu/FirstLevelMenu.styles.mjs +126 -0
  268. package/lib/components/MicrositeHeader/components/FirstLevelMenu/FirstLevelMenu.styles.mjs.map +1 -0
  269. package/lib/components/MicrositeHeader/components/FirstLevelMenu/FirstLevelMenu.types.d.ts +10 -0
  270. package/lib/components/MicrositeHeader/components/FirstLevelMenu/index.d.ts +1 -0
  271. package/lib/components/MicrositeHeader/components/Navigation/Navigation.d.ts +3 -0
  272. package/lib/components/MicrositeHeader/components/Navigation/Navigation.js +224 -0
  273. package/lib/components/MicrositeHeader/components/Navigation/Navigation.js.map +1 -0
  274. package/lib/components/MicrositeHeader/components/Navigation/Navigation.mjs +214 -0
  275. package/lib/components/MicrositeHeader/components/Navigation/Navigation.mjs.map +1 -0
  276. package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.d.ts +36 -0
  277. package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.js +232 -0
  278. package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.js.map +1 -0
  279. package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.mjs +210 -0
  280. package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.mjs.map +1 -0
  281. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/NavigationItem.d.ts +8 -0
  282. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/NavigationItem.js +47 -0
  283. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/NavigationItem.js.map +1 -0
  284. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/NavigationItem.mjs +39 -0
  285. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/NavigationItem.mjs.map +1 -0
  286. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/index.d.ts +1 -0
  287. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/index.js +6 -0
  288. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/index.js.map +1 -0
  289. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/index.mjs +3 -0
  290. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/index.mjs.map +1 -0
  291. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.d.ts +5 -0
  292. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.js +92 -0
  293. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.js.map +1 -0
  294. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.mjs +84 -0
  295. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.mjs.map +1 -0
  296. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.styles.d.ts +32 -0
  297. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.styles.js +230 -0
  298. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.styles.js.map +1 -0
  299. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.styles.mjs +206 -0
  300. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.styles.mjs.map +1 -0
  301. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/index.d.ts +1 -0
  302. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/index.js +6 -0
  303. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/index.js.map +1 -0
  304. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/index.mjs +3 -0
  305. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/index.mjs.map +1 -0
  306. package/lib/components/MicrositeHeader/components/Navigation/index.d.ts +1 -0
  307. package/lib/components/MicrositeHeader/components/Navigation/index.js +6 -0
  308. package/lib/components/MicrositeHeader/components/Navigation/index.js.map +1 -0
  309. package/lib/components/{ResourceCalculatorV1/components → MicrositeHeader/components/Navigation}/index.mjs +1 -1
  310. package/lib/components/MicrositeHeader/components/Navigation/index.mjs.map +1 -0
  311. package/lib/components/MicrositeHeader/components/SecondLevelMenu/SecondLevelMenu.d.ts +2 -0
  312. package/lib/components/MicrositeHeader/components/SecondLevelMenu/SecondLevelMenu.styles.d.ts +13 -0
  313. package/lib/components/MicrositeHeader/components/SecondLevelMenu/SecondLevelMenu.types.d.ts +11 -0
  314. package/lib/components/MicrositeHeader/components/SecondLevelMenu/index.d.ts +1 -0
  315. package/lib/components/MicrositeHeader/components/SiteMapColumns/SiteMapColumns.d.ts +17 -0
  316. package/lib/components/MicrositeHeader/components/SiteMapColumns/SiteMapColumns.styles.d.ts +13 -0
  317. package/lib/components/MicrositeHeader/components/SiteMapColumns/index.d.ts +1 -0
  318. package/lib/components/MicrositeHeader/index.d.ts +1 -0
  319. package/lib/components/MicrositeHeader/index.js +6 -0
  320. package/lib/components/MicrositeHeader/index.js.map +1 -0
  321. package/lib/components/MicrositeHeader/index.mjs +3 -0
  322. package/lib/components/MicrositeHeader/index.mjs.map +1 -0
  323. package/lib/components/MicrositeSectionWrap/MicrositeSectionWrap.styles.d.ts +1 -1
  324. package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +1 -1
  325. package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.mjs +1 -1
  326. package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.js +1 -1
  327. package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.mjs +2 -2
  328. package/lib/components/MobileModal/MobileModal.js +1 -1
  329. package/lib/components/MobileModal/MobileModal.js.map +1 -1
  330. package/lib/components/MobileModal/MobileModal.mjs +1 -1
  331. package/lib/components/MobileModal/MobileModal.mjs.map +1 -1
  332. package/lib/components/ModelCompareV3/ModelCompareV3.types.d.ts +4 -0
  333. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgMax.jpg.js +5 -5
  334. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgMax.jpg.mjs +2 -2
  335. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgUltra.jpg.js +5 -5
  336. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgUltra.jpg.mjs +2 -2
  337. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.js +5 -5
  338. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.mjs +2 -2
  339. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.js +5 -5
  340. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.mjs +2 -2
  341. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.js +5 -5
  342. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.mjs +2 -2
  343. package/lib/components/ModelCompareV3/assets/Consoles/ucgMax.jpg.js +1 -1
  344. package/lib/components/ModelCompareV3/assets/Consoles/ucgMax.jpg.mjs +2 -2
  345. package/lib/components/ModelCompareV3/assets/Consoles/ucgUltra.jpg.js +1 -1
  346. package/lib/components/ModelCompareV3/assets/Consoles/ucgUltra.jpg.mjs +2 -2
  347. package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.js +1 -1
  348. package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.mjs +2 -2
  349. package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.js +1 -1
  350. package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.mjs +2 -2
  351. package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.js +1 -1
  352. package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.mjs +2 -2
  353. package/lib/components/ModelCompareV3/assets/Switching/industrial.jpg.js +1 -1
  354. package/lib/components/ModelCompareV3/assets/Switching/industrial.jpg.mjs +2 -2
  355. package/lib/{assets/icons/menu/icon-globe.svg.js → components/ModelCompareV3/assets/WiFi/flagship.jpg.js} +6 -6
  356. package/lib/components/ModelCompareV3/assets/WiFi/flagship.jpg.js.map +1 -0
  357. package/lib/components/ModelCompareV3/assets/WiFi/flagship.jpg.mjs +3 -0
  358. package/lib/components/ModelCompareV3/assets/WiFi/flagship.jpg.mjs.map +1 -0
  359. package/lib/components/ModelCompareV3/assets/WiFi/flexible-outdoor.jpg.js +27 -0
  360. package/lib/components/ModelCompareV3/assets/WiFi/flexible-outdoor.jpg.js.map +1 -0
  361. package/lib/components/ModelCompareV3/assets/WiFi/flexible-outdoor.jpg.mjs +3 -0
  362. package/lib/components/ModelCompareV3/assets/WiFi/flexible-outdoor.jpg.mjs.map +1 -0
  363. package/lib/components/ModelCompareV3/assets/WiFi/mega-capacity.jpg.js +27 -0
  364. package/lib/components/ModelCompareV3/assets/WiFi/mega-capacity.jpg.js.map +1 -0
  365. package/lib/components/ModelCompareV3/assets/WiFi/mega-capacity.jpg.mjs +3 -0
  366. package/lib/components/ModelCompareV3/assets/WiFi/mega-capacity.jpg.mjs.map +1 -0
  367. package/lib/components/ModelCompareV3/assets/WiFi/wall.jpg.js +27 -0
  368. package/lib/components/ModelCompareV3/assets/WiFi/wall.jpg.js.map +1 -0
  369. package/lib/components/ModelCompareV3/assets/WiFi/wall.jpg.mjs +3 -0
  370. package/lib/components/ModelCompareV3/assets/WiFi/wall.jpg.mjs.map +1 -0
  371. package/lib/components/ModelCompareV3/data/CloudGateways.js +15 -15
  372. package/lib/components/ModelCompareV3/data/CloudGateways.mjs +10 -10
  373. package/lib/components/ModelCompareV3/data/WiFi.d.ts +2 -0
  374. package/lib/components/ModelCompareV3/data/WiFi.js +23 -0
  375. package/lib/components/ModelCompareV3/data/WiFi.js.map +1 -0
  376. package/lib/components/ModelCompareV3/data/WiFi.mjs +21 -0
  377. package/lib/components/ModelCompareV3/data/WiFi.mjs.map +1 -0
  378. package/lib/components/ModelCompareV3/data/index.d.ts +18 -17
  379. package/lib/components/ModelCompareV3/data/index.js +37 -34
  380. package/lib/components/ModelCompareV3/data/index.js.map +1 -1
  381. package/lib/components/ModelCompareV3/data/index.mjs +37 -34
  382. package/lib/components/ModelCompareV3/data/index.mjs.map +1 -1
  383. package/lib/components/ModelCompareV3/data/products/industrial.js +1 -1
  384. package/lib/components/ModelCompareV3/data/products/industrial.mjs +1 -1
  385. package/lib/components/ModelCompareV3/data/products/ucgMax.js +1 -1
  386. package/lib/components/ModelCompareV3/data/products/ucgMax.mjs +1 -1
  387. package/lib/components/ModelCompareV3/data/products/ucgUltra.js +1 -1
  388. package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs +1 -1
  389. package/lib/components/ModelCompareV3/data/products/udmPro.js +1 -1
  390. package/lib/components/ModelCompareV3/data/products/udmPro.mjs +1 -1
  391. package/lib/components/ModelCompareV3/data/products/udmProMax.js +1 -1
  392. package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +1 -1
  393. package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +1 -1
  394. package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +1 -1
  395. package/lib/components/ModelCompareV3/data/products/udw.js +1 -0
  396. package/lib/components/ModelCompareV3/data/products/udw.js.map +1 -1
  397. package/lib/components/ModelCompareV3/data/products/udw.mjs +1 -0
  398. package/lib/components/ModelCompareV3/data/products/udw.mjs.map +1 -1
  399. package/lib/components/ModelCompareV3/data/products/wifiFlagship.d.ts +2 -0
  400. package/lib/components/ModelCompareV3/data/products/wifiFlagship.js +70 -0
  401. package/lib/components/ModelCompareV3/data/products/wifiFlagship.js.map +1 -0
  402. package/lib/components/ModelCompareV3/data/products/wifiFlagship.mjs +62 -0
  403. package/lib/components/ModelCompareV3/data/products/wifiFlagship.mjs.map +1 -0
  404. package/lib/components/ModelCompareV3/data/products/wifiFlexibleOutdoor.d.ts +2 -0
  405. package/lib/components/ModelCompareV3/data/products/wifiFlexibleOutdoor.js +73 -0
  406. package/lib/components/ModelCompareV3/data/products/wifiFlexibleOutdoor.js.map +1 -0
  407. package/lib/components/ModelCompareV3/data/products/wifiFlexibleOutdoor.mjs +65 -0
  408. package/lib/components/ModelCompareV3/data/products/wifiFlexibleOutdoor.mjs.map +1 -0
  409. package/lib/components/ModelCompareV3/data/products/wifiMegaCapacity.d.ts +2 -0
  410. package/lib/components/ModelCompareV3/data/products/wifiMegaCapacity.js +73 -0
  411. package/lib/components/ModelCompareV3/data/products/wifiMegaCapacity.js.map +1 -0
  412. package/lib/components/ModelCompareV3/data/products/wifiMegaCapacity.mjs +65 -0
  413. package/lib/components/ModelCompareV3/data/products/wifiMegaCapacity.mjs.map +1 -0
  414. package/lib/components/ModelCompareV3/data/products/wifiWall.d.ts +2 -0
  415. package/lib/components/ModelCompareV3/data/products/wifiWall.js +74 -0
  416. package/lib/components/ModelCompareV3/data/products/wifiWall.js.map +1 -0
  417. package/lib/components/ModelCompareV3/data/products/wifiWall.mjs +66 -0
  418. package/lib/components/ModelCompareV3/data/products/wifiWall.mjs.map +1 -0
  419. package/lib/components/ModelCompareV3/translations/en.json.js +60 -7
  420. package/lib/components/ModelCompareV3/translations/en.json.js.map +1 -1
  421. package/lib/components/ModelCompareV3/translations/en.json.mjs +60 -7
  422. package/lib/components/ModelCompareV3/translations/en.json.mjs.map +1 -1
  423. package/lib/components/ModelCompareV3/translations/useModelCompareTranslation.d.ts +2 -2
  424. package/lib/components/ProductCardPopup/ProductCardPopup.styles.d.ts +1 -1
  425. package/lib/components/ProductGrid/ProductGrid.styles.d.ts +1 -1
  426. package/lib/components/ProductRecommendedAccessories/ProductRecommendedAccessories.styles.d.ts +3 -3
  427. package/lib/components/ProductSectionNavigation/ProductSectionNavigation.styles.d.ts +1 -1
  428. package/lib/components/ProductSectionNavigationV2/ProductSectionNavigation.styles.d.ts +1 -1
  429. package/lib/components/ProductTechSpecs/ProductTechSpecs.styles.d.ts +1 -1
  430. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js +313 -17
  431. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js.map +1 -1
  432. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs +311 -17
  433. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs.map +1 -1
  434. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.d.ts +3 -2
  435. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.js +2 -0
  436. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.js.map +1 -1
  437. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.mjs +2 -0
  438. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.mjs.map +1 -1
  439. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.js +120 -34
  440. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.js.map +1 -1
  441. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.mjs +120 -34
  442. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.mjs.map +1 -1
  443. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.d.ts +16 -2
  444. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.js +54 -12
  445. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.js.map +1 -1
  446. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.mjs +50 -11
  447. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.mjs.map +1 -1
  448. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/assets/ArrowLeftPrimary.svg.js +5 -5
  449. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/assets/ArrowRightPrimary.svg.js +5 -5
  450. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +1 -1
  451. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js.map +1 -1
  452. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
  453. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs.map +1 -1
  454. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.js +2 -0
  455. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.js.map +1 -1
  456. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.mjs +2 -0
  457. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.mjs.map +1 -1
  458. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.js +2 -2
  459. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.mjs +2 -2
  460. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.js +1 -1
  461. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.mjs +2 -2
  462. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/plus.svg.js +1 -1
  463. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/plus.svg.mjs +2 -2
  464. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.js +1 -1
  465. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.js.map +1 -1
  466. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.mjs +1 -1
  467. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.mjs.map +1 -1
  468. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js +4 -4
  469. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js.map +1 -1
  470. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs +4 -4
  471. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs.map +1 -1
  472. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.js +1 -1
  473. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.mjs +2 -2
  474. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/plus.svg.js +1 -1
  475. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/plus.svg.mjs +2 -2
  476. package/lib/components/ResourceCalculatorV1/ResourceCalculator.js +1 -2
  477. package/lib/components/ResourceCalculatorV1/ResourceCalculator.js.map +1 -1
  478. package/lib/components/ResourceCalculatorV1/ResourceCalculator.mjs +1 -2
  479. package/lib/components/ResourceCalculatorV1/ResourceCalculator.mjs.map +1 -1
  480. package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.js +27 -0
  481. package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.js.map +1 -0
  482. package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.mjs +3 -0
  483. package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.mjs.map +1 -0
  484. package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.js +27 -0
  485. package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.js.map +1 -0
  486. package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.mjs +3 -0
  487. package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.mjs.map +1 -0
  488. package/lib/components/ResourceCalculatorV1/translations/en.json.js +6 -4
  489. package/lib/components/ResourceCalculatorV1/translations/en.json.js.map +1 -1
  490. package/lib/components/ResourceCalculatorV1/translations/en.json.mjs +6 -4
  491. package/lib/components/ResourceCalculatorV1/translations/en.json.mjs.map +1 -1
  492. package/lib/components/ResourceCalculatorV1/translations/useResourceCalculatorTranslation.d.ts +2 -2
  493. package/lib/components/Tooltip/Tooltip.styles.d.ts +5 -5
  494. package/lib/components/VariantSelectorV1/VariantSelector.styles.d.ts +3 -3
  495. package/lib/components/VariantSelectorV2/VariantSelector.styles.d.ts +3 -3
  496. package/lib/components/VideoPlayerNew/VideoPlayer.js +1 -1
  497. package/lib/components/VideoPlayerNew/VideoPlayer.mjs +1 -1
  498. package/lib/components/VideoPlayerNew/assets/pause.svg.js +1 -1
  499. package/lib/components/VideoPlayerNew/assets/pause.svg.mjs +2 -2
  500. package/lib/components/index.d.ts +2 -0
  501. package/lib/components/index.js +34 -30
  502. package/lib/components/index.js.map +1 -1
  503. package/lib/components/index.mjs +34 -30
  504. package/lib/components/index.mjs.map +1 -1
  505. package/lib/constants/icons/generic/carouselArrowRight.svg.js +5 -5
  506. package/lib/constants/icons/generic/index.js +3 -3
  507. package/lib/constants/icons/header/account.svg.js +5 -5
  508. package/lib/constants/icons/header/globe.svg.js +5 -5
  509. package/lib/constants/icons/header/index.js +9 -9
  510. package/lib/constants/icons/header/logoUnifi.svg.js +5 -5
  511. package/lib/constants/icons/menu/consolidatedSpecialDevices.svg.js +27 -0
  512. package/lib/constants/icons/menu/consolidatedSpecialDevices.svg.js.map +1 -0
  513. package/lib/constants/icons/menu/consolidatedSpecialDevices.svg.mjs +3 -0
  514. package/lib/constants/icons/menu/consolidatedSpecialDevices.svg.mjs.map +1 -0
  515. package/lib/constants/icons/menu/doorAccess.svg.js +27 -0
  516. package/lib/constants/icons/menu/doorAccess.svg.js.map +1 -0
  517. package/lib/constants/icons/menu/doorAccess.svg.mjs +3 -0
  518. package/lib/constants/icons/menu/doorAccess.svg.mjs.map +1 -0
  519. package/lib/constants/icons/menu/index.d.ts +3 -0
  520. package/lib/constants/icons/menu/index.js +27 -0
  521. package/lib/constants/icons/menu/index.js.map +1 -1
  522. package/lib/constants/icons/menu/index.mjs +6 -0
  523. package/lib/constants/icons/menu/index.mjs.map +1 -1
  524. package/lib/constants/icons/menu/overview.svg.js +27 -0
  525. package/lib/constants/icons/menu/overview.svg.js.map +1 -0
  526. package/lib/constants/icons/menu/overview.svg.mjs +3 -0
  527. package/lib/constants/icons/menu/overview.svg.mjs.map +1 -0
  528. package/lib/constants/proStoreCategories/mapping/index.d.ts +1 -0
  529. package/lib/constants/proStoreCategories/mapping/index.js +54 -49
  530. package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
  531. package/lib/constants/proStoreCategories/mapping/index.mjs +54 -49
  532. package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
  533. package/lib/constants/proStoreCategories/mapping/unifi.d.ts +2 -1
  534. package/lib/constants/proStoreCategories/mapping/unifi.js +1 -0
  535. package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
  536. package/lib/constants/proStoreCategories/mapping/unifi.mjs +1 -0
  537. package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
  538. package/lib/constants/proStoreCategories/translations/en.json.js +3 -0
  539. package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
  540. package/lib/constants/proStoreCategories/translations/en.json.mjs +3 -1
  541. package/lib/constants/proStoreCategories/translations/en.json.mjs.map +1 -1
  542. package/lib/constants/proStoreCategories/translations/fr.json.js +1 -1
  543. package/lib/constants/proStoreCategories/translations/fr.json.mjs +1 -1
  544. package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +1 -1
  545. package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +1 -1
  546. package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +1 -1
  547. package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +1 -1
  548. package/lib/constants/theme.js +4 -0
  549. package/lib/constants/theme.js.map +1 -1
  550. package/lib/constants/theme.mjs +4 -0
  551. package/lib/constants/theme.mjs.map +1 -1
  552. package/lib/contexts/MenuContext/context.js +1 -1
  553. package/lib/contexts/MenuContext/context.js.map +1 -1
  554. package/lib/contexts/MenuContext/context.mjs +1 -1
  555. package/lib/contexts/MenuContext/context.mjs.map +1 -1
  556. package/lib/contexts/MenuContext/types.js.map +1 -1
  557. package/lib/contexts/MenuContext/types.mjs.map +1 -1
  558. package/lib/contexts/MenuContext/utils.d.ts +6 -1
  559. package/lib/contexts/MenuContext/utils.js +16 -0
  560. package/lib/contexts/MenuContext/utils.js.map +1 -1
  561. package/lib/contexts/MenuContext/utils.mjs +16 -1
  562. package/lib/contexts/MenuContext/utils.mjs.map +1 -1
  563. package/lib/contexts/MicrositeMenuContext/assets/aggregation.png.js +27 -0
  564. package/lib/contexts/MicrositeMenuContext/assets/aggregation.png.js.map +1 -0
  565. package/lib/contexts/MicrositeMenuContext/assets/aggregation.png.mjs +3 -0
  566. package/lib/contexts/MicrositeMenuContext/assets/aggregation.png.mjs.map +1 -0
  567. package/lib/contexts/MicrositeMenuContext/assets/bullet.png.js +27 -0
  568. package/lib/contexts/MicrositeMenuContext/assets/bullet.png.js.map +1 -0
  569. package/lib/contexts/MicrositeMenuContext/assets/bullet.png.mjs +3 -0
  570. package/lib/contexts/MicrositeMenuContext/assets/bullet.png.mjs.map +1 -0
  571. package/lib/contexts/MicrositeMenuContext/assets/camera-special-devices.png.js +27 -0
  572. package/lib/contexts/MicrositeMenuContext/assets/camera-special-devices.png.js.map +1 -0
  573. package/lib/contexts/MicrositeMenuContext/assets/camera-special-devices.png.mjs +3 -0
  574. package/lib/contexts/MicrositeMenuContext/assets/camera-special-devices.png.mjs.map +1 -0
  575. package/lib/contexts/MicrositeMenuContext/assets/cloud-gateway-overview.png.js +27 -0
  576. package/lib/contexts/MicrositeMenuContext/assets/cloud-gateway-overview.png.js.map +1 -0
  577. package/lib/contexts/MicrositeMenuContext/assets/cloud-gateway-overview.png.mjs +3 -0
  578. package/lib/contexts/MicrositeMenuContext/assets/cloud-gateway-overview.png.mjs.map +1 -0
  579. package/lib/contexts/MicrositeMenuContext/assets/compact-switching.png.js +27 -0
  580. package/lib/contexts/MicrositeMenuContext/assets/compact-switching.png.js.map +1 -0
  581. package/lib/contexts/MicrositeMenuContext/assets/compact-switching.png.mjs +3 -0
  582. package/lib/contexts/MicrositeMenuContext/assets/compact-switching.png.mjs.map +1 -0
  583. package/lib/contexts/MicrositeMenuContext/assets/compact.png.js +27 -0
  584. package/lib/contexts/MicrositeMenuContext/assets/compact.png.js.map +1 -0
  585. package/lib/contexts/MicrositeMenuContext/assets/compact.png.mjs +3 -0
  586. package/lib/contexts/MicrositeMenuContext/assets/compact.png.mjs.map +1 -0
  587. package/lib/contexts/MicrositeMenuContext/assets/digital-signage.png.js +27 -0
  588. package/lib/contexts/MicrositeMenuContext/assets/digital-signage.png.js.map +1 -0
  589. package/lib/contexts/MicrositeMenuContext/assets/digital-signage.png.mjs +3 -0
  590. package/lib/contexts/MicrositeMenuContext/assets/digital-signage.png.mjs.map +1 -0
  591. package/lib/contexts/MicrositeMenuContext/assets/dome-turret.png.js +27 -0
  592. package/lib/contexts/MicrositeMenuContext/assets/dome-turret.png.js.map +1 -0
  593. package/lib/contexts/MicrositeMenuContext/assets/dome-turret.png.mjs +3 -0
  594. package/lib/contexts/MicrositeMenuContext/assets/dome-turret.png.mjs.map +1 -0
  595. package/lib/contexts/MicrositeMenuContext/assets/door-access.png.js +27 -0
  596. package/lib/contexts/MicrositeMenuContext/assets/door-access.png.js.map +1 -0
  597. package/lib/contexts/MicrositeMenuContext/assets/door-access.png.mjs +3 -0
  598. package/lib/contexts/MicrositeMenuContext/assets/door-access.png.mjs.map +1 -0
  599. package/lib/contexts/MicrositeMenuContext/assets/education.jpg.js +27 -0
  600. package/lib/contexts/MicrositeMenuContext/assets/education.jpg.js.map +1 -0
  601. package/lib/contexts/MicrositeMenuContext/assets/education.jpg.mjs +3 -0
  602. package/lib/contexts/MicrositeMenuContext/assets/education.jpg.mjs.map +1 -0
  603. package/lib/contexts/MicrositeMenuContext/assets/enterprise-scale.png.js +27 -0
  604. package/lib/contexts/MicrositeMenuContext/assets/enterprise-scale.png.js.map +1 -0
  605. package/lib/contexts/MicrositeMenuContext/assets/enterprise-scale.png.mjs +3 -0
  606. package/lib/contexts/MicrositeMenuContext/assets/enterprise-scale.png.mjs.map +1 -0
  607. package/lib/contexts/MicrositeMenuContext/assets/enterprise.jpg.js +27 -0
  608. package/lib/contexts/MicrositeMenuContext/assets/enterprise.jpg.js.map +1 -0
  609. package/lib/contexts/MicrositeMenuContext/assets/enterprise.jpg.mjs +3 -0
  610. package/lib/contexts/MicrositeMenuContext/assets/enterprise.jpg.mjs.map +1 -0
  611. package/lib/contexts/MicrositeMenuContext/assets/ev-charging.png.js +27 -0
  612. package/lib/contexts/MicrositeMenuContext/assets/ev-charging.png.js.map +1 -0
  613. package/lib/contexts/MicrositeMenuContext/assets/ev-charging.png.mjs +3 -0
  614. package/lib/contexts/MicrositeMenuContext/assets/ev-charging.png.mjs.map +1 -0
  615. package/lib/contexts/MicrositeMenuContext/assets/gbe-1u-2.5and10.png.js +27 -0
  616. package/lib/contexts/MicrositeMenuContext/assets/gbe-1u-2.5and10.png.js.map +1 -0
  617. package/lib/contexts/MicrositeMenuContext/assets/gbe-1u-2.5and10.png.mjs +3 -0
  618. package/lib/contexts/MicrositeMenuContext/assets/gbe-1u-2.5and10.png.mjs.map +1 -0
  619. package/lib/contexts/MicrositeMenuContext/assets/gbe-1u.png.js +27 -0
  620. package/lib/contexts/MicrositeMenuContext/assets/gbe-1u.png.js.map +1 -0
  621. package/lib/contexts/MicrositeMenuContext/assets/gbe-1u.png.mjs +3 -0
  622. package/lib/contexts/MicrositeMenuContext/assets/gbe-1u.png.mjs.map +1 -0
  623. package/lib/contexts/MicrositeMenuContext/assets/hospitality.jpg.js +27 -0
  624. package/lib/contexts/MicrositeMenuContext/assets/hospitality.jpg.js.map +1 -0
  625. package/lib/contexts/MicrositeMenuContext/assets/hospitality.jpg.mjs +3 -0
  626. package/lib/contexts/MicrositeMenuContext/assets/hospitality.jpg.mjs.map +1 -0
  627. package/lib/contexts/MicrositeMenuContext/assets/how-it-works.jpg.js +27 -0
  628. package/lib/contexts/MicrositeMenuContext/assets/how-it-works.jpg.js.map +1 -0
  629. package/lib/contexts/MicrositeMenuContext/assets/how-it-works.jpg.mjs +3 -0
  630. package/lib/contexts/MicrositeMenuContext/assets/how-it-works.jpg.mjs.map +1 -0
  631. package/lib/contexts/MicrositeMenuContext/assets/index.d.ts +41 -0
  632. package/lib/contexts/MicrositeMenuContext/assets/index.js +45 -0
  633. package/lib/contexts/MicrositeMenuContext/assets/index.js.map +1 -0
  634. package/lib/contexts/MicrositeMenuContext/assets/index.mjs +43 -0
  635. package/lib/contexts/MicrositeMenuContext/assets/index.mjs.map +1 -0
  636. package/lib/contexts/MicrositeMenuContext/assets/industrial.jpg.js +27 -0
  637. package/lib/contexts/MicrositeMenuContext/assets/industrial.jpg.js.map +1 -0
  638. package/lib/contexts/MicrositeMenuContext/assets/industrial.jpg.mjs +3 -0
  639. package/lib/contexts/MicrositeMenuContext/assets/industrial.jpg.mjs.map +1 -0
  640. package/lib/contexts/MicrositeMenuContext/assets/large-scale.png.js +27 -0
  641. package/lib/contexts/MicrositeMenuContext/assets/large-scale.png.js.map +1 -0
  642. package/lib/contexts/MicrositeMenuContext/assets/large-scale.png.mjs +3 -0
  643. package/lib/contexts/MicrositeMenuContext/assets/large-scale.png.mjs.map +1 -0
  644. package/lib/contexts/MicrositeMenuContext/assets/managed-voip.png.js +27 -0
  645. package/lib/contexts/MicrositeMenuContext/assets/managed-voip.png.js.map +1 -0
  646. package/lib/contexts/MicrositeMenuContext/assets/managed-voip.png.mjs +3 -0
  647. package/lib/contexts/MicrositeMenuContext/assets/managed-voip.png.mjs.map +1 -0
  648. package/lib/contexts/MicrositeMenuContext/assets/mobile-routing.png.js +27 -0
  649. package/lib/contexts/MicrositeMenuContext/assets/mobile-routing.png.js.map +1 -0
  650. package/lib/contexts/MicrositeMenuContext/assets/mobile-routing.png.mjs +3 -0
  651. package/lib/contexts/MicrositeMenuContext/assets/mobile-routing.png.mjs.map +1 -0
  652. package/lib/contexts/MicrositeMenuContext/assets/nextai-camera.jpg.js +27 -0
  653. package/lib/contexts/MicrositeMenuContext/assets/nextai-camera.jpg.js.map +1 -0
  654. package/lib/contexts/MicrositeMenuContext/assets/nextai-camera.jpg.mjs +3 -0
  655. package/lib/contexts/MicrositeMenuContext/assets/nextai-camera.jpg.mjs.map +1 -0
  656. package/lib/contexts/MicrositeMenuContext/assets/nextai-cyber.jpg.js +27 -0
  657. package/lib/contexts/MicrositeMenuContext/assets/nextai-cyber.jpg.js.map +1 -0
  658. package/lib/contexts/MicrositeMenuContext/assets/nextai-cyber.jpg.mjs +3 -0
  659. package/lib/contexts/MicrositeMenuContext/assets/nextai-cyber.jpg.mjs.map +1 -0
  660. package/lib/contexts/MicrositeMenuContext/assets/premium-audio.png.js +27 -0
  661. package/lib/contexts/MicrositeMenuContext/assets/premium-audio.png.js.map +1 -0
  662. package/lib/contexts/MicrositeMenuContext/assets/premium-audio.png.mjs +3 -0
  663. package/lib/contexts/MicrositeMenuContext/assets/premium-audio.png.mjs.map +1 -0
  664. package/lib/contexts/MicrositeMenuContext/assets/ptz.png.js +27 -0
  665. package/lib/contexts/MicrositeMenuContext/assets/ptz.png.js.map +1 -0
  666. package/lib/contexts/MicrositeMenuContext/assets/ptz.png.mjs +3 -0
  667. package/lib/contexts/MicrositeMenuContext/assets/ptz.png.mjs.map +1 -0
  668. package/lib/contexts/MicrositeMenuContext/assets/retail.jpg.js +27 -0
  669. package/lib/contexts/MicrositeMenuContext/assets/retail.jpg.js.map +1 -0
  670. package/lib/contexts/MicrositeMenuContext/assets/retail.jpg.mjs +3 -0
  671. package/lib/contexts/MicrositeMenuContext/assets/retail.jpg.mjs.map +1 -0
  672. package/lib/contexts/MicrositeMenuContext/assets/sd-wan-sase.jpg.js +27 -0
  673. package/lib/contexts/MicrositeMenuContext/assets/sd-wan-sase.jpg.js.map +1 -0
  674. package/lib/contexts/MicrositeMenuContext/assets/sd-wan-sase.jpg.mjs +3 -0
  675. package/lib/contexts/MicrositeMenuContext/assets/sd-wan-sase.jpg.mjs.map +1 -0
  676. package/lib/contexts/MicrositeMenuContext/assets/security-overview.png.js +27 -0
  677. package/lib/contexts/MicrositeMenuContext/assets/security-overview.png.js.map +1 -0
  678. package/lib/contexts/MicrositeMenuContext/assets/security-overview.png.mjs +3 -0
  679. package/lib/contexts/MicrositeMenuContext/assets/security-overview.png.mjs.map +1 -0
  680. package/lib/contexts/MicrositeMenuContext/assets/site-manager.jpg.js +27 -0
  681. package/lib/contexts/MicrositeMenuContext/assets/site-manager.jpg.js.map +1 -0
  682. package/lib/contexts/MicrositeMenuContext/assets/site-manager.jpg.mjs +3 -0
  683. package/lib/contexts/MicrositeMenuContext/assets/site-manager.jpg.mjs.map +1 -0
  684. package/lib/contexts/MicrositeMenuContext/assets/stadium.jpg.js +27 -0
  685. package/lib/contexts/MicrositeMenuContext/assets/stadium.jpg.js.map +1 -0
  686. package/lib/contexts/MicrositeMenuContext/assets/stadium.jpg.mjs +3 -0
  687. package/lib/contexts/MicrositeMenuContext/assets/stadium.jpg.mjs.map +1 -0
  688. package/lib/contexts/MicrositeMenuContext/assets/switching-overview.png.js +27 -0
  689. package/lib/contexts/MicrositeMenuContext/assets/switching-overview.png.js.map +1 -0
  690. package/lib/contexts/MicrositeMenuContext/assets/switching-overview.png.mjs +3 -0
  691. package/lib/contexts/MicrositeMenuContext/assets/switching-overview.png.mjs.map +1 -0
  692. package/lib/contexts/MicrositeMenuContext/assets/tco-calculator.jpg.js +27 -0
  693. package/lib/contexts/MicrositeMenuContext/assets/tco-calculator.jpg.js.map +1 -0
  694. package/lib/contexts/MicrositeMenuContext/assets/tco-calculator.jpg.mjs +3 -0
  695. package/lib/contexts/MicrositeMenuContext/assets/tco-calculator.jpg.mjs.map +1 -0
  696. package/lib/contexts/MicrositeMenuContext/assets/unifi-drive.png.js +27 -0
  697. package/lib/contexts/MicrositeMenuContext/assets/unifi-drive.png.js.map +1 -0
  698. package/lib/contexts/MicrositeMenuContext/assets/unifi-drive.png.mjs +3 -0
  699. package/lib/contexts/MicrositeMenuContext/assets/unifi-drive.png.mjs.map +1 -0
  700. package/lib/contexts/MicrositeMenuContext/assets/video-recorders.png.js +27 -0
  701. package/lib/contexts/MicrositeMenuContext/assets/video-recorders.png.js.map +1 -0
  702. package/lib/contexts/MicrositeMenuContext/assets/video-recorders.png.mjs +3 -0
  703. package/lib/contexts/MicrositeMenuContext/assets/video-recorders.png.mjs.map +1 -0
  704. package/lib/contexts/MicrositeMenuContext/assets/wifi-bridging.png.js +27 -0
  705. package/lib/contexts/MicrositeMenuContext/assets/wifi-bridging.png.js.map +1 -0
  706. package/lib/contexts/MicrositeMenuContext/assets/wifi-bridging.png.mjs +3 -0
  707. package/lib/contexts/MicrositeMenuContext/assets/wifi-bridging.png.mjs.map +1 -0
  708. package/lib/contexts/MicrositeMenuContext/assets/wifi-flagship.png.js +27 -0
  709. package/lib/contexts/MicrositeMenuContext/assets/wifi-flagship.png.js.map +1 -0
  710. package/lib/contexts/MicrositeMenuContext/assets/wifi-flagship.png.mjs +3 -0
  711. package/lib/contexts/MicrositeMenuContext/assets/wifi-flagship.png.mjs.map +1 -0
  712. package/lib/contexts/MicrositeMenuContext/assets/wifi-integrated.png.js +27 -0
  713. package/lib/contexts/MicrositeMenuContext/assets/wifi-integrated.png.js.map +1 -0
  714. package/lib/contexts/MicrositeMenuContext/assets/wifi-integrated.png.mjs +3 -0
  715. package/lib/contexts/MicrositeMenuContext/assets/wifi-integrated.png.mjs.map +1 -0
  716. package/lib/contexts/MicrositeMenuContext/assets/wifi-mega-capacity.png.js +27 -0
  717. package/lib/contexts/MicrositeMenuContext/assets/wifi-mega-capacity.png.js.map +1 -0
  718. package/lib/contexts/MicrositeMenuContext/assets/wifi-mega-capacity.png.mjs +3 -0
  719. package/lib/contexts/MicrositeMenuContext/assets/wifi-mega-capacity.png.mjs.map +1 -0
  720. package/lib/contexts/MicrositeMenuContext/assets/wifi-outdoor.png.js +27 -0
  721. package/lib/contexts/MicrositeMenuContext/assets/wifi-outdoor.png.js.map +1 -0
  722. package/lib/contexts/MicrositeMenuContext/assets/wifi-outdoor.png.mjs +3 -0
  723. package/lib/contexts/MicrositeMenuContext/assets/wifi-outdoor.png.mjs.map +1 -0
  724. package/lib/contexts/MicrositeMenuContext/assets/wifi-overview.png.js +27 -0
  725. package/lib/contexts/MicrositeMenuContext/assets/wifi-overview.png.js.map +1 -0
  726. package/lib/contexts/MicrositeMenuContext/assets/wifi-overview.png.mjs +3 -0
  727. package/lib/contexts/MicrositeMenuContext/assets/wifi-overview.png.mjs.map +1 -0
  728. package/lib/contexts/MicrositeMenuContext/assets/wifi-wall.png.js +27 -0
  729. package/lib/contexts/MicrositeMenuContext/assets/wifi-wall.png.js.map +1 -0
  730. package/lib/contexts/MicrositeMenuContext/assets/wifi-wall.png.mjs +3 -0
  731. package/lib/contexts/MicrositeMenuContext/assets/wifi-wall.png.mjs.map +1 -0
  732. package/lib/contexts/MicrositeMenuContext/context.d.ts +36 -0
  733. package/lib/contexts/MicrositeMenuContext/context.js +100 -0
  734. package/lib/contexts/MicrositeMenuContext/context.js.map +1 -0
  735. package/lib/contexts/MicrositeMenuContext/context.mjs +96 -0
  736. package/lib/contexts/MicrositeMenuContext/context.mjs.map +1 -0
  737. package/lib/contexts/MicrositeMenuContext/index.d.ts +1 -0
  738. package/lib/contexts/MicrositeMenuContext/index.js +8 -0
  739. package/lib/contexts/MicrositeMenuContext/index.js.map +1 -0
  740. package/lib/contexts/MicrositeMenuContext/index.mjs +3 -0
  741. package/lib/contexts/MicrositeMenuContext/index.mjs.map +1 -0
  742. package/lib/contexts/MicrositeMenuContext/mapping.d.ts +16 -0
  743. package/lib/contexts/MicrositeMenuContext/mapping.js +781 -0
  744. package/lib/contexts/MicrositeMenuContext/mapping.js.map +1 -0
  745. package/lib/contexts/MicrositeMenuContext/mapping.mjs +705 -0
  746. package/lib/contexts/MicrositeMenuContext/mapping.mjs.map +1 -0
  747. package/lib/contexts/MicrositeMenuContext/translations/ar.json.js +8 -0
  748. package/lib/contexts/MicrositeMenuContext/translations/ar.json.js.map +1 -0
  749. package/lib/contexts/MicrositeMenuContext/translations/ar.json.mjs +3 -0
  750. package/lib/contexts/MicrositeMenuContext/translations/ar.json.mjs.map +1 -0
  751. package/lib/contexts/MicrositeMenuContext/translations/de.json.js +8 -0
  752. package/lib/contexts/MicrositeMenuContext/translations/de.json.js.map +1 -0
  753. package/lib/contexts/MicrositeMenuContext/translations/de.json.mjs +3 -0
  754. package/lib/contexts/MicrositeMenuContext/translations/de.json.mjs.map +1 -0
  755. package/lib/contexts/MicrositeMenuContext/translations/el.json.js +8 -0
  756. package/lib/contexts/MicrositeMenuContext/translations/el.json.js.map +1 -0
  757. package/lib/contexts/MicrositeMenuContext/translations/el.json.mjs +3 -0
  758. package/lib/contexts/MicrositeMenuContext/translations/el.json.mjs.map +1 -0
  759. package/lib/contexts/MicrositeMenuContext/translations/en.json.js +128 -0
  760. package/lib/contexts/MicrositeMenuContext/translations/en.json.js.map +1 -0
  761. package/lib/contexts/MicrositeMenuContext/translations/en.json.mjs +123 -0
  762. package/lib/contexts/MicrositeMenuContext/translations/en.json.mjs.map +1 -0
  763. package/lib/contexts/MicrositeMenuContext/translations/es.json.js +8 -0
  764. package/lib/contexts/MicrositeMenuContext/translations/es.json.js.map +1 -0
  765. package/lib/contexts/MicrositeMenuContext/translations/es.json.mjs +3 -0
  766. package/lib/contexts/MicrositeMenuContext/translations/es.json.mjs.map +1 -0
  767. package/lib/contexts/MicrositeMenuContext/translations/fr.json.js +8 -0
  768. package/lib/contexts/MicrositeMenuContext/translations/fr.json.js.map +1 -0
  769. package/lib/contexts/MicrositeMenuContext/translations/fr.json.mjs +3 -0
  770. package/lib/contexts/MicrositeMenuContext/translations/fr.json.mjs.map +1 -0
  771. package/lib/contexts/MicrositeMenuContext/translations/it.json.js +8 -0
  772. package/lib/contexts/MicrositeMenuContext/translations/it.json.js.map +1 -0
  773. package/lib/contexts/MicrositeMenuContext/translations/it.json.mjs +3 -0
  774. package/lib/contexts/MicrositeMenuContext/translations/it.json.mjs.map +1 -0
  775. package/lib/contexts/MicrositeMenuContext/translations/ja.json.js +8 -0
  776. package/lib/contexts/MicrositeMenuContext/translations/ja.json.js.map +1 -0
  777. package/lib/contexts/MicrositeMenuContext/translations/ja.json.mjs +3 -0
  778. package/lib/contexts/MicrositeMenuContext/translations/ja.json.mjs.map +1 -0
  779. package/lib/contexts/MicrositeMenuContext/translations/pt-BR.json.js +8 -0
  780. package/lib/contexts/MicrositeMenuContext/translations/pt-BR.json.js.map +1 -0
  781. package/lib/contexts/MicrositeMenuContext/translations/pt-BR.json.mjs +3 -0
  782. package/lib/contexts/MicrositeMenuContext/translations/pt-BR.json.mjs.map +1 -0
  783. package/lib/contexts/MicrositeMenuContext/translations/zh-Hans.json.js +8 -0
  784. package/lib/contexts/MicrositeMenuContext/translations/zh-Hans.json.js.map +1 -0
  785. package/lib/contexts/MicrositeMenuContext/translations/zh-Hans.json.mjs +3 -0
  786. package/lib/contexts/MicrositeMenuContext/translations/zh-Hans.json.mjs.map +1 -0
  787. package/lib/contexts/MicrositeMenuContext/translations/zh-Hant-TW.json.js +8 -0
  788. package/lib/contexts/MicrositeMenuContext/translations/zh-Hant-TW.json.js.map +1 -0
  789. package/lib/contexts/MicrositeMenuContext/translations/zh-Hant-TW.json.mjs +3 -0
  790. package/lib/contexts/MicrositeMenuContext/translations/zh-Hant-TW.json.mjs.map +1 -0
  791. package/lib/contexts/MicrositeMenuContext/translations.d.ts +7 -0
  792. package/lib/contexts/MicrositeMenuContext/translations.js +47 -0
  793. package/lib/contexts/MicrositeMenuContext/translations.js.map +1 -0
  794. package/lib/contexts/MicrositeMenuContext/translations.mjs +25 -0
  795. package/lib/contexts/MicrositeMenuContext/translations.mjs.map +1 -0
  796. package/lib/contexts/MicrositeMenuContext/types.d.ts +101 -0
  797. package/lib/contexts/MicrositeMenuContext/types.js +16 -0
  798. package/lib/contexts/MicrositeMenuContext/types.js.map +1 -0
  799. package/lib/contexts/MicrositeMenuContext/types.mjs +15 -0
  800. package/lib/contexts/MicrositeMenuContext/types.mjs.map +1 -0
  801. package/lib/contexts/index.d.ts +1 -0
  802. package/lib/contexts/index.js +2 -0
  803. package/lib/contexts/index.js.map +1 -1
  804. package/lib/contexts/index.mjs +2 -0
  805. package/lib/contexts/index.mjs.map +1 -1
  806. package/lib/helpers/index.d.ts +1 -0
  807. package/lib/helpers/index.js +11 -0
  808. package/lib/helpers/index.js.map +1 -1
  809. package/lib/helpers/index.mjs +1 -0
  810. package/lib/helpers/index.mjs.map +1 -1
  811. package/lib/helpers/product.d.ts +87 -0
  812. package/lib/helpers/product.js +346 -0
  813. package/lib/helpers/product.js.map +1 -0
  814. package/lib/helpers/product.mjs +335 -0
  815. package/lib/helpers/product.mjs.map +1 -0
  816. package/lib/helpers/ux.d.ts +9 -1
  817. package/lib/helpers/ux.js +15 -0
  818. package/lib/helpers/ux.js.map +1 -1
  819. package/lib/helpers/ux.mjs +15 -1
  820. package/lib/helpers/ux.mjs.map +1 -1
  821. package/lib/types/index.d.ts +1 -0
  822. package/lib/types/index.js +2 -0
  823. package/lib/types/index.js.map +1 -1
  824. package/lib/types/index.mjs +1 -0
  825. package/lib/types/index.mjs.map +1 -1
  826. package/lib/types/product.d.ts +87 -0
  827. package/lib/types/product.js +14 -0
  828. package/lib/types/product.js.map +1 -0
  829. package/lib/types/product.mjs +13 -0
  830. package/lib/types/product.mjs.map +1 -0
  831. package/lib/utils/array.d.ts +4 -0
  832. package/lib/utils/array.js +10 -0
  833. package/lib/utils/array.js.map +1 -1
  834. package/lib/utils/array.mjs +10 -1
  835. package/lib/utils/array.mjs.map +1 -1
  836. package/lib/utils/money/allocators/index.d.ts +2 -0
  837. package/lib/utils/money/allocators/index.js +8 -0
  838. package/lib/utils/money/allocators/index.js.map +1 -0
  839. package/lib/utils/money/allocators/index.mjs +4 -0
  840. package/lib/utils/money/allocators/index.mjs.map +1 -0
  841. package/lib/utils/money/index.d.ts +1 -2
  842. package/lib/utils/money/index.js +1 -4
  843. package/lib/utils/money/index.js.map +1 -1
  844. package/lib/utils/money/index.mjs +1 -2
  845. package/lib/utils/money/index.mjs.map +1 -1
  846. package/lib/utils/productSort.d.ts +41 -0
  847. package/lib/utils/productSort.js +67 -0
  848. package/lib/utils/productSort.js.map +1 -0
  849. package/lib/utils/productSort.mjs +60 -0
  850. package/lib/utils/productSort.mjs.map +1 -0
  851. package/package.json +10 -10
  852. package/lib/assets/icons/menu/icon-globe.svg.js.map +0 -1
  853. package/lib/assets/icons/menu/icon-globe.svg.mjs +0 -3
  854. package/lib/assets/icons/menu/icon-globe.svg.mjs.map +0 -1
  855. package/lib/components/MobileModal/assets/arrowDown.svg.mjs +0 -3
  856. package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.js.map +0 -1
  857. package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.mjs.map +0 -1
  858. package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.js.map +0 -1
  859. package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.mjs.map +0 -1
  860. package/lib/components/ResourceCalculatorV1/components/index.d.ts +0 -1
  861. package/lib/components/ResourceCalculatorV1/components/index.js +0 -5
  862. /package/lib/{components/MobileModal/assets → assets/icons}/arrowDown.svg.js.map +0 -0
  863. /package/lib/{components/MobileModal/assets → assets/icons}/arrowDown.svg.mjs.map +0 -0
  864. /package/lib/components/{ResourceCalculatorV1/components → Header/Navigation/ProMenu}/index.mjs.map +0 -0
  865. /package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/index.d.ts +0 -0
  866. /package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/index.js +0 -0
  867. /package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/index.js.map +0 -0
  868. /package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/index.mjs +0 -0
  869. /package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/index.mjs.map +0 -0
@@ -0,0 +1,335 @@
1
+ import { cloneDeep } from 'lodash-es';
2
+ import '../constants/proStoreCategories/index.mjs';
3
+ import '../types/index.mjs';
4
+ import { areEqualArrays } from '../utils/array.mjs';
5
+ import { sortProducts } from '../utils/productSort.mjs';
6
+ import { getSubCategoryIdByCollectionSlug } from './proStoreCategories.mjs';
7
+ import { UniFiCategoryId } from '../constants/proStoreCategories/mapping/unifi.mjs';
8
+ import { UISPCategoryId } from '../constants/proStoreCategories/mapping/uisp.mjs';
9
+ import { DisplayProductStatus } from '../types/product.mjs';
10
+ "use strict";
11
+ const isNonNullish = entry => entry !== null && entry !== void 0;
12
+ const EXCLUDE_PRODUCT_FROM_STORE_GRID_TAG_PREFIX = "exclude-from-store-grid:";
13
+ const removeExcludedProducts = (products, storeId) => {
14
+ const excludeTag = `${EXCLUDE_PRODUCT_FROM_STORE_GRID_TAG_PREFIX}${storeId}`.toLowerCase();
15
+ return products.filter(product => {
16
+ return !product.tags.some(tag => tag.name.toLowerCase() === excludeTag);
17
+ });
18
+ };
19
+ const isAccessoryCategoryItem = categoryItem => {
20
+ return !!categoryItem && [UniFiCategoryId.Accessories, UISPCategoryId.AccessoryTech].includes(
21
+ // TODO: Check why this TS error appears
22
+ // @ts-expect-error: Unreachable code error
23
+ categoryItem.id);
24
+ };
25
+ var HDDProductSlugs = /* @__PURE__ */(HDDProductSlugs2 => {
26
+ HDDProductSlugs2["HDD_1TB"] = "uacc-hdd-s-1tb";
27
+ HDDProductSlugs2["HDD_8TB_Enterprise"] = "uacc-hdd-e-8tb";
28
+ HDDProductSlugs2["HDD_16TB_Enterprise"] = "uacc-hdd-e-16tb";
29
+ return HDDProductSlugs2;
30
+ })(HDDProductSlugs || {});
31
+ const isAllowedAccessoryCategoryProduct = ({
32
+ slug
33
+ }) => {
34
+ const allowedAccessoryProductSlugs = ["u-lte", "u-lte-backup-pro", "uacc-hdd-s-1tb" /* HDD_1TB */, "uacc-hdd-e-8tb" /* HDD_8TB_Enterprise */, "uacc-hdd-e-16tb" /* HDD_16TB_Enterprise */];
35
+ return allowedAccessoryProductSlugs.includes(slug);
36
+ };
37
+ const isAccessoryCategorySubItem = (categorySubItem, allCategoryItems) => {
38
+ const categoryItem = allCategoryItems.find(item => item.items?.some(subItem => subItem.id === categorySubItem.id));
39
+ return isAccessoryCategoryItem(categoryItem);
40
+ };
41
+ const createSectionHierarchy = (sections, level = 1) => {
42
+ const currentLevelSections = sections.filter(section => section.productTags.length === level);
43
+ if (!currentLevelSections.length) {
44
+ return [];
45
+ }
46
+ return currentLevelSections.map(section => ({
47
+ ...section,
48
+ items: createSectionHierarchy(sections.filter(nextSection => section.productTags.every(tag => nextSection.productTags.includes(tag))), level + 1)
49
+ }));
50
+ };
51
+ var MagicCollectionTags = /* @__PURE__ */(MagicCollectionTags2 => {
52
+ MagicCollectionTags2["LayoutAccessories"] = "layout-accessories";
53
+ MagicCollectionTags2["ProStore"] = "pro-store";
54
+ MagicCollectionTags2["DisableLengthOptions"] = "disable-length-options";
55
+ MagicCollectionTags2["DisableSpeedOptions"] = "disable-speed-options";
56
+ return MagicCollectionTags2;
57
+ })(MagicCollectionTags || {});
58
+ var ProductOptions = /* @__PURE__ */(ProductOptions2 => {
59
+ ProductOptions2["Length"] = "length";
60
+ ProductOptions2["Speed"] = "speed";
61
+ ProductOptions2["Color"] = "color";
62
+ return ProductOptions2;
63
+ })(ProductOptions || {});
64
+ const formatOptionValueTitleToTag = optionValueTitle => optionValueTitle.toLowerCase().replace(/[,\s]/g, "").replace(".", "-");
65
+ const divideProductByOption = (product, optionTitle) => {
66
+ const option = product.options.find(option2 => option2.slug === optionTitle);
67
+ if (!option) {
68
+ return [product];
69
+ }
70
+ return option.values.map(value => {
71
+ return {
72
+ ...product,
73
+ options: product.options.filter(option2 => option2.slug !== optionTitle),
74
+ tags: [...product.tags, {
75
+ id: value.id,
76
+ name: formatOptionValueTitleToTag(value.slug)
77
+ }],
78
+ variants: product.variants.filter(variant => variant.optionValueIds?.includes(value.id))
79
+ };
80
+ });
81
+ };
82
+ const COLLECTION_SECTION_OTHER_ID = "other";
83
+ const UNIT_FACTORS = {
84
+ m: 1,
85
+ km: 1e3
86
+ };
87
+ const DISTANCE_REGEX = /^\s*(\d+)\s*(m|km)\s*$/;
88
+ const mapProductsToSections = (products, section) => {
89
+ const productsInThisSection = products.filter(product => {
90
+ return section.productTags.every(sectionTag => {
91
+ return product.tags.find(tag => tag.name === sectionTag);
92
+ });
93
+ });
94
+ if (productsInThisSection.length === 0) {
95
+ return void 0;
96
+ }
97
+ const items = section?.items?.map(item => mapProductsToSections(productsInThisSection, item)).filter(isNonNullish) ?? [];
98
+ const otherProducts = productsInThisSection.filter(product => {
99
+ return !items.some(item => item.products.find(p => p.id === product.id));
100
+ });
101
+ if (otherProducts.length && items.length) {
102
+ items.push({
103
+ id: `${section.id}-${COLLECTION_SECTION_OTHER_ID}`,
104
+ // TODO: Add translation
105
+ title: "Other",
106
+ productTags: section.productTags,
107
+ items: [],
108
+ products: otherProducts
109
+ });
110
+ }
111
+ return {
112
+ ...section,
113
+ items,
114
+ products: productsInThisSection
115
+ };
116
+ };
117
+ const compareDistanceTitles = (a, b) => {
118
+ const aMatch = a.title.match(DISTANCE_REGEX);
119
+ const bMatch = b.title.match(DISTANCE_REGEX);
120
+ if (!aMatch?.[1] || !aMatch[2] || !bMatch?.[1] || !bMatch[2]) {
121
+ return 0;
122
+ }
123
+ const aValue = parseInt(aMatch[1]) * (UNIT_FACTORS[aMatch[2]] || 0);
124
+ const bValue = parseInt(bMatch[1]) * (UNIT_FACTORS[bMatch[2]] || 0);
125
+ return aValue - bValue;
126
+ };
127
+ const processSectionProductsWithDistanceInOptions = sections => {
128
+ return sections.map(section => ({
129
+ ...section,
130
+ items: section.items.map(sec => {
131
+ const section2 = cloneDeep(sec);
132
+ const sectionWithDistanceTag = section2.items.find(section3 => section3.productTags.includes("distance"));
133
+ const sectionsMainProductTag = sectionWithDistanceTag?.productTags.filter(tag => tag !== "distance");
134
+ if (!sectionWithDistanceTag || !sectionsMainProductTag) {
135
+ return section2;
136
+ }
137
+ sectionWithDistanceTag.products.forEach(product => {
138
+ const optionValues = product?.options[0]?.values;
139
+ if (!optionValues?.length) {
140
+ return;
141
+ }
142
+ const formattedOptionValues = optionValues.map(value => ({
143
+ ...value,
144
+ titleInTagFormat: formatOptionValueTitleToTag(value.title)
145
+ }));
146
+ formattedOptionValues.forEach(currentValue => {
147
+ const newSecondLevelSectionsTags = [...sectionsMainProductTag, currentValue.titleInTagFormat];
148
+ const alreadyExistingSecondLevelSection = section2.items.findIndex(section3 => areEqualArrays(section3.productTags, newSecondLevelSectionsTags));
149
+ const variantToAdd = product.variants.find(variant => variant.optionValueIds?.includes(currentValue.id));
150
+ if (!variantToAdd) {
151
+ return;
152
+ }
153
+ const productToAdd = {
154
+ ...product,
155
+ options: product.options.filter(option => option.values.some(value => value.id === currentValue.id)).map(option => ({
156
+ ...option,
157
+ values: option.values.filter(value => value.id === currentValue.id)
158
+ })),
159
+ variants: [variantToAdd]
160
+ };
161
+ if (alreadyExistingSecondLevelSection >= 0) {
162
+ section2.items[alreadyExistingSecondLevelSection]?.products.push(productToAdd);
163
+ } else {
164
+ const sectionToAdd = {
165
+ id: currentValue.id,
166
+ // TODO: Maybe so>me different ID would be better
167
+ items: [],
168
+ // FIXME: This is problem!
169
+ products: [productToAdd],
170
+ productTags: newSecondLevelSectionsTags,
171
+ title: currentValue.title
172
+ };
173
+ section2.items.push(sectionToAdd);
174
+ }
175
+ });
176
+ });
177
+ return {
178
+ ...section2,
179
+ items: section2.items.sort(compareDistanceTitles).filter(section3 => !section3.productTags.includes("distance"))
180
+ };
181
+ })
182
+ }));
183
+ };
184
+ const processSectionsWithOutOfStockProducts = section => {
185
+ const isDisabled = section.products.every(product => product.variants.every(variant => variant.status !== DisplayProductStatus.Available));
186
+ return {
187
+ ...section,
188
+ isDisabled,
189
+ items: section.items.map(processSectionsWithOutOfStockProducts)
190
+ };
191
+ };
192
+ const getProductGroups = (products, sectionHierarchy, tags) => {
193
+ if (!products?.length || !sectionHierarchy) return void 0;
194
+ const processedProducts = products.flatMap(product => {
195
+ const disableLengthOptions = tags?.find(tag => tag.name === "disable-length-options" /* DisableLengthOptions */);
196
+ const lengthOptions = !disableLengthOptions && product?.options?.find(option => option.slug === "length" /* Length */);
197
+ if (lengthOptions && product.options !== void 0) {
198
+ return divideProductByOption(product, "length" /* Length */);
199
+ }
200
+ const disableSpeedOptions = tags?.find(tag => tag.name === "disable-speed-options" /* DisableSpeedOptions */);
201
+ const speedOptions = !disableSpeedOptions && product?.options?.find(option => {
202
+ return option.slug === "speed" /* Speed */;
203
+ });
204
+ if (speedOptions) {
205
+ return divideProductByOption(product, "speed" /* Speed */);
206
+ }
207
+ return [product];
208
+ });
209
+ const mappedProductGroups = sectionHierarchy.map(section => {
210
+ return mapProductsToSections(processedProducts, section);
211
+ }).filter(section => !!section);
212
+ const otherProducts = products.filter(product => {
213
+ return !mappedProductGroups.some(section => {
214
+ return section.products.find(p => p.id === product.id);
215
+ });
216
+ });
217
+ if (otherProducts.length) {
218
+ otherProducts.forEach(product => {
219
+ mappedProductGroups.push({
220
+ id: product.id,
221
+ products: [product],
222
+ title: "",
223
+ items: [],
224
+ productTags: []
225
+ });
226
+ });
227
+ }
228
+ const processedProductGroups = processSectionProductsWithDistanceInOptions(mappedProductGroups).map(processSectionsWithOutOfStockProducts);
229
+ return processedProductGroups.sort((a, b) => {
230
+ const aFirstProductId = a?.products?.[0]?.id;
231
+ const bFirstProductId = b?.products?.[0]?.id;
232
+ const aFirstProduct = products.findIndex(product => product.id === aFirstProductId);
233
+ const bFirstProduct = products.findIndex(product => product.id === bFirstProductId);
234
+ return aFirstProduct - bFirstProduct;
235
+ });
236
+ };
237
+ const getProStoreCategory = ({
238
+ queryCategory,
239
+ product,
240
+ ignoreQuery
241
+ }) => {
242
+ return (
243
+ /**
244
+ * If category specified via the url search/query parameter then use it
245
+ */
246
+ !ignoreQuery && queryCategory ||
247
+ /**
248
+ * Attempt to find category by it's default collection or fallback to the virtual default collection
249
+ */
250
+ getSubCategoryIdByCollectionSlug(product.collectionSlug) || getSubCategoryIdByCollectionSlug(product.organizationalCollectionSlug) ||
251
+ /**
252
+ * If all else fails fallback detecting to category from pro store collection, unlikely but wouldn't hurt to do so
253
+ */
254
+ getSubCategoryIdByCollectionSlug(product.proCollectionSlug)
255
+ );
256
+ };
257
+ const getStoreProducts = ({
258
+ storeId,
259
+ queryCategory,
260
+ currentProduct,
261
+ collections,
262
+ allCategoryItems
263
+ }) => {
264
+ const returnObj = {
265
+ category: void 0,
266
+ products: []
267
+ };
268
+ const category = getProStoreCategory({
269
+ queryCategory,
270
+ product: currentProduct
271
+ });
272
+ const categoryItem = allCategoryItems.find(item => item.items?.some(subItem => subItem.id === category));
273
+ const categorySubItem = categoryItem?.items?.find(subItem => subItem.id === category);
274
+ const categoryId = categorySubItem?.id ?? category;
275
+ if (categoryId) {
276
+ returnObj.category = {
277
+ id: categoryId,
278
+ label: categoryItem?.label ?? null
279
+ };
280
+ }
281
+ const filteredCollections = collections.map(collection => ({
282
+ ...collection,
283
+ products: removeExcludedProducts(collection.products, storeId)
284
+ }));
285
+ if (categoryItem?.hideSubItems) {
286
+ const products = filteredCollections.flatMap(collection => collection.products);
287
+ if (isAccessoryCategoryItem(categoryItem)) {
288
+ returnObj.products = isAllowedAccessoryCategoryProduct(currentProduct) ? products.filter(isAllowedAccessoryCategoryProduct) : [];
289
+ } else {
290
+ returnObj.products = products;
291
+ }
292
+ } else {
293
+ const collection = filteredCollections.find(collection2 => collection2.products.some(el => el.id === currentProduct.id));
294
+ if (!collection) {
295
+ throw new Error("Collection not found");
296
+ }
297
+ const subItems = (categoryItem?.items?.slice(1) ?? allCategoryItems.flatMap(el => el.items?.slice(1))).filter(Boolean);
298
+ const subItem = subItems.find(item => item.collectionSlugs.includes(collection.slug));
299
+ if (subItem && returnObj.category) {
300
+ returnObj.category = {
301
+ id: subItem.id,
302
+ label: subItem.label
303
+ };
304
+ }
305
+ const subItemCollections = filteredCollections.filter(el => subItem?.collectionSlugs.includes(el.slug));
306
+ const products = subItemCollections.flatMap(el => el.products);
307
+ if (subItem) {
308
+ if (isAccessoryCategorySubItem(subItem, allCategoryItems)) {
309
+ returnObj.products = isAllowedAccessoryCategoryProduct(currentProduct) ? products.filter(isAllowedAccessoryCategoryProduct) : [];
310
+ } else {
311
+ returnObj.products = products;
312
+ }
313
+ }
314
+ const sections = subItemCollections.flatMap(el => el.sections);
315
+ const sectionHierarchy = createSectionHierarchy(sections);
316
+ const productGroups = getProductGroups(products, sectionHierarchy);
317
+ if (productGroups) {
318
+ return {
319
+ category: returnObj.category,
320
+ productGroups: productGroups.sort((a, b) => {
321
+ if (a.products[0] && b.products[0]) {
322
+ return sortProducts(null, storeId)(a.products[0], b.products[0]);
323
+ }
324
+ return 0;
325
+ })
326
+ };
327
+ }
328
+ }
329
+ return {
330
+ ...returnObj,
331
+ products: returnObj.products.sort(sortProducts(null, storeId))
332
+ };
333
+ };
334
+ export { COLLECTION_SECTION_OTHER_ID, HDDProductSlugs, MagicCollectionTags, ProductOptions, createSectionHierarchy, getProStoreCategory, getProductGroups, getStoreProducts, isNonNullish, removeExcludedProducts };
335
+ //# sourceMappingURL=product.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product.mjs","sources":["../../src/helpers/product.ts"],"sourcesContent":["import { cloneDeep } from \"lodash-es\";\n\nimport type {\n ParsedCategoryItem,\n ParsedCategorySubItem,\n} from \"../constants/proStoreCategories\";\nimport {\n UISPCategoryId,\n UniFiCategoryId,\n} from \"../constants/proStoreCategories\";\nimport type {\n CollectionSection,\n MappedProductSection,\n Nullish,\n ProductTagFragment,\n Section,\n StorefrontOption,\n StorefrontProduct,\n StoreId,\n} from \"../types\";\nimport { DisplayProductStatus } from \"../types\";\nimport { areEqualArrays } from \"../utils/array\";\nimport { sortProducts } from \"../utils/productSort\";\nimport { getSubCategoryIdByCollectionSlug } from \"./proStoreCategories\";\n\nexport const isNonNullish = <T>(entry: T | null | undefined): entry is T =>\n entry !== null && entry !== undefined;\n\n/**\n * Prefix for tags that is added to product to exclude it from store grid\n * and breadcrumbs but still show it in other places (e.g. search and new user store)\n *\n * The full tag would include the store ID for specifying which from which\n * store to exclude the product.\n *\n * @example `\"exclude-from-store-grid:us`\n */\nconst EXCLUDE_PRODUCT_FROM_STORE_GRID_TAG_PREFIX =\n \"exclude-from-store-grid:\" as const;\n\n/**\n * Removes products that have tag starting with `EXCLUDE_PRODUCT_FROM_STORE_GRID_TAG_PREFIX`\n * and ends with `storeId`, e.g. `\"exclude-from-store-grid:us`\n *\n * @warning Use this function only on grid and breadcrumbs products\n */\nexport const removeExcludedProducts = <\n T extends { tags: ProductTagFragment[] },\n>(\n products: T[],\n storeId: StoreId,\n): T[] => {\n const excludeTag =\n `${EXCLUDE_PRODUCT_FROM_STORE_GRID_TAG_PREFIX}${storeId}`.toLowerCase();\n\n return products.filter((product) => {\n return !product.tags.some((tag) => tag.name.toLowerCase() === excludeTag);\n });\n};\n\nconst isAccessoryCategoryItem = (\n categoryItem: Nullish<ParsedCategoryItem>,\n): boolean => {\n return (\n !!categoryItem &&\n [UniFiCategoryId.Accessories, UISPCategoryId.AccessoryTech].includes(\n // TODO: Check why this TS error appears\n // @ts-expect-error: Unreachable code error\n categoryItem.id,\n )\n );\n};\n\nexport enum HDDProductSlugs {\n HDD_1TB = \"uacc-hdd-s-1tb\",\n // Currently disabled and replaced dirty with HDD_8TB_Enterprise\n // HDD_8TB = \"uacc-hdd-s-8tb\",\n HDD_8TB_Enterprise = \"uacc-hdd-e-8tb\",\n HDD_16TB_Enterprise = \"uacc-hdd-e-16tb\",\n}\n\nconst isAllowedAccessoryCategoryProduct = ({\n slug,\n}: {\n slug: string;\n}): boolean => {\n const allowedAccessoryProductSlugs = [\n \"u-lte\",\n \"u-lte-backup-pro\",\n HDDProductSlugs.HDD_1TB,\n HDDProductSlugs.HDD_8TB_Enterprise,\n HDDProductSlugs.HDD_16TB_Enterprise,\n ];\n\n return allowedAccessoryProductSlugs.includes(slug);\n};\n\nconst isAccessoryCategorySubItem = (\n categorySubItem: ParsedCategorySubItem,\n allCategoryItems: ParsedCategoryItem[],\n): boolean => {\n const categoryItem = allCategoryItems.find((item) =>\n item.items?.some((subItem) => subItem.id === categorySubItem.id),\n );\n\n return isAccessoryCategoryItem(categoryItem);\n};\n\n/**\n * Recursively create section hierarchy\n */\nexport const createSectionHierarchy = (\n sections: CollectionSection[],\n level = 1,\n): Section[] => {\n const currentLevelSections = sections.filter(\n (section) => section.productTags.length === level,\n );\n\n if (!currentLevelSections.length) {\n return [];\n }\n\n return currentLevelSections.map((section) => ({\n ...section,\n items: createSectionHierarchy(\n sections.filter((nextSection) =>\n section.productTags.every((tag) =>\n nextSection.productTags.includes(tag),\n ),\n ),\n level + 1,\n ),\n }));\n};\n\nexport enum MagicCollectionTags {\n /**\n * Used to determine if collection should be shown in an accessory\n * layout style where sections are placed inside variant cards\n */\n LayoutAccessories = \"layout-accessories\",\n /**\n * Used to determine if collection is pro-store specific and should\n * be redirected to pro-store's appropriate category\n */\n ProStore = \"pro-store\",\n /**\n * Used to disable length options (disable product splitting by \"length\")\n */\n DisableLengthOptions = \"disable-length-options\",\n /**\n * Used to disable speed options (disable product splitting by \"speed\")\n */\n DisableSpeedOptions = \"disable-speed-options\",\n}\n\nexport enum ProductOptions {\n // Used for finding option category using option slug\n Length = \"length\",\n Speed = \"speed\",\n Color = \"color\",\n}\n\n/**\n * Format option value title to tag.\n * This removes spaces, dots, commas, and make all lower case.\n * TODO: We could use the tag formatter from admin panel here.\n */\nconst formatOptionValueTitleToTag = (optionValueTitle: string) =>\n optionValueTitle.toLowerCase().replace(/[,\\s]/g, \"\").replace(\".\", \"-\");\n\n/**\n * Divides a product in multiple products by an option\n */\nconst divideProductByOption = <\n T extends StorefrontProduct & {\n options: StorefrontOption[];\n },\n>(\n product: T,\n optionTitle: ProductOptions,\n) => {\n const option = product.options.find((option) => option.slug === optionTitle);\n\n if (!option) {\n return [product];\n }\n\n return option.values.map((value) => {\n return {\n ...product,\n options: product.options.filter((option) => option.slug !== optionTitle),\n tags: [\n ...product.tags,\n {\n id: value.id,\n name: formatOptionValueTitleToTag(value.slug),\n },\n ],\n variants: product.variants.filter((variant) =>\n variant.optionValueIds?.includes(value.id),\n ),\n };\n });\n};\n\nexport const COLLECTION_SECTION_OTHER_ID = \"other\";\n\n// A mapping of unit suffixes to conversion factors in meters\nconst UNIT_FACTORS: Record<string, number> = {\n m: 1,\n km: 1000,\n};\n\n// A regular expression to extract the numerical value and unit suffix, with optional whitespace\nconst DISTANCE_REGEX = /^\\s*(\\d+)\\s*(m|km)\\s*$/;\n\n/**\n * Recursively map products to sections based on tags\n *\n * TODO: Add tests\n */\nconst mapProductsToSections = <T extends StorefrontProduct>(\n products: T[],\n section: Section,\n): MappedProductSection<T> | undefined => {\n // Filter products which have all tags from this section\n const productsInThisSection = products.filter((product) => {\n return section.productTags.every((sectionTag) => {\n return product.tags.find((tag) => tag.name === sectionTag);\n });\n });\n\n // If there are no products in this section, we don't want to show it\n if (productsInThisSection.length === 0) {\n return undefined;\n }\n\n // Recursively map products to sub-sections\n const items =\n section?.items\n ?.map((item) => mapProductsToSections(productsInThisSection, item))\n .filter(isNonNullish) ?? [];\n\n // Filter products which are not in any sub-section\n const otherProducts = productsInThisSection.filter((product) => {\n return !items.some((item) =>\n item.products.find((p) => p.id === product.id),\n );\n });\n\n // If there are products which are not in any sub-section, we want to create \"Other\" section\n if (otherProducts.length && items.length) {\n items.push({\n id: `${section.id}-${COLLECTION_SECTION_OTHER_ID}`,\n // TODO: Add translation\n title: \"Other\",\n productTags: section.productTags,\n items: [],\n products: otherProducts,\n });\n }\n\n return {\n ...section,\n items,\n products: productsInThisSection,\n };\n};\n\n// A predicate function that compares two section titles\nconst compareDistanceTitles = <T>(\n a: MappedProductSection<T>,\n b: MappedProductSection<T>,\n) => {\n const aMatch = a.title.match(DISTANCE_REGEX) as [string, string, string];\n const bMatch = b.title.match(DISTANCE_REGEX) as [string, string, string];\n\n if (!aMatch?.[1] || !aMatch[2] || !bMatch?.[1] || !bMatch[2]) {\n return 0;\n }\n\n const aValue = parseInt(aMatch[1]!) * (UNIT_FACTORS[aMatch[2]] || 0);\n const bValue = parseInt(bMatch[1]!) * (UNIT_FACTORS[bMatch[2]] || 0);\n\n return aValue - bValue;\n};\n\n/**\n * Process sections with products which have \"distance\" tag or/and has\n * \"distance\" option in options list. If there are such products, we want to\n * to add to the appropriate distance section or create a new one.\n */\nconst processSectionProductsWithDistanceInOptions = <\n T extends StorefrontProduct & {\n options: StorefrontOption[];\n },\n>(\n sections: MappedProductSection<T>[],\n) => {\n return sections.map((section) => ({\n ...section,\n items: section.items.map((sec) => {\n // Make a deep copy of the object, otherwise you will modify the original value\n const section = cloneDeep(sec);\n\n // TODO: Move the magic tag to a constants file, here and in other places as well\n const sectionWithDistanceTag = section.items.find((section) =>\n section.productTags.includes(\"distance\"),\n );\n\n // Here we take the first element because this is 2nd level section and it should have only 2 elements in the list\n const sectionsMainProductTag = sectionWithDistanceTag?.productTags.filter(\n (tag) => tag !== \"distance\",\n );\n\n // If there is no section with \"distance\" tag, then we can skip this\n if (!sectionWithDistanceTag || !sectionsMainProductTag) {\n return section;\n }\n\n sectionWithDistanceTag.products.forEach((product) => {\n /**\n * FIXME: Flat mapping is unsafe here. This part was written with a guarantee that these\n * products only have one option type by which they differ\n */\n const optionValues = product?.options[0]?.values;\n\n // FIXME: We need to add error handling here for cases where product has distance tag but does not have variants\n if (!optionValues?.length) {\n return;\n }\n\n /**\n * Format the option titles so that we can match them with the tags used.\n * This removes spaces, dots, commas, and make all lower case.\n * TODO: We could use the tag formatter from admin panel here.\n */\n const formattedOptionValues = optionValues.map((value) => ({\n ...value,\n titleInTagFormat: formatOptionValueTitleToTag(value.title),\n }));\n\n formattedOptionValues.forEach((currentValue) => {\n const newSecondLevelSectionsTags = [\n ...sectionsMainProductTag,\n currentValue.titleInTagFormat,\n ];\n\n const alreadyExistingSecondLevelSection = section.items.findIndex(\n (section) =>\n areEqualArrays(section.productTags, newSecondLevelSectionsTags),\n );\n\n const variantToAdd = product.variants.find((variant) =>\n variant.optionValueIds?.includes(currentValue.id),\n );\n\n // TODO: Add error handling\n if (!variantToAdd) {\n return;\n }\n\n const productToAdd: T = {\n ...product,\n options: product.options\n .filter((option) =>\n option.values.some((value) => value.id === currentValue.id),\n )\n .map((option) => ({\n ...option,\n values: option.values.filter(\n (value) => value.id === currentValue.id,\n ),\n })),\n variants: [variantToAdd],\n };\n\n if (alreadyExistingSecondLevelSection >= 0) {\n section.items[alreadyExistingSecondLevelSection]?.products.push(\n productToAdd,\n );\n } else {\n const sectionToAdd: MappedProductSection<T> = {\n id: currentValue.id, // TODO: Maybe so>me different ID would be better\n items: [], // FIXME: This is problem!\n products: [productToAdd],\n productTags: newSecondLevelSectionsTags,\n title: currentValue.title,\n };\n\n section.items.push(sectionToAdd);\n }\n });\n });\n\n return {\n ...section,\n items: section.items\n .sort(compareDistanceTitles)\n .filter((section) => !section.productTags.includes(\"distance\")),\n };\n }),\n }));\n};\n\n/**\n * Goes through all sections and sets isDisabled flag to true if all products\n * in the section are not available\n */\nconst processSectionsWithOutOfStockProducts = <\n T extends { variants: { status: Nullish<DisplayProductStatus> }[] },\n>(\n section: MappedProductSection<T>,\n): MappedProductSection<T> => {\n const isDisabled = section.products.every((product) =>\n product.variants.every(\n (variant) => variant.status !== DisplayProductStatus.Available,\n ),\n );\n\n return {\n ...section,\n isDisabled,\n items: section.items.map(processSectionsWithOutOfStockProducts),\n };\n};\n\n/**\n * Create product groups\n */\nexport const getProductGroups = <\n T extends StorefrontProduct & {\n options: StorefrontOption[];\n },\n>(\n products?: T[],\n sectionHierarchy?: Nullish<Section[]>,\n tags?: Array<{\n id: string;\n name: string;\n }>,\n) => {\n if (!products?.length || !sectionHierarchy) return undefined;\n\n const processedProducts = products.flatMap((product) => {\n const disableLengthOptions = tags?.find(\n (tag) => tag.name === MagicCollectionTags.DisableLengthOptions,\n );\n const lengthOptions =\n !disableLengthOptions &&\n product?.options?.find((option) => option.slug === ProductOptions.Length);\n\n if (lengthOptions && product.options !== undefined) {\n return divideProductByOption(product, ProductOptions.Length);\n }\n\n const disableSpeedOptions = tags?.find(\n (tag) => tag.name === MagicCollectionTags.DisableSpeedOptions,\n );\n const speedOptions =\n !disableSpeedOptions &&\n product?.options?.find((option) => {\n return option.slug === ProductOptions.Speed;\n });\n\n if (speedOptions) {\n return divideProductByOption(product, ProductOptions.Speed);\n }\n\n return [product];\n });\n\n const mappedProductGroups = sectionHierarchy\n .map((section) => {\n return mapProductsToSections(processedProducts, section);\n })\n .filter((section): section is MappedProductSection<T> => !!section);\n\n const otherProducts = products.filter((product) => {\n return !mappedProductGroups.some((section) => {\n return section.products.find((p) => p.id === product.id);\n });\n });\n\n // If there are products which are not in any section, we want to create \"Other\" section\n if (otherProducts.length) {\n otherProducts.forEach((product) => {\n mappedProductGroups.push({\n id: product.id,\n products: [product],\n title: \"\",\n items: [],\n productTags: [],\n });\n });\n }\n\n const processedProductGroups = processSectionProductsWithDistanceInOptions(\n mappedProductGroups,\n ).map(processSectionsWithOutOfStockProducts);\n\n /**\n * Sort product groups by the order of the first product in each group\n * based on the order of the products that is in collection settings\n */\n return processedProductGroups.sort((a, b) => {\n const aFirstProductId = a?.products?.[0]?.id;\n const bFirstProductId = b?.products?.[0]?.id;\n\n const aFirstProduct = products.findIndex(\n (product) => product.id === aFirstProductId,\n );\n\n const bFirstProduct = products.findIndex(\n (product) => product.id === bFirstProductId,\n );\n\n return aFirstProduct - bFirstProduct;\n });\n};\n\nexport const getProStoreCategory = ({\n queryCategory,\n product,\n ignoreQuery,\n}: {\n queryCategory?: string;\n product: Pick<\n StorefrontProduct,\n \"collectionSlug\" | \"organizationalCollectionSlug\" | \"proCollectionSlug\"\n >;\n ignoreQuery?: boolean;\n}): string | null => {\n return (\n /**\n * If category specified via the url search/query parameter then use it\n */\n (!ignoreQuery && queryCategory) ||\n /**\n * Attempt to find category by it's default collection or fallback to the virtual default collection\n */\n getSubCategoryIdByCollectionSlug(product.collectionSlug) ||\n getSubCategoryIdByCollectionSlug(product.organizationalCollectionSlug) ||\n /**\n * If all else fails fallback detecting to category from pro store collection, unlikely but wouldn't hurt to do so\n */\n getSubCategoryIdByCollectionSlug(product.proCollectionSlug)\n );\n};\n\ntype StoreProductsData =\n | ({\n category: { id: string; label: string | null } | undefined;\n } & {\n products: StorefrontProduct[];\n })\n | {\n productGroups: MappedProductSection<StorefrontProduct>[];\n };\n\nexport const getStoreProducts = ({\n storeId,\n queryCategory,\n currentProduct,\n collections,\n allCategoryItems,\n}: {\n storeId: StoreId;\n queryCategory: string | undefined;\n currentProduct: Pick<\n StorefrontProduct,\n | \"id\"\n | \"slug\"\n | \"collectionSlug\"\n | \"organizationalCollectionSlug\"\n | \"proCollectionSlug\"\n >;\n collections: Array<{\n slug: string;\n sections: Array<{\n id: string;\n title: string;\n productTags: Array<string>;\n }>;\n products: Array<\n Pick<\n StorefrontProduct,\n | \"id\"\n | \"slug\"\n | \"tags\"\n | \"variants\"\n | \"options\"\n | \"title\"\n | \"status\"\n | \"minDisplayPrice\"\n >\n >;\n }>;\n allCategoryItems: ParsedCategoryItem[];\n}): StoreProductsData => {\n const returnObj: StoreProductsData = {\n category: undefined,\n products: [],\n };\n\n const category = getProStoreCategory({\n queryCategory,\n product: currentProduct,\n });\n\n // Find the category item and sub-item\n const categoryItem = allCategoryItems.find((item) =>\n item.items?.some((subItem) => subItem.id === category),\n );\n const categorySubItem = categoryItem?.items?.find(\n (subItem) => subItem.id === category,\n );\n\n // Set the base category\n const categoryId = categorySubItem?.id ?? category;\n if (categoryId) {\n returnObj.category = {\n id: categoryId,\n label: categoryItem?.label ?? null,\n };\n }\n\n // Removes products that need to be excluded from product grid from the collections\n const filteredCollections = collections.map((collection) => ({\n ...collection,\n products: removeExcludedProducts(collection.products, storeId),\n }));\n\n if (categoryItem?.hideSubItems) {\n const products = filteredCollections.flatMap(\n (collection) => collection.products,\n );\n\n if (isAccessoryCategoryItem(categoryItem)) {\n // Show allowed products\n returnObj.products = isAllowedAccessoryCategoryProduct(currentProduct)\n ? products.filter(isAllowedAccessoryCategoryProduct)\n : [];\n } else {\n // Show all products of collections\n returnObj.products = products;\n }\n } else {\n // Find the collection in which the product is in\n const collection = filteredCollections.find((collection) =>\n collection.products.some((el) => el.id === currentProduct.id),\n );\n\n if (!collection) {\n throw new Error(\"Collection not found\");\n }\n\n const subItems = (\n categoryItem?.items?.slice(1) ??\n allCategoryItems.flatMap((el) => el.items?.slice(1))\n ).filter(Boolean);\n\n // Find sub-category item that has this collection\n const subItem = subItems.find((item) =>\n item.collectionSlugs.includes(collection.slug),\n );\n\n // Update category\n if (subItem && returnObj.category) {\n returnObj.category = {\n id: subItem.id,\n label: subItem.label,\n };\n }\n\n // Find all collections data that are included in subItem\n const subItemCollections = filteredCollections.filter((el) =>\n subItem?.collectionSlugs.includes(el.slug),\n );\n\n const products = subItemCollections.flatMap((el) => el.products);\n\n if (subItem) {\n if (isAccessoryCategorySubItem(subItem, allCategoryItems)) {\n // Show allowed products\n returnObj.products = isAllowedAccessoryCategoryProduct(currentProduct)\n ? products.filter(isAllowedAccessoryCategoryProduct)\n : [];\n } else {\n // Show all products of found collection\n returnObj.products = products;\n }\n }\n\n // #############################################################################\n // Product groups\n // #############################################################################\n const sections = subItemCollections.flatMap((el) => el.sections);\n\n const sectionHierarchy = createSectionHierarchy(sections);\n\n const productGroups = getProductGroups(products, sectionHierarchy);\n\n if (productGroups) {\n return {\n category: returnObj.category,\n productGroups: productGroups.sort((a, b) => {\n if (a.products[0] && b.products[0]) {\n return sortProducts(null, storeId)(a.products[0], b.products[0]);\n }\n\n return 0;\n }),\n };\n }\n }\n\n return {\n ...returnObj,\n products: returnObj.products.sort(sortProducts(null, storeId)),\n };\n};\n"],"names":["isNonNullish","entry","EXCLUDE_PRODUCT_FROM_STORE_GRID_TAG_PREFIX","removeExcludedProducts","products","storeId","excludeTag","toLowerCase","filter","product","tags","some","tag","name","isAccessoryCategoryItem","categoryItem","UniFiCategoryId","Accessories","UISPCategoryId","AccessoryTech","includes","id","HDDProductSlugs","isAllowedAccessoryCategoryProduct","slug","allowedAccessoryProductSlugs","isAccessoryCategorySubItem","categorySubItem","allCategoryItems","find","item","items","subItem","createSectionHierarchy","sections","level","currentLevelSections","section","productTags","length","map","nextSection","every","MagicCollectionTags","ProductOptions","formatOptionValueTitleToTag","optionValueTitle","replace","divideProductByOption","optionTitle","option","options","values","value","variants","variant","optionValueIds","COLLECTION_SECTION_OTHER_ID","UNIT_FACTORS","m","km","DISTANCE_REGEX","mapProductsToSections","productsInThisSection","sectionTag","otherProducts","p","push","title","compareDistanceTitles","a","b","aMatch","match","bMatch","aValue","parseInt","bValue","processSectionProductsWithDistanceInOptions","sec","cloneDeep","sectionWithDistanceTag","sectionsMainProductTag","forEach","optionValues","formattedOptionValues","titleInTagFormat","currentValue","newSecondLevelSectionsTags","alreadyExistingSecondLevelSection","findIndex","areEqualArrays","variantToAdd","productToAdd","sectionToAdd","sort","processSectionsWithOutOfStockProducts","isDisabled","status","DisplayProductStatus","Available","getProductGroups","sectionHierarchy","processedProducts","flatMap","disableLengthOptions","lengthOptions","disableSpeedOptions","speedOptions","mappedProductGroups","processedProductGroups","aFirstProductId","bFirstProductId","aFirstProduct","bFirstProduct","getProStoreCategory","queryCategory","ignoreQuery","getSubCategoryIdByCollectionSlug","collectionSlug","organizationalCollectionSlug","proCollectionSlug","getStoreProducts","currentProduct","collections","returnObj","category","categoryId","label","filteredCollections","collection","hideSubItems","el","Error","subItems","slice","Boolean","collectionSlugs","subItemCollections","productGroups","sortProducts"],"mappings":";;;;;;;;;;AAyBO,MAAMA,YAAe,GAAIC,KAC9B,IAAAA,KAAA,KAAU,QAAQA,KAAU,KAAA,KAAA,CAAA;AAW9B,MAAMC,0CACJ,GAAA,0BAAA;AAQW,MAAAC,sBAAA,GAAyBA,CAGpCC,QAAA,EACAC,OACQ,KAAA;EACR,MAAMC,aACD,GAAAJ,0CAA6C,GAAAG,UAAUE,WAAY,EAAA;EAEjE,OAAAH,QAAA,CAASI,MAAO,CAACC,OAAY,IAAA;IAC3B,OAAA,CAACA,OAAQ,CAAAC,IAAA,CAAKC,IAAK,CAACC,OAAQA,GAAI,CAAAC,IAAA,CAAKN,WAAY,EAAA,KAAMD,UAAU,CAAA;EAAA,CACzE,CAAA;AACH,CAAA;AAEA,MAAMQ,uBAAA,GACJC,YACY,IAAA;EAEV,OAAA,CAAC,CAACA,YACF,IAAA,CAACC,gBAAgBC,WAAa,EAAAC,cAAA,CAAeC,aAAa,CAAE,CAAAC,QAAA;EAAA;EAAA;EAG1DL,YAAa,CAAAM,EAAA,CACf;AAEJ,CAAA;AAEY,IAAAC,eAAA,GAAA,gBAAAA,gBAAL,IAAA;EACLA,iBAAA,SAAU,CAAA,GAAA,gBAAA;EAGVA,iBAAA,oBAAqB,CAAA,GAAA,gBAAA;EACrBA,iBAAA,qBAAsB,CAAA,GAAA,iBAAA;EALZA,OAAAA,gBAAAA;AAAA,CAAA,EAAAA,eAAA,IAAA,C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AA;UACjE;UAEO,OAAA,CAAA;QAAA,CACR;MAAA,CACH;IACF;EACF;EAEO,OAAA;IACL,GAAGyH,SAAA;IACHzH,UAAUyH,SAAU,CAAAzH,QAAA,CAAS2F,KAAK6C,YAAa,CAAA,IAAA,EAAMvI,OAAO,CAAC;EAAA,CAC/D;AACF,CAAA;"}
@@ -23,8 +23,16 @@ export declare const scrollIntoView: (element: Element | null, duration?: number
23
23
  * whenValueIsY: css`background: blue;`,
24
24
  * })
25
25
  */
26
- export declare function styledSwitch(value: string, cases: Record<string, FlattenSimpleInterpolation | string>): string | FlattenSimpleInterpolation | undefined;
26
+ export declare function styledSwitch<K extends string>(value: K, cases: Record<K, FlattenSimpleInterpolation | string>): Record<K, string | FlattenSimpleInterpolation>[K];
27
27
  /**
28
28
  * Get true page offset Y summing own and all parent offsets
29
29
  */
30
30
  export declare const getTrueOffsetY: (el: HTMLElement) => number;
31
+ /**
32
+ * Get true element width and height, including all margins and paddings.
33
+ * Uses computed styles, and supports only margins that use px.
34
+ */
35
+ export declare const getTrueSize: (el: HTMLElement) => {
36
+ width: number;
37
+ height: number;
38
+ };
package/lib/helpers/ux.js CHANGED
@@ -44,7 +44,22 @@ const getTrueOffsetY = el => {
44
44
  }
45
45
  return offset;
46
46
  };
47
+ const getTrueSize = el => {
48
+ if (typeof window === "undefined") {
49
+ return {
50
+ width: 0,
51
+ height: 0
52
+ };
53
+ }
54
+ const style = window.getComputedStyle(el);
55
+ const px = value => /^[0-9]+px$/.test(value) ? parseFloat(value) : 0;
56
+ return {
57
+ width: el.offsetWidth + px(style.marginLeft) + px(style.marginRight),
58
+ height: el.offsetHeight + px(style.marginTop) + px(style.marginBottom)
59
+ };
60
+ };
47
61
  exports.getTrueOffsetY = getTrueOffsetY;
62
+ exports.getTrueSize = getTrueSize;
48
63
  exports.scrollIntoView = scrollIntoView;
49
64
  exports.scrollToY = scrollToY;
50
65
  exports.styledSwitch = styledSwitch;
@@ -1 +1 @@
1
- {"version":3,"file":"ux.js","sources":["../../src/helpers/ux.ts"],"sourcesContent":["import type { FlattenSimpleInterpolation } from \"styled-components\";\n\nconst SCROLL_INTO_VIEW_DEFAULT_DURATION = 600;\n\n/**\n * Same as `window.scrollTo` but allows custom duration\n *\n * ! The scroll action won't be replaced if called multiple times\n * ? Instead `useScrollToY` hook will do that if needed\n */\nexport const scrollToY = (targetY: number, duration: number) => {\n let start: number;\n let previousTimeStamp: number;\n const initY = window.scrollY;\n const limit =\n document.documentElement.scrollHeight -\n document.documentElement.clientHeight;\n\n function step(timestamp: number) {\n start === undefined && (start = timestamp);\n const elapsed = timestamp - start;\n const progress = (timestamp - start) / duration;\n\n if (previousTimeStamp !== timestamp) {\n window.scroll({\n top: ((targetY > limit ? limit : targetY) - initY) * progress + initY,\n });\n }\n\n if (elapsed < duration) {\n previousTimeStamp = timestamp;\n window.requestAnimationFrame(step);\n } else {\n window.scroll({\n top: targetY,\n });\n }\n }\n\n window.requestAnimationFrame(step);\n};\n\n/**\n * Scrolls to the element on the page\n *\n * ! This will scroll the entire page, do not use for inline scrolling\n *\n * @todo use Element.scrollIntoView() or Element.scrollIntoViewIfNeeded() when it's fully supported\n */\nexport const scrollIntoView = (\n element: Element | null,\n duration = SCROLL_INTO_VIEW_DEFAULT_DURATION,\n) => {\n if (typeof window === \"undefined\") return;\n if (!element) return;\n\n // Get scroll y target position\n const elementWindowY = element.getBoundingClientRect().top + window.scrollY;\n // Scroll to the element minus one third of the window height (so that it's at an optimal eye level)\n const y = elementWindowY - window.innerHeight * (1 / 3);\n\n // Animate\n scrollToY(y, duration);\n};\n\n/**\n * For use in styled components to reduce switch noise\n *\n * @deprecated Let's replace this with native switches - if ain't broke...\n * @example styledSwitch(variableWithMultipleCases, {\n * whenValueIsX: css`background: red;`,\n * whenValueIsY: css`background: blue;`,\n * })\n */\nexport function styledSwitch(\n value: string,\n cases: Record<string, FlattenSimpleInterpolation | string>,\n) {\n return cases[value];\n}\n\n/**\n * Get true page offset Y summing own and all parent offsets\n */\nexport const getTrueOffsetY = (el: HTMLElement) => {\n let offset = el.offsetTop;\n\n if (el.parentElement) {\n offset += getTrueOffsetY(el.parentElement);\n }\n\n return offset;\n};\n"],"names":["SCROLL_INTO_VIEW_DEFAULT_DURATION","scrollToY","targetY","duration","start","previousTimeStamp","initY","window","scrollY","limit","document","documentElement","scrollHeight","clientHeight","step","timestamp","elapsed","progress","scroll","top","requestAnimationFrame","scrollIntoView","element","elementWindowY","getBoundingClientRect","y","innerHeight","styledSwitch","value","cases","getTrueOffsetY","el","offset","offsetTop","parentElement"],"mappings":";;;AAEA,MAAMA,iCAAoC,GAAA,GAAA;AAQ7B,MAAAC,SAAA,GAAYA,CAACC,OAAA,EAAiBC,QAAqB,KAAA;EAC1D,IAAAC,KAAA;EACA,IAAAC,iBAAA;EACJ,MAAMC,QAAQC,MAAO,CAAAC,OAAA;EACrB,MAAMC,KACJ,GAAAC,QAAA,CAASC,eAAgB,CAAAC,YAAA,GACzBF,SAASC,eAAgB,CAAAE,YAAA;EAE3B,SAASC,KAAKC,SAAmB,EAAA;IAC/BX,KAAA,KAAU,WAAcA,KAAQ,GAAAW,SAAA,CAAA;IAChC,MAAMC,UAAUD,SAAY,GAAAX,KAAA;IACtB,MAAAa,QAAA,GAAA,CAAYF,YAAYX,KAAS,IAAAD,QAAA;IAEvC,IAAIE,sBAAsBU,SAAW,EAAA;MACnCR,MAAA,CAAOW,MAAO,CAAA;QACZC,OAAOjB,OAAU,GAAAO,KAAA,GAAQA,KAAQ,GAAAP,OAAA,IAAWI,SAASW,QAAW,GAAAX;MAAA,CACjE,CAAA;IACH;IAEA,IAAIU,UAAUb,QAAU,EAAA;MACFE,iBAAA,GAAAU,SAAA;MACpBR,MAAA,CAAOa,sBAAsBN,IAAI,CAAA;IAAA,CAC5B,MAAA;MACLP,MAAA,CAAOW,MAAO,CAAA;QACZC,GAAK,EAAAjB;MAAA,CACN,CAAA;IACH;EACF;EAEAK,MAAA,CAAOa,sBAAsBN,IAAI,CAAA;AACnC,CAAA;AASO,MAAMO,cAAiB,GAAAA,CAC5BC,OACA,EAAAnB,QAAA,GAAWH,iCACR,KAAA;EACC,IAAA,OAAOO,WAAW,WAAa,EAAA;EACnC,IAAI,CAACe,OAAS,EAAA;EAGd,MAAMC,cAAiB,GAAAD,OAAA,CAAQE,qBAAsB,CAAA,CAAA,CAAEL,MAAMZ,MAAO,CAAAC,OAAA;EAEpE,MAAMiB,CAAI,GAAAF,cAAA,GAAiBhB,MAAO,CAAAmB,WAAA,IAAe,CAAI,GAAA,CAAA,CAAA;EAGrDzB,SAAA,CAAUwB,GAAGtB,QAAQ,CAAA;AACvB,CAAA;AAWgB,SAAAwB,YAAAA,CACdC,OACAC,KACA,EAAA;EACA,OAAOA,MAAMD,KAAK,CAAA;AACpB;AAKa,MAAAE,cAAA,GAAkBC,EAAoB,IAAA;EACjD,IAAIC,SAASD,EAAG,CAAAE,SAAA;EAEhB,IAAIF,GAAGG,aAAe,EAAA;IACVF,MAAA,IAAAF,cAAA,CAAeC,GAAGG,aAAa,CAAA;EAC3C;EAEO,OAAAF,MAAA;AACT,CAAA;;;;"}
1
+ {"version":3,"file":"ux.js","sources":["../../src/helpers/ux.ts"],"sourcesContent":["import type { FlattenSimpleInterpolation } from \"styled-components\";\n\nconst SCROLL_INTO_VIEW_DEFAULT_DURATION = 600;\n\n/**\n * Same as `window.scrollTo` but allows custom duration\n *\n * ! The scroll action won't be replaced if called multiple times\n * ? Instead `useScrollToY` hook will do that if needed\n */\nexport const scrollToY = (targetY: number, duration: number) => {\n let start: number;\n let previousTimeStamp: number;\n const initY = window.scrollY;\n const limit =\n document.documentElement.scrollHeight -\n document.documentElement.clientHeight;\n\n function step(timestamp: number) {\n start === undefined && (start = timestamp);\n const elapsed = timestamp - start;\n const progress = (timestamp - start) / duration;\n\n if (previousTimeStamp !== timestamp) {\n window.scroll({\n top: ((targetY > limit ? limit : targetY) - initY) * progress + initY,\n });\n }\n\n if (elapsed < duration) {\n previousTimeStamp = timestamp;\n window.requestAnimationFrame(step);\n } else {\n window.scroll({\n top: targetY,\n });\n }\n }\n\n window.requestAnimationFrame(step);\n};\n\n/**\n * Scrolls to the element on the page\n *\n * ! This will scroll the entire page, do not use for inline scrolling\n *\n * @todo use Element.scrollIntoView() or Element.scrollIntoViewIfNeeded() when it's fully supported\n */\nexport const scrollIntoView = (\n element: Element | null,\n duration = SCROLL_INTO_VIEW_DEFAULT_DURATION,\n) => {\n if (typeof window === \"undefined\") return;\n if (!element) return;\n\n // Get scroll y target position\n const elementWindowY = element.getBoundingClientRect().top + window.scrollY;\n // Scroll to the element minus one third of the window height (so that it's at an optimal eye level)\n const y = elementWindowY - window.innerHeight * (1 / 3);\n\n // Animate\n scrollToY(y, duration);\n};\n\n/**\n * For use in styled components to reduce switch noise\n *\n * @deprecated Let's replace this with native switches - if ain't broke...\n * @example styledSwitch(variableWithMultipleCases, {\n * whenValueIsX: css`background: red;`,\n * whenValueIsY: css`background: blue;`,\n * })\n */\nexport function styledSwitch<K extends string>(\n value: K,\n cases: Record<K, FlattenSimpleInterpolation | string>,\n) {\n return cases[value];\n}\n\n/**\n * Get true page offset Y summing own and all parent offsets\n */\nexport const getTrueOffsetY = (el: HTMLElement) => {\n let offset = el.offsetTop;\n\n if (el.parentElement) {\n offset += getTrueOffsetY(el.parentElement);\n }\n\n return offset;\n};\n\n/**\n * Get true element width and height, including all margins and paddings.\n * Uses computed styles, and supports only margins that use px.\n */\nexport const getTrueSize = (\n el: HTMLElement,\n): { width: number; height: number } => {\n if (typeof window === \"undefined\") {\n return { width: 0, height: 0 };\n }\n\n const style = window.getComputedStyle(el);\n const px = (value: string): number =>\n /^[0-9]+px$/.test(value) ? parseFloat(value) : 0;\n\n return {\n width: el.offsetWidth + px(style.marginLeft) + px(style.marginRight),\n height: el.offsetHeight + px(style.marginTop) + px(style.marginBottom),\n };\n};\n"],"names":["SCROLL_INTO_VIEW_DEFAULT_DURATION","scrollToY","targetY","duration","start","previousTimeStamp","initY","window","scrollY","limit","document","documentElement","scrollHeight","clientHeight","step","timestamp","elapsed","progress","scroll","top","requestAnimationFrame","scrollIntoView","element","elementWindowY","getBoundingClientRect","y","innerHeight","styledSwitch","value","cases","getTrueOffsetY","el","offset","offsetTop","parentElement","getTrueSize","width","height","style","getComputedStyle","px","test","parseFloat","offsetWidth","marginLeft","marginRight","offsetHeight","marginTop","marginBottom"],"mappings":";;;AAEA,MAAMA,iCAAoC,GAAA,GAAA;AAQ7B,MAAAC,SAAA,GAAYA,CAACC,OAAA,EAAiBC,QAAqB,KAAA;EAC1D,IAAAC,KAAA;EACA,IAAAC,iBAAA;EACJ,MAAMC,QAAQC,MAAO,CAAAC,OAAA;EACrB,MAAMC,KACJ,GAAAC,QAAA,CAASC,eAAgB,CAAAC,YAAA,GACzBF,SAASC,eAAgB,CAAAE,YAAA;EAE3B,SAASC,KAAKC,SAAmB,EAAA;IAC/BX,KAAA,KAAU,WAAcA,KAAQ,GAAAW,SAAA,CAAA;IAChC,MAAMC,UAAUD,SAAY,GAAAX,KAAA;IACtB,MAAAa,QAAA,GAAA,CAAYF,YAAYX,KAAS,IAAAD,QAAA;IAEvC,IAAIE,sBAAsBU,SAAW,EAAA;MACnCR,MAAA,CAAOW,MAAO,CAAA;QACZC,OAAOjB,OAAU,GAAAO,KAAA,GAAQA,KAAQ,GAAAP,OAAA,IAAWI,SAASW,QAAW,GAAAX;MAAA,CACjE,CAAA;IACH;IAEA,IAAIU,UAAUb,QAAU,EAAA;MACFE,iBAAA,GAAAU,SAAA;MACpBR,MAAA,CAAOa,sBAAsBN,IAAI,CAAA;IAAA,CAC5B,MAAA;MACLP,MAAA,CAAOW,MAAO,CAAA;QACZC,GAAK,EAAAjB;MAAA,CACN,CAAA;IACH;EACF;EAEAK,MAAA,CAAOa,sBAAsBN,IAAI,CAAA;AACnC,CAAA;AASO,MAAMO,cAAiB,GAAAA,CAC5BC,OACA,EAAAnB,QAAA,GAAWH,iCACR,KAAA;EACC,IAAA,OAAOO,WAAW,WAAa,EAA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
44
  return offset;
45
45
  };
46
- export { getTrueOffsetY, scrollIntoView, scrollToY, styledSwitch };
46
+ const getTrueSize = el => {
47
+ if (typeof window === "undefined") {
48
+ return {
49
+ width: 0,
50
+ height: 0
51
+ };
52
+ }
53
+ const style = window.getComputedStyle(el);
54
+ const px = value => /^[0-9]+px$/.test(value) ? parseFloat(value) : 0;
55
+ return {
56
+ width: el.offsetWidth + px(style.marginLeft) + px(style.marginRight),
57
+ height: el.offsetHeight + px(style.marginTop) + px(style.marginBottom)
58
+ };
59
+ };
60
+ export { getTrueOffsetY, getTrueSize, scrollIntoView, scrollToY, styledSwitch };
47
61
  //# sourceMappingURL=ux.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ux.mjs","sources":["../../src/helpers/ux.ts"],"sourcesContent":["import type { FlattenSimpleInterpolation } from \"styled-components\";\n\nconst SCROLL_INTO_VIEW_DEFAULT_DURATION = 600;\n\n/**\n * Same as `window.scrollTo` but allows custom duration\n *\n * ! The scroll action won't be replaced if called multiple times\n * ? Instead `useScrollToY` hook will do that if needed\n */\nexport const scrollToY = (targetY: number, duration: number) => {\n let start: number;\n let previousTimeStamp: number;\n const initY = window.scrollY;\n const limit =\n document.documentElement.scrollHeight -\n document.documentElement.clientHeight;\n\n function step(timestamp: number) {\n start === undefined && (start = timestamp);\n const elapsed = timestamp - start;\n const progress = (timestamp - start) / duration;\n\n if (previousTimeStamp !== timestamp) {\n window.scroll({\n top: ((targetY > limit ? limit : targetY) - initY) * progress + initY,\n });\n }\n\n if (elapsed < duration) {\n previousTimeStamp = timestamp;\n window.requestAnimationFrame(step);\n } else {\n window.scroll({\n top: targetY,\n });\n }\n }\n\n window.requestAnimationFrame(step);\n};\n\n/**\n * Scrolls to the element on the page\n *\n * ! This will scroll the entire page, do not use for inline scrolling\n *\n * @todo use Element.scrollIntoView() or Element.scrollIntoViewIfNeeded() when it's fully supported\n */\nexport const scrollIntoView = (\n element: Element | null,\n duration = SCROLL_INTO_VIEW_DEFAULT_DURATION,\n) => {\n if (typeof window === \"undefined\") return;\n if (!element) return;\n\n // Get scroll y target position\n const elementWindowY = element.getBoundingClientRect().top + window.scrollY;\n // Scroll to the element minus one third of the window height (so that it's at an optimal eye level)\n const y = elementWindowY - window.innerHeight * (1 / 3);\n\n // Animate\n scrollToY(y, duration);\n};\n\n/**\n * For use in styled components to reduce switch noise\n *\n * @deprecated Let's replace this with native switches - if ain't broke...\n * @example styledSwitch(variableWithMultipleCases, {\n * whenValueIsX: css`background: red;`,\n * whenValueIsY: css`background: blue;`,\n * })\n */\nexport function styledSwitch(\n value: string,\n cases: Record<string, FlattenSimpleInterpolation | string>,\n) {\n return cases[value];\n}\n\n/**\n * Get true page offset Y summing own and all parent offsets\n */\nexport const getTrueOffsetY = (el: HTMLElement) => {\n let offset = el.offsetTop;\n\n if (el.parentElement) {\n offset += getTrueOffsetY(el.parentElement);\n }\n\n return offset;\n};\n"],"names":["SCROLL_INTO_VIEW_DEFAULT_DURATION","scrollToY","targetY","duration","start","previousTimeStamp","initY","window","scrollY","limit","document","documentElement","scrollHeight","clientHeight","step","timestamp","elapsed","progress","scroll","top","requestAnimationFrame","scrollIntoView","element","elementWindowY","getBoundingClientRect","y","innerHeight","styledSwitch","value","cases","getTrueOffsetY","el","offset","offsetTop","parentElement"],"mappings":";;AAEA,MAAMA,iCAAoC,GAAA,GAAA;AAQ7B,MAAAC,SAAA,GAAYA,CAACC,OAAA,EAAiBC,QAAqB,KAAA;EAC1D,IAAAC,KAAA;EACA,IAAAC,iBAAA;EACJ,MAAMC,QAAQC,MAAO,CAAAC,OAAA;EACrB,MAAMC,KACJ,GAAAC,QAAA,CAASC,eAAgB,CAAAC,YAAA,GACzBF,SAASC,eAAgB,CAAAE,YAAA;EAE3B,SAASC,KAAKC,SAAmB,EAAA;IAC/BX,KAAA,KAAU,WAAcA,KAAQ,GAAAW,SAAA,CAAA;IAChC,MAAMC,UAAUD,SAAY,GAAAX,KAAA;IACtB,MAAAa,QAAA,GAAA,CAAYF,YAAYX,KAAS,IAAAD,QAAA;IAEvC,IAAIE,sBAAsBU,SAAW,EAAA;MACnCR,MAAA,CAAOW,MAAO,CAAA;QACZC,OAAOjB,OAAU,GAAAO,KAAA,GAAQA,KAAQ,GAAAP,OAAA,IAAWI,SAASW,QAAW,GAAAX;MAAA,CACjE,CAAA;IACH;IAEA,IAAIU,UAAUb,QAAU,EAAA;MACFE,iBAAA,GAAAU,SAAA;MACpBR,MAAA,CAAOa,sBAAsBN,IAAI,CAAA;IAAA,CAC5B,MAAA;MACLP,MAAA,CAAOW,MAAO,CAAA;QACZC,GAAK,EAAAjB;MAAA,CACN,CAAA;IACH;EACF;EAEAK,MAAA,CAAOa,sBAAsBN,IAAI,CAAA;AACnC,CAAA;AASO,MAAMO,cAAiB,GAAAA,CAC5BC,OACA,EAAAnB,QAAA,GAAWH,iCACR,KAAA;EACC,IAAA,OAAOO,WAAW,WAAa,EAAA;EACnC,IAAI,CAACe,OAAS,EAAA;EAGd,MAAMC,cAAiB,GAAAD,OAAA,CAAQE,qBAAsB,CAAA,CAAA,CAAEL,MAAMZ,MAAO,CAAAC,OAAA;EAEpE,MAAMiB,CAAI,GAAAF,cAAA,GAAiBhB,MAAO,CAAAmB,WAAA,IAAe,CAAI,GAAA,CAAA,CAAA;EAGrDzB,SAAA,CAAUwB,GAAGtB,QAAQ,CAAA;AACvB,CAAA;AAWgB,SAAAwB,YAAAA,CACdC,OACAC,KACA,EAAA;EACA,OAAOA,MAAMD,KAAK,CAAA;AACpB;AAKa,MAAAE,cAAA,GAAkBC,EAAoB,IAAA;EACjD,IAAIC,SAASD,EAAG,CAAAE,SAAA;EAEhB,IAAIF,GAAGG,aAAe,EAAA;IACVF,MAAA,IAAAF,cAAA,CAAeC,GAAGG,aAAa,CAAA;EAC3C;EAEO,OAAAF,MAAA;AACT,CAAA;"}
1
+ {"version":3,"file":"ux.mjs","sources":["../../src/helpers/ux.ts"],"sourcesContent":["import type { FlattenSimpleInterpolation } from \"styled-components\";\n\nconst SCROLL_INTO_VIEW_DEFAULT_DURATION = 600;\n\n/**\n * Same as `window.scrollTo` but allows custom duration\n *\n * ! The scroll action won't be replaced if called multiple times\n * ? Instead `useScrollToY` hook will do that if needed\n */\nexport const scrollToY = (targetY: number, duration: number) => {\n let start: number;\n let previousTimeStamp: number;\n const initY = window.scrollY;\n const limit =\n document.documentElement.scrollHeight -\n document.documentElement.clientHeight;\n\n function step(timestamp: number) {\n start === undefined && (start = timestamp);\n const elapsed = timestamp - start;\n const progress = (timestamp - start) / duration;\n\n if (previousTimeStamp !== timestamp) {\n window.scroll({\n top: ((targetY > limit ? limit : targetY) - initY) * progress + initY,\n });\n }\n\n if (elapsed < duration) {\n previousTimeStamp = timestamp;\n window.requestAnimationFrame(step);\n } else {\n window.scroll({\n top: targetY,\n });\n }\n }\n\n window.requestAnimationFrame(step);\n};\n\n/**\n * Scrolls to the element on the page\n *\n * ! This will scroll the entire page, do not use for inline scrolling\n *\n * @todo use Element.scrollIntoView() or Element.scrollIntoViewIfNeeded() when it's fully supported\n */\nexport const scrollIntoView = (\n element: Element | null,\n duration = SCROLL_INTO_VIEW_DEFAULT_DURATION,\n) => {\n if (typeof window === \"undefined\") return;\n if (!element) return;\n\n // Get scroll y target position\n const elementWindowY = element.getBoundingClientRect().top + window.scrollY;\n // Scroll to the element minus one third of the window height (so that it's at an optimal eye level)\n const y = elementWindowY - window.innerHeight * (1 / 3);\n\n // Animate\n scrollToY(y, duration);\n};\n\n/**\n * For use in styled components to reduce switch noise\n *\n * @deprecated Let's replace this with native switches - if ain't broke...\n * @example styledSwitch(variableWithMultipleCases, {\n * whenValueIsX: css`background: red;`,\n * whenValueIsY: css`background: blue;`,\n * })\n */\nexport function styledSwitch<K extends string>(\n value: K,\n cases: Record<K, FlattenSimpleInterpolation | string>,\n) {\n return cases[value];\n}\n\n/**\n * Get true page offset Y summing own and all parent offsets\n */\nexport const getTrueOffsetY = (el: HTMLElement) => {\n let offset = el.offsetTop;\n\n if (el.parentElement) {\n offset += getTrueOffsetY(el.parentElement);\n }\n\n return offset;\n};\n\n/**\n * Get true element width and height, including all margins and paddings.\n * Uses computed styles, and supports only margins that use px.\n */\nexport const getTrueSize = (\n el: HTMLElement,\n): { width: number; height: number } => {\n if (typeof window === \"undefined\") {\n return { width: 0, height: 0 };\n }\n\n const style = window.getComputedStyle(el);\n const px = (value: string): number =>\n /^[0-9]+px$/.test(value) ? parseFloat(value) : 0;\n\n return {\n width: el.offsetWidth + px(style.marginLeft) + px(style.marginRight),\n height: el.offsetHeight + px(style.marginTop) + px(style.marginBottom),\n };\n};\n"],"names":["SCROLL_INTO_VIEW_DEFAULT_DURATION","scrollToY","targetY","duration","start","previousTimeStamp","initY","window","scrollY","limit","document","documentElement","scrollHeight","clientHeight","step","timestamp","elapsed","progress","scroll","top","requestAnimationFrame","scrollIntoView","element","elementWindowY","getBoundingClientRect","y","innerHeight","styledSwitch","value","cases","getTrueOffsetY","el","offset","offsetTop","parentElement","getTrueSize","width","height","style","getComputedStyle","px","test","parseFloat","offsetWidth","marginLeft","marginRight","offsetHeight","marginTop","marginBottom"],"mappings":";;AAEA,MAAMA,iCAAoC,GAAA,GAAA;AAQ7B,MAAAC,SAAA,GAAYA,CAACC,OAAA,EAAiBC,QAAqB,KAAA;EAC1D,IAAAC,KAAA;EACA,IAAAC,iBAAA;EACJ,MAAMC,QAAQC,MAAO,CAAAC,OAAA;EACrB,MAAMC,KACJ,GAAAC,QAAA,CAASC,eAAgB,CAAAC,YAAA,GACzBF,SAASC,eAAgB,CAAAE,YAAA;EAE3B,SAASC,KAAKC,SAAmB,EAAA;IAC/BX,KAAA,KAAU,WAAcA,KAAQ,GAAAW,SAAA,CAAA;IAChC,MAAMC,UAAUD,SAAY,GAAAX,KAAA;IACtB,MAAAa,QAAA,GAAA,CAAYF,YAAYX,KAAS,IAAAD,QAAA;IAEvC,IAAIE,sBAAsBU,SAAW,EAAA;MACnCR,MAAA,CAAOW,MAAO,CAAA;QACZC,OAAOjB,OAAU,G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AE,CAAA;EAClC,MAAAS,EAAA,GAAMZ,KACV,IAAA,YAAA,CAAaa,KAAKb,KAAK,CAAA,GAAIc,UAAW,CAAAd,KAAK,CAAI,GAAA,CAAA;EAE1C,OAAA;IACLQ,KAAA,EAAOL,GAAGY,WAAc,GAAAH,EAAA,CAAGF,MAAMM,UAAU,CAAA,GAAIJ,EAAG,CAAAF,KAAA,CAAMO,WAAW,CAAA;IACnER,MAAA,EAAQN,GAAGe,YAAe,GAAAN,EAAA,CAAGF,MAAMS,SAAS,CAAA,GAAIP,EAAG,CAAAF,KAAA,CAAMU,YAAY;EAAA,CACvE;AACF,CAAA;"}
@@ -3,3 +3,4 @@ export * from "./constants";
3
3
  export * from "./generated";
4
4
  export * from "./object";
5
5
  export * from "./utils";
6
+ export * from "./product";
@@ -5,6 +5,7 @@ var constants = require('./constants.js');
5
5
  var generated = require('./generated.js');
6
6
  require('./object.js');
7
7
  require('./utils.js');
8
+ var product = require('./product.js');
8
9
  "use strict";
9
10
  exports.AddressUsageType = constants.AddressUsageType;
10
11
  exports.Language = constants.Language;
@@ -18,4 +19,5 @@ exports.Unit = generated.Unit;
18
19
  exports.UnitSystem = generated.UnitSystem;
19
20
  exports.UserAssignedCountryCode = generated.UserAssignedCountryCode;
20
21
  exports.ValidateTaxStatus = generated.ValidateTaxStatus;
22
+ exports.DisplayProductStatus = product.DisplayProductStatus;
21
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
@@ -3,5 +3,6 @@ export { AddressUsageType, Language } from './constants.mjs';
3
3
  export { AddressType, CountryCode, Currency, GlobalStoreId, ProductLine, StoreId, Unit, UnitSystem, UserAssignedCountryCode, ValidateTaxStatus } from './generated.mjs';
4
4
  import './object.mjs';
5
5
  import './utils.mjs';
6
+ export { DisplayProductStatus } from './product.mjs';
6
7
  "use strict";
7
8
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}