@erpsquad/common 1.8.47 → 1.8.48

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 (637) hide show
  1. package/dist/_virtual/index/index.esm.js +2 -4
  2. package/dist/_virtual/index/index.esm.js.map +1 -1
  3. package/dist/_virtual/index/index.esm10.js +3 -3
  4. package/dist/_virtual/index/index.esm11.js +3 -3
  5. package/dist/_virtual/index/index.esm2.js +2 -2
  6. package/dist/_virtual/index/index.esm3.js +4 -2
  7. package/dist/_virtual/index/index.esm3.js.map +1 -1
  8. package/dist/_virtual/index/index.esm4.js +1 -1
  9. package/dist/_virtual/index/index.esm5.js +3 -3
  10. package/dist/_virtual/index/index.esm6.js +3 -3
  11. package/dist/_virtual/index/index.esm7.js +3 -3
  12. package/dist/_virtual/index/index.esm8.js +3 -3
  13. package/dist/_virtual/index/index.esm9.js +3 -3
  14. package/dist/_virtual/index/index.js +1 -1
  15. package/dist/_virtual/index/index10.js +1 -1
  16. package/dist/_virtual/index/index11.js +1 -1
  17. package/dist/_virtual/index/index3.js +1 -1
  18. package/dist/_virtual/index/index4.js +1 -1
  19. package/dist/_virtual/index/index5.js +1 -1
  20. package/dist/_virtual/index/index6.js +1 -1
  21. package/dist/_virtual/index/index7.js +1 -1
  22. package/dist/_virtual/index/index8.js +1 -1
  23. package/dist/_virtual/index/index9.js +1 -1
  24. package/dist/components/activity-tag/activity-tag/index.esm.js +154 -0
  25. package/dist/components/activity-tag/activity-tag/index.esm.js.map +1 -0
  26. package/dist/components/activity-tag/activity-tag/index.js +15 -0
  27. package/dist/components/activity-tag/activity-tag/index.js.map +1 -0
  28. package/dist/components/activityLog/activity-log/index.esm.js +104 -0
  29. package/dist/components/activityLog/activity-log/index.esm.js.map +1 -0
  30. package/dist/components/activityLog/activity-log/index.js +14 -0
  31. package/dist/components/activityLog/activity-log/index.js.map +1 -0
  32. package/dist/components/charts/bar-chart/bar-chart/index.esm.js +86 -0
  33. package/dist/components/charts/bar-chart/bar-chart/index.esm.js.map +1 -0
  34. package/dist/components/charts/bar-chart/bar-chart/index.js +2 -0
  35. package/dist/components/charts/bar-chart/bar-chart/index.js.map +1 -0
  36. package/dist/components/charts/barChart/barChart/index.esm.js +148 -0
  37. package/dist/components/charts/barChart/barChart/index.esm.js.map +1 -0
  38. package/dist/components/charts/barChart/barChart/index.js +2 -0
  39. package/dist/components/charts/barChart/barChart/index.js.map +1 -0
  40. package/dist/components/charts/donut-chart/donut-chart/index.esm.js +86 -0
  41. package/dist/components/charts/donut-chart/donut-chart/index.esm.js.map +1 -0
  42. package/dist/components/charts/donut-chart/donut-chart/index.js +6 -0
  43. package/dist/components/charts/donut-chart/donut-chart/index.js.map +1 -0
  44. package/dist/components/charts/donut-chart/donut-chart.d.ts +1 -2
  45. package/dist/components/charts/donutChart/DonutChart/index.esm.js +97 -0
  46. package/dist/components/charts/donutChart/DonutChart/index.esm.js.map +1 -0
  47. package/dist/components/charts/donutChart/DonutChart/index.js +5 -0
  48. package/dist/components/charts/donutChart/DonutChart/index.js.map +1 -0
  49. package/dist/components/charts/index.d.ts +8 -0
  50. package/dist/components/confirm-modal/confirm-modal/index.esm.js.map +1 -1
  51. package/dist/components/confirm-modal/confirm-modal/index.js.map +1 -1
  52. package/dist/components/confirm-modal/confirm-modal.d.ts +1 -2
  53. package/dist/components/confirm-modal/index.d.ts +1 -0
  54. package/dist/components/editor/custom-editor/index.esm.js +96 -67
  55. package/dist/components/editor/custom-editor/index.esm.js.map +1 -1
  56. package/dist/components/editor/custom-editor/index.js +3 -3
  57. package/dist/components/editor/custom-editor/index.js.map +1 -1
  58. package/dist/components/editor/custom-editor.d.ts +12 -8
  59. package/dist/components/footer/footer/index.esm.js +1 -1
  60. package/dist/components/footer/footer/index.js +2 -2
  61. package/dist/components/footer/footer/index.js.map +1 -1
  62. package/dist/components/form-control/form-parser/form-parser/index.esm.js +1 -1
  63. package/dist/components/form-control/form-parser/form-parser/index.js +4 -4
  64. package/dist/components/form-control/form-parser/form-parser/index.js.map +1 -1
  65. package/dist/components/grid/grid-card/grid-card/index.esm.js +4 -2
  66. package/dist/components/grid/grid-card/grid-card/index.esm.js.map +1 -1
  67. package/dist/components/grid/grid-card/grid-card/index.js +10 -11
  68. package/dist/components/grid/grid-card/grid-card/index.js.map +1 -1
  69. package/dist/components/grid/grid-card/grid-card.d.ts +10 -1
  70. package/dist/components/header/redux/reducer/index.esm.js +1 -6
  71. package/dist/components/header/redux/reducer/index.esm.js.map +1 -1
  72. package/dist/components/header/redux/reducer/index.js +1 -1
  73. package/dist/components/header/redux/reducer/index.js.map +1 -1
  74. package/dist/components/index.d.ts +293 -106
  75. package/dist/components/index.esm.js +447 -254
  76. package/dist/components/index.esm.js.map +1 -1
  77. package/dist/components/index.js +1 -1
  78. package/dist/components/inventory-reports-title-bar/component/reportFilter.d.ts +3 -2
  79. package/dist/components/inventory-reports-title-bar/inventory-reports-title-bar/index.esm.js +1 -1
  80. package/dist/components/inventory-reports-title-bar/inventory-reports-title-bar/index.js +1 -1
  81. package/dist/components/inventory-reports-title-bar/inventory-reports-title-bar/index.js.map +1 -1
  82. package/dist/components/inventory-reports-title-bar/redux/reducer/index.esm.js +0 -2
  83. package/dist/components/inventory-reports-title-bar/redux/reducer/index.esm.js.map +1 -1
  84. package/dist/components/inventory-reports-title-bar/redux/reducer/index.js +1 -1
  85. package/dist/components/inventory-reports-title-bar/redux/reducer/index.js.map +1 -1
  86. package/dist/components/list/list/index.esm.js +3 -2
  87. package/dist/components/list/list/index.esm.js.map +1 -1
  88. package/dist/components/list/list/index.js +2 -2
  89. package/dist/components/list/list/index.js.map +1 -1
  90. package/dist/components/list/list.d.ts +2 -1
  91. package/dist/components/listing/listing/index.esm.js +1 -1
  92. package/dist/components/listing/listing/index.js +1 -1
  93. package/dist/components/listing/listing/index.js.map +1 -1
  94. package/dist/components/module-button/module-button/index.esm.js +3 -2
  95. package/dist/components/module-button/module-button/index.esm.js.map +1 -1
  96. package/dist/components/module-button/module-button/index.js +4 -4
  97. package/dist/components/module-button/module-button/index.js.map +1 -1
  98. package/dist/components/module-button/module-button.d.ts +10 -1
  99. package/dist/components/mulitline/multiline/index.esm.js +3 -2
  100. package/dist/components/mulitline/multiline/index.esm.js.map +1 -1
  101. package/dist/components/mulitline/multiline/index.js +9 -9
  102. package/dist/components/mulitline/multiline/index.js.map +1 -1
  103. package/dist/components/mulitline/multiline.d.ts +2 -2
  104. package/dist/components/page-navigator/page-navigator/index.esm.js +4 -3
  105. package/dist/components/page-navigator/page-navigator/index.esm.js.map +1 -1
  106. package/dist/components/page-navigator/page-navigator/index.js +5 -5
  107. package/dist/components/page-navigator/page-navigator/index.js.map +1 -1
  108. package/dist/components/page-navigator/page-navigator.d.ts +3 -3
  109. package/dist/components/parties-modal/parties-modal/index.esm.js +4 -3
  110. package/dist/components/parties-modal/parties-modal/index.esm.js.map +1 -1
  111. package/dist/components/parties-modal/parties-modal/index.js +13 -13
  112. package/dist/components/parties-modal/parties-modal/index.js.map +1 -1
  113. package/dist/components/parties-modal/parties-modal.d.ts +3 -3
  114. package/dist/components/reports-title-bar/redux/reducer/index.esm.js +0 -2
  115. package/dist/components/reports-title-bar/redux/reducer/index.esm.js.map +1 -1
  116. package/dist/components/reports-title-bar/redux/reducer/index.js +1 -1
  117. package/dist/components/reports-title-bar/redux/reducer/index.js.map +1 -1
  118. package/dist/components/reports-title-bar/reports-title-bar/index.esm.js +1 -1
  119. package/dist/components/reports-title-bar/reports-title-bar/index.js +1 -1
  120. package/dist/components/reports-title-bar/reports-title-bar/index.js.map +1 -1
  121. package/dist/components/rfq-response/item-response-details/index.esm.js +40 -48
  122. package/dist/components/rfq-response/item-response-details/index.esm.js.map +1 -1
  123. package/dist/components/rfq-response/item-response-details/index.js +4 -4
  124. package/dist/components/rfq-response/item-response-details/index.js.map +1 -1
  125. package/dist/components/rfq-response/item-response-details.d.ts +2 -1
  126. package/dist/components/schedule-report/utils/common/index.esm.js +1 -1
  127. package/dist/components/share-modal/redux/reducer/index.esm.js +0 -2
  128. package/dist/components/share-modal/redux/reducer/index.esm.js.map +1 -1
  129. package/dist/components/share-modal/redux/reducer/index.js +1 -1
  130. package/dist/components/share-modal/redux/reducer/index.js.map +1 -1
  131. package/dist/components/tab-bar-ui/tab-bar-ui/index.esm.js +4 -10
  132. package/dist/components/tab-bar-ui/tab-bar-ui/index.esm.js.map +1 -1
  133. package/dist/components/tab-bar-ui/tab-bar-ui/index.js +3 -3
  134. package/dist/components/tab-bar-ui/tab-bar-ui/index.js.map +1 -1
  135. package/dist/components/tab-bar-ui/tab-bar-ui.d.ts +3 -3
  136. package/dist/components/tabs/tabs/index.esm.js +3 -2
  137. package/dist/components/tabs/tabs/index.esm.js.map +1 -1
  138. package/dist/components/tabs/tabs/index.js +3 -3
  139. package/dist/components/tabs/tabs/index.js.map +1 -1
  140. package/dist/components/tabs/tabs.d.ts +2 -2
  141. package/dist/hooks/index.esm.js +4 -4
  142. package/dist/hooks/index.js +1 -1
  143. package/dist/hooks/use-translations/index.esm.js +4 -3
  144. package/dist/hooks/use-translations/index.esm.js.map +1 -1
  145. package/dist/hooks/use-translations/index.js +1 -1
  146. package/dist/hooks/use-translations/index.js.map +1 -1
  147. package/dist/hooks/use-translations.d.ts +2 -1
  148. package/dist/hooks/useCheckSkuAndName/index.esm.js +5 -4
  149. package/dist/hooks/useCheckSkuAndName/index.esm.js.map +1 -1
  150. package/dist/hooks/useCheckSkuAndName/index.js +1 -1
  151. package/dist/hooks/useCheckSkuAndName/index.js.map +1 -1
  152. package/dist/hooks/useCheckSkuAndName.d.ts +4 -2
  153. package/dist/index.esm.js +525 -315
  154. package/dist/index.esm.js.map +1 -1
  155. package/dist/index.js +1 -1
  156. package/dist/layout/fullScreen/fullScreen/index.esm.js +5 -3
  157. package/dist/layout/fullScreen/fullScreen/index.esm.js.map +1 -1
  158. package/dist/layout/fullScreen/fullScreen/index.js +3 -3
  159. package/dist/layout/fullScreen/fullScreen/index.js.map +1 -1
  160. package/dist/layout/fullScreen/fullScreen.d.ts +5 -1
  161. package/dist/layout/index.esm.js +4 -4
  162. package/dist/layout/index.js +1 -1
  163. package/dist/layout/sidebarScreen/sidebarScreen/index.esm.js +72 -50
  164. package/dist/layout/sidebarScreen/sidebarScreen/index.esm.js.map +1 -1
  165. package/dist/layout/sidebarScreen/sidebarScreen/index.js +4 -4
  166. package/dist/layout/sidebarScreen/sidebarScreen/index.js.map +1 -1
  167. package/dist/layout/sidebarScreen/sidebarScreen.d.ts +3 -3
  168. package/dist/node_modules/@asseinfo/react-kanban/dist/index/index.esm.js +1 -1
  169. package/dist/node_modules/@asseinfo/react-kanban/dist/index/index.js +1 -1
  170. package/dist/node_modules/@mui/icons-material/utils/createSvgIcon/index.esm.js +1 -1
  171. package/dist/node_modules/@mui/icons-material/utils/createSvgIcon/index.js +1 -1
  172. package/dist/node_modules/@mui/icons-material/utils/createSvgIcon/index.js.map +1 -1
  173. package/dist/node_modules/@mui/lab/Timeline/Timeline/index.esm.js +95 -0
  174. package/dist/node_modules/@mui/lab/Timeline/Timeline/index.esm.js.map +1 -0
  175. package/dist/node_modules/@mui/lab/Timeline/Timeline/index.js +3 -0
  176. package/dist/node_modules/@mui/lab/Timeline/Timeline/index.js.map +1 -0
  177. package/dist/node_modules/@mui/lab/Timeline/TimelineContext/index.esm.js +10 -0
  178. package/dist/node_modules/@mui/lab/Timeline/TimelineContext/index.esm.js.map +1 -0
  179. package/dist/node_modules/@mui/lab/Timeline/TimelineContext/index.js +2 -0
  180. package/dist/node_modules/@mui/lab/Timeline/TimelineContext/index.js.map +1 -0
  181. package/dist/node_modules/@mui/lab/Timeline/timelineClasses/index.esm.js +10 -0
  182. package/dist/node_modules/@mui/lab/Timeline/timelineClasses/index.esm.js.map +1 -0
  183. package/dist/node_modules/@mui/lab/Timeline/timelineClasses/index.js +2 -0
  184. package/dist/node_modules/@mui/lab/Timeline/timelineClasses/index.js.map +1 -0
  185. package/dist/node_modules/@mui/lab/TimelineConnector/TimelineConnector/index.esm.js +76 -0
  186. package/dist/node_modules/@mui/lab/TimelineConnector/TimelineConnector/index.esm.js.map +1 -0
  187. package/dist/node_modules/@mui/lab/TimelineConnector/TimelineConnector/index.js +3 -0
  188. package/dist/node_modules/@mui/lab/TimelineConnector/TimelineConnector/index.js.map +1 -0
  189. package/dist/node_modules/@mui/lab/TimelineConnector/timelineConnectorClasses/index.esm.js +10 -0
  190. package/dist/node_modules/@mui/lab/TimelineConnector/timelineConnectorClasses/index.esm.js.map +1 -0
  191. package/dist/node_modules/@mui/lab/TimelineConnector/timelineConnectorClasses/index.js +2 -0
  192. package/dist/node_modules/@mui/lab/TimelineConnector/timelineConnectorClasses/index.js.map +1 -0
  193. package/dist/node_modules/@mui/lab/TimelineContent/TimelineContent/index.esm.js +91 -0
  194. package/dist/node_modules/@mui/lab/TimelineContent/TimelineContent/index.esm.js.map +1 -0
  195. package/dist/node_modules/@mui/lab/TimelineContent/TimelineContent/index.js +3 -0
  196. package/dist/node_modules/@mui/lab/TimelineContent/TimelineContent/index.js.map +1 -0
  197. package/dist/node_modules/@mui/lab/TimelineContent/timelineContentClasses/index.esm.js +11 -0
  198. package/dist/node_modules/@mui/lab/TimelineContent/timelineContentClasses/index.esm.js.map +1 -0
  199. package/dist/node_modules/@mui/lab/TimelineContent/timelineContentClasses/index.js +2 -0
  200. package/dist/node_modules/@mui/lab/TimelineContent/timelineContentClasses/index.js.map +1 -0
  201. package/dist/node_modules/@mui/lab/TimelineDot/TimelineDot/index.esm.js +118 -0
  202. package/dist/node_modules/@mui/lab/TimelineDot/TimelineDot/index.esm.js.map +1 -0
  203. package/dist/node_modules/@mui/lab/TimelineDot/TimelineDot/index.js +3 -0
  204. package/dist/node_modules/@mui/lab/TimelineDot/TimelineDot/index.js.map +1 -0
  205. package/dist/node_modules/@mui/lab/TimelineDot/timelineDotClasses/index.esm.js +10 -0
  206. package/dist/node_modules/@mui/lab/TimelineDot/timelineDotClasses/index.esm.js.map +1 -0
  207. package/dist/node_modules/@mui/lab/TimelineDot/timelineDotClasses/index.js +2 -0
  208. package/dist/node_modules/@mui/lab/TimelineDot/timelineDotClasses/index.js.map +1 -0
  209. package/dist/node_modules/@mui/lab/TimelineItem/TimelineItem/index.esm.js +128 -0
  210. package/dist/node_modules/@mui/lab/TimelineItem/TimelineItem/index.esm.js.map +1 -0
  211. package/dist/node_modules/@mui/lab/TimelineItem/TimelineItem/index.js +3 -0
  212. package/dist/node_modules/@mui/lab/TimelineItem/TimelineItem/index.js.map +1 -0
  213. package/dist/node_modules/@mui/lab/TimelineItem/timelineItemClasses/index.esm.js +10 -0
  214. package/dist/node_modules/@mui/lab/TimelineItem/timelineItemClasses/index.esm.js.map +1 -0
  215. package/dist/node_modules/@mui/lab/TimelineItem/timelineItemClasses/index.js +2 -0
  216. package/dist/node_modules/@mui/lab/TimelineItem/timelineItemClasses/index.js.map +1 -0
  217. package/dist/node_modules/@mui/lab/TimelineOppositeContent/timelineOppositeContentClasses/index.esm.js +6 -0
  218. package/dist/node_modules/@mui/lab/TimelineOppositeContent/timelineOppositeContentClasses/index.esm.js.map +1 -0
  219. package/dist/node_modules/@mui/lab/TimelineOppositeContent/timelineOppositeContentClasses/index.js +2 -0
  220. package/dist/node_modules/@mui/lab/TimelineOppositeContent/timelineOppositeContentClasses/index.js.map +1 -0
  221. package/dist/node_modules/@mui/lab/TimelineSeparator/TimelineSeparator/index.esm.js +73 -0
  222. package/dist/node_modules/@mui/lab/TimelineSeparator/TimelineSeparator/index.esm.js.map +1 -0
  223. package/dist/node_modules/@mui/lab/TimelineSeparator/TimelineSeparator/index.js +3 -0
  224. package/dist/node_modules/@mui/lab/TimelineSeparator/TimelineSeparator/index.js.map +1 -0
  225. package/dist/node_modules/@mui/lab/TimelineSeparator/timelineSeparatorClasses/index.esm.js +10 -0
  226. package/dist/node_modules/@mui/lab/TimelineSeparator/timelineSeparatorClasses/index.esm.js.map +1 -0
  227. package/dist/node_modules/@mui/lab/TimelineSeparator/timelineSeparatorClasses/index.js +2 -0
  228. package/dist/node_modules/@mui/lab/TimelineSeparator/timelineSeparatorClasses/index.js.map +1 -0
  229. package/dist/node_modules/@mui/lab/internal/convertTimelinePositionToClass/index.esm.js +8 -0
  230. package/dist/node_modules/@mui/lab/internal/convertTimelinePositionToClass/index.esm.js.map +1 -0
  231. package/dist/node_modules/@mui/lab/internal/convertTimelinePositionToClass/index.js +2 -0
  232. package/dist/node_modules/@mui/lab/internal/convertTimelinePositionToClass/index.js.map +1 -0
  233. package/dist/node_modules/@mui/material/AccordionActions/AccordionActions/index.esm.js +95 -0
  234. package/dist/node_modules/@mui/material/AccordionActions/AccordionActions/index.esm.js.map +1 -0
  235. package/dist/node_modules/@mui/material/AccordionActions/AccordionActions/index.js +3 -0
  236. package/dist/node_modules/@mui/material/AccordionActions/AccordionActions/index.js.map +1 -0
  237. package/dist/node_modules/@mui/material/AccordionActions/accordionActionsClasses/index.esm.js +10 -0
  238. package/dist/node_modules/@mui/material/AccordionActions/accordionActionsClasses/index.esm.js.map +1 -0
  239. package/dist/node_modules/@mui/material/AccordionActions/accordionActionsClasses/index.js +2 -0
  240. package/dist/node_modules/@mui/material/AccordionActions/accordionActionsClasses/index.js.map +1 -0
  241. package/dist/node_modules/@mui/material/Avatar/avatarClasses/index.esm.js +3 -2
  242. package/dist/node_modules/@mui/material/Avatar/avatarClasses/index.esm.js.map +1 -1
  243. package/dist/node_modules/@mui/material/Avatar/avatarClasses/index.js +1 -1
  244. package/dist/node_modules/@mui/material/Avatar/avatarClasses/index.js.map +1 -1
  245. package/dist/node_modules/@mui/material/AvatarGroup/AvatarGroup/index.esm.js +201 -0
  246. package/dist/node_modules/@mui/material/AvatarGroup/AvatarGroup/index.esm.js.map +1 -0
  247. package/dist/node_modules/@mui/material/AvatarGroup/AvatarGroup/index.js +3 -0
  248. package/dist/node_modules/@mui/material/AvatarGroup/AvatarGroup/index.js.map +1 -0
  249. package/dist/node_modules/@mui/material/AvatarGroup/avatarGroupClasses/index.esm.js +11 -0
  250. package/dist/node_modules/@mui/material/AvatarGroup/avatarGroupClasses/index.esm.js.map +1 -0
  251. package/dist/node_modules/@mui/material/AvatarGroup/avatarGroupClasses/index.js +2 -0
  252. package/dist/node_modules/@mui/material/AvatarGroup/avatarGroupClasses/index.js.map +1 -0
  253. package/dist/node_modules/@mui/material/BottomNavigation/BottomNavigation/index.esm.js +125 -0
  254. package/dist/node_modules/@mui/material/BottomNavigation/BottomNavigation/index.esm.js.map +1 -0
  255. package/dist/node_modules/@mui/material/BottomNavigation/BottomNavigation/index.js +4 -0
  256. package/dist/node_modules/@mui/material/BottomNavigation/BottomNavigation/index.js.map +1 -0
  257. package/dist/node_modules/@mui/material/BottomNavigation/bottomNavigationClasses/index.esm.js +10 -0
  258. package/dist/node_modules/@mui/material/BottomNavigation/bottomNavigationClasses/index.esm.js.map +1 -0
  259. package/dist/node_modules/@mui/material/BottomNavigation/bottomNavigationClasses/index.js +2 -0
  260. package/dist/node_modules/@mui/material/BottomNavigation/bottomNavigationClasses/index.js.map +1 -0
  261. package/dist/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction/index.esm.js +170 -0
  262. package/dist/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction/index.esm.js.map +1 -0
  263. package/dist/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction/index.js +3 -0
  264. package/dist/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction/index.js.map +1 -0
  265. package/dist/node_modules/@mui/material/BottomNavigationAction/bottomNavigationActionClasses/index.esm.js +11 -0
  266. package/dist/node_modules/@mui/material/BottomNavigationAction/bottomNavigationActionClasses/index.esm.js.map +1 -0
  267. package/dist/node_modules/@mui/material/BottomNavigationAction/bottomNavigationActionClasses/index.js +2 -0
  268. package/dist/node_modules/@mui/material/BottomNavigationAction/bottomNavigationActionClasses/index.js.map +1 -0
  269. package/dist/node_modules/@mui/material/CardActionArea/CardActionArea/index.esm.js +120 -0
  270. package/dist/node_modules/@mui/material/CardActionArea/CardActionArea/index.esm.js.map +1 -0
  271. package/dist/node_modules/@mui/material/CardActionArea/CardActionArea/index.js +3 -0
  272. package/dist/node_modules/@mui/material/CardActionArea/CardActionArea/index.js.map +1 -0
  273. package/dist/node_modules/@mui/material/CardActionArea/cardActionAreaClasses/index.esm.js +11 -0
  274. package/dist/node_modules/@mui/material/CardActionArea/cardActionAreaClasses/index.esm.js.map +1 -0
  275. package/dist/node_modules/@mui/material/CardActionArea/cardActionAreaClasses/index.js +2 -0
  276. package/dist/node_modules/@mui/material/CardActionArea/cardActionAreaClasses/index.js.map +1 -0
  277. package/dist/node_modules/@mui/material/CardActions/CardActions/index.esm.js +92 -0
  278. package/dist/node_modules/@mui/material/CardActions/CardActions/index.esm.js.map +1 -0
  279. package/dist/node_modules/@mui/material/CardActions/CardActions/index.js +3 -0
  280. package/dist/node_modules/@mui/material/CardActions/CardActions/index.js.map +1 -0
  281. package/dist/node_modules/@mui/material/CardActions/cardActionsClasses/index.esm.js +10 -0
  282. package/dist/node_modules/@mui/material/CardActions/cardActionsClasses/index.esm.js.map +1 -0
  283. package/dist/node_modules/@mui/material/CardActions/cardActionsClasses/index.js +2 -0
  284. package/dist/node_modules/@mui/material/CardActions/cardActionsClasses/index.js.map +1 -0
  285. package/dist/node_modules/@mui/material/CardHeader/CardHeader/index.esm.js +196 -0
  286. package/dist/node_modules/@mui/material/CardHeader/CardHeader/index.esm.js.map +1 -0
  287. package/dist/node_modules/@mui/material/CardHeader/CardHeader/index.js +2 -0
  288. package/dist/node_modules/@mui/material/CardHeader/CardHeader/index.js.map +1 -0
  289. package/dist/node_modules/@mui/material/CardHeader/cardHeaderClasses/index.esm.js +11 -0
  290. package/dist/node_modules/@mui/material/CardHeader/cardHeaderClasses/index.esm.js.map +1 -0
  291. package/dist/node_modules/@mui/material/CardHeader/cardHeaderClasses/index.js +2 -0
  292. package/dist/node_modules/@mui/material/CardHeader/cardHeaderClasses/index.js.map +1 -0
  293. package/dist/node_modules/@mui/material/DialogContentText/DialogContentText/index.esm.js +76 -0
  294. package/dist/node_modules/@mui/material/DialogContentText/DialogContentText/index.esm.js.map +1 -0
  295. package/dist/node_modules/@mui/material/DialogContentText/DialogContentText/index.js +3 -0
  296. package/dist/node_modules/@mui/material/DialogContentText/DialogContentText/index.js.map +1 -0
  297. package/dist/node_modules/@mui/material/DialogContentText/dialogContentTextClasses/index.esm.js +10 -0
  298. package/dist/node_modules/@mui/material/DialogContentText/dialogContentTextClasses/index.esm.js.map +1 -0
  299. package/dist/node_modules/@mui/material/DialogContentText/dialogContentTextClasses/index.js +2 -0
  300. package/dist/node_modules/@mui/material/DialogContentText/dialogContentTextClasses/index.js.map +1 -0
  301. package/dist/node_modules/@mui/material/Fab/Fab/index.esm.js +231 -0
  302. package/dist/node_modules/@mui/material/Fab/Fab/index.esm.js.map +1 -0
  303. package/dist/node_modules/@mui/material/Fab/Fab/index.js +3 -0
  304. package/dist/node_modules/@mui/material/Fab/Fab/index.js.map +1 -0
  305. package/dist/node_modules/@mui/material/Fab/fabClasses/index.esm.js +11 -0
  306. package/dist/node_modules/@mui/material/Fab/fabClasses/index.esm.js.map +1 -0
  307. package/dist/node_modules/@mui/material/Fab/fabClasses/index.js +2 -0
  308. package/dist/node_modules/@mui/material/Fab/fabClasses/index.js.map +1 -0
  309. package/dist/node_modules/@mui/material/Hidden/Hidden/index.esm.js +135 -0
  310. package/dist/node_modules/@mui/material/Hidden/Hidden/index.esm.js.map +1 -0
  311. package/dist/node_modules/@mui/material/Hidden/Hidden/index.js +2 -0
  312. package/dist/node_modules/@mui/material/Hidden/Hidden/index.js.map +1 -0
  313. package/dist/node_modules/@mui/material/Hidden/HiddenCss/index.esm.js +176 -0
  314. package/dist/node_modules/@mui/material/Hidden/HiddenCss/index.esm.js.map +1 -0
  315. package/dist/node_modules/@mui/material/Hidden/HiddenCss/index.js +3 -0
  316. package/dist/node_modules/@mui/material/Hidden/HiddenCss/index.js.map +1 -0
  317. package/dist/node_modules/@mui/material/Hidden/HiddenJs/index.esm.js +119 -0
  318. package/dist/node_modules/@mui/material/Hidden/HiddenJs/index.esm.js.map +1 -0
  319. package/dist/node_modules/@mui/material/Hidden/HiddenJs/index.js +2 -0
  320. package/dist/node_modules/@mui/material/Hidden/HiddenJs/index.js.map +1 -0
  321. package/dist/node_modules/@mui/material/Hidden/hiddenCssClasses/index.esm.js +10 -0
  322. package/dist/node_modules/@mui/material/Hidden/hiddenCssClasses/index.esm.js.map +1 -0
  323. package/dist/node_modules/@mui/material/Hidden/hiddenCssClasses/index.js +2 -0
  324. package/dist/node_modules/@mui/material/Hidden/hiddenCssClasses/index.js.map +1 -0
  325. package/dist/node_modules/@mui/material/Hidden/withWidth/index.esm.js +92 -0
  326. package/dist/node_modules/@mui/material/Hidden/withWidth/index.esm.js.map +1 -0
  327. package/dist/node_modules/@mui/material/Hidden/withWidth/index.js +2 -0
  328. package/dist/node_modules/@mui/material/Hidden/withWidth/index.js.map +1 -0
  329. package/dist/node_modules/@mui/material/ImageList/ImageList/index.esm.js +156 -0
  330. package/dist/node_modules/@mui/material/ImageList/ImageList/index.esm.js.map +1 -0
  331. package/dist/node_modules/@mui/material/ImageList/ImageList/index.js +3 -0
  332. package/dist/node_modules/@mui/material/ImageList/ImageList/index.js.map +1 -0
  333. package/dist/node_modules/@mui/material/ImageList/ImageListContext/index.esm.js +10 -0
  334. package/dist/node_modules/@mui/material/ImageList/ImageListContext/index.esm.js.map +1 -0
  335. package/dist/node_modules/@mui/material/ImageList/ImageListContext/index.js +2 -0
  336. package/dist/node_modules/@mui/material/ImageList/ImageListContext/index.js.map +1 -0
  337. package/dist/node_modules/@mui/material/ImageList/imageListClasses/index.esm.js +10 -0
  338. package/dist/node_modules/@mui/material/ImageList/imageListClasses/index.esm.js.map +1 -0
  339. package/dist/node_modules/@mui/material/ImageList/imageListClasses/index.js +2 -0
  340. package/dist/node_modules/@mui/material/ImageList/imageListClasses/index.js.map +1 -0
  341. package/dist/node_modules/@mui/material/ImageListItem/ImageListItem/index.esm.js +173 -0
  342. package/dist/node_modules/@mui/material/ImageListItem/ImageListItem/index.esm.js.map +1 -0
  343. package/dist/node_modules/@mui/material/ImageListItem/ImageListItem/index.js +3 -0
  344. package/dist/node_modules/@mui/material/ImageListItem/ImageListItem/index.js.map +1 -0
  345. package/dist/node_modules/@mui/material/ImageListItem/imageListItemClasses/index.esm.js +11 -0
  346. package/dist/node_modules/@mui/material/ImageListItem/imageListItemClasses/index.esm.js.map +1 -0
  347. package/dist/node_modules/@mui/material/ImageListItem/imageListItemClasses/index.js +2 -0
  348. package/dist/node_modules/@mui/material/ImageListItem/imageListItemClasses/index.js.map +1 -0
  349. package/dist/node_modules/@mui/material/ImageListItemBar/ImageListItemBar/index.esm.js +222 -0
  350. package/dist/node_modules/@mui/material/ImageListItemBar/ImageListItemBar/index.esm.js.map +1 -0
  351. package/dist/node_modules/@mui/material/ImageListItemBar/ImageListItemBar/index.js +3 -0
  352. package/dist/node_modules/@mui/material/ImageListItemBar/ImageListItemBar/index.js.map +1 -0
  353. package/dist/node_modules/@mui/material/ImageListItemBar/imageListItemBarClasses/index.esm.js +10 -0
  354. package/dist/node_modules/@mui/material/ImageListItemBar/imageListItemBarClasses/index.esm.js.map +1 -0
  355. package/dist/node_modules/@mui/material/ImageListItemBar/imageListItemBarClasses/index.js +2 -0
  356. package/dist/node_modules/@mui/material/ImageListItemBar/imageListItemBarClasses/index.js.map +1 -0
  357. package/dist/node_modules/@mui/material/MobileStepper/MobileStepper/index.esm.js +216 -0
  358. package/dist/node_modules/@mui/material/MobileStepper/MobileStepper/index.esm.js.map +1 -0
  359. package/dist/node_modules/@mui/material/MobileStepper/MobileStepper/index.js +3 -0
  360. package/dist/node_modules/@mui/material/MobileStepper/MobileStepper/index.js.map +1 -0
  361. package/dist/node_modules/@mui/material/MobileStepper/mobileStepperClasses/index.esm.js +10 -0
  362. package/dist/node_modules/@mui/material/MobileStepper/mobileStepperClasses/index.esm.js.map +1 -0
  363. package/dist/node_modules/@mui/material/MobileStepper/mobileStepperClasses/index.js +2 -0
  364. package/dist/node_modules/@mui/material/MobileStepper/mobileStepperClasses/index.js.map +1 -0
  365. package/dist/node_modules/@mui/material/NativeSelect/NativeSelect/index.esm.js +126 -0
  366. package/dist/node_modules/@mui/material/NativeSelect/NativeSelect/index.esm.js.map +1 -0
  367. package/dist/node_modules/@mui/material/NativeSelect/NativeSelect/index.js +3 -0
  368. package/dist/node_modules/@mui/material/NativeSelect/NativeSelect/index.js.map +1 -0
  369. package/dist/node_modules/@mui/material/NativeSelect/nativeSelectClasses/index.esm.js +1 -1
  370. package/dist/node_modules/@mui/material/NativeSelect/nativeSelectClasses/index.js +1 -1
  371. package/dist/node_modules/@mui/material/NativeSelect/nativeSelectClasses/index.js.map +1 -1
  372. package/dist/node_modules/@mui/material/NoSsr/NoSsr/index.esm.js +55 -0
  373. package/dist/node_modules/@mui/material/NoSsr/NoSsr/index.esm.js.map +1 -0
  374. package/dist/node_modules/@mui/material/NoSsr/NoSsr/index.js +2 -0
  375. package/dist/node_modules/@mui/material/NoSsr/NoSsr/index.js.map +1 -0
  376. package/dist/node_modules/@mui/material/OutlinedInput/outlinedInputClasses/index.esm.js +1 -1
  377. package/dist/node_modules/@mui/material/OutlinedInput/outlinedInputClasses/index.js +1 -1
  378. package/dist/node_modules/@mui/material/Popover/Popover/index.esm.js +1 -1
  379. package/dist/node_modules/@mui/material/Popover/Popover/index.js +1 -1
  380. package/dist/node_modules/@mui/material/Rating/Rating/index.esm.js +638 -0
  381. package/dist/node_modules/@mui/material/Rating/Rating/index.esm.js.map +1 -0
  382. package/dist/node_modules/@mui/material/Rating/Rating/index.js +7 -0
  383. package/dist/node_modules/@mui/material/Rating/Rating/index.js.map +1 -0
  384. package/dist/node_modules/@mui/material/Rating/ratingClasses/index.esm.js +11 -0
  385. package/dist/node_modules/@mui/material/Rating/ratingClasses/index.esm.js.map +1 -0
  386. package/dist/node_modules/@mui/material/Rating/ratingClasses/index.js +2 -0
  387. package/dist/node_modules/@mui/material/Rating/ratingClasses/index.js.map +1 -0
  388. package/dist/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline/index.esm.js +105 -0
  389. package/dist/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline/index.esm.js.map +1 -0
  390. package/dist/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline/index.js +3 -0
  391. package/dist/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline/index.js.map +1 -0
  392. package/dist/node_modules/@mui/material/ScopedCssBaseline/scopedCssBaselineClasses/index.esm.js +10 -0
  393. package/dist/node_modules/@mui/material/ScopedCssBaseline/scopedCssBaselineClasses/index.esm.js.map +1 -0
  394. package/dist/node_modules/@mui/material/ScopedCssBaseline/scopedCssBaselineClasses/index.js +2 -0
  395. package/dist/node_modules/@mui/material/ScopedCssBaseline/scopedCssBaselineClasses/index.js.map +1 -0
  396. package/dist/node_modules/@mui/material/Snackbar/Snackbar/index.esm.js +1 -1
  397. package/dist/node_modules/@mui/material/Snackbar/Snackbar/index.js +1 -1
  398. package/dist/node_modules/@mui/material/SpeedDial/SpeedDial/index.esm.js +453 -0
  399. package/dist/node_modules/@mui/material/SpeedDial/SpeedDial/index.esm.js.map +1 -0
  400. package/dist/node_modules/@mui/material/SpeedDial/SpeedDial/index.js +4 -0
  401. package/dist/node_modules/@mui/material/SpeedDial/SpeedDial/index.js.map +1 -0
  402. package/dist/node_modules/@mui/material/SpeedDial/speedDialClasses/index.esm.js +11 -0
  403. package/dist/node_modules/@mui/material/SpeedDial/speedDialClasses/index.esm.js.map +1 -0
  404. package/dist/node_modules/@mui/material/SpeedDial/speedDialClasses/index.js +2 -0
  405. package/dist/node_modules/@mui/material/SpeedDial/speedDialClasses/index.js.map +1 -0
  406. package/dist/node_modules/@mui/material/SpeedDialAction/SpeedDialAction/index.esm.js +245 -0
  407. package/dist/node_modules/@mui/material/SpeedDialAction/SpeedDialAction/index.esm.js.map +1 -0
  408. package/dist/node_modules/@mui/material/SpeedDialAction/SpeedDialAction/index.js +2 -0
  409. package/dist/node_modules/@mui/material/SpeedDialAction/SpeedDialAction/index.js.map +1 -0
  410. package/dist/node_modules/@mui/material/SpeedDialAction/speedDialActionClasses/index.esm.js +11 -0
  411. package/dist/node_modules/@mui/material/SpeedDialAction/speedDialActionClasses/index.esm.js.map +1 -0
  412. package/dist/node_modules/@mui/material/SpeedDialAction/speedDialActionClasses/index.js +2 -0
  413. package/dist/node_modules/@mui/material/SpeedDialAction/speedDialActionClasses/index.js.map +1 -0
  414. package/dist/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon/index.esm.js +137 -0
  415. package/dist/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon/index.esm.js.map +1 -0
  416. package/dist/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon/index.js +4 -0
  417. package/dist/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon/index.js.map +1 -0
  418. package/dist/node_modules/@mui/material/SpeedDialIcon/speedDialIconClasses/index.esm.js +11 -0
  419. package/dist/node_modules/@mui/material/SpeedDialIcon/speedDialIconClasses/index.esm.js.map +1 -0
  420. package/dist/node_modules/@mui/material/SpeedDialIcon/speedDialIconClasses/index.js +2 -0
  421. package/dist/node_modules/@mui/material/SpeedDialIcon/speedDialIconClasses/index.js.map +1 -0
  422. package/dist/node_modules/@mui/material/Step/Step/index.esm.js +169 -0
  423. package/dist/node_modules/@mui/material/Step/Step/index.esm.js.map +1 -0
  424. package/dist/node_modules/@mui/material/Step/Step/index.js +3 -0
  425. package/dist/node_modules/@mui/material/Step/Step/index.js.map +1 -0
  426. package/dist/node_modules/@mui/material/Step/StepContext/index.esm.js +10 -0
  427. package/dist/node_modules/@mui/material/Step/StepContext/index.esm.js.map +1 -0
  428. package/dist/node_modules/@mui/material/Step/StepContext/index.js +2 -0
  429. package/dist/node_modules/@mui/material/Step/StepContext/index.js.map +1 -0
  430. package/dist/node_modules/@mui/material/Step/stepClasses/index.esm.js +10 -0
  431. package/dist/node_modules/@mui/material/Step/stepClasses/index.esm.js.map +1 -0
  432. package/dist/node_modules/@mui/material/Step/stepClasses/index.js +2 -0
  433. package/dist/node_modules/@mui/material/Step/stepClasses/index.js.map +1 -0
  434. package/dist/node_modules/@mui/material/StepButton/StepButton/index.esm.js +132 -0
  435. package/dist/node_modules/@mui/material/StepButton/StepButton/index.esm.js.map +1 -0
  436. package/dist/node_modules/@mui/material/StepButton/StepButton/index.js +3 -0
  437. package/dist/node_modules/@mui/material/StepButton/StepButton/index.js.map +1 -0
  438. package/dist/node_modules/@mui/material/StepButton/stepButtonClasses/index.esm.js +11 -0
  439. package/dist/node_modules/@mui/material/StepButton/stepButtonClasses/index.esm.js.map +1 -0
  440. package/dist/node_modules/@mui/material/StepButton/stepButtonClasses/index.js +2 -0
  441. package/dist/node_modules/@mui/material/StepButton/stepButtonClasses/index.js.map +1 -0
  442. package/dist/node_modules/@mui/material/StepConnector/StepConnector/index.esm.js +136 -0
  443. package/dist/node_modules/@mui/material/StepConnector/StepConnector/index.esm.js.map +1 -0
  444. package/dist/node_modules/@mui/material/StepConnector/StepConnector/index.js +3 -0
  445. package/dist/node_modules/@mui/material/StepConnector/StepConnector/index.js.map +1 -0
  446. package/dist/node_modules/@mui/material/StepConnector/stepConnectorClasses/index.esm.js +10 -0
  447. package/dist/node_modules/@mui/material/StepConnector/stepConnectorClasses/index.esm.js.map +1 -0
  448. package/dist/node_modules/@mui/material/StepConnector/stepConnectorClasses/index.js +2 -0
  449. package/dist/node_modules/@mui/material/StepConnector/stepConnectorClasses/index.js.map +1 -0
  450. package/dist/node_modules/@mui/material/StepContent/StepContent/index.esm.js +152 -0
  451. package/dist/node_modules/@mui/material/StepContent/StepContent/index.esm.js.map +1 -0
  452. package/dist/node_modules/@mui/material/StepContent/StepContent/index.js +2 -0
  453. package/dist/node_modules/@mui/material/StepContent/StepContent/index.js.map +1 -0
  454. package/dist/node_modules/@mui/material/StepContent/stepContentClasses/index.esm.js +10 -0
  455. package/dist/node_modules/@mui/material/StepContent/stepContentClasses/index.esm.js.map +1 -0
  456. package/dist/node_modules/@mui/material/StepContent/stepContentClasses/index.js +2 -0
  457. package/dist/node_modules/@mui/material/StepContent/stepContentClasses/index.js.map +1 -0
  458. package/dist/node_modules/@mui/material/StepIcon/StepIcon/index.esm.js +161 -0
  459. package/dist/node_modules/@mui/material/StepIcon/StepIcon/index.esm.js.map +1 -0
  460. package/dist/node_modules/@mui/material/StepIcon/StepIcon/index.js +2 -0
  461. package/dist/node_modules/@mui/material/StepIcon/StepIcon/index.js.map +1 -0
  462. package/dist/node_modules/@mui/material/StepIcon/stepIconClasses/index.esm.js +11 -0
  463. package/dist/node_modules/@mui/material/StepIcon/stepIconClasses/index.esm.js.map +1 -0
  464. package/dist/node_modules/@mui/material/StepIcon/stepIconClasses/index.js +2 -0
  465. package/dist/node_modules/@mui/material/StepIcon/stepIconClasses/index.js.map +1 -0
  466. package/dist/node_modules/@mui/material/StepLabel/StepLabel/index.esm.js +239 -0
  467. package/dist/node_modules/@mui/material/StepLabel/StepLabel/index.esm.js.map +1 -0
  468. package/dist/node_modules/@mui/material/StepLabel/StepLabel/index.js +3 -0
  469. package/dist/node_modules/@mui/material/StepLabel/StepLabel/index.js.map +1 -0
  470. package/dist/node_modules/@mui/material/StepLabel/stepLabelClasses/index.esm.js +11 -0
  471. package/dist/node_modules/@mui/material/StepLabel/stepLabelClasses/index.esm.js.map +1 -0
  472. package/dist/node_modules/@mui/material/StepLabel/stepLabelClasses/index.js +2 -0
  473. package/dist/node_modules/@mui/material/StepLabel/stepLabelClasses/index.js.map +1 -0
  474. package/dist/node_modules/@mui/material/Stepper/Stepper/index.esm.js +155 -0
  475. package/dist/node_modules/@mui/material/Stepper/Stepper/index.esm.js.map +1 -0
  476. package/dist/node_modules/@mui/material/Stepper/Stepper/index.js +3 -0
  477. package/dist/node_modules/@mui/material/Stepper/Stepper/index.js.map +1 -0
  478. package/dist/node_modules/@mui/material/Stepper/StepperContext/index.esm.js +10 -0
  479. package/dist/node_modules/@mui/material/Stepper/StepperContext/index.esm.js.map +1 -0
  480. package/dist/node_modules/@mui/material/Stepper/StepperContext/index.js +2 -0
  481. package/dist/node_modules/@mui/material/Stepper/StepperContext/index.js.map +1 -0
  482. package/dist/node_modules/@mui/material/Stepper/stepperClasses/index.esm.js +10 -0
  483. package/dist/node_modules/@mui/material/Stepper/stepperClasses/index.esm.js.map +1 -0
  484. package/dist/node_modules/@mui/material/Stepper/stepperClasses/index.js +2 -0
  485. package/dist/node_modules/@mui/material/Stepper/stepperClasses/index.js.map +1 -0
  486. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeArea/index.esm.js +82 -0
  487. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeArea/index.esm.js.map +1 -0
  488. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeArea/index.js +3 -0
  489. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeArea/index.js.map +1 -0
  490. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer/index.esm.js +538 -0
  491. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer/index.esm.js.map +1 -0
  492. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer/index.js +2 -0
  493. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer/index.js.map +1 -0
  494. package/dist/node_modules/@mui/material/TablePagination/TablePagination/index.esm.js +443 -0
  495. package/dist/node_modules/@mui/material/TablePagination/TablePagination/index.esm.js.map +1 -0
  496. package/dist/node_modules/@mui/material/TablePagination/TablePagination/index.js +3 -0
  497. package/dist/node_modules/@mui/material/TablePagination/TablePagination/index.js.map +1 -0
  498. package/dist/node_modules/@mui/material/TablePagination/TablePaginationActions/index.esm.js +179 -0
  499. package/dist/node_modules/@mui/material/TablePagination/TablePaginationActions/index.esm.js.map +1 -0
  500. package/dist/node_modules/@mui/material/TablePagination/TablePaginationActions/index.js +3 -0
  501. package/dist/node_modules/@mui/material/TablePagination/TablePaginationActions/index.js.map +1 -0
  502. package/dist/node_modules/@mui/material/TablePagination/tablePaginationClasses/index.esm.js +11 -0
  503. package/dist/node_modules/@mui/material/TablePagination/tablePaginationClasses/index.esm.js.map +1 -0
  504. package/dist/node_modules/@mui/material/TablePagination/tablePaginationClasses/index.js +2 -0
  505. package/dist/node_modules/@mui/material/TablePagination/tablePaginationClasses/index.js.map +1 -0
  506. package/dist/node_modules/@mui/material/Tabs/Tabs/index.esm.js +1 -1
  507. package/dist/node_modules/@mui/material/Tabs/Tabs/index.js +1 -1
  508. package/dist/node_modules/@mui/material/Zoom/Zoom/index.esm.js +196 -0
  509. package/dist/node_modules/@mui/material/Zoom/Zoom/index.esm.js.map +1 -0
  510. package/dist/node_modules/@mui/material/Zoom/Zoom/index.js +3 -0
  511. package/dist/node_modules/@mui/material/Zoom/Zoom/index.js.map +1 -0
  512. package/dist/node_modules/@mui/material/internal/svg-icons/Add/index.esm.js +9 -0
  513. package/dist/node_modules/@mui/material/internal/svg-icons/Add/index.esm.js.map +1 -0
  514. package/dist/node_modules/@mui/material/internal/svg-icons/Add/index.js +2 -0
  515. package/dist/node_modules/@mui/material/internal/svg-icons/Add/index.js.map +1 -0
  516. package/dist/node_modules/@mui/material/internal/svg-icons/CheckCircle/index.esm.js +9 -0
  517. package/dist/node_modules/@mui/material/internal/svg-icons/CheckCircle/index.esm.js.map +1 -0
  518. package/dist/node_modules/@mui/material/internal/svg-icons/CheckCircle/index.js +2 -0
  519. package/dist/node_modules/@mui/material/internal/svg-icons/CheckCircle/index.js.map +1 -0
  520. package/dist/node_modules/@mui/material/internal/svg-icons/Star/index.esm.js +9 -0
  521. package/dist/node_modules/@mui/material/internal/svg-icons/Star/index.esm.js.map +1 -0
  522. package/dist/node_modules/@mui/material/internal/svg-icons/Star/index.js +2 -0
  523. package/dist/node_modules/@mui/material/internal/svg-icons/Star/index.js.map +1 -0
  524. package/dist/node_modules/@mui/material/internal/svg-icons/StarBorder/index.esm.js +9 -0
  525. package/dist/node_modules/@mui/material/internal/svg-icons/StarBorder/index.esm.js.map +1 -0
  526. package/dist/node_modules/@mui/material/internal/svg-icons/StarBorder/index.js +2 -0
  527. package/dist/node_modules/@mui/material/internal/svg-icons/StarBorder/index.js.map +1 -0
  528. package/dist/node_modules/@mui/material/internal/svg-icons/Warning/index.esm.js +9 -0
  529. package/dist/node_modules/@mui/material/internal/svg-icons/Warning/index.esm.js.map +1 -0
  530. package/dist/node_modules/@mui/material/internal/svg-icons/Warning/index.js +2 -0
  531. package/dist/node_modules/@mui/material/internal/svg-icons/Warning/index.js.map +1 -0
  532. package/dist/node_modules/@mui/material/useScrollTrigger/useScrollTrigger/index.esm.js +51 -0
  533. package/dist/node_modules/@mui/material/useScrollTrigger/useScrollTrigger/index.esm.js.map +1 -0
  534. package/dist/node_modules/@mui/material/useScrollTrigger/useScrollTrigger/index.js +2 -0
  535. package/dist/node_modules/@mui/material/useScrollTrigger/useScrollTrigger/index.js.map +1 -0
  536. package/dist/node_modules/@mui/system/colorManipulator/index.esm.js +2 -2
  537. package/dist/node_modules/@mui/system/colorManipulator/index.js +1 -1
  538. package/dist/node_modules/@mui/system/colorManipulator/index.js.map +1 -1
  539. package/dist/node_modules/@mui/system/createStyled/index.esm.js +6 -6
  540. package/dist/node_modules/@mui/system/createStyled/index.js +1 -1
  541. package/dist/node_modules/@mui/system/createStyled/index.js.map +1 -1
  542. package/dist/node_modules/@mui/system/esm/Stack/createStack/index.esm.js +1 -1
  543. package/dist/node_modules/@mui/system/esm/Stack/createStack/index.js +2 -2
  544. package/dist/node_modules/@mui/system/useThemeWithoutDefault/index.esm.js +1 -1
  545. package/dist/node_modules/@mui/system/useThemeWithoutDefault/index.js +1 -1
  546. package/dist/node_modules/d3-axis/src/axis/index.esm.js +5 -1
  547. package/dist/node_modules/d3-axis/src/axis/index.esm.js.map +1 -1
  548. package/dist/node_modules/d3-axis/src/axis/index.js +1 -1
  549. package/dist/node_modules/d3-axis/src/axis/index.js.map +1 -1
  550. package/dist/node_modules/d3-shape/src/arc/index.esm.js +134 -0
  551. package/dist/node_modules/d3-shape/src/arc/index.esm.js.map +1 -0
  552. package/dist/node_modules/d3-shape/src/arc/index.js +2 -0
  553. package/dist/node_modules/d3-shape/src/arc/index.js.map +1 -0
  554. package/dist/node_modules/d3-shape/src/descending/index.esm.js +7 -0
  555. package/dist/node_modules/d3-shape/src/descending/index.esm.js.map +1 -0
  556. package/dist/node_modules/d3-shape/src/descending/index.js +2 -0
  557. package/dist/node_modules/d3-shape/src/descending/index.js.map +1 -0
  558. package/dist/node_modules/d3-shape/src/identity/index.esm.js +7 -0
  559. package/dist/node_modules/d3-shape/src/identity/index.esm.js.map +1 -0
  560. package/dist/node_modules/d3-shape/src/identity/index.js +2 -0
  561. package/dist/node_modules/d3-shape/src/identity/index.js.map +1 -0
  562. package/dist/node_modules/d3-shape/src/math/index.esm.js +33 -0
  563. package/dist/node_modules/d3-shape/src/math/index.esm.js.map +1 -0
  564. package/dist/node_modules/d3-shape/src/math/index.js +2 -0
  565. package/dist/node_modules/d3-shape/src/math/index.js.map +1 -0
  566. package/dist/node_modules/d3-shape/src/pie/index.esm.js +56 -0
  567. package/dist/node_modules/d3-shape/src/pie/index.esm.js.map +1 -0
  568. package/dist/node_modules/d3-shape/src/pie/index.js +2 -0
  569. package/dist/node_modules/d3-shape/src/pie/index.js.map +1 -0
  570. package/dist/node_modules/prop-types/index/index.esm.js +1 -1
  571. package/dist/node_modules/prop-types/index/index.js +1 -1
  572. package/dist/node_modules/prop-types/index/index.js.map +1 -1
  573. package/dist/redux/hooks/index.esm.js +1 -1
  574. package/dist/src/components/charts/donut-chart/donut-chart.d.ts +1 -2
  575. package/dist/src/components/charts/index.d.ts +8 -0
  576. package/dist/src/components/confirm-modal/confirm-modal.d.ts +1 -2
  577. package/dist/src/components/confirm-modal/index.d.ts +1 -0
  578. package/dist/src/components/editor/custom-editor.d.ts +12 -8
  579. package/dist/src/components/grid/grid-card/grid-card.d.ts +10 -1
  580. package/dist/src/components/index.d.ts +228 -101
  581. package/dist/src/components/inventory-reports-title-bar/component/reportFilter.d.ts +3 -2
  582. package/dist/src/components/list/list.d.ts +2 -1
  583. package/dist/src/components/module-button/module-button.d.ts +10 -1
  584. package/dist/src/components/mulitline/multiline.d.ts +2 -2
  585. package/dist/src/components/page-navigator/page-navigator.d.ts +3 -3
  586. package/dist/src/components/parties-modal/parties-modal.d.ts +3 -3
  587. package/dist/src/components/rfq-response/item-response-details.d.ts +2 -1
  588. package/dist/src/components/tab-bar-ui/tab-bar-ui.d.ts +3 -3
  589. package/dist/src/components/tabs/tabs.d.ts +2 -2
  590. package/dist/src/hooks/use-translations.d.ts +2 -1
  591. package/dist/src/hooks/useCheckSkuAndName.d.ts +4 -2
  592. package/dist/src/layout/fullScreen/fullScreen.d.ts +5 -1
  593. package/dist/src/layout/sidebarScreen/sidebarScreen.d.ts +3 -3
  594. package/dist/src/views/afterAuth/dashboard/dashboard.d.ts +2 -1
  595. package/dist/src/views/form-builder/element-edit-forms/column-width.d.ts +5 -3
  596. package/dist/style.css +74 -68
  597. package/dist/utils/common/index.esm.js +1 -1
  598. package/dist/views/afterAuth/dashboard/dashboard/index.esm.js +5 -4
  599. package/dist/views/afterAuth/dashboard/dashboard/index.esm.js.map +1 -1
  600. package/dist/views/afterAuth/dashboard/dashboard/index.js +3 -3
  601. package/dist/views/afterAuth/dashboard/dashboard/index.js.map +1 -1
  602. package/dist/views/afterAuth/dashboard/dashboard.d.ts +2 -1
  603. package/dist/views/form-builder/custom-form/index.esm.js +1 -1
  604. package/dist/views/form-builder/custom-form/index.js +5 -5
  605. package/dist/views/form-builder/custom-form/index.js.map +1 -1
  606. package/dist/views/form-builder/element-edit-forms/column-width/index.esm.js +4 -3
  607. package/dist/views/form-builder/element-edit-forms/column-width/index.esm.js.map +1 -1
  608. package/dist/views/form-builder/element-edit-forms/column-width/index.js +3 -3
  609. package/dist/views/form-builder/element-edit-forms/column-width/index.js.map +1 -1
  610. package/dist/views/form-builder/element-edit-forms/column-width.d.ts +5 -3
  611. package/dist/views/index.esm.js +56 -56
  612. package/dist/views/index.js +1 -1
  613. package/package.json +1 -1
  614. package/dist/components/examples/FlexibleReduxExample/index.esm.js +0 -154
  615. package/dist/components/examples/FlexibleReduxExample/index.esm.js.map +0 -1
  616. package/dist/components/examples/FlexibleReduxExample/index.js +0 -19
  617. package/dist/components/examples/FlexibleReduxExample/index.js.map +0 -1
  618. package/dist/components/footer/index.esm.js +0 -71
  619. package/dist/components/footer/index.esm.js.map +0 -1
  620. package/dist/components/footer/index.js +0 -7
  621. package/dist/components/footer/index.js.map +0 -1
  622. package/dist/components/header/header-enhanced/index.esm.js +0 -405
  623. package/dist/components/header/header-enhanced/index.esm.js.map +0 -1
  624. package/dist/components/header/header-enhanced/index.js +0 -33
  625. package/dist/components/header/header-enhanced/index.js.map +0 -1
  626. package/dist/components/header copy/index.esm.js +0 -131
  627. package/dist/components/header copy/index.esm.js.map +0 -1
  628. package/dist/components/header copy/index.js +0 -11
  629. package/dist/components/header copy/index.js.map +0 -1
  630. package/dist/components/inventory-reports-title-bar/component/reportFilter/index.esm.js +0 -400
  631. package/dist/components/inventory-reports-title-bar/component/reportFilter/index.esm.js.map +0 -1
  632. package/dist/components/inventory-reports-title-bar/component/reportFilter/index.js +0 -41
  633. package/dist/components/inventory-reports-title-bar/component/reportFilter/index.js.map +0 -1
  634. package/dist/components/share-modal/share-modal-enhanced/index.esm.js +0 -288
  635. package/dist/components/share-modal/share-modal-enhanced/index.esm.js.map +0 -1
  636. package/dist/components/share-modal/share-modal-enhanced/index.js +0 -24
  637. package/dist/components/share-modal/share-modal-enhanced/index.js.map +0 -1
@@ -0,0 +1,86 @@
1
+ import { jsx, Fragment } from "react/jsx-runtime";
2
+ import { useRef, useMemo, useEffect } from "react";
3
+ import band from "../../../../node_modules/d3-scale/src/band/index.esm.js";
4
+ import linear from "../../../../node_modules/d3-scale/src/linear/index.esm.js";
5
+ import select from "../../../../node_modules/d3-selection/src/select/index.esm.js";
6
+ import { axisBottom, axisLeft } from "../../../../node_modules/d3-axis/src/axis/index.esm.js";
7
+ const formatNumber = (num) => {
8
+ if (num >= 1e9) return (num / 1e9).toFixed(1) + "B";
9
+ if (num >= 1e6) return (num / 1e6).toFixed(1) + "M";
10
+ if (num >= 1e3) return (num / 1e3).toFixed(1) + "K";
11
+ return num;
12
+ };
13
+ const BarChart = ({
14
+ data,
15
+ numOfLines = 5,
16
+ width = 500,
17
+ height = 300,
18
+ line = false
19
+ }) => {
20
+ const svgRef = useRef(null);
21
+ const maxValue = useMemo(() => {
22
+ return Math.max(...data.map((d) => d.value));
23
+ }, [data]);
24
+ const yAxisMaxValue = useMemo(() => {
25
+ return maxValue * 1.25;
26
+ }, [maxValue]);
27
+ const yAxisTicks = useMemo(() => {
28
+ const ticks = [];
29
+ const interval = yAxisMaxValue / numOfLines;
30
+ for (let i = 0; i <= numOfLines; i++) {
31
+ ticks.push(interval * i);
32
+ }
33
+ return ticks;
34
+ }, [yAxisMaxValue, numOfLines]);
35
+ useEffect(() => {
36
+ if (!svgRef.current) return;
37
+ const svg = select(svgRef.current);
38
+ svg.selectAll("*").remove();
39
+ const margin = { top: 20, right: 20, bottom: 70, left: 40 };
40
+ const barWidth = width - margin.left - margin.right;
41
+ const barHeight = height - margin.top - margin.bottom;
42
+ const mousemove = (event, d) => {
43
+ var _a, _b;
44
+ let xPosition = event.offsetX + margin.left - 25;
45
+ const yPosition = event.offsetY + margin.top - 40;
46
+ const tooltipWidth = (_b = (_a = tooltip.node()) == null ? void 0 : _a.getBoundingClientRect()) == null ? void 0 : _b.width;
47
+ const rightOffset = tooltipWidth ? xPosition + tooltipWidth : xPosition;
48
+ if (rightOffset > width) {
49
+ xPosition = Math.floor(
50
+ tooltipWidth ? xPosition - tooltipWidth - 20 : xPosition - 20
51
+ );
52
+ }
53
+ const text = `${d.label} - ${d.value}`;
54
+ tooltip.attr("x", xPosition).attr("y", yPosition).style("opacity", 9).style("height", text.length >= 16 ? 50 : 35);
55
+ tooltipText.html(text);
56
+ };
57
+ const mouseleave = () => {
58
+ tooltip.style("opacity", 0);
59
+ };
60
+ const x = band().domain(data.map((d) => d.label)).range([0, barWidth]).padding(0.1);
61
+ const y = linear().domain([0, yAxisMaxValue]).range([barHeight, 0]);
62
+ const chart = svg.append("g").attr("transform", `translate(${margin.left},${margin.top})`);
63
+ if (line) {
64
+ yAxisTicks.slice(1).forEach((tick) => {
65
+ chart.append("line").attr("class", "dotted-line").attr("x1", 0).attr("y1", y(tick)).attr("x2", barWidth).attr("y2", y(tick)).style("stroke", "gray").style("stroke-dasharray", "3,3").style("opacity", 1);
66
+ });
67
+ }
68
+ chart.selectAll(".bar").data(data).enter().append("rect").attr("class", "bar").attr("x", (d) => x(d.label)).attr("y", (d) => y(d.value)).attr("width", x.bandwidth()).attr("height", (d) => barHeight - y(d.value)).style("fill", "#357AF6").style("opacity", "1").on("mousemove", mousemove).on("mouseleave", mouseleave);
69
+ const xAxis = chart.append("g").attr("class", "x-axis").attr("transform", `translate(0, ${barHeight})`).call(axisBottom(x));
70
+ xAxis.selectAll(".tick line").remove();
71
+ const yAxis = chart.append("g").attr("class", "y-axis").call(
72
+ axisLeft(y).tickValues(yAxisTicks).tickFormat((d) => {
73
+ return formatNumber(d);
74
+ }).tickSizeOuter(0)
75
+ );
76
+ yAxis.selectAll(".tick line").remove();
77
+ const tooltip = svg.append("foreignObject").attr("class", "tooltip").attr("width", 120).attr("height", 20).style("opacity", 0).style("position", "absolute").style("background-color", "white").style("border", "none").style("box-shadow", "0rem 0rem 0.469rem 0rem rgba(0, 0, 0, 0.15)").style("border-radius", "0.313rem").style("padding", "0.625rem").style("font-size", "0.75rem");
78
+ const tooltipText = tooltip.append("xhtml:div").style("font-size", "0.75rem").style("color", "black");
79
+ }, [data, height, width, line, yAxisMaxValue, yAxisTicks]);
80
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("svg", { ref: svgRef, width, height }) });
81
+ };
82
+ export {
83
+ BarChart,
84
+ BarChart as default
85
+ };
86
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../../src/components/charts/bar-chart/bar-chart.tsx"],"sourcesContent":["import React, { useRef, useEffect, useMemo } from \"react\";\nimport * as d3 from \"d3\";\n\ninterface DataPoint {\n label: string;\n value: number;\n}\n\ninterface BarChartProps {\n data: DataPoint[];\n numOfLines?: number;\n width?: number;\n height?: number;\n line?: boolean;\n}\n\nconst formatNumber = (num: number) => {\n if (num >= 1e9) return (num / 1e9).toFixed(1) + \"B\";\n if (num >= 1e6) return (num / 1e6).toFixed(1) + \"M\";\n if (num >= 1e3) return (num / 1e3).toFixed(1) + \"K\";\n return num;\n};\n\nconst BarChart: React.FC<BarChartProps> = ({\n data,\n numOfLines = 5,\n width = 500,\n height = 300,\n line = false,\n}) => {\n const svgRef = useRef<SVGSVGElement>(null);\n\n const maxValue = useMemo(() => {\n return Math.max(...data.map((d) => d.value));\n }, [data]);\n\n const yAxisMaxValue = useMemo(() => {\n return maxValue * 1.25;\n }, [maxValue]);\n\n const yAxisTicks = useMemo(() => {\n const ticks = [];\n const interval = yAxisMaxValue / numOfLines;\n for (let i = 0; i <= numOfLines; i++) {\n ticks.push(interval * i);\n }\n return ticks;\n }, [yAxisMaxValue, numOfLines]);\n\n useEffect(() => {\n if (!svgRef.current) return;\n\n const svg = d3.select(svgRef.current);\n\n svg.selectAll(\"*\").remove();\n\n const margin = { top: 20, right: 20, bottom: 70, left: 40 };\n const barWidth = width - margin.left - margin.right;\n const barHeight = height - margin.top - margin.bottom;\n\n const mousemove = (event: MouseEvent, d: DataPoint) => {\n let xPosition = event.offsetX + margin.left - 25;\n const yPosition = event.offsetY + margin.top - 40;\n const tooltipWidth = tooltip.node()?.getBoundingClientRect()?.width;\n const rightOffset = tooltipWidth ? xPosition + tooltipWidth : xPosition;\n if (rightOffset > width) {\n xPosition = Math.floor(\n tooltipWidth ? xPosition - tooltipWidth - 20 : xPosition - 20,\n );\n }\n\n const text = `${d.label} - ${d.value}`;\n tooltip\n .attr(\"x\", xPosition)\n .attr(\"y\", yPosition)\n .style(\"opacity\", 9)\n .style(\"height\", text.length >= 16 ? 50 : 35);\n\n tooltipText.html(text);\n };\n\n const mouseleave = () => {\n tooltip.style(\"opacity\", 0);\n };\n\n const x = d3\n .scaleBand()\n .domain(data.map((d) => d.label))\n .range([0, barWidth])\n .padding(0.1);\n\n const y = d3.scaleLinear().domain([0, yAxisMaxValue]).range([barHeight, 0]);\n\n const chart = svg\n .append(\"g\")\n .attr(\"transform\", `translate(${margin.left},${margin.top})`);\n\n if (line) {\n yAxisTicks.slice(1).forEach((tick) => {\n chart\n .append(\"line\")\n .attr(\"class\", \"dotted-line\")\n .attr(\"x1\", 0)\n .attr(\"y1\", y(tick))\n .attr(\"x2\", barWidth)\n .attr(\"y2\", y(tick))\n .style(\"stroke\", \"gray\")\n .style(\"stroke-dasharray\", \"3,3\")\n .style(\"opacity\", 1);\n });\n }\n\n chart\n .selectAll(\".bar\")\n .data(data)\n .enter()\n .append(\"rect\")\n .attr(\"class\", \"bar\")\n //@ts-expect-error not applicable\n .attr(\"x\", (d: any) => x(d.label))\n .attr(\"y\", (d: any) => y(d.value))\n .attr(\"width\", x.bandwidth())\n .attr(\"height\", (d: any) => barHeight - y(d.value))\n .style(\"fill\", \"#357AF6\")\n .style(\"opacity\", \"1\")\n .on(\"mousemove\", mousemove)\n .on(\"mouseleave\", mouseleave);\n\n const xAxis = chart\n .append(\"g\")\n .attr(\"class\", \"x-axis\")\n .attr(\"transform\", `translate(0, ${barHeight})`)\n .call(d3.axisBottom(x) as any);\n\n xAxis.selectAll(\".tick line\").remove();\n\n const yAxis = chart\n .append(\"g\")\n .attr(\"class\", \"y-axis\")\n .call(\n d3\n .axisLeft(y)\n .tickValues(yAxisTicks)\n //@ts-expect-error not applicable\n .tickFormat((d: any) => {\n return formatNumber(d);\n })\n .tickSizeOuter(0) as any,\n );\n\n yAxis.selectAll(\".tick line\").remove();\n\n const tooltip = svg\n .append(\"foreignObject\")\n .attr(\"class\", \"tooltip\")\n .attr(\"width\", 120)\n .attr(\"height\", 20)\n .style(\"opacity\", 0)\n .style(\"position\", \"absolute\")\n .style(\"background-color\", \"white\")\n .style(\"border\", \"none\")\n .style(\"box-shadow\", \"0rem 0rem 0.469rem 0rem rgba(0, 0, 0, 0.15)\")\n .style(\"border-radius\", \"0.313rem\")\n .style(\"padding\", \"0.625rem\")\n .style(\"font-size\", \"0.75rem\");\n\n const tooltipText = tooltip\n .append(\"xhtml:div\")\n .style(\"font-size\", \"0.75rem\")\n .style(\"color\", \"black\");\n }, [data, height, width, line, yAxisMaxValue, yAxisTicks]);\n\n return (\n <>\n <svg ref={svgRef} width={width} height={height}></svg>\n </>\n );\n};\n\nexport { BarChart };\nexport default BarChart;\n"],"names":["d3.select","d3.scaleBand","d3.scaleLinear","d3.axisBottom","d3.axisLeft"],"mappings":";;;;;;AAgBA,MAAM,eAAe,CAAC,QAAgB;AACpC,MAAI,OAAO,IAAK,SAAQ,MAAM,KAAK,QAAQ,CAAC,IAAI;AAChD,MAAI,OAAO,IAAK,SAAQ,MAAM,KAAK,QAAQ,CAAC,IAAI;AAChD,MAAI,OAAO,IAAK,SAAQ,MAAM,KAAK,QAAQ,CAAC,IAAI;AAChD,SAAO;AACT;AAEA,MAAM,WAAoC,CAAC;AAAA,EACzC;AAAA,EACA,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,OAAO;AACT,MAAM;AACJ,QAAM,SAAS,OAAsB,IAAI;AAEzC,QAAM,WAAW,QAAQ,MAAM;AAC7B,WAAO,KAAK,IAAI,GAAG,KAAK,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC;AAAA,EAC7C,GAAG,CAAC,IAAI,CAAC;AAET,QAAM,gBAAgB,QAAQ,MAAM;AAClC,WAAO,WAAW;AAAA,EACpB,GAAG,CAAC,QAAQ,CAAC;AAEb,QAAM,aAAa,QAAQ,MAAM;AAC/B,UAAM,QAAQ,CAAA;AACd,UAAM,WAAW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AAc,CAAC;AAAA,IAAA;AAGtB,UAAM,UAAU,YAAY,EAAE,OAAA;AAE9B,UAAM,UAAU,IACb,OAAO,eAAe,EACtB,KAAK,SAAS,SAAS,EACvB,KAAK,SAAS,GAAG,EACjB,KAAK,UAAU,EAAE,EACjB,MAAM,WAAW,CAAC,EAClB,MAAM,YAAY,UAAU,EAC5B,MAAM,oBAAoB,OAAO,EACjC,MAAM,UAAU,MAAM,EACtB,MAAM,cAAc,6CAA6C,EACjE,MAAM,iBAAiB,UAAU,EACjC,MAAM,WAAW,UAAU,EAC3B,MAAM,aAAa,SAAS;AAE/B,UAAM,cAAc,QACjB,OAAO,WAAW,EAClB,MAAM,aAAa,SAAS,EAC5B,MAAM,SAAS,OAAO;AAAA,EAC3B,GAAG,CAAC,MAAM,QAAQ,OAAO,MAAM,eAAe,UAAU,CAAC;AAEzD,yCAEI,UAAA,oBAAC,OAAA,EAAI,KAAK,QAAQ,OAAc,QAAgB,EAAA,CAClD;AAEJ;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("../../../../node_modules/d3-scale/src/band/index.js"),a=require("../../../../node_modules/d3-scale/src/linear/index.js"),s=require("../../../../node_modules/d3-selection/src/select/index.js"),l=require("../../../../node_modules/d3-axis/src/axis/index.js");const o=({data:o,numOfLines:i=5,width:n=500,height:d=300,line:c=!1})=>{const u=t.useRef(null),m=t.useMemo(()=>Math.max(...o.map(e=>e.value)),[o]),y=t.useMemo(()=>1.25*m,[m]),p=t.useMemo(()=>{const e=[],t=y/i;for(let r=0;r<=i;r++)e.push(t*r);return e},[y,i]);return t.useEffect(()=>{if(!u.current)return;const e=s.default(u.current);e.selectAll("*").remove();const t=n-40-20,i=d-20-70,m=r.default().domain(o.map(e=>e.label)).range([0,t]).padding(.1),h=a.default().domain([0,y]).range([i,0]),x=e.append("g").attr("transform","translate(40,20)");c&&p.slice(1).forEach(e=>{x.append("line").attr("class","dotted-line").attr("x1",0).attr("y1",h(e)).attr("x2",t).attr("y2",h(e)).style("stroke","gray").style("stroke-dasharray","3,3").style("opacity",1)}),x.selectAll(".bar").data(o).enter().append("rect").attr("class","bar").attr("x",e=>m(e.label)).attr("y",e=>h(e.value)).attr("width",m.bandwidth()).attr("height",e=>i-h(e.value)).style("fill","#357AF6").style("opacity","1").on("mousemove",(e,t)=>{var r,a;let s=e.offsetX+40-25;const l=e.offsetY+20-40,o=null==(a=null==(r=f.node())?void 0:r.getBoundingClientRect())?void 0:a.width;(o?s+o:s)>n&&(s=Math.floor(o?s-o-20:s-20));const i=`${t.label} - ${t.value}`;f.attr("x",s).attr("y",l).style("opacity",9).style("height",i.length>=16?50:35),g.html(i)}).on("mouseleave",()=>{f.style("opacity",0)}),x.append("g").attr("class","x-axis").attr("transform",`translate(0, ${i})`).call(l.axisBottom(m)).selectAll(".tick line").remove(),x.append("g").attr("class","y-axis").call(l.axisLeft(h).tickValues(p).tickFormat(e=>{return(t=e)>=1e9?(t/1e9).toFixed(1)+"B":t>=1e6?(t/1e6).toFixed(1)+"M":t>=1e3?(t/1e3).toFixed(1)+"K":t;var t}).tickSizeOuter(0)).selectAll(".tick line").remove();const f=e.append("foreignObject").attr("class","tooltip").attr("width",120).attr("height",20).style("opacity",0).style("position","absolute").style("background-color","white").style("border","none").style("box-shadow","0rem 0rem 0.469rem 0rem rgba(0, 0, 0, 0.15)").style("border-radius","0.313rem").style("padding","0.625rem").style("font-size","0.75rem"),g=f.append("xhtml:div").style("font-size","0.75rem").style("color","black")},[o,d,n,c,y,p]),/* @__PURE__ */e.jsx(e.Fragment,{children:/* @__PURE__ */e.jsx("svg",{ref:u,width:n,height:d})})};exports.BarChart=o,exports.default=o;
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/charts/bar-chart/bar-chart.tsx"],"sourcesContent":["import React, { useRef, useEffect, useMemo } from \"react\";\nimport * as d3 from \"d3\";\n\ninterface DataPoint {\n label: string;\n value: number;\n}\n\ninterface BarChartProps {\n data: DataPoint[];\n numOfLines?: number;\n width?: number;\n height?: number;\n line?: boolean;\n}\n\nconst formatNumber = (num: number) => {\n if (num >= 1e9) return (num / 1e9).toFixed(1) + \"B\";\n if (num >= 1e6) return (num / 1e6).toFixed(1) + \"M\";\n if (num >= 1e3) return (num / 1e3).toFixed(1) + \"K\";\n return num;\n};\n\nconst BarChart: React.FC<BarChartProps> = ({\n data,\n numOfLines = 5,\n width = 500,\n height = 300,\n line = false,\n}) => {\n const svgRef = useRef<SVGSVGElement>(null);\n\n const maxValue = useMemo(() => {\n return Math.max(...data.map((d) => d.value));\n }, [data]);\n\n const yAxisMaxValue = useMemo(() => {\n return maxValue * 1.25;\n }, [maxValue]);\n\n const yAxisTicks = useMemo(() => {\n const ticks = [];\n const interval = yAxisMaxValue / numOfLines;\n for (let i = 0; i <= numOfLines; i++) {\n ticks.push(interval * i);\n }\n return ticks;\n }, [yAxisMaxValue, numOfLines]);\n\n useEffect(() => {\n if (!svgRef.current) return;\n\n const svg = d3.select(svgRef.current);\n\n svg.selectAll(\"*\").remove();\n\n const margin = { top: 20, right: 20, bottom: 70, left: 40 };\n const barWidth = width - margin.left - margin.right;\n const barHeight = height - margin.top - margin.bottom;\n\n const mousemove = (event: MouseEvent, d: DataPoint) => {\n let xPosition = event.offsetX + margin.left - 25;\n const yPosition = event.offsetY + margin.top - 40;\n const tooltipWidth = tooltip.node()?.getBoundingClientRect()?.width;\n const rightOffset = tooltipWidth ? xPosition + tooltipWidth : xPosition;\n if (rightOffset > width) {\n xPosition = Math.floor(\n tooltipWidth ? xPosition - tooltipWidth - 20 : xPosition - 20,\n );\n }\n\n const text = `${d.label} - ${d.value}`;\n tooltip\n .attr(\"x\", xPosition)\n .attr(\"y\", yPosition)\n .style(\"opacity\", 9)\n .style(\"height\", text.length >= 16 ? 50 : 35);\n\n tooltipText.html(text);\n };\n\n const mouseleave = () => {\n tooltip.style(\"opacity\", 0);\n };\n\n const x = d3\n .scaleBand()\n .domain(data.map((d) => d.label))\n .range([0, barWidth])\n .padding(0.1);\n\n const y = d3.scaleLinear().domain([0, yAxisMaxValue]).range([barHeight, 0]);\n\n const chart = svg\n .append(\"g\")\n .attr(\"transform\", `translate(${margin.left},${margin.top})`);\n\n if (line) {\n yAxisTicks.slice(1).forEach((tick) => {\n chart\n .append(\"line\")\n .attr(\"class\", \"dotted-line\")\n .attr(\"x1\", 0)\n .attr(\"y1\", y(tick))\n .attr(\"x2\", barWidth)\n .attr(\"y2\", y(tick))\n .style(\"stroke\", \"gray\")\n .style(\"stroke-dasharray\", \"3,3\")\n .style(\"opacity\", 1);\n });\n }\n\n chart\n .selectAll(\".bar\")\n .data(data)\n .enter()\n .append(\"rect\")\n .attr(\"class\", \"bar\")\n //@ts-expect-error not applicable\n .attr(\"x\", (d: any) => x(d.label))\n .attr(\"y\", (d: any) => y(d.value))\n .attr(\"width\", x.bandwidth())\n .attr(\"height\", (d: any) => barHeight - y(d.value))\n .style(\"fill\", \"#357AF6\")\n .style(\"opacity\", \"1\")\n .on(\"mousemove\", mousemove)\n .on(\"mouseleave\", mouseleave);\n\n const xAxis = chart\n .append(\"g\")\n .attr(\"class\", \"x-axis\")\n .attr(\"transform\", `translate(0, ${barHeight})`)\n .call(d3.axisBottom(x) as any);\n\n xAxis.selectAll(\".tick line\").remove();\n\n const yAxis = chart\n .append(\"g\")\n .attr(\"class\", \"y-axis\")\n .call(\n d3\n .axisLeft(y)\n .tickValues(yAxisTicks)\n //@ts-expect-error not applicable\n .tickFormat((d: any) => {\n return formatNumber(d);\n })\n .tickSizeOuter(0) as any,\n );\n\n yAxis.selectAll(\".tick line\").remove();\n\n const tooltip = svg\n .append(\"foreignObject\")\n .attr(\"class\", \"tooltip\")\n .attr(\"width\", 120)\n .attr(\"height\", 20)\n .style(\"opacity\", 0)\n .style(\"position\", \"absolute\")\n .style(\"background-color\", \"white\")\n .style(\"border\", \"none\")\n .style(\"box-shadow\", \"0rem 0rem 0.469rem 0rem rgba(0, 0, 0, 0.15)\")\n .style(\"border-radius\", \"0.313rem\")\n .style(\"padding\", \"0.625rem\")\n .style(\"font-size\", \"0.75rem\");\n\n const tooltipText = tooltip\n .append(\"xhtml:div\")\n .style(\"font-size\", \"0.75rem\")\n .style(\"color\", \"black\");\n }, [data, height, width, line, yAxisMaxValue, yAxisTicks]);\n\n return (\n <>\n <svg ref={svgRef} width={width} height={height}></svg>\n </>\n );\n};\n\nexport { BarChart };\nexport default BarChart;\n"],"names":["BarChart","data","numOfLines","width","height","line","svgRef","useRef","maxValue","useMemo","Math","max","map","d","value","yAxisMaxValue","yAxisTicks","ticks","interval","i","push","useEffect","current","svg","d3.select","selectAll","remove","barWidth","barHeight","x","d3.scaleBand","domain","label","range","padding","y","d3.scaleLinear","chart","append","attr","slice","forEach","tick","style","enter","bandwidth","on","event","xPosition","offsetX","yPosition","offsetY","tooltipWidth","_b","_a","tooltip","node","getBoundingClientRect","floor","text","length","tooltipText","html","call","d3.axisBottom","d3.axisLeft","tickValues","tickFormat","num","toFixed","tickSizeOuter","children","jsx","ref"],"mappings":"qYAgBA,MAOMA,EAAoC,EACxCC,OACAC,aAAa,EACbC,QAAQ,IACRC,SAAS,IACTC,QAAO,MAEP,MAAMC,EAASC,EAAAA,OAAsB,MAE/BC,EAAWC,EAAAA,QAAQ,IAChBC,KAAKC,OAAOV,EAAKW,IAAKC,GAAMA,EAAEC,QACpC,CAACb,IAEEc,EAAgBN,EAAAA,QAAQ,IACV,KAAXD,EACN,CAACA,IAEEQ,EAAaP,EAAAA,QAAQ,KACzB,MAAMQ,EAAQ,GACRC,EAAWH,EAAgBb,EACjC,IAAA,IAASiB,EAAI,EAAGA,GAAKjB,EAAYiB,IAC/BF,EAAMG,KAAKF,EAAWC,GAExB,OAAOF,GACN,CAACF,EAAeb,IA6HnB,OA3HAmB,EAAAA,UAAU,KACR,IAAKf,EAAOgB,QAAS,OAErB,MAAMC,EAAMC,EAAAA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WAAWnB,EAAEC,QAC/ByC,EACGhB,KAAK,IAAKS,GACVT,KAAK,IAAKW,GACVP,MAAM,UAAW,GACjBA,MAAM,SAAUgB,EAAKC,QAAU,GAAK,GAAK,IAE5CC,EAAYC,KAAKH,KAgDhBb,GAAG,aA7Ca,KACjBS,EAAQZ,MAAM,UAAW,KA8CbN,EACXC,OAAO,KACPC,KAAK,QAAS,UACdA,KAAK,YAAa,gBAAgBX,MAClCmC,KAAKC,EAAAA,WAAcnC,IAEhBJ,UAAU,cAAcC,SAEhBW,EACXC,OAAO,KACPC,KAAK,QAAS,UACdwB,KACCE,EAAAA,SACY9B,GACT+B,WAAWlD,GAEXmD,WAAYtD,IACX,OAjIUuD,EAiIUvD,IAhInB,KAAauD,EAAM,KAAKC,QAAQ,GAAK,IAC5CD,GAAO,KAAaA,EAAM,KAAKC,QAAQ,GAAK,IAC5CD,GAAO,KAAaA,EAAM,KAAKC,QAAQ,GAAK,IACzCD,EAJY,IAACA,IAmIXE,cAAc,IAGf7C,UAAU,cAAcC,SAE9B,MAAM6B,EAAUhC,EACbe,OAAO,iBACPC,KAAK,QAAS,WACdA,KAAK,QAAS,KACdA,KAAK,SAAU,IACfI,MAAM,UAAW,GACjBA,MAAM,WAAY,YAClBA,MAAM,mBAAoB,SAC1BA,MAAM,SAAU,QAChBA,MAAM,aAAc,+CACpBA,MAAM,gBAAiB,YACvBA,MAAM,UAAW,YACjBA,MAAM,YAAa,WAEhBkB,EAAcN,EACjBjB,OAAO,aACPK,MAAM,YAAa,WACnBA,MAAM,QAAS,UACjB,CAAC1C,EAAMG,EAAQD,EAAOE,EAAMU,EAAeC,qCAI1CuD,wBAAAC,EAAAA,IAAC,MAAA,CAAIC,IAAKnE,EAAQH,QAAcC"}
@@ -0,0 +1,148 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useRef, useState, useMemo, useEffect } from "react";
3
+ import band from "../../../../node_modules/d3-scale/src/band/index.esm.js";
4
+ import linear from "../../../../node_modules/d3-scale/src/linear/index.esm.js";
5
+ import select from "../../../../node_modules/d3-selection/src/select/index.esm.js";
6
+ import { axisTop, axisBottom, axisLeft } from "../../../../node_modules/d3-axis/src/axis/index.esm.js";
7
+ import { format } from "../../../../node_modules/d3-format/src/defaultLocale/index.esm.js";
8
+ const formatNumber = (num, symbol, labelType) => {
9
+ if (labelType === "inPercent") {
10
+ return `${format(".0%")(num / 100)}`;
11
+ } else if (labelType === "inValue") {
12
+ return `${symbol || ""} ${format(".2s")(num).replace("k", "K")}`;
13
+ }
14
+ return num.toString();
15
+ };
16
+ function wrapText(textSelection, width) {
17
+ textSelection.each(function() {
18
+ const text = select(this);
19
+ const originalText = text.text();
20
+ if (originalText.length <= 8) {
21
+ return;
22
+ }
23
+ if (originalText.length > 12) {
24
+ text.text(originalText.substring(0, 10) + "...");
25
+ return;
26
+ }
27
+ const words = originalText.split(/\s+/).reverse();
28
+ let word;
29
+ let line = [];
30
+ let lineNumber = 0;
31
+ const lineHeight = 1.1;
32
+ const y = text.attr("y");
33
+ const dy = parseFloat(text.attr("dy")) || 0;
34
+ let tspan = text.text(null).append("tspan").attr("x", 0).attr("y", y).attr("dy", `${dy}em`);
35
+ while (word = words.pop()) {
36
+ line.push(word);
37
+ tspan.text(line.join(" "));
38
+ if (tspan.node() && tspan.node().getComputedTextLength() > width) {
39
+ line.pop();
40
+ tspan.text(line.join(" "));
41
+ line = [word];
42
+ tspan = text.append("tspan").attr("x", 0).attr("y", y).attr("dy", `${++lineNumber * lineHeight + dy}em`).text(word);
43
+ }
44
+ }
45
+ });
46
+ }
47
+ const BarChart = ({
48
+ data,
49
+ numOfLines = 5,
50
+ initialWidth = 500,
51
+ height = 400,
52
+ line = false,
53
+ yAxisLabelType = "inValue",
54
+ currency,
55
+ customLabelFormatter
56
+ }) => {
57
+ const svgRef = useRef(null);
58
+ const wrapperRef = useRef(null);
59
+ const [containerWidth, setContainerWidth] = useState(initialWidth);
60
+ const maxValue = useMemo(() => Math.max(...data.map((d) => d.value)), [data]);
61
+ const yAxisMaxValue = useMemo(() => maxValue * 1.25, [maxValue]);
62
+ const yAxisTicks = useMemo(() => {
63
+ const ticks = [];
64
+ const interval = yAxisMaxValue / numOfLines;
65
+ for (let i = 0; i <= numOfLines; i++) {
66
+ ticks.push(interval * i);
67
+ }
68
+ return ticks;
69
+ }, [yAxisMaxValue, numOfLines]);
70
+ const needsHorizontalScroll = data.length > 12;
71
+ const minGroupWidth = 120;
72
+ const calculatedChartWidth = needsHorizontalScroll ? Math.max(data.length * minGroupWidth, containerWidth) : containerWidth;
73
+ useEffect(() => {
74
+ const wrapper = wrapperRef.current;
75
+ const resizeObserver = new ResizeObserver((entries) => {
76
+ if (entries[0]) {
77
+ const newWidth = entries[0].contentRect.width;
78
+ setContainerWidth(newWidth);
79
+ }
80
+ });
81
+ if (wrapper) {
82
+ resizeObserver.observe(wrapper);
83
+ }
84
+ return () => {
85
+ if (wrapper) {
86
+ resizeObserver.unobserve(wrapper);
87
+ }
88
+ };
89
+ }, []);
90
+ useEffect(() => {
91
+ if (containerWidth === 0) return;
92
+ const svg = select(svgRef.current);
93
+ svg.selectAll("*").remove();
94
+ const maxLabelWidth = 80;
95
+ const dynamicLeftMargin = Math.max(60, maxLabelWidth + 30);
96
+ const margin = { top: 20, right: 20, bottom: 25, left: dynamicLeftMargin };
97
+ const barWidth = calculatedChartWidth - margin.left - margin.right;
98
+ const barHeight = maxValue ? height - margin.top - margin.bottom : 0;
99
+ const x = band().domain(data.map((d) => d.label)).range([0, barWidth]).padding(0.5);
100
+ const y = linear().domain([0, yAxisMaxValue]).range([barHeight, 0]);
101
+ const chart = svg.append("g").attr("transform", `translate(${margin.left},${maxValue ? margin.top : height - 50})`);
102
+ if (line) {
103
+ yAxisTicks.slice(1).forEach((tick) => {
104
+ chart.append("line").attr("class", "dotted-line").attr("x1", 0).attr("y1", y(tick)).attr("x2", barWidth).attr("y2", y(tick)).style("stroke", "#D3D3D4").style("stroke-dasharray", "3,3").style("opacity", 1);
105
+ });
106
+ }
107
+ chart.selectAll(".bar").data(data).enter().append("rect").attr("rx", 5).attr("ry", 5).attr("class", "bar").attr("x", (d) => x(d.label)).attr("y", (d) => y(d.value)).attr("width", x.bandwidth()).attr("height", (d) => barHeight - y(d.value)).style("fill", (d) => d.color);
108
+ const xAxis = chart.append("g").attr("class", "x-axis").attr("transform", `translate(0, ${barHeight})`).call(axisTop(x).tickPadding(10)).call(axisBottom(x).tickPadding(5));
109
+ xAxis.selectAll(".tick line").remove();
110
+ xAxis.selectAll(".tick text").call(wrapText, 80);
111
+ const availableHeight = barHeight;
112
+ const minTickSpacing = 30;
113
+ const maxOptimalTicks = Math.floor(availableHeight / minTickSpacing);
114
+ const optimalNumTicks = Math.min(numOfLines, maxOptimalTicks, 8);
115
+ const optimalTicks = [];
116
+ const optimalInterval = yAxisMaxValue / optimalNumTicks;
117
+ for (let i = 0; i <= optimalNumTicks; i++) {
118
+ optimalTicks.push(optimalInterval * i);
119
+ }
120
+ const yAxis = chart.append("g").attr("class", "y-axis").call(
121
+ axisLeft(y).tickValues(optimalTicks).tickFormat(
122
+ (d) => customLabelFormatter ? customLabelFormatter(d) : formatNumber(d, currency, yAxisLabelType)
123
+ ).tickSizeOuter(0).tickPadding(8)
124
+ // Add padding between ticks and labels
125
+ );
126
+ yAxis.selectAll(".tick line").remove();
127
+ yAxis.select(".domain").attr("stroke", "none");
128
+ xAxis.select(".domain").attr("stroke", "none");
129
+ yAxis.selectAll(".tick text").style("font-size", "11px").style("fill", "#666").style("font-family", "Inter, system-ui, Avenir, Helvetica, Arial, sans-serif").style("text-anchor", "end");
130
+ }, [data, containerWidth, height, line, yAxisMaxValue, yAxisTicks, currency, yAxisLabelType, customLabelFormatter, calculatedChartWidth]);
131
+ return /* @__PURE__ */ jsx(
132
+ "div",
133
+ {
134
+ ref: wrapperRef,
135
+ style: {
136
+ width: "100%",
137
+ overflowX: needsHorizontalScroll ? "auto" : "hidden",
138
+ overflowY: "hidden"
139
+ },
140
+ children: /* @__PURE__ */ jsx("svg", { ref: svgRef, width: calculatedChartWidth, height, viewBox: `0 0 ${calculatedChartWidth} ${height}` })
141
+ }
142
+ );
143
+ };
144
+ export {
145
+ BarChart,
146
+ BarChart as default
147
+ };
148
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../../src/components/charts/barChart/barChart.tsx"],"sourcesContent":["import React, { useRef, useEffect, useMemo, useState } from \"react\";\nimport * as d3 from \"d3\";\n\ninterface DataPoint {\n label: string;\n value: number;\n}\n\ninterface BarChartProps {\n data: DataPoint[];\n numOfLines?: number;\n initialWidth?: number;\n height?: any;\n line?: boolean;\n chartBarWidth?: number;\n yAxisLabelType?: 'inPercent' | 'inValue' | 'custom';\n customLabelFormatter?: (value: number) => string;\n currency: string\n}\n\nconst formatNumber = (num: number, symbol: string, labelType: string) => {\n if (labelType === 'inPercent') {\n return `${d3.format(\".0%\")(num / 100)}`;\n } else if (labelType === 'inValue') {\n return `${symbol || ''} ${d3.format(\".2s\")(num).replace('k', 'K')}`;\n }\n return num.toString();\n};\n\nfunction wrapText(textSelection: any, width: number) {\n textSelection.each(function (this: any) {\n const text = d3.select(this);\n const originalText = text.text();\n \n if (originalText.length <= 8) {\n return;\n }\n \n if (originalText.length > 12) {\n text.text(originalText.substring(0, 10) + '...');\n return;\n }\n \n const words = originalText.split(/\\s+/).reverse();\n let word;\n let line: string[] = [];\n let lineNumber = 0;\n const lineHeight = 1.1; // ems\n const y = text.attr(\"y\");\n const dy = parseFloat(text.attr(\"dy\")) || 0;\n \n let tspan = text\n .text(null)\n .append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"y\", y)\n .attr(\"dy\", `${dy}em`);\n \n while ((word = words.pop())) {\n line.push(word);\n tspan.text(line.join(\" \"));\n if (tspan.node() && tspan.node()!.getComputedTextLength() > width) {\n line.pop();\n tspan.text(line.join(\" \"));\n line = [word];\n tspan = text\n .append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"y\", y)\n .attr(\"dy\", `${++lineNumber * lineHeight + dy}em`)\n .text(word);\n }\n }\n });\n }\n \nconst BarChart: React.FC<BarChartProps> = ({\n data,\n numOfLines = 5,\n initialWidth = 500,\n height = 400,\n line = false,\n yAxisLabelType = 'inValue',\n currency,\n customLabelFormatter,\n}) => {\n const svgRef = useRef<SVGSVGElement>(null);\n const wrapperRef = useRef<HTMLDivElement>(null);\n const [containerWidth, setContainerWidth] = useState(initialWidth);\n\n const maxValue = useMemo(() => Math.max(...data.map((d) => d.value)), [data]);\n\n const yAxisMaxValue = useMemo(() => maxValue * 1.25, [maxValue]);\n\n const yAxisTicks = useMemo(() => {\n const ticks = [];\n const interval = yAxisMaxValue / numOfLines;\n for (let i = 0; i <= numOfLines; i++) {\n ticks.push(interval * i);\n }\n return ticks;\n }, [yAxisMaxValue, numOfLines]);\n\n\n const needsHorizontalScroll = data.length > 12;\n const minGroupWidth = 120; \n const calculatedChartWidth = needsHorizontalScroll \n ? Math.max(data.length * minGroupWidth, containerWidth)\n : containerWidth;\n\n // ResizeObserver to make the chart responsive\n\n useEffect(() => {\n const wrapper = wrapperRef.current;\n\n const resizeObserver = new ResizeObserver((entries) => {\n if (entries[0]) {\n const newWidth = entries[0].contentRect.width;\n setContainerWidth(newWidth);\n }\n });\n\n if (wrapper) {\n resizeObserver.observe(wrapper);\n }\n \n return () => {\n if (wrapper) {\n resizeObserver.unobserve(wrapper);\n }\n };\n }, []);\n useEffect(() => {\n if (containerWidth === 0) return;\n\n const svg = d3.select(svgRef.current);\n\n svg.selectAll(\"*\").remove();\n\n // Calculate dynamic left margin based on label length (accounting for wrapping)\n // const sampleLabel = customLabelFormatter \n // ? customLabelFormatter(yAxisMaxValue)\n // : formatNumber(yAxisMaxValue, currency, yAxisLabelType);\n const maxLabelWidth = 80; // Maximum width for wrapped labels\n const dynamicLeftMargin = Math.max(60, maxLabelWidth + 30);\n \n const margin = { top: 20, right: 20, bottom: 25, left: dynamicLeftMargin };\n const barWidth = calculatedChartWidth - margin.left - margin.right;\n const barHeight = maxValue ? height - margin.top - margin.bottom : 0;\n\n const x = d3\n .scaleBand()\n .domain(data.map((d) => d.label))\n .range([0, barWidth])\n .padding(0.5);\n\n const y = d3.scaleLinear().domain([0, yAxisMaxValue]).range([barHeight, 0]);\n\n \n const chart = svg\n .append(\"g\")\n .attr(\"transform\", `translate(${margin.left},${maxValue?margin.top:height-50})`);\n \n if (line) {\n yAxisTicks.slice(1).forEach((tick) => {\n chart\n .append(\"line\")\n .attr(\"class\", \"dotted-line\")\n .attr(\"x1\", 0)\n .attr(\"y1\", y(tick))\n .attr(\"x2\", barWidth)\n .attr(\"y2\", y(tick))\n .style(\"stroke\", \"#D3D3D4\")\n .style(\"stroke-dasharray\", \"3,3\")\n .style(\"opacity\", 1);\n });\n }\n\n chart\n .selectAll(\".bar\")\n .data(data)\n .enter()\n .append(\"rect\")\n .attr(\"rx\", 5)\n .attr(\"ry\", 5)\n .attr(\"class\", \"bar\")\n .attr(\"x\", (d: any) => x(d.label))\n .attr(\"y\", (d: any) => y(d.value))\n .attr(\"width\", x.bandwidth())\n .attr(\"height\", (d: any) => barHeight - y(d.value))\n .style(\"fill\", (d: any) => d.color);\n\n const xAxis = chart\n .append(\"g\")\n .attr(\"class\", \"x-axis\")\n .attr(\"transform\", `translate(0, ${barHeight})`)\n .call(d3.axisTop(x).tickPadding(10) as any)\n .call(d3.axisBottom(x).tickPadding(5) as any)\n // .call(d3.axisLeft(x).tickPadding(5) as any)\n\n xAxis.selectAll(\".tick line\").remove();\n xAxis.selectAll(\".tick text\").call(wrapText,80); \n\n // Calculate optimal number of ticks to prevent overlap\n const availableHeight = barHeight;\n const minTickSpacing = 30; // Minimum pixels between ticks\n const maxOptimalTicks = Math.floor(availableHeight / minTickSpacing);\n const optimalNumTicks = Math.min(numOfLines, maxOptimalTicks, 8);\n \n // Generate optimal tick values\n const optimalTicks = [];\n const optimalInterval = yAxisMaxValue / optimalNumTicks;\n for (let i = 0; i <= optimalNumTicks; i++) {\n optimalTicks.push(optimalInterval * i);\n }\n\n const yAxis = chart\n .append(\"g\")\n .attr(\"class\", \"y-axis\")\n .call(\n d3.axisLeft(y)\n .tickValues(optimalTicks)\n .tickFormat((d: any) =>\n customLabelFormatter\n ? customLabelFormatter(d)\n : formatNumber(d, currency, yAxisLabelType)\n )\n .tickSizeOuter(0)\n .tickPadding(8) as any, // Add padding between ticks and labels\n );\n\n yAxis.selectAll(\".tick line\").remove();\n yAxis.select(\".domain\").attr(\"stroke\", \"none\");\n xAxis.select(\".domain\").attr(\"stroke\", \"none\");\n \n // Style y-axis labels for better readability and apply text wrapping\n yAxis.selectAll(\".tick text\")\n .style(\"font-size\", \"11px\")\n .style(\"fill\", \"#666\")\n .style(\"font-family\", \"Inter, system-ui, Avenir, Helvetica, Arial, sans-serif\")\n .style(\"text-anchor\", \"end\")\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [data, containerWidth, height, line, yAxisMaxValue, yAxisTicks, currency, yAxisLabelType, customLabelFormatter, calculatedChartWidth]);\n\n return (\n <div ref={wrapperRef} \n style={{ \n width: '100%', \n overflowX: needsHorizontalScroll ? 'auto' : 'hidden',\n overflowY: 'hidden'\n }}>\n <svg ref={svgRef} width={calculatedChartWidth} height={height} viewBox={`0 0 ${calculatedChartWidth} ${height}`} />\n </div>\n );\n};\n\nexport { BarChart };\nexport default BarChart;\n"],"names":["d3.format","d3.select","d3.scaleBand","d3.scaleLinear","d3.axisTop","d3.axisBottom","d3.axisLeft"],"mappings":";;;;;;;AAoBA,MAAM,eAAe,CAAC,KAAa,QAAgB,cAAsB;AACrE,MAAI,cAAc,aAAa;AAC3B,WAAO,GAAGA,OAAU,KAAK,EAAE,MAAM,GAAG,CAAC;AAAA,EACzC,WAAW,cAAc,WAAW;AAChC,WAAO,GAAG,UAAU,EAAE,IAAIA,OAAU,KAAK,EAAE,GAAG,EAAE,QAAQ,KAAK,GAAG,CAAC;AAAA,EACrE;AACA,SAAO,IAAI,SAAA;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K;AAAA,MACV,OAAO;AAAA,QACH,OAAO;AAAA,QACP,WAAW,wBAAwB,SAAS;AAAA,QAC5C,WAAW;AAAA,MAAA;AAAA,MAEX,UAAA,oBAAC,OAAA,EAAI,KAAK,QAAQ,OAAO,sBAAsB,QAAgB,SAAS,OAAO,oBAAoB,IAAI,MAAM,GAAA,CAAI;AAAA,IAAA;AAAA,EAAA;AAG7H;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("../../../../node_modules/d3-scale/src/band/index.js"),a=require("../../../../node_modules/d3-scale/src/linear/index.js"),s=require("../../../../node_modules/d3-selection/src/select/index.js"),n=require("../../../../node_modules/d3-axis/src/axis/index.js"),l=require("../../../../node_modules/d3-format/src/defaultLocale/index.js");function i(e,t){e.each(function(){const e=s.default(this),r=e.text();if(r.length<=8)return;if(r.length>12)return void e.text(r.substring(0,10)+"...");const a=r.split(/\s+/).reverse();let n,l=[],i=0;const o=e.attr("y"),c=parseFloat(e.attr("dy"))||0;let d=e.text(null).append("tspan").attr("x",0).attr("y",o).attr("dy",`${c}em`);for(;n=a.pop();)l.push(n),d.text(l.join(" ")),d.node()&&d.node().getComputedTextLength()>t&&(l.pop(),d.text(l.join(" ")),l=[n],d=e.append("tspan").attr("x",0).attr("y",o).attr("dy",`${1.1*++i+c}em`).text(n))})}const o=({data:o,numOfLines:c=5,initialWidth:d=500,height:u=400,line:f=!1,yAxisLabelType:x="inValue",currency:p,customLabelFormatter:m})=>{const h=t.useRef(null),y=t.useRef(null),[g,v]=t.useState(d),k=t.useMemo(()=>Math.max(...o.map(e=>e.value)),[o]),b=t.useMemo(()=>1.25*k,[k]),j=t.useMemo(()=>{const e=[],t=b/c;for(let r=0;r<=c;r++)e.push(t*r);return e},[b,c]),$=o.length>12,w=$?Math.max(120*o.length,g):g;return t.useEffect(()=>{const e=y.current,t=new ResizeObserver(e=>{if(e[0]){const t=e[0].contentRect.width;v(t)}});return e&&t.observe(e),()=>{e&&t.unobserve(e)}},[]),t.useEffect(()=>{if(0===g)return;const e=s.default(h.current);e.selectAll("*").remove();const t=Math.max(60,110),d=w-t-20,y=k?u-20-25:0,v=r.default().domain(o.map(e=>e.label)).range([0,d]).padding(.5),$=a.default().domain([0,b]).range([y,0]),A=e.append("g").attr("transform",`translate(${t},${k?20:u-50})`);f&&j.slice(1).forEach(e=>{A.append("line").attr("class","dotted-line").attr("x1",0).attr("y1",$(e)).attr("x2",d).attr("y2",$(e)).style("stroke","#D3D3D4").style("stroke-dasharray","3,3").style("opacity",1)}),A.selectAll(".bar").data(o).enter().append("rect").attr("rx",5).attr("ry",5).attr("class","bar").attr("x",e=>v(e.label)).attr("y",e=>$(e.value)).attr("width",v.bandwidth()).attr("height",e=>y-$(e.value)).style("fill",e=>e.color);const M=A.append("g").attr("class","x-axis").attr("transform",`translate(0, ${y})`).call(n.axisTop(v).tickPadding(10)).call(n.axisBottom(v).tickPadding(5));M.selectAll(".tick line").remove(),M.selectAll(".tick text").call(i,80);const q=y,_=Math.floor(q/30),L=Math.min(c,_,8),P=[],O=b/L;for(let r=0;r<=L;r++)P.push(O*r);const R=A.append("g").attr("class","y-axis").call(n.axisLeft($).tickValues(P).tickFormat(e=>{return m?m(e):(t=e,r=p,"inPercent"===(a=x)?`${l.format(".0%")(t/100)}`:"inValue"===a?`${r||""} ${l.format(".2s")(t).replace("k","K")}`:t.toString());var t,r,a}).tickSizeOuter(0).tickPadding(8));R.selectAll(".tick line").remove(),R.select(".domain").attr("stroke","none"),M.select(".domain").attr("stroke","none"),R.selectAll(".tick text").style("font-size","11px").style("fill","#666").style("font-family","Inter, system-ui, Avenir, Helvetica, Arial, sans-serif").style("text-anchor","end")},[o,g,u,f,b,j,p,x,m,w]),/* @__PURE__ */e.jsx("div",{ref:y,style:{width:"100%",overflowX:$?"auto":"hidden",overflowY:"hidden"},children:/* @__PURE__ */e.jsx("svg",{ref:h,width:w,height:u,viewBox:`0 0 ${w} ${u}`})})};exports.BarChart=o,exports.default=o;
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/charts/barChart/barChart.tsx"],"sourcesContent":["import React, { useRef, useEffect, useMemo, useState } from \"react\";\nimport * as d3 from \"d3\";\n\ninterface DataPoint {\n label: string;\n value: number;\n}\n\ninterface BarChartProps {\n data: DataPoint[];\n numOfLines?: number;\n initialWidth?: number;\n height?: any;\n line?: boolean;\n chartBarWidth?: number;\n yAxisLabelType?: 'inPercent' | 'inValue' | 'custom';\n customLabelFormatter?: (value: number) => string;\n currency: string\n}\n\nconst formatNumber = (num: number, symbol: string, labelType: string) => {\n if (labelType === 'inPercent') {\n return `${d3.format(\".0%\")(num / 100)}`;\n } else if (labelType === 'inValue') {\n return `${symbol || ''} ${d3.format(\".2s\")(num).replace('k', 'K')}`;\n }\n return num.toString();\n};\n\nfunction wrapText(textSelection: any, width: number) {\n textSelection.each(function (this: any) {\n const text = d3.select(this);\n const originalText = text.text();\n \n if (originalText.length <= 8) {\n return;\n }\n \n if (originalText.length > 12) {\n text.text(originalText.substring(0, 10) + '...');\n return;\n }\n \n const words = originalText.split(/\\s+/).reverse();\n let word;\n let line: string[] = [];\n let lineNumber = 0;\n const lineHeight = 1.1; // ems\n const y = text.attr(\"y\");\n const dy = parseFloat(text.attr(\"dy\")) || 0;\n \n let tspan = text\n .text(null)\n .append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"y\", y)\n .attr(\"dy\", `${dy}em`);\n \n while ((word = words.pop())) {\n line.push(word);\n tspan.text(line.join(\" \"));\n if (tspan.node() && tspan.node()!.getComputedTextLength() > width) {\n line.pop();\n tspan.text(line.join(\" \"));\n line = [word];\n tspan = text\n .append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"y\", y)\n .attr(\"dy\", `${++lineNumber * lineHeight + dy}em`)\n .text(word);\n }\n }\n });\n }\n \nconst BarChart: React.FC<BarChartProps> = ({\n data,\n numOfLines = 5,\n initialWidth = 500,\n height = 400,\n line = false,\n yAxisLabelType = 'inValue',\n currency,\n customLabelFormatter,\n}) => {\n const svgRef = useRef<SVGSVGElement>(null);\n const wrapperRef = useRef<HTMLDivElement>(null);\n const [containerWidth, setContainerWidth] = useState(initialWidth);\n\n const maxValue = useMemo(() => Math.max(...data.map((d) => d.value)), [data]);\n\n const yAxisMaxValue = useMemo(() => maxValue * 1.25, [maxValue]);\n\n const yAxisTicks = useMemo(() => {\n const ticks = [];\n const interval = yAxisMaxValue / numOfLines;\n for (let i = 0; i <= numOfLines; i++) {\n ticks.push(interval * i);\n }\n return ticks;\n }, [yAxisMaxValue, numOfLines]);\n\n\n const needsHorizontalScroll = data.length > 12;\n const minGroupWidth = 120; \n const calculatedChartWidth = needsHorizontalScroll \n ? Math.max(data.length * minGroupWidth, containerWidth)\n : containerWidth;\n\n // ResizeObserver to make the chart responsive\n\n useEffect(() => {\n const wrapper = wrapperRef.current;\n\n const resizeObserver = new ResizeObserver((entries) => {\n if (entries[0]) {\n const newWidth = entries[0].contentRect.width;\n setContainerWidth(newWidth);\n }\n });\n\n if (wrapper) {\n resizeObserver.observe(wrapper);\n }\n \n return () => {\n if (wrapper) {\n resizeObserver.unobserve(wrapper);\n }\n };\n }, []);\n useEffect(() => {\n if (containerWidth === 0) return;\n\n const svg = d3.select(svgRef.current);\n\n svg.selectAll(\"*\").remove();\n\n // Calculate dynamic left margin based on label length (accounting for wrapping)\n // const sampleLabel = customLabelFormatter \n // ? customLabelFormatter(yAxisMaxValue)\n // : formatNumber(yAxisMaxValue, currency, yAxisLabelType);\n const maxLabelWidth = 80; // Maximum width for wrapped labels\n const dynamicLeftMargin = Math.max(60, maxLabelWidth + 30);\n \n const margin = { top: 20, right: 20, bottom: 25, left: dynamicLeftMargin };\n const barWidth = calculatedChartWidth - margin.left - margin.right;\n const barHeight = maxValue ? height - margin.top - margin.bottom : 0;\n\n const x = d3\n .scaleBand()\n .domain(data.map((d) => d.label))\n .range([0, barWidth])\n .padding(0.5);\n\n const y = d3.scaleLinear().domain([0, yAxisMaxValue]).range([barHeight, 0]);\n\n \n const chart = svg\n .append(\"g\")\n .attr(\"transform\", `translate(${margin.left},${maxValue?margin.top:height-50})`);\n \n if (line) {\n yAxisTicks.slice(1).forEach((tick) => {\n chart\n .append(\"line\")\n .attr(\"class\", \"dotted-line\")\n .attr(\"x1\", 0)\n .attr(\"y1\", y(tick))\n .attr(\"x2\", barWidth)\n .attr(\"y2\", y(tick))\n .style(\"stroke\", \"#D3D3D4\")\n .style(\"stroke-dasharray\", \"3,3\")\n .style(\"opacity\", 1);\n });\n }\n\n chart\n .selectAll(\".bar\")\n .data(data)\n .enter()\n .append(\"rect\")\n .attr(\"rx\", 5)\n .attr(\"ry\", 5)\n .attr(\"class\", \"bar\")\n .attr(\"x\", (d: any) => x(d.label))\n .attr(\"y\", (d: any) => y(d.value))\n .attr(\"width\", x.bandwidth())\n .attr(\"height\", (d: any) => barHeight - y(d.value))\n .style(\"fill\", (d: any) => d.color);\n\n const xAxis = chart\n .append(\"g\")\n .attr(\"class\", \"x-axis\")\n .attr(\"transform\", `translate(0, ${barHeight})`)\n .call(d3.axisTop(x).tickPadding(10) as any)\n .call(d3.axisBottom(x).tickPadding(5) as any)\n // .call(d3.axisLeft(x).tickPadding(5) as any)\n\n xAxis.selectAll(\".tick line\").remove();\n xAxis.selectAll(\".tick text\").call(wrapText,80); \n\n // Calculate optimal number of ticks to prevent overlap\n const availableHeight = barHeight;\n const minTickSpacing = 30; // Minimum pixels between ticks\n const maxOptimalTicks = Math.floor(availableHeight / minTickSpacing);\n const optimalNumTicks = Math.min(numOfLines, maxOptimalTicks, 8);\n \n // Generate optimal tick values\n const optimalTicks = [];\n const optimalInterval = yAxisMaxValue / optimalNumTicks;\n for (let i = 0; i <= optimalNumTicks; i++) {\n optimalTicks.push(optimalInterval * i);\n }\n\n const yAxis = chart\n .append(\"g\")\n .attr(\"class\", \"y-axis\")\n .call(\n d3.axisLeft(y)\n .tickValues(optimalTicks)\n .tickFormat((d: any) =>\n customLabelFormatter\n ? customLabelFormatter(d)\n : formatNumber(d, currency, yAxisLabelType)\n )\n .tickSizeOuter(0)\n .tickPadding(8) as any, // Add padding between ticks and labels\n );\n\n yAxis.selectAll(\".tick line\").remove();\n yAxis.select(\".domain\").attr(\"stroke\", \"none\");\n xAxis.select(\".domain\").attr(\"stroke\", \"none\");\n \n // Style y-axis labels for better readability and apply text wrapping\n yAxis.selectAll(\".tick text\")\n .style(\"font-size\", \"11px\")\n .style(\"fill\", \"#666\")\n .style(\"font-family\", \"Inter, system-ui, Avenir, Helvetica, Arial, sans-serif\")\n .style(\"text-anchor\", \"end\")\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [data, containerWidth, height, line, yAxisMaxValue, yAxisTicks, currency, yAxisLabelType, customLabelFormatter, calculatedChartWidth]);\n\n return (\n <div ref={wrapperRef} \n style={{ \n width: '100%', \n overflowX: needsHorizontalScroll ? 'auto' : 'hidden',\n overflowY: 'hidden'\n }}>\n <svg ref={svgRef} width={calculatedChartWidth} height={height} viewBox={`0 0 ${calculatedChartWidth} ${height}`} />\n </div>\n );\n};\n\nexport { BarChart };\nexport default BarChart;\n"],"names":["wrapText","textSelection","width","each","text","d3.select","this","originalText","length","substring","words","split","reverse","word","line","lineNumber","y","attr","dy","parseFloat","tspan","append","pop","push","join","node","getComputedTextLength","BarChart","data","numOfLines","initialWidth","height","yAxisLabelType","currency","customLabelFormatter","svgRef","useRef","wrapperRef","containerWidth","setContainerWidth","useState","maxValue","useMemo","Math","max","map","d","value","yAxisMaxValue","yAxisTicks","ticks","interval","i","needsHorizontalScroll","calculatedChartWidth","useEffect","wrapper","current","resizeObserver","ResizeObserver","entries","newWidth","contentRect","observe","unobserve","svg","selectAll","remove","margin","maxLabelWidth","barWidth","barHeight","x","d3.scaleBand","domain","label","range","padding","d3.scaleLinear","chart","slice","forEach","tick","style","enter","bandwidth","color","xAxis","call","d3.axisTop","tickPadding","d3.axisBottom","availableHeight","maxOptimalTicks","floor","optimalNumTicks","min","optimalTicks","optimalInterval","yAxis","d3.axisLeft","tickValues","tickFormat","num","symbol","labelType","d3.format","replace","toString","tickSizeOuter","select","jsx","ref","overflowX","overflowY","children","viewBox"],"mappings":"gdA6BA,SAASA,EAASC,EAAoBC,GAClCD,EAAcE,KAAK,WACjB,MAAMC,EAAOC,EAAAA,QAAUC,MACjBC,EAAeH,EAAKA,OAE1B,GAAIG,EAAaC,QAAU,EACzB,OAGF,GAAID,EAAaC,OAAS,GAExB,YADAJ,EAAKA,KAAKG,EAAaE,UAAU,EAAG,IAAM,OAI5C,MAAMC,EAAQH,EAAaI,MAAM,OAAOC,UACxC,IAAIC,EACAC,EAAiB,GACjBC,EAAa,EACjB,MACMC,EAAIZ,EAAKa,KAAK,KACdC,EAAKC,WAAWf,EAAKa,KAAK,QAAU,EAE1C,IAAIG,EAAQhB,EACTA,KAAK,MACLiB,OAAO,SACPJ,KAAK,IAAK,GACVA,KAAK,IAAKD,GACVC,KAAK,KAAM,GAAGC,OAEjB,KAAQL,EAAOH,EAAMY,OACnBR,EAAKS,KAAKV,GACVO,EAAMhB,KAAKU,EAAKU,KAAK,MACjBJ,EAAMK,QAAUL,EAAMK,OAAQC,wBAA0BxB,IAC1DY,EAAKQ,MACLF,EAAMhB,KAAKU,EAAKU,KAAK,MACrBV,EAAO,CAACD,GACRO,EAAQhB,EACLiB,OAAO,SACPJ,KAAK,IAAK,GACVA,KAAK,IAAKD,GACVC,KAAK,KAAM,GAtBC,MAsBIF,EAA0BG,OAC1Cd,KAAKS,GAGd,EACF,CAEF,MAAMc,EAAoC,EACtCC,OACAC,aAAa,EACbC,eAAe,IACfC,SAAS,IACTjB,QAAO,EACPkB,iBAAiB,UACjBC,WACAC,2BAEA,MAAMC,EAASC,EAAAA,OAAsB,MAC/BC,EAAaD,EAAAA,OAAuB,OACnCE,EAAgBC,GAAqBC,EAAAA,SAASV,GAE/CW,EAAWC,EAAAA,QAAQ,IAAMC,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A3MzC,GAAG0E,EAAAA,OAAU,MAAVA,CAAiBH,EAAM,OACZ,YAAdE,EACA,GAAGD,GAAU,MAAME,EAAAA,OAAU,MAAVA,CAAiBH,GAAKI,QAAQ,IAAK,OAE1DJ,EAAIK,YANM,IAACL,EAAaC,EAAgBC,IA+M9BI,cAAc,GACdnB,YAAY,IAGzBS,EAAMjC,UAAU,cAAcC,SAC9BgC,EAAMW,OAAO,WAAW7F,KAAK,SAAU,QACvCsE,EAAMuB,OAAO,WAAW7F,KAAK,SAAU,QAGvCkF,EAAMjC,UAAU,cACXiB,MAAM,YAAa,QACnBA,MAAM,OAAQ,QACdA,MAAM,cAAe,0DACrBA,MAAM,cAAe,QAE3B,CAACvD,EAAMU,EAAgBP,EAAQjB,EAAMkC,EAAeC,EAAYhB,EAAUD,EAAgBE,EAAsBoB,mBAG/GyD,EAAAA,IAAC,MAAA,CAAIC,IAAK3E,EACV8C,MAAO,CACHjF,MAAO,OACP+G,UAAW5D,EAAwB,OAAS,SAC5C6D,UAAW,UAEXC,wBAAAJ,EAAAA,IAAC,MAAA,CAAIC,IAAK7E,EAAQjC,MAAOoD,EAAsBvB,SAAgBqF,QAAS,OAAO9D,KAAwBvB"}
@@ -0,0 +1,86 @@
1
+ import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
+ import { useRef, useEffect } from "react";
3
+ /* empty css */
4
+ import { Typography } from "../../../typography/typography/index.esm.js";
5
+ import select from "../../../../node_modules/d3-selection/src/select/index.esm.js";
6
+ import pie from "../../../../node_modules/d3-shape/src/pie/index.esm.js";
7
+ import arc from "../../../../node_modules/d3-shape/src/arc/index.esm.js";
8
+ const defaultColors = [
9
+ "#5BCE97",
10
+ "#B3D8E2",
11
+ "#F5F6F5",
12
+ "#AE6B9E",
13
+ "#CBD49A",
14
+ "#EEE0B3"
15
+ ];
16
+ const getSingleNumberFromString = (str) => {
17
+ if (typeof str === "number") {
18
+ return str;
19
+ }
20
+ const match = (str == null ? void 0 : str.match(/\d.+/)) || null;
21
+ return match ? Number(match[0]) : 0;
22
+ };
23
+ const DonutChart = ({
24
+ data,
25
+ height = 140,
26
+ width = 140,
27
+ isUserDashbord,
28
+ legend = true,
29
+ direction = "horizontal",
30
+ totalUsers,
31
+ total = isUserDashbord ? totalUsers : "2.4 GB",
32
+ colors = defaultColors,
33
+ titleProps = {},
34
+ valueProps = {}
35
+ }) => {
36
+ const svgRef = useRef(null);
37
+ useEffect(() => {
38
+ if (!svgRef.current) return;
39
+ const svg = select(svgRef.current);
40
+ svg.selectAll("*").remove();
41
+ const margin = 6;
42
+ const outerRadius = Math.min(width, height) / 2 - margin;
43
+ const innerRadius = Math.min(width, height) / 2 - margin * 2;
44
+ const g = svg.append("g").attr("transform", `translate(${width / 2}, ${height / 2})`);
45
+ const pie$1 = pie().value((d) => getSingleNumberFromString(d.value));
46
+ const path = arc().outerRadius(outerRadius).innerRadius(innerRadius);
47
+ const pies = g.selectAll(".arc").data(pie$1(data)).enter().append("g").attr("class", "arc");
48
+ pies.append("path").attr("d", path).attr("fill", (d, i) => {
49
+ return colors[i % colors.length];
50
+ });
51
+ g.append("text").attr("text-anchor", "middle").attr("font-size", "18px").attr("font-weight", "600").attr("alignment-baseline", `central`).html(total);
52
+ }, [colors, data, height, total, width]);
53
+ if (!legend) {
54
+ return /* @__PURE__ */ jsx("svg", { ref: svgRef, width, height });
55
+ }
56
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: `donut-chart-container ${direction}`, children: [
57
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("svg", { ref: svgRef, width, height }) }),
58
+ /* @__PURE__ */ jsx("div", { className: "donut-chart-legend", children: data && data.map((d, i) => {
59
+ return /* @__PURE__ */ jsxs(
60
+ "div",
61
+ {
62
+ className: "legend",
63
+ style: { borderLeft: `0.188rem solid ${colors[i]}` },
64
+ children: [
65
+ /* @__PURE__ */ jsx("div", { className: "legend-title", children: /* @__PURE__ */ jsx(Typography, { type: "s5", color: "theme.secondary.800", ...titleProps, children: d.label }) }),
66
+ /* @__PURE__ */ jsx("div", { className: "legend-value", children: /* @__PURE__ */ jsx(
67
+ Typography,
68
+ {
69
+ type: "s5",
70
+ weight: "medium",
71
+ color: "theme.secondary.1000",
72
+ children: /* @__PURE__ */ jsx(Typography, { type: "s5", color: "theme.secondary.1000", weight: "bold", ...valueProps, children: d.value })
73
+ }
74
+ ) })
75
+ ]
76
+ },
77
+ d.label
78
+ );
79
+ }) })
80
+ ] }) });
81
+ };
82
+ export {
83
+ DonutChart,
84
+ DonutChart as default
85
+ };
86
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../../src/components/charts/donut-chart/donut-chart.tsx"],"sourcesContent":["import React, { useRef, useEffect } from \"react\";\nimport * as d3 from \"d3\";\nimport \"./donut-chart.scss\";\nimport Typography from \"../../typography/typography\";\n\ninterface DataPoint {\n label: string;\n value: number;\n}\n\ninterface DonutChartProps {\n data: DataPoint[];\n width?: number;\n height?: number;\n legend?: boolean;\n direction?: \"vertical\" | \"horizontal\";\n total?: string;\n colors ?:Array<string>;\n titleProps?:any\n valueProps?:any \n isUserDashbord ?: boolean \n totalUsers ? : any \n}\n\nconst defaultColors = [\n \"#5BCE97\",\n \"#B3D8E2\",\n \"#F5F6F5\",\n \"#AE6B9E\",\n \"#CBD49A\",\n \"#EEE0B3\",\n];\n\nconst getSingleNumberFromString = (str) => {\n if (typeof str === \"number\") {\n return str;\n }\n const match = str?.match(/\\d.+/) || null;\n return match ? Number(match[0]) : 0;\n};\n\nexport const DonutChart: React.FC<DonutChartProps> = ({\n\tdata,\n\theight = 140,\n\twidth = 140,\n isUserDashbord , \n\tlegend = true,\n\tdirection = 'horizontal' ,\n totalUsers , \n\ttotal = isUserDashbord ? totalUsers : \"2.4 GB\",\n colors = defaultColors,\n titleProps={},\n valueProps={}, \n\n}) => {\n const svgRef = useRef<SVGSVGElement>(null);\n\n useEffect(() => {\n if (!svgRef.current) return;\n\n const svg = d3.select(svgRef.current);\n\n svg.selectAll(\"*\").remove();\n\n const margin = 6;\n\n const outerRadius = Math.min(width, height) / 2 - margin;\n const innerRadius = Math.min(width, height) / 2 - margin * 2;\n\n const g = svg\n .append(\"g\")\n .attr(\"transform\", `translate(${width / 2}, ${height / 2})`);\n //@ts-expect-error not applicable\n const pie = d3\n .pie()\n .value((d: DataPoint) => getSingleNumberFromString(d.value));\n\n const path = d3.arc().outerRadius(outerRadius).innerRadius(innerRadius);\n\n const pies = g\n .selectAll(\".arc\")\n //@ts-expect-error not applicable\n .data(pie(data))\n .enter()\n .append(\"g\")\n .attr(\"class\", \"arc\");\n\n pies\n .append(\"path\")\n //@ts-expect-error not applicable\n .attr(\"d\", path)\n //@ts-expect-error not applicable\n .attr(\"fill\", (d: DataPoint, i: number) => {\n return colors[i % colors.length]});\n\n\n // const words = total.split(' '); // Split the text into words\n // const lineHeight = 22; // Define the line height\n // const maxCharsPerLine = 15; // Define the maximum number of characters per line\n\n // let currentLine = '';\n // let lineNumber = 0;\n\n // const textElement =\n g.append(\"text\")\n .attr(\"text-anchor\", \"middle\")\n .attr(\"font-size\", \"18px\")\n .attr(\"font-weight\", \"600\")\n .attr(\"alignment-baseline\", `central`)\n .html(total);\n // .text(total);\n\n // words.forEach((word) => {\n // \tconst tempLine = currentLine + word + ' ';\n\n // \t// Check if the line exceeds the max character count\n // \tif (tempLine.length > maxCharsPerLine && currentLine.length > 0) {\n // \t\ttextElement\n // \t\t\t.append('tspan')\n // \t\t\t.attr('x', 0)\n // \t\t\t.attr('y', lineHeight * lineNumber)\n // \t\t\t.text(currentLine.trim());\n\n // \t\tcurrentLine = word + ' ';\n // \t\tlineNumber++;\n // \t} else {\n // \t\tcurrentLine = tempLine;\n // \t}\n // });\n\n // // Add the last line\n // textElement\n // \t.append('tspan')\n // \t.attr('x', 0)\n // \t.attr('y', lineHeight * lineNumber)\n // \t.text(currentLine.trim());\n }, [colors, data, height, total, width]);\n\n if (!legend) {\n return <svg ref={svgRef} width={width} height={height}></svg>;\n }\n\n return (\n <>\n <div className={`donut-chart-container ${direction}`}>\n <div>\n <svg ref={svgRef} width={width} height={height}></svg>\n </div>\n <div className=\"donut-chart-legend\">\n {data && data.map((d: DataPoint, i: number) => {\n return (\n <div\n className=\"legend\"\n key={d.label}\n style={{ borderLeft: `0.188rem solid ${colors[i]}` }}\n >\n <div className=\"legend-title\">\n <Typography type=\"s5\" color=\"theme.secondary.800\" {...titleProps}>\n {d.label}\n </Typography>\n </div>\n <div className=\"legend-value\">\n <Typography\n type=\"s5\"\n weight=\"medium\"\n color=\"theme.secondary.1000\"\n >\n <Typography type=\"s5\" color=\"theme.secondary.1000\" weight=\"bold\" {...valueProps}>\n {d.value}\n </Typography>\n </Typography>\n </div>\n </div>\n );\n })}\n </div>\n </div>\n </>\n );\n};\n\nexport default DonutChart;\n"],"names":["d3.select","pie","d3.pie","d3.arc"],"mappings":";;;;;;;AAwBA,MAAM,gBAAgB;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,4BAA4B,CAAC,QAAQ;AACzC,MAAI,OAAO,QAAQ,UAAU;AAC3B,WAAO;AAAA,EACT;AACA,QAAM,SAAQ,2BAAK,MAAM,YAAW;AACpC,SAAO,QAAQ,OAAO,MAAM,CAAC,CAAC,IAAI;AACpC;AAEO,MAAM,aAAwC,CAAC;AAAA,EACrD;AAAA,EACA,SAAS;AAAA,EACT,QAAQ;AAAA,EACP;AAAA,EACD,SAAS;AAAA,EACT,YAAY;AAAA,EACX;AAAA,EACD,QAAS,iBAAiB,aAAa;AAAA,EACtC,SAAS;AAAA,EACT,aAAW,CAAA;AAAA,EACX,aAAW,CAAA;AAEb,MAAM;AACJ,QAAM,SAAS,OAAsB,IAAI;AAEzC,YAAU,MAAM;AACd,QAAI,CAAC,OAAO,QAAS;AAErB,UAAM,MAAMA,OAAU,OAAO,OAAO;AAEpC,QAAI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;AAAA,UAEV,OAAO,EAAE,YAAY,kBAAkB,OAAO,CAAC,CAAC,GAAA;AAAA,UAEhD,UAAA;AAAA,YAAA,oBAAC,OAAA,EAAI,WAAU,gBACf,UAAA,oBAAC,YAAA,EAAW,MAAK,MAAK,OAAM,uBAAuB,GAAG,YACnD,UAAA,EAAE,OACL,GACE;AAAA,YACF,oBAAC,OAAA,EAAI,WAAU,gBACb,UAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAK;AAAA,gBACL,QAAO;AAAA,gBACP,OAAM;AAAA,gBAEN,UAAA,oBAAC,YAAA,EAAW,MAAK,MAAK,OAAM,wBAAuB,QAAO,QAAQ,GAAG,YAClE,UAAA,EAAE,MAAA,CACL;AAAA,cAAA;AAAA,YAAA,EACF,CACF;AAAA,UAAA;AAAA,QAAA;AAAA,QAlBK,EAAE;AAAA,MAAA;AAAA,IAqBb,CAAC,EAAA,CACH;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
@@ -0,0 +1,6 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react");;/* empty css */var r=,/* empty css */s=,/* empty css */a=,/* empty css */l=;/* empty css */const n=["#5BCE97","#B3D8E2","#F5F6F5","#AE6B9E","#CBD49A","#EEE0B3"],d=({data:d,height:i=140,width:o=140,isUserDashbord:c,legend:h=!0,direction:u="horizontal",totalUsers:p,total:m=(c?p:"2.4 GB"),colors:x=n,titleProps:g={},valueProps:j={}})=>{const y=t.useRef(null);return t.useEffect(()=>{if(!y.current)return;const e=s.default(y.current);e.selectAll("*").remove();const t=Math.min(o,i)/2-6,r=Math.min(o,i)/2-12,n=e.append("g").attr("transform",`translate(${o/2}, ${i/2})`),c=a.default().value(e=>(e=>{if("number"==typeof e)return e;const t=(null==e?void 0:e.match(/\d.+/))||null;return t?Number(t[0]):0})(e.value)),h=l.default().outerRadius(t).innerRadius(r);n.selectAll(".arc").data(c(d)).enter().append("g").attr("class","arc").append("path").attr("d",h).attr("fill",(e,t)=>x[t%x.length]),n.append("text").attr("text-anchor","middle").attr("font-size","18px").attr("font-weight","600").attr("alignment-baseline","central").html(m)},[x,d,i,m,o]),h?/* @__PURE__ */e.jsx(e.Fragment,{children:/* @__PURE__ */e.jsxs("div",{className:`donut-chart-container ${u}`,children:[
2
+ /* @__PURE__ */e.jsx("div",{children:/* @__PURE__ */e.jsx("svg",{ref:y,width:o,height:i})}),
3
+ /* @__PURE__ */e.jsx("div",{className:"donut-chart-legend",children:d&&d.map((t,s)=>/* @__PURE__ */e.jsxs("div",{className:"legend",style:{borderLeft:`0.188rem solid ${x[s]}`},children:[
4
+ /* @__PURE__ */e.jsx("div",{className:"legend-title",children:/* @__PURE__ */e.jsx(r.Typography,{type:"s5",color:"theme.secondary.800",...g,children:t.label})}),
5
+ /* @__PURE__ */e.jsx("div",{className:"legend-value",children:/* @__PURE__ */e.jsx(r.Typography,{type:"s5",weight:"medium",color:"theme.secondary.1000",children:/* @__PURE__ */e.jsx(r.Typography,{type:"s5",color:"theme.secondary.1000",weight:"bold",...j,children:t.value})})})]},t.label))})]})}):/* @__PURE__ */e.jsx("svg",{ref:y,width:o,height:i})};exports.DonutChart=d,exports.default=d;
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/charts/donut-chart/donut-chart.tsx"],"sourcesContent":["import React, { useRef, useEffect } from \"react\";\nimport * as d3 from \"d3\";\nimport \"./donut-chart.scss\";\nimport Typography from \"../../typography/typography\";\n\ninterface DataPoint {\n label: string;\n value: number;\n}\n\ninterface DonutChartProps {\n data: DataPoint[];\n width?: number;\n height?: number;\n legend?: boolean;\n direction?: \"vertical\" | \"horizontal\";\n total?: string;\n colors ?:Array<string>;\n titleProps?:any\n valueProps?:any \n isUserDashbord ?: boolean \n totalUsers ? : any \n}\n\nconst defaultColors = [\n \"#5BCE97\",\n \"#B3D8E2\",\n \"#F5F6F5\",\n \"#AE6B9E\",\n \"#CBD49A\",\n \"#EEE0B3\",\n];\n\nconst getSingleNumberFromString = (str) => {\n if (typeof str === \"number\") {\n return str;\n }\n const match = str?.match(/\\d.+/) || null;\n return match ? Number(match[0]) : 0;\n};\n\nexport const DonutChart: React.FC<DonutChartProps> = ({\n\tdata,\n\theight = 140,\n\twidth = 140,\n isUserDashbord , \n\tlegend = true,\n\tdirection = 'horizontal' ,\n totalUsers , \n\ttotal = isUserDashbord ? totalUsers : \"2.4 GB\",\n colors = defaultColors,\n titleProps={},\n valueProps={}, \n\n}) => {\n const svgRef = useRef<SVGSVGElement>(null);\n\n useEffect(() => {\n if (!svgRef.current) return;\n\n const svg = d3.select(svgRef.current);\n\n svg.selectAll(\"*\").remove();\n\n const margin = 6;\n\n const outerRadius = Math.min(width, height) / 2 - margin;\n const innerRadius = Math.min(width, height) / 2 - margin * 2;\n\n const g = svg\n .append(\"g\")\n .attr(\"transform\", `translate(${width / 2}, ${height / 2})`);\n //@ts-expect-error not applicable\n const pie = d3\n .pie()\n .value((d: DataPoint) => getSingleNumberFromString(d.value));\n\n const path = d3.arc().outerRadius(outerRadius).innerRadius(innerRadius);\n\n const pies = g\n .selectAll(\".arc\")\n //@ts-expect-error not applicable\n .data(pie(data))\n .enter()\n .append(\"g\")\n .attr(\"class\", \"arc\");\n\n pies\n .append(\"path\")\n //@ts-expect-error not applicable\n .attr(\"d\", path)\n //@ts-expect-error not applicable\n .attr(\"fill\", (d: DataPoint, i: number) => {\n return colors[i % colors.length]});\n\n\n // const words = total.split(' '); // Split the text into words\n // const lineHeight = 22; // Define the line height\n // const maxCharsPerLine = 15; // Define the maximum number of characters per line\n\n // let currentLine = '';\n // let lineNumber = 0;\n\n // const textElement =\n g.append(\"text\")\n .attr(\"text-anchor\", \"middle\")\n .attr(\"font-size\", \"18px\")\n .attr(\"font-weight\", \"600\")\n .attr(\"alignment-baseline\", `central`)\n .html(total);\n // .text(total);\n\n // words.forEach((word) => {\n // \tconst tempLine = currentLine + word + ' ';\n\n // \t// Check if the line exceeds the max character count\n // \tif (tempLine.length > maxCharsPerLine && currentLine.length > 0) {\n // \t\ttextElement\n // \t\t\t.append('tspan')\n // \t\t\t.attr('x', 0)\n // \t\t\t.attr('y', lineHeight * lineNumber)\n // \t\t\t.text(currentLine.trim());\n\n // \t\tcurrentLine = word + ' ';\n // \t\tlineNumber++;\n // \t} else {\n // \t\tcurrentLine = tempLine;\n // \t}\n // });\n\n // // Add the last line\n // textElement\n // \t.append('tspan')\n // \t.attr('x', 0)\n // \t.attr('y', lineHeight * lineNumber)\n // \t.text(currentLine.trim());\n }, [colors, data, height, total, width]);\n\n if (!legend) {\n return <svg ref={svgRef} width={width} height={height}></svg>;\n }\n\n return (\n <>\n <div className={`donut-chart-container ${direction}`}>\n <div>\n <svg ref={svgRef} width={width} height={height}></svg>\n </div>\n <div className=\"donut-chart-legend\">\n {data && data.map((d: DataPoint, i: number) => {\n return (\n <div\n className=\"legend\"\n key={d.label}\n style={{ borderLeft: `0.188rem solid ${colors[i]}` }}\n >\n <div className=\"legend-title\">\n <Typography type=\"s5\" color=\"theme.secondary.800\" {...titleProps}>\n {d.label}\n </Typography>\n </div>\n <div className=\"legend-value\">\n <Typography\n type=\"s5\"\n weight=\"medium\"\n color=\"theme.secondary.1000\"\n >\n <Typography type=\"s5\" color=\"theme.secondary.1000\" weight=\"bold\" {...valueProps}>\n {d.value}\n </Typography>\n </Typography>\n </div>\n </div>\n );\n })}\n </div>\n </div>\n </>\n );\n};\n\nexport default DonutChart;\n"],"names":["defaultColors","DonutChart","data","height","width","isUserDashbord","legend","direction","totalUsers","total","colors","titleProps","valueProps","svgRef","useRef","useEffect","current","svg","d3.select","selectAll","remove","outerRadius","Math","min","innerRadius","margin","g","append","attr","pie","d3.pie","value","d","str","match","Number","getSingleNumberFromString","path","d3.arc","enter","i","length","html","children","jsxs","className","jsx","ref","map","style","borderLeft","Typography","type","color","label","weight"],"mappings":"kaAwBA,MAAMA,EAAgB,CACpB,UACA,UACA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ACCH,wBAAAG,EAAAA,IAAC,MAAA,CAAIC,IAAKlC,EAAQT,QAAcD;eAElC2C,EAAAA,IAAC,OAAID,UAAU,qBACZF,YAAQzC,EAAK8C,IAAI,CAAChB,EAAcQ,mBAE7BI,EAAAA,KAAC,MAAA,CACCC,UAAU,SAEVI,MAAO,CAAEC,WAAY,kBAAkBxC,EAAO8B,MAE9CG,SAAA;eAAAG,EAAAA,IAAC,MAAA,CAAID,UAAU,eACfF,wBAAAG,EAAAA,IAACK,EAAAA,WAAA,CAAWC,KAAK,KAAKC,MAAM,yBAA0B1C,EACnDgC,SAAAX,EAAEsB;iBAGLR,IAAC,MAAA,CAAID,UAAU,eACbF,wBAAAG,EAAAA,IAACK,EAAAA,WAAA,CACCC,KAAK,KACLG,OAAO,SACPF,MAAM,uBAENV,wBAAAG,EAAAA,IAACK,EAAAA,WAAA,CAAWC,KAAK,KAAKC,MAAM,uBAAuBE,OAAO,UAAW3C,EAClE+B,SAAAX,EAAED,cAfJC,EAAEsB,8BAdZR,EAAAA,IAAC,MAAA,CAAIC,IAAKlC,EAAQT,QAAcD"}
@@ -17,6 +17,5 @@ interface DonutChartProps {
17
17
  isUserDashbord?: boolean;
18
18
  totalUsers?: any;
19
19
  }
20
- declare const DonutChart: React.FC<DonutChartProps>;
21
- export { DonutChart };
20
+ export declare const DonutChart: React.FC<DonutChartProps>;
22
21
  export default DonutChart;