@ubnt/store.core 11.11.0 → 11.12.0-aigars1.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 (282) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/lib/assets/ai-360.jpg +0 -0
  3. package/lib/assets/ai-3602.jpg +0 -0
  4. package/lib/assets/ai-lpr.jpg +0 -0
  5. package/lib/assets/ai-lpr2.jpg +0 -0
  6. package/lib/assets/attention.svg +5 -5
  7. package/lib/assets/attention2.svg +5 -5
  8. package/lib/assets/bullet2.svg +2 -4
  9. package/lib/assets/bullet3.svg +4 -2
  10. package/lib/assets/close.svg +1 -3
  11. package/lib/assets/close2.svg +3 -1
  12. package/lib/assets/door-hub-mini.jpg +0 -0
  13. package/lib/assets/door-hub-mini2.jpg +0 -0
  14. package/lib/assets/express.jpg +0 -0
  15. package/lib/assets/express2.jpg +0 -0
  16. package/lib/assets/floodlight.svg +9 -2
  17. package/lib/assets/floodlight2.svg +2 -9
  18. package/lib/assets/g2-reader-pro.jpg +0 -0
  19. package/lib/assets/g2-reader-pro2.jpg +0 -0
  20. package/lib/assets/g3-reader.jpg +0 -0
  21. package/lib/assets/g3-reader2.jpg +0 -0
  22. package/lib/assets/g3-starter-kit-pro.jpg +0 -0
  23. package/lib/assets/g3-starter-kit-pro2.jpg +0 -0
  24. package/lib/assets/g3-starter-kit.jpg +0 -0
  25. package/lib/assets/g3-starter-kit2.jpg +0 -0
  26. package/lib/assets/g5-ptz.jpg +0 -0
  27. package/lib/assets/g5-ptz2.jpg +0 -0
  28. package/lib/assets/globe.svg +9 -2
  29. package/lib/assets/globe2.svg +2 -9
  30. package/lib/assets/intercom.jpg +0 -0
  31. package/lib/assets/intercom2.jpg +0 -0
  32. package/lib/assets/interior-design.svg +2 -2
  33. package/lib/assets/interior-design2.svg +2 -2
  34. package/lib/assets/power.svg +4 -1
  35. package/lib/assets/power2.svg +1 -4
  36. package/lib/assets/rack.svg +4 -1
  37. package/lib/assets/rack2.svg +1 -4
  38. package/lib/assets/udr2.jpg +0 -0
  39. package/lib/assets/udr3.jpg +0 -0
  40. package/lib/components/Badge/Badge.styles.js +1 -1
  41. package/lib/components/Badge/Badge.styles.js.map +1 -1
  42. package/lib/components/Badge/Badge.styles.mjs +1 -1
  43. package/lib/components/Badge/Badge.styles.mjs.map +1 -1
  44. package/lib/components/CardSection/CardSection.styles.js +2 -2
  45. package/lib/components/CardSection/CardSection.styles.js.map +1 -1
  46. package/lib/components/CardSection/CardSection.styles.mjs +2 -2
  47. package/lib/components/CardSection/CardSection.styles.mjs.map +1 -1
  48. package/lib/components/CustomImage/CustomImage.js +1 -1
  49. package/lib/components/CustomImage/CustomImage.mjs +1 -1
  50. package/lib/components/GridGallery/GridModal/GridModal.js +1 -1
  51. package/lib/components/GridGallery/GridModal/GridModal.mjs +1 -1
  52. package/lib/components/GridGallery/GridModal/GridModal.styles.js +2 -2
  53. package/lib/components/GridGallery/GridModal/GridModal.styles.js.map +1 -1
  54. package/lib/components/GridGallery/GridModal/GridModal.styles.mjs +2 -2
  55. package/lib/components/GridGallery/GridModal/GridModal.styles.mjs.map +1 -1
  56. package/lib/components/Header/AccountFrame/AccountFrame.styles.js +1 -1
  57. package/lib/components/Header/AccountFrame/AccountFrame.styles.js.map +1 -1
  58. package/lib/components/Header/AccountFrame/AccountFrame.styles.mjs +1 -1
  59. package/lib/components/Header/AccountFrame/AccountFrame.styles.mjs.map +1 -1
  60. package/lib/components/Header/CartModalV2/CartModal.js +1 -1
  61. package/lib/components/Header/CartModalV2/CartModal.mjs +1 -1
  62. package/lib/components/Header/CartModalV2/CartModal.styles.js +1 -1
  63. package/lib/components/Header/CartModalV2/CartModal.styles.js.map +1 -1
  64. package/lib/components/Header/CartModalV2/CartModal.styles.mjs +1 -1
  65. package/lib/components/Header/CartModalV2/CartModal.styles.mjs.map +1 -1
  66. package/lib/components/Header/Header.js +2 -2
  67. package/lib/components/Header/Header.mjs +2 -2
  68. package/lib/components/Header/Header.styles.js +1 -1
  69. package/lib/components/Header/Header.styles.js.map +1 -1
  70. package/lib/components/Header/Header.styles.mjs +1 -1
  71. package/lib/components/Header/Header.styles.mjs.map +1 -1
  72. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.js +1 -1
  73. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.js.map +1 -1
  74. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.mjs +1 -1
  75. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.mjs.map +1 -1
  76. package/lib/components/Header/Overlay/Overlay.styles.js +2 -2
  77. package/lib/components/Header/Overlay/Overlay.styles.js.map +1 -1
  78. package/lib/components/Header/Overlay/Overlay.styles.mjs +2 -2
  79. package/lib/components/Header/Overlay/Overlay.styles.mjs.map +1 -1
  80. package/lib/components/Header/ProHeader/ProHeader.js +1 -1
  81. package/lib/components/Header/ProHeader/ProHeader.mjs +1 -1
  82. package/lib/components/ImageCarousel/ImageCarousel.styles.js +1 -1
  83. package/lib/components/ImageCarousel/ImageCarousel.styles.js.map +1 -1
  84. package/lib/components/ImageCarousel/ImageCarousel.styles.mjs +1 -1
  85. package/lib/components/ImageCarousel/ImageCarousel.styles.mjs.map +1 -1
  86. package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.styles.js +2 -2
  87. package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.styles.js.map +1 -1
  88. package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.styles.mjs +2 -2
  89. package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.styles.mjs.map +1 -1
  90. package/lib/components/MicrositeBanner/MicrositeBanner.styles.js +1 -1
  91. package/lib/components/MicrositeBanner/MicrositeBanner.styles.js.map +1 -1
  92. package/lib/components/MicrositeBanner/MicrositeBanner.styles.mjs +1 -1
  93. package/lib/components/MicrositeBanner/MicrositeBanner.styles.mjs.map +1 -1
  94. package/lib/components/MicrositeFeatureProgressBar/MicrositeFeatureProgressBar.styles.js +2 -2
  95. package/lib/components/MicrositeFeatureProgressBar/MicrositeFeatureProgressBar.styles.js.map +1 -1
  96. package/lib/components/MicrositeFeatureProgressBar/MicrositeFeatureProgressBar.styles.mjs +2 -2
  97. package/lib/components/MicrositeFeatureProgressBar/MicrositeFeatureProgressBar.styles.mjs.map +1 -1
  98. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.styles.js +1 -1
  99. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.styles.js.map +1 -1
  100. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.styles.mjs +1 -1
  101. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.styles.mjs.map +1 -1
  102. package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.js +1 -1
  103. package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.mjs +1 -1
  104. package/lib/components/MobileModal/MobileModal.styles.js +2 -2
  105. package/lib/components/MobileModal/MobileModal.styles.js.map +1 -1
  106. package/lib/components/MobileModal/MobileModal.styles.mjs +2 -2
  107. package/lib/components/MobileModal/MobileModal.styles.mjs.map +1 -1
  108. package/lib/components/ModelCompareV3/ModelCompareOverflowScrollButton.js +2 -2
  109. package/lib/components/ModelCompareV3/ModelCompareOverflowScrollButton.js.map +1 -1
  110. package/lib/components/ModelCompareV3/ModelCompareOverflowScrollButton.mjs +2 -2
  111. package/lib/components/ModelCompareV3/ModelCompareOverflowScrollButton.mjs.map +1 -1
  112. package/lib/components/ModelCompareV3/ProductGroupsGrid.js +2 -2
  113. package/lib/components/ModelCompareV3/ProductGroupsGrid.js.map +1 -1
  114. package/lib/components/ModelCompareV3/ProductGroupsGrid.mjs +2 -2
  115. package/lib/components/ModelCompareV3/ProductGroupsGrid.mjs.map +1 -1
  116. package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/CompareTableOverflowScrollButton.js +2 -2
  117. package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/CompareTableOverflowScrollButton.js.map +1 -1
  118. package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/CompareTableOverflowScrollButton.mjs +2 -2
  119. package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/CompareTableOverflowScrollButton.mjs.map +1 -1
  120. package/lib/components/ModelCompareV4/ProductList/ProductList.styles.js +3 -3
  121. package/lib/components/ModelCompareV4/ProductList/ProductList.styles.js.map +1 -1
  122. package/lib/components/ModelCompareV4/ProductList/ProductList.styles.mjs +3 -3
  123. package/lib/components/ModelCompareV4/ProductList/ProductList.styles.mjs.map +1 -1
  124. package/lib/components/ModelCompareV4/ProductList/components/ScrollButton/ScrollButton.styles.js +2 -2
  125. package/lib/components/ModelCompareV4/ProductList/components/ScrollButton/ScrollButton.styles.js.map +1 -1
  126. package/lib/components/ModelCompareV4/ProductList/components/ScrollButton/ScrollButton.styles.mjs +2 -2
  127. package/lib/components/ModelCompareV4/ProductList/components/ScrollButton/ScrollButton.styles.mjs.map +1 -1
  128. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +1 -1
  129. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
  130. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.js +1 -1
  131. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.mjs +2 -2
  132. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js +1 -1
  133. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.mjs +1 -1
  134. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.js +1 -1
  135. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.mjs +2 -2
  136. package/lib/components/ScrollWrapper/ScrollWrapper.styles.js +2 -2
  137. package/lib/components/ScrollWrapper/ScrollWrapper.styles.js.map +1 -1
  138. package/lib/components/ScrollWrapper/ScrollWrapper.styles.mjs +2 -2
  139. package/lib/components/ScrollWrapper/ScrollWrapper.styles.mjs.map +1 -1
  140. package/lib/components/Search/Input/Input.js +1 -1
  141. package/lib/components/Search/Input/Input.mjs +1 -1
  142. package/lib/components/StaticModal/StaticModal.styles.js +5 -5
  143. package/lib/components/StaticModal/StaticModal.styles.js.map +1 -1
  144. package/lib/components/StaticModal/StaticModal.styles.mjs +5 -5
  145. package/lib/components/StaticModal/StaticModal.styles.mjs.map +1 -1
  146. package/lib/components/VideoPlayerNew/VideoPlayer.js +1 -1
  147. package/lib/components/VideoPlayerNew/VideoPlayer.mjs +1 -1
  148. package/lib/components/VideoPlayerNew/assets/close.svg.js +1 -1
  149. package/lib/components/VideoPlayerNew/assets/close.svg.mjs +2 -2
  150. package/lib/constants/icons/generic/close.svg.js +1 -1
  151. package/lib/constants/icons/generic/close.svg.mjs +2 -2
  152. package/lib/constants/icons/generic/index.js +1 -1
  153. package/lib/constants/icons/generic/index.mjs +1 -1
  154. package/lib/constants/icons/header/globe.svg.js +1 -1
  155. package/lib/constants/icons/header/globe.svg.mjs +2 -2
  156. package/lib/constants/icons/header/index.js +1 -1
  157. package/lib/constants/icons/header/index.mjs +1 -1
  158. package/lib/constants/icons/menu/floodlight.svg.js +5 -5
  159. package/lib/constants/icons/menu/floodlight.svg.mjs +2 -2
  160. package/lib/constants/icons/menu/index.js +9 -9
  161. package/lib/constants/icons/menu/index.mjs +3 -3
  162. package/lib/constants/icons/menu/power.svg.js +5 -5
  163. package/lib/constants/icons/menu/power.svg.mjs +2 -2
  164. package/lib/constants/icons/menu/rack.svg.js +5 -5
  165. package/lib/constants/icons/menu/rack.svg.mjs +2 -2
  166. package/lib/constants/mixin.js +10 -10
  167. package/lib/constants/mixin.js.map +1 -1
  168. package/lib/constants/mixin.mjs +10 -10
  169. package/lib/constants/mixin.mjs.map +1 -1
  170. package/lib/constants/modelCompareData/assets/Bullet/ai-lpr.jpg.js +1 -1
  171. package/lib/constants/modelCompareData/assets/Bullet/ai-lpr.jpg.mjs +2 -2
  172. package/lib/constants/modelCompareData/assets/Bullet/bullet.svg.js +1 -1
  173. package/lib/constants/modelCompareData/assets/Bullet/bullet.svg.mjs +2 -2
  174. package/lib/constants/modelCompareData/assets/Consoles/bigCompare/express.jpg.js +5 -5
  175. package/lib/constants/modelCompareData/assets/Consoles/bigCompare/express.jpg.mjs +2 -2
  176. package/lib/constants/modelCompareData/assets/Consoles/bigCompare/udr.jpg.js +5 -5
  177. package/lib/constants/modelCompareData/assets/Consoles/bigCompare/udr.jpg.mjs +2 -2
  178. package/lib/constants/modelCompareData/assets/Consoles/express.jpg.js +1 -1
  179. package/lib/constants/modelCompareData/assets/Consoles/express.jpg.mjs +2 -2
  180. package/lib/constants/modelCompareData/assets/Consoles/udr.jpg.js +1 -1
  181. package/lib/constants/modelCompareData/assets/Consoles/udr.jpg.mjs +2 -2
  182. package/lib/constants/modelCompareData/assets/DomeTurret/ai-360.jpg.js +1 -1
  183. package/lib/constants/modelCompareData/assets/DomeTurret/ai-360.jpg.mjs +2 -2
  184. package/lib/constants/modelCompareData/assets/DoorAccess/door-hub-mini.jpg.js +1 -1
  185. package/lib/constants/modelCompareData/assets/DoorAccess/door-hub-mini.jpg.mjs +2 -2
  186. package/lib/constants/modelCompareData/assets/DoorAccess/g2-reader-pro.jpg.js +1 -1
  187. package/lib/constants/modelCompareData/assets/DoorAccess/g2-reader-pro.jpg.mjs +2 -2
  188. package/lib/constants/modelCompareData/assets/DoorAccess/g3-reader.jpg.js +1 -1
  189. package/lib/constants/modelCompareData/assets/DoorAccess/g3-reader.jpg.mjs +2 -2
  190. package/lib/constants/modelCompareData/assets/DoorAccess/g3-starter-kit-pro.jpg.js +1 -1
  191. package/lib/constants/modelCompareData/assets/DoorAccess/g3-starter-kit-pro.jpg.mjs +2 -2
  192. package/lib/constants/modelCompareData/assets/DoorAccess/g3-starter-kit.jpg.js +1 -1
  193. package/lib/constants/modelCompareData/assets/DoorAccess/g3-starter-kit.jpg.mjs +2 -2
  194. package/lib/constants/modelCompareData/assets/DoorAccess/intercom.jpg.js +1 -1
  195. package/lib/constants/modelCompareData/assets/DoorAccess/intercom.jpg.mjs +2 -2
  196. package/lib/constants/modelCompareData/assets/PTZ/g5-ptz.jpg.js +1 -1
  197. package/lib/constants/modelCompareData/assets/PTZ/g5-ptz.jpg.mjs +2 -2
  198. package/lib/constants/modelCompareData/assets/floodlight.svg.js +1 -1
  199. package/lib/constants/modelCompareData/assets/floodlight.svg.mjs +2 -2
  200. package/lib/constants/modelCompareData/assets/globe.svg.js +1 -1
  201. package/lib/constants/modelCompareData/assets/globe.svg.mjs +2 -2
  202. package/lib/constants/modelCompareData/assets/interior-design.svg.js +1 -1
  203. package/lib/constants/modelCompareData/assets/interior-design.svg.mjs +2 -2
  204. package/lib/constants/modelCompareData/assets/power.svg.js +1 -1
  205. package/lib/constants/modelCompareData/assets/power.svg.mjs +2 -2
  206. package/lib/constants/modelCompareData/assets/product-list-assets/bullet.svg.js +1 -1
  207. package/lib/constants/modelCompareData/assets/product-list-assets/bullet.svg.mjs +2 -2
  208. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/ai-lpr.jpg.js +1 -1
  209. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/ai-lpr.jpg.mjs +2 -2
  210. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-360.jpg.js +1 -1
  211. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-360.jpg.mjs +2 -2
  212. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/door-hub-mini.jpg.js +1 -1
  213. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/door-hub-mini.jpg.mjs +2 -2
  214. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g2-reader-pro.jpg.js +1 -1
  215. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g2-reader-pro.jpg.mjs +2 -2
  216. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-reader.jpg.js +1 -1
  217. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-reader.jpg.mjs +2 -2
  218. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-starter-kit-pro.jpg.js +1 -1
  219. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-starter-kit-pro.jpg.mjs +2 -2
  220. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-starter-kit.jpg.js +1 -1
  221. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-starter-kit.jpg.mjs +2 -2
  222. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/intercom.jpg.js +1 -1
  223. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/intercom.jpg.mjs +2 -2
  224. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/ptz/g5-ptz.jpg.js +1 -1
  225. package/lib/constants/modelCompareData/assets/product-list-assets/cameras/ptz/g5-ptz.jpg.mjs +2 -2
  226. package/lib/constants/modelCompareData/assets/product-list-assets/interior-design.svg.js +1 -1
  227. package/lib/constants/modelCompareData/assets/product-list-assets/interior-design.svg.mjs +2 -2
  228. package/lib/constants/modelCompareData/assets/rack.svg.js +1 -1
  229. package/lib/constants/modelCompareData/assets/rack.svg.mjs +2 -2
  230. package/lib/constants/modelCompareData/data/DreamMachineConsolev4.js +6 -6
  231. package/lib/constants/modelCompareData/data/DreamMachineConsolev4.mjs +4 -4
  232. package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/Bullet.js +1 -1
  233. package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/Bullet.mjs +1 -1
  234. package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/InteriorDesign.js +1 -1
  235. package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/InteriorDesign.mjs +1 -1
  236. package/lib/constants/modelCompareData/data/product-list-groups/bullet.js +1 -1
  237. package/lib/constants/modelCompareData/data/product-list-groups/bullet.mjs +1 -1
  238. package/lib/constants/modelCompareData/data/product-list-groups/interiorDesign.js +1 -1
  239. package/lib/constants/modelCompareData/data/product-list-groups/interiorDesign.mjs +1 -1
  240. package/lib/constants/modelCompareData/data/products/ai360.js +2 -2
  241. package/lib/constants/modelCompareData/data/products/ai360.mjs +2 -2
  242. package/lib/constants/modelCompareData/data/products/aiLpr.js +2 -2
  243. package/lib/constants/modelCompareData/data/products/aiLpr.mjs +2 -2
  244. package/lib/constants/modelCompareData/data/products/doorHubMini.js +2 -2
  245. package/lib/constants/modelCompareData/data/products/doorHubMini.mjs +2 -2
  246. package/lib/constants/modelCompareData/data/products/express.js +1 -1
  247. package/lib/constants/modelCompareData/data/products/express.mjs +1 -1
  248. package/lib/constants/modelCompareData/data/products/g2ReaderPro.js +2 -2
  249. package/lib/constants/modelCompareData/data/products/g2ReaderPro.mjs +2 -2
  250. package/lib/constants/modelCompareData/data/products/g3Reader.js +2 -2
  251. package/lib/constants/modelCompareData/data/products/g3Reader.mjs +2 -2
  252. package/lib/constants/modelCompareData/data/products/g3StarterKit.js +2 -2
  253. package/lib/constants/modelCompareData/data/products/g3StarterKit.mjs +2 -2
  254. package/lib/constants/modelCompareData/data/products/g3StarterKitPro.js +2 -2
  255. package/lib/constants/modelCompareData/data/products/g3StarterKitPro.mjs +2 -2
  256. package/lib/constants/modelCompareData/data/products/g5Ptz.js +2 -2
  257. package/lib/constants/modelCompareData/data/products/g5Ptz.mjs +2 -2
  258. package/lib/constants/modelCompareData/data/products/intercom.js +2 -2
  259. package/lib/constants/modelCompareData/data/products/intercom.mjs +2 -2
  260. package/lib/constants/modelCompareData/data/products/udr.js +1 -1
  261. package/lib/constants/modelCompareData/data/products/udr.mjs +1 -1
  262. package/lib/constants/modelCompareData/data/properties/accessPowerMethod.js +1 -1
  263. package/lib/constants/modelCompareData/data/properties/accessPowerMethod.mjs +1 -1
  264. package/lib/constants/modelCompareData/data/properties/availability.js +1 -1
  265. package/lib/constants/modelCompareData/data/properties/availability.mjs +1 -1
  266. package/lib/constants/modelCompareData/data/properties/builtInFloodlight.js +1 -1
  267. package/lib/constants/modelCompareData/data/properties/builtInFloodlight.mjs +1 -1
  268. package/lib/constants/modelCompareData/data/properties/dcPowerOutput.js +1 -1
  269. package/lib/constants/modelCompareData/data/properties/dcPowerOutput.mjs +1 -1
  270. package/lib/constants/modelCompareData/data/properties/mounting.js +1 -1
  271. package/lib/constants/modelCompareData/data/properties/mounting.mjs +1 -1
  272. package/lib/constants/modelCompareData/data/properties/webMode.js +1 -1
  273. package/lib/constants/modelCompareData/data/properties/webMode.mjs +1 -1
  274. package/lib/contexts/MenuContext/mapping.js +3 -3
  275. package/lib/contexts/MenuContext/mapping.mjs +2 -2
  276. package/lib/contexts/MicrositeMenuContext/mapping.js +3 -3
  277. package/lib/contexts/MicrositeMenuContext/mapping.mjs +2 -2
  278. package/lib/utils/money/tax.private.js +1 -0
  279. package/lib/utils/money/tax.private.js.map +1 -1
  280. package/lib/utils/money/tax.private.mjs +1 -0
  281. package/lib/utils/money/tax.private.mjs.map +1 -1
  282. package/package.json +1 -1
@@ -49,7 +49,7 @@ var _externalAssets_BJ4JezH6 = require("../../assets/doorbells.svg");
49
49
  var _externalAssets_TWdDoFCP = require("../../assets/compact-cameras.svg");
50
50
  var _externalAssets_B4KkF36C = require("../../assets/ai-enhancements.svg");
51
51
  var _externalAssets_CgJ1WmE4 = require("../../assets/superlink.svg");
52
- var _externalAssets_D9OBvcup = require("../../assets/floodlight.svg");
52
+ var _externalAssets_CtJPud52 = require("../../assets/floodlight2.svg");
53
53
  var _externalAssets_C_DozlA4 = require("../../assets/camera-special-devices.png");
54
54
  var _externalAssets_h17pgRRZ = require("../../assets/special-devices.svg");
55
55
  var _externalAssets_2tUH2ymR = require("../../assets/video-recorders.png");
@@ -144,7 +144,7 @@ var _externalAssets_BJ4JezH6__default = /*#__PURE__*/_interopDefault(_externalAs
144
144
  var _externalAssets_TWdDoFCP__default = /*#__PURE__*/_interopDefault(_externalAssets_TWdDoFCP);
145
145
  var _externalAssets_B4KkF36C__default = /*#__PURE__*/_interopDefault(_externalAssets_B4KkF36C);
146
146
  var _externalAssets_CgJ1WmE4__default = /*#__PURE__*/_interopDefault(_externalAssets_CgJ1WmE4);
147
- var _externalAssets_D9OBvcup__default = /*#__PURE__*/_interopDefault(_externalAssets_D9OBvcup);
147
+ var _externalAssets_CtJPud52__default = /*#__PURE__*/_interopDefault(_externalAssets_CtJPud52);
148
148
  var _externalAssets_C_DozlA4__default = /*#__PURE__*/_interopDefault(_externalAssets_C_DozlA4);
149
149
  var _externalAssets_h17pgRRZ__default = /*#__PURE__*/_interopDefault(_externalAssets_h17pgRRZ);
150
150
  var _externalAssets_2tUH2ymR__default = /*#__PURE__*/_interopDefault(_externalAssets_2tUH2ymR);
@@ -649,7 +649,7 @@ const SHARED_MENU_ITEMS = [{
649
649
  label: "menu.label.security.specialDevices.floodlight",
650
650
  url: [mapping.SiteId.Ui, "/physical-security/special-devices/floodlight"],
651
651
  icon: {
652
- src: _externalAssets_D9OBvcup__default["default"],
652
+ src: _externalAssets_CtJPud52__default["default"],
653
653
  width: 40,
654
654
  height: 40
655
655
  }
@@ -47,7 +47,7 @@ import _externalAssets_BJ4JezH6__default from "../../assets/doorbells.svg";
47
47
  import _externalAssets_TWdDoFCP__default from "../../assets/compact-cameras.svg";
48
48
  import _externalAssets_B4KkF36C__default from "../../assets/ai-enhancements.svg";
49
49
  import _externalAssets_CgJ1WmE4__default from "../../assets/superlink.svg";
50
- import _externalAssets_D9OBvcup__default from "../../assets/floodlight.svg";
50
+ import _externalAssets_CtJPud52__default from "../../assets/floodlight2.svg";
51
51
  import _externalAssets_C_DozlA4__default from "../../assets/camera-special-devices.png";
52
52
  import _externalAssets_h17pgRRZ__default from "../../assets/special-devices.svg";
53
53
  import _externalAssets_2tUH2ymR__default from "../../assets/video-recorders.png";
@@ -552,7 +552,7 @@ const SHARED_MENU_ITEMS = [{
552
552
  label: "menu.label.security.specialDevices.floodlight",
553
553
  url: [SiteId.Ui, "/physical-security/special-devices/floodlight"],
554
554
  icon: {
555
- src: _externalAssets_D9OBvcup__default,
555
+ src: _externalAssets_CtJPud52__default,
556
556
  width: 40,
557
557
  height: 40
558
558
  }
@@ -30,6 +30,7 @@ const allocatePerItemTaxableAmount = itemSummary => {
30
30
  });
31
31
  };
32
32
  const calculateWholeQtyLineItemTax = (itemSummary, taxRate) => {
33
+ console.log("XXX - INSIDE");
33
34
  if (taxRate === 0) {
34
35
  return misc.getDinero(0, itemSummary.currency);
35
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tax.private.js","sources":["../../../src/utils/money/tax.private.ts"],"sourcesContent":["// #############################################################################\n// Internal helper functions not for consumption outside of store.core!\n// Wrote as separate files so that they can be easily unit tested without exposing them\n// #############################################################################\nimport { add, dinero, subtract } from \"dinero.js\";\n\nimport { FixedAmountAllocator } from \"./allocators/fixedAmount\";\nimport { Round } from \"./constants\";\nimport { amount, getDinero, getDineroCurrency } from \"./misc\";\nimport type {\n Dino,\n LineItemSummary,\n SingleLineItemSummary,\n TaxRate,\n} from \"./types\";\n\n/**\n * Reverse engineer the taxable amount from \"whole item\" taxable amount into \"per item\" taxable amount for custom tax\n * rate calculations\n */\nexport const allocatePerItemTaxableAmount = (\n itemSummary: LineItemSummary,\n): SingleLineItemSummary[] => {\n /**\n * If the item quantity is 1, we can just return the item summary as is\n */\n if (itemSummary.quantity === 1) {\n return [itemSummary as SingleLineItemSummary];\n }\n\n // Reverse engineer price before discount\n const preDiscountAmount = add(\n getDinero(itemSummary.taxableAmount, itemSummary.currency),\n getDinero(itemSummary.discountAmount, itemSummary.currency),\n );\n\n const allocator = new FixedAmountAllocator({\n initialAllocateAmount: itemSummary.discountAmount,\n initialTotalAmount: amount(preDiscountAmount),\n currency: itemSummary.currency,\n });\n\n // Iterate over the amount of qty to reverse engineer the discount price\n return Array.from({ length: itemSummary.quantity }, () => {\n const discountAllocatedAmount = allocator.allocate(\n itemSummary.itemPrice,\n itemSummary.currency,\n );\n\n const taxableAmount = subtract(\n getDinero(itemSummary.itemPrice, itemSummary.currency),\n discountAllocatedAmount,\n );\n\n return {\n itemPrice: itemSummary.itemPrice,\n taxableAmount: amount(taxableAmount),\n discountAmount: amount(discountAllocatedAmount),\n currency: itemSummary.currency,\n quantity: 1,\n } as SingleLineItemSummary;\n });\n};\n\nexport const calculateWholeQtyLineItemTax = (\n itemSummary: LineItemSummary,\n taxRate: TaxRate,\n): Dino => {\n // Nothing to calculate\n if (taxRate === 0) {\n return getDinero(0, itemSummary.currency);\n }\n\n /**\n * Historically we calculate the tax by using dinero allocation, but we did not have control over how we round things.\n * So instead as we are already working with currency in cents we can multiply and round it ourselves.\n */\n return dinero({\n amount: Round.Financial(itemSummary.taxableAmount * taxRate),\n currency: getDineroCurrency(itemSummary.currency),\n });\n};\n\nexport const calculatePerQtyLineItemTax = (\n itemSummary: LineItemSummary,\n taxRate: TaxRate,\n): Dino => {\n // Nothing to calculate\n if (taxRate === 0) {\n return getDinero(0, itemSummary.currency);\n }\n\n // Split the item summary into per individual item qty summaries\n const singleItemSummaries = allocatePerItemTaxableAmount(itemSummary);\n\n // Calculate individual item qty tax and sum them up\n let totalTaxAmount = getDinero(0, itemSummary.currency);\n\n singleItemSummaries.forEach((itemSummary) => {\n // Probably a bit confusing at first, but calling the whole qty tax calculation function here as we can safely use\n // it as item summary is always a single item summary here\n const taxAmount = calculateWholeQtyLineItemTax(itemSummary, taxRate);\n totalTaxAmount = add(totalTaxAmount, taxAmount);\n });\n\n return totalTaxAmount;\n};\n"],"names":["allocatePerItemTaxableAmount","itemSummary","quantity","preDiscountAmount","add","getDinero","taxableAmount","currency","discountAmount","allocator","FixedAmountAllocator","initialAllocateAmount","initialTotalAmount","amount","Array","from","length","discountAllocatedAmount","allocate","itemPrice","subtract","calculateWholeQtyLineItemTax","taxRate","dinero","Round","Financial","getDineroCurrency","calculatePerQtyLineItemTax","singleItemSummaries","totalTaxAmount","forEach","taxAmount"],"mappings":";;;;;;;AAoBa,MAAAA,4BAAA,GACXC,WAC4B,IAAA;EAIxB,IAAAA,WAAA,CAAYC,aAAa,CAAG,EAAA;IAC9B,OAAO,CAACD,WAAoC,CAAA;EAAA;EAI9C,MAAME,iBAAoB,GAAAC,SAAA,CAAAA,GAAA,CACxBC,IAAAA,CAAAA,SAAU,CAAAJ,WAAA,CAAYK,aAAe,EAAAL,WAAA,CAAYM,QAAQ,CAAA,EACzDF,IAAAA,CAAAA,SAAU,CAAAJ,WAAA,CAAYO,cAAgB,EAAAP,WAAA,CAAYM,QAAQ,CAC5D,CAAA;EAEM,MAAAE,SAAA,GAAY,IAAIC,gCAAqB,CAAA;IACzCC,uBAAuBV,WAAY,CAAAO,cAAA;IACnCI,kBAAA,EAAoBC,YAAOV,iBAAiB,CAAA;IAC5CI,UAAUN,WAAY,CAAAM;EAAA,CACvB,CAAA;EAGD,OAAOO,MAAMC,IAAK,CAAA;IAAEC,QAAQf,WAAY,CAAAC;EAAA,GAAY,MAAM;IACxD,MAAMe,0BAA0BR,SAAU,CAAAS,QAAA,CACxCjB,WAAY,CAAAkB,SAAA,EACZlB,WAAY,CAAAM,QACd,CAAA;IAEA,MAAMD,aAAgB,GAAAc,SAAA,CAAAA,QAAA,CACpBf,IAAAA,CAAAA,SAAU,CAAAJ,WAAA,CAAYkB,SAAW,EAAAlB,WAAA,CAAYM,QAAQ,CAAA,EACrDU,uBACF,CAAA;IAEO,OAAA;MACLE,WAAWlB,WAAY,CAAAkB,SAAA;MACvBb,aAAA,EAAeO,YAAOP,aAAa,CAAA;MACnCE,cAAA,EAAgBK,YAAOI,uBAAuB,CAAA;MAC9CV,UAAUN,WAAY,CAAAM,QAAA;MACtBL,QAAU,EAAA;IACZ,CAAA;EAAA,CACD,CAAA;AACH,CAAA;AAEa,MAAAmB,4BAAA,GAA+BA,CAC1CpB,WAAA,EACAqB,OACS,KAAA;EAET,IAAIA,YAAY,CAAG,EAAA;IACV,OAAAjB,cAAA,CAAU,CAAG,EAAAJ,WAAA,CAAYM,QAAQ,CAAA;EAAA;EAO1C,OAAOgB,gBAAO,CAAA;IACZV,MAAQ,EAAAW,SAAAA,CAAAA,KAAA,CAAMC,SAAU,CAAAxB,WAAA,CAAYK,gBAAgBgB,OAAO,CAAA;IAC3Df,QAAA,EAAUmB,IAAAA,CAAAA,iBAAkB,CAAAzB,WAAA,CAAYM,QAAQ;EAAA,CACjD,CAAA;AACH,CAAA;AAEa,MAAAoB,0BAAA,GAA6BA,CACxC1B,WAAA,EACAqB,OACS,KAAA;EAET,IAAIA,YAAY,CAAG,EAAA;IACV,OAAAjB,cAAA,CAAU,CAAG,EAAAJ,WAAA,CAAYM,QAAQ,CAAA;EAAA;EAIpC,MAAAqB,mBAAA,GAAsB5B,6BAA6BC,WAAW,CAAA;EAGpE,IAAI4B,cAAiB,GAAAxB,IAAA,CAAAA,SAAA,CAAU,CAAG,EAAAJ,WAAA,CAAYM,QAAQ,CAAA;EAElCqB,mBAAA,CAAAE,OAAA,CAAS7B,YAAgB,IAAA;IAGrC,MAAA8B,SAAA,GAAYV,4BAA6BpB,CAAAA,YAAAA,EAAaqB,OAAO,CAAA;IAClDO,cAAA,GAAAzB,SAAAA,CAAAA,GAAA,CAAIyB,gBAAgBE,SAAS,CAAA;EAAA,CAC/C,CAAA;EAEM,OAAAF,cAAA;AACT,CAAA;;;"}
1
+ {"version":3,"file":"tax.private.js","sources":["../../../src/utils/money/tax.private.ts"],"sourcesContent":["// #############################################################################\n// Internal helper functions not for consumption outside of store.core!\n// Wrote as separate files so that they can be easily unit tested without exposing them\n// #############################################################################\nimport { add, dinero, subtract } from \"dinero.js\";\n\nimport { FixedAmountAllocator } from \"./allocators/fixedAmount\";\nimport { Round } from \"./constants\";\nimport { amount, getDinero, getDineroCurrency } from \"./misc\";\nimport type {\n Dino,\n LineItemSummary,\n SingleLineItemSummary,\n TaxRate,\n} from \"./types\";\n\n/**\n * Reverse engineer the taxable amount from \"whole item\" taxable amount into \"per item\" taxable amount for custom tax\n * rate calculations\n */\nexport const allocatePerItemTaxableAmount = (\n itemSummary: LineItemSummary,\n): SingleLineItemSummary[] => {\n /**\n * If the item quantity is 1, we can just return the item summary as is\n */\n if (itemSummary.quantity === 1) {\n return [itemSummary as SingleLineItemSummary];\n }\n\n // Reverse engineer price before discount\n const preDiscountAmount = add(\n getDinero(itemSummary.taxableAmount, itemSummary.currency),\n getDinero(itemSummary.discountAmount, itemSummary.currency),\n );\n\n const allocator = new FixedAmountAllocator({\n initialAllocateAmount: itemSummary.discountAmount,\n initialTotalAmount: amount(preDiscountAmount),\n currency: itemSummary.currency,\n });\n\n // Iterate over the amount of qty to reverse engineer the discount price\n return Array.from({ length: itemSummary.quantity }, () => {\n const discountAllocatedAmount = allocator.allocate(\n itemSummary.itemPrice,\n itemSummary.currency,\n );\n\n const taxableAmount = subtract(\n getDinero(itemSummary.itemPrice, itemSummary.currency),\n discountAllocatedAmount,\n );\n\n return {\n itemPrice: itemSummary.itemPrice,\n taxableAmount: amount(taxableAmount),\n discountAmount: amount(discountAllocatedAmount),\n currency: itemSummary.currency,\n quantity: 1,\n } as SingleLineItemSummary;\n });\n};\n\nexport const calculateWholeQtyLineItemTax = (\n itemSummary: LineItemSummary,\n taxRate: TaxRate,\n): Dino => {\n console.log(\"XXX - INSIDE\");\n\n // Nothing to calculate\n if (taxRate === 0) {\n return getDinero(0, itemSummary.currency);\n }\n\n /**\n * Historically we calculate the tax by using dinero allocation, but we did not have control over how we round things.\n * So instead as we are already working with currency in cents we can multiply and round it ourselves.\n */\n return dinero({\n amount: Round.Financial(itemSummary.taxableAmount * taxRate),\n currency: getDineroCurrency(itemSummary.currency),\n });\n};\n\nexport const calculatePerQtyLineItemTax = (\n itemSummary: LineItemSummary,\n taxRate: TaxRate,\n): Dino => {\n // Nothing to calculate\n if (taxRate === 0) {\n return getDinero(0, itemSummary.currency);\n }\n\n // Split the item summary into per individual item qty summaries\n const singleItemSummaries = allocatePerItemTaxableAmount(itemSummary);\n\n // Calculate individual item qty tax and sum them up\n let totalTaxAmount = getDinero(0, itemSummary.currency);\n\n singleItemSummaries.forEach((itemSummary) => {\n // Probably a bit confusing at first, but calling the whole qty tax calculation function here as we can safely use\n // it as item summary is always a single item summary here\n const taxAmount = calculateWholeQtyLineItemTax(itemSummary, taxRate);\n totalTaxAmount = add(totalTaxAmount, taxAmount);\n });\n\n return totalTaxAmount;\n};\n"],"names":["allocatePerItemTaxableAmount","itemSummary","quantity","preDiscountAmount","add","getDinero","taxableAmount","currency","discountAmount","allocator","FixedAmountAllocator","initialAllocateAmount","initialTotalAmount","amount","Array","from","length","discountAllocatedAmount","allocate","itemPrice","subtract","calculateWholeQtyLineItemTax","taxRate","console","log","dinero","Round","Financial","getDineroCurrency","calculatePerQtyLineItemTax","singleItemSummaries","totalTaxAmount","forEach","taxAmount"],"mappings":";;;;;;;AAoBa,MAAAA,4BAAA,GACXC,WAC4B,IAAA;EAIxB,IAAAA,WAAA,CAAYC,aAAa,CAAG,EAAA;IAC9B,OAAO,CAACD,WAAoC,CAAA;EAAA;EAI9C,MAAME,iBAAoB,GAAAC,SAAA,CAAAA,GAAA,CACxBC,IAAAA,CAAAA,SAAU,CAAAJ,WAAA,CAAYK,aAAe,EAAAL,WAAA,CAAYM,QAAQ,CAAA,EACzDF,IAAAA,CAAAA,SAAU,CAAAJ,WAAA,CAAYO,cAAgB,EAAAP,WAAA,CAAYM,QAAQ,CAC5D,CAAA;EAEM,MAAAE,SAAA,GAAY,IAAIC,gCAAqB,CAAA;IACzCC,uBAAuBV,WAAY,CAAAO,cAAA;IACnCI,kBAAA,EAAoBC,YAAOV,iBAAiB,CAAA;IAC5CI,UAAUN,WAAY,CAAAM;EAAA,CACvB,CAAA;EAGD,OAAOO,MAAMC,IAAK,CAAA;IAAEC,QAAQf,WAAY,CAAAC;EAAA,GAAY,MAAM;IACxD,MAAMe,0BAA0BR,SAAU,CAAAS,QAAA,CACxCjB,WAAY,CAAAkB,SAAA,EACZlB,WAAY,CAAAM,QACd,CAAA;IAEA,MAAMD,aAAgB,GAAAc,SAAA,CAAAA,QAAA,CACpBf,IAAAA,CAAAA,SAAU,CAAAJ,WAAA,CAAYkB,SAAW,EAAAlB,WAAA,CAAYM,QAAQ,CAAA,EACrDU,uBACF,CAAA;IAEO,OAAA;MACLE,WAAWlB,WAAY,CAAAkB,SAAA;MACvBb,aAAA,EAAeO,YAAOP,aAAa,CAAA;MACnCE,cAAA,EAAgBK,YAAOI,uBAAuB,CAAA;MAC9CV,UAAUN,WAAY,CAAAM,QAAA;MACtBL,QAAU,EAAA;IACZ,CAAA;EAAA,CACD,CAAA;AACH,CAAA;AAEa,MAAAmB,4BAAA,GAA+BA,CAC1CpB,WAAA,EACAqB,OACS,KAAA;EACTC,OAAA,CAAQC,IAAI,cAAc,CAAA;EAG1B,IAAIF,YAAY,CAAG,EAAA;IACV,OAAAjB,cAAA,CAAU,CAAG,EAAAJ,WAAA,CAAYM,QAAQ,CAAA;EAAA;EAO1C,OAAOkB,gBAAO,CAAA;IACZZ,MAAQ,EAAAa,SAAAA,CAAAA,KAAA,CAAMC,SAAU,CAAA1B,WAAA,CAAYK,gBAAgBgB,OAAO,CAAA;IAC3Df,QAAA,EAAUqB,IAAAA,CAAAA,iBAAkB,CAAA3B,WAAA,CAAYM,QAAQ;EAAA,CACjD,CAAA;AACH,CAAA;AAEa,MAAAsB,0BAAA,GAA6BA,CACxC5B,WAAA,EACAqB,OACS,KAAA;EAET,IAAIA,YAAY,CAAG,EAAA;IACV,OAAAjB,cAAA,CAAU,CAAG,EAAAJ,WAAA,CAAYM,QAAQ,CAAA;EAAA;EAIpC,MAAAuB,mBAAA,GAAsB9B,6BAA6BC,WAAW,CAAA;EAGpE,IAAI8B,cAAiB,GAAA1B,IAAA,CAAAA,SAAA,CAAU,CAAG,EAAAJ,WAAA,CAAYM,QAAQ,CAAA;EAElCuB,mBAAA,CAAAE,OAAA,CAAS/B,YAAgB,IAAA;IAGrC,MAAAgC,SAAA,GAAYZ,4BAA6BpB,CAAAA,YAAAA,EAAaqB,OAAO,CAAA;IAClDS,cAAA,GAAA3B,SAAAA,CAAAA,GAAA,CAAI2B,gBAAgBE,SAAS,CAAA;EAAA,CAC/C,CAAA;EAEM,OAAAF,cAAA;AACT,CAAA;;;"}
@@ -28,6 +28,7 @@ const allocatePerItemTaxableAmount = itemSummary => {
28
28
  });
29
29
  };
30
30
  const calculateWholeQtyLineItemTax = (itemSummary, taxRate) => {
31
+ console.log("XXX - INSIDE");
31
32
  if (taxRate === 0) {
32
33
  return getDinero(0, itemSummary.currency);
33
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tax.private.mjs","sources":["../../../src/utils/money/tax.private.ts"],"sourcesContent":["// #############################################################################\n// Internal helper functions not for consumption outside of store.core!\n// Wrote as separate files so that they can be easily unit tested without exposing them\n// #############################################################################\nimport { add, dinero, subtract } from \"dinero.js\";\n\nimport { FixedAmountAllocator } from \"./allocators/fixedAmount\";\nimport { Round } from \"./constants\";\nimport { amount, getDinero, getDineroCurrency } from \"./misc\";\nimport type {\n Dino,\n LineItemSummary,\n SingleLineItemSummary,\n TaxRate,\n} from \"./types\";\n\n/**\n * Reverse engineer the taxable amount from \"whole item\" taxable amount into \"per item\" taxable amount for custom tax\n * rate calculations\n */\nexport const allocatePerItemTaxableAmount = (\n itemSummary: LineItemSummary,\n): SingleLineItemSummary[] => {\n /**\n * If the item quantity is 1, we can just return the item summary as is\n */\n if (itemSummary.quantity === 1) {\n return [itemSummary as SingleLineItemSummary];\n }\n\n // Reverse engineer price before discount\n const preDiscountAmount = add(\n getDinero(itemSummary.taxableAmount, itemSummary.currency),\n getDinero(itemSummary.discountAmount, itemSummary.currency),\n );\n\n const allocator = new FixedAmountAllocator({\n initialAllocateAmount: itemSummary.discountAmount,\n initialTotalAmount: amount(preDiscountAmount),\n currency: itemSummary.currency,\n });\n\n // Iterate over the amount of qty to reverse engineer the discount price\n return Array.from({ length: itemSummary.quantity }, () => {\n const discountAllocatedAmount = allocator.allocate(\n itemSummary.itemPrice,\n itemSummary.currency,\n );\n\n const taxableAmount = subtract(\n getDinero(itemSummary.itemPrice, itemSummary.currency),\n discountAllocatedAmount,\n );\n\n return {\n itemPrice: itemSummary.itemPrice,\n taxableAmount: amount(taxableAmount),\n discountAmount: amount(discountAllocatedAmount),\n currency: itemSummary.currency,\n quantity: 1,\n } as SingleLineItemSummary;\n });\n};\n\nexport const calculateWholeQtyLineItemTax = (\n itemSummary: LineItemSummary,\n taxRate: TaxRate,\n): Dino => {\n // Nothing to calculate\n if (taxRate === 0) {\n return getDinero(0, itemSummary.currency);\n }\n\n /**\n * Historically we calculate the tax by using dinero allocation, but we did not have control over how we round things.\n * So instead as we are already working with currency in cents we can multiply and round it ourselves.\n */\n return dinero({\n amount: Round.Financial(itemSummary.taxableAmount * taxRate),\n currency: getDineroCurrency(itemSummary.currency),\n });\n};\n\nexport const calculatePerQtyLineItemTax = (\n itemSummary: LineItemSummary,\n taxRate: TaxRate,\n): Dino => {\n // Nothing to calculate\n if (taxRate === 0) {\n return getDinero(0, itemSummary.currency);\n }\n\n // Split the item summary into per individual item qty summaries\n const singleItemSummaries = allocatePerItemTaxableAmount(itemSummary);\n\n // Calculate individual item qty tax and sum them up\n let totalTaxAmount = getDinero(0, itemSummary.currency);\n\n singleItemSummaries.forEach((itemSummary) => {\n // Probably a bit confusing at first, but calling the whole qty tax calculation function here as we can safely use\n // it as item summary is always a single item summary here\n const taxAmount = calculateWholeQtyLineItemTax(itemSummary, taxRate);\n totalTaxAmount = add(totalTaxAmount, taxAmount);\n });\n\n return totalTaxAmount;\n};\n"],"names":["allocatePerItemTaxableAmount","itemSummary","quantity","preDiscountAmount","add","getDinero","taxableAmount","currency","discountAmount","allocator","FixedAmountAllocator","initialAllocateAmount","initialTotalAmount","amount","Array","from","length","discountAllocatedAmount","allocate","itemPrice","subtract","calculateWholeQtyLineItemTax","taxRate","dinero","Round","Financial","getDineroCurrency","calculatePerQtyLineItemTax","singleItemSummaries","totalTaxAmount","forEach","taxAmount"],"mappings":";;;;;AAoBa,MAAAA,4BAAA,GACXC,WAC4B,IAAA;EAIxB,IAAAA,WAAA,CAAYC,aAAa,CAAG,EAAA;IAC9B,OAAO,CAACD,WAAoC,CAAA;EAAA;EAI9C,MAAME,iBAAoB,GAAAC,GAAA,CACxBC,SAAU,CAAAJ,WAAA,CAAYK,aAAe,EAAAL,WAAA,CAAYM,QAAQ,CAAA,EACzDF,SAAU,CAAAJ,WAAA,CAAYO,cAAgB,EAAAP,WAAA,CAAYM,QAAQ,CAC5D,CAAA;EAEM,MAAAE,SAAA,GAAY,IAAIC,oBAAqB,CAAA;IACzCC,uBAAuBV,WAAY,CAAAO,cAAA;IACnCI,kBAAA,EAAoBC,OAAOV,iBAAiB,CAAA;IAC5CI,UAAUN,WAAY,CAAAM;EAAA,CACvB,CAAA;EAGD,OAAOO,MAAMC,IAAK,CAAA;IAAEC,QAAQf,WAAY,CAAAC;EAAA,GAAY,MAAM;IACxD,MAAMe,0BAA0BR,SAAU,CAAAS,QAAA,CACxCjB,WAAY,CAAAkB,SAAA,EACZlB,WAAY,CAAAM,QACd,CAAA;IAEA,MAAMD,aAAgB,GAAAc,QAAA,CACpBf,SAAU,CAAAJ,WAAA,CAAYkB,SAAW,EAAAlB,WAAA,CAAYM,QAAQ,CAAA,EACrDU,uBACF,CAAA;IAEO,OAAA;MACLE,WAAWlB,WAAY,CAAAkB,SAAA;MACvBb,aAAA,EAAeO,OAAOP,aAAa,CAAA;MACnCE,cAAA,EAAgBK,OAAOI,uBAAuB,CAAA;MAC9CV,UAAUN,WAAY,CAAAM,QAAA;MACtBL,QAAU,EAAA;IACZ,CAAA;EAAA,CACD,CAAA;AACH,CAAA;AAEa,MAAAmB,4BAAA,GAA+BA,CAC1CpB,WAAA,EACAqB,OACS,KAAA;EAET,IAAIA,YAAY,CAAG,EAAA;IACV,OAAAjB,SAAA,CAAU,CAAG,EAAAJ,WAAA,CAAYM,QAAQ,CAAA;EAAA;EAO1C,OAAOgB,MAAO,CAAA;IACZV,MAAQ,EAAAW,KAAA,CAAMC,SAAU,CAAAxB,WAAA,CAAYK,gBAAgBgB,OAAO,CAAA;IAC3Df,QAAA,EAAUmB,iBAAkB,CAAAzB,WAAA,CAAYM,QAAQ;EAAA,CACjD,CAAA;AACH,CAAA;AAEa,MAAAoB,0BAAA,GAA6BA,CACxC1B,WAAA,EACAqB,OACS,KAAA;EAET,IAAIA,YAAY,CAAG,EAAA;IACV,OAAAjB,SAAA,CAAU,CAAG,EAAAJ,WAAA,CAAYM,QAAQ,CAAA;EAAA;EAIpC,MAAAqB,mBAAA,GAAsB5B,6BAA6BC,WAAW,CAAA;EAGpE,IAAI4B,cAAiB,GAAAxB,SAAA,CAAU,CAAG,EAAAJ,WAAA,CAAYM,QAAQ,CAAA;EAElCqB,mBAAA,CAAAE,OAAA,CAAS7B,YAAgB,IAAA;IAGrC,MAAA8B,SAAA,GAAYV,4BAA6BpB,CAAAA,YAAAA,EAAaqB,OAAO,CAAA;IAClDO,cAAA,GAAAzB,GAAA,CAAIyB,gBAAgBE,SAAS,CAAA;EAAA,CAC/C,CAAA;EAEM,OAAAF,cAAA;AACT,CAAA;"}
1
+ {"version":3,"file":"tax.private.mjs","sources":["../../../src/utils/money/tax.private.ts"],"sourcesContent":["// #############################################################################\n// Internal helper functions not for consumption outside of store.core!\n// Wrote as separate files so that they can be easily unit tested without exposing them\n// #############################################################################\nimport { add, dinero, subtract } from \"dinero.js\";\n\nimport { FixedAmountAllocator } from \"./allocators/fixedAmount\";\nimport { Round } from \"./constants\";\nimport { amount, getDinero, getDineroCurrency } from \"./misc\";\nimport type {\n Dino,\n LineItemSummary,\n SingleLineItemSummary,\n TaxRate,\n} from \"./types\";\n\n/**\n * Reverse engineer the taxable amount from \"whole item\" taxable amount into \"per item\" taxable amount for custom tax\n * rate calculations\n */\nexport const allocatePerItemTaxableAmount = (\n itemSummary: LineItemSummary,\n): SingleLineItemSummary[] => {\n /**\n * If the item quantity is 1, we can just return the item summary as is\n */\n if (itemSummary.quantity === 1) {\n return [itemSummary as SingleLineItemSummary];\n }\n\n // Reverse engineer price before discount\n const preDiscountAmount = add(\n getDinero(itemSummary.taxableAmount, itemSummary.currency),\n getDinero(itemSummary.discountAmount, itemSummary.currency),\n );\n\n const allocator = new FixedAmountAllocator({\n initialAllocateAmount: itemSummary.discountAmount,\n initialTotalAmount: amount(preDiscountAmount),\n currency: itemSummary.currency,\n });\n\n // Iterate over the amount of qty to reverse engineer the discount price\n return Array.from({ length: itemSummary.quantity }, () => {\n const discountAllocatedAmount = allocator.allocate(\n itemSummary.itemPrice,\n itemSummary.currency,\n );\n\n const taxableAmount = subtract(\n getDinero(itemSummary.itemPrice, itemSummary.currency),\n discountAllocatedAmount,\n );\n\n return {\n itemPrice: itemSummary.itemPrice,\n taxableAmount: amount(taxableAmount),\n discountAmount: amount(discountAllocatedAmount),\n currency: itemSummary.currency,\n quantity: 1,\n } as SingleLineItemSummary;\n });\n};\n\nexport const calculateWholeQtyLineItemTax = (\n itemSummary: LineItemSummary,\n taxRate: TaxRate,\n): Dino => {\n console.log(\"XXX - INSIDE\");\n\n // Nothing to calculate\n if (taxRate === 0) {\n return getDinero(0, itemSummary.currency);\n }\n\n /**\n * Historically we calculate the tax by using dinero allocation, but we did not have control over how we round things.\n * So instead as we are already working with currency in cents we can multiply and round it ourselves.\n */\n return dinero({\n amount: Round.Financial(itemSummary.taxableAmount * taxRate),\n currency: getDineroCurrency(itemSummary.currency),\n });\n};\n\nexport const calculatePerQtyLineItemTax = (\n itemSummary: LineItemSummary,\n taxRate: TaxRate,\n): Dino => {\n // Nothing to calculate\n if (taxRate === 0) {\n return getDinero(0, itemSummary.currency);\n }\n\n // Split the item summary into per individual item qty summaries\n const singleItemSummaries = allocatePerItemTaxableAmount(itemSummary);\n\n // Calculate individual item qty tax and sum them up\n let totalTaxAmount = getDinero(0, itemSummary.currency);\n\n singleItemSummaries.forEach((itemSummary) => {\n // Probably a bit confusing at first, but calling the whole qty tax calculation function here as we can safely use\n // it as item summary is always a single item summary here\n const taxAmount = calculateWholeQtyLineItemTax(itemSummary, taxRate);\n totalTaxAmount = add(totalTaxAmount, taxAmount);\n });\n\n return totalTaxAmount;\n};\n"],"names":["allocatePerItemTaxableAmount","itemSummary","quantity","preDiscountAmount","add","getDinero","taxableAmount","currency","discountAmount","allocator","FixedAmountAllocator","initialAllocateAmount","initialTotalAmount","amount","Array","from","length","discountAllocatedAmount","allocate","itemPrice","subtract","calculateWholeQtyLineItemTax","taxRate","console","log","dinero","Round","Financial","getDineroCurrency","calculatePerQtyLineItemTax","singleItemSummaries","totalTaxAmount","forEach","taxAmount"],"mappings":";;;;;AAoBa,MAAAA,4BAAA,GACXC,WAC4B,IAAA;EAIxB,IAAAA,WAAA,CAAYC,aAAa,CAAG,EAAA;IAC9B,OAAO,CAACD,WAAoC,CAAA;EAAA;EAI9C,MAAME,iBAAoB,GAAAC,GAAA,CACxBC,SAAU,CAAAJ,WAAA,CAAYK,aAAe,EAAAL,WAAA,CAAYM,QAAQ,CAAA,EACzDF,SAAU,CAAAJ,WAAA,CAAYO,cAAgB,EAAAP,WAAA,CAAYM,QAAQ,CAC5D,CAAA;EAEM,MAAAE,SAAA,GAAY,IAAIC,oBAAqB,CAAA;IACzCC,uBAAuBV,WAAY,CAAAO,cAAA;IACnCI,kBAAA,EAAoBC,OAAOV,iBAAiB,CAAA;IAC5CI,UAAUN,WAAY,CAAAM;EAAA,CACvB,CAAA;EAGD,OAAOO,MAAMC,IAAK,CAAA;IAAEC,QAAQf,WAAY,CAAAC;EAAA,GAAY,MAAM;IACxD,MAAMe,0BAA0BR,SAAU,CAAAS,QAAA,CACxCjB,WAAY,CAAAkB,SAAA,EACZlB,WAAY,CAAAM,QACd,CAAA;IAEA,MAAMD,aAAgB,GAAAc,QAAA,CACpBf,SAAU,CAAAJ,WAAA,CAAYkB,SAAW,EAAAlB,WAAA,CAAYM,QAAQ,CAAA,EACrDU,uBACF,CAAA;IAEO,OAAA;MACLE,WAAWlB,WAAY,CAAAkB,SAAA;MACvBb,aAAA,EAAeO,OAAOP,aAAa,CAAA;MACnCE,cAAA,EAAgBK,OAAOI,uBAAuB,CAAA;MAC9CV,UAAUN,WAAY,CAAAM,QAAA;MACtBL,QAAU,EAAA;IACZ,CAAA;EAAA,CACD,CAAA;AACH,CAAA;AAEa,MAAAmB,4BAAA,GAA+BA,CAC1CpB,WAAA,EACAqB,OACS,KAAA;EACTC,OAAA,CAAQC,IAAI,cAAc,CAAA;EAG1B,IAAIF,YAAY,CAAG,EAAA;IACV,OAAAjB,SAAA,CAAU,CAAG,EAAAJ,WAAA,CAAYM,QAAQ,CAAA;EAAA;EAO1C,OAAOkB,MAAO,CAAA;IACZZ,MAAQ,EAAAa,KAAA,CAAMC,SAAU,CAAA1B,WAAA,CAAYK,gBAAgBgB,OAAO,CAAA;IAC3Df,QAAA,EAAUqB,iBAAkB,CAAA3B,WAAA,CAAYM,QAAQ;EAAA,CACjD,CAAA;AACH,CAAA;AAEa,MAAAsB,0BAAA,GAA6BA,CACxC5B,WAAA,EACAqB,OACS,KAAA;EAET,IAAIA,YAAY,CAAG,EAAA;IACV,OAAAjB,SAAA,CAAU,CAAG,EAAAJ,WAAA,CAAYM,QAAQ,CAAA;EAAA;EAIpC,MAAAuB,mBAAA,GAAsB9B,6BAA6BC,WAAW,CAAA;EAGpE,IAAI8B,cAAiB,GAAA1B,SAAA,CAAU,CAAG,EAAAJ,WAAA,CAAYM,QAAQ,CAAA;EAElCuB,mBAAA,CAAAE,OAAA,CAAS/B,YAAgB,IAAA;IAGrC,MAAAgC,SAAA,GAAYZ,4BAA6BpB,CAAAA,YAAAA,EAAaqB,OAAO,CAAA;IAClDS,cAAA,GAAA3B,GAAA,CAAI2B,gBAAgBE,SAAS,CAAA;EAAA,CAC/C,CAAA;EAEM,OAAAF,cAAA;AACT,CAAA;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ubnt/store.core",
3
- "version": "11.11.0",
3
+ "version": "11.12.0-aigars1.0",
4
4
  "description": "",
5
5
  "sideEffects": false,
6
6
  "scripts": {