@erpsquad/common 1.8.46 → 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 (648) hide show
  1. package/dist/_virtual/index/index.esm10.js +3 -3
  2. package/dist/_virtual/index/index.esm11.js +3 -3
  3. package/dist/_virtual/index/index.esm2.js +2 -4
  4. package/dist/_virtual/index/index.esm2.js.map +1 -1
  5. package/dist/_virtual/index/index.esm3.js +4 -2
  6. package/dist/_virtual/index/index.esm3.js.map +1 -1
  7. package/dist/_virtual/index/index.esm4.js +1 -1
  8. package/dist/_virtual/index/index.esm5.js +3 -3
  9. package/dist/_virtual/index/index.esm6.js +3 -3
  10. package/dist/_virtual/index/index.esm7.js +3 -3
  11. package/dist/_virtual/index/index.esm8.js +3 -3
  12. package/dist/_virtual/index/index.esm9.js +3 -3
  13. package/dist/_virtual/index/index10.js +1 -1
  14. package/dist/_virtual/index/index11.js +1 -1
  15. package/dist/_virtual/index/index2.js +1 -1
  16. package/dist/_virtual/index/index3.js +1 -1
  17. package/dist/_virtual/index/index4.js +1 -1
  18. package/dist/_virtual/index/index5.js +1 -1
  19. package/dist/_virtual/index/index6.js +1 -1
  20. package/dist/_virtual/index/index7.js +1 -1
  21. package/dist/_virtual/index/index8.js +1 -1
  22. package/dist/_virtual/index/index9.js +1 -1
  23. package/dist/assets/index.d.ts +0 -1
  24. package/dist/components/activityLog/activity-log/index.esm.js +104 -0
  25. package/dist/components/activityLog/activity-log/index.esm.js.map +1 -0
  26. package/dist/components/activityLog/activity-log/index.js +14 -0
  27. package/dist/components/activityLog/activity-log/index.js.map +1 -0
  28. package/dist/components/charts/barChart/barChart/index.esm.js +148 -0
  29. package/dist/components/charts/barChart/barChart/index.esm.js.map +1 -0
  30. package/dist/components/charts/barChart/barChart/index.js +2 -0
  31. package/dist/components/charts/barChart/barChart/index.js.map +1 -0
  32. package/dist/components/charts/donut-chart/donut-chart/index.esm.js.map +1 -1
  33. package/dist/components/charts/donut-chart/donut-chart/index.js.map +1 -1
  34. package/dist/components/charts/donut-chart/donut-chart.d.ts +1 -2
  35. package/dist/components/charts/donutChart/DonutChart/index.esm.js +97 -0
  36. package/dist/components/charts/donutChart/DonutChart/index.esm.js.map +1 -0
  37. package/dist/components/charts/donutChart/DonutChart/index.js +5 -0
  38. package/dist/components/charts/donutChart/DonutChart/index.js.map +1 -0
  39. package/dist/components/charts/index.d.ts +11 -0
  40. package/dist/components/charts/line-chart/area-lineChart/index.esm.js +55 -0
  41. package/dist/components/charts/line-chart/area-lineChart/index.esm.js.map +1 -0
  42. package/dist/components/charts/line-chart/area-lineChart/index.js +2 -0
  43. package/dist/components/charts/line-chart/area-lineChart/index.js.map +1 -0
  44. package/dist/components/charts/line-chart/line-chart/index.esm.js +108 -0
  45. package/dist/components/charts/line-chart/line-chart/index.esm.js.map +1 -0
  46. package/dist/components/charts/line-chart/line-chart/index.js +2 -0
  47. package/dist/components/charts/line-chart/line-chart/index.js.map +1 -0
  48. package/dist/components/confirm-modal/confirm-modal/index.esm.js.map +1 -1
  49. package/dist/components/confirm-modal/confirm-modal/index.js.map +1 -1
  50. package/dist/components/confirm-modal/confirm-modal.d.ts +1 -2
  51. package/dist/components/confirm-modal/index.d.ts +1 -0
  52. package/dist/components/editor/custom-editor/index.esm.js +96 -67
  53. package/dist/components/editor/custom-editor/index.esm.js.map +1 -1
  54. package/dist/components/editor/custom-editor/index.js +3 -3
  55. package/dist/components/editor/custom-editor/index.js.map +1 -1
  56. package/dist/components/editor/custom-editor.d.ts +12 -8
  57. package/dist/components/footer/footer/index.esm.js +1 -1
  58. package/dist/components/footer/footer/index.js +2 -2
  59. package/dist/components/footer/footer/index.js.map +1 -1
  60. package/dist/components/form-control/form-parser/form-parser/index.esm.js +1 -1
  61. package/dist/components/form-control/form-parser/form-parser/index.js +4 -4
  62. package/dist/components/form-control/form-parser/form-parser/index.js.map +1 -1
  63. package/dist/components/grid/grid-card/grid-card/index.esm.js +4 -2
  64. package/dist/components/grid/grid-card/grid-card/index.esm.js.map +1 -1
  65. package/dist/components/grid/grid-card/grid-card/index.js +10 -11
  66. package/dist/components/grid/grid-card/grid-card/index.js.map +1 -1
  67. package/dist/components/grid/grid-card/grid-card.d.ts +10 -1
  68. package/dist/components/index.d.ts +294 -98
  69. package/dist/components/index.esm.js +582 -193
  70. package/dist/components/index.esm.js.map +1 -1
  71. package/dist/components/index.js +1 -1
  72. package/dist/components/inventory-reports-title-bar/component/reportFilter.d.ts +3 -2
  73. package/dist/components/inventory-reports-title-bar/inventory-reports-title-bar/index.esm.js +1 -1
  74. package/dist/components/inventory-reports-title-bar/inventory-reports-title-bar/index.js +1 -1
  75. package/dist/components/inventory-reports-title-bar/inventory-reports-title-bar/index.js.map +1 -1
  76. package/dist/components/inventory-reports-title-bar/redux/reducer/index.esm.js +0 -2
  77. package/dist/components/inventory-reports-title-bar/redux/reducer/index.esm.js.map +1 -1
  78. package/dist/components/inventory-reports-title-bar/redux/reducer/index.js +1 -1
  79. package/dist/components/inventory-reports-title-bar/redux/reducer/index.js.map +1 -1
  80. package/dist/components/list/list/index.esm.js +3 -2
  81. package/dist/components/list/list/index.esm.js.map +1 -1
  82. package/dist/components/list/list/index.js +2 -2
  83. package/dist/components/list/list/index.js.map +1 -1
  84. package/dist/components/list/list.d.ts +2 -1
  85. package/dist/components/listing/listing/index.esm.js +1 -1
  86. package/dist/components/listing/listing/index.js +1 -1
  87. package/dist/components/listing/listing/index.js.map +1 -1
  88. package/dist/components/material-table/aggregation-fns/index/index.esm.js +10 -0
  89. package/dist/components/material-table/aggregation-fns/index/index.esm.js.map +1 -1
  90. package/dist/components/material-table/aggregation-fns/index/index.js +1 -1
  91. package/dist/components/material-table/aggregation-fns/index/index.js.map +1 -1
  92. package/dist/components/material-table/components/number-aggregation/index.esm.js +134 -0
  93. package/dist/components/material-table/components/number-aggregation/index.esm.js.map +1 -0
  94. package/dist/components/material-table/components/number-aggregation/index.js +5 -0
  95. package/dist/components/material-table/components/number-aggregation/index.js.map +1 -0
  96. package/dist/components/module-button/module-button/index.esm.js +3 -2
  97. package/dist/components/module-button/module-button/index.esm.js.map +1 -1
  98. package/dist/components/module-button/module-button/index.js +4 -4
  99. package/dist/components/module-button/module-button/index.js.map +1 -1
  100. package/dist/components/module-button/module-button.d.ts +10 -1
  101. package/dist/components/mulitline/multiline/index.esm.js +3 -2
  102. package/dist/components/mulitline/multiline/index.esm.js.map +1 -1
  103. package/dist/components/mulitline/multiline/index.js +9 -9
  104. package/dist/components/mulitline/multiline/index.js.map +1 -1
  105. package/dist/components/mulitline/multiline.d.ts +2 -2
  106. package/dist/components/page-navigator/page-navigator/index.esm.js +4 -3
  107. package/dist/components/page-navigator/page-navigator/index.esm.js.map +1 -1
  108. package/dist/components/page-navigator/page-navigator/index.js +5 -5
  109. package/dist/components/page-navigator/page-navigator/index.js.map +1 -1
  110. package/dist/components/page-navigator/page-navigator.d.ts +3 -3
  111. package/dist/components/parties-modal/parties-modal/index.esm.js +4 -3
  112. package/dist/components/parties-modal/parties-modal/index.esm.js.map +1 -1
  113. package/dist/components/parties-modal/parties-modal/index.js +13 -13
  114. package/dist/components/parties-modal/parties-modal/index.js.map +1 -1
  115. package/dist/components/parties-modal/parties-modal.d.ts +3 -3
  116. package/dist/components/reports-title-bar/report-buttons/report-buttons/index.esm.js +60 -0
  117. package/dist/components/reports-title-bar/report-buttons/report-buttons/index.esm.js.map +1 -0
  118. package/dist/components/reports-title-bar/report-buttons/report-buttons/index.js +2 -0
  119. package/dist/components/reports-title-bar/report-buttons/report-buttons/index.js.map +1 -0
  120. package/dist/components/reports-title-bar/reports-title-bar/index.esm.js +736 -0
  121. package/dist/components/reports-title-bar/reports-title-bar/index.esm.js.map +1 -0
  122. package/dist/components/reports-title-bar/reports-title-bar/index.js +39 -0
  123. package/dist/components/reports-title-bar/reports-title-bar/index.js.map +1 -0
  124. package/dist/components/rfq-response/item-response-details/index.esm.js +40 -48
  125. package/dist/components/rfq-response/item-response-details/index.esm.js.map +1 -1
  126. package/dist/components/rfq-response/item-response-details/index.js +4 -4
  127. package/dist/components/rfq-response/item-response-details/index.js.map +1 -1
  128. package/dist/components/rfq-response/item-response-details.d.ts +2 -1
  129. package/dist/components/schedule-report/utils/common/index.esm.js +1 -1
  130. package/dist/components/select/controller/chip-or-placeholder/index.esm.js +25 -0
  131. package/dist/components/select/controller/chip-or-placeholder/index.esm.js.map +1 -0
  132. package/dist/components/select/controller/chip-or-placeholder/index.js +2 -0
  133. package/dist/components/select/controller/chip-or-placeholder/index.js.map +1 -0
  134. package/dist/components/select/controller/controller-select/index.esm.js +165 -0
  135. package/dist/components/select/controller/controller-select/index.esm.js.map +1 -0
  136. package/dist/components/select/controller/controller-select/index.js +10 -0
  137. package/dist/components/select/controller/controller-select/index.js.map +1 -0
  138. package/dist/components/tab-bar-ui/tab-bar-ui/index.esm.js +4 -10
  139. package/dist/components/tab-bar-ui/tab-bar-ui/index.esm.js.map +1 -1
  140. package/dist/components/tab-bar-ui/tab-bar-ui/index.js +3 -3
  141. package/dist/components/tab-bar-ui/tab-bar-ui/index.js.map +1 -1
  142. package/dist/components/tab-bar-ui/tab-bar-ui.d.ts +3 -3
  143. package/dist/components/tabs/tabs/index.esm.js +3 -2
  144. package/dist/components/tabs/tabs/index.esm.js.map +1 -1
  145. package/dist/components/tabs/tabs/index.js +3 -3
  146. package/dist/components/tabs/tabs/index.js.map +1 -1
  147. package/dist/components/tabs/tabs.d.ts +2 -2
  148. package/dist/hooks/index.esm.js +4 -4
  149. package/dist/hooks/index.js +1 -1
  150. package/dist/hooks/use-translations/index.esm.js +4 -3
  151. package/dist/hooks/use-translations/index.esm.js.map +1 -1
  152. package/dist/hooks/use-translations/index.js +1 -1
  153. package/dist/hooks/use-translations/index.js.map +1 -1
  154. package/dist/hooks/use-translations.d.ts +2 -1
  155. package/dist/hooks/useCheckSkuAndName/index.esm.js +5 -4
  156. package/dist/hooks/useCheckSkuAndName/index.esm.js.map +1 -1
  157. package/dist/hooks/useCheckSkuAndName/index.js +1 -1
  158. package/dist/hooks/useCheckSkuAndName/index.js.map +1 -1
  159. package/dist/hooks/useCheckSkuAndName.d.ts +4 -2
  160. package/dist/index.esm.js +696 -268
  161. package/dist/index.esm.js.map +1 -1
  162. package/dist/index.js +1 -1
  163. package/dist/layout/fullScreen/fullScreen/index.esm.js +5 -3
  164. package/dist/layout/fullScreen/fullScreen/index.esm.js.map +1 -1
  165. package/dist/layout/fullScreen/fullScreen/index.js +3 -3
  166. package/dist/layout/fullScreen/fullScreen/index.js.map +1 -1
  167. package/dist/layout/fullScreen/fullScreen.d.ts +5 -1
  168. package/dist/layout/index.esm.js +4 -4
  169. package/dist/layout/index.js +1 -1
  170. package/dist/layout/sidebarScreen/sidebarScreen/index.esm.js +72 -50
  171. package/dist/layout/sidebarScreen/sidebarScreen/index.esm.js.map +1 -1
  172. package/dist/layout/sidebarScreen/sidebarScreen/index.js +4 -4
  173. package/dist/layout/sidebarScreen/sidebarScreen/index.js.map +1 -1
  174. package/dist/layout/sidebarScreen/sidebarScreen.d.ts +3 -3
  175. package/dist/node_modules/@asseinfo/react-kanban/dist/index/index.esm.js +1 -1
  176. package/dist/node_modules/@asseinfo/react-kanban/dist/index/index.js +1 -1
  177. package/dist/node_modules/@mui/icons-material/esm/Remove/index.esm.js +9 -0
  178. package/dist/node_modules/@mui/icons-material/esm/Remove/index.esm.js.map +1 -0
  179. package/dist/node_modules/@mui/icons-material/esm/Remove/index.js +2 -0
  180. package/dist/node_modules/@mui/icons-material/esm/Remove/index.js.map +1 -0
  181. package/dist/node_modules/@mui/icons-material/utils/createSvgIcon/index.esm.js +1 -1
  182. package/dist/node_modules/@mui/icons-material/utils/createSvgIcon/index.js +1 -1
  183. package/dist/node_modules/@mui/lab/TimelineItem/TimelineItem/index.esm.js +1 -1
  184. package/dist/node_modules/@mui/lab/TimelineItem/TimelineItem/index.js +2 -2
  185. package/dist/node_modules/@mui/material/AccordionActions/AccordionActions/index.esm.js +95 -0
  186. package/dist/node_modules/@mui/material/AccordionActions/AccordionActions/index.esm.js.map +1 -0
  187. package/dist/node_modules/@mui/material/AccordionActions/AccordionActions/index.js +3 -0
  188. package/dist/node_modules/@mui/material/AccordionActions/AccordionActions/index.js.map +1 -0
  189. package/dist/node_modules/@mui/material/AccordionActions/accordionActionsClasses/index.esm.js +10 -0
  190. package/dist/node_modules/@mui/material/AccordionActions/accordionActionsClasses/index.esm.js.map +1 -0
  191. package/dist/node_modules/@mui/material/AccordionActions/accordionActionsClasses/index.js +2 -0
  192. package/dist/node_modules/@mui/material/AccordionActions/accordionActionsClasses/index.js.map +1 -0
  193. package/dist/node_modules/@mui/material/Avatar/avatarClasses/index.esm.js +3 -2
  194. package/dist/node_modules/@mui/material/Avatar/avatarClasses/index.esm.js.map +1 -1
  195. package/dist/node_modules/@mui/material/Avatar/avatarClasses/index.js +1 -1
  196. package/dist/node_modules/@mui/material/Avatar/avatarClasses/index.js.map +1 -1
  197. package/dist/node_modules/@mui/material/AvatarGroup/AvatarGroup/index.esm.js +201 -0
  198. package/dist/node_modules/@mui/material/AvatarGroup/AvatarGroup/index.esm.js.map +1 -0
  199. package/dist/node_modules/@mui/material/AvatarGroup/AvatarGroup/index.js +3 -0
  200. package/dist/node_modules/@mui/material/AvatarGroup/AvatarGroup/index.js.map +1 -0
  201. package/dist/node_modules/@mui/material/AvatarGroup/avatarGroupClasses/index.esm.js +11 -0
  202. package/dist/node_modules/@mui/material/AvatarGroup/avatarGroupClasses/index.esm.js.map +1 -0
  203. package/dist/node_modules/@mui/material/AvatarGroup/avatarGroupClasses/index.js +2 -0
  204. package/dist/node_modules/@mui/material/AvatarGroup/avatarGroupClasses/index.js.map +1 -0
  205. package/dist/node_modules/@mui/material/BottomNavigation/BottomNavigation/index.esm.js +125 -0
  206. package/dist/node_modules/@mui/material/BottomNavigation/BottomNavigation/index.esm.js.map +1 -0
  207. package/dist/node_modules/@mui/material/BottomNavigation/BottomNavigation/index.js +4 -0
  208. package/dist/node_modules/@mui/material/BottomNavigation/BottomNavigation/index.js.map +1 -0
  209. package/dist/node_modules/@mui/material/BottomNavigation/bottomNavigationClasses/index.esm.js +10 -0
  210. package/dist/node_modules/@mui/material/BottomNavigation/bottomNavigationClasses/index.esm.js.map +1 -0
  211. package/dist/node_modules/@mui/material/BottomNavigation/bottomNavigationClasses/index.js +2 -0
  212. package/dist/node_modules/@mui/material/BottomNavigation/bottomNavigationClasses/index.js.map +1 -0
  213. package/dist/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction/index.esm.js +170 -0
  214. package/dist/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction/index.esm.js.map +1 -0
  215. package/dist/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction/index.js +3 -0
  216. package/dist/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction/index.js.map +1 -0
  217. package/dist/node_modules/@mui/material/BottomNavigationAction/bottomNavigationActionClasses/index.esm.js +11 -0
  218. package/dist/node_modules/@mui/material/BottomNavigationAction/bottomNavigationActionClasses/index.esm.js.map +1 -0
  219. package/dist/node_modules/@mui/material/BottomNavigationAction/bottomNavigationActionClasses/index.js +2 -0
  220. package/dist/node_modules/@mui/material/BottomNavigationAction/bottomNavigationActionClasses/index.js.map +1 -0
  221. package/dist/node_modules/@mui/material/CardActionArea/CardActionArea/index.esm.js +120 -0
  222. package/dist/node_modules/@mui/material/CardActionArea/CardActionArea/index.esm.js.map +1 -0
  223. package/dist/node_modules/@mui/material/CardActionArea/CardActionArea/index.js +3 -0
  224. package/dist/node_modules/@mui/material/CardActionArea/CardActionArea/index.js.map +1 -0
  225. package/dist/node_modules/@mui/material/CardActionArea/cardActionAreaClasses/index.esm.js +11 -0
  226. package/dist/node_modules/@mui/material/CardActionArea/cardActionAreaClasses/index.esm.js.map +1 -0
  227. package/dist/node_modules/@mui/material/CardActionArea/cardActionAreaClasses/index.js +2 -0
  228. package/dist/node_modules/@mui/material/CardActionArea/cardActionAreaClasses/index.js.map +1 -0
  229. package/dist/node_modules/@mui/material/CardActions/CardActions/index.esm.js +92 -0
  230. package/dist/node_modules/@mui/material/CardActions/CardActions/index.esm.js.map +1 -0
  231. package/dist/node_modules/@mui/material/CardActions/CardActions/index.js +3 -0
  232. package/dist/node_modules/@mui/material/CardActions/CardActions/index.js.map +1 -0
  233. package/dist/node_modules/@mui/material/CardActions/cardActionsClasses/index.esm.js +10 -0
  234. package/dist/node_modules/@mui/material/CardActions/cardActionsClasses/index.esm.js.map +1 -0
  235. package/dist/node_modules/@mui/material/CardActions/cardActionsClasses/index.js +2 -0
  236. package/dist/node_modules/@mui/material/CardActions/cardActionsClasses/index.js.map +1 -0
  237. package/dist/node_modules/@mui/material/CardHeader/CardHeader/index.esm.js +196 -0
  238. package/dist/node_modules/@mui/material/CardHeader/CardHeader/index.esm.js.map +1 -0
  239. package/dist/node_modules/@mui/material/CardHeader/CardHeader/index.js +2 -0
  240. package/dist/node_modules/@mui/material/CardHeader/CardHeader/index.js.map +1 -0
  241. package/dist/node_modules/@mui/material/CardHeader/cardHeaderClasses/index.esm.js +11 -0
  242. package/dist/node_modules/@mui/material/CardHeader/cardHeaderClasses/index.esm.js.map +1 -0
  243. package/dist/node_modules/@mui/material/CardHeader/cardHeaderClasses/index.js +2 -0
  244. package/dist/node_modules/@mui/material/CardHeader/cardHeaderClasses/index.js.map +1 -0
  245. package/dist/node_modules/@mui/material/DialogContentText/DialogContentText/index.esm.js +76 -0
  246. package/dist/node_modules/@mui/material/DialogContentText/DialogContentText/index.esm.js.map +1 -0
  247. package/dist/node_modules/@mui/material/DialogContentText/DialogContentText/index.js +3 -0
  248. package/dist/node_modules/@mui/material/DialogContentText/DialogContentText/index.js.map +1 -0
  249. package/dist/node_modules/@mui/material/DialogContentText/dialogContentTextClasses/index.esm.js +10 -0
  250. package/dist/node_modules/@mui/material/DialogContentText/dialogContentTextClasses/index.esm.js.map +1 -0
  251. package/dist/node_modules/@mui/material/DialogContentText/dialogContentTextClasses/index.js +2 -0
  252. package/dist/node_modules/@mui/material/DialogContentText/dialogContentTextClasses/index.js.map +1 -0
  253. package/dist/node_modules/@mui/material/Fab/Fab/index.esm.js +231 -0
  254. package/dist/node_modules/@mui/material/Fab/Fab/index.esm.js.map +1 -0
  255. package/dist/node_modules/@mui/material/Fab/Fab/index.js +3 -0
  256. package/dist/node_modules/@mui/material/Fab/Fab/index.js.map +1 -0
  257. package/dist/node_modules/@mui/material/Fab/fabClasses/index.esm.js +11 -0
  258. package/dist/node_modules/@mui/material/Fab/fabClasses/index.esm.js.map +1 -0
  259. package/dist/node_modules/@mui/material/Fab/fabClasses/index.js +2 -0
  260. package/dist/node_modules/@mui/material/Fab/fabClasses/index.js.map +1 -0
  261. package/dist/node_modules/@mui/material/Hidden/Hidden/index.esm.js +135 -0
  262. package/dist/node_modules/@mui/material/Hidden/Hidden/index.esm.js.map +1 -0
  263. package/dist/node_modules/@mui/material/Hidden/Hidden/index.js +2 -0
  264. package/dist/node_modules/@mui/material/Hidden/Hidden/index.js.map +1 -0
  265. package/dist/node_modules/@mui/material/Hidden/HiddenCss/index.esm.js +176 -0
  266. package/dist/node_modules/@mui/material/Hidden/HiddenCss/index.esm.js.map +1 -0
  267. package/dist/node_modules/@mui/material/Hidden/HiddenCss/index.js +3 -0
  268. package/dist/node_modules/@mui/material/Hidden/HiddenCss/index.js.map +1 -0
  269. package/dist/node_modules/@mui/material/Hidden/HiddenJs/index.esm.js +119 -0
  270. package/dist/node_modules/@mui/material/Hidden/HiddenJs/index.esm.js.map +1 -0
  271. package/dist/node_modules/@mui/material/Hidden/HiddenJs/index.js +2 -0
  272. package/dist/node_modules/@mui/material/Hidden/HiddenJs/index.js.map +1 -0
  273. package/dist/node_modules/@mui/material/Hidden/hiddenCssClasses/index.esm.js +10 -0
  274. package/dist/node_modules/@mui/material/Hidden/hiddenCssClasses/index.esm.js.map +1 -0
  275. package/dist/node_modules/@mui/material/Hidden/hiddenCssClasses/index.js +2 -0
  276. package/dist/node_modules/@mui/material/Hidden/hiddenCssClasses/index.js.map +1 -0
  277. package/dist/node_modules/@mui/material/Hidden/withWidth/index.esm.js +92 -0
  278. package/dist/node_modules/@mui/material/Hidden/withWidth/index.esm.js.map +1 -0
  279. package/dist/node_modules/@mui/material/Hidden/withWidth/index.js +2 -0
  280. package/dist/node_modules/@mui/material/Hidden/withWidth/index.js.map +1 -0
  281. package/dist/node_modules/@mui/material/ImageList/ImageList/index.esm.js +156 -0
  282. package/dist/node_modules/@mui/material/ImageList/ImageList/index.esm.js.map +1 -0
  283. package/dist/node_modules/@mui/material/ImageList/ImageList/index.js +3 -0
  284. package/dist/node_modules/@mui/material/ImageList/ImageList/index.js.map +1 -0
  285. package/dist/node_modules/@mui/material/ImageList/ImageListContext/index.esm.js +10 -0
  286. package/dist/node_modules/@mui/material/ImageList/ImageListContext/index.esm.js.map +1 -0
  287. package/dist/node_modules/@mui/material/ImageList/ImageListContext/index.js +2 -0
  288. package/dist/node_modules/@mui/material/ImageList/ImageListContext/index.js.map +1 -0
  289. package/dist/node_modules/@mui/material/ImageList/imageListClasses/index.esm.js +10 -0
  290. package/dist/node_modules/@mui/material/ImageList/imageListClasses/index.esm.js.map +1 -0
  291. package/dist/node_modules/@mui/material/ImageList/imageListClasses/index.js +2 -0
  292. package/dist/node_modules/@mui/material/ImageList/imageListClasses/index.js.map +1 -0
  293. package/dist/node_modules/@mui/material/ImageListItem/ImageListItem/index.esm.js +173 -0
  294. package/dist/node_modules/@mui/material/ImageListItem/ImageListItem/index.esm.js.map +1 -0
  295. package/dist/node_modules/@mui/material/ImageListItem/ImageListItem/index.js +3 -0
  296. package/dist/node_modules/@mui/material/ImageListItem/ImageListItem/index.js.map +1 -0
  297. package/dist/node_modules/@mui/material/ImageListItem/imageListItemClasses/index.esm.js +11 -0
  298. package/dist/node_modules/@mui/material/ImageListItem/imageListItemClasses/index.esm.js.map +1 -0
  299. package/dist/node_modules/@mui/material/ImageListItem/imageListItemClasses/index.js +2 -0
  300. package/dist/node_modules/@mui/material/ImageListItem/imageListItemClasses/index.js.map +1 -0
  301. package/dist/node_modules/@mui/material/ImageListItemBar/ImageListItemBar/index.esm.js +222 -0
  302. package/dist/node_modules/@mui/material/ImageListItemBar/ImageListItemBar/index.esm.js.map +1 -0
  303. package/dist/node_modules/@mui/material/ImageListItemBar/ImageListItemBar/index.js +3 -0
  304. package/dist/node_modules/@mui/material/ImageListItemBar/ImageListItemBar/index.js.map +1 -0
  305. package/dist/node_modules/@mui/material/ImageListItemBar/imageListItemBarClasses/index.esm.js +10 -0
  306. package/dist/node_modules/@mui/material/ImageListItemBar/imageListItemBarClasses/index.esm.js.map +1 -0
  307. package/dist/node_modules/@mui/material/ImageListItemBar/imageListItemBarClasses/index.js +2 -0
  308. package/dist/node_modules/@mui/material/ImageListItemBar/imageListItemBarClasses/index.js.map +1 -0
  309. package/dist/node_modules/@mui/material/MobileStepper/MobileStepper/index.esm.js +216 -0
  310. package/dist/node_modules/@mui/material/MobileStepper/MobileStepper/index.esm.js.map +1 -0
  311. package/dist/node_modules/@mui/material/MobileStepper/MobileStepper/index.js +3 -0
  312. package/dist/node_modules/@mui/material/MobileStepper/MobileStepper/index.js.map +1 -0
  313. package/dist/node_modules/@mui/material/MobileStepper/mobileStepperClasses/index.esm.js +10 -0
  314. package/dist/node_modules/@mui/material/MobileStepper/mobileStepperClasses/index.esm.js.map +1 -0
  315. package/dist/node_modules/@mui/material/MobileStepper/mobileStepperClasses/index.js +2 -0
  316. package/dist/node_modules/@mui/material/MobileStepper/mobileStepperClasses/index.js.map +1 -0
  317. package/dist/node_modules/@mui/material/NativeSelect/NativeSelect/index.esm.js +126 -0
  318. package/dist/node_modules/@mui/material/NativeSelect/NativeSelect/index.esm.js.map +1 -0
  319. package/dist/node_modules/@mui/material/NativeSelect/NativeSelect/index.js +3 -0
  320. package/dist/node_modules/@mui/material/NativeSelect/NativeSelect/index.js.map +1 -0
  321. package/dist/node_modules/@mui/material/NativeSelect/nativeSelectClasses/index.esm.js +1 -1
  322. package/dist/node_modules/@mui/material/NativeSelect/nativeSelectClasses/index.js +1 -1
  323. package/dist/node_modules/@mui/material/NativeSelect/nativeSelectClasses/index.js.map +1 -1
  324. package/dist/node_modules/@mui/material/NoSsr/NoSsr/index.esm.js +55 -0
  325. package/dist/node_modules/@mui/material/NoSsr/NoSsr/index.esm.js.map +1 -0
  326. package/dist/node_modules/@mui/material/NoSsr/NoSsr/index.js +2 -0
  327. package/dist/node_modules/@mui/material/NoSsr/NoSsr/index.js.map +1 -0
  328. package/dist/node_modules/@mui/material/OutlinedInput/outlinedInputClasses/index.esm.js +1 -1
  329. package/dist/node_modules/@mui/material/OutlinedInput/outlinedInputClasses/index.js +1 -1
  330. package/dist/node_modules/@mui/material/Popover/Popover/index.esm.js +1 -1
  331. package/dist/node_modules/@mui/material/Popover/Popover/index.js +1 -1
  332. package/dist/node_modules/@mui/material/Rating/Rating/index.esm.js +638 -0
  333. package/dist/node_modules/@mui/material/Rating/Rating/index.esm.js.map +1 -0
  334. package/dist/node_modules/@mui/material/Rating/Rating/index.js +7 -0
  335. package/dist/node_modules/@mui/material/Rating/Rating/index.js.map +1 -0
  336. package/dist/node_modules/@mui/material/Rating/ratingClasses/index.esm.js +11 -0
  337. package/dist/node_modules/@mui/material/Rating/ratingClasses/index.esm.js.map +1 -0
  338. package/dist/node_modules/@mui/material/Rating/ratingClasses/index.js +2 -0
  339. package/dist/node_modules/@mui/material/Rating/ratingClasses/index.js.map +1 -0
  340. package/dist/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline/index.esm.js +105 -0
  341. package/dist/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline/index.esm.js.map +1 -0
  342. package/dist/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline/index.js +3 -0
  343. package/dist/node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline/index.js.map +1 -0
  344. package/dist/node_modules/@mui/material/ScopedCssBaseline/scopedCssBaselineClasses/index.esm.js +10 -0
  345. package/dist/node_modules/@mui/material/ScopedCssBaseline/scopedCssBaselineClasses/index.esm.js.map +1 -0
  346. package/dist/node_modules/@mui/material/ScopedCssBaseline/scopedCssBaselineClasses/index.js +2 -0
  347. package/dist/node_modules/@mui/material/ScopedCssBaseline/scopedCssBaselineClasses/index.js.map +1 -0
  348. package/dist/node_modules/@mui/material/Snackbar/Snackbar/index.esm.js +1 -1
  349. package/dist/node_modules/@mui/material/Snackbar/Snackbar/index.js +1 -1
  350. package/dist/node_modules/@mui/material/SpeedDial/SpeedDial/index.esm.js +453 -0
  351. package/dist/node_modules/@mui/material/SpeedDial/SpeedDial/index.esm.js.map +1 -0
  352. package/dist/node_modules/@mui/material/SpeedDial/SpeedDial/index.js +4 -0
  353. package/dist/node_modules/@mui/material/SpeedDial/SpeedDial/index.js.map +1 -0
  354. package/dist/node_modules/@mui/material/SpeedDial/speedDialClasses/index.esm.js +11 -0
  355. package/dist/node_modules/@mui/material/SpeedDial/speedDialClasses/index.esm.js.map +1 -0
  356. package/dist/node_modules/@mui/material/SpeedDial/speedDialClasses/index.js +2 -0
  357. package/dist/node_modules/@mui/material/SpeedDial/speedDialClasses/index.js.map +1 -0
  358. package/dist/node_modules/@mui/material/SpeedDialAction/SpeedDialAction/index.esm.js +245 -0
  359. package/dist/node_modules/@mui/material/SpeedDialAction/SpeedDialAction/index.esm.js.map +1 -0
  360. package/dist/node_modules/@mui/material/SpeedDialAction/SpeedDialAction/index.js +2 -0
  361. package/dist/node_modules/@mui/material/SpeedDialAction/SpeedDialAction/index.js.map +1 -0
  362. package/dist/node_modules/@mui/material/SpeedDialAction/speedDialActionClasses/index.esm.js +11 -0
  363. package/dist/node_modules/@mui/material/SpeedDialAction/speedDialActionClasses/index.esm.js.map +1 -0
  364. package/dist/node_modules/@mui/material/SpeedDialAction/speedDialActionClasses/index.js +2 -0
  365. package/dist/node_modules/@mui/material/SpeedDialAction/speedDialActionClasses/index.js.map +1 -0
  366. package/dist/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon/index.esm.js +137 -0
  367. package/dist/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon/index.esm.js.map +1 -0
  368. package/dist/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon/index.js +4 -0
  369. package/dist/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon/index.js.map +1 -0
  370. package/dist/node_modules/@mui/material/SpeedDialIcon/speedDialIconClasses/index.esm.js +11 -0
  371. package/dist/node_modules/@mui/material/SpeedDialIcon/speedDialIconClasses/index.esm.js.map +1 -0
  372. package/dist/node_modules/@mui/material/SpeedDialIcon/speedDialIconClasses/index.js +2 -0
  373. package/dist/node_modules/@mui/material/SpeedDialIcon/speedDialIconClasses/index.js.map +1 -0
  374. package/dist/node_modules/@mui/material/Step/Step/index.esm.js +169 -0
  375. package/dist/node_modules/@mui/material/Step/Step/index.esm.js.map +1 -0
  376. package/dist/node_modules/@mui/material/Step/Step/index.js +3 -0
  377. package/dist/node_modules/@mui/material/Step/Step/index.js.map +1 -0
  378. package/dist/node_modules/@mui/material/Step/StepContext/index.esm.js +10 -0
  379. package/dist/node_modules/@mui/material/Step/StepContext/index.esm.js.map +1 -0
  380. package/dist/node_modules/@mui/material/Step/StepContext/index.js +2 -0
  381. package/dist/node_modules/@mui/material/Step/StepContext/index.js.map +1 -0
  382. package/dist/node_modules/@mui/material/Step/stepClasses/index.esm.js +10 -0
  383. package/dist/node_modules/@mui/material/Step/stepClasses/index.esm.js.map +1 -0
  384. package/dist/node_modules/@mui/material/Step/stepClasses/index.js +2 -0
  385. package/dist/node_modules/@mui/material/Step/stepClasses/index.js.map +1 -0
  386. package/dist/node_modules/@mui/material/StepButton/StepButton/index.esm.js +132 -0
  387. package/dist/node_modules/@mui/material/StepButton/StepButton/index.esm.js.map +1 -0
  388. package/dist/node_modules/@mui/material/StepButton/StepButton/index.js +3 -0
  389. package/dist/node_modules/@mui/material/StepButton/StepButton/index.js.map +1 -0
  390. package/dist/node_modules/@mui/material/StepButton/stepButtonClasses/index.esm.js +11 -0
  391. package/dist/node_modules/@mui/material/StepButton/stepButtonClasses/index.esm.js.map +1 -0
  392. package/dist/node_modules/@mui/material/StepButton/stepButtonClasses/index.js +2 -0
  393. package/dist/node_modules/@mui/material/StepButton/stepButtonClasses/index.js.map +1 -0
  394. package/dist/node_modules/@mui/material/StepConnector/StepConnector/index.esm.js +136 -0
  395. package/dist/node_modules/@mui/material/StepConnector/StepConnector/index.esm.js.map +1 -0
  396. package/dist/node_modules/@mui/material/StepConnector/StepConnector/index.js +3 -0
  397. package/dist/node_modules/@mui/material/StepConnector/StepConnector/index.js.map +1 -0
  398. package/dist/node_modules/@mui/material/StepConnector/stepConnectorClasses/index.esm.js +10 -0
  399. package/dist/node_modules/@mui/material/StepConnector/stepConnectorClasses/index.esm.js.map +1 -0
  400. package/dist/node_modules/@mui/material/StepConnector/stepConnectorClasses/index.js +2 -0
  401. package/dist/node_modules/@mui/material/StepConnector/stepConnectorClasses/index.js.map +1 -0
  402. package/dist/node_modules/@mui/material/StepContent/StepContent/index.esm.js +152 -0
  403. package/dist/node_modules/@mui/material/StepContent/StepContent/index.esm.js.map +1 -0
  404. package/dist/node_modules/@mui/material/StepContent/StepContent/index.js +2 -0
  405. package/dist/node_modules/@mui/material/StepContent/StepContent/index.js.map +1 -0
  406. package/dist/node_modules/@mui/material/StepContent/stepContentClasses/index.esm.js +10 -0
  407. package/dist/node_modules/@mui/material/StepContent/stepContentClasses/index.esm.js.map +1 -0
  408. package/dist/node_modules/@mui/material/StepContent/stepContentClasses/index.js +2 -0
  409. package/dist/node_modules/@mui/material/StepContent/stepContentClasses/index.js.map +1 -0
  410. package/dist/node_modules/@mui/material/StepIcon/StepIcon/index.esm.js +161 -0
  411. package/dist/node_modules/@mui/material/StepIcon/StepIcon/index.esm.js.map +1 -0
  412. package/dist/node_modules/@mui/material/StepIcon/StepIcon/index.js +2 -0
  413. package/dist/node_modules/@mui/material/StepIcon/StepIcon/index.js.map +1 -0
  414. package/dist/node_modules/@mui/material/StepIcon/stepIconClasses/index.esm.js +11 -0
  415. package/dist/node_modules/@mui/material/StepIcon/stepIconClasses/index.esm.js.map +1 -0
  416. package/dist/node_modules/@mui/material/StepIcon/stepIconClasses/index.js +2 -0
  417. package/dist/node_modules/@mui/material/StepIcon/stepIconClasses/index.js.map +1 -0
  418. package/dist/node_modules/@mui/material/StepLabel/StepLabel/index.esm.js +239 -0
  419. package/dist/node_modules/@mui/material/StepLabel/StepLabel/index.esm.js.map +1 -0
  420. package/dist/node_modules/@mui/material/StepLabel/StepLabel/index.js +3 -0
  421. package/dist/node_modules/@mui/material/StepLabel/StepLabel/index.js.map +1 -0
  422. package/dist/node_modules/@mui/material/StepLabel/stepLabelClasses/index.esm.js +11 -0
  423. package/dist/node_modules/@mui/material/StepLabel/stepLabelClasses/index.esm.js.map +1 -0
  424. package/dist/node_modules/@mui/material/StepLabel/stepLabelClasses/index.js +2 -0
  425. package/dist/node_modules/@mui/material/StepLabel/stepLabelClasses/index.js.map +1 -0
  426. package/dist/node_modules/@mui/material/Stepper/Stepper/index.esm.js +155 -0
  427. package/dist/node_modules/@mui/material/Stepper/Stepper/index.esm.js.map +1 -0
  428. package/dist/node_modules/@mui/material/Stepper/Stepper/index.js +3 -0
  429. package/dist/node_modules/@mui/material/Stepper/Stepper/index.js.map +1 -0
  430. package/dist/node_modules/@mui/material/Stepper/StepperContext/index.esm.js +10 -0
  431. package/dist/node_modules/@mui/material/Stepper/StepperContext/index.esm.js.map +1 -0
  432. package/dist/node_modules/@mui/material/Stepper/StepperContext/index.js +2 -0
  433. package/dist/node_modules/@mui/material/Stepper/StepperContext/index.js.map +1 -0
  434. package/dist/node_modules/@mui/material/Stepper/stepperClasses/index.esm.js +10 -0
  435. package/dist/node_modules/@mui/material/Stepper/stepperClasses/index.esm.js.map +1 -0
  436. package/dist/node_modules/@mui/material/Stepper/stepperClasses/index.js +2 -0
  437. package/dist/node_modules/@mui/material/Stepper/stepperClasses/index.js.map +1 -0
  438. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeArea/index.esm.js +82 -0
  439. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeArea/index.esm.js.map +1 -0
  440. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeArea/index.js +3 -0
  441. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeArea/index.js.map +1 -0
  442. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer/index.esm.js +538 -0
  443. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer/index.esm.js.map +1 -0
  444. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer/index.js +2 -0
  445. package/dist/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer/index.js.map +1 -0
  446. package/dist/node_modules/@mui/material/TablePagination/TablePagination/index.esm.js +443 -0
  447. package/dist/node_modules/@mui/material/TablePagination/TablePagination/index.esm.js.map +1 -0
  448. package/dist/node_modules/@mui/material/TablePagination/TablePagination/index.js +3 -0
  449. package/dist/node_modules/@mui/material/TablePagination/TablePagination/index.js.map +1 -0
  450. package/dist/node_modules/@mui/material/TablePagination/TablePaginationActions/index.esm.js +179 -0
  451. package/dist/node_modules/@mui/material/TablePagination/TablePaginationActions/index.esm.js.map +1 -0
  452. package/dist/node_modules/@mui/material/TablePagination/TablePaginationActions/index.js +3 -0
  453. package/dist/node_modules/@mui/material/TablePagination/TablePaginationActions/index.js.map +1 -0
  454. package/dist/node_modules/@mui/material/TablePagination/tablePaginationClasses/index.esm.js +11 -0
  455. package/dist/node_modules/@mui/material/TablePagination/tablePaginationClasses/index.esm.js.map +1 -0
  456. package/dist/node_modules/@mui/material/TablePagination/tablePaginationClasses/index.js +2 -0
  457. package/dist/node_modules/@mui/material/TablePagination/tablePaginationClasses/index.js.map +1 -0
  458. package/dist/node_modules/@mui/material/Tabs/Tabs/index.esm.js +1 -1
  459. package/dist/node_modules/@mui/material/Tabs/Tabs/index.js +1 -1
  460. package/dist/node_modules/@mui/material/Zoom/Zoom/index.esm.js +196 -0
  461. package/dist/node_modules/@mui/material/Zoom/Zoom/index.esm.js.map +1 -0
  462. package/dist/node_modules/@mui/material/Zoom/Zoom/index.js +3 -0
  463. package/dist/node_modules/@mui/material/Zoom/Zoom/index.js.map +1 -0
  464. package/dist/node_modules/@mui/material/internal/svg-icons/Add/index.esm.js +9 -0
  465. package/dist/node_modules/@mui/material/internal/svg-icons/Add/index.esm.js.map +1 -0
  466. package/dist/node_modules/@mui/material/internal/svg-icons/Add/index.js +2 -0
  467. package/dist/node_modules/@mui/material/internal/svg-icons/Add/index.js.map +1 -0
  468. package/dist/node_modules/@mui/material/internal/svg-icons/CheckCircle/index.esm.js +9 -0
  469. package/dist/node_modules/@mui/material/internal/svg-icons/CheckCircle/index.esm.js.map +1 -0
  470. package/dist/node_modules/@mui/material/internal/svg-icons/CheckCircle/index.js +2 -0
  471. package/dist/node_modules/@mui/material/internal/svg-icons/CheckCircle/index.js.map +1 -0
  472. package/dist/node_modules/@mui/material/internal/svg-icons/Star/index.esm.js +9 -0
  473. package/dist/node_modules/@mui/material/internal/svg-icons/Star/index.esm.js.map +1 -0
  474. package/dist/node_modules/@mui/material/internal/svg-icons/Star/index.js +2 -0
  475. package/dist/node_modules/@mui/material/internal/svg-icons/Star/index.js.map +1 -0
  476. package/dist/node_modules/@mui/material/internal/svg-icons/StarBorder/index.esm.js +9 -0
  477. package/dist/node_modules/@mui/material/internal/svg-icons/StarBorder/index.esm.js.map +1 -0
  478. package/dist/node_modules/@mui/material/internal/svg-icons/StarBorder/index.js +2 -0
  479. package/dist/node_modules/@mui/material/internal/svg-icons/StarBorder/index.js.map +1 -0
  480. package/dist/node_modules/@mui/material/internal/svg-icons/Warning/index.esm.js +9 -0
  481. package/dist/node_modules/@mui/material/internal/svg-icons/Warning/index.esm.js.map +1 -0
  482. package/dist/node_modules/@mui/material/internal/svg-icons/Warning/index.js +2 -0
  483. package/dist/node_modules/@mui/material/internal/svg-icons/Warning/index.js.map +1 -0
  484. package/dist/node_modules/@mui/material/useScrollTrigger/useScrollTrigger/index.esm.js +51 -0
  485. package/dist/node_modules/@mui/material/useScrollTrigger/useScrollTrigger/index.esm.js.map +1 -0
  486. package/dist/node_modules/@mui/material/useScrollTrigger/useScrollTrigger/index.js +2 -0
  487. package/dist/node_modules/@mui/material/useScrollTrigger/useScrollTrigger/index.js.map +1 -0
  488. package/dist/node_modules/@mui/system/colorManipulator/index.esm.js +2 -2
  489. package/dist/node_modules/@mui/system/colorManipulator/index.js +1 -1
  490. package/dist/node_modules/@mui/system/colorManipulator/index.js.map +1 -1
  491. package/dist/node_modules/@mui/system/createStyled/index.esm.js +6 -6
  492. package/dist/node_modules/@mui/system/createStyled/index.js +1 -1
  493. package/dist/node_modules/@mui/system/createStyled/index.js.map +1 -1
  494. package/dist/node_modules/@mui/system/esm/Stack/createStack/index.esm.js +1 -1
  495. package/dist/node_modules/@mui/system/esm/Stack/createStack/index.js +2 -2
  496. package/dist/node_modules/@mui/system/useThemeWithoutDefault/index.esm.js +1 -1
  497. package/dist/node_modules/@mui/system/useThemeWithoutDefault/index.js +1 -1
  498. package/dist/node_modules/d3-axis/src/axis/index.esm.js +5 -1
  499. package/dist/node_modules/d3-axis/src/axis/index.esm.js.map +1 -1
  500. package/dist/node_modules/d3-axis/src/axis/index.js +1 -1
  501. package/dist/node_modules/d3-axis/src/axis/index.js.map +1 -1
  502. package/dist/redux/hooks/index.esm.js +1 -1
  503. package/dist/src/assets/index.d.ts +0 -1
  504. package/dist/src/components/charts/donut-chart/donut-chart.d.ts +1 -2
  505. package/dist/src/components/charts/index.d.ts +11 -0
  506. package/dist/src/components/confirm-modal/confirm-modal.d.ts +1 -2
  507. package/dist/src/components/confirm-modal/index.d.ts +1 -0
  508. package/dist/src/components/editor/custom-editor.d.ts +12 -8
  509. package/dist/src/components/grid/grid-card/grid-card.d.ts +10 -1
  510. package/dist/src/components/index.d.ts +229 -94
  511. package/dist/src/components/inventory-reports-title-bar/component/reportFilter.d.ts +3 -2
  512. package/dist/src/components/list/list.d.ts +2 -1
  513. package/dist/src/components/module-button/module-button.d.ts +10 -1
  514. package/dist/src/components/mulitline/multiline.d.ts +2 -2
  515. package/dist/src/components/page-navigator/page-navigator.d.ts +3 -3
  516. package/dist/src/components/parties-modal/parties-modal.d.ts +3 -3
  517. package/dist/src/components/rfq-response/item-response-details.d.ts +2 -1
  518. package/dist/src/components/tab-bar-ui/tab-bar-ui.d.ts +3 -3
  519. package/dist/src/components/tabs/tabs.d.ts +2 -2
  520. package/dist/src/hooks/use-translations.d.ts +2 -1
  521. package/dist/src/hooks/useCheckSkuAndName.d.ts +4 -2
  522. package/dist/src/layout/fullScreen/fullScreen.d.ts +5 -1
  523. package/dist/src/layout/sidebarScreen/sidebarScreen.d.ts +3 -3
  524. package/dist/src/views/afterAuth/dashboard/dashboard.d.ts +2 -1
  525. package/dist/src/views/afterAuth/index.d.ts +1 -0
  526. package/dist/src/views/beforeAuth/index.d.ts +0 -1
  527. package/dist/src/views/form-builder/element-edit-forms/column-width.d.ts +5 -3
  528. package/dist/src/views/index.d.ts +1 -0
  529. package/dist/style.css +77 -71
  530. package/dist/utils/common/index.esm.js +1 -1
  531. package/dist/views/afterAuth/dashboard/dashboard/index.esm.js +5 -4
  532. package/dist/views/afterAuth/dashboard/dashboard/index.esm.js.map +1 -1
  533. package/dist/views/afterAuth/dashboard/dashboard/index.js +3 -3
  534. package/dist/views/afterAuth/dashboard/dashboard/index.js.map +1 -1
  535. package/dist/views/afterAuth/dashboard/dashboard.d.ts +2 -1
  536. package/dist/views/afterAuth/dashboard/redux/reducer/index.esm.js +0 -6
  537. package/dist/views/afterAuth/dashboard/redux/reducer/index.esm.js.map +1 -1
  538. package/dist/views/afterAuth/dashboard/redux/reducer/index.js +1 -1
  539. package/dist/views/afterAuth/dashboard/redux/reducer/index.js.map +1 -1
  540. package/dist/views/afterAuth/index.d.ts +1 -0
  541. package/dist/views/afterAuth/page-view/page-view/index.esm.js +101 -0
  542. package/dist/views/afterAuth/page-view/page-view/index.esm.js.map +1 -0
  543. package/dist/views/afterAuth/page-view/page-view/index.js +6 -0
  544. package/dist/views/afterAuth/page-view/page-view/index.js.map +1 -0
  545. package/dist/views/afterAuth/page-view/redux/actionCreator/index.esm.js +13 -0
  546. package/dist/views/afterAuth/page-view/redux/actionCreator/index.esm.js.map +1 -0
  547. package/dist/views/afterAuth/page-view/redux/actionCreator/index.js +2 -0
  548. package/dist/views/afterAuth/page-view/redux/actionCreator/index.js.map +1 -0
  549. package/dist/views/afterAuth/page-view/redux/reducer/index.esm.js +63 -0
  550. package/dist/views/afterAuth/page-view/redux/reducer/index.esm.js.map +1 -0
  551. package/dist/views/afterAuth/page-view/redux/reducer/index.js +2 -0
  552. package/dist/views/afterAuth/page-view/redux/reducer/index.js.map +1 -0
  553. package/dist/views/afterAuth/page-view/redux/state/index.esm.js +31 -0
  554. package/dist/views/afterAuth/page-view/redux/state/index.esm.js.map +1 -0
  555. package/dist/views/afterAuth/page-view/redux/state/index.js +2 -0
  556. package/dist/views/afterAuth/page-view/redux/state/index.js.map +1 -0
  557. package/dist/views/afterAuth/page-view/utils/default-data/index.esm.js +137 -0
  558. package/dist/views/afterAuth/page-view/utils/default-data/index.esm.js.map +1 -0
  559. package/dist/views/afterAuth/page-view/utils/default-data/index.js +2 -0
  560. package/dist/views/afterAuth/page-view/utils/default-data/index.js.map +1 -0
  561. package/dist/views/afterAuth/page-view/utils/local-data/index.esm.js +137 -0
  562. package/dist/views/afterAuth/page-view/utils/local-data/index.esm.js.map +1 -0
  563. package/dist/views/afterAuth/page-view/utils/local-data/index.js +2 -0
  564. package/dist/views/afterAuth/page-view/utils/local-data/index.js.map +1 -0
  565. package/dist/views/beforeAuth/index.d.ts +0 -1
  566. package/dist/views/form-builder/custom-form/index.esm.js +1151 -0
  567. package/dist/views/form-builder/custom-form/index.esm.js.map +1 -0
  568. package/dist/views/form-builder/custom-form/index.js +30 -0
  569. package/dist/views/form-builder/custom-form/index.js.map +1 -0
  570. package/dist/views/form-builder/element-edit-forms/checkbox/index.esm.js +327 -0
  571. package/dist/views/form-builder/element-edit-forms/checkbox/index.esm.js.map +1 -0
  572. package/dist/views/form-builder/element-edit-forms/checkbox/index.js +30 -0
  573. package/dist/views/form-builder/element-edit-forms/checkbox/index.js.map +1 -0
  574. package/dist/views/form-builder/element-edit-forms/column-width/index.esm.js +93 -0
  575. package/dist/views/form-builder/element-edit-forms/column-width/index.esm.js.map +1 -0
  576. package/dist/views/form-builder/element-edit-forms/column-width/index.js +4 -0
  577. package/dist/views/form-builder/element-edit-forms/column-width/index.js.map +1 -0
  578. package/dist/views/form-builder/element-edit-forms/column-width.d.ts +5 -3
  579. package/dist/views/form-builder/element-edit-forms/field-select/index.esm.js +89 -0
  580. package/dist/views/form-builder/element-edit-forms/field-select/index.esm.js.map +1 -0
  581. package/dist/views/form-builder/element-edit-forms/field-select/index.js +3 -0
  582. package/dist/views/form-builder/element-edit-forms/field-select/index.js.map +1 -0
  583. package/dist/views/form-builder/element-edit-forms/section/index.esm.js +222 -0
  584. package/dist/views/form-builder/element-edit-forms/section/index.esm.js.map +1 -0
  585. package/dist/views/form-builder/element-edit-forms/section/index.js +15 -0
  586. package/dist/views/form-builder/element-edit-forms/section/index.js.map +1 -0
  587. package/dist/views/form-builder/element-edit-forms/select/index.esm.js +318 -0
  588. package/dist/views/form-builder/element-edit-forms/select/index.esm.js.map +1 -0
  589. package/dist/views/form-builder/element-edit-forms/select/index.js +25 -0
  590. package/dist/views/form-builder/element-edit-forms/select/index.js.map +1 -0
  591. package/dist/views/form-builder/element-edit-forms/table-form/index.esm.js +111 -0
  592. package/dist/views/form-builder/element-edit-forms/table-form/index.esm.js.map +1 -0
  593. package/dist/views/form-builder/element-edit-forms/table-form/index.js +5 -0
  594. package/dist/views/form-builder/element-edit-forms/table-form/index.js.map +1 -0
  595. package/dist/views/form-builder/element-edit-forms/text/index.esm.js +559 -0
  596. package/dist/views/form-builder/element-edit-forms/text/index.esm.js.map +1 -0
  597. package/dist/views/form-builder/element-edit-forms/text/index.js +31 -0
  598. package/dist/views/form-builder/element-edit-forms/text/index.js.map +1 -0
  599. package/dist/views/form-builder/field_properties/index.esm.js +216 -0
  600. package/dist/views/form-builder/field_properties/index.esm.js.map +1 -0
  601. package/dist/views/form-builder/field_properties/index.js +2 -0
  602. package/dist/views/form-builder/field_properties/index.js.map +1 -0
  603. package/dist/views/form-builder/form-fields/index.esm.js +355 -0
  604. package/dist/views/form-builder/form-fields/index.esm.js.map +1 -0
  605. package/dist/views/form-builder/form-fields/index.js +24 -0
  606. package/dist/views/form-builder/form-fields/index.js.map +1 -0
  607. package/dist/views/form-builder/redux/actionCreator/index.esm.js +1 -1
  608. package/dist/views/form-builder/redux/reducer/index.esm.js +6 -1
  609. package/dist/views/form-builder/redux/reducer/index.esm.js.map +1 -1
  610. package/dist/views/form-builder/redux/reducer/index.js +1 -1
  611. package/dist/views/form-builder/redux/reducer/index.js.map +1 -1
  612. package/dist/views/form-builder/utils/common/index.esm.js +285 -0
  613. package/dist/views/form-builder/utils/common/index.esm.js.map +1 -0
  614. package/dist/views/form-builder/utils/common/index.js +2 -0
  615. package/dist/views/form-builder/utils/common/index.js.map +1 -0
  616. package/dist/views/index.d.ts +1 -0
  617. package/dist/views/index.esm.js +94 -49
  618. package/dist/views/index.esm.js.map +1 -1
  619. package/dist/views/index.js +1 -1
  620. package/package.json +2 -1
  621. package/dist/components/examples/FlexibleReduxExample/index.esm.js +0 -154
  622. package/dist/components/examples/FlexibleReduxExample/index.esm.js.map +0 -1
  623. package/dist/components/examples/FlexibleReduxExample/index.js +0 -19
  624. package/dist/components/examples/FlexibleReduxExample/index.js.map +0 -1
  625. package/dist/components/footer/index.esm.js +0 -71
  626. package/dist/components/footer/index.esm.js.map +0 -1
  627. package/dist/components/footer/index.js +0 -7
  628. package/dist/components/footer/index.js.map +0 -1
  629. package/dist/components/header/header-enhanced/index.esm.js +0 -405
  630. package/dist/components/header/header-enhanced/index.esm.js.map +0 -1
  631. package/dist/components/header/header-enhanced/index.js +0 -33
  632. package/dist/components/header/header-enhanced/index.js.map +0 -1
  633. package/dist/components/header copy/index.esm.js +0 -131
  634. package/dist/components/header copy/index.esm.js.map +0 -1
  635. package/dist/components/header copy/index.js +0 -11
  636. package/dist/components/header copy/index.js.map +0 -1
  637. package/dist/components/inventory-reports-title-bar/component/reportFilter/index.esm.js +0 -400
  638. package/dist/components/inventory-reports-title-bar/component/reportFilter/index.esm.js.map +0 -1
  639. package/dist/components/inventory-reports-title-bar/component/reportFilter/index.js +0 -41
  640. package/dist/components/inventory-reports-title-bar/component/reportFilter/index.js.map +0 -1
  641. package/dist/components/share-modal/share-modal-enhanced/index.esm.js +0 -288
  642. package/dist/components/share-modal/share-modal-enhanced/index.esm.js.map +0 -1
  643. package/dist/components/share-modal/share-modal-enhanced/index.js +0 -24
  644. package/dist/components/share-modal/share-modal-enhanced/index.js.map +0 -1
  645. package/dist/views/beforeAuth/login/index/index.esm.js +0 -209
  646. package/dist/views/beforeAuth/login/index/index.esm.js.map +0 -1
  647. package/dist/views/beforeAuth/login/index/index.js +0 -20
  648. package/dist/views/beforeAuth/login/index/index.js.map +0 -1
@@ -1 +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\nconst 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 { DonutChart };\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;AAEA,MAAM,aAAwC,CAAC;AAAA,EAC9C;AAAA,EACA,SAAS;AAAA,EACT,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AAAA,EACzD;AAEA,yCAEI,UAAA,qBAAC,OAAA,EAAI,WAAW,yBAAyB,SAAS,IAChD,UAAA;AAAA,IAAA,oBAAC,SACC,UAAA,oBAAC,OAAA,EAAI,KAAK,QAAQ,OAAc,QAAgB,EAAA,CAClD;AAAA,IACA,oBAAC,SAAI,WAAU,sBACZ,kBAAQ,KAAK,IAAI,CAAC,GAAc,MAAc;AAC7C,aACE;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;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;"}
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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AK,eAAe,KAAK,EACzB,KAAK,sBAAsB,SAAS,EACpC,KAAK,KAAK;AAAA,EA2Bf,GAAG,CAAC,QAAQ,MAAM,QAAQ,OAAO,KAAK,CAAC;AAEvC,MAAI,CAAC,QAAQ;AACX,WAAO,oBAAC,OAAA,EAAI,KAAK,QAAQ,OAAc,QAAgB;AAAA,EACzD;AAEA,yCAEI,UAAA,qBAAC,OAAA,EAAI,WAAW,yBAAyB,SAAS,IAChD,UAAA;AAAA,IAAA,oBAAC,SACC,UAAA,oBAAC,OAAA,EAAI,KAAK,QAAQ,OAAc,QAAgB,EAAA,CAClD;AAAA,IACA,oBAAC,SAAI,WAAU,sBACZ,kBAAQ,KAAK,IAAI,CAAC,GAAc,MAAc;AAC7C,aACE;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;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;"}
@@ -1 +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\nconst 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 { DonutChart };\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,UACA,UACA,UACA,WAWIC,EAAwC,EAC7CC,OACAC,SAAS,IACTC,QAAQ,IACPC,iBACDC,UAAS,EACTC,YAAY,aACXC,aACDC,SAASJ,EAAiBG,EAAa,UACtCE,SAASV,EACTW,aAAW,CAAA,EACXC,aAAW,CAAA,MAGX,MAAMC,EAASC,EAAAA,OAAsB,MAmFrC,OAjFAC,EAAAA,UAAU,KACR,IAAKF,EAAOG,QAAS,OAErB,MAAMC,EAAMC,EAAAA,QAAUL,EAAOG,SAE7BC,EAAIE,UAAU,KAAKC,SAEnB,MAEMC,EAAcC,KAAKC,IAAInB,EAAOD,GAAU,EAF/B,EAGTqB,EAAcF,KAAKC,IAAInB,EAAOD,GAAU,EAAIsB,GAE5CC,EAAIT,EACPU,OAAO,KACPC,KAAK,YAAa,aAAaxB,EAAQ,MAAMD,EAAS,MAEnD0B,EAAMC,EAAAA,UAETC,MAAOC,GA1CoB,CAACC,IACjC,GAAmB,iBAARA,EACT,OAAOA,EAET,MAAMC,GAAQ,MAAAD,OAAA,EAAAA,EAAKC,MAAM,UAAW,KACpC,OAAOA,EAAQC,OAAOD,EAAM,IAAM,GAqCLE,CAA0BJ,EAAED,QAEjDM,EAAOC,EAAAA,UAASjB,YAAYA,GAAaG,YAAYA,GAE9CE,EACVP,UAAU,QAEVjB,KAAK2B,EAAI3B,IACTqC,QACAZ,OAAO,KACPC,KAAK,QAAS,OAGdD,OAAO,QAEPC,KAAK,IAAKS,GAEVT,KAAK,OAAQ,CAACI,EAAcQ,IACpB9B,EAAO8B,EAAI9B,EAAO+B,SAW7Bf,EAAEC,OAAO,QACNC,KAAK,cAAe,UACpBA,KAAK,YAAa,QAClBA,KAAK,cAAe,OACpBA,KAAK,qBAAsB,WAC3Bc,KAAKjC,IA2BP,CAACC,EAAQR,EAAMC,EAAQM,EAAOL,IAE5BE,mCAMDqC,wBAAAC,EAAAA,KAAC,MAAA,CAAIC,UAAW,yBAAyBtC,IACvCoC,SAAA;eAAAG,EAAAA,IAAC,OACCH,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"}
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,UACA,UACA,UACA,WAWWC,EAAwC,EACpDC,OACAC,SAAS,IACTC,QAAQ,IACPC,iBACDC,UAAS,EACTC,YAAY,aACXC,aACDC,SAASJ,EAAiBG,EAAa,UACtCE,SAASV,EACTW,aAAW,CAAA,EACXC,aAAW,CAAA,MAGX,MAAMC,EAASC,EAAAA,OAAsB,MAmFrC,OAjFAC,EAAAA,UAAU,KACR,IAAKF,EAAOG,QAAS,OAErB,MAAMC,EAAMC,EAAAA,QAAUL,EAAOG,SAE7BC,EAAIE,UAAU,KAAKC,SAEnB,MAEMC,EAAcC,KAAKC,IAAInB,EAAOD,GAAU,EAF/B,EAGTqB,EAAcF,KAAKC,IAAInB,EAAOD,GAAU,EAAIsB,GAE5CC,EAAIT,EACPU,OAAO,KACPC,KAAK,YAAa,aAAaxB,EAAQ,MAAMD,EAAS,MAEnD0B,EAAMC,EAAAA,UAETC,MAAOC,GA1CoB,CAACC,IACjC,GAAmB,iBAARA,EACT,OAAOA,EAET,MAAMC,GAAQ,MAAAD,OAAA,EAAAA,EAAKC,MAAM,UAAW,KACpC,OAAOA,EAAQC,OAAOD,EAAM,IAAM,GAqCLE,CAA0BJ,EAAED,QAEjDM,EAAOC,EAAAA,UAASjB,YAAYA,GAAaG,YAAYA,GAE9CE,EACVP,UAAU,QAEVjB,KAAK2B,EAAI3B,IACTqC,QACAZ,OAAO,KACPC,KAAK,QAAS,OAGdD,OAAO,QAEPC,KAAK,IAAKS,GAEVT,KAAK,OAAQ,CAACI,EAAcQ,IACpB9B,EAAO8B,EAAI9B,EAAO+B,SAW7Bf,EAAEC,OAAO,QACNC,KAAK,cAAe,UACpBA,KAAK,YAAa,QAClBA,KAAK,cAAe,OACpBA,KAAK,qBAAsB,WAC3Bc,KAAKjC,IA2BP,CAACC,EAAQR,EAAMC,EAAQM,EAAOL,IAE5BE,mCAMDqC,wBAAAC,EAAAA,KAAC,MAAA,CAAIC,UAAW,yBAAyBtC,IACvCoC,SAAA;eAAAG,EAAAA,IAAC,OACCH,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;
@@ -0,0 +1,97 @@
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 { useAuth } from "../../../../hooks/useAuth/index.esm.js";
6
+ import select from "../../../../node_modules/d3-selection/src/select/index.esm.js";
7
+ import pie from "../../../../node_modules/d3-shape/src/pie/index.esm.js";
8
+ import arc from "../../../../node_modules/d3-shape/src/arc/index.esm.js";
9
+ const formatNumber = (num, defaultCurrencySymbol = "") => {
10
+ if (num >= 1e6) {
11
+ return `${defaultCurrencySymbol} ${(num / 1e6).toFixed(1)} M`;
12
+ } else if (num >= 1e5) {
13
+ return `${defaultCurrencySymbol} ${(num / 1e5).toFixed(1)} L`;
14
+ } else if (num >= 1e3) {
15
+ return `${(num / 1e3).toFixed(1)} K`;
16
+ } else {
17
+ return `${defaultCurrencySymbol} ${num.toFixed(2)}`;
18
+ }
19
+ };
20
+ const getSingleNumberFromString = (str) => {
21
+ if (typeof str === "number") {
22
+ return str;
23
+ }
24
+ const match = (str == null ? void 0 : str.match(/\d.+/)) || null;
25
+ return match ? Number(match[0]) : 0;
26
+ };
27
+ const DonutChart = ({
28
+ data,
29
+ height = 140,
30
+ width = 140,
31
+ legend = true,
32
+ direction = "vertical",
33
+ total = "300",
34
+ donutThickerValue,
35
+ CustomLegends,
36
+ title = ""
37
+ }) => {
38
+ var _a;
39
+ const svgRef = useRef(null);
40
+ const { user } = useAuth();
41
+ const defaultCurrencySymbol = ((_a = user == null ? void 0 : user.currency_data) == null ? void 0 : _a.symbol) || "";
42
+ useEffect(() => {
43
+ if (!svgRef.current) return;
44
+ const svg = select(svgRef.current);
45
+ svg.selectAll("*").remove();
46
+ const margin = 6;
47
+ const outerRadius = Math.min(width, height) / 2 - margin;
48
+ let innerRadius = Math.min(width, height) / 2 - margin * 2;
49
+ if (donutThickerValue) {
50
+ innerRadius = outerRadius - donutThickerValue;
51
+ }
52
+ const g = svg.append("g").attr("transform", `translate(${width / 2}, ${height / 2})`);
53
+ const pie$1 = pie().value((d) => getSingleNumberFromString(d.value)).padAngle(0);
54
+ const path = arc().outerRadius(outerRadius).innerRadius(innerRadius);
55
+ const pies = g.selectAll(".arc").data(pie$1(data)).enter().append("g").attr("class", "arc");
56
+ pies.append("path").attr("d", path).attr("fill", (d) => {
57
+ var _a2;
58
+ return (_a2 = d == null ? void 0 : d.data) == null ? void 0 : _a2.color;
59
+ }).attr("stroke", "none");
60
+ g.append("text").attr("text-anchor", "middle").attr("font-size", "18px").attr("font-weight", "600").attr("alignment-baseline", `central`).html(total);
61
+ g.append("text").attr("text-anchor", "middle").attr("maring-top", "20px").attr("font-size", "13px").attr("font-weight", "600").attr("dy", "2em").attr("color", "#7B7C7F").html(title);
62
+ }, [data, height, total, width, defaultCurrencySymbol, donutThickerValue, CustomLegends, title]);
63
+ if (!legend) {
64
+ return /* @__PURE__ */ jsx("svg", { ref: svgRef, width, height });
65
+ }
66
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: `donut-chart-container ${direction}`, children: [
67
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("svg", { ref: svgRef, width, height }) }),
68
+ CustomLegends ? /* @__PURE__ */ jsx(CustomLegends, { data }) : /* @__PURE__ */ jsx("div", { className: "donut-legend", children: /* @__PURE__ */ jsx("div", { className: `donut-chart-legend ${direction}`, children: data.map((d) => /* @__PURE__ */ jsxs(
69
+ "div",
70
+ {
71
+ className: "legend",
72
+ style: { borderLeft: `0.188rem solid ${d.color}` },
73
+ children: [
74
+ /* @__PURE__ */ jsx("div", { className: "legend-title", style: { color: `${d.labelColor}` }, children: d.label }),
75
+ /* @__PURE__ */ jsx("div", { className: "legend-value", children: /* @__PURE__ */ jsx(
76
+ Typography,
77
+ {
78
+ type: "s5",
79
+ weight: "medium",
80
+ color: d.valueColor,
81
+ style: {
82
+ whiteSpace: "nowrap"
83
+ },
84
+ children: formatNumber(d.value, defaultCurrencySymbol)
85
+ }
86
+ ) })
87
+ ]
88
+ },
89
+ d.label
90
+ )) }) })
91
+ ] }) });
92
+ };
93
+ export {
94
+ DonutChart,
95
+ DonutChart as default
96
+ };
97
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../../src/components/charts/donutChart/DonutChart.tsx"],"sourcesContent":["import React, { useRef, useEffect } from \"react\";\nimport * as d3 from \"d3\";\nimport \"./donut-chart.scss\";\nimport Typography from \"../../typography/typography\";\nimport { useAuth } from \"../../../hooks/useAuth\";\n\ninterface DataPoint {\n label: string;\n value: number;\n\n}\n\ninterface DonutChartProps {\n data: DataPoint[];\n width?: number;\n height?: number;\n legend?: boolean;\n direction?: \"vertical\" | \"horizontal\";\n total?: string;\n donutThickerValue?: number\n CustomLegends?: React.FC<{ data: DataPoint[] }>;\n title: string\n}\n\nconst formatNumber = (num: number, defaultCurrencySymbol: string = ''): string => {\n if (num >= 1_000_000) {\n return `${defaultCurrencySymbol} ${(num / 1_000_000).toFixed(1)} M`;\n } else if (num >= 100_000) {\n return `${defaultCurrencySymbol} ${(num / 100_000).toFixed(1)} L`; // L for Lakhs\n } else if (num >= 1_000) {\n return `${(num / 1_000).toFixed(1)} K`;\n } else {\n return `${defaultCurrencySymbol} ${num.toFixed(2)}`;\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\nconst DonutChart: React.FC<DonutChartProps> = ({\n data,\n height = 140,\n width = 140,\n legend = true,\n direction = \"vertical\",\n total = \"300\",\n donutThickerValue,\n CustomLegends,\n title = ''\n}) => {\n const svgRef = useRef<SVGSVGElement>(null);\n const { user } = useAuth();\n const defaultCurrencySymbol = user?.currency_data?.symbol || '';\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 let innerRadius = Math.min(width, height) / 2 - margin * 2;\n if (donutThickerValue) {\n innerRadius = outerRadius - donutThickerValue;\n }\n\n\n\n\n const g = svg\n .append(\"g\")\n .attr(\"transform\", `translate(${width / 2}, ${height / 2})`);\n const pie = d3\n .pie()\n .value((d: DataPoint) => getSingleNumberFromString(d.value)).padAngle(0);\n\n const path = d3.arc().outerRadius(outerRadius).innerRadius(innerRadius)\n\n const pies = g\n .selectAll(\".arc\")\n .data(pie(data))\n .enter()\n .append(\"g\")\n .attr(\"class\", \"arc\");\n\n\n pies\n .append(\"path\")\n .attr(\"d\", path)\n .attr(\"fill\", (d: DataPoint) => d?.data?.color).attr(\"stroke\", \"none\");\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 g.append(\"text\")\n .attr(\"text-anchor\", \"middle\")\n .attr('maring-top', \"20px\")\n .attr(\"font-size\", \"13px\")\n .attr(\"font-weight\", \"600\")\n .attr(\"dy\", \"2em\")\n .attr(\"color\", \"#7B7C7F\")\n .html(title);\n\n }, [data, height, total, width, defaultCurrencySymbol, donutThickerValue, CustomLegends, title]);\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\n\n {CustomLegends ? (\n <CustomLegends data={data} /> // Render the custom component\n ) : (\n <div className='donut-legend'>\n <div className={`donut-chart-legend ${direction}`}>\n {data.map((d: DataPoint) => (\n <div\n className=\"legend\"\n key={d.label}\n style={{ borderLeft: `0.188rem solid ${d.color}` }}\n >\n <div className=\"legend-title\" style={{ color: `${d.labelColor}` }}>{d.label}</div>\n <div className=\"legend-value\">\n <Typography\n type=\"s5\"\n weight=\"medium\"\n color={d.valueColor}\n style={{\n whiteSpace: 'nowrap'\n }}\n >\n {formatNumber(d.value, defaultCurrencySymbol)}\n </Typography>\n </div>\n </div>\n ))\n }\n </div>\n </div>\n )}\n </div>\n </>\n );\n};\n\nexport { DonutChart };\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c,MAAY,IAE3B,oBAAC,SAAI,WAAU,gBACb,UAAA,oBAAC,OAAA,EAAI,WAAW,sBAAsB,SAAS,IAC5C,UAAA,KAAK,IAAI,CAAC,MACT;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QAEV,OAAO,EAAE,YAAY,kBAAkB,EAAE,KAAK,GAAA;AAAA,QAE9C,UAAA;AAAA,UAAA,oBAAC,OAAA,EAAI,WAAU,gBAAe,OAAO,EAAE,OAAO,GAAG,EAAE,UAAU,GAAA,GAAO,UAAA,EAAE,OAAM;AAAA,UAC5E,oBAAC,OAAA,EAAI,WAAU,gBACb,UAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,QAAO;AAAA,cACP,OAAO,EAAE;AAAA,cACT,OAAO;AAAA,gBACL,YAAY;AAAA,cAAA;AAAA,cAGb,UAAA,aAAa,EAAE,OAAO,qBAAqB;AAAA,YAAA;AAAA,UAAA,EAC9C,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,MAfK,EAAE;AAAA,IAAA,CAiBV,GAEH,EAAA,CACF;AAAA,EAAA,EAAA,CAEJ,EAAA,CACF;AAEJ;"}
@@ -0,0 +1,5 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react");;/* empty css */var r=,/* empty css */a=,/* empty css */l=,/* empty css */n=,/* empty css */s=;/* empty css */const d=(e,t="")=>e>=1e6?`${t} ${(e/1e6).toFixed(1)} M`:e>=1e5?`${t} ${(e/1e5).toFixed(1)} L`:e>=1e3?`${(e/1e3).toFixed(1)} K`:`${t} ${e.toFixed(2)}`,i=({data:i,height:o=140,width:u=140,legend:c=!0,direction:h="vertical",total:p="300",donutThickerValue:x,CustomLegends:m,title:v=""})=>{var g;const f=t.useRef(null),{user:j}=a.useAuth(),y=(null==(g=null==j?void 0:j.currency_data)?void 0:g.symbol)||"";return t.useEffect(()=>{if(!f.current)return;const e=l.default(f.current);e.selectAll("*").remove();const t=Math.min(u,o)/2-6;let r=Math.min(u,o)/2-12;x&&(r=t-x);const a=e.append("g").attr("transform",`translate(${u/2}, ${o/2})`),d=n.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)).padAngle(0),c=s.default().outerRadius(t).innerRadius(r);a.selectAll(".arc").data(d(i)).enter().append("g").attr("class","arc").append("path").attr("d",c).attr("fill",e=>{var t;return null==(t=null==e?void 0:e.data)?void 0:t.color}).attr("stroke","none"),a.append("text").attr("text-anchor","middle").attr("font-size","18px").attr("font-weight","600").attr("alignment-baseline","central").html(p),a.append("text").attr("text-anchor","middle").attr("maring-top","20px").attr("font-size","13px").attr("font-weight","600").attr("dy","2em").attr("color","#7B7C7F").html(v)},[i,o,p,u,y,x,m,v]),c?/* @__PURE__ */e.jsx(e.Fragment,{children:/* @__PURE__ */e.jsxs("div",{className:`donut-chart-container ${h}`,children:[
2
+ /* @__PURE__ */e.jsx("div",{children:/* @__PURE__ */e.jsx("svg",{ref:f,width:u,height:o})}),m?/* @__PURE__ */e.jsx(m,{data:i}):/* @__PURE__ */e.jsx("div",{className:"donut-legend",children:/* @__PURE__ */e.jsx("div",{className:`donut-chart-legend ${h}`,children:i.map(t=>/* @__PURE__ */e.jsxs("div",{className:"legend",style:{borderLeft:`0.188rem solid ${t.color}`},children:[
3
+ /* @__PURE__ */e.jsx("div",{className:"legend-title",style:{color:`${t.labelColor}`},children:t.label}),
4
+ /* @__PURE__ */e.jsx("div",{className:"legend-value",children:/* @__PURE__ */e.jsx(r.Typography,{type:"s5",weight:"medium",color:t.valueColor,style:{whiteSpace:"nowrap"},children:d(t.value,y)})})]},t.label))})})]})}):/* @__PURE__ */e.jsx("svg",{ref:f,width:u,height:o})};exports.DonutChart=i,exports.default=i;
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/charts/donutChart/DonutChart.tsx"],"sourcesContent":["import React, { useRef, useEffect } from \"react\";\nimport * as d3 from \"d3\";\nimport \"./donut-chart.scss\";\nimport Typography from \"../../typography/typography\";\nimport { useAuth } from \"../../../hooks/useAuth\";\n\ninterface DataPoint {\n label: string;\n value: number;\n\n}\n\ninterface DonutChartProps {\n data: DataPoint[];\n width?: number;\n height?: number;\n legend?: boolean;\n direction?: \"vertical\" | \"horizontal\";\n total?: string;\n donutThickerValue?: number\n CustomLegends?: React.FC<{ data: DataPoint[] }>;\n title: string\n}\n\nconst formatNumber = (num: number, defaultCurrencySymbol: string = ''): string => {\n if (num >= 1_000_000) {\n return `${defaultCurrencySymbol} ${(num / 1_000_000).toFixed(1)} M`;\n } else if (num >= 100_000) {\n return `${defaultCurrencySymbol} ${(num / 100_000).toFixed(1)} L`; // L for Lakhs\n } else if (num >= 1_000) {\n return `${(num / 1_000).toFixed(1)} K`;\n } else {\n return `${defaultCurrencySymbol} ${num.toFixed(2)}`;\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\nconst DonutChart: React.FC<DonutChartProps> = ({\n data,\n height = 140,\n width = 140,\n legend = true,\n direction = \"vertical\",\n total = \"300\",\n donutThickerValue,\n CustomLegends,\n title = ''\n}) => {\n const svgRef = useRef<SVGSVGElement>(null);\n const { user } = useAuth();\n const defaultCurrencySymbol = user?.currency_data?.symbol || '';\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 let innerRadius = Math.min(width, height) / 2 - margin * 2;\n if (donutThickerValue) {\n innerRadius = outerRadius - donutThickerValue;\n }\n\n\n\n\n const g = svg\n .append(\"g\")\n .attr(\"transform\", `translate(${width / 2}, ${height / 2})`);\n const pie = d3\n .pie()\n .value((d: DataPoint) => getSingleNumberFromString(d.value)).padAngle(0);\n\n const path = d3.arc().outerRadius(outerRadius).innerRadius(innerRadius)\n\n const pies = g\n .selectAll(\".arc\")\n .data(pie(data))\n .enter()\n .append(\"g\")\n .attr(\"class\", \"arc\");\n\n\n pies\n .append(\"path\")\n .attr(\"d\", path)\n .attr(\"fill\", (d: DataPoint) => d?.data?.color).attr(\"stroke\", \"none\");\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 g.append(\"text\")\n .attr(\"text-anchor\", \"middle\")\n .attr('maring-top', \"20px\")\n .attr(\"font-size\", \"13px\")\n .attr(\"font-weight\", \"600\")\n .attr(\"dy\", \"2em\")\n .attr(\"color\", \"#7B7C7F\")\n .html(title);\n\n }, [data, height, total, width, defaultCurrencySymbol, donutThickerValue, CustomLegends, title]);\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\n\n {CustomLegends ? (\n <CustomLegends data={data} /> // Render the custom component\n ) : (\n <div className='donut-legend'>\n <div className={`donut-chart-legend ${direction}`}>\n {data.map((d: DataPoint) => (\n <div\n className=\"legend\"\n key={d.label}\n style={{ borderLeft: `0.188rem solid ${d.color}` }}\n >\n <div className=\"legend-title\" style={{ color: `${d.labelColor}` }}>{d.label}</div>\n <div className=\"legend-value\">\n <Typography\n type=\"s5\"\n weight=\"medium\"\n color={d.valueColor}\n style={{\n whiteSpace: 'nowrap'\n }}\n >\n {formatNumber(d.value, defaultCurrencySymbol)}\n </Typography>\n </div>\n </div>\n ))\n }\n </div>\n </div>\n )}\n </div>\n </>\n );\n};\n\nexport { DonutChart };\nexport default DonutChart;\n"],"names":["formatNumber","num","defaultCurrencySymbol","toFixed","DonutChart","data","height","width","legend","direction","total","donutThickerValue","CustomLegends","title","svgRef","useRef","user","useAuth","_a","currency_data","symbol","useEffect","current","svg","d3.select","selectAll","remove","outerRadius","Math","min","innerRadius","margin","g","append","attr","pie","d3.pie","value","d","str","match","Number","getSingleNumberFromString","padAngle","path","d3.arc","enter","color","html","children","jsxs","className","jsx","ref","map","style","borderLeft","labelColor","label","Typography","type","weight","valueColor","whiteSpace"],"mappings":"kdAwBA,MAAMA,EAAe,CAACC,EAAaC,EAAgC,KAC7DD,GAAO,IACF,GAAGC,MAA0BD,EAAM,KAAWE,QAAQ,OACpDF,GAAO,IACT,GAAGC,MAA0BD,EAAM,KAASE,QAAQ,OAClDF,GAAO,IACT,IAAIA,EAAM,KAAOE,QAAQ,OAEzB,GAAGD,KAAyBD,EAAIE,QAAQ,KAW7CC,EAAwC,EAC5CC,OACAC,SAAS,IACTC,QAAQ,IACRC,UAAS,EACTC,YAAY,WACZC,QAAQ,MACRC,oBACAC,gBACAC,QAAQ,aAER,MAAMC,EAASC,EAAAA,OAAsB,OAC/BC,KAAEA,GAASC,YACXf,GAAwB,OAAAgB,EAAA,MAAAF,OAAA,EAAAA,EAAMG,oBAAN,EAAAD,EAAqBE,SAAU,GAyD7D,OAxDAC,EAAAA,UAAU,KACR,IAAKP,EAAOQ,QAAS,OAErB,MAAMC,EAAMC,EAAAA,QAAUV,EAAOQ,SAE7BC,EAAIE,UAAU,KAAKC,SAEnB,MAEMC,EAAcC,KAAKC,IAAItB,EAAOD,GAAU,EAF/B,EAGf,IAAIwB,EAAcF,KAAKC,IAAItB,EAAOD,GAAU,EAAIyB,GAC5CpB,IACFmB,EAAcH,EAAchB,GAM9B,MAAMqB,EAAIT,EACPU,OAAO,KACPC,KAAK,YAAa,aAAa3B,EAAQ,MAAMD,EAAS,MACnD6B,EAAMC,EAAAA,UAETC,MAAOC,GA7CoB,CAACC,IACjC,GAAmB,iBAARA,EACT,OAAOA,EAET,MAAMC,GAAQ,MAAAD,OAAA,EAAAA,EAAKC,MAAM,UAAW,KACpC,OAAOA,EAAQC,OAA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G,EAAAA,IAACO,EAAAA,WAAA,CACCC,KAAK,KACLC,OAAO,SACPd,MAAOT,EAAEwB,WACTP,MAAO,CACLQ,WAAY,UAGbd,SAAAjD,EAAasC,EAAED,MAAOnC,SAbtBoC,EAAEoB,gCAnBdN,EAAAA,IAAC,MAAA,CAAIC,IAAKvC,EAAQP,QAAcD"}
@@ -2,8 +2,19 @@ export { default as AreaLineChart } from './areaLinerChart';
2
2
  export * from './areaLinerChart';
3
3
  export { default as ChartLegends } from './ChartLegends';
4
4
  export * from './ChartLegends';
5
+ export { default as BarChart } from './bar-chart/bar-chart';
5
6
  export * from './bar-chart';
7
+ export { default as AdvancedBarChart } from './barChart/barChart';
8
+ export * from './barChart';
9
+ export { default as BarLineChart } from './barLineChart/barLinechart';
6
10
  export * from './barLineChart';
11
+ export { default as DonutChart } from './donut-chart/donut-chart';
7
12
  export * from './donut-chart';
13
+ export { default as AdvancedDonutChart } from './donutChart/DonutChart';
14
+ export * from './donutChart';
15
+ export { default as GroupedBarChart } from './groupBarChart/GroupBarChart';
8
16
  export * from './groupBarChart';
17
+ export { default as LineChart } from './line-chart/line-chart';
18
+ export * from './line-chart';
19
+ export { default as MultiLineChart } from './multiLineChart/multi-line-chart';
9
20
  export * from './multiLineChart';
@@ -0,0 +1,55 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useRef, useState, useEffect } from "react";
3
+ import linear from "../../../../node_modules/d3-scale/src/linear/index.esm.js";
4
+ import max from "../../../../node_modules/d3-array/src/max/index.esm.js";
5
+ import select from "../../../../node_modules/d3-selection/src/select/index.esm.js";
6
+ import line from "../../../../node_modules/d3-shape/src/line/index.esm.js";
7
+ import area from "../../../../node_modules/d3-shape/src/area/index.esm.js";
8
+ const AreaLineChartTwo = ({
9
+ data,
10
+ width = "100%",
11
+ // Default to responsive width
12
+ height = 200,
13
+ // Set a default numeric height
14
+ lineColor = "#ADE7CB",
15
+ lineFillColor = "#EBF9F2",
16
+ ...rest
17
+ }) => {
18
+ const svgRef = useRef(null);
19
+ const containerRef = useRef(null);
20
+ const [containerWidth, setContainerWidth] = useState(0);
21
+ useEffect(() => {
22
+ const resizeObserver = new ResizeObserver(() => {
23
+ if (containerRef.current) {
24
+ setContainerWidth(containerRef.current.clientWidth);
25
+ }
26
+ });
27
+ if (containerRef.current) {
28
+ resizeObserver.observe(containerRef.current);
29
+ setContainerWidth(containerRef.current.clientWidth);
30
+ }
31
+ return () => resizeObserver.disconnect();
32
+ }, []);
33
+ useEffect(() => {
34
+ if (containerWidth === 0) return;
35
+ const svg = select(svgRef.current);
36
+ svg.selectAll("*").remove();
37
+ const margin = { top: 5, left: 0, right: 0 };
38
+ const chartWidth = containerWidth - margin.left - margin.right;
39
+ const chartHeight = height;
40
+ const x = linear().domain([0, data.length - 1]).range([0, chartWidth]);
41
+ const y = linear().domain([0, max(data, (d) => d.value) || 1]).range([chartHeight, 0]);
42
+ const line$1 = line().x((_, i) => x(i)).y((d) => y(d.value));
43
+ const area$1 = area().x((_, i) => x(i)).y0(chartHeight).y1((d) => y(d.value));
44
+ const chart = svg.append("g").attr("transform", `translate(${margin.left},${margin.top})`);
45
+ chart.append("path").datum(data).attr("class", "line").attr("d", line$1).style("fill", "none").style("stroke", lineColor).style("stroke-width", 5);
46
+ chart.append("path").datum(data).attr("class", "area").attr("d", area$1).style("fill", lineFillColor);
47
+ chart.selectAll(".domain").remove();
48
+ chart.selectAll(".tick line").remove();
49
+ }, [data, height, lineColor, lineFillColor, containerWidth]);
50
+ return /* @__PURE__ */ jsx("div", { ref: containerRef, style: { width, height }, children: /* @__PURE__ */ jsx("svg", { ref: svgRef, width: "100%", height: "100%", ...rest }) });
51
+ };
52
+ export {
53
+ AreaLineChartTwo as default
54
+ };
55
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../../src/components/charts/line-chart/area-lineChart.tsx"],"sourcesContent":["import React, { useRef, useEffect, useState } from \"react\";\nimport * as d3 from \"d3\";\n\ninterface DataPoint {\n label: string;\n value: number;\n}\n\ninterface LineChartProps {\n data: DataPoint[];\n width?: number | string; // Accept string for percentage width\n height?: number | string;\n lineColor?: string;\n lineFillColor?: string;\n}\n\nconst AreaLineChartTwo: React.FC<LineChartProps> = ({\n data,\n width = \"100%\", // Default to responsive width\n height = 200, // Set a default numeric height\n lineColor = \"#ADE7CB\",\n lineFillColor = \"#EBF9F2\",\n ...rest\n}) => {\n const svgRef = useRef<SVGSVGElement>(null);\n const containerRef = useRef<HTMLDivElement>(null); // Reference to the container\n const [containerWidth, setContainerWidth] = useState(0);\n\n useEffect(() => {\n // Set up ResizeObserver to track container width\n const resizeObserver = new ResizeObserver(() => {\n if (containerRef.current) {\n setContainerWidth(containerRef.current.clientWidth);\n }\n });\n\n if (containerRef.current) {\n resizeObserver.observe(containerRef.current);\n setContainerWidth(containerRef.current.clientWidth);\n }\n\n return () => resizeObserver.disconnect();\n }, []);\n\n useEffect(() => {\n if (containerWidth === 0) return; // Skip rendering until we have a valid width\n\n const svg = d3.select(svgRef.current);\n svg.selectAll(\"*\").remove(); // Clear previous content\n\n const margin = { top: 5, left: 0, right: 0, bottom: 5 };\n const chartWidth = containerWidth - margin.left - margin.right; // Use container width\n const chartHeight = height as number;\n\n const x = d3\n .scaleLinear()\n .domain([0, data.length - 1])\n .range([0, chartWidth]);\n\n const y = d3\n .scaleLinear()\n .domain([0, d3.max(data, (d: DataPoint) => d.value) || 1]) // Fallback for empty data\n .range([chartHeight, 0]);\n\n const line = d3\n .line<DataPoint>()\n .x((_, i) => x(i))\n .y((d) => y(d.value));\n\n const area = d3\n .area<DataPoint>()\n .x((_, i) => x(i))\n .y0(chartHeight)\n .y1((d) => y(d.value));\n\n const chart = svg\n .append(\"g\")\n .attr(\"transform\", `translate(${margin.left},${margin.top})`);\n\n chart\n .append(\"path\")\n .datum(data)\n .attr(\"class\", \"line\")\n .attr(\"d\", line)\n .style(\"fill\", \"none\")\n .style(\"stroke\", lineColor)\n .style(\"stroke-width\", 5);\n\n chart\n .append(\"path\")\n .datum(data)\n .attr(\"class\", \"area\")\n .attr(\"d\", area)\n .style(\"fill\", lineFillColor);\n\n chart.selectAll(\".domain\").remove();\n chart.selectAll(\".tick line\").remove();\n }, [data, height, lineColor, lineFillColor, containerWidth]);\n\n return (\n <div ref={containerRef} style={{ width: width, height: height }}>\n <svg ref={svgRef} width=\"100%\" height=\"100%\" {...rest}></svg>\n </div>\n );\n};\n\nexport default AreaLineChartTwo;\n"],"names":["d3.select","d3.scaleLinear","d3.max","line","d3.line","area","d3.area"],"mappings":";;;;;;;AAgBA,MAAM,mBAA6C,CAAC;AAAA,EAClD;AAAA,EACA,QAAQ;AAAA;AAAA,EACR,SAAS;AAAA;AAAA,EACT,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,GAAG;AACL,MAAM;AACJ,QAAM,SAAS,OAAsB,IAAI;AACzC,QAAM,eAAe,OAAuB,IAAI;AAChD,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAAS,CAAC;AAEtD,YAAU,MAAM;AAEd,UAAM,iBAAiB,IAAI,eAAe,MAAM;AAC9C,UAAI,aAAa,SAAS;AACxB,0BAAkB,aAAa,QAAQ,WAAW;AAAA,MACpD;AAAA,IACF,CAAC;AAED,QAAI,aAAa,SAAS;AACxB,qBAAe,QAAQ,aAAa,OAAO;AAC3C,wBAAkB,aAAa,QAAQ,WAAW;AAAA,IACpD;AAEA,WAAO,MAAM,eAAe,WAAA;AAAA,EAC9B,GAAG,CAAA,CAAE;AAEL,YAAU,MAAM;AACd,QAAI,mBAAmB,EAAG;AAE1B,UAAM,MAAMA,OAAU,OAAO,OAAO;AACpC,QAAI,UAAU,GAAG,EAAE,OAAA;AAEnB,UAAM,SAAS,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,EAAa;AACtD,UAAM,aAAa,iBAAiB,OAAO,OAAO,OAAO;AACzD,UAAM,cAAc;AAEpB,UAAM,IAAIC,OACP,EACA,OAAO,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,EAC3B,MAAM,CAAC,GAAG,UAAU,CAAC;AAExB,UAAM,IAAIA,SAEP,OAAO,CAAC,GAAGC,IAAO,MAAM,CAAC,MAAiB,EAAE,KAAK,KAAK,CAAC,CAAC,EACxD,MAAM,CAAC,aAAa,CAAC,CAAC;AAEzB,UAAMC,SAAOC,KACV,EACA,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,CAAC,EAChB,EAAE,CAAC,MAAM,EAAE,EAAE,KAAK,CAAC;AAEtB,UAAMC,SAAOC,OAEV,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,CAAC,EAChB,GAAG,WAAW,EACd,GAAG,CAAC,MAAM,EAAE,EAAE,KAAK,CAAC;AAEvB,UAAM,QAAQ,IACX,OAAO,GAAG,EACV,KAAK,aAAa,aAAa,OAAO,IAAI,IAAI,OAAO,GAAG,GAAG;AAE9D,UACG,OAAO,MAAM,EACb,MAAM,IAAI,EACV,KAAK,SAAS,MAAM,EACpB,KAAK,KAAKH,MAAI,EACd,MAAM,QAAQ,MAAM,EACpB,MAAM,UAAU,SAAS,EACzB,MAAM,gBAAgB,CAAC;AAE1B,UACG,OAAO,MAAM,EACb,MAAM,IAAI,EACV,KAAK,SAAS,MAAM,EACpB,KAAK,KAAKE,MAAI,EACd,MAAM,QAAQ,aAAa;AAE9B,UAAM,UAAU,SAAS,EAAE,OAAA;AAC3B,UAAM,UAAU,YAAY,EAAE,OAAA;AAAA,EAChC,GAAG,CAAC,MAAM,QAAQ,WAAW,eAAe,cAAc,CAAC;AAE3D,6BACG,OAAA,EAAI,KAAK,cAAc,OAAO,EAAE,OAAc,OAAA,GAC7C,8BAAC,OAAA,EAAI,KAAK,QAAQ,OAAM,QAAO,QAAO,QAAQ,GAAG,MAAM,GACzD;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/linear/index.js"),l=require("../../../../node_modules/d3-array/src/max/index.js"),s=require("../../../../node_modules/d3-selection/src/select/index.js"),n=require("../../../../node_modules/d3-shape/src/line/index.js"),a=require("../../../../node_modules/d3-shape/src/area/index.js");exports.default=({data:d,width:i="100%",height:u=200,lineColor:c="#ADE7CB",lineFillColor:o="#EBF9F2",...f})=>{const h=t.useRef(null),m=t.useRef(null),[p,x]=t.useState(0);return t.useEffect(()=>{const e=new ResizeObserver(()=>{m.current&&x(m.current.clientWidth)});return m.current&&(e.observe(m.current),x(m.current.clientWidth)),()=>e.disconnect()},[]),t.useEffect(()=>{if(0===p)return;const e=s.default(h.current);e.selectAll("*").remove();const t=p-0-0,i=u,f=r.default().domain([0,d.length-1]).range([0,t]),m=r.default().domain([0,l.default(d,e=>e.value)||1]).range([i,0]),x=n.default().x((e,t)=>f(t)).y(e=>m(e.value)),v=a.default().x((e,t)=>f(t)).y0(i).y1(e=>m(e.value)),y=e.append("g").attr("transform","translate(0,5)");y.append("path").datum(d).attr("class","line").attr("d",x).style("fill","none").style("stroke",c).style("stroke-width",5),y.append("path").datum(d).attr("class","area").attr("d",v).style("fill",o),y.selectAll(".domain").remove(),y.selectAll(".tick line").remove()},[d,u,c,o,p]),/* @__PURE__ */e.jsx("div",{ref:m,style:{width:i,height:u},children:/* @__PURE__ */e.jsx("svg",{ref:h,width:"100%",height:"100%",...f})})};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/charts/line-chart/area-lineChart.tsx"],"sourcesContent":["import React, { useRef, useEffect, useState } from \"react\";\nimport * as d3 from \"d3\";\n\ninterface DataPoint {\n label: string;\n value: number;\n}\n\ninterface LineChartProps {\n data: DataPoint[];\n width?: number | string; // Accept string for percentage width\n height?: number | string;\n lineColor?: string;\n lineFillColor?: string;\n}\n\nconst AreaLineChartTwo: React.FC<LineChartProps> = ({\n data,\n width = \"100%\", // Default to responsive width\n height = 200, // Set a default numeric height\n lineColor = \"#ADE7CB\",\n lineFillColor = \"#EBF9F2\",\n ...rest\n}) => {\n const svgRef = useRef<SVGSVGElement>(null);\n const containerRef = useRef<HTMLDivElement>(null); // Reference to the container\n const [containerWidth, setContainerWidth] = useState(0);\n\n useEffect(() => {\n // Set up ResizeObserver to track container width\n const resizeObserver = new ResizeObserver(() => {\n if (containerRef.current) {\n setContainerWidth(containerRef.current.clientWidth);\n }\n });\n\n if (containerRef.current) {\n resizeObserver.observe(containerRef.current);\n setContainerWidth(containerRef.current.clientWidth);\n }\n\n return () => resizeObserver.disconnect();\n }, []);\n\n useEffect(() => {\n if (containerWidth === 0) return; // Skip rendering until we have a valid width\n\n const svg = d3.select(svgRef.current);\n svg.selectAll(\"*\").remove(); // Clear previous content\n\n const margin = { top: 5, left: 0, right: 0, bottom: 5 };\n const chartWidth = containerWidth - margin.left - margin.right; // Use container width\n const chartHeight = height as number;\n\n const x = d3\n .scaleLinear()\n .domain([0, data.length - 1])\n .range([0, chartWidth]);\n\n const y = d3\n .scaleLinear()\n .domain([0, d3.max(data, (d: DataPoint) => d.value) || 1]) // Fallback for empty data\n .range([chartHeight, 0]);\n\n const line = d3\n .line<DataPoint>()\n .x((_, i) => x(i))\n .y((d) => y(d.value));\n\n const area = d3\n .area<DataPoint>()\n .x((_, i) => x(i))\n .y0(chartHeight)\n .y1((d) => y(d.value));\n\n const chart = svg\n .append(\"g\")\n .attr(\"transform\", `translate(${margin.left},${margin.top})`);\n\n chart\n .append(\"path\")\n .datum(data)\n .attr(\"class\", \"line\")\n .attr(\"d\", line)\n .style(\"fill\", \"none\")\n .style(\"stroke\", lineColor)\n .style(\"stroke-width\", 5);\n\n chart\n .append(\"path\")\n .datum(data)\n .attr(\"class\", \"area\")\n .attr(\"d\", area)\n .style(\"fill\", lineFillColor);\n\n chart.selectAll(\".domain\").remove();\n chart.selectAll(\".tick line\").remove();\n }, [data, height, lineColor, lineFillColor, containerWidth]);\n\n return (\n <div ref={containerRef} style={{ width: width, height: height }}>\n <svg ref={svgRef} width=\"100%\" height=\"100%\" {...rest}></svg>\n </div>\n );\n};\n\nexport default AreaLineChartTwo;\n"],"names":["data","width","height","lineColor","lineFillColor","rest","svgRef","useRef","containerRef","containerWidth","setContainerWidth","useState","useEffect","resizeObserver","ResizeObserver","current","clientWidth","observe","disconnect","svg","d3.select","selectAll","remove","chartWidth","chartHeight","x","d3.scaleLinear","domain","length","range","y","d3.max","d","value","line","d3.line","_","i","area","d3.area","y0","y1","chart","append","attr","datum","style","ref","children"],"mappings":"sdAgBmD,EACjDA,OACAC,QAAQ,OACRC,SAAS,IACTC,YAAY,UACZC,gBAAgB,aACbC,MAEH,MAAMC,EAASC,EAAAA,OAAsB,MAC/BC,EAAeD,EAAAA,OAAuB,OACrCE,EAAgBC,GAAqBC,EAAAA,SAAS,GAyErD,OAvEAC,EAAAA,UAAU,KAER,MAAMC,EAAiB,IAAIC,eAAe,KACpCN,EAAaO,SACfL,EAAkBF,EAAaO,QAAQC,eAS3C,OALIR,EAAaO,UACfF,EAAeI,QAAQT,EAAaO,SACpCL,EAAkBF,EAAaO,QAAQC,cAGlC,IAAMH,EAAeK,cAC3B,IAEHN,EAAAA,UAAU,KACR,GAAuB,IAAnBH,EAAsB,OAE1B,MAAMU,EAAMC,EAAAA,QAAUd,EAAOS,SAC7BI,EAAIE,UAAU,KAAKC,SAEnB,MACMC,EAAad,EADY,EAAU,EAEnCe,EAActB,EAEduB,EAAIC,EAAAA,UAEPC,OAAO,CAAC,EAAG3B,EAAK4B,OAAS,IACzBC,MAAM,CAAC,EAAGN,IAEPO,EAAIJ,EAAAA,UAEPC,OAAO,CAAC,EAAGI,EAAAA,QAAO/B,EAAOgC,GAAiBA,EAAEC,QAAU,IACtDJ,MAAM,CAACL,EAAa,IAEjBU,EAAOC,EAAAA,UAEVV,EAAE,CAACW,EAAGC,IAAMZ,EAAEY,IACdP,EAAGE,GAAMF,EAAEE,EAAEC,QAEVK,EAAOC,EAAAA,UAEVd,EAAE,CAACW,EAAGC,IAAMZ,EAAEY,IACdG,GAAGhB,GACHiB,GAAIT,GAAMF,EAAEE,EAAEC,QAEXS,EAAQvB,EACXwB,OAAO,KACPC,KAAK,YAAa,kBAErBF,EACGC,OAAO,QACPE,MAAM7C,GACN4C,KAAK,QAAS,QACdA,KAAK,IAAKV,GACVY,MAAM,OAAQ,QACdA,MAAM,SAAU3C,GAChB2C,MAAM,eAAgB,GAEzBJ,EACGC,OAAO,QACPE,MAAM7C,GACN4C,KAAK,QAAS,QACdA,KAAK,IAAKN,GACVQ,MAAM,OAAQ1C,GAEjBsC,EAAMrB,UAAU,WAAWC,SAC3BoB,EAAMrB,UAAU,cAAcC,UAC7B,CAACtB,EAAME,EAAQC,EAAWC,EAAeK,yBAGzC,MAAA,CAAIsC,IAAKvC,EAAcsC,MAAO,CAAE7C,QAAcC,UAC7C8C,8BAAC,MAAA,CAAID,IAAKzC,EAAQL,MAAM,OAAOC,OAAO,UAAWG"}
@@ -0,0 +1,108 @@
1
+ import { jsx } 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 max from "../../../../node_modules/d3-array/src/max/index.esm.js";
6
+ import select from "../../../../node_modules/d3-selection/src/select/index.esm.js";
7
+ import line from "../../../../node_modules/d3-shape/src/line/index.esm.js";
8
+ import { axisBottom, axisLeft } from "../../../../node_modules/d3-axis/src/axis/index.esm.js";
9
+ const formatNumber = (num) => {
10
+ if (num >= 1e9) return (num / 1e9).toFixed(1) + "B";
11
+ if (num >= 1e6) return (num / 1e6).toFixed(1) + "M";
12
+ if (num >= 1e3) return (num / 1e3).toFixed(1) + "K";
13
+ return num;
14
+ };
15
+ const LineChart = ({
16
+ data,
17
+ numOfLines = 5,
18
+ width = 500,
19
+ height = 300
20
+ }) => {
21
+ const svgRef = useRef(null);
22
+ const wrapperRef = useRef(null);
23
+ const maxValue = useMemo(() => {
24
+ return Math.max(...data.map((d) => d.value));
25
+ }, [data]);
26
+ const yAxisMaxValue = useMemo(() => {
27
+ return maxValue * 1.25;
28
+ }, [maxValue]);
29
+ const yAxisTicks = useMemo(() => {
30
+ const ticks = [];
31
+ const interval = yAxisMaxValue / numOfLines;
32
+ for (let i = 0; i <= numOfLines; i++) {
33
+ ticks.push(interval * i);
34
+ }
35
+ return ticks;
36
+ }, [yAxisMaxValue, numOfLines]);
37
+ const needsHorizontalScroll = data.length > 12;
38
+ const minGroupWidth = 120;
39
+ const calculatedChartWidth = needsHorizontalScroll ? Math.max(data.length * minGroupWidth, width) : width;
40
+ useEffect(() => {
41
+ const wrapper = wrapperRef.current;
42
+ const resizeObserver = new ResizeObserver((entries) => {
43
+ if (entries[0]) {
44
+ const newWidth = entries[0].contentRect.width;
45
+ setContainerWidth(newWidth);
46
+ }
47
+ });
48
+ if (wrapper) {
49
+ resizeObserver.observe(wrapper);
50
+ }
51
+ return () => {
52
+ if (wrapper) {
53
+ resizeObserver.unobserve(wrapper);
54
+ }
55
+ };
56
+ }, []);
57
+ useEffect(() => {
58
+ const svg = select(svgRef.current);
59
+ svg.selectAll("*").remove();
60
+ const margin = { top: 20, right: 20, bottom: 70, left: 40 };
61
+ const barWidth = calculatedChartWidth - margin.left - margin.right;
62
+ const barHeight = height - margin.top - margin.bottom;
63
+ const mousemove = (event, d) => {
64
+ const xPosition = event.offsetX + margin.left - 25;
65
+ const yPosition = event.offsetY + margin.top - 40;
66
+ const text = `${d.label} - ${d.value}`;
67
+ tooltip.attr("x", xPosition).attr("y", yPosition).style("opacity", 9).style("height", text.length >= 16 ? 50 : 35);
68
+ tooltipText.html(text);
69
+ };
70
+ const mouseleave = () => {
71
+ tooltip.style("opacity", 0);
72
+ };
73
+ const x = band().domain(data.map((d) => d.label)).range([0, barWidth]).padding(0.1);
74
+ const y = linear().domain([0, max(data, (d) => d.value)]).range([barHeight, 0]);
75
+ const chart = svg.append("g").attr("transform", `translate(${margin.left},${margin.top})`);
76
+ const line$1 = line().x((d) => x(d.label) + x.bandwidth() / 2).y((d) => y(d.value));
77
+ chart.append("path").datum(data).attr("class", "line").attr("d", line$1).style("fill", "none").style("stroke", "#357AF6").style("stroke-width", 2);
78
+ chart.selectAll(".point").data(data).enter().append("circle").attr("class", "point").attr("cx", (d) => x(d.label) + x.bandwidth() / 2).attr("cy", (d) => y(d.value)).attr("r", 4).style("fill", "#357AF6").on("mousemove", mousemove).on("mouseleave", mouseleave);
79
+ yAxisTicks.slice(1).forEach((tick) => {
80
+ chart.append("line").attr("class", "dotted-line").attr("x1", 0).attr("y1", y(tick)).attr("x2", width).attr("y2", y(tick)).style("stroke", "gray").style("stroke-dasharray", "3,3");
81
+ });
82
+ const xAxis = chart.append("g").attr("class", "x-axis").attr("transform", `translate(0, ${barHeight})`).call(axisBottom(x));
83
+ xAxis.selectAll(".tick line").remove();
84
+ const yAxis = chart.append("g").attr("class", "y-axis").call(
85
+ axisLeft(y).tickValues(yAxisTicks).tickFormat((d) => {
86
+ return formatNumber(d);
87
+ }).tickSizeOuter(0),
88
+ 0
89
+ );
90
+ yAxis.selectAll(".domain").remove();
91
+ yAxis.selectAll(".tick line").remove();
92
+ 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");
93
+ const tooltipText = tooltip.append("xhtml:div").style("font-size", "0.75rem").style("color", "black");
94
+ }, [data, height, width, yAxisMaxValue, yAxisTicks, calculatedChartWidth]);
95
+ return /* @__PURE__ */ jsx("div", { ref: wrapperRef, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsx(
96
+ "svg",
97
+ {
98
+ ref: svgRef,
99
+ width: calculatedChartWidth,
100
+ height,
101
+ viewBox: `0 0 ${calculatedChartWidth} ${height}`
102
+ }
103
+ ) });
104
+ };
105
+ export {
106
+ LineChart as default
107
+ };
108
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../../src/components/charts/line-chart/line-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 LineChartProps {\n data: DataPoint[];\n numOfLines?: number;\n width?: number;\n height?: number;\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 LineChart: React.FC<LineChartProps> = ({\n data,\n numOfLines = 5,\n width = 500,\n height = 300,\n}) => {\n const svgRef = useRef<SVGSVGElement>(null);\n const wrapperRef = useRef<HTMLDivElement>(null);\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 const needsHorizontalScroll = data.length > 12;\n const minGroupWidth = 120; \n const calculatedChartWidth = needsHorizontalScroll \n ? Math.max(data.length * minGroupWidth, width)\n : width;\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 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 = calculatedChartWidth - margin.left - margin.right;\n const barHeight = height - margin.top - margin.bottom;\n\n const mousemove = (event: any, d: any) => {\n\n const xPosition = event.offsetX + margin.left - 25;\n const yPosition = event.offsetY + margin.top - 40;\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: any) => d.label))\n .range([0, barWidth])\n .padding(0.1);\n\n const y = d3\n .scaleLinear()\n .domain([0, d3.max(data, (d: any) => d.value)])\n .range([barHeight, 0]);\n\n const chart = svg\n .append(\"g\")\n .attr(\"transform\", `translate(${margin.left},${margin.top})`);\n\n const line = d3\n .line<DataPoint>()\n //@ts-expect-error not applicable\n .x((d: any) => x(d.label) + x.bandwidth() / 2)\n .y((d: any) => y(d.value));\n\n chart\n .append(\"path\")\n .datum(data)\n .attr(\"class\", \"line\")\n .attr(\"d\", line)\n .style(\"fill\", \"none\")\n .style(\"stroke\", \"#357AF6\")\n .style(\"stroke-width\", 2);\n\n chart\n .selectAll(\".point\")\n .data(data)\n .enter()\n .append(\"circle\")\n .attr(\"class\", \"point\")\n //@ts-expect-error not applicable\n .attr(\"cx\", (d: any) => x(d.label) + x.bandwidth() / 2)\n .attr(\"cy\", (d: any) => y(d.value))\n .attr(\"r\", 4)\n .style(\"fill\", \"#357AF6\")\n .on(\"mousemove\", mousemove)\n .on(\"mouseleave\", mouseleave);\n\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\", width)\n .attr(\"y2\", y(tick))\n .style(\"stroke\", \"gray\")\n .style(\"stroke-dasharray\", \"3,3\");\n });\n\n const xAxis = chart\n .append(\"g\")\n .attr(\"class\", \"x-axis\")\n .attr(\"transform\", `translate(0, ${barHeight})`)\n .call(d3.axisBottom(x));\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),\n 0,\n );\n\n yAxis.selectAll(\".domain\").remove();\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, yAxisMaxValue, yAxisTicks, calculatedChartWidth]);\n\n return (\n <div ref={wrapperRef} style={{ width: '100%', height: '100%' }}>\n <svg \n ref={svgRef}\n width={calculatedChartWidth}\n height={height}\n viewBox={`0 0 ${calculatedChartWidth} ${height}`}\n />\n </div>\n );\n};\n\nexport default LineChart;\n"],"names":["d3.select","d3.scaleBand","d3.scaleLinear","d3.max","line","d3.line","d3.axisBottom","d3.axisLeft"],"mappings":";;;;;;;;AAeA,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,OA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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,eAAe,YAAY,oBAAoB,CAAC;AAEzE,SACE,oBAAC,OAAA,EAAI,KAAK,YAAY,OAAO,EAAE,OAAO,QAAQ,QAAQ,OAAA,GAClD,UAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,KAAK;AAAA,MACL,OAAO;AAAA,MACP;AAAA,MACA,SAAS,OAAO,oBAAoB,IAAI,MAAM;AAAA,IAAA;AAAA,EAAA,GAEtD;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"),s=require("../../../../node_modules/d3-scale/src/linear/index.js"),a=require("../../../../node_modules/d3-array/src/max/index.js"),l=require("../../../../node_modules/d3-selection/src/select/index.js"),n=require("../../../../node_modules/d3-shape/src/line/index.js"),o=require("../../../../node_modules/d3-axis/src/axis/index.js");exports.default=({data:i,numOfLines:d=5,width:c=500,height:u=300})=>{const m=t.useRef(null),h=t.useRef(null),p=t.useMemo(()=>Math.max(...i.map(e=>e.value)),[i]),y=t.useMemo(()=>1.25*p,[p]),x=t.useMemo(()=>{const e=[],t=y/d;for(let r=0;r<=d;r++)e.push(t*r);return e},[y,d]),f=i.length>12?Math.max(120*i.length,c):c;return t.useEffect(()=>{const e=h.current,t=new ResizeObserver(e=>{if(e[0]){const t=e[0].contentRect.width;setContainerWidth(t)}});return e&&t.observe(e),()=>{e&&t.unobserve(e)}},[]),t.useEffect(()=>{const e=l.default(m.current);e.selectAll("*").remove();const t=f-40-20,d=u-20-70,h=r.default().domain(i.map(e=>e.label)).range([0,t]).padding(.1),p=s.default().domain([0,a.default(i,e=>e.value)]).range([d,0]),y=e.append("g").attr("transform","translate(40,20)"),v=n.default().x(e=>h(e.label)+h.bandwidth()/2).y(e=>p(e.value));y.append("path").datum(i).attr("class","line").attr("d",v).style("fill","none").style("stroke","#357AF6").style("stroke-width",2),y.selectAll(".point").data(i).enter().append("circle").attr("class","point").attr("cx",e=>h(e.label)+h.bandwidth()/2).attr("cy",e=>p(e.value)).attr("r",4).style("fill","#357AF6").on("mousemove",(e,t)=>{const r=e.offsetX+40-25,s=e.offsetY+20-40,a=`${t.label} - ${t.value}`;b.attr("x",r).attr("y",s).style("opacity",9).style("height",a.length>=16?50:35),w.html(a)}).on("mouseleave",()=>{b.style("opacity",0)}),x.slice(1).forEach(e=>{y.append("line").attr("class","dotted-line").attr("x1",0).attr("y1",p(e)).attr("x2",c).attr("y2",p(e)).style("stroke","gray").style("stroke-dasharray","3,3")}),y.append("g").attr("class","x-axis").attr("transform",`translate(0, ${d})`).call(o.axisBottom(h)).selectAll(".tick line").remove();const g=y.append("g").attr("class","y-axis").call(o.axisLeft(p).tickValues(x).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),0);g.selectAll(".domain").remove(),g.selectAll(".tick line").remove();const b=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"),w=b.append("xhtml:div").style("font-size","0.75rem").style("color","black")},[i,u,c,y,x,f]),/* @__PURE__ */e.jsx("div",{ref:h,style:{width:"100%",height:"100%"},children:/* @__PURE__ */e.jsx("svg",{ref:m,width:f,height:u,viewBox:`0 0 ${f} ${u}`})})};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/charts/line-chart/line-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 LineChartProps {\n data: DataPoint[];\n numOfLines?: number;\n width?: number;\n height?: number;\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 LineChart: React.FC<LineChartProps> = ({\n data,\n numOfLines = 5,\n width = 500,\n height = 300,\n}) => {\n const svgRef = useRef<SVGSVGElement>(null);\n const wrapperRef = useRef<HTMLDivElement>(null);\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 const needsHorizontalScroll = data.length > 12;\n const minGroupWidth = 120; \n const calculatedChartWidth = needsHorizontalScroll \n ? Math.max(data.length * minGroupWidth, width)\n : width;\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 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 = calculatedChartWidth - margin.left - margin.right;\n const barHeight = height - margin.top - margin.bottom;\n\n const mousemove = (event: any, d: any) => {\n\n const xPosition = event.offsetX + margin.left - 25;\n const yPosition = event.offsetY + margin.top - 40;\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: any) => d.label))\n .range([0, barWidth])\n .padding(0.1);\n\n const y = d3\n .scaleLinear()\n .domain([0, d3.max(data, (d: any) => d.value)])\n .range([barHeight, 0]);\n\n const chart = svg\n .append(\"g\")\n .attr(\"transform\", `translate(${margin.left},${margin.top})`);\n\n const line = d3\n .line<DataPoint>()\n //@ts-expect-error not applicable\n .x((d: any) => x(d.label) + x.bandwidth() / 2)\n .y((d: any) => y(d.value));\n\n chart\n .append(\"path\")\n .datum(data)\n .attr(\"class\", \"line\")\n .attr(\"d\", line)\n .style(\"fill\", \"none\")\n .style(\"stroke\", \"#357AF6\")\n .style(\"stroke-width\", 2);\n\n chart\n .selectAll(\".point\")\n .data(data)\n .enter()\n .append(\"circle\")\n .attr(\"class\", \"point\")\n //@ts-expect-error not applicable\n .attr(\"cx\", (d: any) => x(d.label) + x.bandwidth() / 2)\n .attr(\"cy\", (d: any) => y(d.value))\n .attr(\"r\", 4)\n .style(\"fill\", \"#357AF6\")\n .on(\"mousemove\", mousemove)\n .on(\"mouseleave\", mouseleave);\n\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\", width)\n .attr(\"y2\", y(tick))\n .style(\"stroke\", \"gray\")\n .style(\"stroke-dasharray\", \"3,3\");\n });\n\n const xAxis = chart\n .append(\"g\")\n .attr(\"class\", \"x-axis\")\n .attr(\"transform\", `translate(0, ${barHeight})`)\n .call(d3.axisBottom(x));\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),\n 0,\n );\n\n yAxis.selectAll(\".domain\").remove();\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, yAxisMaxValue, yAxisTicks, calculatedChartWidth]);\n\n return (\n <div ref={wrapperRef} style={{ width: '100%', height: '100%' }}>\n <svg \n ref={svgRef}\n width={calculatedChartWidth}\n height={height}\n viewBox={`0 0 ${calculatedChartWidth} ${height}`}\n />\n </div>\n );\n};\n\nexport default LineChart;\n"],"names":["data","numOfLines","width","height","svgRef","useRef","wrapperRef","maxValue","useMemo","Math","max","map","d","value","yAxisMaxValue","yAxisTicks","ticks","interval","i","push","calculatedChartWidth","length","useEffect","wrapper","current","resizeObserver","ResizeObserver","entries","newWidth","contentRect","setContainerWidth","observe","unobserve","svg","d3.select","selectAll","remove","barWidth","barHeight","x","d3.scaleBand","domain","label","range","padding","y","d3.scaleLinear","d3.max","chart","append","attr","line","d3.line","bandwidth","datum","style","enter","on","event","xPosition","offsetX","yPosition","offsetY","text","tooltip","tooltipText","html","slice","forEach","tick","call","d3.axisBottom","yAxis","d3.axisLeft","tickValues","tickFormat","num","toFixed","tickSizeOuter","jsx","ref","children","viewBox"],"mappings":"shBAsB4C,EAC1CA,OACAC,aAAa,EACbC,QAAQ,IACRC,SAAS,QAET,MAAMC,EAASC,EAAAA,OAAsB,MAC/BC,EAAaD,EAAAA,OAAuB,MACpCE,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,IAIbmB,EAFwBpB,EAAKqB,OAAS,GAGtCZ,KAAKC,IAFW,IAEPV,EAAKqB,OAAwBnB,GACtCA,EAsJN,OArJEoB,EAAAA,UAAU,KACN,MAAMC,EAAUjB,EAAWkB,QAErBC,EAAiB,IAAIC,eAAgBC,IACvC,GAAIA,EAAQ,GAAI,CACZ,MAAMC,EAAWD,EAAQ,GAAGE,YAAY3B,MACxC4B,kBAAkBF,EACtB,IAOJ,OAJIL,GACAE,EAAeM,QAAQR,GAGpB,KACCA,GACAE,EAAeO,UAAUT,KAGlC,IACLD,EAAAA,UAAU,KACR,MAAMW,EAAMC,EAAAA,QAAU9B,EAAOoB,SAE7BS,EAAIE,UAAU,KAAKC,SAEnB,MACMC,EAAWjB,EADsC,GAAtB,GAE3BkB,EAAYnC,EAFI,GAAuB,GAsBvCoC,EAAIC,EAAAA,UAEPC,OAAOzC,EAAKW,IAAKC,GAAWA,EAAE8B,QAC9BC,MAAM,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XC,OAAO,KACPC,KAAK,QAAS,UACdA,KAAK,YAAa,gBAAgBZ,MAClCgC,KAAKC,EAAAA,WAAchC,IAEhBJ,UAAU,cAAcC,SAE9B,MAAMoC,EAAQxB,EACXC,OAAO,KACPC,KAAK,QAAS,UACdoB,KACCG,EAAAA,SACY5B,GACT6B,WAAW3D,GAEX4D,WAAY/D,IACX,OA7JUgE,EA6JUhE,IA5JnB,KAAagE,EAAM,KAAKC,QAAQ,GAAK,IAC5CD,GAAO,KAAaA,EAAM,KAAKC,QAAQ,GAAK,IAC5CD,GAAO,KAAaA,EAAM,KAAKC,QAAQ,GAAK,IACzCD,EAJY,IAACA,IA+JXE,cAAc,GACjB,GAGJN,EAAMrC,UAAU,WAAWC,SAC3BoC,EAAMrC,UAAU,cAAcC,SAE9B,MAAM4B,EAAU/B,EACbgB,OAAO,iBACPC,KAAK,QAAS,WACdA,KAAK,QAAS,KACdA,KAAK,SAAU,IACfK,MAAM,UAAW,GACjBA,MAAM,WAAY,YAClBA,MAAM,mBAAoB,SAC1BA,MAAM,SAAU,QAChBA,MAAM,aAAc,+CACpBA,MAAM,gBAAiB,YACvBA,MAAM,UAAW,YACjBA,MAAM,YAAa,WAEhBU,EAAcD,EACjBf,OAAO,aACPM,MAAM,YAAa,WACnBA,MAAM,QAAS,UACjB,CAACvD,EAAMG,EAAQD,EAAOY,EAAeC,EAAYK,mBAGlD2D,EAAAA,IAAC,MAAA,CAAIC,IAAK1E,EAAYiD,MAAO,CAAErD,MAAO,OAAQC,OAAQ,QAClD8E,wBAAAF,EAAAA,IAAC,MAAA,CACGC,IAAK5E,EACLF,MAAOkB,EACPjB,SACA+E,QAAS,OAAO9D,KAAwBjB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../../../../src/components/confirm-modal/confirm-modal.tsx"],"sourcesContent":["import {\n\tBox,\n\tCircularProgress,\n\tDialog,\n\tDialogActions,\n\tDialogContent,\n\tDialogProps,\n\tDialogTitle,\n\tDivider,\n\tIconButton\n} from '@mui/material';\nimport CloseIcon from '@mui/icons-material/Close';\nimport Typography from '../typography/typography';\nimport Button from '../button/button';\nimport './confirm-modal.scss';\nimport images from '../../assets/images';\nimport { useLanguage } from '../../hooks/useLangauge';\nimport { useTranslation } from 'react-i18next';\n\ninterface ConfirmPopUpProps extends DialogProps {\n\ttitle: string;\n\tdescription: string | JSX.Element;\n\tonClose: () => void;\n\tonConfirm: () => void;\n\tbuttonTexts?: {\n\t\tconfirm: string;\n\t\tcancel: string;\n\t};\n\tbuttonColors?: {\n\t\tconfirm: string;\n\t\tcancel?: string;\n\t};\n\tmodalType?: 'alert' | 'info';\n\tloading?: boolean;\n\tshowAction?: boolean;\n}\n\nconst ConfirmPopUp = (props: ConfirmPopUpProps) => {\n\tconst { t } = useTranslation();\n\tconst {\n\t\topen,\n\t\ttitle,\n\t\tdescription,\n\t\tonClose,\n\t\tonConfirm,\n\t\tmodalType = 'alert',\n\t\tbuttonTexts = { confirm: t('common.delete'), cancel: t('common.cancel') },\n\t\tbuttonColors = { confirm: 'error' },\n\t\tloading = false,\n\t\tshowAction=true,\n\t\t...rest\n\t} = props;\n\n\tconst icon = modalType === 'info' ? images.info : images.alert;\n const {isRtl}=useLanguage();\n\treturn (\n\t\t<>\n\t\t\t<Dialog open={open} onClose={onClose} className='confirm' {...rest}>\n\t\t\t\t<DialogTitle className='confirm--head'>\n\t\t\t\t\t<Box className='confirm--title'>\n\t\t\t\t\t\t<img src={icon} alt='alert icon' />{' '}\n\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\ttype='s3'\n\t\t\t\t\t\t\tml={1}\n\t\t\t\t\t\t\tweight='medium'\n\t\t\t\t\t\t\tcolor='theme.secondary.1000'>\n\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t</Typography>\n\t\t\t\t\t</Box>\n\t\t\t\t\t<IconButton disableRipple onClick={onClose} disabled={loading}>\n\t\t\t\t\t\t<CloseIcon />\n\t\t\t\t\t</IconButton>\n\t\t\t\t</DialogTitle>\n\t\t\t\t<Divider />\n\t\t\t\t<DialogContent className='confirm--content'>\n\t\t\t\t\t<Typography type='s3' color='theme.secondary.1000'>\n\t\t\t\t\t\t{description}\n\t\t\t\t\t</Typography>\n\t\t\t\t</DialogContent>\n\t\t\t\t<Divider />\n\t\t\t\t{showAction &&<DialogActions\n\t\t\t\t\tclassName='confirm--actions'\n\t\t\t\t\tsx={{ backgroundColor: 'theme.secondary.200' }}>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant='text'\n\t\t\t\t\t\tonClick={onClose}\n\t\t\t\t\t\tcolor={buttonColors?.cancel}\n\t\t\t\t\t\tdisabled={loading}>\n\t\t\t\t\t\t{buttonTexts.cancel}\n\t\t\t\t\t</Button>\n\t\t\t\t{buttonTexts.confirm &&<Button\n\t\t\t\t\t\tcolor={buttonColors.confirm}\n\t\t\t\t\t\tonClick={onConfirm}\n\t\t\t\t\t\tsx={isRtl?{mr: 1}:{}}\n\t\t\t\t\t\tendIcon={loading && <CircularProgress size={18} color='inherit' />}\n\t\t\t\t\t\tdisabled={loading}>\n\t\t\t\t\t\t{buttonTexts.confirm}\n\t\t\t\t\t</Button>}\n\t\t\t\t</DialogActions>}\n\t\t\t</Dialog>\n\t\t</>\n\t);\n};\n\nexport { ConfirmPopUp };\nexport default ConfirmPopUp;\n"],"names":["CloseIcon"],"mappings":";;;;;;;;;;;;;;;;AAqCA,MAAM,eAAe,CAAC,UAA6B;AAClD,QAAM,EAAE,EAAA,IAAM,eAAA;AACd,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ,cAAc,EAAE,SAAS,EAAE,eAAe,GAAG,QAAQ,EAAE,eAAe,EAAA;AAAA,IACtE,eAAe,EAAE,SAAS,QAAA;AAAA,IAC1B,UAAU;AAAA,IACV,aAAW;AAAA,IACX,GAAG;AAAA,EAAA,IACA;AAEJ,QAAM,OAAO,cAAc,SAAS,OAAO,OAAO,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WAAU;AAAA,cAChE,UAAU;AAAA,cACT,UAAA,YAAY;AAAA,YAAA;AAAA,UAAA;AAAA,QACd;AAAA,MAAA;AAAA,IAAA;AAAA,EACD,EAAA,CACD,EAAA,CACD;AAEF;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../src/components/confirm-modal/confirm-modal.tsx"],"sourcesContent":["import {\n\tBox,\n\tCircularProgress,\n\tDialog,\n\tDialogActions,\n\tDialogContent,\n\tDialogProps,\n\tDialogTitle,\n\tDivider,\n\tIconButton\n} from '@mui/material';\nimport CloseIcon from '@mui/icons-material/Close';\nimport Typography from '../typography/typography';\nimport Button from '../button/button';\nimport './confirm-modal.scss';\nimport images from '../../assets/images';\nimport { useLanguage } from '../../hooks/useLangauge';\nimport { useTranslation } from 'react-i18next';\n\ninterface ConfirmPopUpProps extends DialogProps {\n\ttitle: string;\n\tdescription: string | JSX.Element;\n\tonClose: () => void;\n\tonConfirm: () => void;\n\tbuttonTexts?: {\n\t\tconfirm: string;\n\t\tcancel: string;\n\t};\n\tbuttonColors?: {\n\t\tconfirm: string;\n\t\tcancel?: string;\n\t};\n\tmodalType?: 'alert' | 'info';\n\tloading?: boolean;\n\tshowAction?: boolean;\n}\n\nexport const ConfirmPopUp = (props: ConfirmPopUpProps) => {\n\tconst { t } = useTranslation();\n\tconst {\n\t\topen,\n\t\ttitle,\n\t\tdescription,\n\t\tonClose,\n\t\tonConfirm,\n\t\tmodalType = 'alert',\n\t\tbuttonTexts = { confirm: t('common.delete'), cancel: t('common.cancel') },\n\t\tbuttonColors = { confirm: 'error' },\n\t\tloading = false,\n\t\tshowAction=true,\n\t\t...rest\n\t} = props;\n\n\tconst icon = modalType === 'info' ? images.info : images.alert;\n const {isRtl}=useLanguage();\n\treturn (\n\t\t<>\n\t\t\t<Dialog open={open} onClose={onClose} className='confirm' {...rest}>\n\t\t\t\t<DialogTitle className='confirm--head'>\n\t\t\t\t\t<Box className='confirm--title'>\n\t\t\t\t\t\t<img src={icon} alt='alert icon' />{' '}\n\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\ttype='s3'\n\t\t\t\t\t\t\tml={1}\n\t\t\t\t\t\t\tweight='medium'\n\t\t\t\t\t\t\tcolor='theme.secondary.1000'>\n\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t</Typography>\n\t\t\t\t\t</Box>\n\t\t\t\t\t<IconButton disableRipple onClick={onClose} disabled={loading}>\n\t\t\t\t\t\t<CloseIcon />\n\t\t\t\t\t</IconButton>\n\t\t\t\t</DialogTitle>\n\t\t\t\t<Divider />\n\t\t\t\t<DialogContent className='confirm--content'>\n\t\t\t\t\t<Typography type='s3' color='theme.secondary.1000'>\n\t\t\t\t\t\t{description}\n\t\t\t\t\t</Typography>\n\t\t\t\t</DialogContent>\n\t\t\t\t<Divider />\n\t\t\t\t{showAction &&<DialogActions\n\t\t\t\t\tclassName='confirm--actions'\n\t\t\t\t\tsx={{ backgroundColor: 'theme.secondary.200' }}>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant='text'\n\t\t\t\t\t\tonClick={onClose}\n\t\t\t\t\t\tcolor={buttonColors?.cancel}\n\t\t\t\t\t\tdisabled={loading}>\n\t\t\t\t\t\t{buttonTexts.cancel}\n\t\t\t\t\t</Button>\n\t\t\t\t{buttonTexts.confirm &&<Button\n\t\t\t\t\t\tcolor={buttonColors.confirm}\n\t\t\t\t\t\tonClick={onConfirm}\n\t\t\t\t\t\tsx={isRtl?{mr: 1}:{}}\n\t\t\t\t\t\tendIcon={loading && <CircularProgress size={18} color='inherit' />}\n\t\t\t\t\t\tdisabled={loading}>\n\t\t\t\t\t\t{buttonTexts.confirm}\n\t\t\t\t\t</Button>}\n\t\t\t\t</DialogActions>}\n\t\t\t</Dialog>\n\t\t</>\n\t);\n};\n\nexport default ConfirmPopUp;\n"],"names":["CloseIcon"],"mappings":";;;;;;;;;;;;;;;;AAqCO,MAAM,eAAe,CAAC,UAA6B;AACzD,QAAM,EAAE,EAAA,IAAM,eAAA;AAC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,cACR,SAAS;AAAA,cACT,OAAO,6CAAc;AAAA,cACrB,UAAU;AAAA,cACT,UAAA,YAAY;AAAA,YAAA;AAAA,UAAA;AAAA,UAEd,YAAY,WAAU;AAAA,YAAC;AAAA,YAAA;AAAA,cACtB,OAAO,aAAa;AAAA,cACpB,SAAS;AAAA,cACT,IAAI,QAAM,EAAC,IAAI,EAAA,IAAG,CAAA;AAAA,cAClB,SAAS,WAAW,oBAAC,oBAAiB,MAAM,IAAI,OAAM,WAAU;AAAA,cAChE,UAAU;AAAA,cACT,UAAA,YAAY;AAAA,YAAA;AAAA,UAAA;AAAA,QACd;AAAA,MAAA;AAAA,IAAA;AAAA,EACD,EAAA,CACD,EAAA,CACD;AAEF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/confirm-modal/confirm-modal.tsx"],"sourcesContent":["import {\n\tBox,\n\tCircularProgress,\n\tDialog,\n\tDialogActions,\n\tDialogContent,\n\tDialogProps,\n\tDialogTitle,\n\tDivider,\n\tIconButton\n} from '@mui/material';\nimport CloseIcon from '@mui/icons-material/Close';\nimport Typography from '../typography/typography';\nimport Button from '../button/button';\nimport './confirm-modal.scss';\nimport images from '../../assets/images';\nimport { useLanguage } from '../../hooks/useLangauge';\nimport { useTranslation } from 'react-i18next';\n\ninterface ConfirmPopUpProps extends DialogProps {\n\ttitle: string;\n\tdescription: string | JSX.Element;\n\tonClose: () => void;\n\tonConfirm: () => void;\n\tbuttonTexts?: {\n\t\tconfirm: string;\n\t\tcancel: string;\n\t};\n\tbuttonColors?: {\n\t\tconfirm: string;\n\t\tcancel?: string;\n\t};\n\tmodalType?: 'alert' | 'info';\n\tloading?: boolean;\n\tshowAction?: boolean;\n}\n\nconst ConfirmPopUp = (props: ConfirmPopUpProps) => {\n\tconst { t } = useTranslation();\n\tconst {\n\t\topen,\n\t\ttitle,\n\t\tdescription,\n\t\tonClose,\n\t\tonConfirm,\n\t\tmodalType = 'alert',\n\t\tbuttonTexts = { confirm: t('common.delete'), cancel: t('common.cancel') },\n\t\tbuttonColors = { confirm: 'error' },\n\t\tloading = false,\n\t\tshowAction=true,\n\t\t...rest\n\t} = props;\n\n\tconst icon = modalType === 'info' ? images.info : images.alert;\n const {isRtl}=useLanguage();\n\treturn (\n\t\t<>\n\t\t\t<Dialog open={open} onClose={onClose} className='confirm' {...rest}>\n\t\t\t\t<DialogTitle className='confirm--head'>\n\t\t\t\t\t<Box className='confirm--title'>\n\t\t\t\t\t\t<img src={icon} alt='alert icon' />{' '}\n\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\ttype='s3'\n\t\t\t\t\t\t\tml={1}\n\t\t\t\t\t\t\tweight='medium'\n\t\t\t\t\t\t\tcolor='theme.secondary.1000'>\n\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t</Typography>\n\t\t\t\t\t</Box>\n\t\t\t\t\t<IconButton disableRipple onClick={onClose} disabled={loading}>\n\t\t\t\t\t\t<CloseIcon />\n\t\t\t\t\t</IconButton>\n\t\t\t\t</DialogTitle>\n\t\t\t\t<Divider />\n\t\t\t\t<DialogContent className='confirm--content'>\n\t\t\t\t\t<Typography type='s3' color='theme.secondary.1000'>\n\t\t\t\t\t\t{description}\n\t\t\t\t\t</Typography>\n\t\t\t\t</DialogContent>\n\t\t\t\t<Divider />\n\t\t\t\t{showAction &&<DialogActions\n\t\t\t\t\tclassName='confirm--actions'\n\t\t\t\t\tsx={{ backgroundColor: 'theme.secondary.200' }}>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant='text'\n\t\t\t\t\t\tonClick={onClose}\n\t\t\t\t\t\tcolor={buttonColors?.cancel}\n\t\t\t\t\t\tdisabled={loading}>\n\t\t\t\t\t\t{buttonTexts.cancel}\n\t\t\t\t\t</Button>\n\t\t\t\t{buttonTexts.confirm &&<Button\n\t\t\t\t\t\tcolor={buttonColors.confirm}\n\t\t\t\t\t\tonClick={onConfirm}\n\t\t\t\t\t\tsx={isRtl?{mr: 1}:{}}\n\t\t\t\t\t\tendIcon={loading && <CircularProgress size={18} color='inherit' />}\n\t\t\t\t\t\tdisabled={loading}>\n\t\t\t\t\t\t{buttonTexts.confirm}\n\t\t\t\t\t</Button>}\n\t\t\t\t</DialogActions>}\n\t\t\t</Dialog>\n\t\t</>\n\t);\n};\n\nexport { ConfirmPopUp };\nexport default ConfirmPopUp;\n"],"names":["ConfirmPopUp","props","t","useTranslation","open","title","description","onClose","onConfirm","modalType","buttonTexts","confirm","cancel","buttonColors","loading","showAction","rest","icon","images","info","alert","isRtl","useLanguage","jsx","Fragment","children","Dialog","className","jsxs","DialogTitle","Box","src","alt","Typography","type","ml","weight","color","IconButton","disableRipple","onClick","disabled","CloseIcon","Divider","DialogContent","DialogActions","sx","backgroundColor","Button","variant","mr","endIcon","CircularProgress","size"],"mappings":"uiCAqCA,MAAMA,EAAgBC,IACrB,MAAMC,EAAEA,GAAMC,oBACRC,KACLA,EAAAC,MACAA,EAAAC,YACAA,EAAAC,QACAA,EAAAC,UACAA,EAAAC,UACAA,EAAY,QAAAC,YACZA,EAAc,CAAEC,QAAST,EAAE,iBAAkBU,OAAQV,EAAE,kBAAeW,aACtEA,EAAe,CAAEF,QAAS,SAAAG,QAC1BA,GAAU,EAAAC,WACVA,GAAW,KACRC,GACAf,EAEEgB,EAAqB,SAAdR,EAAuBS,EAAAA,OAAOC,KAAOD,EAAAA,OAAOE,OAChDC,MAACA,GAAOC;AACjB,SACCC,IAAAC,EAAAA,SAAA,CACCC,+BAACC,EAAAA,QAAA,CAAOtB,OAAYG,UAAkBoB,UAAU,aAAcX,EAC7DS,SAAA;iBAAAG,KAACC,EAAAA,QAAA,CAAYF,UAAU,gBACtBF,SAAA;iBAAAG,KAACE,EAAAA,QAAA,CAAIH,UAAU,iBACdF,SAAA;eAAAF,EAAAA,IAAC,MAAA,CAAIQ,IAAKd,EAAMe,IAAI,eAAgB;eACpCT,EAAAA,IAACU,EAAAA,WAAA,CACAC,KAAK,KACLC,GAAI,EACJC,OAAO,SACPC,MAAM,uBACLZ,SAAApB;iBAGHkB,IAACe,EAAAA,QAAA,CAAWC,eAAa,EAACC,QAASjC,EAASkC,SAAU3B,EACrDW,0BAAAF,IAACmB,EAAAA,QAAA,CAAA;qBAGFC,EAAAA,QAAA;eACDpB,EAAAA,IAACqB,EAAAA,QAAA,CAAcjB,UAAU,mBACxBF,wBAAAF,EAAAA,IAACU,EAAAA,WAAA,CAAWC,KAAK,KAAKG,MAAM,uBAC1BZ,SAAAnB;qBAGFqC,EAAAA,QAAA,IACA5B,kBAAaa,EAAAA,KAACiB,EAAAA,QAAA,CACdlB,UAAU,mBACVmB,GAAI,CAAEC,gBAAiB,uBACvBtB,SAAA;eAAAF,EAAAA,IAACyB,EAAAA,OAAA,CACAC,QAAQ,OACRT,QAASjC,EACT8B,MAAO,MAAAxB,OAAA,EAAAA,EAAcD,OACrB6B,SAAU3B,EACTW,SAAAf,EAAYE,SAEdF,EAAYC,wBAAUY,EAAAA,IAACyB,EAAAA,OAAA,CACtBX,MAAOxB,EAAaF,QACpB6B,QAAShC,EACTsC,GAAIzB,EAAM,CAAC6B,GAAI,GAAG,CAAA,EAClBC,QAASrC,kBAAWS,EAAAA,IAAC6B,EAAAA,SAAiBC,KAAM,GAAIhB,MAAM,YACtDI,SAAU3B,EACTW,SAAAf,EAAYC"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/confirm-modal/confirm-modal.tsx"],"sourcesContent":["import {\n\tBox,\n\tCircularProgress,\n\tDialog,\n\tDialogActions,\n\tDialogContent,\n\tDialogProps,\n\tDialogTitle,\n\tDivider,\n\tIconButton\n} from '@mui/material';\nimport CloseIcon from '@mui/icons-material/Close';\nimport Typography from '../typography/typography';\nimport Button from '../button/button';\nimport './confirm-modal.scss';\nimport images from '../../assets/images';\nimport { useLanguage } from '../../hooks/useLangauge';\nimport { useTranslation } from 'react-i18next';\n\ninterface ConfirmPopUpProps extends DialogProps {\n\ttitle: string;\n\tdescription: string | JSX.Element;\n\tonClose: () => void;\n\tonConfirm: () => void;\n\tbuttonTexts?: {\n\t\tconfirm: string;\n\t\tcancel: string;\n\t};\n\tbuttonColors?: {\n\t\tconfirm: string;\n\t\tcancel?: string;\n\t};\n\tmodalType?: 'alert' | 'info';\n\tloading?: boolean;\n\tshowAction?: boolean;\n}\n\nexport const ConfirmPopUp = (props: ConfirmPopUpProps) => {\n\tconst { t } = useTranslation();\n\tconst {\n\t\topen,\n\t\ttitle,\n\t\tdescription,\n\t\tonClose,\n\t\tonConfirm,\n\t\tmodalType = 'alert',\n\t\tbuttonTexts = { confirm: t('common.delete'), cancel: t('common.cancel') },\n\t\tbuttonColors = { confirm: 'error' },\n\t\tloading = false,\n\t\tshowAction=true,\n\t\t...rest\n\t} = props;\n\n\tconst icon = modalType === 'info' ? images.info : images.alert;\n const {isRtl}=useLanguage();\n\treturn (\n\t\t<>\n\t\t\t<Dialog open={open} onClose={onClose} className='confirm' {...rest}>\n\t\t\t\t<DialogTitle className='confirm--head'>\n\t\t\t\t\t<Box className='confirm--title'>\n\t\t\t\t\t\t<img src={icon} alt='alert icon' />{' '}\n\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\ttype='s3'\n\t\t\t\t\t\t\tml={1}\n\t\t\t\t\t\t\tweight='medium'\n\t\t\t\t\t\t\tcolor='theme.secondary.1000'>\n\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t</Typography>\n\t\t\t\t\t</Box>\n\t\t\t\t\t<IconButton disableRipple onClick={onClose} disabled={loading}>\n\t\t\t\t\t\t<CloseIcon />\n\t\t\t\t\t</IconButton>\n\t\t\t\t</DialogTitle>\n\t\t\t\t<Divider />\n\t\t\t\t<DialogContent className='confirm--content'>\n\t\t\t\t\t<Typography type='s3' color='theme.secondary.1000'>\n\t\t\t\t\t\t{description}\n\t\t\t\t\t</Typography>\n\t\t\t\t</DialogContent>\n\t\t\t\t<Divider />\n\t\t\t\t{showAction &&<DialogActions\n\t\t\t\t\tclassName='confirm--actions'\n\t\t\t\t\tsx={{ backgroundColor: 'theme.secondary.200' }}>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant='text'\n\t\t\t\t\t\tonClick={onClose}\n\t\t\t\t\t\tcolor={buttonColors?.cancel}\n\t\t\t\t\t\tdisabled={loading}>\n\t\t\t\t\t\t{buttonTexts.cancel}\n\t\t\t\t\t</Button>\n\t\t\t\t{buttonTexts.confirm &&<Button\n\t\t\t\t\t\tcolor={buttonColors.confirm}\n\t\t\t\t\t\tonClick={onConfirm}\n\t\t\t\t\t\tsx={isRtl?{mr: 1}:{}}\n\t\t\t\t\t\tendIcon={loading && <CircularProgress size={18} color='inherit' />}\n\t\t\t\t\t\tdisabled={loading}>\n\t\t\t\t\t\t{buttonTexts.confirm}\n\t\t\t\t\t</Button>}\n\t\t\t\t</DialogActions>}\n\t\t\t</Dialog>\n\t\t</>\n\t);\n};\n\nexport default ConfirmPopUp;\n"],"names":["ConfirmPopUp","props","t","useTranslation","open","title","description","onClose","onConfirm","modalType","buttonTexts","confirm","cancel","buttonColors","loading","showAction","rest","icon","images","info","alert","isRtl","useLanguage","jsx","Fragment","children","Dialog","className","jsxs","DialogTitle","Box","src","alt","Typography","type","ml","weight","color","IconButton","disableRipple","onClick","disabled","CloseIcon","Divider","DialogContent","DialogActions","sx","backgroundColor","Button","variant","mr","endIcon","CircularProgress","size"],"mappings":"uiCAqCO,MAAMA,EAAgBC,IAC5B,MAAMC,EAAEA,GAAMC,oBACRC,KACLA,EAAAC,MACAA,EAAAC,YACAA,EAAAC,QACAA,EAAAC,UACAA,EAAAC,UACAA,EAAY,QAAAC,YACZA,EAAc,CAAEC,QAAST,EAAE,iBAAkBU,OAAQV,EAAE,kBAAeW,aACtEA,EAAe,CAAEF,QAAS,SAAAG,QAC1BA,GAAU,EAAAC,WACVA,GAAW,KACRC,GACAf,EAEEgB,EAAqB,SAAdR,EAAuBS,EAAAA,OAAOC,KAAOD,EAAAA,OAAOE,OAChDC,MAACA,GAAOC;AACjB,SACCC,IAAAC,EAAAA,SAAA,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