@ubnt/store.core 9.17.0-alpha.4 → 9.17.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 (429) hide show
  1. package/CHANGELOG.md +2 -154
  2. package/lib/_virtual/_virtual_multi-entry.js +12 -27
  3. package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
  4. package/lib/_virtual/_virtual_multi-entry.mjs +10 -14
  5. package/lib/_virtual/_virtual_multi-entry.mjs.map +1 -1
  6. package/lib/apis/smartcat.js +1 -4
  7. package/lib/apis/smartcat.js.map +1 -1
  8. package/lib/apis/smartcat.mjs +1 -4
  9. package/lib/apis/smartcat.mjs.map +1 -1
  10. package/lib/{components/ResourceCalculatorV1/assets/consoles/ucg-max.png.js → assets/icons/menu/icon-globe.svg.js} +6 -6
  11. package/lib/assets/icons/menu/icon-globe.svg.js.map +1 -0
  12. package/lib/assets/icons/menu/icon-globe.svg.mjs +3 -0
  13. package/lib/assets/icons/menu/icon-globe.svg.mjs.map +1 -0
  14. package/lib/components/CategoryTabs/CategoryTabs.styles.d.ts +1 -1
  15. package/lib/components/CategoryTabs/CategoryTabs.types.d.ts +1 -1
  16. package/lib/components/CloserLookSection/CloserLookSection.js.map +1 -1
  17. package/lib/components/CloserLookSection/CloserLookSection.mjs.map +1 -1
  18. package/lib/components/Compare/Compare.styles.d.ts +5 -5
  19. package/lib/components/Container/Container.d.ts +1 -1
  20. package/lib/components/Container/Container.js +3 -4
  21. package/lib/components/Container/Container.js.map +1 -1
  22. package/lib/components/Container/Container.mjs +4 -5
  23. package/lib/components/Container/Container.mjs.map +1 -1
  24. package/lib/components/CustomImage/CustomImage.js.map +1 -1
  25. package/lib/components/CustomImage/CustomImage.mjs.map +1 -1
  26. package/lib/components/FeaturesSection_deprecated/FeaturesSection.js.map +1 -1
  27. package/lib/components/FeaturesSection_deprecated/FeaturesSection.mjs.map +1 -1
  28. package/lib/components/Footer/hooks/useFooterContent.d.ts +3 -1
  29. package/lib/components/Footer/hooks/useFooterContent.js +8 -1
  30. package/lib/components/Footer/hooks/useFooterContent.js.map +1 -1
  31. package/lib/components/Footer/hooks/useFooterContent.mjs +8 -1
  32. package/lib/components/Footer/hooks/useFooterContent.mjs.map +1 -1
  33. package/lib/components/Footer/translations/ar.json.js +1 -1
  34. package/lib/components/Footer/translations/ar.json.mjs +1 -1
  35. package/lib/components/Footer/translations/de.json.js +1 -1
  36. package/lib/components/Footer/translations/de.json.mjs +1 -1
  37. package/lib/components/Footer/translations/el.json.js +1 -1
  38. package/lib/components/Footer/translations/el.json.mjs +1 -1
  39. package/lib/components/Footer/translations/en.json.js +1 -0
  40. package/lib/components/Footer/translations/en.json.js.map +1 -1
  41. package/lib/components/Footer/translations/en.json.mjs +1 -0
  42. package/lib/components/Footer/translations/en.json.mjs.map +1 -1
  43. package/lib/components/Footer/translations/es.json.js +1 -1
  44. package/lib/components/Footer/translations/es.json.mjs +1 -1
  45. package/lib/components/Footer/translations/fr.json.js +4 -4
  46. package/lib/components/Footer/translations/fr.json.mjs +4 -4
  47. package/lib/components/Footer/translations/it.json.js +1 -1
  48. package/lib/components/Footer/translations/it.json.mjs +1 -1
  49. package/lib/components/Footer/translations/ja.json.js +2 -2
  50. package/lib/components/Footer/translations/ja.json.mjs +2 -2
  51. package/lib/components/Footer/translations/pt-BR.json.js +1 -1
  52. package/lib/components/Footer/translations/pt-BR.json.mjs +1 -1
  53. package/lib/components/Footer/translations/zh-Hans.json.js +4 -4
  54. package/lib/components/Footer/translations/zh-Hans.json.mjs +4 -4
  55. package/lib/components/Footer/translations/zh-Hant-TW.json.js +1 -1
  56. package/lib/components/Footer/translations/zh-Hant-TW.json.mjs +1 -1
  57. package/lib/components/GridGallery/GridGallery.js.map +1 -1
  58. package/lib/components/GridGallery/GridGallery.mjs.map +1 -1
  59. package/lib/components/Header/AccountMenu/AccountMenu.js +12 -20
  60. package/lib/components/Header/AccountMenu/AccountMenu.js.map +1 -1
  61. package/lib/components/Header/AccountMenu/AccountMenu.mjs +14 -22
  62. package/lib/components/Header/AccountMenu/AccountMenu.mjs.map +1 -1
  63. package/lib/components/Header/AccountMenu/megaphone.http.service.js +1 -4
  64. package/lib/components/Header/AccountMenu/megaphone.http.service.js.map +1 -1
  65. package/lib/components/Header/AccountMenu/megaphone.http.service.mjs +1 -4
  66. package/lib/components/Header/AccountMenu/megaphone.http.service.mjs.map +1 -1
  67. package/lib/components/Header/CartModalV2/CartModal.js.map +1 -1
  68. package/lib/components/Header/CartModalV2/CartModal.mjs.map +1 -1
  69. package/lib/components/Header/Header.js.map +1 -1
  70. package/lib/components/Header/Header.mjs.map +1 -1
  71. package/lib/components/Header/Header.styles.d.ts +2 -2
  72. package/lib/components/Header/Header.types.d.ts +4 -8
  73. package/lib/components/Header/Header.types.js +1 -2
  74. package/lib/components/Header/Header.types.js.map +1 -1
  75. package/lib/components/Header/Header.types.mjs +1 -2
  76. package/lib/components/Header/Header.types.mjs.map +1 -1
  77. package/lib/components/Header/LanguageFrame/LanguageFrame.js.map +1 -1
  78. package/lib/components/Header/LanguageFrame/LanguageFrame.mjs.map +1 -1
  79. package/lib/components/Header/LanguageFrame/Mobile/Mobile.js.map +1 -1
  80. package/lib/components/Header/LanguageFrame/Mobile/Mobile.mjs.map +1 -1
  81. package/lib/components/Header/MenuItem/MenuItem.styles.d.ts +1 -1
  82. package/lib/components/Header/MenuItem/MenuItem.styles.js +1 -1
  83. package/lib/components/Header/MenuItem/MenuItem.styles.js.map +1 -1
  84. package/lib/components/Header/MenuItem/MenuItem.styles.mjs +1 -1
  85. package/lib/components/Header/MenuItem/MenuItem.styles.mjs.map +1 -1
  86. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.d.ts +1 -1
  87. package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.d.ts +1 -1
  88. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.d.ts +1 -1
  89. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js +63 -85
  90. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js.map +1 -1
  91. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs +64 -86
  92. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs.map +1 -1
  93. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.d.ts +0 -6
  94. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js +1 -11
  95. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js.map +1 -1
  96. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs +2 -10
  97. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs.map +1 -1
  98. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.types.d.ts +1 -5
  99. package/lib/components/Header/Overlay/Overlay.js.map +1 -1
  100. package/lib/components/Header/Overlay/Overlay.mjs.map +1 -1
  101. package/lib/components/Header/ProHeader/ProHeader.d.ts +4 -2
  102. package/lib/components/Header/ProHeader/ProHeader.js +36 -145
  103. package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
  104. package/lib/components/Header/ProHeader/ProHeader.mjs +39 -146
  105. package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
  106. package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +1 -4
  107. package/lib/components/Header/ProHeader/ProHeader.styles.js +18 -20
  108. package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
  109. package/lib/components/Header/ProHeader/ProHeader.styles.mjs +19 -18
  110. package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
  111. package/lib/components/Header/translations/en.json.js +1 -4
  112. package/lib/components/Header/translations/en.json.js.map +1 -1
  113. package/lib/components/Header/translations/en.json.mjs +2 -4
  114. package/lib/components/Header/translations/en.json.mjs.map +1 -1
  115. package/lib/components/Hero/Hero.styles.d.ts +2 -2
  116. package/lib/components/HeroFadeGallery/HeroFadeGallery.styles.d.ts +1 -1
  117. package/lib/components/HowToUseSection/HowToUseSection.styles.d.ts +2 -2
  118. package/lib/components/ImageSequence/ImageSequence.js.map +1 -1
  119. package/lib/components/ImageSequence/ImageSequence.mjs.map +1 -1
  120. package/lib/components/LandingPage/Cards/Card/Card.js.map +1 -1
  121. package/lib/components/LandingPage/Cards/Card/Card.mjs.map +1 -1
  122. package/lib/components/LandingPage/Cards/Cards.js.map +1 -1
  123. package/lib/components/LandingPage/Cards/Cards.mjs.map +1 -1
  124. package/lib/components/LandingPagePro/LandingPagePro.d.ts +0 -3
  125. package/lib/components/LandingPagePro/LandingPagePro.js +3 -3
  126. package/lib/components/LandingPagePro/LandingPagePro.js.map +1 -1
  127. package/lib/components/LandingPagePro/LandingPagePro.mjs +2 -2
  128. package/lib/components/LandingPagePro/LandingPagePro.mjs.map +1 -1
  129. package/lib/components/LandingPagePro/LandingPagePro.styles.d.ts +1 -1
  130. package/lib/components/LayoutRenderer/LayoutRenderer.styles.d.ts +1 -1
  131. package/lib/components/LayoutRendererV1/LayoutRenderer.styles.d.ts +3 -3
  132. package/lib/components/LayoutRendererV2/LayoutRenderer.styles.d.ts +3 -3
  133. package/lib/components/MicrositeIntroductionBlock/MicrositeIntroductionBlock.js.map +1 -1
  134. package/lib/components/MicrositeIntroductionBlock/MicrositeIntroductionBlock.mjs.map +1 -1
  135. package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.js.map +1 -1
  136. package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.mjs.map +1 -1
  137. package/lib/components/MicrositeProductGrid/MicrositeProductGrid.js.map +1 -1
  138. package/lib/components/MicrositeProductGrid/MicrositeProductGrid.mjs.map +1 -1
  139. package/lib/components/MicrositeSectionWrap/MicrositeSectionWrap.styles.d.ts +1 -1
  140. package/lib/components/Microsites/MicrositeProductPage.js +39 -0
  141. package/lib/components/Microsites/MicrositeProductPage.js.map +1 -1
  142. package/lib/components/Microsites/MicrositeProductPage.mjs +39 -0
  143. package/lib/components/Microsites/MicrositeProductPage.mjs.map +1 -1
  144. package/lib/components/ModelCompareV3/StickyGrid/StickyGridHeader.js.map +1 -1
  145. package/lib/components/ModelCompareV3/StickyGrid/StickyGridHeader.mjs.map +1 -1
  146. package/lib/components/ProductCompare/ProductCompare.js.map +1 -1
  147. package/lib/components/ProductCompare/ProductCompare.mjs.map +1 -1
  148. package/lib/components/ProductSectionNavigation/ProductSectionNavigation.styles.d.ts +1 -1
  149. package/lib/components/ProductSectionNavigationV2/ProductSectionNavigation.styles.d.ts +1 -1
  150. package/lib/components/ProductTechSpecs/ProductTechSpecs.styles.d.ts +1 -1
  151. package/lib/components/QuantityControls/QuantityControls.js.map +1 -1
  152. package/lib/components/QuantityControls/QuantityControls.mjs.map +1 -1
  153. package/lib/components/RelatedProducts/RelatedProducts.js.map +1 -1
  154. package/lib/components/RelatedProducts/RelatedProducts.mjs.map +1 -1
  155. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js +17 -313
  156. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js.map +1 -1
  157. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs +17 -311
  158. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs.map +1 -1
  159. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.d.ts +2 -3
  160. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.js +0 -2
  161. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.js.map +1 -1
  162. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.mjs +0 -2
  163. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.mjs.map +1 -1
  164. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.js +34 -120
  165. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.js.map +1 -1
  166. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.mjs +34 -120
  167. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.mjs.map +1 -1
  168. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.d.ts +2 -16
  169. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.js +12 -54
  170. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.js.map +1 -1
  171. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.mjs +11 -50
  172. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.mjs.map +1 -1
  173. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/assets/ArrowLeftPrimary.svg.js +5 -5
  174. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/assets/ArrowRightPrimary.svg.js +5 -5
  175. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +1 -1
  176. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js.map +1 -1
  177. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
  178. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs.map +1 -1
  179. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.js +0 -2
  180. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.js.map +1 -1
  181. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.mjs +0 -2
  182. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.mjs.map +1 -1
  183. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.js +1 -1
  184. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.js.map +1 -1
  185. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.mjs +1 -1
  186. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.mjs.map +1 -1
  187. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js +2 -2
  188. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js.map +1 -1
  189. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs +2 -2
  190. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs.map +1 -1
  191. package/lib/components/ResourceCalculatorV1/ResourceCalculator.js +2 -1
  192. package/lib/components/ResourceCalculatorV1/ResourceCalculator.js.map +1 -1
  193. package/lib/components/ResourceCalculatorV1/ResourceCalculator.mjs +2 -1
  194. package/lib/components/ResourceCalculatorV1/ResourceCalculator.mjs.map +1 -1
  195. package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/HorizontalOptionSelect.d.ts +1 -1
  196. package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/HorizontalOptionSelect.js +1 -3
  197. package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.js.map +1 -0
  198. package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/HorizontalOptionSelect.mjs +1 -3
  199. package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.mjs.map +1 -0
  200. package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/HorizontalOptionSelect.styles.d.ts +0 -1
  201. package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/HorizontalOptionSelect.styles.js +7 -10
  202. package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.js.map +1 -0
  203. package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/HorizontalOptionSelect.styles.mjs +7 -10
  204. package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.mjs.map +1 -0
  205. package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/HorizontalOptionSelect.types.d.ts +0 -1
  206. package/lib/components/ResourceCalculatorV1/components/index.d.ts +1 -0
  207. package/lib/components/ResourceCalculatorV1/components/index.js +5 -0
  208. package/lib/components/{Header/Navigation/ProMenu → ResourceCalculatorV1/components}/index.js.map +1 -1
  209. package/lib/components/ResourceCalculatorV1/components/index.mjs +3 -0
  210. package/lib/components/ResourceCalculatorV1/translations/en.json.js +4 -6
  211. package/lib/components/ResourceCalculatorV1/translations/en.json.js.map +1 -1
  212. package/lib/components/ResourceCalculatorV1/translations/en.json.mjs +4 -6
  213. package/lib/components/ResourceCalculatorV1/translations/en.json.mjs.map +1 -1
  214. package/lib/components/ResourceCalculatorV1/translations/useResourceCalculatorTranslation.d.ts +2 -2
  215. package/lib/components/ReverseLoopingVideo/ReverseLoopingVideo.js.map +1 -1
  216. package/lib/components/ReverseLoopingVideo/ReverseLoopingVideo.mjs.map +1 -1
  217. package/lib/components/ScrollWrapper/ScrollWrapper.js.map +1 -1
  218. package/lib/components/ScrollWrapper/ScrollWrapper.mjs.map +1 -1
  219. package/lib/components/StorageSliders/Slider/Slider.js.map +1 -1
  220. package/lib/components/StorageSliders/Slider/Slider.mjs.map +1 -1
  221. package/lib/components/StorageSliders/StorageSliders.context.js.map +1 -1
  222. package/lib/components/StorageSliders/StorageSliders.context.mjs.map +1 -1
  223. package/lib/components/VariantSelector/Variant/Compatibility/Compatibility.js.map +1 -1
  224. package/lib/components/VariantSelector/Variant/Compatibility/Compatibility.mjs.map +1 -1
  225. package/lib/components/VariantSelector/Variant/Variant.js.map +1 -1
  226. package/lib/components/VariantSelector/Variant/Variant.mjs.map +1 -1
  227. package/lib/components/index.d.ts +0 -1
  228. package/lib/components/index.js +0 -2
  229. package/lib/components/index.js.map +1 -1
  230. package/lib/components/index.mjs +0 -2
  231. package/lib/components/index.mjs.map +1 -1
  232. package/lib/constants/proStoreCategories/mapping/index.d.ts +0 -1
  233. package/lib/constants/proStoreCategories/mapping/index.js +10 -15
  234. package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
  235. package/lib/constants/proStoreCategories/mapping/index.mjs +10 -15
  236. package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
  237. package/lib/constants/proStoreCategories/mapping/unifi.d.ts +1 -2
  238. package/lib/constants/proStoreCategories/mapping/unifi.js +0 -1
  239. package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
  240. package/lib/constants/proStoreCategories/mapping/unifi.mjs +0 -1
  241. package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
  242. package/lib/constants/proStoreCategories/translations/en.json.js +0 -3
  243. package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
  244. package/lib/constants/proStoreCategories/translations/en.json.mjs +1 -3
  245. package/lib/constants/proStoreCategories/translations/en.json.mjs.map +1 -1
  246. package/lib/constants/proStoreCategories/translations/fr.json.js +1 -1
  247. package/lib/constants/proStoreCategories/translations/fr.json.mjs +1 -1
  248. package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +1 -1
  249. package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +1 -1
  250. package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +1 -1
  251. package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +1 -1
  252. package/lib/constants/url.d.ts +2 -1
  253. package/lib/constants/url.js +1 -0
  254. package/lib/constants/url.js.map +1 -1
  255. package/lib/constants/url.mjs +1 -0
  256. package/lib/constants/url.mjs.map +1 -1
  257. package/lib/contexts/MenuContext/context.js +1 -1
  258. package/lib/contexts/MenuContext/context.js.map +1 -1
  259. package/lib/contexts/MenuContext/context.mjs +1 -1
  260. package/lib/contexts/MenuContext/context.mjs.map +1 -1
  261. package/lib/contexts/MenuContext/utils.js +1 -0
  262. package/lib/contexts/MenuContext/utils.js.map +1 -1
  263. package/lib/contexts/MenuContext/utils.mjs +1 -0
  264. package/lib/contexts/MenuContext/utils.mjs.map +1 -1
  265. package/lib/helpers/index.d.ts +0 -1
  266. package/lib/helpers/index.js +0 -11
  267. package/lib/helpers/index.js.map +1 -1
  268. package/lib/helpers/index.mjs +0 -1
  269. package/lib/helpers/index.mjs.map +1 -1
  270. package/lib/helpers/ux.d.ts +1 -9
  271. package/lib/helpers/ux.js +0 -15
  272. package/lib/helpers/ux.js.map +1 -1
  273. package/lib/helpers/ux.mjs +1 -15
  274. package/lib/helpers/ux.mjs.map +1 -1
  275. package/lib/hooks/useHasTouch.js.map +1 -1
  276. package/lib/hooks/useHasTouch.mjs.map +1 -1
  277. package/lib/hooks/useHorizontalScroll.js.map +1 -1
  278. package/lib/hooks/useHorizontalScroll.mjs.map +1 -1
  279. package/lib/types/index.d.ts +0 -1
  280. package/lib/types/index.js +0 -2
  281. package/lib/types/index.js.map +1 -1
  282. package/lib/types/index.mjs +0 -1
  283. package/lib/types/index.mjs.map +1 -1
  284. package/lib/utils/array.d.ts +0 -4
  285. package/lib/utils/array.js +0 -10
  286. package/lib/utils/array.js.map +1 -1
  287. package/lib/utils/array.mjs +1 -10
  288. package/lib/utils/array.mjs.map +1 -1
  289. package/lib/utils/money/constants.d.ts +25 -56
  290. package/lib/utils/money/constants.js +7 -72
  291. package/lib/utils/money/constants.js.map +1 -1
  292. package/lib/utils/money/constants.mjs +7 -70
  293. package/lib/utils/money/constants.mjs.map +1 -1
  294. package/lib/utils/money/format.d.ts +5 -10
  295. package/lib/utils/money/format.js +14 -22
  296. package/lib/utils/money/format.js.map +1 -1
  297. package/lib/utils/money/format.mjs +16 -23
  298. package/lib/utils/money/format.mjs.map +1 -1
  299. package/lib/utils/money/index.d.ts +1 -4
  300. package/lib/utils/money/index.js +8 -26
  301. package/lib/utils/money/index.js.map +1 -1
  302. package/lib/utils/money/index.mjs +4 -8
  303. package/lib/utils/money/index.mjs.map +1 -1
  304. package/lib/utils/money/misc.d.ts +28 -68
  305. package/lib/utils/money/misc.js +64 -35
  306. package/lib/utils/money/misc.js.map +1 -1
  307. package/lib/utils/money/misc.mjs +43 -32
  308. package/lib/utils/money/misc.mjs.map +1 -1
  309. package/lib/utils/money/tax.d.ts +2 -38
  310. package/lib/utils/money/tax.js +10 -46
  311. package/lib/utils/money/tax.js.map +1 -1
  312. package/lib/utils/money/tax.mjs +11 -42
  313. package/lib/utils/money/tax.mjs.map +1 -1
  314. package/lib/utils/money/types.d.ts +3 -78
  315. package/lib/utils/number.d.ts +1 -1
  316. package/lib/utils/number.js +1 -1
  317. package/lib/utils/number.js.map +1 -1
  318. package/lib/utils/number.mjs +1 -1
  319. package/lib/utils/number.mjs.map +1 -1
  320. package/lib/utils/validations/postalCodeSuperRefinement.js +3 -0
  321. package/lib/utils/validations/postalCodeSuperRefinement.js.map +1 -1
  322. package/lib/utils/validations/postalCodeSuperRefinement.mjs +3 -0
  323. package/lib/utils/validations/postalCodeSuperRefinement.mjs.map +1 -1
  324. package/lib/utils/validations/stateRegistrationNumberSuperRefinement.js +2 -0
  325. package/lib/utils/validations/stateRegistrationNumberSuperRefinement.js.map +1 -1
  326. package/lib/utils/validations/stateRegistrationNumberSuperRefinement.mjs +2 -0
  327. package/lib/utils/validations/stateRegistrationNumberSuperRefinement.mjs.map +1 -1
  328. package/lib/utils/validations/taxIdSuperRefinement.js +2 -0
  329. package/lib/utils/validations/taxIdSuperRefinement.js.map +1 -1
  330. package/lib/utils/validations/taxIdSuperRefinement.mjs +2 -0
  331. package/lib/utils/validations/taxIdSuperRefinement.mjs.map +1 -1
  332. package/lib/utils/validations.d.ts +15 -0
  333. package/lib/utils/validations.js +23 -0
  334. package/lib/utils/validations.js.map +1 -0
  335. package/lib/utils/validations.mjs +21 -0
  336. package/lib/utils/validations.mjs.map +1 -0
  337. package/lib/utils/variant.js.map +1 -1
  338. package/lib/utils/variant.mjs.map +1 -1
  339. package/lib/utils/wattage.js.map +1 -1
  340. package/lib/utils/wattage.mjs.map +1 -1
  341. package/package.json +1 -1
  342. package/lib/assets/efg.png +0 -0
  343. package/lib/assets/icon-location-pin.svg +0 -5
  344. package/lib/assets/icons/menu/icon-location-pin.svg.js +0 -27
  345. package/lib/assets/icons/menu/icon-location-pin.svg.js.map +0 -1
  346. package/lib/assets/icons/menu/icon-location-pin.svg.mjs +0 -3
  347. package/lib/assets/icons/menu/icon-location-pin.svg.mjs.map +0 -1
  348. package/lib/assets/ucg-max.png +0 -0
  349. package/lib/components/Header/Navigation/ProMenu/ProMenu.d.ts +0 -2
  350. package/lib/components/Header/Navigation/ProMenu/ProMenu.js +0 -109
  351. package/lib/components/Header/Navigation/ProMenu/ProMenu.js.map +0 -1
  352. package/lib/components/Header/Navigation/ProMenu/ProMenu.mjs +0 -87
  353. package/lib/components/Header/Navigation/ProMenu/ProMenu.mjs.map +0 -1
  354. package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.d.ts +0 -24
  355. package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.js +0 -154
  356. package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.js.map +0 -1
  357. package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.mjs +0 -138
  358. package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.mjs.map +0 -1
  359. package/lib/components/Header/Navigation/ProMenu/ProMenu.types.d.ts +0 -13
  360. package/lib/components/Header/Navigation/ProMenu/index.d.ts +0 -1
  361. package/lib/components/Header/Navigation/ProMenu/index.js +0 -6
  362. package/lib/components/Header/Navigation/ProMenu/index.mjs +0 -3
  363. package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.js.map +0 -1
  364. package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.mjs.map +0 -1
  365. package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.js.map +0 -1
  366. package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.mjs.map +0 -1
  367. package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.js +0 -27
  368. package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.js.map +0 -1
  369. package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.mjs +0 -3
  370. package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.mjs.map +0 -1
  371. package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.js.map +0 -1
  372. package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.mjs +0 -3
  373. package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.mjs.map +0 -1
  374. package/lib/helpers/product.d.ts +0 -87
  375. package/lib/helpers/product.js +0 -346
  376. package/lib/helpers/product.js.map +0 -1
  377. package/lib/helpers/product.mjs +0 -335
  378. package/lib/helpers/product.mjs.map +0 -1
  379. package/lib/types/product.d.ts +0 -87
  380. package/lib/types/product.js +0 -14
  381. package/lib/types/product.js.map +0 -1
  382. package/lib/types/product.mjs +0 -13
  383. package/lib/types/product.mjs.map +0 -1
  384. package/lib/utils/money/allocators/fixedAmount.d.ts +0 -26
  385. package/lib/utils/money/allocators/fixedAmount.js +0 -55
  386. package/lib/utils/money/allocators/fixedAmount.js.map +0 -1
  387. package/lib/utils/money/allocators/fixedAmount.mjs +0 -53
  388. package/lib/utils/money/allocators/fixedAmount.mjs.map +0 -1
  389. package/lib/utils/money/allocators/index.d.ts +0 -2
  390. package/lib/utils/money/allocators/index.js +0 -8
  391. package/lib/utils/money/allocators/index.js.map +0 -1
  392. package/lib/utils/money/allocators/index.mjs +0 -4
  393. package/lib/utils/money/allocators/index.mjs.map +0 -1
  394. package/lib/utils/money/allocators/productAmount.d.ts +0 -13
  395. package/lib/utils/money/allocators/productAmount.js +0 -110
  396. package/lib/utils/money/allocators/productAmount.js.map +0 -1
  397. package/lib/utils/money/allocators/productAmount.mjs +0 -108
  398. package/lib/utils/money/allocators/productAmount.mjs.map +0 -1
  399. package/lib/utils/money/exchangeRate.d.ts +0 -31
  400. package/lib/utils/money/exchangeRate.js +0 -27
  401. package/lib/utils/money/exchangeRate.js.map +0 -1
  402. package/lib/utils/money/exchangeRate.mjs +0 -23
  403. package/lib/utils/money/exchangeRate.mjs.map +0 -1
  404. package/lib/utils/money/misc.private.d.ts +0 -23
  405. package/lib/utils/money/misc.private.js +0 -46
  406. package/lib/utils/money/misc.private.js.map +0 -1
  407. package/lib/utils/money/misc.private.mjs +0 -21
  408. package/lib/utils/money/misc.private.mjs.map +0 -1
  409. package/lib/utils/money/shipping.d.ts +0 -5
  410. package/lib/utils/money/shipping.js +0 -8
  411. package/lib/utils/money/shipping.js.map +0 -1
  412. package/lib/utils/money/shipping.mjs +0 -6
  413. package/lib/utils/money/shipping.mjs.map +0 -1
  414. package/lib/utils/money/tax.private.d.ts +0 -17
  415. package/lib/utils/money/tax.private.js +0 -65
  416. package/lib/utils/money/tax.private.js.map +0 -1
  417. package/lib/utils/money/tax.private.mjs +0 -60
  418. package/lib/utils/money/tax.private.mjs.map +0 -1
  419. package/lib/utils/productSort.d.ts +0 -41
  420. package/lib/utils/productSort.js +0 -66
  421. package/lib/utils/productSort.js.map +0 -1
  422. package/lib/utils/productSort.mjs +0 -59
  423. package/lib/utils/productSort.mjs.map +0 -1
  424. /package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/index.d.ts +0 -0
  425. /package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/index.js +0 -0
  426. /package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/index.js.map +0 -0
  427. /package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/index.mjs +0 -0
  428. /package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/index.mjs.map +0 -0
  429. /package/lib/components/{Header/Navigation/ProMenu → ResourceCalculatorV1/components}/index.mjs.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"taxIdSuperRefinement.js","sources":["../../../src/utils/validations/taxIdSuperRefinement.ts"],"sourcesContent":["import type { SuperRefinement } from \"zod\";\nimport { ZodIssueCode } from \"zod\";\n\nimport type { AddressType, CountryCode, Nullish } from \"../../types\";\nimport { AddressUsageType, ValidateTaxStatus } from \"../../types\";\nimport { assertUnreachable, checkUnreachable } from \"../errors\";\nimport {\n getTaxCountry,\n getTaxLabelTypeByCountry,\n getValidationMappingByType,\n hasTaxNumberPatternValidation,\n isValidTaxNumberPattern,\n} from \"../tax\";\nimport { TaxLabelType } from \"../tax/types\";\nimport { addCustomZodIssue, CustomZodIssueCode } from \"../zod\";\n\nexport type ValidateTaxIdExternally = (opts: {\n type: AddressType;\n countryCode: CountryCode;\n province: Nullish<string>;\n taxId: string;\n}) => Promise<Nullish<ValidateTaxStatus>>;\n\nexport const createTaxIdSuperRefinement =\n ({\n addressUsageType,\n validateTaxIdExternally,\n }: {\n addressUsageType: AddressUsageType;\n validateTaxIdExternally?: ValidateTaxIdExternally;\n }): SuperRefinement<{\n type: AddressType;\n country: CountryCode;\n province?: Nullish<string>;\n taxId?: Nullish<string>;\n }> =>\n async ({ type, country, province, taxId }, ctx) => {\n switch (addressUsageType) {\n // Exit early because tax ID is generally not needed for billing addresses.\n case AddressUsageType.Billing:\n return;\n // Don't do anything and proceed with the validation logic below.\n case AddressUsageType.ReturnShipping:\n case AddressUsageType.Shipping:\n break;\n default:\n assertUnreachable(addressUsageType);\n }\n\n const taxCountryCode = getTaxCountry({\n country,\n province,\n });\n\n // Doesn't require strict validation\n if (!hasTaxNumberPatternValidation(type, taxCountryCode)) {\n return;\n }\n\n const mapping = getValidationMappingByType(type);\n const { isOptional } = mapping[taxCountryCode];\n\n if (!taxId && isOptional) {\n return;\n }\n\n // Ensure that we have tax ID before passing it to the validation\n if (!taxId) {\n return ctx.addIssue({\n path: [\"taxId\"],\n code: ZodIssueCode.too_small,\n type: \"string\",\n minimum: 1,\n inclusive: true,\n });\n }\n\n const taxLabelType = getTaxLabelTypeByCountry(country, {\n type: \"specific\",\n addressType: type,\n });\n const shouldUppercaseTaxLabel = [\n TaxLabelType.Gst,\n TaxLabelType.Vat,\n TaxLabelType.Cpf,\n TaxLabelType.Cnpj,\n ].includes(taxLabelType);\n const label = shouldUppercaseTaxLabel\n ? taxLabelType.toUpperCase()\n : taxLabelType;\n\n // If the pattern is invalid, error\n if (!isValidTaxNumberPattern(type, taxCountryCode, taxId)) {\n return addCustomZodIssue(ctx, \"taxId\", CustomZodIssueCode.TaxFormat, {\n label,\n });\n }\n\n if (!validateTaxIdExternally) {\n return;\n }\n\n // Additionally validate tax id externally depending on environment\n const taxStatus = await validateTaxIdExternally({\n type,\n countryCode: country,\n province,\n taxId,\n });\n\n switch (taxStatus) {\n case ValidateTaxStatus.Invalid: {\n addCustomZodIssue(ctx, \"taxId\", CustomZodIssueCode.TaxInvalid, {\n label,\n });\n break;\n }\n\n case ValidateTaxStatus.Unavailable: {\n addCustomZodIssue(ctx, \"taxId\", CustomZodIssueCode.TaxUnavailable, {\n label,\n });\n break;\n }\n\n case ValidateTaxStatus.Valid:\n case ValidateTaxStatus.NotValidated:\n case null:\n case undefined: {\n // Do nothing;\n break;\n }\n\n default: {\n // Do nothing as well (but in a type safe way)\n checkUnreachable(taxStatus);\n }\n }\n };\n"],"names":["createTaxIdSuperRefinement","addressUsageType","validateTaxIdExternally","type","country","province","taxId","ctx","AddressUsageType","Billing","ReturnShipping","Shipping","assertUnreachable","taxCountryCode","getTaxCountry","hasTaxNumberPatternValidation","mapping","getValidationMappingByType","isOptional","addIssue","path","code","ZodIssueCode","too_small","minimum","inclusive","taxLabelType","getTaxLabelTypeByCountry","addressType","shouldUppercaseTaxLabel","TaxLabelType","Gst","Vat","Cpf","Cnpj","includes","label","toUpperCase","isValidTaxNumberPattern","addCustomZodIssue","CustomZodIssueCode","TaxFormat","taxStatus","countryCode","ValidateTaxStatus","Invalid","TaxInvalid","Unavailable","TaxUnavailable","Valid","NotValidated","checkUnreachable"],"mappings":";;;;;;;;;;;AAuBO,MAAMA,6BACXA,CAAC;EACCC,gBAAA;EACAC;AACF,CAAA,KASA,OAAO;EAAEC,IAAA;EAAMC;EAASC,QAAU;EAAAC;GAASC,GAAQ,KAAA;EACjD,QAAQN,gBAAkB;IAExB,KAAKO,SAAiB,CAAAA,gBAAA,CAAAC,OAAA;MACpB;IAEF,KAAKD,SAAAA,CAAAA,gBAAiB,CAAAE,cAAA;IACtB,KAAKF,SAAiB,CAAAA,gBAAA,CAAAG,QAAA;MACpB;IACF;MACEC,MAAA,CAAAA,iBAAA,CAAkBX,gBAAgB,CAAA;EACtC;EAEA,MAAMY,iBAAiBC,KAAAA,CAAAA,aAAc,CAAA;IACnCV,OAAA;IACAC;EAAA,CACD,CAAA;EAGD,IAAI,CAACU,KAAA,CAAAA,6BAAA,CAA8BZ,IAAM,EAAAU,cAAc,CAAG,EAAA;IACxD;EACF;EAEM,MAAAG,OAAA,GAAUC,iCAA2Bd,IAAI,CAAA;EAC/C,MAAM;IAAEe;EAAA,CAAe,GAAAF,OAAA,CAAQH,cAAc,CAAA;EAEzC,IAAA,CAACP,SAASY,UAAY,EAAA;IACxB;EACF;EAGA,IAAI,CAACZ,KAAO,EAAA;IACV,OAAOC,IAAIY,QAAS,CAAA;MAClBC,IAAA,EA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,WAAa;MAAA;QAChBR,KAAAA,CAAAA,iBAAA,CAAAhC,GAAA,EAAK,OAAS,EAAAiC,KAAAA,CAAAA,kBAAA,CAAmBQ,cAAgB,EAAA;UACjEZ;QAAA,CACD,CAAA;QACD;MACF;IAEA,KAAKQ,SAAAA,CAAAA,iBAAkB,CAAAK,KAAA;IACvB,KAAKL,SAAAA,CAAAA,iBAAkB,CAAAM,YAAA;IACvB,KAAK,IAAA;IACL,KAAK,KAAW,CAAA;MAAA;QAEd;MACF;IAEA;MAAS;QAEPC,MAAA,CAAAA,gBAAA,CAAiBT,SAAS,CAAA;MAC5B;EACF;AACF,CAAA;"}
1
+ {"version":3,"file":"taxIdSuperRefinement.js","sources":["../../../src/utils/validations/taxIdSuperRefinement.ts"],"sourcesContent":["import type { SuperRefinement } from \"zod\";\nimport { ZodIssueCode } from \"zod\";\n\nimport type { AddressType, CountryCode, Nullish } from \"../../types\";\nimport { AddressUsageType, ValidateTaxStatus } from \"../../types\";\nimport { assertUnreachable, checkUnreachable } from \"../errors\";\nimport {\n getTaxCountry,\n getTaxLabelTypeByCountry,\n getValidationMappingByType,\n hasTaxNumberPatternValidation,\n isValidTaxNumberPattern,\n} from \"../tax\";\nimport { TaxLabelType } from \"../tax/types\";\nimport { addCustomZodIssue, CustomZodIssueCode } from \"../zod\";\n\nexport type ValidateTaxIdExternally = (opts: {\n type: AddressType;\n countryCode: CountryCode;\n province: Nullish<string>;\n taxId: string;\n}) => Promise<Nullish<ValidateTaxStatus>>;\n\nexport const createTaxIdSuperRefinement =\n ({\n addressUsageType,\n validateTaxIdExternally,\n }: {\n addressUsageType: AddressUsageType;\n validateTaxIdExternally?: ValidateTaxIdExternally;\n }): SuperRefinement<{\n type: AddressType;\n country: CountryCode;\n province?: Nullish<string>;\n taxId?: Nullish<string>;\n }> =>\n async ({ type, country, province, taxId }, ctx) => {\n switch (addressUsageType) {\n // Exit early because tax ID is generally not needed for billing addresses.\n case AddressUsageType.Billing:\n return;\n // Don't do anything and proceed with the validation logic below.\n case AddressUsageType.ReturnShipping:\n case AddressUsageType.Shipping:\n break;\n default:\n assertUnreachable(addressUsageType);\n }\n\n const taxCountryCode = getTaxCountry({\n country,\n province,\n });\n\n // Doesn't require strict validation\n if (!hasTaxNumberPatternValidation(type, taxCountryCode)) {\n return;\n }\n\n const mapping = getValidationMappingByType(type);\n const { isOptional } = mapping[taxCountryCode];\n\n if (!taxId && isOptional) {\n return;\n }\n\n // Ensure that we have tax ID before passing it to the validation\n if (!taxId) {\n return ctx.addIssue({\n path: [\"taxId\"],\n code: ZodIssueCode.too_small,\n type: \"string\",\n minimum: 1,\n inclusive: true,\n });\n }\n\n const taxLabelType = getTaxLabelTypeByCountry(country, {\n type: \"specific\",\n addressType: type,\n });\n const shouldUppercaseTaxLabel = [\n TaxLabelType.Gst,\n TaxLabelType.Vat,\n TaxLabelType.Cpf,\n TaxLabelType.Cnpj,\n ].includes(taxLabelType);\n const label = shouldUppercaseTaxLabel\n ? taxLabelType.toUpperCase()\n : taxLabelType;\n\n // If the pattern is invalid, error\n if (!isValidTaxNumberPattern(type, taxCountryCode, taxId)) {\n return addCustomZodIssue(ctx, \"taxId\", CustomZodIssueCode.TaxFormat, {\n label,\n });\n }\n\n if (!validateTaxIdExternally) {\n return;\n }\n\n // Additionally validate tax id externally depending on environment\n const taxStatus = await validateTaxIdExternally({\n type,\n countryCode: country,\n province,\n taxId,\n });\n\n switch (taxStatus) {\n case ValidateTaxStatus.Invalid: {\n addCustomZodIssue(ctx, \"taxId\", CustomZodIssueCode.TaxInvalid, {\n label,\n });\n break;\n }\n\n case ValidateTaxStatus.Unavailable: {\n addCustomZodIssue(ctx, \"taxId\", CustomZodIssueCode.TaxUnavailable, {\n label,\n });\n break;\n }\n\n case ValidateTaxStatus.Valid:\n case ValidateTaxStatus.NotValidated:\n case null:\n case undefined: {\n // Do nothing;\n break;\n }\n\n default: {\n // Do nothing as well (but in a type safe way)\n checkUnreachable(taxStatus);\n }\n }\n };\n"],"names":["createTaxIdSuperRefinement","addressUsageType","validateTaxIdExternally","type","country","province","taxId","ctx","AddressUsageType","Billing","ReturnShipping","Shipping","assertUnreachable","taxCountryCode","getTaxCountry","hasTaxNumberPatternValidation","mapping","getValidationMappingByType","isOptional","addIssue","path","code","ZodIssueCode","too_small","minimum","inclusive","taxLabelType","getTaxLabelTypeByCountry","addressType","shouldUppercaseTaxLabel","TaxLabelType","Gst","Vat","Cpf","Cnpj","includes","label","toUpperCase","isValidTaxNumberPattern","addCustomZodIssue","CustomZodIssueCode","TaxFormat","taxStatus","countryCode","ValidateTaxStatus","Invalid","TaxInvalid","Unavailable","TaxUnavailable","Valid","NotValidated","checkUnreachable"],"mappings":";;;;;;;;;;;AAuBO,MAAMA,6BACXA,CAAC;EACCC,gBAAA;EACAC;AACF,CAAA,KASA,OAAO;EAAEC,IAAA;EAAMC;EAASC,QAAU;EAAAC;GAASC,GAAQ,KAAA;EACjD,QAAQN,gBAAkB;IAAA;IAExB,KAAKO,SAAiB,CAAAA,gBAAA,CAAAC,OAAA;MACpB;IAAA;IAEF,KAAKD,SAAAA,CAAAA,gBAAiB,CAAAE,cAAA;IACtB,KAAKF,SAAiB,CAAAA,gBAAA,CAAAG,QAAA;MACpB;IACF;MACEC,MAAA,CAAAA,iBAAA,CAAkBX,gBAAgB,CAAA;EACtC;EAEA,MAAMY,iBAAiBC,KAAAA,CAAAA,aAAc,CAAA;IACnCV,OAAA;IACAC;EAAA,CACD,CAAA;EAGD,IAAI,CAACU,KAAA,CAAAA,6BAAA,CAA8BZ,IAAM,EAAAU,cAAc,CAAG,EAAA;IACxD;EACF;EAEM,MAAAG,OAAA,GAAUC,iCAA2Bd,IAAI,CAAA;EAC/C,MAAM;IAAEe;EAAA,CAAe,GAAAF,OAAA,CAAQH,cAAc,CAAA;EAEzC,IAAA,CAACP,SAASY,UAAY,EAAA;IACxB;EACF;EAGA,IAAI,CAACZ,KAAO,EAAA;IACV,OAAOC,IAAIY,QAAS,CAAA;MAClBC,IAAA,E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G,WAAa;MAAA;QAChBR,KAAAA,CAAAA,iBAAA,CAAAhC,GAAA,EAAK,OAAS,EAAAiC,KAAAA,CAAAA,kBAAA,CAAmBQ,cAAgB,EAAA;UACjEZ;QAAA,CACD,CAAA;QACD;MACF;IAEA,KAAKQ,SAAAA,CAAAA,iBAAkB,CAAAK,KAAA;IACvB,KAAKL,SAAAA,CAAAA,iBAAkB,CAAAM,YAAA;IACvB,KAAK,IAAA;IACL,KAAK,KAAW,CAAA;MAAA;QAEd;MACF;IAEA;MAAS;QAEPC,MAAA,CAAAA,gBAAA,CAAiBT,SAAS,CAAA;MAC5B;EACF;AACF,CAAA;"}
@@ -17,8 +17,10 @@ const createTaxIdSuperRefinement = ({
17
17
  taxId
18
18
  }, ctx) => {
19
19
  switch (addressUsageType) {
20
+ // Exit early because tax ID is generally not needed for billing addresses.
20
21
  case AddressUsageType.Billing:
21
22
  return;
23
+ // Don't do anything and proceed with the validation logic below.
22
24
  case AddressUsageType.ReturnShipping:
23
25
  case AddressUsageType.Shipping:
24
26
  break;
@@ -1 +1 @@
1
- {"version":3,"file":"taxIdSuperRefinement.mjs","sources":["../../../src/utils/validations/taxIdSuperRefinement.ts"],"sourcesContent":["import type { SuperRefinement } from \"zod\";\nimport { ZodIssueCode } from \"zod\";\n\nimport type { AddressType, CountryCode, Nullish } from \"../../types\";\nimport { AddressUsageType, ValidateTaxStatus } from \"../../types\";\nimport { assertUnreachable, checkUnreachable } from \"../errors\";\nimport {\n getTaxCountry,\n getTaxLabelTypeByCountry,\n getValidationMappingByType,\n hasTaxNumberPatternValidation,\n isValidTaxNumberPattern,\n} from \"../tax\";\nimport { TaxLabelType } from \"../tax/types\";\nimport { addCustomZodIssue, CustomZodIssueCode } from \"../zod\";\n\nexport type ValidateTaxIdExternally = (opts: {\n type: AddressType;\n countryCode: CountryCode;\n province: Nullish<string>;\n taxId: string;\n}) => Promise<Nullish<ValidateTaxStatus>>;\n\nexport const createTaxIdSuperRefinement =\n ({\n addressUsageType,\n validateTaxIdExternally,\n }: {\n addressUsageType: AddressUsageType;\n validateTaxIdExternally?: ValidateTaxIdExternally;\n }): SuperRefinement<{\n type: AddressType;\n country: CountryCode;\n province?: Nullish<string>;\n taxId?: Nullish<string>;\n }> =>\n async ({ type, country, province, taxId }, ctx) => {\n switch (addressUsageType) {\n // Exit early because tax ID is generally not needed for billing addresses.\n case AddressUsageType.Billing:\n return;\n // Don't do anything and proceed with the validation logic below.\n case AddressUsageType.ReturnShipping:\n case AddressUsageType.Shipping:\n break;\n default:\n assertUnreachable(addressUsageType);\n }\n\n const taxCountryCode = getTaxCountry({\n country,\n province,\n });\n\n // Doesn't require strict validation\n if (!hasTaxNumberPatternValidation(type, taxCountryCode)) {\n return;\n }\n\n const mapping = getValidationMappingByType(type);\n const { isOptional } = mapping[taxCountryCode];\n\n if (!taxId && isOptional) {\n return;\n }\n\n // Ensure that we have tax ID before passing it to the validation\n if (!taxId) {\n return ctx.addIssue({\n path: [\"taxId\"],\n code: ZodIssueCode.too_small,\n type: \"string\",\n minimum: 1,\n inclusive: true,\n });\n }\n\n const taxLabelType = getTaxLabelTypeByCountry(country, {\n type: \"specific\",\n addressType: type,\n });\n const shouldUppercaseTaxLabel = [\n TaxLabelType.Gst,\n TaxLabelType.Vat,\n TaxLabelType.Cpf,\n TaxLabelType.Cnpj,\n ].includes(taxLabelType);\n const label = shouldUppercaseTaxLabel\n ? taxLabelType.toUpperCase()\n : taxLabelType;\n\n // If the pattern is invalid, error\n if (!isValidTaxNumberPattern(type, taxCountryCode, taxId)) {\n return addCustomZodIssue(ctx, \"taxId\", CustomZodIssueCode.TaxFormat, {\n label,\n });\n }\n\n if (!validateTaxIdExternally) {\n return;\n }\n\n // Additionally validate tax id externally depending on environment\n const taxStatus = await validateTaxIdExternally({\n type,\n countryCode: country,\n province,\n taxId,\n });\n\n switch (taxStatus) {\n case ValidateTaxStatus.Invalid: {\n addCustomZodIssue(ctx, \"taxId\", CustomZodIssueCode.TaxInvalid, {\n label,\n });\n break;\n }\n\n case ValidateTaxStatus.Unavailable: {\n addCustomZodIssue(ctx, \"taxId\", CustomZodIssueCode.TaxUnavailable, {\n label,\n });\n break;\n }\n\n case ValidateTaxStatus.Valid:\n case ValidateTaxStatus.NotValidated:\n case null:\n case undefined: {\n // Do nothing;\n break;\n }\n\n default: {\n // Do nothing as well (but in a type safe way)\n checkUnreachable(taxStatus);\n }\n }\n };\n"],"names":["createTaxIdSuperRefinement","addressUsageType","validateTaxIdExternally","type","country","province","taxId","ctx","AddressUsageType","Billing","ReturnShipping","Shipping","assertUnreachable","taxCountryCode","getTaxCountry","hasTaxNumberPatternValidation","mapping","getValidationMappingByType","isOptional","addIssue","path","code","ZodIssueCode","too_small","minimum","inclusive","taxLabelType","getTaxLabelTypeByCountry","addressType","shouldUppercaseTaxLabel","TaxLabelType","Gst","Vat","Cpf","Cnpj","includes","label","toUpperCase","isValidTaxNumberPattern","addCustomZodIssue","CustomZodIssueCode","TaxFormat","taxStatus","countryCode","ValidateTaxStatus","Invalid","TaxInvalid","Unavailable","TaxUnavailable","Valid","NotValidated","checkUnreachable"],"mappings":";;;;;;;;;AAuBO,MAAMA,6BACXA,CAAC;EACCC,gBAAA;EACAC;AACF,CAAA,KASA,OAAO;EAAEC,IAAA;EAAMC;EAASC,QAAU;EAAAC;GAASC,GAAQ,KAAA;EACjD,QAAQN,gBAAkB;IAExB,KAAKO,gBAAiB,CAAAC,OAAA;MACpB;IAEF,KAAKD,gBAAiB,CAAAE,cAAA;IACtB,KAAKF,gBAAiB,CAAAG,QAAA;MACpB;IACF;MACEC,iBAAA,CAAkBX,gBAAgB,CAAA;EACtC;EAEA,MAAMY,iBAAiBC,aAAc,CAAA;IACnCV,OAAA;IACAC;EAAA,CACD,CAAA;EAGD,IAAI,CAACU,6BAAA,CAA8BZ,IAAM,EAAAU,cAAc,CAAG,EAAA;IACxD;EACF;EAEM,MAAAG,OAAA,GAAUC,2BAA2Bd,IAAI,CAAA;EAC/C,MAAM;IAAEe;EAA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Aa;MAAA;QAChBR,iBAAA,CAAAhC,GAAA,EAAK,OAAS,EAAAiC,kBAAA,CAAmBQ,cAAgB,EAAA;UACjEZ;QAAA,CACD,CAAA;QACD;MACF;IAEA,KAAKQ,iBAAkB,CAAAK,KAAA;IACvB,KAAKL,iBAAkB,CAAAM,YAAA;IACvB,KAAK,IAAA;IACL,KAAK,KAAW,CAAA;MAAA;QAEd;MACF;IAEA;MAAS;QAEPC,gBAAA,CAAiBT,SAAS,CAAA;MAC5B;EACF;AACF,CAAA;"}
1
+ {"version":3,"file":"taxIdSuperRefinement.mjs","sources":["../../../src/utils/validations/taxIdSuperRefinement.ts"],"sourcesContent":["import type { SuperRefinement } from \"zod\";\nimport { ZodIssueCode } from \"zod\";\n\nimport type { AddressType, CountryCode, Nullish } from \"../../types\";\nimport { AddressUsageType, ValidateTaxStatus } from \"../../types\";\nimport { assertUnreachable, checkUnreachable } from \"../errors\";\nimport {\n getTaxCountry,\n getTaxLabelTypeByCountry,\n getValidationMappingByType,\n hasTaxNumberPatternValidation,\n isValidTaxNumberPattern,\n} from \"../tax\";\nimport { TaxLabelType } from \"../tax/types\";\nimport { addCustomZodIssue, CustomZodIssueCode } from \"../zod\";\n\nexport type ValidateTaxIdExternally = (opts: {\n type: AddressType;\n countryCode: CountryCode;\n province: Nullish<string>;\n taxId: string;\n}) => Promise<Nullish<ValidateTaxStatus>>;\n\nexport const createTaxIdSuperRefinement =\n ({\n addressUsageType,\n validateTaxIdExternally,\n }: {\n addressUsageType: AddressUsageType;\n validateTaxIdExternally?: ValidateTaxIdExternally;\n }): SuperRefinement<{\n type: AddressType;\n country: CountryCode;\n province?: Nullish<string>;\n taxId?: Nullish<string>;\n }> =>\n async ({ type, country, province, taxId }, ctx) => {\n switch (addressUsageType) {\n // Exit early because tax ID is generally not needed for billing addresses.\n case AddressUsageType.Billing:\n return;\n // Don't do anything and proceed with the validation logic below.\n case AddressUsageType.ReturnShipping:\n case AddressUsageType.Shipping:\n break;\n default:\n assertUnreachable(addressUsageType);\n }\n\n const taxCountryCode = getTaxCountry({\n country,\n province,\n });\n\n // Doesn't require strict validation\n if (!hasTaxNumberPatternValidation(type, taxCountryCode)) {\n return;\n }\n\n const mapping = getValidationMappingByType(type);\n const { isOptional } = mapping[taxCountryCode];\n\n if (!taxId && isOptional) {\n return;\n }\n\n // Ensure that we have tax ID before passing it to the validation\n if (!taxId) {\n return ctx.addIssue({\n path: [\"taxId\"],\n code: ZodIssueCode.too_small,\n type: \"string\",\n minimum: 1,\n inclusive: true,\n });\n }\n\n const taxLabelType = getTaxLabelTypeByCountry(country, {\n type: \"specific\",\n addressType: type,\n });\n const shouldUppercaseTaxLabel = [\n TaxLabelType.Gst,\n TaxLabelType.Vat,\n TaxLabelType.Cpf,\n TaxLabelType.Cnpj,\n ].includes(taxLabelType);\n const label = shouldUppercaseTaxLabel\n ? taxLabelType.toUpperCase()\n : taxLabelType;\n\n // If the pattern is invalid, error\n if (!isValidTaxNumberPattern(type, taxCountryCode, taxId)) {\n return addCustomZodIssue(ctx, \"taxId\", CustomZodIssueCode.TaxFormat, {\n label,\n });\n }\n\n if (!validateTaxIdExternally) {\n return;\n }\n\n // Additionally validate tax id externally depending on environment\n const taxStatus = await validateTaxIdExternally({\n type,\n countryCode: country,\n province,\n taxId,\n });\n\n switch (taxStatus) {\n case ValidateTaxStatus.Invalid: {\n addCustomZodIssue(ctx, \"taxId\", CustomZodIssueCode.TaxInvalid, {\n label,\n });\n break;\n }\n\n case ValidateTaxStatus.Unavailable: {\n addCustomZodIssue(ctx, \"taxId\", CustomZodIssueCode.TaxUnavailable, {\n label,\n });\n break;\n }\n\n case ValidateTaxStatus.Valid:\n case ValidateTaxStatus.NotValidated:\n case null:\n case undefined: {\n // Do nothing;\n break;\n }\n\n default: {\n // Do nothing as well (but in a type safe way)\n checkUnreachable(taxStatus);\n }\n }\n };\n"],"names":["createTaxIdSuperRefinement","addressUsageType","validateTaxIdExternally","type","country","province","taxId","ctx","AddressUsageType","Billing","ReturnShipping","Shipping","assertUnreachable","taxCountryCode","getTaxCountry","hasTaxNumberPatternValidation","mapping","getValidationMappingByType","isOptional","addIssue","path","code","ZodIssueCode","too_small","minimum","inclusive","taxLabelType","getTaxLabelTypeByCountry","addressType","shouldUppercaseTaxLabel","TaxLabelType","Gst","Vat","Cpf","Cnpj","includes","label","toUpperCase","isValidTaxNumberPattern","addCustomZodIssue","CustomZodIssueCode","TaxFormat","taxStatus","countryCode","ValidateTaxStatus","Invalid","TaxInvalid","Unavailable","TaxUnavailable","Valid","NotValidated","checkUnreachable"],"mappings":";;;;;;;;;AAuBO,MAAMA,6BACXA,CAAC;EACCC,gBAAA;EACAC;AACF,CAAA,KASA,OAAO;EAAEC,IAAA;EAAMC;EAASC,QAAU;EAAAC;GAASC,GAAQ,KAAA;EACjD,QAAQN,gBAAkB;IAAA;IAExB,KAAKO,gBAAiB,CAAAC,OAAA;MACpB;IAAA;IAEF,KAAKD,gBAAiB,CAAAE,cAAA;IACtB,KAAKF,gBAAiB,CAAAG,QAAA;MACpB;IACF;MACEC,iBAAA,CAAkBX,gBAAgB,CAAA;EACtC;EAEA,MAAMY,iBAAiBC,aAAc,CAAA;IACnCV,OAAA;IACAC;EAAA,CACD,CAAA;EAGD,IAAI,CAACU,6BAAA,CAA8BZ,IAAM,EAAAU,cAAc,CAAG,EAAA;IACxD;EACF;EAEM,MAAAG,OAAA,GAAUC,2BAA2Bd,IAAI,CAAA;EAC/C,MAAM;IAAEe;EAAA,CAAe,GAAAF,OAAA,CAAQH,cAAc,CAAA;EAEzC,IAAA,CAACP,SAASY,UAAY,EAAA;IACxB;EACF;EAGA,IAAI,CAACZ,KAAO,EAAA;IACV,OAAOC,IAAIY,QAAS,CAAA;MAClBC,IAAA,EAAM,CAAC,OAAO,CAAA;MACdC,MAAMC,YAAa,CAAAC,SAAA;MACnBpB,IAAM,EAAA,QAAA;MACNqB,OAAS,EAAA,CAAA;MACTC,SAAW,EAAA;IAAA,CACZ,CAAA;EACH;EAEM,MA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"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Util to easily parse that any given input is a finite number (not NaN, Infinity, -Infinity, etc.)
3
+ * @throws If given input is not a finite number
4
+ */
5
+ export declare function isFiniteNumber(value: unknown, entity?: string, ErrorClass?: new (message: string) => void): asserts value is number;
6
+ /**
7
+ * Custom isInt validation function that returns a more fine-grained error message otherwise for type safety alone a
8
+ * Number.isSafeInteger would be sufficient.
9
+ *
10
+ * Code inspired from graphql-scalars library.
11
+ * @see
12
+ * https://github.com/Urigo/graphql-scalars/blob/c4fa3d27b965e39ceda6c33fc18041f112ecce49/src/scalars/utilities.ts#L20-L32
13
+ * @throws If given input is not a valid integer
14
+ */
15
+ export declare function isInt(value: unknown, entity?: string, ErrorClass?: new (message: string) => void): asserts value is number;
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+ "use strict";
3
+
4
+ function isFiniteNumber(value, entity = "Value", ErrorClass = TypeError) {
5
+ if (typeof value !== "number" || Number.isNaN(value)) {
6
+ throw new ErrorClass(`${entity} is not a number: ${value}`);
7
+ }
8
+ if (!Number.isFinite(value)) {
9
+ throw new ErrorClass(`${entity} is not a finite number: ${value}`);
10
+ }
11
+ }
12
+ function isInt(value, entity = "Value", ErrorClass = TypeError) {
13
+ isFiniteNumber(value, entity, ErrorClass);
14
+ if (!Number.isInteger(value)) {
15
+ throw new ErrorClass(`${entity} is not an integer: ${value}`);
16
+ }
17
+ if (!Number.isSafeInteger(value)) {
18
+ throw new ErrorClass(`${entity} is not a safe integer: ${value}`);
19
+ }
20
+ }
21
+ exports.isFiniteNumber = isFiniteNumber;
22
+ exports.isInt = isInt;
23
+ //# sourceMappingURL=validations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validations.js","sources":["../../src/utils/validations.ts"],"sourcesContent":["/**\n * Util to easily parse that any given input is a finite number (not NaN, Infinity, -Infinity, etc.)\n * @throws If given input is not a finite number\n */\nexport function isFiniteNumber(\n value: unknown,\n entity = \"Value\",\n ErrorClass: new (message: string) => void = TypeError,\n): asserts value is number {\n if (typeof value !== \"number\" || Number.isNaN(value)) {\n // eslint-disable-next-line @typescript-eslint/no-throw-literal\n throw new ErrorClass(`${entity} is not a number: ${value}`);\n }\n\n if (!Number.isFinite(value)) {\n // eslint-disable-next-line @typescript-eslint/no-throw-literal\n throw new ErrorClass(`${entity} is not a finite number: ${value}`);\n }\n}\n\n/**\n * Custom isInt validation function that returns a more fine-grained error message otherwise for type safety alone a\n * Number.isSafeInteger would be sufficient.\n *\n * Code inspired from graphql-scalars library.\n * @see\n * https://github.com/Urigo/graphql-scalars/blob/c4fa3d27b965e39ceda6c33fc18041f112ecce49/src/scalars/utilities.ts#L20-L32\n * @throws If given input is not a valid integer\n */\nexport function isInt(\n value: unknown,\n entity = \"Value\",\n ErrorClass: new (message: string) => void = TypeError,\n): asserts value is number {\n isFiniteNumber(value, entity, ErrorClass);\n\n if (!Number.isInteger(value)) {\n // eslint-disable-next-line @typescript-eslint/no-throw-literal\n throw new ErrorClass(`${entity} is not an integer: ${value}`);\n }\n\n if (!Number.isSafeInteger(value)) {\n // eslint-disable-next-line @typescript-eslint/no-throw-literal\n throw new ErrorClass(`${entity} is not a safe integer: ${value}`);\n }\n}\n"],"names":["isFiniteNumber","value","entity","ErrorClass","TypeError","Number","isNaN","isFinite","isInt","isInteger","isSafeInteger"],"mappings":";;;AAIO,SAASA,cACdA,CAAAC,KAAA,EACAC,MAAS,GAAA,OAAA,EACTC,aAA4CC,SACnB,EAAA;EACzB,IAAI,OAAOH,KAAU,KAAA,QAAA,IAAYI,MAAO,CAAAC,KAAA,CAAML,KAAK,CAAG,EAAA;IAEpD,MAAM,IAAIE,UAAW,CAAA,GAAGD,MAAM,qBAAqBD,KAAO,EAAA,CAAA;EAC5D;EAEA,IAAI,CAACI,MAAA,CAAOE,QAAS,CAAAN,KAAK,CAAG,EAAA;IAE3B,MAAM,IAAIE,UAAW,CAAA,GAAGD,MAAM,4BAA4BD,KAAO,EAAA,CAAA;EACnE;AACF;AAWO,SAASO,KACdA,CAAAP,KAAA,EACAC,MAAS,GAAA,OAAA,EACTC,aAA4CC,SACnB,EAAA;EACVJ,cAAA,CAAAC,KAAA,EAAOC,QAAQC,UAAU,CAAA;EAExC,IAAI,CAACE,MAAA,CAAOI,SAAU,CAAAR,KAAK,CAAG,EAAA;IAE5B,MAAM,IAAIE,UAAW,CAAA,GAAGD,MAAM,uBAAuBD,KAAO,EAAA,CAAA;EAC9D;EAEA,IAAI,CAACI,MAAA,CAAOK,aAAc,CAAAT,KAAK,CAAG,EAAA;IAEhC,MAAM,IAAIE,UAAW,CAAA,GAAGD,MAAM,2BAA2BD,KAAO,EAAA,CAAA;EAClE;AACF;;"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ function isFiniteNumber(value, entity = "Value", ErrorClass = TypeError) {
4
+ if (typeof value !== "number" || Number.isNaN(value)) {
5
+ throw new ErrorClass(`${entity} is not a number: ${value}`);
6
+ }
7
+ if (!Number.isFinite(value)) {
8
+ throw new ErrorClass(`${entity} is not a finite number: ${value}`);
9
+ }
10
+ }
11
+ function isInt(value, entity = "Value", ErrorClass = TypeError) {
12
+ isFiniteNumber(value, entity, ErrorClass);
13
+ if (!Number.isInteger(value)) {
14
+ throw new ErrorClass(`${entity} is not an integer: ${value}`);
15
+ }
16
+ if (!Number.isSafeInteger(value)) {
17
+ throw new ErrorClass(`${entity} is not a safe integer: ${value}`);
18
+ }
19
+ }
20
+ export { isFiniteNumber, isInt };
21
+ //# sourceMappingURL=validations.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validations.mjs","sources":["../../src/utils/validations.ts"],"sourcesContent":["/**\n * Util to easily parse that any given input is a finite number (not NaN, Infinity, -Infinity, etc.)\n * @throws If given input is not a finite number\n */\nexport function isFiniteNumber(\n value: unknown,\n entity = \"Value\",\n ErrorClass: new (message: string) => void = TypeError,\n): asserts value is number {\n if (typeof value !== \"number\" || Number.isNaN(value)) {\n // eslint-disable-next-line @typescript-eslint/no-throw-literal\n throw new ErrorClass(`${entity} is not a number: ${value}`);\n }\n\n if (!Number.isFinite(value)) {\n // eslint-disable-next-line @typescript-eslint/no-throw-literal\n throw new ErrorClass(`${entity} is not a finite number: ${value}`);\n }\n}\n\n/**\n * Custom isInt validation function that returns a more fine-grained error message otherwise for type safety alone a\n * Number.isSafeInteger would be sufficient.\n *\n * Code inspired from graphql-scalars library.\n * @see\n * https://github.com/Urigo/graphql-scalars/blob/c4fa3d27b965e39ceda6c33fc18041f112ecce49/src/scalars/utilities.ts#L20-L32\n * @throws If given input is not a valid integer\n */\nexport function isInt(\n value: unknown,\n entity = \"Value\",\n ErrorClass: new (message: string) => void = TypeError,\n): asserts value is number {\n isFiniteNumber(value, entity, ErrorClass);\n\n if (!Number.isInteger(value)) {\n // eslint-disable-next-line @typescript-eslint/no-throw-literal\n throw new ErrorClass(`${entity} is not an integer: ${value}`);\n }\n\n if (!Number.isSafeInteger(value)) {\n // eslint-disable-next-line @typescript-eslint/no-throw-literal\n throw new ErrorClass(`${entity} is not a safe integer: ${value}`);\n }\n}\n"],"names":["isFiniteNumber","value","entity","ErrorClass","TypeError","Number","isNaN","isFinite","isInt","isInteger","isSafeInteger"],"mappings":";;AAIO,SAASA,cACdA,CAAAC,KAAA,EACAC,MAAS,GAAA,OAAA,EACTC,aAA4CC,SACnB,EAAA;EACzB,IAAI,OAAOH,KAAU,KAAA,QAAA,IAAYI,MAAO,CAAAC,KAAA,CAAML,KAAK,CAAG,EAAA;IAEpD,MAAM,IAAIE,UAAW,CAAA,GAAGD,MAAM,qBAAqBD,KAAO,EAAA,CAAA;EAC5D;EAEA,IAAI,CAACI,MAAA,CAAOE,QAAS,CAAAN,KAAK,CAAG,EAAA;IAE3B,MAAM,IAAIE,UAAW,CAAA,GAAGD,MAAM,4BAA4BD,KAAO,EAAA,CAAA;EACnE;AACF;AAWO,SAASO,KACdA,CAAAP,KAAA,EACAC,MAAS,GAAA,OAAA,EACTC,aAA4CC,SACnB,EAAA;EACVJ,cAAA,CAAAC,KAAA,EAAOC,QAAQC,UAAU,CAAA;EAExC,IAAI,CAACE,MAAA,CAAOI,SAAU,CAAAR,KAAK,CAAG,EAAA;IAE5B,MAAM,IAAIE,UAAW,CAAA,GAAGD,MAAM,uBAAuBD,KAAO,EAAA,CAAA;EAC9D;EAEA,IAAI,CAACI,MAAA,CAAOK,aAAc,CAAAT,KAAK,CAAG,EAAA;IAEhC,MAAM,IAAIE,UAAW,CAAA,GAAGD,MAAM,2BAA2BD,KAAO,EAAA,CAAA;EAClE;AACF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"variant.js","sources":["../../src/utils/variant.ts"],"sourcesContent":["/**\n * Removes the regional (and other) SKU postfix from the SKU.\n */\n\nconst REGIONAL_SKU_POSTFIX = [\n \" EU\",\n \"-EU\",\n \"(EU)\",\n \" US\",\n \"(US)\",\n \"-US\",\n \"-BR\",\n \"-CN\",\n \"-TW\",\n \"-JP\",\n \"-AU\",\n \"-AR\",\n \"-UK\",\n \"-U\",\n \"-IND\",\n \"-Standalone\",\n];\n\nexport const removeRegionalSkuPostfix = (sku?: string) => {\n const trimmedSku = sku?.trim();\n\n if (!trimmedSku) return undefined;\n\n const postfix = REGIONAL_SKU_POSTFIX.find((postfix) =>\n trimmedSku.trim().toUpperCase().endsWith(postfix.toUpperCase()),\n );\n\n if (!postfix) return trimmedSku;\n\n return trimmedSku.slice(0, -postfix.length).trim();\n};\n\n/**\n * Returns the SKU text with the extra label if it exists.\n */\nexport const getSkuText = (sku?: string, extraLabel?: string) => {\n if (!sku) return undefined;\n\n const preparedSku = removeRegionalSkuPostfix(sku);\n\n if (!extraLabel) return preparedSku;\n\n return `${preparedSku} (${extraLabel})`;\n};\n"],"names":["REGIONAL_SKU_POSTFIX","removeRegionalSkuPostfix","sku","trimmedSku","trim","postfix","find","toUpperCase","endsWith","slice","length","getSkuText","extraLabel","preparedSku"],"mappings":";;;AAIA,MAAMA,oBAAuB,GAAA,CAC3B,KAAA,EACA,KAAA,EACA,MAAA,EACA,KAAA,EACA,MAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,IAAA,EACA,MAAA,EACA,aAAA,CACF;AAEa,MAAAC,wBAAA,GAA4BC,GAAiB,IAAA;EAClD,MAAAC,UAAA,GAAaD,KAAKE,IAAK,EAAA;EAE7B,IAAI,CAACD,UAAA,EAAmB,OAAA,KAAA,CAAA;EAExB,MAAME,UAAUL,oBAAqB,CAAAM,IAAA,CAAMD,QACzC,IAAAF,UAAA,CAAWC,IAAK,CAAA,CAAA,CAAEG,aAAc,CAAAC,QAAA,CAASH,QAAQ,CAAAE,WAAA,EAAa,CAAA,CAChE;EAEA,IAAI,CAACF,OAAA,EAAgB,OAAAF,UAAA;EAErB,OAAOA,WAAWM,KAAM,CAAA,CAAA,EAAG,CAACJ,OAAQ,CAAAK,MAAM,EAAEN,IAAK,EAAA;AACnD,CAAA;AAKa,MAAAO,UAAA,GAAaA,CAACT,GAAA,EAAcU,UAAwB,KAAA;EAC/D,IAAI,CAACV,GAAA,EAAY,OAAA,KAAA,CAAA;EAEX,MAAAW,WAAA,GAAcZ,yBAAyBC,GAAG,CAAA;EAEhD,IAAI,CAACU,UAAA,EAAmB,OAAAC,WAAA;EAEjB,OAAA,GAAGA,WAAW,KAAKD,UAAU,GAAA;AACtC,CAAA;;"}
1
+ {"version":3,"file":"variant.js","sources":["../../src/utils/variant.ts"],"sourcesContent":["/**\n * Removes the regional (and other) SKU postfix from the SKU.\n */\n\nconst REGIONAL_SKU_POSTFIX = [\n \" EU\",\n \"-EU\",\n \"(EU)\",\n \" US\",\n \"(US)\",\n \"-US\",\n \"-BR\",\n \"-CN\",\n \"-TW\",\n \"-JP\",\n \"-AU\",\n \"-AR\",\n \"-UK\",\n \"-U\",\n \"-IND\",\n \"-Standalone\",\n];\n\nexport const removeRegionalSkuPostfix = (sku?: string) => {\n const trimmedSku = sku?.trim();\n\n if (!trimmedSku) return undefined;\n\n const postfix = REGIONAL_SKU_POSTFIX.find((postfix) =>\n trimmedSku.trim().toUpperCase().endsWith(postfix.toUpperCase()),\n );\n\n if (!postfix) return trimmedSku;\n\n return trimmedSku.slice(0, -postfix.length).trim();\n};\n\n/**\n * Returns the SKU text with the extra label if it exists.\n */\nexport const getSkuText = (sku?: string, extraLabel?: string) => {\n if (!sku) return undefined;\n\n const preparedSku = removeRegionalSkuPostfix(sku);\n\n if (!extraLabel) return preparedSku;\n\n return `${preparedSku} (${extraLabel})`;\n};\n"],"names":["REGIONAL_SKU_POSTFIX","removeRegionalSkuPostfix","sku","trimmedSku","trim","postfix","find","toUpperCase","endsWith","slice","length","getSkuText","extraLabel","preparedSku"],"mappings":";;;AAIA,MAAMA,oBAAuB,GAAA,CAC3B,KAAA,EACA,KAAA,EACA,MAAA,EACA,KAAA,EACA,MAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,IAAA,EACA,MAAA,EACA,aAAA,CACF;AAEa,MAAAC,wBAAA,GAA4BC,GAAiB,IAAA;EAClD,MAAAC,UAAA,GAAaD,KAAKE,IAAK,EAAA;EAEzB,IAAA,CAACD,YAAmB,OAAA,KAAA,CAAA;EAExB,MAAME,UAAUL,oBAAqB,CAAAM,IAAA,CAAMD,QACzC,IAAAF,UAAA,CAAWC,IAAK,CAAA,CAAA,CAAEG,aAAc,CAAAC,QAAA,CAASH,QAAQ,CAAAE,WAAA,EAAa,CAAA,CAChE;EAEI,IAAA,CAACF,SAAgB,OAAAF,UAAA;EAErB,OAAOA,WAAWM,KAAM,CAAA,CAAA,EAAG,CAACJ,OAAQ,CAAAK,MAAM,EAAEN,IAAK,EAAA;AACnD,CAAA;AAKa,MAAAO,UAAA,GAAaA,CAACT,GAAA,EAAcU,UAAwB,KAAA;EAC3D,IAAA,CAACV,KAAY,OAAA,KAAA,CAAA;EAEX,MAAAW,WAAA,GAAcZ,yBAAyBC,GAAG,CAAA;EAE5C,IAAA,CAACU,YAAmB,OAAAC,WAAA;EAEjB,OAAA,GAAGA,WAAW,KAAKD,UAAU,GAAA;AACtC,CAAA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"variant.mjs","sources":["../../src/utils/variant.ts"],"sourcesContent":["/**\n * Removes the regional (and other) SKU postfix from the SKU.\n */\n\nconst REGIONAL_SKU_POSTFIX = [\n \" EU\",\n \"-EU\",\n \"(EU)\",\n \" US\",\n \"(US)\",\n \"-US\",\n \"-BR\",\n \"-CN\",\n \"-TW\",\n \"-JP\",\n \"-AU\",\n \"-AR\",\n \"-UK\",\n \"-U\",\n \"-IND\",\n \"-Standalone\",\n];\n\nexport const removeRegionalSkuPostfix = (sku?: string) => {\n const trimmedSku = sku?.trim();\n\n if (!trimmedSku) return undefined;\n\n const postfix = REGIONAL_SKU_POSTFIX.find((postfix) =>\n trimmedSku.trim().toUpperCase().endsWith(postfix.toUpperCase()),\n );\n\n if (!postfix) return trimmedSku;\n\n return trimmedSku.slice(0, -postfix.length).trim();\n};\n\n/**\n * Returns the SKU text with the extra label if it exists.\n */\nexport const getSkuText = (sku?: string, extraLabel?: string) => {\n if (!sku) return undefined;\n\n const preparedSku = removeRegionalSkuPostfix(sku);\n\n if (!extraLabel) return preparedSku;\n\n return `${preparedSku} (${extraLabel})`;\n};\n"],"names":["REGIONAL_SKU_POSTFIX","removeRegionalSkuPostfix","sku","trimmedSku","trim","postfix","find","toUpperCase","endsWith","slice","length","getSkuText","extraLabel","preparedSku"],"mappings":";;AAIA,MAAMA,oBAAuB,GAAA,CAC3B,KAAA,EACA,KAAA,EACA,MAAA,EACA,KAAA,EACA,MAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,IAAA,EACA,MAAA,EACA,aAAA,CACF;AAEa,MAAAC,wBAAA,GAA4BC,GAAiB,IAAA;EAClD,MAAAC,UAAA,GAAaD,KAAKE,IAAK,EAAA;EAE7B,IAAI,CAACD,UAAA,EAAmB,OAAA,KAAA,CAAA;EAExB,MAAME,UAAUL,oBAAqB,CAAAM,IAAA,CAAMD,QACzC,IAAAF,UAAA,CAAWC,IAAK,CAAA,CAAA,CAAEG,aAAc,CAAAC,QAAA,CAASH,QAAQ,CAAAE,WAAA,EAAa,CAAA,CAChE;EAEA,IAAI,CAACF,OAAA,EAAgB,OAAAF,UAAA;EAErB,OAAOA,WAAWM,KAAM,CAAA,CAAA,EAAG,CAACJ,OAAQ,CAAAK,MAAM,EAAEN,IAAK,EAAA;AACnD,CAAA;AAKa,MAAAO,UAAA,GAAaA,CAACT,GAAA,EAAcU,UAAwB,KAAA;EAC/D,IAAI,CAACV,GAAA,EAAY,OAAA,KAAA,CAAA;EAEX,MAAAW,WAAA,GAAcZ,yBAAyBC,GAAG,CAAA;EAEhD,IAAI,CAACU,UAAA,EAAmB,OAAAC,WAAA;EAEjB,OAAA,GAAGA,WAAW,KAAKD,UAAU,GAAA;AACtC,CAAA;"}
1
+ {"version":3,"file":"variant.mjs","sources":["../../src/utils/variant.ts"],"sourcesContent":["/**\n * Removes the regional (and other) SKU postfix from the SKU.\n */\n\nconst REGIONAL_SKU_POSTFIX = [\n \" EU\",\n \"-EU\",\n \"(EU)\",\n \" US\",\n \"(US)\",\n \"-US\",\n \"-BR\",\n \"-CN\",\n \"-TW\",\n \"-JP\",\n \"-AU\",\n \"-AR\",\n \"-UK\",\n \"-U\",\n \"-IND\",\n \"-Standalone\",\n];\n\nexport const removeRegionalSkuPostfix = (sku?: string) => {\n const trimmedSku = sku?.trim();\n\n if (!trimmedSku) return undefined;\n\n const postfix = REGIONAL_SKU_POSTFIX.find((postfix) =>\n trimmedSku.trim().toUpperCase().endsWith(postfix.toUpperCase()),\n );\n\n if (!postfix) return trimmedSku;\n\n return trimmedSku.slice(0, -postfix.length).trim();\n};\n\n/**\n * Returns the SKU text with the extra label if it exists.\n */\nexport const getSkuText = (sku?: string, extraLabel?: string) => {\n if (!sku) return undefined;\n\n const preparedSku = removeRegionalSkuPostfix(sku);\n\n if (!extraLabel) return preparedSku;\n\n return `${preparedSku} (${extraLabel})`;\n};\n"],"names":["REGIONAL_SKU_POSTFIX","removeRegionalSkuPostfix","sku","trimmedSku","trim","postfix","find","toUpperCase","endsWith","slice","length","getSkuText","extraLabel","preparedSku"],"mappings":";;AAIA,MAAMA,oBAAuB,GAAA,CAC3B,KAAA,EACA,KAAA,EACA,MAAA,EACA,KAAA,EACA,MAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,KAAA,EACA,IAAA,EACA,MAAA,EACA,aAAA,CACF;AAEa,MAAAC,wBAAA,GAA4BC,GAAiB,IAAA;EAClD,MAAAC,UAAA,GAAaD,KAAKE,IAAK,EAAA;EAEzB,IAAA,CAACD,YAAmB,OAAA,KAAA,CAAA;EAExB,MAAME,UAAUL,oBAAqB,CAAAM,IAAA,CAAMD,QACzC,IAAAF,UAAA,CAAWC,IAAK,CAAA,CAAA,CAAEG,aAAc,CAAAC,QAAA,CAASH,QAAQ,CAAAE,WAAA,EAAa,CAAA,CAChE;EAEI,IAAA,CAACF,SAAgB,OAAAF,UAAA;EAErB,OAAOA,WAAWM,KAAM,CAAA,CAAA,EAAG,CAACJ,OAAQ,CAAAK,MAAM,EAAEN,IAAK,EAAA;AACnD,CAAA;AAKa,MAAAO,UAAA,GAAaA,CAACT,GAAA,EAAcU,UAAwB,KAAA;EAC3D,IAAA,CAACV,KAAY,OAAA,KAAA,CAAA;EAEX,MAAAW,WAAA,GAAcZ,yBAAyBC,GAAG,CAAA;EAE5C,IAAA,CAACU,YAAmB,OAAAC,WAAA;EAEjB,OAAA,GAAGA,WAAW,KAAKD,UAAU,GAAA;AACtC,CAAA;"}
@@ -1 +1 @@
1
- {"version":3,"file":"wattage.js","sources":["../../src/utils/wattage.ts"],"sourcesContent":["// #############################################################################\n// PoE Wattage Tags\n// #############################################################################\n\nconst POE_WATTAGE_REGEX = /poe:(\\d+)w/i;\n\n/**\n * Get the PoE wattage from a tag\n * @example \"poe:100w\" => \"100W\"\n */\nexport const getPoeWattageFromTag = (tagName: string | undefined) => {\n // If there is no wattage tag, return undefined\n if (!tagName) return undefined;\n\n // Get the wattage from the tag\n const wattage = POE_WATTAGE_REGEX.exec(tagName)?.[1];\n\n // If there is no wattage, return undefined\n if (!wattage || !wattage.length) return undefined;\n\n // Return the wattage\n return `${wattage}W`;\n};\n\n/**\n * Finds first PoE wattage tag and returns the wattage\n */\nexport const getPoeWattageFromTags = (\n tags: { name: string }[],\n): string | undefined => {\n for (const tag of tags) {\n const watts = getPoeWattageFromTag(tag.name);\n\n if (watts) return watts;\n }\n\n return undefined;\n};\n"],"names":["POE_WATTAGE_REGEX","getPoeWattageFromTag","tagName","wattage","exec","length","getPoeWattageFromTags","tags","tag","watts","name"],"mappings":";;;AAIA,MAAMA,iBAAoB,GAAA,aAAA;AAMb,MAAAC,oBAAA,GAAwBC,OAAgC,IAAA;EAEnE,IAAI,CAACA,OAAA,EAAgB,OAAA,KAAA,CAAA;EAGrB,MAAMC,OAAU,GAAAH,iBAAA,CAAkBI,IAAK,CAAAF,OAAO,IAAI,CAAC,CAAA;EAG/C,IAAA,CAACC,OAAW,IAAA,CAACA,OAAQ,CAAAE,MAAA,EAAe,OAAA,KAAA,CAAA;EAGxC,UAAUF,OAAO,GAAA;AACnB,CAAA;AAKa,MAAAG,qBAAA,GACXC,IACuB,IAAA;EACvB,KAAA,MAAWC,OAAOD,IAAM,EAAA;IAChB,MAAAE,KAAA,GAAQR,oBAAqB,CAAAO,GAAA,CAAIE,IAAI,CAAA;IAEvC,IAAAD,KAAA,EAAc,OAAAA,KAAA;EACpB;EAEO,OAAA,KAAA,CAAA;AACT,CAAA;;"}
1
+ {"version":3,"file":"wattage.js","sources":["../../src/utils/wattage.ts"],"sourcesContent":["// #############################################################################\n// PoE Wattage Tags\n// #############################################################################\n\nconst POE_WATTAGE_REGEX = /poe:(\\d+)w/i;\n\n/**\n * Get the PoE wattage from a tag\n * @example \"poe:100w\" => \"100W\"\n */\nexport const getPoeWattageFromTag = (tagName: string | undefined) => {\n // If there is no wattage tag, return undefined\n if (!tagName) return undefined;\n\n // Get the wattage from the tag\n const wattage = POE_WATTAGE_REGEX.exec(tagName)?.[1];\n\n // If there is no wattage, return undefined\n if (!wattage || !wattage.length) return undefined;\n\n // Return the wattage\n return `${wattage}W`;\n};\n\n/**\n * Finds first PoE wattage tag and returns the wattage\n */\nexport const getPoeWattageFromTags = (\n tags: { name: string }[],\n): string | undefined => {\n for (const tag of tags) {\n const watts = getPoeWattageFromTag(tag.name);\n\n if (watts) return watts;\n }\n\n return undefined;\n};\n"],"names":["POE_WATTAGE_REGEX","getPoeWattageFromTag","tagName","wattage","exec","length","getPoeWattageFromTags","tags","tag","watts","name"],"mappings":";;;AAIA,MAAMA,iBAAoB,GAAA,aAAA;AAMb,MAAAC,oBAAA,GAAwBC,OAAgC,IAAA;EAE/D,IAAA,CAACA,SAAgB,OAAA,KAAA,CAAA;EAGrB,MAAMC,OAAU,GAAAH,iBAAA,CAAkBI,IAAK,CAAAF,OAAO,IAAI,CAAC,CAAA;EAGnD,IAAI,CAACC,OAAA,IAAW,CAACA,OAAA,CAAQE,QAAe,OAAA,KAAA,CAAA;EAGxC,UAAUF,OAAO,GAAA;AACnB,CAAA;AAKa,MAAAG,qBAAA,GACXC,IACuB,IAAA;EACvB,KAAA,MAAWC,OAAOD,IAAM,EAAA;IAChB,MAAAE,KAAA,GAAQR,oBAAqB,CAAAO,GAAA,CAAIE,IAAI,CAAA;IAE3C,IAAID,OAAc,OAAAA,KAAA;EACpB;EAEO,OAAA,KAAA,CAAA;AACT,CAAA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"wattage.mjs","sources":["../../src/utils/wattage.ts"],"sourcesContent":["// #############################################################################\n// PoE Wattage Tags\n// #############################################################################\n\nconst POE_WATTAGE_REGEX = /poe:(\\d+)w/i;\n\n/**\n * Get the PoE wattage from a tag\n * @example \"poe:100w\" => \"100W\"\n */\nexport const getPoeWattageFromTag = (tagName: string | undefined) => {\n // If there is no wattage tag, return undefined\n if (!tagName) return undefined;\n\n // Get the wattage from the tag\n const wattage = POE_WATTAGE_REGEX.exec(tagName)?.[1];\n\n // If there is no wattage, return undefined\n if (!wattage || !wattage.length) return undefined;\n\n // Return the wattage\n return `${wattage}W`;\n};\n\n/**\n * Finds first PoE wattage tag and returns the wattage\n */\nexport const getPoeWattageFromTags = (\n tags: { name: string }[],\n): string | undefined => {\n for (const tag of tags) {\n const watts = getPoeWattageFromTag(tag.name);\n\n if (watts) return watts;\n }\n\n return undefined;\n};\n"],"names":["POE_WATTAGE_REGEX","getPoeWattageFromTag","tagName","wattage","exec","length","getPoeWattageFromTags","tags","tag","watts","name"],"mappings":";;AAIA,MAAMA,iBAAoB,GAAA,aAAA;AAMb,MAAAC,oBAAA,GAAwBC,OAAgC,IAAA;EAEnE,IAAI,CAACA,OAAA,EAAgB,OAAA,KAAA,CAAA;EAGrB,MAAMC,OAAU,GAAAH,iBAAA,CAAkBI,IAAK,CAAAF,OAAO,IAAI,CAAC,CAAA;EAG/C,IAAA,CAACC,OAAW,IAAA,CAACA,OAAQ,CAAAE,MAAA,EAAe,OAAA,KAAA,CAAA;EAGxC,UAAUF,OAAO,GAAA;AACnB,CAAA;AAKa,MAAAG,qBAAA,GACXC,IACuB,IAAA;EACvB,KAAA,MAAWC,OAAOD,IAAM,EAAA;IAChB,MAAAE,KAAA,GAAQR,oBAAqB,CAAAO,GAAA,CAAIE,IAAI,CAAA;IAEvC,IAAAD,KAAA,EAAc,OAAAA,KAAA;EACpB;EAEO,OAAA,KAAA,CAAA;AACT,CAAA;"}
1
+ {"version":3,"file":"wattage.mjs","sources":["../../src/utils/wattage.ts"],"sourcesContent":["// #############################################################################\n// PoE Wattage Tags\n// #############################################################################\n\nconst POE_WATTAGE_REGEX = /poe:(\\d+)w/i;\n\n/**\n * Get the PoE wattage from a tag\n * @example \"poe:100w\" => \"100W\"\n */\nexport const getPoeWattageFromTag = (tagName: string | undefined) => {\n // If there is no wattage tag, return undefined\n if (!tagName) return undefined;\n\n // Get the wattage from the tag\n const wattage = POE_WATTAGE_REGEX.exec(tagName)?.[1];\n\n // If there is no wattage, return undefined\n if (!wattage || !wattage.length) return undefined;\n\n // Return the wattage\n return `${wattage}W`;\n};\n\n/**\n * Finds first PoE wattage tag and returns the wattage\n */\nexport const getPoeWattageFromTags = (\n tags: { name: string }[],\n): string | undefined => {\n for (const tag of tags) {\n const watts = getPoeWattageFromTag(tag.name);\n\n if (watts) return watts;\n }\n\n return undefined;\n};\n"],"names":["POE_WATTAGE_REGEX","getPoeWattageFromTag","tagName","wattage","exec","length","getPoeWattageFromTags","tags","tag","watts","name"],"mappings":";;AAIA,MAAMA,iBAAoB,GAAA,aAAA;AAMb,MAAAC,oBAAA,GAAwBC,OAAgC,IAAA;EAE/D,IAAA,CAACA,SAAgB,OAAA,KAAA,CAAA;EAGrB,MAAMC,OAAU,GAAAH,iBAAA,CAAkBI,IAAK,CAAAF,OAAO,IAAI,CAAC,CAAA;EAGnD,IAAI,CAACC,OAAA,IAAW,CAACA,OAAA,CAAQE,QAAe,OAAA,KAAA,CAAA;EAGxC,UAAUF,OAAO,GAAA;AACnB,CAAA;AAKa,MAAAG,qBAAA,GACXC,IACuB,IAAA;EACvB,KAAA,MAAWC,OAAOD,IAAM,EAAA;IAChB,MAAAE,KAAA,GAAQR,oBAAqB,CAAAO,GAAA,CAAIE,IAAI,CAAA;IAE3C,IAAID,OAAc,OAAAA,KAAA;EACpB;EAEO,OAAA,KAAA,CAAA;AACT,CAAA;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ubnt/store.core",
3
- "version": "9.17.0-alpha.4",
3
+ "version": "9.17.0",
4
4
  "description": "",
5
5
  "sideEffects": false,
6
6
  "scripts": {
Binary file
@@ -1,5 +0,0 @@
1
- <svg width="17" height="17" viewBox="0 0 17 17" fill="none"
2
- xmlns="http://www.w3.org/2000/svg">
3
- <path fill-rule="evenodd" clip-rule="evenodd" d="M11.0499 6.80268C11.0499 8.21196 9.90823 9.3544 8.4999 9.3544C7.09158 9.3544 5.9499 8.21196 5.9499 6.80268C5.9499 5.3934 7.09158 4.25095 8.4999 4.25095C9.90823 4.25095 11.0499 5.3934 11.0499 6.80268ZM10.1999 6.80268C10.1999 7.7422 9.43879 8.50383 8.4999 8.50383C7.56102 8.50383 6.7999 7.7422 6.7999 6.80268C6.7999 5.86316 7.56102 5.10152 8.4999 5.10152C9.43879 5.10152 10.1999 5.86316 10.1999 6.80268Z" fill="currentColor"/>
4
- <path fill-rule="evenodd" clip-rule="evenodd" d="M8.4999 1.69922C5.68325 1.69922 3.3999 3.98411 3.3999 6.80268C3.3999 8.76181 4.31062 10.6139 5.31026 12.0638C6.31479 13.5208 7.44298 14.6203 7.94931 15.0835C8.26361 15.3711 8.73619 15.3711 9.0505 15.0835C9.55683 14.6203 10.685 13.5208 11.6895 12.0638C12.6892 10.6139 13.5999 8.76181 13.5999 6.80268C13.5999 3.98411 11.3166 1.69922 8.4999 1.69922ZM4.2499 6.80268C4.2499 4.45387 6.15269 2.54979 8.4999 2.54979C10.8471 2.54979 12.7499 4.45387 12.7499 6.80268C12.7499 8.51023 11.9489 10.1898 10.9899 11.5808C10.0506 12.9431 8.99195 13.9825 8.4999 14.4347C8.00786 13.9825 6.94916 12.9431 6.00991 11.5808C5.0509 10.1898 4.2499 8.51023 4.2499 6.80268Z" fill="currentColor"/>
5
- </svg>
@@ -1,27 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- });
6
- var LocationPinIcon = require("../../icon-location-pin.svg");
7
- function _interopDefault(e) {
8
- return e && e.__esModule ? e : {
9
- default: e
10
- };
11
- }
12
- var LocationPinIcon__default = /*#__PURE__*/_interopDefault(LocationPinIcon);
13
- Object.defineProperty(exports, "default", {
14
- enumerable: true,
15
- get: function () {
16
- return LocationPinIcon__default["default"];
17
- }
18
- });
19
- Object.keys(LocationPinIcon).forEach(function (k) {
20
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
21
- enumerable: true,
22
- get: function () {
23
- return LocationPinIcon[k];
24
- }
25
- });
26
- });
27
- //# sourceMappingURL=icon-location-pin.svg.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"icon-location-pin.svg.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,3 +0,0 @@
1
- export * from "../../icon-location-pin.svg";
2
- export { default } from "../../icon-location-pin.svg";
3
- //# sourceMappingURL=icon-location-pin.svg.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"icon-location-pin.svg.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
Binary file
@@ -1,2 +0,0 @@
1
- import type { NavigationProMenuPrivateProps } from "./ProMenu.types";
2
- export declare const NavigationProMenu: ({ show, onClose, currentCountryName, handleStorePickerClick, productLineValue, productLineOptions, onProductLineChange, }: NavigationProMenuPrivateProps) => JSX.Element;
@@ -1,109 +0,0 @@
1
- 'use strict';
2
-
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var react = require('react');
5
- var reactUse = require('react-use');
6
- require('../../../../contexts/MenuContext/index.js');
7
- require('../../../../contexts/MenuContext/mapping.js');
8
- require('../../../../hooks/index.js');
9
- var useHasTouch = require('../../../../hooks/useHasTouch.js');
10
- require('../../translations/index.js');
11
- var ProMenu_styles = require('./ProMenu.styles.js');
12
- var context = require('../../../../contexts/MenuContext/context.js');
13
- var useTranslation = require('../../../../hooks/useTranslation.js');
14
- var en = require('../../translations/en.json.js');
15
- var constants = require('../../../../types/constants.js');
16
- "use strict";
17
- const NavigationProMenu = ({
18
- show,
19
- onClose,
20
- currentCountryName,
21
- handleStorePickerClick,
22
- productLineValue,
23
- productLineOptions,
24
- onProductLineChange
25
- }) => {
26
- const {
27
- motif
28
- } = context.useMenu();
29
- const {
30
- formatMessage
31
- } = useTranslation.useTranslation({
32
- defaultTranslation: en["default"],
33
- additionalTranslations: {
34
- [constants.Language.Ja]: () => Promise.resolve().then(function () {
35
- return require('../../translations/ja.json.js');
36
- }).then(res => res.default),
37
- [constants.Language.Ar]: () => Promise.resolve().then(function () {
38
- return require('../../translations/ar.json.js');
39
- }).then(res => res.default),
40
- [constants.Language.De]: () => Promise.resolve().then(function () {
41
- return require('../../translations/de.json.js');
42
- }).then(res => res.default),
43
- [constants.Language.Es]: () => Promise.resolve().then(function () {
44
- return require('../../translations/es.json.js');
45
- }).then(res => res.default),
46
- [constants.Language.El]: () => Promise.resolve().then(function () {
47
- return require('../../translations/el.json.js');
48
- }).then(res => res.default),
49
- [constants.Language.It]: () => Promise.resolve().then(function () {
50
- return require('../../translations/it.json.js');
51
- }).then(res => res.default),
52
- [constants.Language.Pt]: () => Promise.resolve().then(function () {
53
- return require('../../translations/pt-BR.json.js');
54
- }).then(res => res.default),
55
- [constants.Language.Zh]: () => Promise.resolve().then(function () {
56
- return require('../../translations/zh-Hans.json.js');
57
- }).then(res => res.default),
58
- [constants.Language.Fr]: () => Promise.resolve().then(function () {
59
- return require('../../translations/fr.json.js');
60
- }).then(res => res.default),
61
- [constants.Language.Tw]: () => Promise.resolve().then(function () {
62
- return require('../../translations/zh-Hant-TW.json.js');
63
- }).then(res => res.default)
64
- }
65
- });
66
- const wrapRef = react.useRef(null);
67
- const wrapHover = reactUse.useHoverDirty(wrapRef);
68
- const hasTouch = useHasTouch.useHasTouch();
69
- const slideInView = react.useMemo(() => {
70
- const hasHover = !hasTouch && wrapHover;
71
- return show || hasHover;
72
- }, [hasTouch, show, wrapHover]);
73
- return /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, {
74
- children: [/* @__PURE__ */jsxRuntime.jsx(ProMenu_styles.GlassCover, {
75
- $show: hasTouch && slideInView,
76
- onClick: onClose
77
- }), /* @__PURE__ */jsxRuntime.jsx(ProMenu_styles.Wrap, {
78
- ref: wrapRef,
79
- motif,
80
- slideInView,
81
- children: /* @__PURE__ */jsxRuntime.jsx(ProMenu_styles.MenuWrap, {
82
- motif,
83
- children: /* @__PURE__ */jsxRuntime.jsx(ProMenu_styles.MenuWrapInner, {
84
- children: /* @__PURE__ */jsxRuntime.jsxs(ProMenu_styles.Container, {
85
- size: "desktop",
86
- noVerticalMargin: true,
87
- children: [/* @__PURE__ */jsxRuntime.jsx(ProMenu_styles.ContainerRow, {
88
- children: productLineOptions.map(option => /* @__PURE__ */jsxRuntime.jsx(ProMenu_styles.LinkButton, {
89
- motif,
90
- $active: option.value === productLineValue,
91
- onClick: () => onProductLineChange?.(option.value),
92
- children: option.label
93
- }, option.value))
94
- }), currentCountryName && /* @__PURE__ */jsxRuntime.jsxs(ProMenu_styles.ContainerRow, {
95
- children: [currentCountryName, /* @__PURE__ */jsxRuntime.jsx(ProMenu_styles.LinkButton, {
96
- motif,
97
- $active: true,
98
- onClick: handleStorePickerClick,
99
- children: formatMessage("Change")
100
- })]
101
- })]
102
- })
103
- })
104
- })
105
- })]
106
- });
107
- };
108
- exports.NavigationProMenu = NavigationProMenu;
109
- //# sourceMappingURL=ProMenu.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProMenu.js","sources":["../../../../../src/components/Header/Navigation/ProMenu/ProMenu.tsx"],"sourcesContent":["import { useMemo, useRef } from \"react\";\nimport { useHoverDirty } from \"react-use\";\n\nimport { useMenu } from \"../../../../contexts/MenuContext\";\nimport { Language } from \"../../../../contexts/MenuContext/mapping\";\nimport { useTranslation } from \"../../../../hooks\";\nimport { useHasTouch } from \"../../../../hooks/useHasTouch\";\nimport { en as EN_TRANSLATION } from \"../../translations\";\nimport * as S from \"./ProMenu.styles\";\nimport type { NavigationProMenuPrivateProps } from \"./ProMenu.types\";\n\nexport const NavigationProMenu = ({\n show,\n onClose,\n currentCountryName,\n handleStorePickerClick,\n productLineValue,\n productLineOptions,\n onProductLineChange,\n}: NavigationProMenuPrivateProps) => {\n const { motif } = useMenu();\n const { formatMessage } = useTranslation({\n defaultTranslation: EN_TRANSLATION,\n additionalTranslations: {\n [Language.Ja]: () =>\n import(\"../../translations/ja.json\").then((res) => res.default),\n [Language.Ar]: () =>\n import(\"../../translations/ar.json\").then((res) => res.default),\n [Language.De]: () =>\n import(\"../../translations/de.json\").then((res) => res.default),\n [Language.Es]: () =>\n import(\"../../translations/es.json\").then((res) => res.default),\n [Language.El]: () =>\n import(\"../../translations/el.json\").then((res) => res.default),\n [Language.It]: () =>\n import(\"../../translations/it.json\").then((res) => res.default),\n [Language.Pt]: () =>\n import(\"../../translations/pt-BR.json\").then((res) => res.default),\n [Language.Zh]: () =>\n import(\"../../translations/zh-Hans.json\").then((res) => res.default),\n [Language.Fr]: () =>\n import(\"../../translations/fr.json\").then((res) => res.default),\n [Language.Tw]: () =>\n import(\"../../translations/zh-Hant-TW.json\").then((res) => res.default),\n },\n });\n\n // #############################################################################\n // Refs\n // #############################################################################\n const wrapRef = useRef<HTMLDivElement>(null);\n\n // #############################################################################\n // Handle show\n // #############################################################################\n const wrapHover = useHoverDirty(wrapRef);\n const hasTouch = useHasTouch();\n\n const slideInView = useMemo((): boolean => {\n // Ignore hover on touch devices\n const hasHover = !hasTouch && wrapHover;\n\n // Show when parent or wrap has hover\n return show || hasHover;\n }, [hasTouch, show, wrapHover]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <>\n <S.GlassCover $show={hasTouch && slideInView} onClick={onClose} />\n <S.Wrap ref={wrapRef} motif={motif} slideInView={slideInView}>\n <S.MenuWrap motif={motif}>\n <S.MenuWrapInner>\n <S.Container size=\"desktop\" noVerticalMargin>\n {/* Product line */}\n <S.ContainerRow>\n {productLineOptions.map((option) => (\n <S.LinkButton\n key={option.value}\n motif={motif}\n $active={option.value === productLineValue}\n onClick={() => onProductLineChange?.(option.value)}\n >\n {option.label}\n </S.LinkButton>\n ))}\n </S.ContainerRow>\n\n {/* Country */}\n {currentCountryName && (\n <S.ContainerRow>\n {currentCountryName}\n <S.LinkButton\n motif={motif}\n $active\n onClick={handleStorePickerClick}\n >\n {formatMessage(\"Change\")}\n </S.LinkButton>\n </S.ContainerRow>\n )}\n </S.Container>\n </S.MenuWrapInner>\n </S.MenuWrap>\n </S.Wrap>\n </>\n );\n};\n"],"names":["NavigationProMenu","show","onClose","currentCountryName","handleStorePickerClick","productLineValue","productLineOptions","onProductLineChange","motif","useMenu","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","Promise","then","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","Tw","wrapRef","useRef","wrapHover","useHoverDirty","hasTouch","useHasTouch","slideInView","useMemo","hasHover","jsxs","Fragment","children","jsx","S.GlassCover","GlassCover","$show","onClick","S.Wrap","Wrap","ref","S.MenuWrap","MenuWrap","S.MenuWrapInner","MenuWrapInner","S.Container","size","noVerticalMargin","S.ContainerRow","ContainerRow","map","option","S.LinkButton","LinkButton","$active","value","label"],"mappings":";;;;;;;;;;;;;;;;AAWO,MAAMA,oBAAoBA,CAAC;EAChCC,IAAA;EACAC,OAAA;EACAC,kBAAA;EACAC,sBAAA;EACAC,gBAAA;EACAC,kBAAA;EACAC;AACF,CAAqC,KAAA;EAC7B,MAAA;IAAEC;GAAM,GAAIC,OAAAA,CAAAA,OAAQ,EAAA;EACpB,MAAA;IAAEC;EAAc,CAAA,GAAIC,6BAAe,CAAA;IACvCC,kBAAoB,EAAAC,EAAA,CAAA,SAAA,CAAA;IACpBC,sBAAwB,EAAA;MACtB,CAACC,SAAA,CAAAA,QAAA,CAASC,EAAE,GAAG,MACbC;uBAAO,+BAA4B,CAAA;MAAA,CAAA,CAAA,CAAEC,IAAK,CAACC,GAAQ,IAAAA,GAAA,CAAIC,OAAO,CAAA;MAChE,CAACL,SAAA,CAAAA,QAAA,CAASM,EAAE,GAAG,MACbJ;uBAAO,+BAA4B,CAAA;MAAA,C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AAAC,UAAA,EAAF;gBAECtD,KAAA;gBACAuD,OAAA,EAASH,OAAOI,KAAU,KAAA3D,gBAAA;gBAC1ByC,OAAS,EAAAA,CAAA,KAAMvC,mBAAsB,GAAAqD,MAAA,CAAOI,KAAK,CAAA;gBAEhDvB,QAAO,EAAAmB,MAAA,CAAAK;cAAA,CAAA,EALHL,MAAO,CAAAI,KAOf,CAAA;aACH,CAAA,EAGC7D,kBACC,mBAAAoC,UAAA,CAAAA,IAAA,CAACkB,2BAAE,EAAF;cACEhB,QAAA,EAAA,CAAAtC,kBAAA,EAAA,eACDuC,UAAA,CAAAA,GAAA,CAACmB,cAAE,CAAAC,UAAA,EAAF;gBACCtD,KAAA;gBACAuD,OAAO,EAAA,IAAA;gBACPjB,OAAS,EAAA1C,sBAAA;gBAERqC,wBAAc,QAAQ;cAAA,CACzB,CAAA;aACF,CAAA;WAEJ;QAAA,CACF;MACF,CAAA;KACF,CAAA;EACF,CAAA,CAAA;AAEJ,CAAA;"}
@@ -1,87 +0,0 @@
1
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
- import { useRef, useMemo } from 'react';
3
- import { useHoverDirty } from 'react-use';
4
- import '../../../../contexts/MenuContext/index.mjs';
5
- import '../../../../contexts/MenuContext/mapping.mjs';
6
- import '../../../../hooks/index.mjs';
7
- import { useHasTouch } from '../../../../hooks/useHasTouch.mjs';
8
- import '../../translations/index.mjs';
9
- import { GlassCover, Wrap, MenuWrap, MenuWrapInner, Container, ContainerRow, LinkButton } from './ProMenu.styles.mjs';
10
- import { useMenu } from '../../../../contexts/MenuContext/context.mjs';
11
- import { useTranslation } from '../../../../hooks/useTranslation.mjs';
12
- import EN_TRANSLATION from '../../translations/en.json.mjs';
13
- import { Language } from '../../../../types/constants.mjs';
14
- "use strict";
15
- const NavigationProMenu = ({
16
- show,
17
- onClose,
18
- currentCountryName,
19
- handleStorePickerClick,
20
- productLineValue,
21
- productLineOptions,
22
- onProductLineChange
23
- }) => {
24
- const {
25
- motif
26
- } = useMenu();
27
- const {
28
- formatMessage
29
- } = useTranslation({
30
- defaultTranslation: EN_TRANSLATION,
31
- additionalTranslations: {
32
- [Language.Ja]: () => import('../../translations/ja.json.mjs').then(res => res.default),
33
- [Language.Ar]: () => import('../../translations/ar.json.mjs').then(res => res.default),
34
- [Language.De]: () => import('../../translations/de.json.mjs').then(res => res.default),
35
- [Language.Es]: () => import('../../translations/es.json.mjs').then(res => res.default),
36
- [Language.El]: () => import('../../translations/el.json.mjs').then(res => res.default),
37
- [Language.It]: () => import('../../translations/it.json.mjs').then(res => res.default),
38
- [Language.Pt]: () => import('../../translations/pt-BR.json.mjs').then(res => res.default),
39
- [Language.Zh]: () => import('../../translations/zh-Hans.json.mjs').then(res => res.default),
40
- [Language.Fr]: () => import('../../translations/fr.json.mjs').then(res => res.default),
41
- [Language.Tw]: () => import('../../translations/zh-Hant-TW.json.mjs').then(res => res.default)
42
- }
43
- });
44
- const wrapRef = useRef(null);
45
- const wrapHover = useHoverDirty(wrapRef);
46
- const hasTouch = useHasTouch();
47
- const slideInView = useMemo(() => {
48
- const hasHover = !hasTouch && wrapHover;
49
- return show || hasHover;
50
- }, [hasTouch, show, wrapHover]);
51
- return /* @__PURE__ */jsxs(Fragment, {
52
- children: [/* @__PURE__ */jsx(GlassCover, {
53
- $show: hasTouch && slideInView,
54
- onClick: onClose
55
- }), /* @__PURE__ */jsx(Wrap, {
56
- ref: wrapRef,
57
- motif,
58
- slideInView,
59
- children: /* @__PURE__ */jsx(MenuWrap, {
60
- motif,
61
- children: /* @__PURE__ */jsx(MenuWrapInner, {
62
- children: /* @__PURE__ */jsxs(Container, {
63
- size: "desktop",
64
- noVerticalMargin: true,
65
- children: [/* @__PURE__ */jsx(ContainerRow, {
66
- children: productLineOptions.map(option => /* @__PURE__ */jsx(LinkButton, {
67
- motif,
68
- $active: option.value === productLineValue,
69
- onClick: () => onProductLineChange?.(option.value),
70
- children: option.label
71
- }, option.value))
72
- }), currentCountryName && /* @__PURE__ */jsxs(ContainerRow, {
73
- children: [currentCountryName, /* @__PURE__ */jsx(LinkButton, {
74
- motif,
75
- $active: true,
76
- onClick: handleStorePickerClick,
77
- children: formatMessage("Change")
78
- })]
79
- })]
80
- })
81
- })
82
- })
83
- })]
84
- });
85
- };
86
- export { NavigationProMenu };
87
- //# sourceMappingURL=ProMenu.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProMenu.mjs","sources":["../../../../../src/components/Header/Navigation/ProMenu/ProMenu.tsx"],"sourcesContent":["import { useMemo, useRef } from \"react\";\nimport { useHoverDirty } from \"react-use\";\n\nimport { useMenu } from \"../../../../contexts/MenuContext\";\nimport { Language } from \"../../../../contexts/MenuContext/mapping\";\nimport { useTranslation } from \"../../../../hooks\";\nimport { useHasTouch } from \"../../../../hooks/useHasTouch\";\nimport { en as EN_TRANSLATION } from \"../../translations\";\nimport * as S from \"./ProMenu.styles\";\nimport type { NavigationProMenuPrivateProps } from \"./ProMenu.types\";\n\nexport const NavigationProMenu = ({\n show,\n onClose,\n currentCountryName,\n handleStorePickerClick,\n productLineValue,\n productLineOptions,\n onProductLineChange,\n}: NavigationProMenuPrivateProps) => {\n const { motif } = useMenu();\n const { formatMessage } = useTranslation({\n defaultTranslation: EN_TRANSLATION,\n additionalTranslations: {\n [Language.Ja]: () =>\n import(\"../../translations/ja.json\").then((res) => res.default),\n [Language.Ar]: () =>\n import(\"../../translations/ar.json\").then((res) => res.default),\n [Language.De]: () =>\n import(\"../../translations/de.json\").then((res) => res.default),\n [Language.Es]: () =>\n import(\"../../translations/es.json\").then((res) => res.default),\n [Language.El]: () =>\n import(\"../../translations/el.json\").then((res) => res.default),\n [Language.It]: () =>\n import(\"../../translations/it.json\").then((res) => res.default),\n [Language.Pt]: () =>\n import(\"../../translations/pt-BR.json\").then((res) => res.default),\n [Language.Zh]: () =>\n import(\"../../translations/zh-Hans.json\").then((res) => res.default),\n [Language.Fr]: () =>\n import(\"../../translations/fr.json\").then((res) => res.default),\n [Language.Tw]: () =>\n import(\"../../translations/zh-Hant-TW.json\").then((res) => res.default),\n },\n });\n\n // #############################################################################\n // Refs\n // #############################################################################\n const wrapRef = useRef<HTMLDivElement>(null);\n\n // #############################################################################\n // Handle show\n // #############################################################################\n const wrapHover = useHoverDirty(wrapRef);\n const hasTouch = useHasTouch();\n\n const slideInView = useMemo((): boolean => {\n // Ignore hover on touch devices\n const hasHover = !hasTouch && wrapHover;\n\n // Show when parent or wrap has hover\n return show || hasHover;\n }, [hasTouch, show, wrapHover]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <>\n <S.GlassCover $show={hasTouch && slideInView} onClick={onClose} />\n <S.Wrap ref={wrapRef} motif={motif} slideInView={slideInView}>\n <S.MenuWrap motif={motif}>\n <S.MenuWrapInner>\n <S.Container size=\"desktop\" noVerticalMargin>\n {/* Product line */}\n <S.ContainerRow>\n {productLineOptions.map((option) => (\n <S.LinkButton\n key={option.value}\n motif={motif}\n $active={option.value === productLineValue}\n onClick={() => onProductLineChange?.(option.value)}\n >\n {option.label}\n </S.LinkButton>\n ))}\n </S.ContainerRow>\n\n {/* Country */}\n {currentCountryName && (\n <S.ContainerRow>\n {currentCountryName}\n <S.LinkButton\n motif={motif}\n $active\n onClick={handleStorePickerClick}\n >\n {formatMessage(\"Change\")}\n </S.LinkButton>\n </S.ContainerRow>\n )}\n </S.Container>\n </S.MenuWrapInner>\n </S.MenuWrap>\n </S.Wrap>\n </>\n );\n};\n"],"names":["NavigationProMenu","show","onClose","currentCountryName","handleStorePickerClick","productLineValue","productLineOptions","onProductLineChange","motif","useMenu","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","then","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","Tw","wrapRef","useRef","wrapHover","useHoverDirty","hasTouch","useHasTouch","slideInView","useMemo","hasHover","jsxs","Fragment","children","jsx","S.GlassCover","$show","onClick","S.Wrap","ref","S.MenuWrap","S.MenuWrapInner","S.Container","size","noVerticalMargin","S.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,mBAAAb,GAAA,CAACc,UAAE,EAAF;gBAEC/C,KAAA;gBACAgD,OAAA,EAASF,OAAOG,KAAU,KAAApD,gBAAA;gBAC1BuC,OAAS,EAAAA,CAAA,KAAMrC,mBAAsB,GAAA+C,MAAA,CAAOG,KAAK,CAAA;gBAEhDjB,QAAO,EAAAc,MAAA,CAAAI;cAAA,CAAA,EALHJ,MAAO,CAAAG,KAOf,CAAA;aACH,CAAA,EAGCtD,kBACC,mBAAAmC,IAAA,CAACc,YAAE,EAAF;cACEZ,QAAA,EAAA,CAAArC,kBAAA,EAAA,eACDsC,GAAA,CAACc,UAAE,EAAF;gBACC/C,KAAA;gBACAgD,OAAO,EAAA,IAAA;gBACPZ,OAAS,EAAAxC,sBAAA;gBAERoC,wBAAc,QAAQ;cAAA,CACzB,CAAA;aACF,CAAA;WAEJ;QAAA,CACF;MACF,CAAA;KACF,CAAA;EACF,CAAA,CAAA;AAEJ,CAAA;"}
@@ -1,24 +0,0 @@
1
- import type { Motif } from "@ubnt/ui-components/utils";
2
- export declare const TRANSITION_DURATION_MS = 250;
3
- export declare const GLASS_COVER_Z_INDEX: number;
4
- export declare const MenuWrapInner: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
5
- export declare const MenuWrap: import("styled-components").StyledComponent<"nav", import("styled-components").DefaultTheme, {
6
- motif: Motif;
7
- }, never>;
8
- export declare const Wrap: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
9
- motif: Motif;
10
- slideInView: boolean;
11
- }, never>;
12
- export declare const Container: import("styled-components").StyledComponent<import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("../../../Container/Container.types").ContainerProps & import("react").RefAttributes<HTMLDivElement>>>, import("styled-components").DefaultTheme, {}, never>;
13
- export declare const ContainerRow: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
14
- export declare const LinkButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../Button/Button.types").ButtonProps & {
15
- children?: import("react").ReactNode;
16
- } & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement | null>>, import("styled-components").DefaultTheme, {
17
- variant: "link";
18
- } & {
19
- $active?: boolean;
20
- motif: Motif;
21
- }, "variant">;
22
- export declare const GlassCover: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
23
- $show?: boolean;
24
- }, never>;