@ubnt/store.core 10.17.2 → 10.18.0-beta.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 (615) hide show
  1. package/CHANGELOG.md +350 -20
  2. package/lib/assets/ai-360.jpg +0 -0
  3. package/lib/assets/ai-3602.jpg +0 -0
  4. package/lib/assets/ai-ptz-precision.jpg +0 -0
  5. package/lib/assets/ai-ptz-precision2.jpg +0 -0
  6. package/lib/assets/ai-theta-pro.jpg +0 -0
  7. package/lib/assets/ai-theta-pro2.jpg +0 -0
  8. package/lib/assets/ai-theta.jpg +0 -0
  9. package/lib/assets/ai-theta3.jpg +0 -0
  10. package/lib/assets/ai-turret.jpg +0 -0
  11. package/lib/assets/ai-turret2.jpg +0 -0
  12. package/lib/assets/building-bridge-xg.jpg +0 -0
  13. package/lib/assets/building-bridge-xg2.jpg +0 -0
  14. package/lib/assets/building-bridge.jpg +0 -0
  15. package/lib/assets/building-bridge2.jpg +0 -0
  16. package/lib/assets/bullet.svg +1 -3
  17. package/lib/assets/bullet2.svg +3 -1
  18. package/lib/assets/crestron.svg +3 -0
  19. package/lib/assets/door-hub-mini.jpg +0 -0
  20. package/lib/assets/door-hub-mini2.jpg +0 -0
  21. package/lib/assets/e7-audience.jpg +0 -0
  22. package/lib/assets/e7-audience2.jpg +0 -0
  23. package/lib/assets/express.jpg +0 -0
  24. package/lib/assets/express2.jpg +0 -0
  25. package/lib/assets/flex.jpg +0 -0
  26. package/lib/assets/flex2.jpg +0 -0
  27. package/lib/assets/g2-reader-pro.jpg +0 -0
  28. package/lib/assets/g2-reader-pro2.jpg +0 -0
  29. package/lib/assets/g3-reader-flex.jpg +0 -0
  30. package/lib/assets/g3-reader-flex2.jpg +0 -0
  31. package/lib/assets/g3-starter-kit.jpg +0 -0
  32. package/lib/assets/g3-starter-kit2.jpg +0 -0
  33. package/lib/assets/g4-instant.jpg +0 -0
  34. package/lib/assets/g4-instant2.jpg +0 -0
  35. package/lib/assets/g4-ptz2.jpg +0 -0
  36. package/lib/assets/g4-ptz3.jpg +0 -0
  37. package/lib/assets/g5-bullet.jpg +0 -0
  38. package/lib/assets/g5-bullet2.jpg +0 -0
  39. package/lib/assets/g5-dome.jpg +0 -0
  40. package/lib/assets/g5-dome2.jpg +0 -0
  41. package/lib/assets/g5-ptz.jpg +0 -0
  42. package/lib/assets/g5-ptz3.jpg +0 -0
  43. package/lib/assets/g5-turret-ultra.jpg +0 -0
  44. package/lib/assets/g5-turret-ultra3.jpg +0 -0
  45. package/lib/assets/g6-ptz.jpg +0 -0
  46. package/lib/assets/g6-ptz2.jpg +0 -0
  47. package/lib/assets/globe.svg +2 -9
  48. package/lib/assets/globe2.svg +9 -2
  49. package/lib/assets/intercom.jpg +0 -0
  50. package/lib/assets/intercom2.jpg +0 -0
  51. package/lib/assets/interior-design.svg +2 -2
  52. package/lib/assets/interior-design2.svg +2 -2
  53. package/lib/assets/pause.svg +3 -3
  54. package/lib/assets/pause2.svg +3 -3
  55. package/lib/assets/power.svg +1 -4
  56. package/lib/assets/power2.svg +4 -1
  57. package/lib/assets/ptz.svg +2 -2
  58. package/lib/assets/ptz2.svg +2 -2
  59. package/lib/assets/rack.svg +1 -4
  60. package/lib/assets/rack2.svg +4 -1
  61. package/lib/assets/u6-in-wall.jpg +0 -0
  62. package/lib/assets/u6-in-wall2.jpg +0 -0
  63. package/lib/assets/u7-pro-max.jpg +0 -0
  64. package/lib/assets/u7-pro-max2.jpg +0 -0
  65. package/lib/assets/{ucCast.jpg → ucCastLite.jpg} +0 -0
  66. package/lib/assets/ucg-fiber.png +0 -0
  67. package/lib/assets/ucgFiber.jpg +0 -0
  68. package/lib/assets/ucgFiber2.jpg +0 -0
  69. package/lib/assets/ucgMax.jpg +0 -0
  70. package/lib/assets/ucgMax2.jpg +0 -0
  71. package/lib/assets/ucgUltra.jpg +0 -0
  72. package/lib/assets/ucgUltra2.jpg +0 -0
  73. package/lib/assets/udr2.jpg +0 -0
  74. package/lib/assets/udr3.jpg +0 -0
  75. package/lib/assets/udr7.png +0 -0
  76. package/lib/assets/ux.png +0 -0
  77. package/lib/assets/ux7.png +0 -0
  78. package/lib/components/BodyPortal/BodyPortal.d.ts +6 -0
  79. package/lib/components/BodyPortal/BodyPortal.js +18 -0
  80. package/lib/components/BodyPortal/BodyPortal.js.map +1 -0
  81. package/lib/components/BodyPortal/BodyPortal.mjs +16 -0
  82. package/lib/components/BodyPortal/BodyPortal.mjs.map +1 -0
  83. package/lib/components/BodyPortal/index.d.ts +1 -0
  84. package/lib/components/BodyPortal/index.js +6 -0
  85. package/lib/components/BodyPortal/index.js.map +1 -0
  86. package/lib/components/BodyPortal/index.mjs +3 -0
  87. package/lib/components/BodyPortal/index.mjs.map +1 -0
  88. package/lib/components/Header/AccountMenu/AccountMenu.js +18 -5
  89. package/lib/components/Header/AccountMenu/AccountMenu.js.map +1 -1
  90. package/lib/components/Header/AccountMenu/AccountMenu.mjs +18 -5
  91. package/lib/components/Header/AccountMenu/AccountMenu.mjs.map +1 -1
  92. package/lib/components/Header/CartIcon/CartIcon.d.ts +1 -1
  93. package/lib/components/Header/CartIcon/CartIcon.js +5 -1
  94. package/lib/components/Header/CartIcon/CartIcon.js.map +1 -1
  95. package/lib/components/Header/CartIcon/CartIcon.mjs +5 -1
  96. package/lib/components/Header/CartIcon/CartIcon.mjs.map +1 -1
  97. package/lib/components/Header/CartIcon/CartIcon.types.d.ts +2 -0
  98. package/lib/components/Header/Header.js +12 -5
  99. package/lib/components/Header/Header.js.map +1 -1
  100. package/lib/components/Header/Header.mjs +12 -5
  101. package/lib/components/Header/Header.mjs.map +1 -1
  102. package/lib/components/Header/Header.stories.d.ts +2 -0
  103. package/lib/components/Header/Header.styles.d.ts +5 -3
  104. package/lib/components/Header/Header.styles.js +11 -10
  105. package/lib/components/Header/Header.styles.js.map +1 -1
  106. package/lib/components/Header/Header.styles.mjs +12 -10
  107. package/lib/components/Header/Header.styles.mjs.map +1 -1
  108. package/lib/components/Header/Header.types.d.ts +7 -0
  109. package/lib/components/Header/Header.types.js.map +1 -1
  110. package/lib/components/Header/Header.types.mjs.map +1 -1
  111. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.js +1 -0
  112. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.js.map +1 -1
  113. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.mjs +1 -0
  114. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.mjs.map +1 -1
  115. package/lib/components/Header/ProHeader/ProHeader.d.ts +1 -0
  116. package/lib/components/Header/ProHeader/ProHeader.js +64 -30
  117. package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
  118. package/lib/components/Header/ProHeader/ProHeader.mjs +65 -31
  119. package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
  120. package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +8 -2
  121. package/lib/components/Header/ProHeader/ProHeader.styles.js +58 -0
  122. package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
  123. package/lib/components/Header/ProHeader/ProHeader.styles.mjs +55 -1
  124. package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
  125. package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +1 -1
  126. package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.mjs +1 -1
  127. package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.js +1 -1
  128. package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.mjs +2 -2
  129. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js +607 -2
  130. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js.map +1 -1
  131. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs +603 -2
  132. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs.map +1 -1
  133. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.d.ts +5 -1
  134. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.js +4 -0
  135. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.js.map +1 -1
  136. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.mjs +4 -0
  137. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.mjs.map +1 -1
  138. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.js +1 -5
  139. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.js.map +1 -1
  140. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.mjs +2 -6
  141. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.mjs.map +1 -1
  142. package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-fiber.png.js +27 -0
  143. package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-fiber.png.js.map +1 -0
  144. package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-fiber.png.mjs +3 -0
  145. package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-fiber.png.mjs.map +1 -0
  146. package/lib/components/ResourceCalculatorV1/assets/consoles/udr7.png.js +27 -0
  147. package/lib/components/ResourceCalculatorV1/assets/consoles/udr7.png.js.map +1 -0
  148. package/lib/components/ResourceCalculatorV1/assets/consoles/udr7.png.mjs +3 -0
  149. package/lib/components/ResourceCalculatorV1/assets/consoles/udr7.png.mjs.map +1 -0
  150. package/lib/components/ResourceCalculatorV1/assets/consoles/ux.png.js +27 -0
  151. package/lib/components/ResourceCalculatorV1/assets/consoles/ux.png.js.map +1 -0
  152. package/lib/components/ResourceCalculatorV1/assets/consoles/ux.png.mjs +3 -0
  153. package/lib/components/ResourceCalculatorV1/assets/consoles/ux.png.mjs.map +1 -0
  154. package/lib/components/ResourceCalculatorV1/assets/consoles/ux7.png.js +27 -0
  155. package/lib/components/ResourceCalculatorV1/assets/consoles/ux7.png.js.map +1 -0
  156. package/lib/components/ResourceCalculatorV1/assets/consoles/ux7.png.mjs +3 -0
  157. package/lib/components/ResourceCalculatorV1/assets/consoles/ux7.png.mjs.map +1 -0
  158. package/lib/components/ResourceCalculatorV1/translations/en.json.js +4 -0
  159. package/lib/components/ResourceCalculatorV1/translations/en.json.js.map +1 -1
  160. package/lib/components/ResourceCalculatorV1/translations/en.json.mjs +4 -0
  161. package/lib/components/ResourceCalculatorV1/translations/en.json.mjs.map +1 -1
  162. package/lib/components/ResourceCalculatorV1/translations/useResourceCalculatorTranslation.d.ts +2 -2
  163. package/lib/components/VideoPlayerNew/VideoPlayer.js +1 -1
  164. package/lib/components/VideoPlayerNew/VideoPlayer.mjs +1 -1
  165. package/lib/components/VideoPlayerNew/assets/pause.svg.js +1 -1
  166. package/lib/components/VideoPlayerNew/assets/pause.svg.mjs +2 -2
  167. package/lib/constants/icons/header/globe.svg.js +5 -5
  168. package/lib/constants/icons/header/globe.svg.mjs +2 -2
  169. package/lib/constants/icons/header/index.js +3 -3
  170. package/lib/constants/icons/header/index.mjs +1 -1
  171. package/lib/constants/icons/menu/bullet.svg.js +5 -5
  172. package/lib/constants/icons/menu/bullet.svg.mjs +2 -2
  173. package/lib/constants/icons/menu/index.js +12 -12
  174. package/lib/constants/icons/menu/index.mjs +4 -4
  175. package/lib/constants/icons/menu/power.svg.js +5 -5
  176. package/lib/constants/icons/menu/power.svg.mjs +2 -2
  177. package/lib/constants/icons/menu/ptz.svg.js +5 -5
  178. package/lib/constants/icons/menu/ptz.svg.mjs +2 -2
  179. package/lib/constants/icons/menu/rack.svg.js +5 -5
  180. package/lib/constants/icons/menu/rack.svg.mjs +2 -2
  181. package/lib/constants/modelCompareData/assets/BuildingBridge/building-bridge-xg.jpg.js +1 -1
  182. package/lib/constants/modelCompareData/assets/BuildingBridge/building-bridge-xg.jpg.mjs +2 -2
  183. package/lib/constants/modelCompareData/assets/BuildingBridge/building-bridge.jpg.js +1 -1
  184. package/lib/constants/modelCompareData/assets/BuildingBridge/building-bridge.jpg.mjs +2 -2
  185. package/lib/constants/modelCompareData/assets/Bullet/g5-bullet.jpg.js +1 -1
  186. package/lib/constants/modelCompareData/assets/Bullet/g5-bullet.jpg.mjs +2 -2
  187. package/lib/constants/modelCompareData/assets/CameraSecurity/ai-ptz-precision.jpg.js +5 -5
  188. package/lib/constants/modelCompareData/assets/CameraSecurity/ai-ptz-precision.jpg.mjs +2 -2
  189. package/lib/constants/modelCompareData/assets/CameraSecurity/ai-theta-pro.jpg.js +5 -5
  190. package/lib/constants/modelCompareData/assets/CameraSecurity/ai-theta-pro.jpg.mjs +2 -2
  191. package/lib/constants/modelCompareData/assets/CameraSecurity/ai-theta.jpg.js +5 -5
  192. package/lib/constants/modelCompareData/assets/CameraSecurity/ai-theta.jpg.mjs +2 -2
  193. package/lib/constants/modelCompareData/assets/CameraSecurity/g4-ptz.jpg.js +5 -5
  194. package/lib/constants/modelCompareData/assets/CameraSecurity/g4-ptz.jpg.mjs +2 -2
  195. package/lib/constants/modelCompareData/assets/CameraSecurity/g5-ptz.jpg.js +5 -5
  196. package/lib/constants/modelCompareData/assets/CameraSecurity/g5-ptz.jpg.mjs +2 -2
  197. package/lib/constants/modelCompareData/assets/CameraSecurity/g5-turret-ultra.jpg.js +5 -5
  198. package/lib/constants/modelCompareData/assets/CameraSecurity/g5-turret-ultra.jpg.mjs +2 -2
  199. package/lib/constants/modelCompareData/assets/CameraSecurity/g6-ptz.jpg.js +5 -5
  200. package/lib/constants/modelCompareData/assets/CameraSecurity/g6-ptz.jpg.mjs +2 -2
  201. package/lib/constants/modelCompareData/assets/Compact/g4-instant.jpg.js +1 -1
  202. package/lib/constants/modelCompareData/assets/Compact/g4-instant.jpg.mjs +2 -2
  203. package/lib/constants/modelCompareData/assets/Consoles/bigCompare/express.jpg.js +5 -5
  204. package/lib/constants/modelCompareData/assets/Consoles/bigCompare/express.jpg.mjs +2 -2
  205. package/lib/constants/modelCompareData/assets/Consoles/bigCompare/ucgFiber.jpg.js +5 -5
  206. package/lib/constants/modelCompareData/assets/Consoles/bigCompare/ucgFiber.jpg.mjs +2 -2
  207. package/lib/constants/modelCompareData/assets/Consoles/bigCompare/ucgMax.jpg.js +5 -5
  208. package/lib/constants/modelCompareData/assets/Consoles/bigCompare/ucgMax.jpg.mjs +2 -2
  209. package/lib/constants/modelCompareData/assets/Consoles/bigCompare/ucgUltra.jpg.js +5 -5
  210. package/lib/constants/modelCompareData/assets/Consoles/bigCompare/ucgUltra.jpg.mjs +2 -2
  211. package/lib/constants/modelCompareData/assets/Consoles/bigCompare/udr.jpg.js +1 -1
  212. package/lib/constants/modelCompareData/assets/Consoles/bigCompare/udr.jpg.mjs +2 -2
  213. package/lib/constants/modelCompareData/assets/Consoles/express.jpg.js +1 -1
  214. package/lib/constants/modelCompareData/assets/Consoles/express.jpg.mjs +2 -2
  215. package/lib/constants/modelCompareData/assets/Consoles/ucgFiber.jpg.js +1 -1
  216. package/lib/constants/modelCompareData/assets/Consoles/ucgFiber.jpg.mjs +2 -2
  217. package/lib/constants/modelCompareData/assets/Consoles/ucgMax.jpg.js +1 -1
  218. package/lib/constants/modelCompareData/assets/Consoles/ucgMax.jpg.mjs +2 -2
  219. package/lib/constants/modelCompareData/assets/Consoles/ucgUltra.jpg.js +1 -1
  220. package/lib/constants/modelCompareData/assets/Consoles/ucgUltra.jpg.mjs +2 -2
  221. package/lib/constants/modelCompareData/assets/Consoles/udr.jpg.js +1 -1
  222. package/lib/constants/modelCompareData/assets/Consoles/udr.jpg.mjs +2 -2
  223. package/lib/constants/modelCompareData/assets/DomeTurret/ai-360.jpg.js +1 -1
  224. package/lib/constants/modelCompareData/assets/DomeTurret/ai-360.jpg.mjs +2 -2
  225. package/lib/constants/modelCompareData/assets/DomeTurret/ai-turret.jpg.js +1 -1
  226. package/lib/constants/modelCompareData/assets/DomeTurret/ai-turret.jpg.mjs +2 -2
  227. package/lib/constants/modelCompareData/assets/DomeTurret/g5-dome.jpg.js +1 -1
  228. package/lib/constants/modelCompareData/assets/DomeTurret/g5-dome.jpg.mjs +2 -2
  229. package/lib/constants/modelCompareData/assets/DomeTurret/g5-turret-ultra.jpg.js +1 -1
  230. package/lib/constants/modelCompareData/assets/DomeTurret/g5-turret-ultra.jpg.mjs +2 -2
  231. package/lib/constants/modelCompareData/assets/DoorAccess/door-hub-mini.jpg.js +1 -1
  232. package/lib/constants/modelCompareData/assets/DoorAccess/door-hub-mini.jpg.mjs +2 -2
  233. package/lib/constants/modelCompareData/assets/DoorAccess/g2-reader-pro.jpg.js +1 -1
  234. package/lib/constants/modelCompareData/assets/DoorAccess/g2-reader-pro.jpg.mjs +2 -2
  235. package/lib/constants/modelCompareData/assets/DoorAccess/g3-reader-flex.jpg.js +1 -1
  236. package/lib/constants/modelCompareData/assets/DoorAccess/g3-reader-flex.jpg.mjs +2 -2
  237. package/lib/constants/modelCompareData/assets/DoorAccess/g3-starter-kit.jpg.js +1 -1
  238. package/lib/constants/modelCompareData/assets/DoorAccess/g3-starter-kit.jpg.mjs +2 -2
  239. package/lib/constants/modelCompareData/assets/DoorAccess/intercom.jpg.js +1 -1
  240. package/lib/constants/modelCompareData/assets/DoorAccess/intercom.jpg.mjs +2 -2
  241. package/lib/constants/modelCompareData/assets/Flagship/u7-pro-max.jpg.js +1 -1
  242. package/lib/constants/modelCompareData/assets/Flagship/u7-pro-max.jpg.mjs +2 -2
  243. package/lib/constants/modelCompareData/assets/Interior/ai-theta-pro.jpg.js +1 -1
  244. package/lib/constants/modelCompareData/assets/Interior/ai-theta-pro.jpg.mjs +2 -2
  245. package/lib/constants/modelCompareData/assets/Interior/ai-theta.jpg.js +1 -1
  246. package/lib/constants/modelCompareData/assets/Interior/ai-theta.jpg.mjs +2 -2
  247. package/lib/constants/modelCompareData/assets/PTZ/ai-ptz-precision.jpg.js +1 -1
  248. package/lib/constants/modelCompareData/assets/PTZ/ai-ptz-precision.jpg.mjs +2 -2
  249. package/lib/constants/modelCompareData/assets/PTZ/g4-ptz.jpg.js +1 -1
  250. package/lib/constants/modelCompareData/assets/PTZ/g4-ptz.jpg.mjs +2 -2
  251. package/lib/constants/modelCompareData/assets/PTZ/g6-ptz.jpg.js +1 -1
  252. package/lib/constants/modelCompareData/assets/PTZ/g6-ptz.jpg.mjs +2 -2
  253. package/lib/constants/modelCompareData/assets/ProfessionalAV/{ucCast.jpg.js → ucCastLite.jpg.js} +2 -2
  254. package/lib/constants/modelCompareData/assets/ProfessionalAV/ucCastLite.jpg.js.map +1 -0
  255. package/lib/constants/modelCompareData/assets/ProfessionalAV/ucCastLite.jpg.mjs +3 -0
  256. package/lib/constants/modelCompareData/assets/ProfessionalAV/ucCastLite.jpg.mjs.map +1 -0
  257. package/lib/constants/modelCompareData/assets/Switching/flex.jpg.js +1 -1
  258. package/lib/constants/modelCompareData/assets/Switching/flex.jpg.mjs +2 -2
  259. package/lib/constants/modelCompareData/assets/Wall/u6-in-wall.jpg.js +1 -1
  260. package/lib/constants/modelCompareData/assets/Wall/u6-in-wall.jpg.mjs +2 -2
  261. package/lib/constants/modelCompareData/assets/WiFi/e7-audience.jpg.js +1 -1
  262. package/lib/constants/modelCompareData/assets/WiFi/e7-audience.jpg.mjs +2 -2
  263. package/lib/constants/modelCompareData/assets/crestron.svg.js +27 -0
  264. package/lib/constants/modelCompareData/assets/crestron.svg.js.map +1 -0
  265. package/lib/constants/modelCompareData/assets/crestron.svg.mjs +3 -0
  266. package/lib/constants/modelCompareData/assets/crestron.svg.mjs.map +1 -0
  267. package/lib/constants/modelCompareData/assets/globe.svg.js +1 -1
  268. package/lib/constants/modelCompareData/assets/globe.svg.mjs +2 -2
  269. package/lib/constants/modelCompareData/assets/interior-design.svg.js +1 -1
  270. package/lib/constants/modelCompareData/assets/interior-design.svg.mjs +2 -2
  271. package/lib/constants/modelCompareData/assets/power.svg.js +1 -1
  272. package/lib/constants/modelCompareData/assets/power.svg.mjs +2 -2
  273. package/lib/constants/modelCompareData/assets/product-list-assets/bullet.svg.js +1 -1
  274. package/lib/constants/modelCompareData/assets/product-list-assets/bullet.svg.mjs +2 -2
  275. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/g5-bullet.jpg.js +1 -1
  276. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/g5-bullet.jpg.mjs +2 -2
  277. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/compact/g4-instant.jpg.js +1 -1
  278. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/compact/g4-instant.jpg.mjs +2 -2
  279. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-360.jpg.js +1 -1
  280. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-360.jpg.mjs +2 -2
  281. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-turret.jpg.js +1 -1
  282. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-turret.jpg.mjs +2 -2
  283. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/g5-dome.jpg.js +1 -1
  284. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/g5-dome.jpg.mjs +2 -2
  285. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/door-hub-mini.jpg.js +1 -1
  286. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/door-hub-mini.jpg.mjs +2 -2
  287. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g2-reader-pro.jpg.js +1 -1
  288. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g2-reader-pro.jpg.mjs +2 -2
  289. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-reader-flex.jpg.js +1 -1
  290. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-reader-flex.jpg.mjs +2 -2
  291. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-starter-kit.jpg.js +1 -1
  292. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-starter-kit.jpg.mjs +2 -2
  293. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/intercom.jpg.js +1 -1
  294. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/intercom.jpg.mjs +2 -2
  295. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/ptz/g5-ptz.jpg.js +1 -1
  296. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/ptz/g5-ptz.jpg.mjs +2 -2
  297. package/lib/constants/modelCompareData/assets/product-list-assets/interior-design.svg.js +1 -1
  298. package/lib/constants/modelCompareData/assets/product-list-assets/interior-design.svg.mjs +2 -2
  299. package/lib/constants/modelCompareData/assets/product-list-assets/ptz.svg.js +1 -1
  300. package/lib/constants/modelCompareData/assets/product-list-assets/ptz.svg.mjs +2 -2
  301. package/lib/constants/modelCompareData/assets/product-list-assets/switches/utility/flex.jpg.js +1 -1
  302. package/lib/constants/modelCompareData/assets/product-list-assets/switches/utility/flex.jpg.mjs +2 -2
  303. package/lib/constants/modelCompareData/assets/product-list-assets/wifi/building-bridge/building-bridge-xg.jpg.js +1 -1
  304. package/lib/constants/modelCompareData/assets/product-list-assets/wifi/building-bridge/building-bridge-xg.jpg.mjs +2 -2
  305. package/lib/constants/modelCompareData/assets/product-list-assets/wifi/building-bridge/building-bridge.jpg.js +1 -1
  306. package/lib/constants/modelCompareData/assets/product-list-assets/wifi/building-bridge/building-bridge.jpg.mjs +2 -2
  307. package/lib/constants/modelCompareData/assets/product-list-assets/wifi/flagship/u7-pro-max.jpg.js +1 -1
  308. package/lib/constants/modelCompareData/assets/product-list-assets/wifi/flagship/u7-pro-max.jpg.mjs +2 -2
  309. package/lib/constants/modelCompareData/assets/product-list-assets/wifi/mega-capacity/e7-audience.jpg.js +1 -1
  310. package/lib/constants/modelCompareData/assets/product-list-assets/wifi/mega-capacity/e7-audience.jpg.mjs +2 -2
  311. package/lib/constants/modelCompareData/assets/product-list-assets/wifi/wall/u6-in-wall.jpg.js +1 -1
  312. package/lib/constants/modelCompareData/assets/product-list-assets/wifi/wall/u6-in-wall.jpg.mjs +2 -2
  313. package/lib/constants/modelCompareData/assets/rack.svg.js +1 -1
  314. package/lib/constants/modelCompareData/assets/rack.svg.mjs +2 -2
  315. package/lib/constants/modelCompareData/data/CameraSecurity.js +15 -15
  316. package/lib/constants/modelCompareData/data/CameraSecurity.mjs +8 -8
  317. package/lib/constants/modelCompareData/data/CloudGateways.js +9 -9
  318. package/lib/constants/modelCompareData/data/CloudGateways.mjs +6 -6
  319. package/lib/constants/modelCompareData/data/DreamMachineConsolev4.js +10 -10
  320. package/lib/constants/modelCompareData/data/DreamMachineConsolev4.mjs +7 -7
  321. package/lib/constants/modelCompareData/data/EnterpriseSwitching.js +3 -2
  322. package/lib/constants/modelCompareData/data/EnterpriseSwitching.js.map +1 -1
  323. package/lib/constants/modelCompareData/data/EnterpriseSwitching.mjs +3 -2
  324. package/lib/constants/modelCompareData/data/EnterpriseSwitching.mjs.map +1 -1
  325. package/lib/constants/modelCompareData/data/ProfessionalAV.js +2 -2
  326. package/lib/constants/modelCompareData/data/ProfessionalAV.js.map +1 -1
  327. package/lib/constants/modelCompareData/data/ProfessionalAV.mjs +2 -2
  328. package/lib/constants/modelCompareData/data/ProfessionalAV.mjs.map +1 -1
  329. package/lib/constants/modelCompareData/data/ProfessionalMaxSwitching.js +3 -2
  330. package/lib/constants/modelCompareData/data/ProfessionalMaxSwitching.js.map +1 -1
  331. package/lib/constants/modelCompareData/data/ProfessionalMaxSwitching.mjs +3 -2
  332. package/lib/constants/modelCompareData/data/ProfessionalMaxSwitching.mjs.map +1 -1
  333. package/lib/constants/modelCompareData/data/Switching.js +2 -1
  334. package/lib/constants/modelCompareData/data/Switching.js.map +1 -1
  335. package/lib/constants/modelCompareData/data/Switching.mjs +2 -1
  336. package/lib/constants/modelCompareData/data/Switching.mjs.map +1 -1
  337. package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/InteriorDesign.js +1 -1
  338. package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/InteriorDesign.mjs +1 -1
  339. package/lib/constants/modelCompareData/data/product-list-groups/bullet.js +1 -1
  340. package/lib/constants/modelCompareData/data/product-list-groups/bullet.mjs +1 -1
  341. package/lib/constants/modelCompareData/data/product-list-groups/interiorDesign.js +1 -1
  342. package/lib/constants/modelCompareData/data/product-list-groups/interiorDesign.mjs +1 -1
  343. package/lib/constants/modelCompareData/data/product-list-groups/ptz.js +1 -1
  344. package/lib/constants/modelCompareData/data/product-list-groups/ptz.mjs +1 -1
  345. package/lib/constants/modelCompareData/data/products/aggregation.js +7 -0
  346. package/lib/constants/modelCompareData/data/products/aggregation.js.map +1 -1
  347. package/lib/constants/modelCompareData/data/products/aggregation.mjs +7 -0
  348. package/lib/constants/modelCompareData/data/products/aggregation.mjs.map +1 -1
  349. package/lib/constants/modelCompareData/data/products/ai360.js +2 -2
  350. package/lib/constants/modelCompareData/data/products/ai360.mjs +2 -2
  351. package/lib/constants/modelCompareData/data/products/aiPtzPrecision.js +1 -1
  352. package/lib/constants/modelCompareData/data/products/aiPtzPrecision.mjs +1 -1
  353. package/lib/constants/modelCompareData/data/products/aiTurret.js +2 -2
  354. package/lib/constants/modelCompareData/data/products/aiTurret.mjs +2 -2
  355. package/lib/constants/modelCompareData/data/products/buildingBridge.js +2 -2
  356. package/lib/constants/modelCompareData/data/products/buildingBridge.mjs +2 -2
  357. package/lib/constants/modelCompareData/data/products/buildingBridgeXG.js +2 -2
  358. package/lib/constants/modelCompareData/data/products/buildingBridgeXG.mjs +2 -2
  359. package/lib/constants/modelCompareData/data/products/connectDisplay.js +12 -26
  360. package/lib/constants/modelCompareData/data/products/connectDisplay.js.map +1 -1
  361. package/lib/constants/modelCompareData/data/products/connectDisplay.mjs +12 -26
  362. package/lib/constants/modelCompareData/data/products/connectDisplay.mjs.map +1 -1
  363. package/lib/constants/modelCompareData/data/products/doorHubMini.js +2 -2
  364. package/lib/constants/modelCompareData/data/products/doorHubMini.mjs +2 -2
  365. package/lib/constants/modelCompareData/data/products/enterpriseAggregation.js +7 -0
  366. package/lib/constants/modelCompareData/data/products/enterpriseAggregation.js.map +1 -1
  367. package/lib/constants/modelCompareData/data/products/enterpriseAggregation.mjs +7 -0
  368. package/lib/constants/modelCompareData/data/products/enterpriseAggregation.mjs.map +1 -1
  369. package/lib/constants/modelCompareData/data/products/enterpriseCampus24PoE.js +7 -0
  370. package/lib/constants/modelCompareData/data/products/enterpriseCampus24PoE.js.map +1 -1
  371. package/lib/constants/modelCompareData/data/products/enterpriseCampus24PoE.mjs +7 -0
  372. package/lib/constants/modelCompareData/data/products/enterpriseCampus24PoE.mjs.map +1 -1
  373. package/lib/constants/modelCompareData/data/products/enterpriseCampus48PoE.js +7 -0
  374. package/lib/constants/modelCompareData/data/products/enterpriseCampus48PoE.js.map +1 -1
  375. package/lib/constants/modelCompareData/data/products/enterpriseCampus48PoE.mjs +7 -0
  376. package/lib/constants/modelCompareData/data/products/enterpriseCampus48PoE.mjs.map +1 -1
  377. package/lib/constants/modelCompareData/data/products/express.js +1 -1
  378. package/lib/constants/modelCompareData/data/products/express.mjs +1 -1
  379. package/lib/constants/modelCompareData/data/products/flex.js +2 -2
  380. package/lib/constants/modelCompareData/data/products/flex.mjs +2 -2
  381. package/lib/constants/modelCompareData/data/products/g2ReaderPro.js +2 -2
  382. package/lib/constants/modelCompareData/data/products/g2ReaderPro.mjs +2 -2
  383. package/lib/constants/modelCompareData/data/products/g3ReaderFlex.js +2 -2
  384. package/lib/constants/modelCompareData/data/products/g3ReaderFlex.mjs +2 -2
  385. package/lib/constants/modelCompareData/data/products/g3StarterKit.js +2 -2
  386. package/lib/constants/modelCompareData/data/products/g3StarterKit.mjs +2 -2
  387. package/lib/constants/modelCompareData/data/products/g4Instant.js +2 -2
  388. package/lib/constants/modelCompareData/data/products/g4Instant.mjs +2 -2
  389. package/lib/constants/modelCompareData/data/products/g4Ptz.js +1 -1
  390. package/lib/constants/modelCompareData/data/products/g4Ptz.mjs +1 -1
  391. package/lib/constants/modelCompareData/data/products/g5Bullet.js +2 -2
  392. package/lib/constants/modelCompareData/data/products/g5Bullet.mjs +2 -2
  393. package/lib/constants/modelCompareData/data/products/g5Dome.js +2 -2
  394. package/lib/constants/modelCompareData/data/products/g5Dome.mjs +2 -2
  395. package/lib/constants/modelCompareData/data/products/g5Ptz.js +1 -1
  396. package/lib/constants/modelCompareData/data/products/g5Ptz.mjs +1 -1
  397. package/lib/constants/modelCompareData/data/products/g5TurretUltra.js +1 -1
  398. package/lib/constants/modelCompareData/data/products/g5TurretUltra.mjs +1 -1
  399. package/lib/constants/modelCompareData/data/products/g6Ptz.js +1 -1
  400. package/lib/constants/modelCompareData/data/products/g6Ptz.mjs +1 -1
  401. package/lib/constants/modelCompareData/data/products/highCapacityAggregation.js +7 -0
  402. package/lib/constants/modelCompareData/data/products/highCapacityAggregation.js.map +1 -1
  403. package/lib/constants/modelCompareData/data/products/highCapacityAggregation.mjs +7 -0
  404. package/lib/constants/modelCompareData/data/products/highCapacityAggregation.mjs.map +1 -1
  405. package/lib/constants/modelCompareData/data/products/intercom.js +2 -2
  406. package/lib/constants/modelCompareData/data/products/intercom.mjs +2 -2
  407. package/lib/constants/modelCompareData/data/products/missionCritical.js +7 -0
  408. package/lib/constants/modelCompareData/data/products/missionCritical.js.map +1 -1
  409. package/lib/constants/modelCompareData/data/products/missionCritical.mjs +7 -0
  410. package/lib/constants/modelCompareData/data/products/missionCritical.mjs.map +1 -1
  411. package/lib/constants/modelCompareData/data/products/professionalMax16.js +7 -0
  412. package/lib/constants/modelCompareData/data/products/professionalMax16.js.map +1 -1
  413. package/lib/constants/modelCompareData/data/products/professionalMax16.mjs +7 -0
  414. package/lib/constants/modelCompareData/data/products/professionalMax16.mjs.map +1 -1
  415. package/lib/constants/modelCompareData/data/products/professionalMax16PoE.js +7 -0
  416. package/lib/constants/modelCompareData/data/products/professionalMax16PoE.js.map +1 -1
  417. package/lib/constants/modelCompareData/data/products/professionalMax16PoE.mjs +7 -0
  418. package/lib/constants/modelCompareData/data/products/professionalMax16PoE.mjs.map +1 -1
  419. package/lib/constants/modelCompareData/data/products/professionalMax24.js +7 -0
  420. package/lib/constants/modelCompareData/data/products/professionalMax24.js.map +1 -1
  421. package/lib/constants/modelCompareData/data/products/professionalMax24.mjs +7 -0
  422. package/lib/constants/modelCompareData/data/products/professionalMax24.mjs.map +1 -1
  423. package/lib/constants/modelCompareData/data/products/professionalMax24PoE.js +7 -0
  424. package/lib/constants/modelCompareData/data/products/professionalMax24PoE.js.map +1 -1
  425. package/lib/constants/modelCompareData/data/products/professionalMax24PoE.mjs +7 -0
  426. package/lib/constants/modelCompareData/data/products/professionalMax24PoE.mjs.map +1 -1
  427. package/lib/constants/modelCompareData/data/products/professionalMax48.js +7 -0
  428. package/lib/constants/modelCompareData/data/products/professionalMax48.js.map +1 -1
  429. package/lib/constants/modelCompareData/data/products/professionalMax48.mjs +7 -0
  430. package/lib/constants/modelCompareData/data/products/professionalMax48.mjs.map +1 -1
  431. package/lib/constants/modelCompareData/data/products/professionalMax48PoE.js +7 -0
  432. package/lib/constants/modelCompareData/data/products/professionalMax48PoE.js.map +1 -1
  433. package/lib/constants/modelCompareData/data/products/professionalMax48PoE.mjs +7 -0
  434. package/lib/constants/modelCompareData/data/products/professionalMax48PoE.mjs.map +1 -1
  435. package/lib/constants/modelCompareData/data/products/shared-product-data/e7Audience.js +2 -2
  436. package/lib/constants/modelCompareData/data/products/shared-product-data/e7Audience.mjs +2 -2
  437. package/lib/constants/modelCompareData/data/products/switchesEnterprise.js +8 -0
  438. package/lib/constants/modelCompareData/data/products/switchesEnterprise.js.map +1 -1
  439. package/lib/constants/modelCompareData/data/products/switchesEnterprise.mjs +8 -0
  440. package/lib/constants/modelCompareData/data/products/switchesEnterprise.mjs.map +1 -1
  441. package/lib/constants/modelCompareData/data/products/switchesProfessional.js +7 -0
  442. package/lib/constants/modelCompareData/data/products/switchesProfessional.js.map +1 -1
  443. package/lib/constants/modelCompareData/data/products/switchesProfessional.mjs +7 -0
  444. package/lib/constants/modelCompareData/data/products/switchesProfessional.mjs.map +1 -1
  445. package/lib/constants/modelCompareData/data/products/switchesProfessionalMax.js +10 -1
  446. package/lib/constants/modelCompareData/data/products/switchesProfessionalMax.js.map +1 -1
  447. package/lib/constants/modelCompareData/data/products/switchesProfessionalMax.mjs +10 -1
  448. package/lib/constants/modelCompareData/data/products/switchesProfessionalMax.mjs.map +1 -1
  449. package/lib/constants/modelCompareData/data/products/switchesStandard.js +7 -0
  450. package/lib/constants/modelCompareData/data/products/switchesStandard.js.map +1 -1
  451. package/lib/constants/modelCompareData/data/products/switchesStandard.mjs +7 -0
  452. package/lib/constants/modelCompareData/data/products/switchesStandard.mjs.map +1 -1
  453. package/lib/constants/modelCompareData/data/products/theta.js +1 -1
  454. package/lib/constants/modelCompareData/data/products/theta.mjs +1 -1
  455. package/lib/constants/modelCompareData/data/products/thetaPro.js +1 -1
  456. package/lib/constants/modelCompareData/data/products/thetaPro.mjs +1 -1
  457. package/lib/constants/modelCompareData/data/products/u6InWall.js +2 -2
  458. package/lib/constants/modelCompareData/data/products/u6InWall.mjs +2 -2
  459. package/lib/constants/modelCompareData/data/products/u7proMax.js +2 -2
  460. package/lib/constants/modelCompareData/data/products/u7proMax.mjs +2 -2
  461. package/lib/constants/modelCompareData/data/products/{ucCast.d.ts → ucCastLite.d.ts} +1 -1
  462. package/lib/constants/modelCompareData/data/products/ucCastLite.js +96 -0
  463. package/lib/constants/modelCompareData/data/products/ucCastLite.js.map +1 -0
  464. package/lib/constants/modelCompareData/data/products/ucCastLite.mjs +88 -0
  465. package/lib/constants/modelCompareData/data/products/ucCastLite.mjs.map +1 -0
  466. package/lib/constants/modelCompareData/data/products/ucCastPro.js +13 -26
  467. package/lib/constants/modelCompareData/data/products/ucCastPro.js.map +1 -1
  468. package/lib/constants/modelCompareData/data/products/ucCastPro.mjs +13 -26
  469. package/lib/constants/modelCompareData/data/products/ucCastPro.mjs.map +1 -1
  470. package/lib/constants/modelCompareData/data/products/ucgFiber.js +1 -1
  471. package/lib/constants/modelCompareData/data/products/ucgFiber.mjs +1 -1
  472. package/lib/constants/modelCompareData/data/products/ucgMax.js +1 -1
  473. package/lib/constants/modelCompareData/data/products/ucgMax.mjs +1 -1
  474. package/lib/constants/modelCompareData/data/products/ucgUltra.js +1 -1
  475. package/lib/constants/modelCompareData/data/products/ucgUltra.mjs +1 -1
  476. package/lib/constants/modelCompareData/data/products/udr.js +2 -2
  477. package/lib/constants/modelCompareData/data/products/udr.mjs +2 -2
  478. package/lib/constants/modelCompareData/data/products/wanSwitch.js +2 -2
  479. package/lib/constants/modelCompareData/data/products/wanSwitch.js.map +1 -1
  480. package/lib/constants/modelCompareData/data/products/wanSwitch.mjs +2 -2
  481. package/lib/constants/modelCompareData/data/products/wanSwitch.mjs.map +1 -1
  482. package/lib/constants/modelCompareData/data/properties/accessPowerMethod.js +1 -1
  483. package/lib/constants/modelCompareData/data/properties/accessPowerMethod.mjs +1 -1
  484. package/lib/constants/modelCompareData/data/properties/availability.js +1 -1
  485. package/lib/constants/modelCompareData/data/properties/availability.mjs +1 -1
  486. package/lib/constants/modelCompareData/data/properties/crestronNaxNvxCertified.d.ts +2 -0
  487. package/lib/constants/modelCompareData/data/properties/crestronNaxNvxCertified.js +18 -0
  488. package/lib/constants/modelCompareData/data/properties/crestronNaxNvxCertified.js.map +1 -0
  489. package/lib/constants/modelCompareData/data/properties/crestronNaxNvxCertified.mjs +10 -0
  490. package/lib/constants/modelCompareData/data/properties/crestronNaxNvxCertified.mjs.map +1 -0
  491. package/lib/constants/modelCompareData/data/properties/dcPowerOutput.js +1 -1
  492. package/lib/constants/modelCompareData/data/properties/dcPowerOutput.mjs +1 -1
  493. package/lib/constants/modelCompareData/data/properties/index.d.ts +1 -0
  494. package/lib/constants/modelCompareData/data/properties/index.js +2 -0
  495. package/lib/constants/modelCompareData/data/properties/index.js.map +1 -1
  496. package/lib/constants/modelCompareData/data/properties/index.mjs +1 -0
  497. package/lib/constants/modelCompareData/data/properties/index.mjs.map +1 -1
  498. package/lib/constants/modelCompareData/data/properties/mounting.js +1 -1
  499. package/lib/constants/modelCompareData/data/properties/mounting.mjs +1 -1
  500. package/lib/constants/modelCompareData/data/properties/webMode.js +1 -1
  501. package/lib/constants/modelCompareData/data/properties/webMode.mjs +1 -1
  502. package/lib/constants/modelCompareData/translations/ar.json.js +12 -2
  503. package/lib/constants/modelCompareData/translations/ar.json.js.map +1 -1
  504. package/lib/constants/modelCompareData/translations/ar.json.mjs +12 -2
  505. package/lib/constants/modelCompareData/translations/ar.json.mjs.map +1 -1
  506. package/lib/constants/modelCompareData/translations/de.json.js +12 -2
  507. package/lib/constants/modelCompareData/translations/de.json.js.map +1 -1
  508. package/lib/constants/modelCompareData/translations/de.json.mjs +12 -2
  509. package/lib/constants/modelCompareData/translations/de.json.mjs.map +1 -1
  510. package/lib/constants/modelCompareData/translations/el.json.js +12 -2
  511. package/lib/constants/modelCompareData/translations/el.json.js.map +1 -1
  512. package/lib/constants/modelCompareData/translations/el.json.mjs +12 -2
  513. package/lib/constants/modelCompareData/translations/el.json.mjs.map +1 -1
  514. package/lib/constants/modelCompareData/translations/en.json.js +13 -0
  515. package/lib/constants/modelCompareData/translations/en.json.js.map +1 -1
  516. package/lib/constants/modelCompareData/translations/en.json.mjs +13 -0
  517. package/lib/constants/modelCompareData/translations/en.json.mjs.map +1 -1
  518. package/lib/constants/modelCompareData/translations/es.json.js +13 -2
  519. package/lib/constants/modelCompareData/translations/es.json.js.map +1 -1
  520. package/lib/constants/modelCompareData/translations/es.json.mjs +13 -2
  521. package/lib/constants/modelCompareData/translations/es.json.mjs.map +1 -1
  522. package/lib/constants/modelCompareData/translations/fr.json.js +11 -1
  523. package/lib/constants/modelCompareData/translations/fr.json.js.map +1 -1
  524. package/lib/constants/modelCompareData/translations/fr.json.mjs +11 -1
  525. package/lib/constants/modelCompareData/translations/fr.json.mjs.map +1 -1
  526. package/lib/constants/modelCompareData/translations/it.json.js +11 -1
  527. package/lib/constants/modelCompareData/translations/it.json.js.map +1 -1
  528. package/lib/constants/modelCompareData/translations/it.json.mjs +11 -1
  529. package/lib/constants/modelCompareData/translations/it.json.mjs.map +1 -1
  530. package/lib/constants/modelCompareData/translations/ja.json.js +12 -2
  531. package/lib/constants/modelCompareData/translations/ja.json.js.map +1 -1
  532. package/lib/constants/modelCompareData/translations/ja.json.mjs +12 -2
  533. package/lib/constants/modelCompareData/translations/ja.json.mjs.map +1 -1
  534. package/lib/constants/modelCompareData/translations/pt-BR.json.js +11 -1
  535. package/lib/constants/modelCompareData/translations/pt-BR.json.js.map +1 -1
  536. package/lib/constants/modelCompareData/translations/pt-BR.json.mjs +11 -1
  537. package/lib/constants/modelCompareData/translations/pt-BR.json.mjs.map +1 -1
  538. package/lib/constants/modelCompareData/translations/useModelCompareTranslation.d.ts +2 -2
  539. package/lib/constants/modelCompareData/translations/zh-Hans.json.js +11 -1
  540. package/lib/constants/modelCompareData/translations/zh-Hans.json.js.map +1 -1
  541. package/lib/constants/modelCompareData/translations/zh-Hans.json.mjs +11 -1
  542. package/lib/constants/modelCompareData/translations/zh-Hans.json.mjs.map +1 -1
  543. package/lib/constants/modelCompareData/translations/zh-Hant-TW.json.js +12 -2
  544. package/lib/constants/modelCompareData/translations/zh-Hant-TW.json.js.map +1 -1
  545. package/lib/constants/modelCompareData/translations/zh-Hant-TW.json.mjs +12 -2
  546. package/lib/constants/modelCompareData/translations/zh-Hant-TW.json.mjs.map +1 -1
  547. package/lib/constants/modelCompareData/types.d.ts +2 -1
  548. package/lib/constants/modelCompareData/types.js +2 -1
  549. package/lib/constants/modelCompareData/types.js.map +1 -1
  550. package/lib/constants/modelCompareData/types.mjs +2 -1
  551. package/lib/constants/modelCompareData/types.mjs.map +1 -1
  552. package/lib/constants/proStoreCategories/mapping/filters.d.ts +1 -1
  553. package/lib/constants/proStoreCategories/mapping/filters.js +1 -1
  554. package/lib/constants/proStoreCategories/mapping/filters.js.map +1 -1
  555. package/lib/constants/proStoreCategories/mapping/filters.mjs +1 -1
  556. package/lib/constants/proStoreCategories/mapping/filters.mjs.map +1 -1
  557. package/lib/constants/proStoreCategories/mapping/index.d.ts +2 -0
  558. package/lib/constants/proStoreCategories/mapping/index.js +20 -10
  559. package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
  560. package/lib/constants/proStoreCategories/mapping/index.mjs +20 -10
  561. package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
  562. package/lib/constants/proStoreCategories/mapping/unifi.d.ts +3 -1
  563. package/lib/constants/proStoreCategories/mapping/unifi.js +2 -0
  564. package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
  565. package/lib/constants/proStoreCategories/mapping/unifi.mjs +2 -0
  566. package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
  567. package/lib/constants/proStoreCategories/translations/en.json.js +5 -1
  568. package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
  569. package/lib/constants/proStoreCategories/translations/en.json.mjs +5 -2
  570. package/lib/constants/proStoreCategories/translations/en.json.mjs.map +1 -1
  571. package/lib/constants/proStoreFilters/mapping.d.ts +2 -1
  572. package/lib/constants/proStoreFilters/mapping.js +8 -6
  573. package/lib/constants/proStoreFilters/mapping.js.map +1 -1
  574. package/lib/constants/proStoreFilters/mapping.mjs +8 -6
  575. package/lib/constants/proStoreFilters/mapping.mjs.map +1 -1
  576. package/lib/contexts/MenuContext/context.js +30 -2
  577. package/lib/contexts/MenuContext/context.js.map +1 -1
  578. package/lib/contexts/MenuContext/context.mjs +31 -3
  579. package/lib/contexts/MenuContext/context.mjs.map +1 -1
  580. package/lib/contexts/MenuContext/mapping.js +9 -9
  581. package/lib/contexts/MenuContext/mapping.mjs +6 -6
  582. package/lib/contexts/MenuContext/types.d.ts +3 -0
  583. package/lib/contexts/MenuContext/types.js +1 -0
  584. package/lib/contexts/MenuContext/types.js.map +1 -1
  585. package/lib/contexts/MenuContext/types.mjs +1 -0
  586. package/lib/contexts/MenuContext/types.mjs.map +1 -1
  587. package/lib/hooks/useIsTouchDevice.d.ts +1 -0
  588. package/lib/hooks/useIsTouchDevice.js +20 -0
  589. package/lib/hooks/useIsTouchDevice.js.map +1 -0
  590. package/lib/hooks/useIsTouchDevice.mjs +18 -0
  591. package/lib/hooks/useIsTouchDevice.mjs.map +1 -0
  592. package/lib/utils/money/constants.d.ts +6 -0
  593. package/lib/utils/money/constants.js +23 -1
  594. package/lib/utils/money/constants.js.map +1 -1
  595. package/lib/utils/money/constants.mjs +23 -2
  596. package/lib/utils/money/constants.mjs.map +1 -1
  597. package/lib/utils/money/index.js +1 -0
  598. package/lib/utils/money/index.js.map +1 -1
  599. package/lib/utils/money/index.mjs +1 -1
  600. package/lib/utils/nextjs/legacy-image-loader/image.js +20 -0
  601. package/lib/utils/nextjs/legacy-image-loader/image.js.map +1 -1
  602. package/lib/utils/nextjs/legacy-image-loader/image.mjs +1 -0
  603. package/lib/utils/nextjs/legacy-image-loader/image.mjs.map +1 -1
  604. package/lib/utils/nextjs/legacy-image-loader/legacy/image.js +20 -6
  605. package/lib/utils/nextjs/legacy-image-loader/legacy/image.js.map +1 -1
  606. package/lib/utils/nextjs/legacy-image-loader/legacy/image.mjs +1 -0
  607. package/lib/utils/nextjs/legacy-image-loader/legacy/image.mjs.map +1 -1
  608. package/package.json +20 -20
  609. package/lib/constants/modelCompareData/assets/ProfessionalAV/ucCast.jpg.js.map +0 -1
  610. package/lib/constants/modelCompareData/assets/ProfessionalAV/ucCast.jpg.mjs +0 -3
  611. package/lib/constants/modelCompareData/assets/ProfessionalAV/ucCast.jpg.mjs.map +0 -1
  612. package/lib/constants/modelCompareData/data/products/ucCast.js +0 -108
  613. package/lib/constants/modelCompareData/data/products/ucCast.js.map +0 -1
  614. package/lib/constants/modelCompareData/data/products/ucCast.mjs +0 -100
  615. package/lib/constants/modelCompareData/data/products/ucCast.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sources":["../../../src/contexts/MenuContext/types.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\n\nimport type { StoreId } from \"../../types\";\nimport type {\n DeployedLanguages,\n Language,\n NavigationItem,\n NavigationSectionType,\n NavigationSubItem,\n NavigationSubSubItem,\n SiteId,\n SiteUrl,\n} from \"./mapping\";\nimport type { LanguageDirectionType } from \"./utils\";\n\nexport enum ModalId {\n Support = \"support\",\n Account = \"account\",\n Cart = \"cart\",\n Language = \"language\",\n MobileMenu = \"mobileMenu\",\n ProMobileMenu = \"proMobileMenu\",\n Search = \"search\",\n}\n\nexport type ParsedNavigationSubSubItem = Omit<NavigationSubSubItem, \"url\"> & {\n url: string;\n active: boolean;\n possible: boolean;\n items: ParsedNavigationSubSubItem[];\n};\n\nexport type ParsedNavigationSubItem = Omit<\n NavigationSubItem,\n \"url\" | \"storePath\"\n> & {\n url: string;\n active: boolean;\n possible: boolean;\n /**\n * Sub-sub-items which will always be present\n * But can be empty in either cases e.g. no valid paths given\n */\n items: ParsedNavigationSubSubItem[];\n};\n\nexport type ParsedNavigationItem = Omit<NavigationItem, \"url\" | \"items\"> & {\n url: string;\n active: boolean;\n possible: boolean;\n items: ParsedNavigationSubItem[];\n};\n\nexport type ParsedNavigationSection = {\n type: NavigationSectionType;\n label: string;\n url: string;\n possible: boolean;\n active: boolean;\n items: ParsedNavigationItem[];\n};\n\nexport type ParsedNavigation = Record<\n NavigationSectionType,\n ParsedNavigationSection\n>;\n\n// #############################################################################\n// Global site config types\n// #############################################################################\nexport enum SiteConfigType {\n // Basic site config\n Basic = \"basic\",\n // Regional site config\n Regional = \"regional\",\n}\n\ninterface BaseSiteConfig {\n type: SiteConfigType;\n}\n\nexport interface BasicSiteConfig extends BaseSiteConfig {\n type: SiteConfigType.Basic;\n baseUrl: string;\n /** If `defaultLanguage` or `languages` are undefined, it means region does not have languages */\n defaultLanguage?: Language;\n languages?: DeployedLanguages;\n}\n\nexport interface RegionalSite extends BaseSiteConfig {\n type: SiteConfigType.Regional;\n defaultRegion: BasicSiteConfig;\n regions: Record<StoreId, BasicSiteConfig | null>;\n}\n\ntype SiteConfig = RegionalSite | BasicSiteConfig;\n\n/**\n * Static global site config type for known sites\n */\nexport type StaticGlobalSiteConfig = Record<\n // Excludes generic as it allows custom injecting in runtime\n Exclude<SiteId, SiteId.Generic>,\n SiteConfig\n>;\n\n/**\n * Explicit global site config type for known sites\n * (used for store where `satisfies` is not working)\n */\nexport interface StaticGlobalSiteConfigExplicit extends StaticGlobalSiteConfig {\n [SiteId.Store]: RegionalSite;\n [SiteId.Ui]: RegionalSite;\n [SiteId.Uisp]: RegionalSite;\n [SiteId.Amplifi]: BasicSiteConfig;\n [SiteId.TechSpecs]: BasicSiteConfig;\n [SiteId.ExpertsUi]: BasicSiteConfig;\n [SiteId.ExpertsUisp]: BasicSiteConfig;\n [SiteId.Uwc]: BasicSiteConfig;\n [SiteId.Blog]: BasicSiteConfig;\n [SiteId.CaseStudies]: BasicSiteConfig;\n}\n\n/**\n * Global site config type for known sites + generic site where\n * custom site config can be injected in the target project\n */\nexport type GlobalSiteConfig = StaticGlobalSiteConfig & {\n [SiteId.Generic]?: SiteConfig;\n};\n\n// #############################################################################\n// Microsite context value\n// #############################################################################\nexport type MenuContextValue = {\n /**\n * Indicates if app is doing SSR\n */\n isSsr: boolean;\n storeId: StoreId;\n\n // Menu motif\n motif: Motif;\n setMotif: (motif: Motif) => void;\n\n // Nav context\n context: SiteId;\n isMicrositeContext: boolean;\n\n // Modals\n activeModal: ModalId | null;\n prevActiveModal: ModalId | null;\n setActiveModal: (id: ModalId | null) => void;\n\n // Languages\n language: `${Language}`;\n isMultiLanguage: boolean;\n deployedLanguages: Array<`${Language}`>;\n languageDirection: LanguageDirectionType;\n isLongLanguage: boolean;\n\n // Menu sections and items\n navigation: ParsedNavigation;\n activeNavigationSection: ParsedNavigationSection;\n inactiveNavigationSection: ParsedNavigationSection;\n isPathnameActive: (pathname: string) => boolean;\n\n // For DOM animations\n navigationOutOfView: boolean;\n setNavigationOutOfView: (navigationOutOfView: boolean) => void;\n\n // Utils\n createSiteUrl: (siteUrl: SiteUrl) => string;\n};\n"],"names":["ModalId","SiteConfigType"],"mappings":";;;AAeY,IAAAA,OAAA,GAAA,gBAAAA,QAAL,IAAA;EACLA,SAAA,SAAU,CAAA,GAAA,SAAA;EACVA,SAAA,SAAU,CAAA,GAAA,SAAA;EACVA,SAAA,MAAO,CAAA,GAAA,MAAA;EACPA,SAAA,UAAW,CAAA,GAAA,UAAA;EACXA,SAAA,YAAa,CAAA,GAAA,YAAA;EACbA,SAAA,eAAgB,CAAA,GAAA,eAAA;EAChBA,SAAA,QAAS,CAAA,GAAA,QAAA;EAPCA,OAAAA,QAAAA;AAAA,CAAA,EAAAA,OAAA,IAAA,CAAA,CAAA,CAAA;AAuDA,IAAAC,cAAA,GAAA,gBAAAA,eAAL,IAAA;EAELA,gBAAA,OAAQ,CAAA,GAAA,OAAA;EAERA,gBAAA,UAAW,CAAA,GAAA,UAAA;EAJDA,OAAAA,eAAAA;AAAA,CAAA,EAAAA,cAAA,IAAA,CAAA,CAAA,CAAA;;"}
1
+ {"version":3,"file":"types.js","sources":["../../../src/contexts/MenuContext/types.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\n\nimport type { StoreId } from \"../../types\";\nimport type {\n DeployedLanguages,\n Language,\n NavigationItem,\n NavigationSectionType,\n NavigationSubItem,\n NavigationSubSubItem,\n SiteId,\n SiteUrl,\n} from \"./mapping\";\nimport type { LanguageDirectionType } from \"./utils\";\n\nexport enum ModalId {\n Support = \"support\",\n Account = \"account\",\n Cart = \"cart\",\n CartPreview = \"cartPreview\",\n Language = \"language\",\n MobileMenu = \"mobileMenu\",\n ProMobileMenu = \"proMobileMenu\",\n Search = \"search\",\n}\n\nexport type ParsedNavigationSubSubItem = Omit<NavigationSubSubItem, \"url\"> & {\n url: string;\n active: boolean;\n possible: boolean;\n items: ParsedNavigationSubSubItem[];\n};\n\nexport type ParsedNavigationSubItem = Omit<\n NavigationSubItem,\n \"url\" | \"storePath\"\n> & {\n url: string;\n active: boolean;\n possible: boolean;\n /**\n * Sub-sub-items which will always be present\n * But can be empty in either cases e.g. no valid paths given\n */\n items: ParsedNavigationSubSubItem[];\n};\n\nexport type ParsedNavigationItem = Omit<NavigationItem, \"url\" | \"items\"> & {\n url: string;\n active: boolean;\n possible: boolean;\n items: ParsedNavigationSubItem[];\n};\n\nexport type ParsedNavigationSection = {\n type: NavigationSectionType;\n label: string;\n url: string;\n possible: boolean;\n active: boolean;\n items: ParsedNavigationItem[];\n};\n\nexport type ParsedNavigation = Record<\n NavigationSectionType,\n ParsedNavigationSection\n>;\n\n// #############################################################################\n// Global site config types\n// #############################################################################\nexport enum SiteConfigType {\n // Basic site config\n Basic = \"basic\",\n // Regional site config\n Regional = \"regional\",\n}\n\ninterface BaseSiteConfig {\n type: SiteConfigType;\n}\n\nexport interface BasicSiteConfig extends BaseSiteConfig {\n type: SiteConfigType.Basic;\n baseUrl: string;\n /** If `defaultLanguage` or `languages` are undefined, it means region does not have languages */\n defaultLanguage?: Language;\n languages?: DeployedLanguages;\n}\n\nexport interface RegionalSite extends BaseSiteConfig {\n type: SiteConfigType.Regional;\n defaultRegion: BasicSiteConfig;\n regions: Record<StoreId, BasicSiteConfig | null>;\n}\n\ntype SiteConfig = RegionalSite | BasicSiteConfig;\n\n/**\n * Static global site config type for known sites\n */\nexport type StaticGlobalSiteConfig = Record<\n // Excludes generic as it allows custom injecting in runtime\n Exclude<SiteId, SiteId.Generic>,\n SiteConfig\n>;\n\n/**\n * Explicit global site config type for known sites\n * (used for store where `satisfies` is not working)\n */\nexport interface StaticGlobalSiteConfigExplicit extends StaticGlobalSiteConfig {\n [SiteId.Store]: RegionalSite;\n [SiteId.Ui]: RegionalSite;\n [SiteId.Uisp]: RegionalSite;\n [SiteId.Amplifi]: BasicSiteConfig;\n [SiteId.TechSpecs]: BasicSiteConfig;\n [SiteId.ExpertsUi]: BasicSiteConfig;\n [SiteId.ExpertsUisp]: BasicSiteConfig;\n [SiteId.Uwc]: BasicSiteConfig;\n [SiteId.Blog]: BasicSiteConfig;\n [SiteId.CaseStudies]: BasicSiteConfig;\n}\n\n/**\n * Global site config type for known sites + generic site where\n * custom site config can be injected in the target project\n */\nexport type GlobalSiteConfig = StaticGlobalSiteConfig & {\n [SiteId.Generic]?: SiteConfig;\n};\n\n// #############################################################################\n// Microsite context value\n// #############################################################################\nexport type MenuContextValue = {\n /**\n * Indicates if app is doing SSR\n */\n isSsr: boolean;\n storeId: StoreId;\n\n // Menu motif\n motif: Motif;\n setMotif: (motif: Motif) => void;\n\n // Nav context\n context: SiteId;\n isMicrositeContext: boolean;\n\n // Modals\n activeModal: ModalId | null;\n prevActiveModal: ModalId | null;\n setActiveModal: (id: ModalId | null) => void;\n\n // Languages\n language: `${Language}`;\n isMultiLanguage: boolean;\n deployedLanguages: Array<`${Language}`>;\n languageDirection: LanguageDirectionType;\n isLongLanguage: boolean;\n\n // Menu sections and items\n navigation: ParsedNavigation;\n activeNavigationSection: ParsedNavigationSection;\n inactiveNavigationSection: ParsedNavigationSection;\n isPathnameActive: (pathname: string) => boolean;\n\n // For DOM animations\n navigationOutOfView: boolean;\n setNavigationOutOfView: (navigationOutOfView: boolean) => void;\n\n // Utils\n createSiteUrl: (siteUrl: SiteUrl) => string;\n\n // Handling showing cart preview or showing empty cart notification\n handleCartIconClick: (\n hasCartItems: boolean,\n navigateToCartFn: () => void,\n ) => void;\n\n // State for showing empty cart notification on mobile\n showMobileEmptyCartNotification: boolean;\n};\n"],"names":["ModalId","SiteConfigType"],"mappings":";;;AAeY,IAAAA,OAAA,GAAA,gBAAAA,QAAL,IAAA;EACLA,SAAA,SAAU,CAAA,GAAA,SAAA;EACVA,SAAA,SAAU,CAAA,GAAA,SAAA;EACVA,SAAA,MAAO,CAAA,GAAA,MAAA;EACPA,SAAA,aAAc,CAAA,GAAA,aAAA;EACdA,SAAA,UAAW,CAAA,GAAA,UAAA;EACXA,SAAA,YAAa,CAAA,GAAA,YAAA;EACbA,SAAA,eAAgB,CAAA,GAAA,eAAA;EAChBA,SAAA,QAAS,CAAA,GAAA,QAAA;EARCA,OAAAA,QAAAA;AAAA,CAAA,EAAAA,OAAA,IAAA,CAAA,CAAA,CAAA;AAwDA,IAAAC,cAAA,GAAA,gBAAAA,eAAL,IAAA;EAELA,gBAAA,OAAQ,CAAA,GAAA,OAAA;EAERA,gBAAA,UAAW,CAAA,GAAA,UAAA;EAJDA,OAAAA,eAAAA;AAAA,CAAA,EAAAA,cAAA,IAAA,CAAA,CAAA,CAAA;;"}
@@ -4,6 +4,7 @@ var ModalId = /* @__PURE__ */(ModalId2 => {
4
4
  ModalId2["Support"] = "support";
5
5
  ModalId2["Account"] = "account";
6
6
  ModalId2["Cart"] = "cart";
7
+ ModalId2["CartPreview"] = "cartPreview";
7
8
  ModalId2["Language"] = "language";
8
9
  ModalId2["MobileMenu"] = "mobileMenu";
9
10
  ModalId2["ProMobileMenu"] = "proMobileMenu";
@@ -1 +1 @@
1
- {"version":3,"file":"types.mjs","sources":["../../../src/contexts/MenuContext/types.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\n\nimport type { StoreId } from \"../../types\";\nimport type {\n DeployedLanguages,\n Language,\n NavigationItem,\n NavigationSectionType,\n NavigationSubItem,\n NavigationSubSubItem,\n SiteId,\n SiteUrl,\n} from \"./mapping\";\nimport type { LanguageDirectionType } from \"./utils\";\n\nexport enum ModalId {\n Support = \"support\",\n Account = \"account\",\n Cart = \"cart\",\n Language = \"language\",\n MobileMenu = \"mobileMenu\",\n ProMobileMenu = \"proMobileMenu\",\n Search = \"search\",\n}\n\nexport type ParsedNavigationSubSubItem = Omit<NavigationSubSubItem, \"url\"> & {\n url: string;\n active: boolean;\n possible: boolean;\n items: ParsedNavigationSubSubItem[];\n};\n\nexport type ParsedNavigationSubItem = Omit<\n NavigationSubItem,\n \"url\" | \"storePath\"\n> & {\n url: string;\n active: boolean;\n possible: boolean;\n /**\n * Sub-sub-items which will always be present\n * But can be empty in either cases e.g. no valid paths given\n */\n items: ParsedNavigationSubSubItem[];\n};\n\nexport type ParsedNavigationItem = Omit<NavigationItem, \"url\" | \"items\"> & {\n url: string;\n active: boolean;\n possible: boolean;\n items: ParsedNavigationSubItem[];\n};\n\nexport type ParsedNavigationSection = {\n type: NavigationSectionType;\n label: string;\n url: string;\n possible: boolean;\n active: boolean;\n items: ParsedNavigationItem[];\n};\n\nexport type ParsedNavigation = Record<\n NavigationSectionType,\n ParsedNavigationSection\n>;\n\n// #############################################################################\n// Global site config types\n// #############################################################################\nexport enum SiteConfigType {\n // Basic site config\n Basic = \"basic\",\n // Regional site config\n Regional = \"regional\",\n}\n\ninterface BaseSiteConfig {\n type: SiteConfigType;\n}\n\nexport interface BasicSiteConfig extends BaseSiteConfig {\n type: SiteConfigType.Basic;\n baseUrl: string;\n /** If `defaultLanguage` or `languages` are undefined, it means region does not have languages */\n defaultLanguage?: Language;\n languages?: DeployedLanguages;\n}\n\nexport interface RegionalSite extends BaseSiteConfig {\n type: SiteConfigType.Regional;\n defaultRegion: BasicSiteConfig;\n regions: Record<StoreId, BasicSiteConfig | null>;\n}\n\ntype SiteConfig = RegionalSite | BasicSiteConfig;\n\n/**\n * Static global site config type for known sites\n */\nexport type StaticGlobalSiteConfig = Record<\n // Excludes generic as it allows custom injecting in runtime\n Exclude<SiteId, SiteId.Generic>,\n SiteConfig\n>;\n\n/**\n * Explicit global site config type for known sites\n * (used for store where `satisfies` is not working)\n */\nexport interface StaticGlobalSiteConfigExplicit extends StaticGlobalSiteConfig {\n [SiteId.Store]: RegionalSite;\n [SiteId.Ui]: RegionalSite;\n [SiteId.Uisp]: RegionalSite;\n [SiteId.Amplifi]: BasicSiteConfig;\n [SiteId.TechSpecs]: BasicSiteConfig;\n [SiteId.ExpertsUi]: BasicSiteConfig;\n [SiteId.ExpertsUisp]: BasicSiteConfig;\n [SiteId.Uwc]: BasicSiteConfig;\n [SiteId.Blog]: BasicSiteConfig;\n [SiteId.CaseStudies]: BasicSiteConfig;\n}\n\n/**\n * Global site config type for known sites + generic site where\n * custom site config can be injected in the target project\n */\nexport type GlobalSiteConfig = StaticGlobalSiteConfig & {\n [SiteId.Generic]?: SiteConfig;\n};\n\n// #############################################################################\n// Microsite context value\n// #############################################################################\nexport type MenuContextValue = {\n /**\n * Indicates if app is doing SSR\n */\n isSsr: boolean;\n storeId: StoreId;\n\n // Menu motif\n motif: Motif;\n setMotif: (motif: Motif) => void;\n\n // Nav context\n context: SiteId;\n isMicrositeContext: boolean;\n\n // Modals\n activeModal: ModalId | null;\n prevActiveModal: ModalId | null;\n setActiveModal: (id: ModalId | null) => void;\n\n // Languages\n language: `${Language}`;\n isMultiLanguage: boolean;\n deployedLanguages: Array<`${Language}`>;\n languageDirection: LanguageDirectionType;\n isLongLanguage: boolean;\n\n // Menu sections and items\n navigation: ParsedNavigation;\n activeNavigationSection: ParsedNavigationSection;\n inactiveNavigationSection: ParsedNavigationSection;\n isPathnameActive: (pathname: string) => boolean;\n\n // For DOM animations\n navigationOutOfView: boolean;\n setNavigationOutOfView: (navigationOutOfView: boolean) => void;\n\n // Utils\n createSiteUrl: (siteUrl: SiteUrl) => string;\n};\n"],"names":["ModalId","SiteConfigType"],"mappings":";;AAeY,IAAAA,OAAA,GAAA,gBAAAA,QAAL,IAAA;EACLA,SAAA,SAAU,CAAA,GAAA,SAAA;EACVA,SAAA,SAAU,CAAA,GAAA,SAAA;EACVA,SAAA,MAAO,CAAA,GAAA,MAAA;EACPA,SAAA,UAAW,CAAA,GAAA,UAAA;EACXA,SAAA,YAAa,CAAA,GAAA,YAAA;EACbA,SAAA,eAAgB,CAAA,GAAA,eAAA;EAChBA,SAAA,QAAS,CAAA,GAAA,QAAA;EAPCA,OAAAA,QAAAA;AAAA,CAAA,EAAAA,OAAA,IAAA,CAAA,CAAA,CAAA;AAuDA,IAAAC,cAAA,GAAA,gBAAAA,eAAL,IAAA;EAELA,gBAAA,OAAQ,CAAA,GAAA,OAAA;EAERA,gBAAA,UAAW,CAAA,GAAA,UAAA;EAJDA,OAAAA,eAAAA;AAAA,CAAA,EAAAA,cAAA,IAAA,CAAA,CAAA,CAAA;"}
1
+ {"version":3,"file":"types.mjs","sources":["../../../src/contexts/MenuContext/types.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\n\nimport type { StoreId } from \"../../types\";\nimport type {\n DeployedLanguages,\n Language,\n NavigationItem,\n NavigationSectionType,\n NavigationSubItem,\n NavigationSubSubItem,\n SiteId,\n SiteUrl,\n} from \"./mapping\";\nimport type { LanguageDirectionType } from \"./utils\";\n\nexport enum ModalId {\n Support = \"support\",\n Account = \"account\",\n Cart = \"cart\",\n CartPreview = \"cartPreview\",\n Language = \"language\",\n MobileMenu = \"mobileMenu\",\n ProMobileMenu = \"proMobileMenu\",\n Search = \"search\",\n}\n\nexport type ParsedNavigationSubSubItem = Omit<NavigationSubSubItem, \"url\"> & {\n url: string;\n active: boolean;\n possible: boolean;\n items: ParsedNavigationSubSubItem[];\n};\n\nexport type ParsedNavigationSubItem = Omit<\n NavigationSubItem,\n \"url\" | \"storePath\"\n> & {\n url: string;\n active: boolean;\n possible: boolean;\n /**\n * Sub-sub-items which will always be present\n * But can be empty in either cases e.g. no valid paths given\n */\n items: ParsedNavigationSubSubItem[];\n};\n\nexport type ParsedNavigationItem = Omit<NavigationItem, \"url\" | \"items\"> & {\n url: string;\n active: boolean;\n possible: boolean;\n items: ParsedNavigationSubItem[];\n};\n\nexport type ParsedNavigationSection = {\n type: NavigationSectionType;\n label: string;\n url: string;\n possible: boolean;\n active: boolean;\n items: ParsedNavigationItem[];\n};\n\nexport type ParsedNavigation = Record<\n NavigationSectionType,\n ParsedNavigationSection\n>;\n\n// #############################################################################\n// Global site config types\n// #############################################################################\nexport enum SiteConfigType {\n // Basic site config\n Basic = \"basic\",\n // Regional site config\n Regional = \"regional\",\n}\n\ninterface BaseSiteConfig {\n type: SiteConfigType;\n}\n\nexport interface BasicSiteConfig extends BaseSiteConfig {\n type: SiteConfigType.Basic;\n baseUrl: string;\n /** If `defaultLanguage` or `languages` are undefined, it means region does not have languages */\n defaultLanguage?: Language;\n languages?: DeployedLanguages;\n}\n\nexport interface RegionalSite extends BaseSiteConfig {\n type: SiteConfigType.Regional;\n defaultRegion: BasicSiteConfig;\n regions: Record<StoreId, BasicSiteConfig | null>;\n}\n\ntype SiteConfig = RegionalSite | BasicSiteConfig;\n\n/**\n * Static global site config type for known sites\n */\nexport type StaticGlobalSiteConfig = Record<\n // Excludes generic as it allows custom injecting in runtime\n Exclude<SiteId, SiteId.Generic>,\n SiteConfig\n>;\n\n/**\n * Explicit global site config type for known sites\n * (used for store where `satisfies` is not working)\n */\nexport interface StaticGlobalSiteConfigExplicit extends StaticGlobalSiteConfig {\n [SiteId.Store]: RegionalSite;\n [SiteId.Ui]: RegionalSite;\n [SiteId.Uisp]: RegionalSite;\n [SiteId.Amplifi]: BasicSiteConfig;\n [SiteId.TechSpecs]: BasicSiteConfig;\n [SiteId.ExpertsUi]: BasicSiteConfig;\n [SiteId.ExpertsUisp]: BasicSiteConfig;\n [SiteId.Uwc]: BasicSiteConfig;\n [SiteId.Blog]: BasicSiteConfig;\n [SiteId.CaseStudies]: BasicSiteConfig;\n}\n\n/**\n * Global site config type for known sites + generic site where\n * custom site config can be injected in the target project\n */\nexport type GlobalSiteConfig = StaticGlobalSiteConfig & {\n [SiteId.Generic]?: SiteConfig;\n};\n\n// #############################################################################\n// Microsite context value\n// #############################################################################\nexport type MenuContextValue = {\n /**\n * Indicates if app is doing SSR\n */\n isSsr: boolean;\n storeId: StoreId;\n\n // Menu motif\n motif: Motif;\n setMotif: (motif: Motif) => void;\n\n // Nav context\n context: SiteId;\n isMicrositeContext: boolean;\n\n // Modals\n activeModal: ModalId | null;\n prevActiveModal: ModalId | null;\n setActiveModal: (id: ModalId | null) => void;\n\n // Languages\n language: `${Language}`;\n isMultiLanguage: boolean;\n deployedLanguages: Array<`${Language}`>;\n languageDirection: LanguageDirectionType;\n isLongLanguage: boolean;\n\n // Menu sections and items\n navigation: ParsedNavigation;\n activeNavigationSection: ParsedNavigationSection;\n inactiveNavigationSection: ParsedNavigationSection;\n isPathnameActive: (pathname: string) => boolean;\n\n // For DOM animations\n navigationOutOfView: boolean;\n setNavigationOutOfView: (navigationOutOfView: boolean) => void;\n\n // Utils\n createSiteUrl: (siteUrl: SiteUrl) => string;\n\n // Handling showing cart preview or showing empty cart notification\n handleCartIconClick: (\n hasCartItems: boolean,\n navigateToCartFn: () => void,\n ) => void;\n\n // State for showing empty cart notification on mobile\n showMobileEmptyCartNotification: boolean;\n};\n"],"names":["ModalId","SiteConfigType"],"mappings":";;AAeY,IAAAA,OAAA,GAAA,gBAAAA,QAAL,IAAA;EACLA,SAAA,SAAU,CAAA,GAAA,SAAA;EACVA,SAAA,SAAU,CAAA,GAAA,SAAA;EACVA,SAAA,MAAO,CAAA,GAAA,MAAA;EACPA,SAAA,aAAc,CAAA,GAAA,aAAA;EACdA,SAAA,UAAW,CAAA,GAAA,UAAA;EACXA,SAAA,YAAa,CAAA,GAAA,YAAA;EACbA,SAAA,eAAgB,CAAA,GAAA,eAAA;EAChBA,SAAA,QAAS,CAAA,GAAA,QAAA;EARCA,OAAAA,QAAAA;AAAA,CAAA,EAAAA,OAAA,IAAA,CAAA,CAAA,CAAA;AAwDA,IAAAC,cAAA,GAAA,gBAAAA,eAAL,IAAA;EAELA,gBAAA,OAAQ,CAAA,GAAA,OAAA;EAERA,gBAAA,UAAW,CAAA,GAAA,UAAA;EAJDA,OAAAA,eAAAA;AAAA,CAAA,EAAAA,cAAA,IAAA,CAAA,CAAA,CAAA;"}
@@ -0,0 +1 @@
1
+ export declare function useIsTouchDevice(): boolean;
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ "use strict";
5
+ function useIsTouchDevice() {
6
+ const [isTouchDevice, setIsTouchDevice] = React.useState(false);
7
+ React.useEffect(() => {
8
+ function onResize() {
9
+ setIsTouchDevice("ontouchstart" in window || navigator.maxTouchPoints > 0);
10
+ }
11
+ window.addEventListener("resize", onResize);
12
+ onResize();
13
+ return () => {
14
+ window.removeEventListener("resize", onResize);
15
+ };
16
+ }, []);
17
+ return isTouchDevice;
18
+ }
19
+ exports.useIsTouchDevice = useIsTouchDevice;
20
+ //# sourceMappingURL=useIsTouchDevice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIsTouchDevice.js","sources":["../../src/hooks/useIsTouchDevice.ts"],"sourcesContent":["import { useEffect, useState } from \"react\";\n\nexport function useIsTouchDevice() {\n const [isTouchDevice, setIsTouchDevice] = useState(false);\n\n useEffect(() => {\n function onResize() {\n setIsTouchDevice(\n \"ontouchstart\" in window || navigator.maxTouchPoints > 0,\n );\n }\n\n window.addEventListener(\"resize\", onResize);\n onResize();\n\n return () => {\n window.removeEventListener(\"resize\", onResize);\n };\n }, []);\n\n return isTouchDevice;\n}\n"],"names":["useIsTouchDevice","isTouchDevice","setIsTouchDevice","useState","useEffect","onResize","window","navigator","maxTouchPoints","addEventListener","removeEventListener"],"mappings":";;;;AAEO,SAASA,gBAAmBA,CAAA,EAAA;EACjC,MAAM,CAACC,aAAA,EAAeC,gBAAgB,CAAA,GAAIC,KAAAA,CAAAA,SAAS,KAAK,CAAA;EAExDC,KAAAA,CAAAA,SAAA,CAAU,MAAM;IACd,SAASC,QAAWA,CAAA,EAAA;MAClBH,gBAAA,CACE,cAAA,IAAkBI,MAAU,IAAAC,SAAA,CAAUC,cAAiB,GAAA,CACzD,CAAA;IAAA;IAGKF,MAAA,CAAAG,gBAAA,CAAiB,UAAUJ,QAAQ,CAAA;IACjCA,QAAA,CAAA,CAAA;IAET,OAAO,MAAM;MACJC,MAAA,CAAAI,mBAAA,CAAoB,UAAUL,QAAQ,CAAA;IAC/C,CAAA;EACF,CAAA,EAAG,EAAE,CAAA;EAEE,OAAAJ,aAAA;AACT;"}
@@ -0,0 +1,18 @@
1
+ import { useState, useEffect } from 'react';
2
+ "use strict";
3
+ function useIsTouchDevice() {
4
+ const [isTouchDevice, setIsTouchDevice] = useState(false);
5
+ useEffect(() => {
6
+ function onResize() {
7
+ setIsTouchDevice("ontouchstart" in window || navigator.maxTouchPoints > 0);
8
+ }
9
+ window.addEventListener("resize", onResize);
10
+ onResize();
11
+ return () => {
12
+ window.removeEventListener("resize", onResize);
13
+ };
14
+ }, []);
15
+ return isTouchDevice;
16
+ }
17
+ export { useIsTouchDevice };
18
+ //# sourceMappingURL=useIsTouchDevice.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIsTouchDevice.mjs","sources":["../../src/hooks/useIsTouchDevice.ts"],"sourcesContent":["import { useEffect, useState } from \"react\";\n\nexport function useIsTouchDevice() {\n const [isTouchDevice, setIsTouchDevice] = useState(false);\n\n useEffect(() => {\n function onResize() {\n setIsTouchDevice(\n \"ontouchstart\" in window || navigator.maxTouchPoints > 0,\n );\n }\n\n window.addEventListener(\"resize\", onResize);\n onResize();\n\n return () => {\n window.removeEventListener(\"resize\", onResize);\n };\n }, []);\n\n return isTouchDevice;\n}\n"],"names":["useIsTouchDevice","isTouchDevice","setIsTouchDevice","useState","useEffect","onResize","window","navigator","maxTouchPoints","addEventListener","removeEventListener"],"mappings":";;AAEO,SAASA,gBAAmBA,CAAA,EAAA;EACjC,MAAM,CAACC,aAAA,EAAeC,gBAAgB,CAAA,GAAIC,SAAS,KAAK,CAAA;EAExDC,SAAA,CAAU,MAAM;IACd,SAASC,QAAWA,CAAA,EAAA;MAClBH,gBAAA,CACE,cAAA,IAAkBI,MAAU,IAAAC,SAAA,CAAUC,cAAiB,GAAA,CACzD,CAAA;IAAA;IAGKF,MAAA,CAAAG,gBAAA,CAAiB,UAAUJ,QAAQ,CAAA;IACjCA,QAAA,CAAA,CAAA;IAET,OAAO,MAAM;MACJC,MAAA,CAAAI,mBAAA,CAAoB,UAAUL,QAAQ,CAAA;IAC/C,CAAA;EACF,CAAA,EAAG,EAAE,CAAA;EAEE,OAAAJ,aAAA;AACT;"}
@@ -8,6 +8,7 @@ import type { LocalizedCurrency, RoundingFn } from "./types";
8
8
  * @see: https://ubiquiti.atlassian.net/browse/NEP-3846
9
9
  */
10
10
  export declare const roundToNearestFull059: RoundingFn;
11
+ export declare const roundToNearestValidUiCarePrice: RoundingFn;
11
12
  /**
12
13
  * Custom rounding method to be used with dinero.js
13
14
  * This rounding method will round to
@@ -66,6 +67,11 @@ export declare const Round: {
66
67
  */
67
68
  PrettifyHalfUnitCents: RoundingFn;
68
69
  Subunit: import("@dinero.js/core").RoundingMode;
70
+ /**
71
+ * ! Disclaimer may not work for "weird" currencies as expected
72
+ * ! For correct rounding UI Care prices, used for auto managed UI Care products.
73
+ */
74
+ ValidUiCarePrice: RoundingFn;
69
75
  };
70
76
  /**
71
77
  * Mapping of how prices should be rounded down to "whole numbers" after certain threshold
@@ -22,6 +22,22 @@ const roundToNearestFull059 = input => {
22
22
  return roundedNumber - remainder + 9;
23
23
  }
24
24
  };
25
+ const roundToNearestValidUiCarePrice = input => {
26
+ if (input === 0) {
27
+ return 0;
28
+ }
29
+ if (input <= 5) {
30
+ return 5;
31
+ }
32
+ const remainder = input % 10;
33
+ if (remainder <= 2) {
34
+ return input - remainder - 1;
35
+ } else if (remainder <= 5) {
36
+ return input - remainder + 5;
37
+ } else {
38
+ return input - remainder + 9;
39
+ }
40
+ };
25
41
  const roundToNearestDecimalCent = input => {
26
42
  if (input === 0) {
27
43
  return 0;
@@ -86,7 +102,12 @@ const Round = {
86
102
  * ! Disclaimer may not work for "weird" currencies as expected
87
103
  */
88
104
  PrettifyHalfUnitCents: roundToNearestHalfUnitCent,
89
- Subunit: dinero_js.halfUp
105
+ Subunit: dinero_js.halfUp,
106
+ /**
107
+ * ! Disclaimer may not work for "weird" currencies as expected
108
+ * ! For correct rounding UI Care prices, used for auto managed UI Care products.
109
+ */
110
+ ValidUiCarePrice: roundToNearestValidUiCarePrice
90
111
  };
91
112
  const prettifyPriceLookup = /* @__PURE__ */new Map([[currencies.USD.code, 20], [currencies.AED.code, 50],
92
113
  // Approximately every price above ~1.1 usd will be rounded in ZAR
@@ -218,6 +239,7 @@ exports.prettifyPriceLookup = prettifyPriceLookup;
218
239
  exports.roundToNearestDecimalCent = roundToNearestDecimalCent;
219
240
  exports.roundToNearestFull059 = roundToNearestFull059;
220
241
  exports.roundToNearestHalfUnitCent = roundToNearestHalfUnitCent;
242
+ exports.roundToNearestValidUiCarePrice = roundToNearestValidUiCarePrice;
221
243
  exports.smallestSubunitLookup = smallestSubunitLookup;
222
244
  exports.storesWithPerItemTaxRate = storesWithPerItemTaxRate;
223
245
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../src/utils/money/constants.ts"],"sourcesContent":["import {\n AED,\n BGN,\n BRL,\n CAD,\n CHF,\n CNY,\n CZK,\n DKK,\n EUR,\n GBP,\n HRK,\n HUF,\n INR,\n JPY,\n MXN,\n NOK,\n PHP,\n PLN,\n RON,\n SEK,\n SGD,\n TWD,\n USD,\n ZAR,\n} from \"@dinero.js/currencies\";\nimport { down, halfAwayFromZero, halfUp } from \"dinero.js\";\n\nimport type { StoreId } from \"../../types\";\nimport { Currency } from \"../../types\";\nimport type {\n Cents,\n DinoCurrency,\n LocalizedCurrency,\n RoundingFn,\n} from \"./types\";\n\n// #############################################################################\n// Constants\n// #############################################################################\n\n/**\n * Custom rounding method to be used with dinero.js\n * This rounding method will round to nearest FULL 0/5/9 (and strip cents)\n *\n * @see: https://ubiquiti.atlassian.net/browse/NEP-3846\n */\nexport const roundToNearestFull059: RoundingFn = (input: number) => {\n if (input === 0) {\n return 0;\n }\n\n // Special handling of 0.01-5.00\n if (input <= 5) {\n return 5;\n }\n\n /**\n * Input comes as float, for this rounding we don't need cents, so round\n * to nearest full number\n */\n const roundedNumber = Math.round(input);\n\n // Determine nearest rounding value\n const remainder = roundedNumber % 10;\n if (remainder <= 2) {\n // Round down to nearest 0\n return roundedNumber - remainder;\n } else if (remainder <= 7) {\n // Round to nearest 5\n return roundedNumber - remainder + 5;\n } else {\n // Round up to nearest 9\n return roundedNumber - remainder + 9;\n }\n};\n\n/**\n * Custom rounding method to be used with dinero.js\n * This rounding method will round to\n * nearest decimal cent. e.g. 1.53 = 1.50 / 1.57 = 1.60\n *\n * @see: https://ubiquiti.atlassian.net/browse/NEP-3846\n */\nexport const roundToNearestDecimalCent: RoundingFn = (input: number) => {\n if (input === 0) {\n return 0;\n }\n\n // Special handling of 0.01-0.09\n if (input <= 0.1) {\n return 0.1;\n }\n\n /**\n * Input comes as float, just to be on the safe side use toFixed to mitigate\n * risk of running to floating point precision issues\n */\n return parseFloat((Math.round(input * 10) / 10).toFixed(1));\n};\n\n/**\n * Custom rounding method to be used with dinero.js\n * This rounding method will round to\n * nearest .50 or .00. e.g. 11.22 = 11 / 11.55 = 11.50 / 11.90 = 12\n *\n * @see: https://ubiquiti.atlassian.net/browse/NEP-3846\n */\nexport const roundToNearestHalfUnitCent: RoundingFn = (input: number) => {\n if (input === 0) {\n return 0;\n }\n\n // Special handling of 0.01-0.5\n if (input <= 0.5) {\n return 0.5;\n }\n\n /**\n * Input comes as float, just to be on the safe side use toFixed to mitigate\n * risk of running to floating point precision issues\n *\n * Multiply by 2, round to the nearest integer, then divide by 2 to get the nearest .5 or .0\n * Return with fixed precision to avoid floating-point artifacts\n */\n return parseFloat((Math.round(input * 2) / 2).toFixed(2));\n};\n\nexport const Round = {\n /**\n * !!!!!!!!!!!!!!\n * ! Update 2024\n * ! We ar changing from `halfEven` (bankers rounding) to `halfAwayFromZero` (symmetric rounding) to match Avalara tax\n * @see https://knowledge.avalara.com/bundle/dqa1657870670369_dqa1657870670369/page/Change_how_AvaTax_rounds_the_tax_amount.html\n * @see https://ui.slack.com/archives/C07P7L7S3CP/p1728313196140639\n * !!!!!!!!!!!!!!\n *\n * OLD: halfEven docs\n * ⚠️ Instead of using Math.round, we HAVE to use this method to round the financial numbers everywhere where we CAN'T\n * deal with dinero.js (Dinero.js should be the priority). But often for converting from API requests we have to\n * normalize the values so we use this method.\n *\n * It just a re-export of the dinero.js halfEven (a.k.a bankers rounding) method which is the default rounding method.\n * @see https://github.com/dinerojs/dinero.js/blob/v2.0.0-alpha.8/packages/core/src/round/halfEven.ts\n *\n * Compared to Math.round (arithmetic rounding) it differentiates that it changes the `.5` round up or down behavior\n * based on if the rounded number would be an even number. So 1.5 would round to 2 while 2.5 would round to 2.\n * See the youtube link below for a brief exclamation on why it's important to use this method over regular rounding\n * (half-up):\n * https://youtu.be/yuRdYlZvs1E\n *\n * If you really want to get knee-deep in the rounding subject, you can read the following:\n * https://en.wikipedia.org/wiki/Rounding#Round_half_toward_zero\n */\n Financial: halfAwayFromZero,\n // https://ui.slack.com/archives/C07P7L7S3CP/p1728313196140639\n // TODO: maybe we should have separate rounding functions depending on the input value?\n // Reading from wiki \"Round half toward zero\" is better if the value is already \"normalized to cents\"\n // But the \"Round half to even\" seems better for when working with float like values\n // financialRound = Math.round;\n Shipping: roundToNearestDecimalCent,\n Prettify: down,\n /**\n * ! Disclaimer may not work for \"weird\" currencies as expected\n */\n PrettifyFull059: roundToNearestFull059,\n /**\n * ! Disclaimer may not work for \"weird\" currencies as expected\n */\n PrettifyDecimalCents: roundToNearestDecimalCent,\n /**\n * ! Disclaimer may not work for \"weird\" currencies as expected\n */\n PrettifyHalfUnitCents: roundToNearestHalfUnitCent,\n Subunit: halfUp,\n} satisfies Record<string, RoundingFn>;\n\n/**\n * Mapping of how prices should be rounded down to \"whole numbers\" after certain threshold\n */\nexport const prettifyPriceLookup = new Map([\n [USD.code, 20],\n [AED.code, 50],\n // Approximately every price above ~1.1 usd will be rounded in ZAR\n [ZAR.code, 20],\n [MXN.code, 20],\n]);\n\n/**\n * Map of dinero code to subunit digit count.\n */\nexport const smallestSubunitLookup = new Map<string, [Cents, RoundingFn]>([\n /**\n * TWD does not use subunits at all in day to day transactions.\n */\n [TWD.code, [0, Round.Subunit]],\n]);\n\n/**\n * Precompiled list for faster currency and locale lookups\n */\nexport const localizedCurrencyLookup = new Map<Currency, LocalizedCurrency>([\n [Currency.Aed, { currency: AED, locale: \"ar-AE\" }],\n [Currency.Bgn, { currency: BGN, locale: \"bg-BG\" }],\n [Currency.Cad, { currency: CAD, locale: \"en-CA\" }],\n [Currency.Chf, { currency: CHF, locale: \"it-CH\" }],\n [Currency.Czk, { currency: CZK, locale: \"cs-CZ\" }],\n [Currency.Dkk, { currency: DKK, locale: \"da-DK\" }],\n [Currency.Eur, { currency: EUR, locale: \"de-DE\" }],\n [Currency.Gbp, { currency: GBP, locale: \"en-GB\" }],\n [Currency.Hrk, { currency: HRK, locale: \"hr-HR\" }],\n [Currency.Huf, { currency: HUF, locale: \"hu-HU\" }],\n [Currency.Nok, { currency: NOK, locale: \"no-NO\" }],\n [Currency.Pln, { currency: PLN, locale: \"pl-PL\" }],\n [Currency.Ron, { currency: RON, locale: \"ro-RO\" }],\n [Currency.Sek, { currency: SEK, locale: \"sv-SE\" }],\n [Currency.Usd, { currency: USD, locale: \"en-US\" }],\n [Currency.Zar, { currency: ZAR, locale: \"en-ZA\" }],\n [Currency.Inr, { currency: INR, locale: \"en-IN\" }],\n [Currency.Sgd, { currency: SGD, locale: \"en-SG\" }],\n [Currency.Brl, { currency: BRL, locale: \"pt-BR\" }],\n // NOTE: en-JP Doesn't exist\n [Currency.Jpy, { currency: JPY, locale: \"en-JP\" }],\n // NOTE: en-TW Doesn't exist\n [Currency.Twd, { currency: TWD, locale: \"en-TW\" }],\n [Currency.Mxn, { currency: MXN, locale: \"es-MX\" }],\n [Currency.Php, { currency: PHP, locale: \"en-PH\" }],\n [Currency.Cny, { currency: CNY, locale: \"zh-CN\" }],\n]);\n\n// #############################################################################\n// Tax Rate\n// #############################################################################\n/**\n * List of stores that require calculating per single item qty and then combining them to get the total tax amount for a\n * single line. Rest of the stores inherit default behavior that tax calculated on whole line item\n *\n * ! IMPORTANT: When changing need to sync that store.backend `AVATAX_CUSTOM_COMPANY_CODES` is updated to reflect the change\n *\n * FIXME: as PR for the change as unfinished currently disabled to enable the functionality that calculates tax per single item as requires\n * specific testing both for our custom tax and Avalara stores that use custom company codes. So the groundwork for\n * different tax calculations is there just need to enable on the share side and test if it works\n */\nexport const storesWithPerItemTaxRate = new Set([\n // #############################################################################\n // Stores with custom tax rates\n // #############################################################################\n // StoreId.Br,\n // StoreId.Tw,\n // #############################################################################\n // Stores with Avalara, but will have custom company codes to handle per-item tax rate\n // #############################################################################\n // StoreId.Jp,\n // StoreId.Sg,\n] as StoreId[]);\n\n/**\n * Dinero currency option block for working with tax rates within dinero\n */\nexport const TAX_RATE_DINERO_CURRENCY = {\n base: 10,\n /**\n * We expect the tax rate to be in the range of 0..1\n * 0 --> 0%\n * 1 --> 100%\n * 0.21 --> 21%\n * 0.2169 --> 21.69%\n * 0.12345678 --> 12.345678%\n * !!! Don't change as this value is tied to store.backend DB schema !!!\n */\n exponent: 8,\n code: \"\", // Not important\n} satisfies DinoCurrency;\n\n// #############################################################################\n// Exchange Rate\n// #############################################################################\n\nexport const EXCHANGE_RATE_DINERO_CURRENCY = {\n base: 10,\n /**\n * We support having certain decimal places for exchange rates\n * !!! Don't change as this value is tied to store.backend DB schema !!!\n */\n exponent: 6,\n code: \"\", // Not important\n} satisfies DinoCurrency;\n"],"names":["roundToNearestFull059","input","roundedNumber","Math","round","remainder","roundToNearestDecimalCent","parseFloat","toFixed","roundToNearestHalfUnitCent","Round","Financial","halfAwayFromZero","Shipping","Prettify","down","PrettifyFull059","PrettifyDecimalCents","PrettifyHalfUnitCents","Subunit","halfUp","prettifyPriceLookup","Map","USD","code","AED","ZAR","MXN","smallestSubunitLookup","TWD","localizedCurrencyLookup","Currency","Aed","currency","locale","Bgn","BGN","Cad","CAD","Chf","CHF","Czk","CZK","Dkk","DKK","Eur","EUR","Gbp","GBP","Hrk","HRK","Huf","HUF","Nok","NOK","Pln","PLN","Ron","RON","Sek","SEK","Usd","Zar","Inr","INR","Sgd","SGD","Brl","BRL","Jpy","JPY","Twd","Mxn","Php","PHP","Cny","CNY","storesWithPerItemTaxRate","Set","TAX_RATE_DINERO_CURRENCY","base","exponent","EXCHANGE_RATE_DINERO_CURRENCY"],"mappings":";;;;;;;AA+Ca,MAAAA,qBAAA,GAAqCC,KAAkB,IAAA;EAClE,IAAIA,UAAU,CAAG,EAAA;IACR,OAAA,CAAA;EAAA;EAIT,IAAIA,SAAS,CAAG,EAAA;IACP,OAAA,CAAA;EAAA;EAOH,MAAAC,aAAA,GAAgBC,IAAK,CAAAC,KAAA,CAAMH,KAAK,CAAA;EAGtC,MAAMI,YAAYH,aAAgB,GAAA,EAAA;EAClC,IAAIG,aAAa,CAAG,EAAA;IAElB,OAAOH,aAAgB,GAAAG,SAAA;EAAA,CACzB,MAAA,IAAWA,aAAa,CAAG,EAAA;IAEzB,OAAOH,gBAAgBG,SAAY,GAAA,CAAA;EAAA,CAC9B,MAAA;IAEL,OAAOH,gBAAgBG,SAAY,GAAA,CAAA;EAAA;AAEvC,CAAA;AASa,MAAAC,yBAAA,GAAyCL,KAAkB,IAAA;EACtE,IAAIA,UAAU,CAAG,EAAA;IACR,OAAA,CAAA;EAAA;EAIT,IAAIA,SAAS,GAAK,EAAA;IACT,OAAA,GAAA;EAAA;EAOF,OAAAM,UAAA,CAAA,CAAYJ,KAAKC,KAAM,CAAAH,KAAA,GAAQ,EAAE,CAAI,GAAA,EAAA,EAAIO,OAAQ,CAAA,CAAC,CAAC,CAAA;AAC5D,CAAA;AASa,MAAAC,0BAAA,GAA0CR,KAAkB,IAAA;EACvE,IAAIA,UAAU,CAAG,EAAA;IACR,OAAA,CAAA;EAAA;EAIT,IAAIA,SAAS,GAAK,EAAA;IACT,OAAA,GAAA;EAAA;EAUF,OAAAM,UAAA,CAAA,CAAYJ,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AAS,CAAA,EACjD,CAACH,SAAAA,CAAAA,SAAS0C,GAAK,EAAA;EAAExC,UAAUyC,UAAAA,CAAAA,GAAK;EAAAxC,MAAA,EAAQ;CAAS,CAAA,EACjD,CAACH,SAAAA,CAAAA,SAAS4C,GAAK,EAAA;EAAE1C,UAAU2C,UAAK,CAAAA,GAAA;EAAA1C,MAAA,EAAQ;AAAS,CAAA,CAAA,CAClD,CAAA;AAeY,MAAA2C,wBAAA,GAAA,mBAA+BC,GAAI,CAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA,CAWlC,CAAA;AAKP,MAAMC,wBAA2B,GAAA;EACtCC,IAAM,EAAA,EAAA;EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAUNC,QAAU,EAAA,CAAA;EACVzD,IAAM,EAAA;EAAA;AACR,CAAA;AAMO,MAAM0D,6BAAgC,GAAA;EAC3CF,IAAM,EAAA,EAAA;EAAA;AAAA;AAAA;AAAA;EAKNC,QAAU,EAAA,CAAA;EACVzD,IAAM,EAAA;EAAA;AACR,CAAA;;;;;;;;;;"}
1
+ {"version":3,"file":"constants.js","sources":["../../../src/utils/money/constants.ts"],"sourcesContent":["import {\n AED,\n BGN,\n BRL,\n CAD,\n CHF,\n CNY,\n CZK,\n DKK,\n EUR,\n GBP,\n HRK,\n HUF,\n INR,\n JPY,\n MXN,\n NOK,\n PHP,\n PLN,\n RON,\n SEK,\n SGD,\n TWD,\n USD,\n ZAR,\n} from \"@dinero.js/currencies\";\nimport { down, halfAwayFromZero, halfUp } from \"dinero.js\";\n\nimport type { StoreId } from \"../../types\";\nimport { Currency } from \"../../types\";\nimport type {\n Cents,\n DinoCurrency,\n LocalizedCurrency,\n RoundingFn,\n} from \"./types\";\n\n// #############################################################################\n// Constants\n// #############################################################################\n\n/**\n * Custom rounding method to be used with dinero.js\n * This rounding method will round to nearest FULL 0/5/9 (and strip cents)\n *\n * @see: https://ubiquiti.atlassian.net/browse/NEP-3846\n */\nexport const roundToNearestFull059: RoundingFn = (input: number) => {\n if (input === 0) {\n return 0;\n }\n\n // Special handling of 0.01-5.00\n if (input <= 5) {\n return 5;\n }\n\n /**\n * Input comes as float, for this rounding we don't need cents, so round\n * to nearest full number\n */\n const roundedNumber = Math.round(input);\n\n // Determine nearest rounding value\n const remainder = roundedNumber % 10;\n if (remainder <= 2) {\n // Round down to nearest 0\n return roundedNumber - remainder;\n } else if (remainder <= 7) {\n // Round to nearest 5\n return roundedNumber - remainder + 5;\n } else {\n // Round up to nearest 9\n return roundedNumber - remainder + 9;\n }\n};\n\nexport const roundToNearestValidUiCarePrice: RoundingFn = (input: number) => {\n if (input === 0) {\n return 0;\n }\n\n // Special handling of 0.01-5.00\n if (input <= 5) {\n return 5;\n }\n\n // Determine nearest rounding value\n const remainder = input % 10;\n if (remainder <= 2) {\n // Round down to nearest 9\n return input - remainder - 1;\n } else if (remainder <= 5) {\n // Round to nearest 5\n return input - remainder + 5;\n } else {\n // Round up to nearest 9\n return input - remainder + 9;\n }\n};\n\n/**\n * Custom rounding method to be used with dinero.js\n * This rounding method will round to\n * nearest decimal cent. e.g. 1.53 = 1.50 / 1.57 = 1.60\n *\n * @see: https://ubiquiti.atlassian.net/browse/NEP-3846\n */\nexport const roundToNearestDecimalCent: RoundingFn = (input: number) => {\n if (input === 0) {\n return 0;\n }\n\n // Special handling of 0.01-0.09\n if (input <= 0.1) {\n return 0.1;\n }\n\n /**\n * Input comes as float, just to be on the safe side use toFixed to mitigate\n * risk of running to floating point precision issues\n */\n return parseFloat((Math.round(input * 10) / 10).toFixed(1));\n};\n\n/**\n * Custom rounding method to be used with dinero.js\n * This rounding method will round to\n * nearest .50 or .00. e.g. 11.22 = 11 / 11.55 = 11.50 / 11.90 = 12\n *\n * @see: https://ubiquiti.atlassian.net/browse/NEP-3846\n */\nexport const roundToNearestHalfUnitCent: RoundingFn = (input: number) => {\n if (input === 0) {\n return 0;\n }\n\n // Special handling of 0.01-0.5\n if (input <= 0.5) {\n return 0.5;\n }\n\n /**\n * Input comes as float, just to be on the safe side use toFixed to mitigate\n * risk of running to floating point precision issues\n *\n * Multiply by 2, round to the nearest integer, then divide by 2 to get the nearest .5 or .0\n * Return with fixed precision to avoid floating-point artifacts\n */\n return parseFloat((Math.round(input * 2) / 2).toFixed(2));\n};\n\nexport const Round = {\n /**\n * !!!!!!!!!!!!!!\n * ! Update 2024\n * ! We ar changing from `halfEven` (bankers rounding) to `halfAwayFromZero` (symmetric rounding) to match Avalara tax\n * @see https://knowledge.avalara.com/bundle/dqa1657870670369_dqa1657870670369/page/Change_how_AvaTax_rounds_the_tax_amount.html\n * @see https://ui.slack.com/archives/C07P7L7S3CP/p1728313196140639\n * !!!!!!!!!!!!!!\n *\n * OLD: halfEven docs\n * ⚠️ Instead of using Math.round, we HAVE to use this method to round the financial numbers everywhere where we CAN'T\n * deal with dinero.js (Dinero.js should be the priority). But often for converting from API requests we have to\n * normalize the values so we use this method.\n *\n * It just a re-export of the dinero.js halfEven (a.k.a bankers rounding) method which is the default rounding method.\n * @see https://github.com/dinerojs/dinero.js/blob/v2.0.0-alpha.8/packages/core/src/round/halfEven.ts\n *\n * Compared to Math.round (arithmetic rounding) it differentiates that it changes the `.5` round up or down behavior\n * based on if the rounded number would be an even number. So 1.5 would round to 2 while 2.5 would round to 2.\n * See the youtube link below for a brief exclamation on why it's important to use this method over regular rounding\n * (half-up):\n * https://youtu.be/yuRdYlZvs1E\n *\n * If you really want to get knee-deep in the rounding subject, you can read the following:\n * https://en.wikipedia.org/wiki/Rounding#Round_half_toward_zero\n */\n Financial: halfAwayFromZero,\n // https://ui.slack.com/archives/C07P7L7S3CP/p1728313196140639\n // TODO: maybe we should have separate rounding functions depending on the input value?\n // Reading from wiki \"Round half toward zero\" is better if the value is already \"normalized to cents\"\n // But the \"Round half to even\" seems better for when working with float like values\n // financialRound = Math.round;\n Shipping: roundToNearestDecimalCent,\n Prettify: down,\n /**\n * ! Disclaimer may not work for \"weird\" currencies as expected\n */\n PrettifyFull059: roundToNearestFull059,\n /**\n * ! Disclaimer may not work for \"weird\" currencies as expected\n */\n PrettifyDecimalCents: roundToNearestDecimalCent,\n /**\n * ! Disclaimer may not work for \"weird\" currencies as expected\n */\n PrettifyHalfUnitCents: roundToNearestHalfUnitCent,\n Subunit: halfUp,\n /**\n * ! Disclaimer may not work for \"weird\" currencies as expected\n * ! For correct rounding UI Care prices, used for auto managed UI Care products.\n */\n ValidUiCarePrice: roundToNearestValidUiCarePrice,\n} satisfies Record<string, RoundingFn>;\n\n/**\n * Mapping of how prices should be rounded down to \"whole numbers\" after certain threshold\n */\nexport const prettifyPriceLookup = new Map([\n [USD.code, 20],\n [AED.code, 50],\n // Approximately every price above ~1.1 usd will be rounded in ZAR\n [ZAR.code, 20],\n [MXN.code, 20],\n]);\n\n/**\n * Map of dinero code to subunit digit count.\n */\nexport const smallestSubunitLookup = new Map<string, [Cents, RoundingFn]>([\n /**\n * TWD does not use subunits at all in day to day transactions.\n */\n [TWD.code, [0, Round.Subunit]],\n]);\n\n/**\n * Precompiled list for faster currency and locale lookups\n */\nexport const localizedCurrencyLookup = new Map<Currency, LocalizedCurrency>([\n [Currency.Aed, { currency: AED, locale: \"ar-AE\" }],\n [Currency.Bgn, { currency: BGN, locale: \"bg-BG\" }],\n [Currency.Cad, { currency: CAD, locale: \"en-CA\" }],\n [Currency.Chf, { currency: CHF, locale: \"it-CH\" }],\n [Currency.Czk, { currency: CZK, locale: \"cs-CZ\" }],\n [Currency.Dkk, { currency: DKK, locale: \"da-DK\" }],\n [Currency.Eur, { currency: EUR, locale: \"de-DE\" }],\n [Currency.Gbp, { currency: GBP, locale: \"en-GB\" }],\n [Currency.Hrk, { currency: HRK, locale: \"hr-HR\" }],\n [Currency.Huf, { currency: HUF, locale: \"hu-HU\" }],\n [Currency.Nok, { currency: NOK, locale: \"no-NO\" }],\n [Currency.Pln, { currency: PLN, locale: \"pl-PL\" }],\n [Currency.Ron, { currency: RON, locale: \"ro-RO\" }],\n [Currency.Sek, { currency: SEK, locale: \"sv-SE\" }],\n [Currency.Usd, { currency: USD, locale: \"en-US\" }],\n [Currency.Zar, { currency: ZAR, locale: \"en-ZA\" }],\n [Currency.Inr, { currency: INR, locale: \"en-IN\" }],\n [Currency.Sgd, { currency: SGD, locale: \"en-SG\" }],\n [Currency.Brl, { currency: BRL, locale: \"pt-BR\" }],\n // NOTE: en-JP Doesn't exist\n [Currency.Jpy, { currency: JPY, locale: \"en-JP\" }],\n // NOTE: en-TW Doesn't exist\n [Currency.Twd, { currency: TWD, locale: \"en-TW\" }],\n [Currency.Mxn, { currency: MXN, locale: \"es-MX\" }],\n [Currency.Php, { currency: PHP, locale: \"en-PH\" }],\n [Currency.Cny, { currency: CNY, locale: \"zh-CN\" }],\n]);\n\n// #############################################################################\n// Tax Rate\n// #############################################################################\n/**\n * List of stores that require calculating per single item qty and then combining them to get the total tax amount for a\n * single line. Rest of the stores inherit default behavior that tax calculated on whole line item\n *\n * ! IMPORTANT: When changing need to sync that store.backend `AVATAX_CUSTOM_COMPANY_CODES` is updated to reflect the change\n *\n * FIXME: as PR for the change as unfinished currently disabled to enable the functionality that calculates tax per single item as requires\n * specific testing both for our custom tax and Avalara stores that use custom company codes. So the groundwork for\n * different tax calculations is there just need to enable on the share side and test if it works\n */\nexport const storesWithPerItemTaxRate = new Set([\n // #############################################################################\n // Stores with custom tax rates\n // #############################################################################\n // StoreId.Br,\n // StoreId.Tw,\n // #############################################################################\n // Stores with Avalara, but will have custom company codes to handle per-item tax rate\n // #############################################################################\n // StoreId.Jp,\n // StoreId.Sg,\n] as StoreId[]);\n\n/**\n * Dinero currency option block for working with tax rates within dinero\n */\nexport const TAX_RATE_DINERO_CURRENCY = {\n base: 10,\n /**\n * We expect the tax rate to be in the range of 0..1\n * 0 --> 0%\n * 1 --> 100%\n * 0.21 --> 21%\n * 0.2169 --> 21.69%\n * 0.12345678 --> 12.345678%\n * !!! Don't change as this value is tied to store.backend DB schema !!!\n */\n exponent: 8,\n code: \"\", // Not important\n} satisfies DinoCurrency;\n\n// #############################################################################\n// Exchange Rate\n// #############################################################################\n\nexport const EXCHANGE_RATE_DINERO_CURRENCY = {\n base: 10,\n /**\n * We support having certain decimal places for exchange rates\n * !!! Don't change as this value is tied to store.backend DB schema !!!\n */\n exponent: 6,\n code: \"\", // Not important\n} satisfies DinoCurrency;\n"],"names":["roundToNearestFull059","input","roundedNumber","Math","round","remainder","roundToNearestValidUiCarePrice","roundToNearestDecimalCent","parseFloat","toFixed","roundToNearestHalfUnitCent","Round","Financial","halfAwayFromZero","Shipping","Prettify","down","PrettifyFull059","PrettifyDecimalCents","PrettifyHalfUnitCents","Subunit","halfUp","ValidUiCarePrice","prettifyPriceLookup","Map","USD","code","AED","ZAR","MXN","smallestSubunitLookup","TWD","localizedCurrencyLookup","Currency","Aed","currency","locale","Bgn","BGN","Cad","CAD","Chf","CHF","Czk","CZK","Dkk","DKK","Eur","EUR","Gbp","GBP","Hrk","HRK","Huf","HUF","Nok","NOK","Pln","PLN","Ron","RON","Sek","SEK","Usd","Zar","Inr","INR","Sgd","SGD","Brl","BRL","Jpy","JPY","Twd","Mxn","Php","PHP","Cny","CNY","storesWithPerItemTaxRate","Set","TAX_RATE_DINERO_CURRENCY","base","exponent","EXCHANGE_RATE_DINERO_CURRENCY"],"mappings":";;;;;;;AA+Ca,MAAAA,qBAAA,GAAqCC,KAAkB,IAAA;EAClE,IAAIA,UAAU,CAAG,EAAA;IACR,OAAA,CAAA;EAAA;EAIT,IAAIA,SAAS,CAAG,EAAA;IACP,OAAA,CAAA;EAAA;EAOH,MAAAC,aAAA,GAAgBC,IAAK,CAAAC,KAAA,CAAMH,KAAK,CAAA;EAGtC,MAAMI,YAAYH,aAAgB,GAAA,EAAA;EAClC,IAAIG,aAAa,CAAG,EAAA;IAElB,OAAOH,aAAgB,GAAAG,SAAA;EAAA,CACzB,MAAA,IAAWA,aAAa,CAAG,EAAA;IAEzB,OAAOH,gBAAgB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AAE1C,UAAU2C,UAAK,CAAAA,GAAA;EAAA1C,MAAA,EAAQ;AAAS,CAAA,CAAA,CAClD,CAAA;AAeY,MAAA2C,wBAAA,GAAA,mBAA+BC,GAAI,CAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA,CAWlC,CAAA;AAKP,MAAMC,wBAA2B,GAAA;EACtCC,IAAM,EAAA,EAAA;EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAUNC,QAAU,EAAA,CAAA;EACVzD,IAAM,EAAA;EAAA;AACR,CAAA;AAMO,MAAM0D,6BAAgC,GAAA;EAC3CF,IAAM,EAAA,EAAA;EAAA;AAAA;AAAA;AAAA;EAKNC,QAAU,EAAA,CAAA;EACVzD,IAAM,EAAA;EAAA;AACR,CAAA;;;;;;;;;;;"}
@@ -20,6 +20,22 @@ const roundToNearestFull059 = input => {
20
20
  return roundedNumber - remainder + 9;
21
21
  }
22
22
  };
23
+ const roundToNearestValidUiCarePrice = input => {
24
+ if (input === 0) {
25
+ return 0;
26
+ }
27
+ if (input <= 5) {
28
+ return 5;
29
+ }
30
+ const remainder = input % 10;
31
+ if (remainder <= 2) {
32
+ return input - remainder - 1;
33
+ } else if (remainder <= 5) {
34
+ return input - remainder + 5;
35
+ } else {
36
+ return input - remainder + 9;
37
+ }
38
+ };
23
39
  const roundToNearestDecimalCent = input => {
24
40
  if (input === 0) {
25
41
  return 0;
@@ -84,7 +100,12 @@ const Round = {
84
100
  * ! Disclaimer may not work for "weird" currencies as expected
85
101
  */
86
102
  PrettifyHalfUnitCents: roundToNearestHalfUnitCent,
87
- Subunit: halfUp
103
+ Subunit: halfUp,
104
+ /**
105
+ * ! Disclaimer may not work for "weird" currencies as expected
106
+ * ! For correct rounding UI Care prices, used for auto managed UI Care products.
107
+ */
108
+ ValidUiCarePrice: roundToNearestValidUiCarePrice
88
109
  };
89
110
  const prettifyPriceLookup = /* @__PURE__ */new Map([[USD.code, 20], [AED.code, 50],
90
111
  // Approximately every price above ~1.1 usd will be rounded in ZAR
@@ -208,5 +229,5 @@ const EXCHANGE_RATE_DINERO_CURRENCY = {
208
229
  code: ""
209
230
  // Not important
210
231
  };
211
- export { EXCHANGE_RATE_DINERO_CURRENCY, Round, TAX_RATE_DINERO_CURRENCY, localizedCurrencyLookup, prettifyPriceLookup, roundToNearestDecimalCent, roundToNearestFull059, roundToNearestHalfUnitCent, smallestSubunitLookup, storesWithPerItemTaxRate };
232
+ export { EXCHANGE_RATE_DINERO_CURRENCY, Round, TAX_RATE_DINERO_CURRENCY, localizedCurrencyLookup, prettifyPriceLookup, roundToNearestDecimalCent, roundToNearestFull059, roundToNearestHalfUnitCent, roundToNearestValidUiCarePrice, smallestSubunitLookup, storesWithPerItemTaxRate };
212
233
  //# sourceMappingURL=constants.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.mjs","sources":["../../../src/utils/money/constants.ts"],"sourcesContent":["import {\n AED,\n BGN,\n BRL,\n CAD,\n CHF,\n CNY,\n CZK,\n DKK,\n EUR,\n GBP,\n HRK,\n HUF,\n INR,\n JPY,\n MXN,\n NOK,\n PHP,\n PLN,\n RON,\n SEK,\n SGD,\n TWD,\n USD,\n ZAR,\n} from \"@dinero.js/currencies\";\nimport { down, halfAwayFromZero, halfUp } from \"dinero.js\";\n\nimport type { StoreId } from \"../../types\";\nimport { Currency } from \"../../types\";\nimport type {\n Cents,\n DinoCurrency,\n LocalizedCurrency,\n RoundingFn,\n} from \"./types\";\n\n// #############################################################################\n// Constants\n// #############################################################################\n\n/**\n * Custom rounding method to be used with dinero.js\n * This rounding method will round to nearest FULL 0/5/9 (and strip cents)\n *\n * @see: https://ubiquiti.atlassian.net/browse/NEP-3846\n */\nexport const roundToNearestFull059: RoundingFn = (input: number) => {\n if (input === 0) {\n return 0;\n }\n\n // Special handling of 0.01-5.00\n if (input <= 5) {\n return 5;\n }\n\n /**\n * Input comes as float, for this rounding we don't need cents, so round\n * to nearest full number\n */\n const roundedNumber = Math.round(input);\n\n // Determine nearest rounding value\n const remainder = roundedNumber % 10;\n if (remainder <= 2) {\n // Round down to nearest 0\n return roundedNumber - remainder;\n } else if (remainder <= 7) {\n // Round to nearest 5\n return roundedNumber - remainder + 5;\n } else {\n // Round up to nearest 9\n return roundedNumber - remainder + 9;\n }\n};\n\n/**\n * Custom rounding method to be used with dinero.js\n * This rounding method will round to\n * nearest decimal cent. e.g. 1.53 = 1.50 / 1.57 = 1.60\n *\n * @see: https://ubiquiti.atlassian.net/browse/NEP-3846\n */\nexport const roundToNearestDecimalCent: RoundingFn = (input: number) => {\n if (input === 0) {\n return 0;\n }\n\n // Special handling of 0.01-0.09\n if (input <= 0.1) {\n return 0.1;\n }\n\n /**\n * Input comes as float, just to be on the safe side use toFixed to mitigate\n * risk of running to floating point precision issues\n */\n return parseFloat((Math.round(input * 10) / 10).toFixed(1));\n};\n\n/**\n * Custom rounding method to be used with dinero.js\n * This rounding method will round to\n * nearest .50 or .00. e.g. 11.22 = 11 / 11.55 = 11.50 / 11.90 = 12\n *\n * @see: https://ubiquiti.atlassian.net/browse/NEP-3846\n */\nexport const roundToNearestHalfUnitCent: RoundingFn = (input: number) => {\n if (input === 0) {\n return 0;\n }\n\n // Special handling of 0.01-0.5\n if (input <= 0.5) {\n return 0.5;\n }\n\n /**\n * Input comes as float, just to be on the safe side use toFixed to mitigate\n * risk of running to floating point precision issues\n *\n * Multiply by 2, round to the nearest integer, then divide by 2 to get the nearest .5 or .0\n * Return with fixed precision to avoid floating-point artifacts\n */\n return parseFloat((Math.round(input * 2) / 2).toFixed(2));\n};\n\nexport const Round = {\n /**\n * !!!!!!!!!!!!!!\n * ! Update 2024\n * ! We ar changing from `halfEven` (bankers rounding) to `halfAwayFromZero` (symmetric rounding) to match Avalara tax\n * @see https://knowledge.avalara.com/bundle/dqa1657870670369_dqa1657870670369/page/Change_how_AvaTax_rounds_the_tax_amount.html\n * @see https://ui.slack.com/archives/C07P7L7S3CP/p1728313196140639\n * !!!!!!!!!!!!!!\n *\n * OLD: halfEven docs\n * ⚠️ Instead of using Math.round, we HAVE to use this method to round the financial numbers everywhere where we CAN'T\n * deal with dinero.js (Dinero.js should be the priority). But often for converting from API requests we have to\n * normalize the values so we use this method.\n *\n * It just a re-export of the dinero.js halfEven (a.k.a bankers rounding) method which is the default rounding method.\n * @see https://github.com/dinerojs/dinero.js/blob/v2.0.0-alpha.8/packages/core/src/round/halfEven.ts\n *\n * Compared to Math.round (arithmetic rounding) it differentiates that it changes the `.5` round up or down behavior\n * based on if the rounded number would be an even number. So 1.5 would round to 2 while 2.5 would round to 2.\n * See the youtube link below for a brief exclamation on why it's important to use this method over regular rounding\n * (half-up):\n * https://youtu.be/yuRdYlZvs1E\n *\n * If you really want to get knee-deep in the rounding subject, you can read the following:\n * https://en.wikipedia.org/wiki/Rounding#Round_half_toward_zero\n */\n Financial: halfAwayFromZero,\n // https://ui.slack.com/archives/C07P7L7S3CP/p1728313196140639\n // TODO: maybe we should have separate rounding functions depending on the input value?\n // Reading from wiki \"Round half toward zero\" is better if the value is already \"normalized to cents\"\n // But the \"Round half to even\" seems better for when working with float like values\n // financialRound = Math.round;\n Shipping: roundToNearestDecimalCent,\n Prettify: down,\n /**\n * ! Disclaimer may not work for \"weird\" currencies as expected\n */\n PrettifyFull059: roundToNearestFull059,\n /**\n * ! Disclaimer may not work for \"weird\" currencies as expected\n */\n PrettifyDecimalCents: roundToNearestDecimalCent,\n /**\n * ! Disclaimer may not work for \"weird\" currencies as expected\n */\n PrettifyHalfUnitCents: roundToNearestHalfUnitCent,\n Subunit: halfUp,\n} satisfies Record<string, RoundingFn>;\n\n/**\n * Mapping of how prices should be rounded down to \"whole numbers\" after certain threshold\n */\nexport const prettifyPriceLookup = new Map([\n [USD.code, 20],\n [AED.code, 50],\n // Approximately every price above ~1.1 usd will be rounded in ZAR\n [ZAR.code, 20],\n [MXN.code, 20],\n]);\n\n/**\n * Map of dinero code to subunit digit count.\n */\nexport const smallestSubunitLookup = new Map<string, [Cents, RoundingFn]>([\n /**\n * TWD does not use subunits at all in day to day transactions.\n */\n [TWD.code, [0, Round.Subunit]],\n]);\n\n/**\n * Precompiled list for faster currency and locale lookups\n */\nexport const localizedCurrencyLookup = new Map<Currency, LocalizedCurrency>([\n [Currency.Aed, { currency: AED, locale: \"ar-AE\" }],\n [Currency.Bgn, { currency: BGN, locale: \"bg-BG\" }],\n [Currency.Cad, { currency: CAD, locale: \"en-CA\" }],\n [Currency.Chf, { currency: CHF, locale: \"it-CH\" }],\n [Currency.Czk, { currency: CZK, locale: \"cs-CZ\" }],\n [Currency.Dkk, { currency: DKK, locale: \"da-DK\" }],\n [Currency.Eur, { currency: EUR, locale: \"de-DE\" }],\n [Currency.Gbp, { currency: GBP, locale: \"en-GB\" }],\n [Currency.Hrk, { currency: HRK, locale: \"hr-HR\" }],\n [Currency.Huf, { currency: HUF, locale: \"hu-HU\" }],\n [Currency.Nok, { currency: NOK, locale: \"no-NO\" }],\n [Currency.Pln, { currency: PLN, locale: \"pl-PL\" }],\n [Currency.Ron, { currency: RON, locale: \"ro-RO\" }],\n [Currency.Sek, { currency: SEK, locale: \"sv-SE\" }],\n [Currency.Usd, { currency: USD, locale: \"en-US\" }],\n [Currency.Zar, { currency: ZAR, locale: \"en-ZA\" }],\n [Currency.Inr, { currency: INR, locale: \"en-IN\" }],\n [Currency.Sgd, { currency: SGD, locale: \"en-SG\" }],\n [Currency.Brl, { currency: BRL, locale: \"pt-BR\" }],\n // NOTE: en-JP Doesn't exist\n [Currency.Jpy, { currency: JPY, locale: \"en-JP\" }],\n // NOTE: en-TW Doesn't exist\n [Currency.Twd, { currency: TWD, locale: \"en-TW\" }],\n [Currency.Mxn, { currency: MXN, locale: \"es-MX\" }],\n [Currency.Php, { currency: PHP, locale: \"en-PH\" }],\n [Currency.Cny, { currency: CNY, locale: \"zh-CN\" }],\n]);\n\n// #############################################################################\n// Tax Rate\n// #############################################################################\n/**\n * List of stores that require calculating per single item qty and then combining them to get the total tax amount for a\n * single line. Rest of the stores inherit default behavior that tax calculated on whole line item\n *\n * ! IMPORTANT: When changing need to sync that store.backend `AVATAX_CUSTOM_COMPANY_CODES` is updated to reflect the change\n *\n * FIXME: as PR for the change as unfinished currently disabled to enable the functionality that calculates tax per single item as requires\n * specific testing both for our custom tax and Avalara stores that use custom company codes. So the groundwork for\n * different tax calculations is there just need to enable on the share side and test if it works\n */\nexport const storesWithPerItemTaxRate = new Set([\n // #############################################################################\n // Stores with custom tax rates\n // #############################################################################\n // StoreId.Br,\n // StoreId.Tw,\n // #############################################################################\n // Stores with Avalara, but will have custom company codes to handle per-item tax rate\n // #############################################################################\n // StoreId.Jp,\n // StoreId.Sg,\n] as StoreId[]);\n\n/**\n * Dinero currency option block for working with tax rates within dinero\n */\nexport const TAX_RATE_DINERO_CURRENCY = {\n base: 10,\n /**\n * We expect the tax rate to be in the range of 0..1\n * 0 --> 0%\n * 1 --> 100%\n * 0.21 --> 21%\n * 0.2169 --> 21.69%\n * 0.12345678 --> 12.345678%\n * !!! Don't change as this value is tied to store.backend DB schema !!!\n */\n exponent: 8,\n code: \"\", // Not important\n} satisfies DinoCurrency;\n\n// #############################################################################\n// Exchange Rate\n// #############################################################################\n\nexport const EXCHANGE_RATE_DINERO_CURRENCY = {\n base: 10,\n /**\n * We support having certain decimal places for exchange rates\n * !!! Don't change as this value is tied to store.backend DB schema !!!\n */\n exponent: 6,\n code: \"\", // Not important\n} satisfies DinoCurrency;\n"],"names":["roundToNearestFull059","input","roundedNumber","Math","round","remainder","roundToNearestDecimalCent","parseFloat","toFixed","roundToNearestHalfUnitCent","Round","Financial","halfAwayFromZero","Shipping","Prettify","down","PrettifyFull059","PrettifyDecimalCents","PrettifyHalfUnitCents","Subunit","halfUp","prettifyPriceLookup","Map","USD","code","AED","ZAR","MXN","smallestSubunitLookup","TWD","localizedCurrencyLookup","Currency","Aed","currency","locale","Bgn","BGN","Cad","CAD","Chf","CHF","Czk","CZK","Dkk","DKK","Eur","EUR","Gbp","GBP","Hrk","HRK","Huf","HUF","Nok","NOK","Pln","PLN","Ron","RON","Sek","SEK","Usd","Zar","Inr","INR","Sgd","SGD","Brl","BRL","Jpy","JPY","Twd","Mxn","Php","PHP","Cny","CNY","storesWithPerItemTaxRate","Set","TAX_RATE_DINERO_CURRENCY","base","exponent","EXCHANGE_RATE_DINERO_CURRENCY"],"mappings":";;;;;AA+Ca,MAAAA,qBAAA,GAAqCC,KAAkB,IAAA;EAClE,IAAIA,UAAU,CAAG,EAAA;IACR,OAAA,CAAA;EAAA;EAIT,IAAIA,SAAS,CAAG,EAAA;IACP,OAAA,CAAA;EAAA;EAOH,MAAAC,aAAA,GAAgBC,IAAK,CAAAC,KAAA,CAAMH,KAAK,CAAA;EAGtC,MAAMI,YAAYH,aAAgB,GAAA,EAAA;EAClC,IAAIG,aAAa,CAAG,EAAA;IAElB,OAAOH,aAAgB,GAAAG,SAAA;EAAA,CACzB,MAAA,IAAWA,aAAa,CAAG,EAAA;IAEzB,OAAOH,gBAAgBG,SAAY,GAAA,CAAA;EAAA,CAC9B,MAAA;IAEL,OAAOH,gBAAgBG,SAAY,GAAA,CAAA;EAAA;AAEvC,CAAA;AASa,MAAAC,yBAAA,GAAyCL,KAAkB,IAAA;EACtE,IAAIA,UAAU,CAAG,EAAA;IACR,OAAA,CAAA;EAAA;EAIT,IAAIA,SAAS,GAAK,EAAA;IACT,OAAA,GAAA;EAAA;EAOF,OAAAM,UAAA,CAAA,CAAYJ,KAAKC,KAAM,CAAAH,KAAA,GAAQ,EAAE,CAAI,GAAA,EAAA,EAAIO,OAAQ,CAAA,CAAC,CAAC,CAAA;AAC5D,CAAA;AASa,MAAAC,0BAAA,GAA0CR,KAAkB,IAAA;EACvE,IAAIA,UAAU,CAAG,EAAA;IACR,OAAA,CAAA;EAAA;EAIT,IAAIA,SAAS,GAAK,EAAA;IACT,OAAA,GAAA;EAAA;EAUF,OAAAM,UAAA,CAAA,CAAYJ,KAAKC,KAAM,CAAAH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DKK,\n EUR,\n GBP,\n HRK,\n HUF,\n INR,\n JPY,\n MXN,\n NOK,\n PHP,\n PLN,\n RON,\n SEK,\n SGD,\n TWD,\n USD,\n ZAR,\n} from \"@dinero.js/currencies\";\nimport { down, halfAwayFromZero, halfUp } from \"dinero.js\";\n\nimport type { StoreId } from \"../../types\";\nimport { Currency } from \"../../types\";\nimport type {\n Cents,\n DinoCurrency,\n LocalizedCurrency,\n RoundingFn,\n} from \"./types\";\n\n// #############################################################################\n// Constants\n// #############################################################################\n\n/**\n * Custom rounding method to be used with dinero.js\n * This rounding method will round to nearest FULL 0/5/9 (and strip cents)\n *\n * @see: https://ubiquiti.atlassian.net/browse/NEP-3846\n */\nexport const roundToNearestFull059: RoundingFn = (input: number) => {\n if (input === 0) {\n return 0;\n }\n\n // Special handling of 0.01-5.00\n if (input <= 5) {\n return 5;\n }\n\n /**\n * Input comes as float, for this rounding we don't need cents, so round\n * to nearest full number\n */\n const roundedNumber = Math.round(input);\n\n // Determine nearest rounding value\n const remainder = roundedNumber % 10;\n if (remainder <= 2) {\n // Round down to nearest 0\n return roundedNumber - remainder;\n } else if (remainder <= 7) {\n // Round to nearest 5\n return roundedNumber - remainder + 5;\n } else {\n // Round up to nearest 9\n return roundedNumber - remainder + 9;\n }\n};\n\nexport const roundToNearestValidUiCarePrice: RoundingFn = (input: number) => {\n if (input === 0) {\n return 0;\n }\n\n // Special handling of 0.01-5.00\n if (input <= 5) {\n return 5;\n }\n\n // Determine nearest rounding value\n const remainder = input % 10;\n if (remainder <= 2) {\n // Round down to nearest 9\n return input - remainder - 1;\n } else if (remainder <= 5) {\n // Round to nearest 5\n return input - remainder + 5;\n } else {\n // Round up to nearest 9\n return input - remainder + 9;\n }\n};\n\n/**\n * Custom rounding method to be used with dinero.js\n * This rounding method will round to\n * nearest decimal cent. e.g. 1.53 = 1.50 / 1.57 = 1.60\n *\n * @see: https://ubiquiti.atlassian.net/browse/NEP-3846\n */\nexport const roundToNearestDecimalCent: RoundingFn = (input: number) => {\n if (input === 0) {\n return 0;\n }\n\n // Special handling of 0.01-0.09\n if (input <= 0.1) {\n return 0.1;\n }\n\n /**\n * Input comes as float, just to be on the safe side use toFixed to mitigate\n * risk of running to floating point precision issues\n */\n return parseFloat((Math.round(input * 10) / 10).toFixed(1));\n};\n\n/**\n * Custom rounding method to be used with dinero.js\n * This rounding method will round to\n * nearest .50 or .00. e.g. 11.22 = 11 / 11.55 = 11.50 / 11.90 = 12\n *\n * @see: https://ubiquiti.atlassian.net/browse/NEP-3846\n */\nexport const roundToNearestHalfUnitCent: RoundingFn = (input: number) => {\n if (input === 0) {\n return 0;\n }\n\n // Special handling of 0.01-0.5\n if (input <= 0.5) {\n return 0.5;\n }\n\n /**\n * Input comes as float, just to be on the safe side use toFixed to mitigate\n * risk of running to floating point precision issues\n *\n * Multiply by 2, round to the nearest integer, then divide by 2 to get the nearest .5 or .0\n * Return with fixed precision to avoid floating-point artifacts\n */\n return parseFloat((Math.round(input * 2) / 2).toFixed(2));\n};\n\nexport const Round = {\n /**\n * !!!!!!!!!!!!!!\n * ! Update 2024\n * ! We ar changing from `halfEven` (bankers rounding) to `halfAwayFromZero` (symmetric rounding) to match Avalara tax\n * @see https://knowledge.avalara.com/bundle/dqa1657870670369_dqa1657870670369/page/Change_how_AvaTax_rounds_the_tax_amount.html\n * @see https://ui.slack.com/archives/C07P7L7S3CP/p1728313196140639\n * !!!!!!!!!!!!!!\n *\n * OLD: halfEven docs\n * ⚠️ Instead of using Math.round, we HAVE to use this method to round the financial numbers everywhere where we CAN'T\n * deal with dinero.js (Dinero.js should be the priority). But often for converting from API requests we have to\n * normalize the values so we use this method.\n *\n * It just a re-export of the dinero.js halfEven (a.k.a bankers rounding) method which is the default rounding method.\n * @see https://github.com/dinerojs/dinero.js/blob/v2.0.0-alpha.8/packages/core/src/round/halfEven.ts\n *\n * Compared to Math.round (arithmetic rounding) it differentiates that it changes the `.5` round up or down behavior\n * based on if the rounded number would be an even number. So 1.5 would round to 2 while 2.5 would round to 2.\n * See the youtube link below for a brief exclamation on why it's important to use this method over regular rounding\n * (half-up):\n * https://youtu.be/yuRdYlZvs1E\n *\n * If you really want to get knee-deep in the rounding subject, you can read the following:\n * https://en.wikipedia.org/wiki/Rounding#Round_half_toward_zero\n */\n Financial: halfAwayFromZero,\n // https://ui.slack.com/archives/C07P7L7S3CP/p1728313196140639\n // TODO: maybe we should have separate rounding functions depending on the input value?\n // Reading from wiki \"Round half toward zero\" is better if the value is already \"normalized to cents\"\n // But the \"Round half to even\" seems better for when working with float like values\n // financialRound = Math.round;\n Shipping: roundToNearestDecimalCent,\n Prettify: down,\n /**\n * ! Disclaimer may not work for \"weird\" currencies as expected\n */\n PrettifyFull059: roundToNearestFull059,\n /**\n * ! Disclaimer may not work for \"weird\" currencies as expected\n */\n PrettifyDecimalCents: roundToNearestDecimalCent,\n /**\n * ! Disclaimer may not work for \"weird\" currencies as expected\n */\n PrettifyHalfUnitCents: roundToNearestHalfUnitCent,\n Subunit: halfUp,\n /**\n * ! Disclaimer may not work for \"weird\" currencies as expected\n * ! For correct rounding UI Care prices, used for auto managed UI Care products.\n */\n ValidUiCarePrice: roundToNearestValidUiCarePrice,\n} satisfies Record<string, RoundingFn>;\n\n/**\n * Mapping of how prices should be rounded down to \"whole numbers\" after certain threshold\n */\nexport const prettifyPriceLookup = new Map([\n [USD.code, 20],\n [AED.code, 50],\n // Approximately every price above ~1.1 usd will be rounded in ZAR\n [ZAR.code, 20],\n [MXN.code, 20],\n]);\n\n/**\n * Map of dinero code to subunit digit count.\n */\nexport const smallestSubunitLookup = new Map<string, [Cents, RoundingFn]>([\n /**\n * TWD does not use subunits at all in day to day transactions.\n */\n [TWD.code, [0, Round.Subunit]],\n]);\n\n/**\n * Precompiled list for faster currency and locale lookups\n */\nexport const localizedCurrencyLookup = new Map<Currency, LocalizedCurrency>([\n [Currency.Aed, { currency: AED, locale: \"ar-AE\" }],\n [Currency.Bgn, { currency: BGN, locale: \"bg-BG\" }],\n [Currency.Cad, { currency: CAD, locale: \"en-CA\" }],\n [Currency.Chf, { currency: CHF, locale: \"it-CH\" }],\n [Currency.Czk, { currency: CZK, locale: \"cs-CZ\" }],\n [Currency.Dkk, { currency: DKK, locale: \"da-DK\" }],\n [Currency.Eur, { currency: EUR, locale: \"de-DE\" }],\n [Currency.Gbp, { currency: GBP, locale: \"en-GB\" }],\n [Currency.Hrk, { currency: HRK, locale: \"hr-HR\" }],\n [Currency.Huf, { currency: HUF, locale: \"hu-HU\" }],\n [Currency.Nok, { currency: NOK, locale: \"no-NO\" }],\n [Currency.Pln, { currency: PLN, locale: \"pl-PL\" }],\n [Currency.Ron, { currency: RON, locale: \"ro-RO\" }],\n [Currency.Sek, { currency: SEK, locale: \"sv-SE\" }],\n [Currency.Usd, { currency: USD, locale: \"en-US\" }],\n [Currency.Zar, { currency: ZAR, locale: \"en-ZA\" }],\n [Currency.Inr, { currency: INR, locale: \"en-IN\" }],\n [Currency.Sgd, { currency: SGD, locale: \"en-SG\" }],\n [Currency.Brl, { currency: BRL, locale: \"pt-BR\" }],\n // NOTE: en-JP Doesn't exist\n [Currency.Jpy, { currency: JPY, locale: \"en-JP\" }],\n // NOTE: en-TW Doesn't exist\n [Currency.Twd, { currency: TWD, locale: \"en-TW\" }],\n [Currency.Mxn, { currency: MXN, locale: \"es-MX\" }],\n [Currency.Php, { currency: PHP, locale: \"en-PH\" }],\n [Currency.Cny, { currency: CNY, locale: \"zh-CN\" }],\n]);\n\n// #############################################################################\n// Tax Rate\n// #############################################################################\n/**\n * List of stores that require calculating per single item qty and then combining them to get the total tax amount for a\n * single line. Rest of the stores inherit default behavior that tax calculated on whole line item\n *\n * ! IMPORTANT: When changing need to sync that store.backend `AVATAX_CUSTOM_COMPANY_CODES` is updated to reflect the change\n *\n * FIXME: as PR for the change as unfinished currently disabled to enable the functionality that calculates tax per single item as requires\n * specific testing both for our custom tax and Avalara stores that use custom company codes. So the groundwork for\n * different tax calculations is there just need to enable on the share side and test if it works\n */\nexport const storesWithPerItemTaxRate = new Set([\n // #############################################################################\n // Stores with custom tax rates\n // #############################################################################\n // StoreId.Br,\n // StoreId.Tw,\n // #############################################################################\n // Stores with Avalara, but will have custom company codes to handle per-item tax rate\n // #############################################################################\n // StoreId.Jp,\n // StoreId.Sg,\n] as StoreId[]);\n\n/**\n * Dinero currency option block for working with tax rates within dinero\n */\nexport const TAX_RATE_DINERO_CURRENCY = {\n base: 10,\n /**\n * We expect the tax rate to be in the range of 0..1\n * 0 --> 0%\n * 1 --> 100%\n * 0.21 --> 21%\n * 0.2169 --> 21.69%\n * 0.12345678 --> 12.345678%\n * !!! Don't change as this value is tied to store.backend DB schema !!!\n */\n exponent: 8,\n code: \"\", // Not important\n} satisfies DinoCurrency;\n\n// #############################################################################\n// Exchange Rate\n// #############################################################################\n\nexport const EXCHANGE_RATE_DINERO_CURRENCY = {\n base: 10,\n /**\n * We support having certain decimal places for exchange rates\n * !!! Don't change as this value is tied to store.backend DB schema !!!\n */\n exponent: 6,\n code: \"\", // Not important\n} satisfies DinoCurrency;\n"],"names":["roundToNearestFull059","input","roundedNumber","Math","round","remainder","roundToNearestValidUiCarePrice","roundToNearestDecimalCent","parseFloat","toFixed","roundToNearestHalfUnitCent","Round","Financial","halfAwayFromZero","Shipping","Prettify","down","PrettifyFull059","PrettifyDecimalCents","PrettifyHalfUnitCents","Subunit","halfUp","ValidUiCarePrice","prettifyPriceLookup","Map","USD","code","AED","ZAR","MXN","smallestSubunitLookup","TWD","localizedCurrencyLookup","Currency","Aed","currency","locale","Bgn","BGN","Cad","CAD","Chf","CHF","Czk","CZK","Dkk","DKK","Eur","EUR","Gbp","GBP","Hrk","HRK","Huf","HUF","Nok","NOK","Pln","PLN","Ron","RON","Sek","SEK","Usd","Zar","Inr","INR","Sgd","SGD","Brl","BRL","Jpy","JPY","Twd","Mxn","Php","PHP","Cny","CNY","storesWithPerItemTaxRate","Set","TAX_RATE_DINERO_CURRENCY","base","exponent","EXCHANGE_RATE_DINERO_CURRENCY"],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,6BAAgC,GAAA;EAC3CF,IAAM,EAAA,EAAA;EAAA;AAAA;AAAA;AAAA;EAKNC,QAAU,EAAA,CAAA;EACVzD,IAAM,EAAA;EAAA;AACR,CAAA;"}
@@ -20,6 +20,7 @@ exports.prettifyPriceLookup = constants.prettifyPriceLookup;
20
20
  exports.roundToNearestDecimalCent = constants.roundToNearestDecimalCent;
21
21
  exports.roundToNearestFull059 = constants.roundToNearestFull059;
22
22
  exports.roundToNearestHalfUnitCent = constants.roundToNearestHalfUnitCent;
23
+ exports.roundToNearestValidUiCarePrice = constants.roundToNearestValidUiCarePrice;
23
24
  exports.smallestSubunitLookup = constants.smallestSubunitLookup;
24
25
  exports.storesWithPerItemTaxRate = constants.storesWithPerItemTaxRate;
25
26
  exports.invertExchangeRate = exchangeRate.invertExchangeRate;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  export { FixedAmountAllocator } from './allocators/fixedAmount.mjs';
2
2
  export { ProductAmountAllocator } from './allocators/productAmount.mjs';
3
- export { EXCHANGE_RATE_DINERO_CURRENCY, Round, TAX_RATE_DINERO_CURRENCY, localizedCurrencyLookup, prettifyPriceLookup, roundToNearestDecimalCent, roundToNearestFull059, roundToNearestHalfUnitCent, smallestSubunitLookup, storesWithPerItemTaxRate } from './constants.mjs';
3
+ export { EXCHANGE_RATE_DINERO_CURRENCY, Round, TAX_RATE_DINERO_CURRENCY, localizedCurrencyLookup, prettifyPriceLookup, roundToNearestDecimalCent, roundToNearestFull059, roundToNearestHalfUnitCent, roundToNearestValidUiCarePrice, smallestSubunitLookup, storesWithPerItemTaxRate } from './constants.mjs';
4
4
  export { invertExchangeRate, toFixedExchangeRate, toSnapshotExchangeRate } from './exchangeRate.mjs';
5
5
  export { formatPrice, formatPriceRaw, getLocalizedCurrency, prettifyTotal } from './format.mjs';
6
6
  export { addMany, amount, centsToCurrencyUnit, currency, dineroToCurrencyUnit, getDinero, getDineroCurrency, money, multiplyByFullPercent, parseCurrencyCode, parseFloatToDinero, parseFloatToDineroRaw, roundDinero, stringAmountToDinero, subtractMany, toSmallestSubunit } from './misc.mjs';
@@ -6,6 +6,26 @@ Object.defineProperty(exports, '__esModule', {
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var imageComponent = require('next/dist/client/image-component');
8
8
  var imageLoader = require('./image-loader.js');
9
+ function _interopNamespace(e) {
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () {
19
+ return e[k];
20
+ }
21
+ });
22
+ }
23
+ });
24
+ }
25
+ n["default"] = e;
26
+ return Object.freeze(n);
27
+ }
28
+ var imageComponent__namespace = /*#__PURE__*/_interopNamespace(imageComponent);
9
29
  "use strict";
10
30
  const CustomImage = props => {
11
31
  return /* @__PURE__ */jsxRuntime.jsx(imageComponent.Image, {
@@ -1 +1 @@
1
- {"version":3,"file":"image.js","sources":["../../../../src/utils/nextjs/legacy-image-loader/image.tsx"],"sourcesContent":["import { Image } from \"next/dist/client/image-component\";\nimport type { ComponentProps, FC } from \"react\";\n\nimport { imageLoader } from \"./image-loader\";\n\ntype ImageProps = ComponentProps<typeof Image>;\n\nconst CustomImage: FC<ImageProps> = (props) => {\n return <Image {...props} loader={props.loader ?? imageLoader.loader} />;\n};\n\nexport * from \"next/dist/client/image-component\";\nexport default CustomImage;\n"],"names":["CustomImage","props","jsx","Image","loader","imageLoader"],"mappings":";;;;;;;;;AAOM,MAAAA,WAAA,GAA+BC,KAAU,IAAA;EACtC,sBAAAC,UAAA,CAAAA,GAAA,CAACC;IAAO,GAAGF,KAAA;IAAOG,QAAQH,KAAM,CAAAG,MAAA,IAAUC,wBAAYD;GAAQ,CAAA;AACvE,CAAA;;;;;;;;;"}
1
+ {"version":3,"file":"image.js","sources":["../../../../src/utils/nextjs/legacy-image-loader/image.tsx"],"sourcesContent":["import { Image } from \"next/dist/client/image-component\";\nimport type { ComponentProps, FC } from \"react\";\n\nimport { imageLoader } from \"./image-loader\";\n\ntype ImageProps = ComponentProps<typeof Image>;\n\nconst CustomImage: FC<ImageProps> = (props) => {\n return <Image {...props} loader={props.loader ?? imageLoader.loader} />;\n};\n\nexport * from \"next/dist/client/image-component\";\nexport default CustomImage;\n"],"names":["CustomImage","props","jsx","Image","loader","imageLoader"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOM,MAAAA,WAAA,GAA+BC,KAAU,IAAA;EACtC,sBAAAC,UAAA,CAAAA,GAAA,CAACC;IAAO,GAAGF,KAAA;IAAOG,QAAQH,KAAM,CAAAG,MAAA,IAAUC,wBAAYD;GAAQ,CAAA;AACvE,CAAA;;;;;;;;;"}
@@ -1,4 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
+ import * as imageComponent from 'next/dist/client/image-component';
2
3
  import { Image } from 'next/dist/client/image-component';
3
4
  export * from 'next/dist/client/image-component';
4
5
  import { imageLoader } from './image-loader.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"image.mjs","sources":["../../../../src/utils/nextjs/legacy-image-loader/image.tsx"],"sourcesContent":["import { Image } from \"next/dist/client/image-component\";\nimport type { ComponentProps, FC } from \"react\";\n\nimport { imageLoader } from \"./image-loader\";\n\ntype ImageProps = ComponentProps<typeof Image>;\n\nconst CustomImage: FC<ImageProps> = (props) => {\n return <Image {...props} loader={props.loader ?? imageLoader.loader} />;\n};\n\nexport * from \"next/dist/client/image-component\";\nexport default CustomImage;\n"],"names":["CustomImage","props","jsx","Image","loader","imageLoader"],"mappings":";;;;;AAOM,MAAAA,WAAA,GAA+BC,KAAU,IAAA;EACtC,sBAAAC,GAAA,CAACC;IAAO,GAAGF,KAAA;IAAOG,QAAQH,KAAM,CAAAG,MAAA,IAAUC,YAAYD;GAAQ,CAAA;AACvE,CAAA;"}
1
+ {"version":3,"file":"image.mjs","sources":["../../../../src/utils/nextjs/legacy-image-loader/image.tsx"],"sourcesContent":["import { Image } from \"next/dist/client/image-component\";\nimport type { ComponentProps, FC } from \"react\";\n\nimport { imageLoader } from \"./image-loader\";\n\ntype ImageProps = ComponentProps<typeof Image>;\n\nconst CustomImage: FC<ImageProps> = (props) => {\n return <Image {...props} loader={props.loader ?? imageLoader.loader} />;\n};\n\nexport * from \"next/dist/client/image-component\";\nexport default CustomImage;\n"],"names":["CustomImage","props","jsx","Image","loader","imageLoader"],"mappings":";;;;;;AAOM,MAAAA,WAAA,GAA+BC,KAAU,IAAA;EACtC,sBAAAC,GAAA,CAACC;IAAO,GAAGF,KAAA;IAAOG,QAAQH,KAAM,CAAAG,MAAA,IAAUC,YAAYD;GAAQ,CAAA;AACvE,CAAA;"}
@@ -6,15 +6,29 @@ Object.defineProperty(exports, '__esModule', {
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var Image = require('next/dist/client/legacy/image');
8
8
  var imageLoader = require('../image-loader.js');
9
- function _interopDefault(e) {
10
- return e && e.__esModule ? e : {
11
- default: e
12
- };
9
+ function _interopNamespace(e) {
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () {
19
+ return e[k];
20
+ }
21
+ });
22
+ }
23
+ });
24
+ }
25
+ n["default"] = e;
26
+ return Object.freeze(n);
13
27
  }
14
- var Image__default = /*#__PURE__*/_interopDefault(Image);
28
+ var Image__namespace = /*#__PURE__*/_interopNamespace(Image);
15
29
  "use strict";
16
30
  const CustomImage = props => {
17
- return /* @__PURE__ */jsxRuntime.jsx(Image__default["default"], {
31
+ return /* @__PURE__ */jsxRuntime.jsx(Image__namespace["default"], {
18
32
  ...props,
19
33
  loader: props.loader ?? imageLoader.imageLoader.loader
20
34
  });
@@ -1 +1 @@
1
- {"version":3,"file":"image.js","sources":["../../../../../src/utils/nextjs/legacy-image-loader/legacy/image.tsx"],"sourcesContent":["import type { ImageProps } from \"next/dist/client/legacy/image\";\nimport Image from \"next/dist/client/legacy/image\";\nimport type { FC } from \"react\";\n\nimport { imageLoader } from \"../image-loader\";\n\nconst CustomImage: FC<ImageProps> = (props) => {\n return <Image {...props} loader={props.loader ?? imageLoader.loader} />;\n};\n\nexport * from \"next/dist/client/legacy/image\";\nexport default CustomImage;\n"],"names":["CustomImage","props","jsx","Image","loader","imageLoader"],"mappings":";;;;;;;;;;;;;;;AAMM,MAAAA,WAAA,GAA+BC,KAAU,IAAA;EACtC,sBAAAC,UAAA,CAAAA,GAAA,CAACC;IAAO,GAAGF,KAAA;IAAOG,QAAQH,KAAM,CAAAG,MAAA,IAAUC,wBAAYD;GAAQ,CAAA;AACvE,CAAA;;;;;;;;;"}
1
+ {"version":3,"file":"image.js","sources":["../../../../../src/utils/nextjs/legacy-image-loader/legacy/image.tsx"],"sourcesContent":["import type { ImageProps } from \"next/dist/client/legacy/image\";\nimport Image from \"next/dist/client/legacy/image\";\nimport type { FC } from \"react\";\n\nimport { imageLoader } from \"../image-loader\";\n\nconst CustomImage: FC<ImageProps> = (props) => {\n return <Image {...props} loader={props.loader ?? imageLoader.loader} />;\n};\n\nexport * from \"next/dist/client/legacy/image\";\nexport default CustomImage;\n"],"names":["CustomImage","props","jsx","Image","loader","imageLoader"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMM,MAAAA,WAAA,GAA+BC,KAAU,IAAA;EACtC,sBAAAC,UAAA,CAAAA,GAAA,CAACC;IAAO,GAAGF,KAAA;IAAOG,QAAQH,KAAM,CAAAG,MAAA,IAAUC,wBAAYD;GAAQ,CAAA;AACvE,CAAA;;;;;;;;;"}
@@ -1,4 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
+ import * as Image from 'next/dist/client/legacy/image';
2
3
  import Image__default from 'next/dist/client/legacy/image';
3
4
  export * from 'next/dist/client/legacy/image';
4
5
  import { imageLoader } from '../image-loader.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"image.mjs","sources":["../../../../../src/utils/nextjs/legacy-image-loader/legacy/image.tsx"],"sourcesContent":["import type { ImageProps } from \"next/dist/client/legacy/image\";\nimport Image from \"next/dist/client/legacy/image\";\nimport type { FC } from \"react\";\n\nimport { imageLoader } from \"../image-loader\";\n\nconst CustomImage: FC<ImageProps> = (props) => {\n return <Image {...props} loader={props.loader ?? imageLoader.loader} />;\n};\n\nexport * from \"next/dist/client/legacy/image\";\nexport default CustomImage;\n"],"names":["CustomImage","props","jsx","Image","loader","imageLoader"],"mappings":";;;;;AAMM,MAAAA,WAAA,GAA+BC,KAAU,IAAA;EACtC,sBAAAC,GAAA,CAACC;IAAO,GAAGF,KAAA;IAAOG,QAAQH,KAAM,CAAAG,MAAA,IAAUC,YAAYD;GAAQ,CAAA;AACvE,CAAA;"}
1
+ {"version":3,"file":"image.mjs","sources":["../../../../../src/utils/nextjs/legacy-image-loader/legacy/image.tsx"],"sourcesContent":["import type { ImageProps } from \"next/dist/client/legacy/image\";\nimport Image from \"next/dist/client/legacy/image\";\nimport type { FC } from \"react\";\n\nimport { imageLoader } from \"../image-loader\";\n\nconst CustomImage: FC<ImageProps> = (props) => {\n return <Image {...props} loader={props.loader ?? imageLoader.loader} />;\n};\n\nexport * from \"next/dist/client/legacy/image\";\nexport default CustomImage;\n"],"names":["CustomImage","props","jsx","Image","loader","imageLoader"],"mappings":";;;;;;AAMM,MAAAA,WAAA,GAA+BC,KAAU,IAAA;EACtC,sBAAAC,GAAA,CAACC;IAAO,GAAGF,KAAA;IAAOG,QAAQH,KAAM,CAAAG,MAAA,IAAUC,YAAYD;GAAQ,CAAA;AACvE,CAAA;"}